:root {
  --paper: #f0ede1;
  --ink: #1a1a1a;
  --border: #2c2c2c;
  cursor: url("/bee-cursor.cur"), url("/bee-cursor.png"), auto;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
::selection {
  background-color: var(--ink);
  color: var(--paper);
}
body {
  background-color: #0a0a0a;
  color: var(--ink);
  font-family: "Old Standard TT", serif;
  overflow-x: hidden;
}
a {
  cursor: pointer;
}
img {
  user-select: none;
}
/* --- LAYOUT --- */
#page-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 2500px;
  overflow: hidden;
}

#paper-bundle {
  width: 98vw;
  height: 98vh;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.is-flipped {
  transform: rotateY(-180deg);
}

.sheet {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--paper);
  background-image: url("https://www.transparenttextures.com/patterns/paper-fibers.png");
  backface-visibility: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  border: 1px solid #d3d0c9;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-width: auto;
}

.sheet::-webkit-scrollbar {
  width: 8px;
}

.sheet::-webkit-scrollbar-track {
  background: transparent;
}

.sheet::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.sheet::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.sheet-front {
  pointer-events: auto;
}

.sheet-back {
  transform: rotateY(180deg);
  pointer-events: none;
}

.is-flipped .sheet-front {
  pointer-events: none;
}

.is-flipped .sheet-back {
  pointer-events: auto;
}

/* --- CUSTOM LOGO & ILLUSTRATIONS --- */
.masthead {
  border-bottom: 6px double var(--ink);
  padding: 10px 8px;
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.logo-area {
  text-align: center;
  flex-grow: 1;
}

.logo-en {
  font-family: "Old Standard TT", serif;
  font-size: 55px;
  line-height: 1;
  margin-bottom: 5px;
}
.logo-ar {
  font-family: "Amiri", serif;
  font-size: 45px;
  line-height: 1;
  color: var(--ink);
  margin-top: -10px;
  display: block;
}

/* Illustrations for Header Gaps */
.header-illu {
  width: 100px;
  opacity: 0.9;
  filter: grayscale(1) contrast(1.2);
  mix-blend-mode: multiply;
}
.header-illu {
  transition: filter 0.3s ease, mix-blend-mode 0.3s ease, background 0.3s ease;
}

.header-illu:hover {
  filter: none;
  mix-blend-mode: normal;
  background: none;
}
/* --- VINTAGE NEWSPAPER HEADER --- */
.vintage-newspaper-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  /* flex-wrap: wrap; */
}

/* DESKTOP HEADER LAYOUT */
.masthead-mobile {
  display: none;
}

.header-layout-desktop {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 20px;
  width: 100%;
}

/* MOBILE HEADER LAYOUT */
.header-layout-mobile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.header-layout-mobile-links {
  display: flex;
  flex-direction: row;
  width: 100%;
  gap: 6px;
  justify-content: center;
  margin-top: 8px;
}

.contact-boxes-column {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.social-links-column {
  display: flex;
  flex-direction: row;
  gap: 8px;
  justify-content: center;
}

.social-left {
  flex-direction: column;
}

.social-right {
  flex-direction: column;
}

.header-top-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
}

.newspaper-badge {
  font-family: "Old Standard TT", serif;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 3px;
  border: 2px solid var(--ink);
  padding: 5px 12px;
  background: var(--paper);
}

.newspaper-title {
  font-family: "Old Standard TT", serif;
  font-size: 40px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  line-height: 1;
  margin: 0;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "Old Standard TT", serif;
}

.contact-item i {
  width: 20px;
  text-align: center;
  color: var(--ink);
  font-size: 14px;
}

.social-links-header {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: var(--ink);
  font-family: "Old Standard TT", serif;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 5px 10px;
  border: 1px solid var(--ink);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.social-link:hover {
  background: var(--ink);
  color: var(--paper);
}

.social-link i {
  font-size: 16px;
}

/* --- EXPERIENCE SECTION --- */
.col:nth-child(2) {
  position: relative;
}

.experience-item {
  margin-bottom: 20px;
  page-break-inside: avoid;
}

.experience-header {
  margin-bottom: 0px;
}

.experience-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.experience-header h2 {
  border: none;
  margin: 0;
  padding: 0;
  font-size: 20px;
  flex-grow: 1;
  text-transform: none;
}

.experience-role {
  font-weight: bold;
  font-size: 16px;
  letter-spacing: 1px;
  margin: 2px 0;
  color: var(--ink);
}

.experience-meta {
  font-size: 14px;
  color: #333;
  margin: 2px 0;
  letter-spacing: 1px;
  font-weight: 600;
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.experience-type {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 1px solid var(--ink);
  padding: 3px 8px;
  margin: 0;
  white-space: nowrap;
}

.experience-description {
  margin-top: 8px;
}

.experience-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.experience-list li {
  font-family: "Crimson Text", "Georgia", serif;
  font-size: 15px;
  line-height: 1.7;
  margin-top: 4px;
  padding-left: 20px;
  position: relative;
  font-weight: 500;
}

.experience-list li:before {
  content: "•";
  position: absolute;
  left: 0;
  font-weight: bold;
  font-size: 18px;
  color: var(--ink);
}

/* --- EDUCATION SECTION --- */
.education-item {
  margin-bottom: 10px;
  page-break-inside: avoid;
}

.education-header {
  margin-bottom: 10px;
}

.education-header h3 {
  font-family: "Old Standard TT", serif;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 5px 0;
  color: var(--ink);
}

.education-degree {
  font-weight: bold;
  font-size: 14px;
  letter-spacing: 0.5px;
  margin: 3px 0;
  color: var(--ink);
}

.education-meta {
  font-size: 15px;
  color: #333;
  margin: 4px 0;
  font-weight: 600;
}

.education-details {
  margin-top: 8px;
}

.education-details p {
  font-family: "Crimson Text", "Georgia", serif;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 500;
  margin-bottom: 6px;
}

.sub-header {
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  padding: 4px 10px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

/* --- CONTENT GRID --- */
.grid {
  display: grid;
  grid-template-columns: 1fr 1.8fr 1fr;
  gap: 30px;
  padding: 0px 20px 0 20px;
}

.back-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 0px 20px 20px 20px;
}

.col::-webkit-scrollbar {
  width: 6px;
}

.col::-webkit-scrollbar-track {
  background: transparent;
}

.col::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.col::-webkit-scrollbar-thumb:hover {
  background: #999;
}

h1 {
  font-family: "Old Standard TT", serif;
  font-size: 45px;
  line-height: 0.95;
  margin-bottom: 15px;
  text-transform: uppercase;
}
h2 {
  font-family: "Old Standard TT", serif;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 10px;
  font-size: 22px;
}

p {
  font-size: 16px;
  line-height: 1.5;
  text-align: justify;
  margin-bottom: 15px;
}
.dropcap::first-letter {
  float: left;
  font-size: 80px;
  line-height: 65px;
  padding-right: 10px;
  font-family: "Old Standard TT", serif;
  font-weight: 900;
}

/* Halftone Images */
.ink-img {
  border: 1px solid #000;
  padding: 4px;
  background: #fff;
  margin-bottom: 15px;
  position: relative;
}

.photo-caption {
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  color: var(--ink);
  margin-top: 8px;
  letter-spacing: 1px;
  font-family: "Old Standard TT", serif;
}
.ink-img img {
  width: 100%;
  filter: grayscale(1) contrast(1.4);
  mix-blend-mode: multiply;
  background-image: radial-gradient(#000 1px, transparent 0);
  background-size: 3px 3px;
  height: 500px;
  object-fit: cover;
}

.ink-img img {
  transition: filter 0.3s ease, mix-blend-mode 0.3s ease, background 0.3s ease;
}

.ink-img img:hover {
  filter: none;
  mix-blend-mode: normal;
  background: none;
}

/* --- PUZZLE --- */
.puzzle-box {
  border: 2px solid var(--ink);
  padding: 15px;
  background: rgba(0, 0, 0, 0.03);
  margin-bottom: 15px;
}

.puzzle-box h2 {
  font-size: 16px;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.puzzle-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 10px;
}

.puzzle-tile {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Old Standard TT", serif;
  font-size: 18px;
  font-weight: bold;
  border: 2px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.puzzle-tile:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.puzzle-tile.selected {
  background: var(--ink);
  color: var(--paper);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.puzzle-tile.space {
  border: 2px dashed rgba(26, 26, 26, 0.3);
  background: transparent;
  cursor: default;
}

.puzzle-tile.space:hover {
  background: transparent;
  color: var(--ink);
  transform: none;
  box-shadow: none;
}

.puzzle-tile.correct {
  animation: tileCorrect 0.4s ease;
}

@keyframes tileCorrect {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); background: var(--ink); color: var(--paper); }
  100% { transform: scale(1); }
}

.puzzle-status {
  font-family: "Old Standard TT", serif;
  font-size: 12px;
  text-align: center;
  letter-spacing: 1px;
  font-weight: bold;
  margin-bottom: 0;
  transition: all 0.3s ease;
}

.puzzle-solved {
  animation: solvedPulse 1s ease infinite;
}

@keyframes solvedPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Confetti */
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  z-index: 9999;
  pointer-events: none;
  animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) rotate(720deg) scale(0.5);
  }
}

.badge-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  border: 2px solid var(--ink);
  padding: 10px;
  background: rgba(0, 0, 0, 0.03);
}
.badge {
  width: 70px;
  filter: grayscale(1) contrast(1.2);
  mix-blend-mode: multiply;
}

/* --- GRADUATION PROJECT & ACTIVITIES --- */
.project-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-item {
  margin-bottom: 20px;
  page-break-inside: avoid;
}

.project-item h3 {
  font-family: "Old Standard TT", serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.project-meta {
  font-size: 14px;
  color: #333;
  margin: 2px 0;
  letter-spacing: 1px;
  font-weight: 600;
  line-height: 1.5;
}

.project-item p {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 10px;
}

.project-date {
  font-size: 14px;
  color: #333;
  margin: 0 !important;
  font-weight: 600;
  line-height: 1.5;
}

.challenges-section {
  padding-top: 15px;
}

.challenges-title {
  font-size: 14px;
  color: #333;
  margin: 2px 0;
  letter-spacing: 1px;
  font-weight: 600;
  line-height: 1.5;
}

.activity-item {
  margin-bottom: 20px;
  page-break-inside: avoid;
}

.activity-item h3 {
  font-family: "Old Standard TT", serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

/* --- CURSOR MESSAGES --- */
.cursor-message {
  position: fixed;
  pointer-events: none;
  font-family: "Old Standard TT", serif;
  font-size: 15px;
  font-weight: bold;
  color: var(--ink);
  background: rgba(240, 237, 225, 0.98);
  border: 2px solid var(--ink);
  padding: 12px 16px;
  border-radius: 25px;
  white-space: nowrap;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  animation: thoughtEnter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, thoughtFloat 2s ease-in-out 0.5s infinite, thoughtExit 1s ease-in 3.5s forwards;
}

@keyframes thoughtEnter {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes thoughtFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-1px);
  }
}

@keyframes thoughtExit {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.8) translateY(-15px);
  }
}

/* --- INTERACTIVE --- */
#skill-cloud {
  width: 100%;
  height: 400px;
  margin-top: 20px;
  background: transparent;
}

/* --- CONTROL PANEL --- */
.control-panel {
  background: rgba(0, 0, 0, 0.03);
  border: 2px solid var(--ink);
  padding: 10px 20px;
  margin-top: 10px;
  position: relative;
}

/* Bee Mood Slider */
.bee-mood-slider {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mood-label-left,
.mood-label-right {
  font-family: "Old Standard TT", serif;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #666;
  white-space: nowrap;
}

.mood-range {
  width: 80px !important;
}


.panel-label {
  font-family: "Old Standard TT", serif;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
  padding: 4px 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 10px;
}

.control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(26, 26, 26, 0.2);
}

.control-row:last-of-type {
  border-bottom: none;
}

.control-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.control-name {
  font-family: "Old Standard TT", serif;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.control-desc {
  font-family: "Old Standard TT", serif;
  font-size: 11px;
  letter-spacing: 2px;
  color: #666;
  font-weight: bold;
  transition: color 0.3s ease;
}

/* Vintage Toggle Switch */
.vintage-switch {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.vintage-switch input {
  display: none;
}

.switch-slider {
  width: 52px;
  height: 26px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 13px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--ink);
  border-radius: 50%;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.vintage-switch input:checked ~ .switch-slider {
  background: var(--ink);
}

.vintage-switch input:checked ~ .switch-slider .switch-knob {
  left: 28px;
  background: var(--paper);
}

.switch-labels {
  display: none;
}

/* Vintage Range Slider */
.vintage-range {
  -webkit-appearance: none;
  appearance: none;
  width: 120px;
  height: 6px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.vintage-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--ink);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.vintage-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.vintage-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--ink);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.panel-warning {
  text-align: center;
  font-family: "Old Standard TT", serif;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid var(--ink);
  color: #666;
}

.panel-warning i {
  margin-right: 4px;
}

/* --- LANTERN MODE (Lights Off) --- */
#lantern-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 8000;
  pointer-events: none;
  background: radial-gradient(
    circle 150px at var(--lantern-x, 50%) var(--lantern-y, 50%),
    transparent 0%,
    transparent 40%,
    rgba(0, 0, 0, 0.75) 65%,
    rgba(0, 0, 0, 0.97) 100%
  );
  transition: opacity 0.6s ease;
  animation: lanternFlicker 3s ease-in-out infinite;
}

@keyframes lanternFlicker {
  0%, 100% { opacity: 1; }
  25% { opacity: 0.98; }
  50% { opacity: 1; }
  75% { opacity: 0.96; }
}

/* --- ZERO-G MODE --- */
body.zero-g .experience-item,
body.zero-g .education-item,
body.zero-g .project-item,
body.zero-g .activity-item,
body.zero-g .about-intro,
body.zero-g .ink-img,
body.zero-g .puzzle-box,
body.zero-g .control-panel,
body.zero-g .sub-header,
body.zero-g .social-link,
body.zero-g h2,
body.zero-g .header-illu,
body.zero-g .photo-caption {
  animation: floatAround 4s ease-in-out infinite;
}

body.zero-g .experience-item:nth-child(2) { animation-delay: 0.3s; }
body.zero-g .experience-item:nth-child(3) { animation-delay: 0.6s; }
body.zero-g .education-item { animation-delay: 0.9s; }
body.zero-g .ink-img { animation-delay: 1.2s; }
body.zero-g .about-intro { animation-delay: 0.4s; }
body.zero-g .puzzle-box { animation-delay: 0.7s; }
body.zero-g .control-panel { animation-delay: 1s; }
body.zero-g .sub-header { animation-delay: 0.2s; }
body.zero-g .social-link:nth-child(1) { animation-delay: 0.15s; }
body.zero-g .social-link:nth-child(2) { animation-delay: 0.35s; }
body.zero-g .social-link:nth-child(3) { animation-delay: 0.55s; }
body.zero-g .social-link:nth-child(4) { animation-delay: 0.75s; }
body.zero-g h2 { animation-delay: 0.5s; }
body.zero-g .header-illu { animation-delay: 0.8s; animation-duration: 3s; }
body.zero-g .photo-caption { animation-delay: 1.1s; }

@keyframes floatAround {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-8px) rotate(0.5deg); }
  75% { transform: translateY(5px) rotate(-0.5deg); }
}

/* --- REDACTED MODE --- */
body.redacted .experience-list li,
body.redacted .about-intro,
body.redacted .education-degree,
body.redacted .education-meta,
body.redacted .experience-meta,
body.redacted .experience-role,
body.redacted .project-meta,
body.redacted .challenges-title {
  background: var(--ink);
  color: var(--ink);
  user-select: none;
  transition: all 0.3s ease;
}

body.redacted .experience-list li:hover,
body.redacted .about-intro:hover,
body.redacted .education-degree:hover,
body.redacted .education-meta:hover,
body.redacted .experience-meta:hover,
body.redacted .experience-role:hover,
body.redacted .project-meta:hover,
body.redacted .challenges-title:hover {
  background: transparent;
  color: var(--ink);
}

.nav-btn {
  position: fixed;
  bottom: 20px;
  right: 30px;
  color: var(--ink);
  background-color: var(--paper);
  border: 2px solid var(--ink);
  padding: 6px 8px;
  font-weight: bold;
  z-index: 5000;
  cursor: pointer;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.nav-btn:hover {
  background-color: var(--ink);
  color: var(--paper);
}

.fa-arrow-right {
  font-size: 20px;
  animation: bounceRight 1.5s ease-in-out infinite;
}

@keyframes bounceRight {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(8px);
  }
}

.fa-arrow-right {
  font-size: 24px;
}

/* --- MOBILE --- */
@media (max-width: 1200px) {
  .newspaper-title {
    font-size: 36px;
    letter-spacing: 1.2px;
  }
  .header-subtitle {
    font-size: 12px;
  }
  .social-link {
    font-size: 10px;
    padding: 4px 8px;
    gap: 4px;
  }
  .social-link i {
    font-size: 13px;
  }
}

@media (max-width: 1023px) {
  body {
    background: var(--paper);
    overflow-y: auto;
  }
  #page-container {
    height: auto;
    display: block;
    perspective: none;
    width: 100%;
    overflow: hidden;
  }
  #paper-bundle {
    height: auto;
    transform: none !important;
    width: 100%;
  }
  .sheet {
    position: relative;
    height: auto;
    box-shadow: none;
    border: none;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 15px;
    pointer-events: auto;
    width: 100%;
    max-width: 100%;
  }
  .sheet-back {
    transform: none;
    border-top: 10px double var(--ink);
  }
  .grid,
  .back-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0;
    width: 100%;
    max-width: 100%;
  }
  .nav-btn {
    display: none;
  }
  .header-layout {
    flex-direction: row;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
  }
  .vintage-newspaper-header {
    flex: 1;
    min-width: 200px;
  }
  .social-link {
    font-size: 9px;
    padding: 4px 8px;
  }
  .newspaper-title {
    font-size: 28px;
    letter-spacing: 1px;
  }
  .header-subtitle {
    font-size: 11px;
  }
  .contact-boxes-column {
    flex-direction: row;
    justify-content: center;
    width: 100%;
  }
  .social-links-column {
    flex-direction: row;
    justify-content: center;
    width: 100%;
    gap: 10px;
  }
  .newspaper-title {
    font-size: 32px;
    letter-spacing: 1.5px;
  }
  .header-subtitle {
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .masthead-desktop {
    display: none;
  }

  .control-panel,
  .puzzle-box {
    display: none;
  }

  .masthead-mobile {
    display: flex;
    flex-direction: column;
  }

  .masthead {
    padding: 8px 6px;
    margin-bottom: 8px;
  }
  .header-layout {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
  }
  .header-illu {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    flex-grow: 0;
    align-self: center;
  }

  .header-layout-mobile > a:first-of-type {
    order: 1;
  }

  .header-layout-mobile > a:nth-of-type(2) {
    order: 3;
  }
  .vintage-newspaper-header {
    order: 2;
    flex-basis: auto;
    flex-grow: 1;
    width: auto;
    text-align: center;
  }
  .social-left {
    order: 3;
    flex-direction: row;
    width: 100%;
    flex-basis: 100%;
    justify-content: center;
    gap: 6px;
  }
  .social-right {
    order: 3;
    flex-direction: row;
    width: 100%;
    flex-basis: 100%;
    justify-content: center;
    gap: 6px;
  }
  .social-links-column {
    display: flex;
  }
  .newspaper-title {
    font-size: 24px;
    letter-spacing: 0.8px;
  }
  .header-subtitle {
    font-size: 10px;
  }
  .social-link {
    font-size: 8px;
    padding: 3px 6px;
  }
  .social-link i {
    font-size: 11px;
  }
  .sheet {
    padding: 12px;
    width: 100%;
    overflow-x: hidden;
  }
  .grid {
    gap: 12px;
    padding: 0;
    width: 100%;
    max-width: 100%;
  }
  .back-grid {
    gap: 12px;
    padding: 0;
    width: 100%;
    max-width: 100%;
  }
  p {
    font-size: 13px;
  }
  h2 {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .newspaper-title {
    font-size: 18px;
    letter-spacing: 0.5px;
  }
  .header-subtitle {
    font-size: 9px;
  }
  .social-link {
    font-size: 7px;
    padding: 2px 4px;
    gap: 2px;
  }
  .social-link i {
    font-size: 10px;
  }
  p {
    font-size: 12px;
  }
  h1 {
    font-size: 28px;
  }
  h2 {
    font-size: 14px;
  }
}

.flex-row-space-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.about-intro {
  font-family: "Crimson Text", "Georgia", serif;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 500;
  margin-bottom: 15px;
}

.name-styled {
  font-family: "Old Standard TT", serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
}

.dropcap-inline {
  font-size: 28px;
  font-family: "Old Standard TT", serif;
  font-weight: 900;
  line-height: 1;
  color: var(--ink);
}

.name-arabic {
  font-family: "Amiri", serif;
  font-size: 20px;
  margin-left: 8px;
  opacity: 1;
  font-weight: 800;
  letter-spacing: 1px;
}

@media (max-width: 768px) {
  .masthead-desktop {
    display: none;
  }

  .masthead-mobile {
    display: flex;
    flex-direction: column;
  }

  .masthead {
    padding: 8px 6px;
    margin-bottom: 8px;
  }
  .header-layout {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
  }
  .header-illu {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    flex-grow: 0;
    align-self: center;
  }

  .header-layout-mobile > a:first-of-type {
    order: 1;
  }

  .header-layout-mobile > a:nth-of-type(2) {
    order: 3;
  }
  .vintage-newspaper-header {
    order: 2;
    flex-basis: auto;
    flex-grow: 1;
    width: auto;
    text-align: center;
  }
  .social-left {
    order: 3;
    flex-direction: row;
    width: 100%;
    flex-basis: 100%;
    justify-content: center;
    gap: 6px;
  }
  .social-right {
    order: 3;
    flex-direction: row;
    width: 100%;
    flex-basis: 100%;
    justify-content: center;
    gap: 6px;
  }
  .social-links-column {
    display: flex;
  }
  .newspaper-title {
    font-size: 24px;
    letter-spacing: 0.8px;
  }
  .header-subtitle {
    font-size: 10px;
  }
  .social-link {
    font-size: 8px;
    padding: 3px 6px;
  }
  .social-link i {
    font-size: 11px;
  }
  .sheet {
    padding: 12px;
    width: 100%;
    overflow-x: hidden;
  }
  .grid {
    gap: 12px;
    padding: 0;
    width: 100%;
    max-width: 100%;
  }
  .back-grid {
    gap: 12px;
    padding: 0;
    width: 100%;
    max-width: 100%;
  }
  
  /* Back page mobile: force titles to take full row */
  .sheet-back .project-title,
  .sheet-back .project-item h3,
  .sheet-back .activity-item h3 {
    display: block;
    width: 100%;
  }
  
  .sheet-back .project-date {
    display: block;
    width: 100%;
    margin-top: 4px !important;
  }
  
  p {
    font-size: 13px;
  }
  h2 {
    font-size: 16px;
  }
}