/* =========================================================
   ZEINA — CREATIVE PORTFOLIO
   Night-mode default (poster-noir), Light mode = warm ivory
   ========================================================= */

/* ---------- TOKENS ---------- */
:root {
  --bg: #140a0c;
  --bg-soft: #2a1119;
  --bg-card: #331420;
  --ink: #f4efe8;
  --ink-dim: #a89e93;
  --ink-faint: #6e655c;
  --red: #8b1523;
  --red-bright: #c11f36;
  --red-deep: #3a0710;
  --red-wash: rgba(139, 21, 35, 0.16);
  --line: rgba(244, 239, 232, 0.12);
  --line-soft: rgba(244, 239, 232, 0.06);

  --font-ui: "Cairo", "Segoe UI", sans-serif;
  --font-display: "Playfair Display", "Cairo", serif;

  --container: 1240px;
  --pad: clamp(24px, 5vw, 72px);
  --radius-s: 6px;
  --radius-m: 14px;
  --radius-l: 28px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

body.light {
  --bg: #f2e9de;
  --bg-soft: #fbf6ef;
  --bg-card: #ffffff;
  --ink: #241713;
  --ink-dim: #6d5b52;
  --ink-faint: #96877d;
  --red: #7a1626;
  --red-bright: #931b2d;
  --red-deep: #f0dccb;
  --red-wash: rgba(122, 22, 38, 0.08);
  --line: rgba(36, 23, 19, 0.12);
  --line-soft: rgba(36, 23, 19, 0.06);
  color-scheme: light;
}

/* ---------- RESET ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

html, body {
  overflow-y: hidden; /* released by JS once cinematic intro completes */
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  line-height: 1.6;
  transition: background 0.6s var(--ease), color 0.6s var(--ease);
  position: relative;
  min-height: 100vh;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }
section { position: relative; }

::selection { background: var(--red); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- GRAIN / TEXTURE ---------- */
.noise {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.light .noise { opacity: 0.02; }

/* ---------- SCROLL PROGRESS ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--red-deep), var(--red-bright));
  z-index: 999;
  transition: width 0.1s linear;
}

/* =========================================================
   CINEMATIC LOADER
   ========================================================= */
body.cinematic-loading { overflow: hidden; height: 100vh; }

.cinematic-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #0e0708;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transition: opacity 0.8s var(--ease), visibility 0.8s var(--ease);
}

.cinematic-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-line {
  width: 0%;
  max-width: 260px;
  height: 1px;
  background: var(--red-bright);
  animation: loaderLine 1.1s var(--ease) forwards 0.15s;
  box-shadow: 0 0 18px var(--red-bright);
}

@keyframes loaderLine {
  from { width: 0%; }
  to { width: 260px; }
}

.loader-brand {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  color: #f4efe8;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(14px);
  animation: loaderFade 0.9s var(--ease) forwards 0.45s;
}

.loader-brand span { color: var(--red-bright); margin-inline-start: 8px; }

.loader-sub {
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  color: #7d746c;
  opacity: 0;
  transform: translateY(10px);
  animation: loaderFade 0.9s var(--ease) forwards 0.75s;
}

@keyframes loaderFade {
  to { opacity: 1; transform: translateY(0); }
}

body.cinematic-ready .cinematic-loader { opacity: 0; visibility: hidden; }

/* Cinematic reveal for hero content once loader clears */
.cinematic-item {
  animation: cinematicRise 0.9s var(--ease) both;
}

@keyframes cinematicRise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Generic scroll reveal (used on everything with .reveal) */
.reveal.reveal-ready {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.reveal-ready.show {
  opacity: 1;
  transform: translateY(0);
}
/* let JS-driven inline opacity from the safety fallback still work */
.reveal { will-change: opacity, transform; }

/* =========================================================
   NAVBAR
   ========================================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad);
  background: transparent;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  padding-block: 14px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.logo span { color: var(--red-bright); margin-inline-start: 4px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
}

.nav-links a {
  position: relative;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-dim);
  padding-block: 4px;
  transition: color 0.3s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--red-bright);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.35s var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: 8px;
  padding-inline-start: clamp(14px, 1.6vw, 24px);
  border-inline-start: 1px solid var(--line);
}

.nav-actions button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav-actions button:hover {
  border-color: var(--red-bright);
  transform: translateY(-2px) rotate(-8deg);
  background: var(--red-wash);
}
#themeBtn:active, #langBtn:active { transform: scale(0.9); }

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    top: 68px; left: 0; right: 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 18px;
    padding: 16px var(--pad);
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
  }
  .nav-actions {
    margin-inline-start: 0;
    border-inline-start: none;
    padding-inline-start: 0;
    width: 100%;
    justify-content: center;
    padding-top: 8px;
  }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: clamp(20px, 4vw, 60px);
  padding: 120px var(--pad) 80px;
  overflow: hidden;
}

.hero-topline {
  position: absolute;
  top: 100px;
  left: var(--pad);
  right: var(--pad);
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  color: var(--ink-faint);
  z-index: 3;
}

.hero-bg-text {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(7rem, 22vw, 20rem);
  letter-spacing: 0.02em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--red-bright);
  opacity: 0.35;
  white-space: nowrap;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
body.light .hero-bg-text { opacity: 0.14; }

.hero-copy {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 620px;
}

/* ---- CINEMATIC HERO SEQUENCE: name -> photo -> details ---- */
.hero-intro-name {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.hero-intro-details {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.intro-seq {
  opacity: 0;
  transform: translateY(30px);
  filter: blur(8px);
}

body.cinematic-ready .intro-seq-1 {
  animation: introRise 1s var(--ease) forwards 0.15s;
}
body.cinematic-ready .intro-seq-2 {
  animation: introPhoto 1.2s var(--ease) forwards 1.15s;
}
body.cinematic-ready .intro-seq-3 {
  animation: introRise 1s var(--ease) forwards 2.15s;
}

@keyframes introRise {
  from { opacity: 0; transform: translateY(30px); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes introPhoto {
  0%   { opacity: 0; transform: translateY(46px) scale(0.8) rotate(-9deg); filter: blur(12px); }
  62%  { opacity: 1; transform: translateY(-8px) scale(1.04) rotate(-1deg); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); filter: blur(0); }
}

.hero-role {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--red-bright);
  width: fit-content;
}

.hero-copy h1 {
  display: flex;
  flex-direction: column;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.16;
  font-weight: 800;
}
.hero-copy h1 .hero-accent {
  color: var(--red-bright);
  font-style: italic;
  font-family: var(--font-display);
}

.hero-copy p {
  color: var(--ink-dim);
  font-size: 1.02rem;
  max-width: 46ch;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.primary-btn, .secondary-btn {
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
  display: inline-flex;
  align-items: center;
}

.primary-btn {
  position: relative;
  overflow: hidden;
  background: var(--red);
  color: #fff;
  box-shadow: 0 10px 30px -12px var(--red);
}
.primary-btn:hover {
  background: var(--red-bright);
  transform: translateY(-3px);
  box-shadow: 0 16px 34px -10px var(--red-bright);
}
.primary-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 35%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-20deg);
  animation: btnShimmer 3.4s ease-in-out infinite;
}
@keyframes btnShimmer {
  0% { left: -60%; }
  55%, 100% { left: 130%; }
}

.secondary-btn {
  border: 1px solid var(--line);
  color: var(--ink);
}
.secondary-btn:hover {
  border-color: var(--red-bright);
  color: var(--red-bright);
  transform: translateY(-3px);
}

.hero-mini-info {
  display: flex;
  gap: 40px;
  margin-top: 4px;
}
.hero-mini-info > div { display: flex; flex-direction: column; gap: 4px; }
.mini-number {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--red-bright);
}
.hero-mini-info small { color: var(--ink-faint); font-size: 0.75rem; letter-spacing: 0.06em; }

/* ---- HERO VISUAL: ID CARD ---- */
.hero-visual {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 520px;
}

.hero-circle {
  position: absolute;
  width: min(60vw, 480px);
  height: min(60vw, 480px);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--red) 0%, var(--red-deep) 55%, transparent 78%);
  filter: blur(2px);
  opacity: 0.9;
  z-index: -1;
  animation: circlePulse 5.5s ease-in-out infinite;
}
@keyframes circlePulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.045); }
}
body.light .hero-circle {
  background: radial-gradient(circle at 35% 30%, var(--red) 0%, #e7c9c0 60%, transparent 80%);
  opacity: 0.55;
}

.hero-orbit {
  position: absolute;
  width: min(66vw, 540px);
  height: min(66vw, 540px);
  border: 1px dashed var(--line);
  border-radius: 50%;
  animation: spin 40s linear infinite;
  z-index: -1;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero-star {
  position: absolute;
  top: 8%;
  right: 6%;
  font-size: 2.2rem;
  color: var(--red-bright);
  animation: pulseStar 3.2s ease-in-out infinite, spin 18s linear infinite;
}
@keyframes pulseStar {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.25); opacity: 1; }
}

.hero-dots {
  position: absolute;
  bottom: 6%;
  right: 2%;
  width: 90px;
  height: 60px;
  background-image: radial-gradient(var(--ink-faint) 1.5px, transparent 1.5px);
  background-size: 12px 12px;
  opacity: 0.35;
}

.creative-id-card {
  position: relative;
  width: 260px;
  padding: 26px 22px 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: rotate(-3deg);
  transition: transform 0.5s var(--ease);
  animation: cardFloat 6s ease-in-out infinite;
}
.creative-id-card:hover {
  transform: rotate(0deg) scale(1.03);
}
@keyframes cardFloat {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(-1deg) translateY(-10px); }
}
.creative-id-card:hover { animation-play-state: paused; }

.creative-id-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,0.4) 50%, transparent 58%);
  transform: translateX(-130%);
  pointer-events: none;
}
body.cinematic-ready .creative-id-card::after {
  animation: cardShine 1.3s ease-out forwards 2.45s;
}
@keyframes cardShine {
  to { transform: translateX(130%); }
}

.card-lanyard {
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 40px;
  border: 6px solid var(--ink-faint);
  border-bottom: none;
  border-radius: 30px 30px 0 0;
  opacity: 0.7;
}
.card-lanyard::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--ink-faint);
  background: var(--bg-card);
}

.card-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.card-name span:first-child { font-size: 1.4rem; }
.card-name span:last-child { font-size: 1rem; color: var(--red-bright); }

.id-photo {
  width: 130px;
  height: 150px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.id-photo img { width: 100%; height: 100%; object-fit: cover; }

.id-role {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--ink);
  background: var(--red-wash);
  border: 1px solid var(--red);
  padding: 5px 14px;
  border-radius: 999px;
}

.barcode {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 26px;
  width: 100%;
  justify-content: center;
}
.barcode span {
  display: inline-block;
  width: 2px;
  background: var(--ink-faint);
  opacity: 0.7;
}
.barcode span:nth-child(odd) { height: 100%; }
.barcode span:nth-child(3n) { height: 65%; }
.barcode span:nth-child(4n) { height: 85%; }

.card-bottom {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

.hero-side-copy {
  position: absolute;
  top: 12%;
  left: -2%;
  display: flex;
  flex-direction: column;
  font-size: 0.78rem;
  color: var(--ink-faint);
  line-height: 1.5;
}

.hero-signature {
  position: absolute;
  bottom: 4%;
  left: -4%;
  font-family: "Playfair Display", cursive;
  font-style: italic;
  font-size: 1.8rem;
  color: var(--ink);
  transform: rotate(-6deg);
  opacity: 0.85;
}

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 140px; text-align: center; }
  .hero-copy { margin-inline: auto; align-items: center; }
  .hero-mini-info { justify-content: center; }
  .hero-buttons { justify-content: center; }
  .hero-visual { min-height: 420px; margin-top: 20px; }
  .hero-side-copy, .hero-topline { display: none; }
}

/* =========================================================
   SHARED SECTION LAYOUT
   ========================================= */
.section { padding: 110px var(--pad); }

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.section-heading small {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--red-bright);
  font-weight: 700;
  margin-bottom: 10px;
}
.section-heading h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 700;
}
.section-heading p {
  max-width: 38ch;
  color: var(--ink-dim);
  font-size: 0.95rem;
}

/* =========================================================
   ABOUT
   ========================================================= */
.about-poster {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(30px, 5vw, 70px);
}

.poster-kicker {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  color: var(--red-bright);
  font-weight: 700;
  margin-bottom: 16px;
}

.about-copy h2 {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.15;
  margin-bottom: 20px;
}
.about-copy h2 span:last-child { color: var(--red-bright); font-style: italic; }

.about-copy p {
  color: var(--ink-dim);
  max-width: 48ch;
  margin-bottom: 26px;
}

.about-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 0.88rem;
  color: var(--ink-dim);
}
.about-contact-row a { transition: color 0.3s var(--ease); }
.about-contact-row a:hover { color: var(--red-bright); }

.about-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
}

.about-red-circle {
  position: absolute;
  width: min(70%, 380px);
  height: min(70%, 380px);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, var(--red) 0%, var(--red-deep) 60%, transparent 82%);
  opacity: 0.9;
  z-index: 0;
}
body.light .about-red-circle {
  background: radial-gradient(circle at 40% 30%, var(--red) 0%, #ecd3ca 65%, transparent 82%);
  opacity: 0.6;
}

.about-outline-words {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: -4px;
  z-index: 0;
  pointer-events: none;
}
.about-outline-words span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  line-height: 0.95;
}

.about-portrait {
  position: relative;
  z-index: 1;
  width: min(78%, 320px);
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5);
  transition: transform 0.6s var(--ease);
}
.about-portrait:hover { transform: translateY(-8px) rotate(-1deg); }

@media (max-width: 900px) {
  .about-poster { grid-template-columns: 1fr; text-align: center; }
  .about-contact-row { justify-content: center; }
  .about-outline-words { align-items: center; }
}

/* =========================================================
   EDUCATION
   ========================================================= */
.education-poster-title {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 50px;
}
.education-title-mark {
  font-size: 1.6rem;
  color: var(--red-bright);
  animation: pulseStar 3.2s ease-in-out infinite;
}
.education-poster-title h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 700;
}
.education-poster-title p { color: var(--ink-dim); font-size: 0.9rem; margin-top: 4px; }

.education-poster-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(24px, 4vw, 50px);
  align-items: start;
}

.education-campus-card {
  position: relative;
  border-radius: var(--radius-m);
  overflow: hidden;
  aspect-ratio: 4/5;
  border: 1px solid var(--line);
  max-width: 280px;
}
.education-campus-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.05);
  transition: transform 0.7s var(--ease), filter 0.5s var(--ease);
}
.education-campus-card:hover img { transform: scale(1.08); filter: saturate(1) contrast(1.1); }

.campus-overlay {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 18px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #f4efe8;
}
.campus-overlay small { font-size: 0.65rem; letter-spacing: 0.2em; color: var(--red-bright); }
.campus-overlay strong { font-family: var(--font-display); font-size: 1.05rem; }

.education-timeline { position: relative; padding-inline-start: 30px; }
.timeline-line {
  position: absolute;
  top: 6px; bottom: 6px;
  inset-inline-start: 6px;
  width: 1px;
  background: var(--line);
}
.timeline-dot {
  position: absolute;
  inset-inline-start: 1px;
  top: 50%;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--red-bright);
  box-shadow: 0 0 0 4px var(--red-wash);
}

.education-timeline-card {
  position: relative;
  padding: 22px 26px;
  margin-bottom: 22px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  transition: transform 0.4s var(--ease), border-color 0.3s var(--ease);
}
.education-timeline-card:hover {
  transform: translateX(6px);
  border-color: var(--red);
}
[dir="rtl"] .education-timeline-card:hover { transform: translateX(-6px); }

.education-timeline-card::before {
  content: "";
  position: absolute;
  top: 26px;
  inset-inline-start: -35px;
  width: 22px;
  height: 1px;
  background: var(--line);
}

.education-year {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--red-bright);
  font-weight: 700;
  margin-bottom: 8px;
}
.education-timeline-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 6px;
}
.education-timeline-card p { color: var(--ink-dim); font-size: 0.9rem; margin-bottom: 6px; }
.education-timeline-card small { color: var(--ink-faint); font-size: 0.76rem; }

.education-future { border-style: dashed; background: transparent; }

@media (max-width: 900px) {
  .education-poster-grid { grid-template-columns: 1fr; }
  .education-campus-card { margin-inline: auto; }
}

/* =========================================================
   EXPERIENCE
   ========================================================= */
.experience-section .section-heading p { max-width: 46ch; }

.experience-editorial {
  position: relative;
  display: grid;
  grid-template-columns: 0.55fr 1.1fr;
  gap: clamp(24px, 4vw, 50px);
  align-items: center;
  padding: 40px clamp(20px, 4vw, 50px);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--bg-soft);
  overflow: hidden;
}

.experience-giant-word {
  position: absolute;
  bottom: -6%;
  inset-inline-end: 4%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 10vw, 8rem);
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  z-index: 0;
  pointer-events: none;
}

.experience-photo-frame {
  position: relative;
  z-index: 1;
  width: min(100%, 220px);
  aspect-ratio: 3/4;
  margin-inline: auto;
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px -18px rgba(0,0,0,0.5);
}
.experience-photo-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.experience-photo-frame:hover img { transform: scale(1.1) rotate(1deg); }

.experience-stamp {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 1px dashed rgba(244,239,232,0.7);
  color: #f4efe8;
  background: rgba(10,9,8,0.35);
  backdrop-filter: blur(3px);
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  text-align: center;
  transform: rotate(-12deg);
}
.experience-stamp strong { font-size: 0.55rem; }

.experience-copy { position: relative; z-index: 1; }

.experience-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.company-logo-wrap {
  width: 42px; height: 42px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s var(--ease), border-color 0.3s var(--ease);
}
.company-logo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.company-logo-wrap:hover { transform: scale(1.1) rotate(-6deg); border-color: var(--red-bright); }

.experience-kicker span {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--red-bright);
  font-weight: 700;
}

.experience-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.meta-line { width: 28px; height: 1px; background: var(--line); }

.experience-copy h3 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  margin-bottom: 14px;
}
.experience-copy p { color: var(--ink-dim); max-width: 52ch; margin-bottom: 20px; }

.experience-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.experience-tags span {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.experience-tags span:hover { border-color: var(--red-bright); color: var(--red-bright); }

@media (max-width: 900px) {
  .experience-editorial { grid-template-columns: 1fr; text-align: center; }
  .experience-kicker { justify-content: center; }
  .experience-tags { justify-content: center; }
  .experience-photo-frame { max-width: 180px; }
}

/* =========================================================
   SKILLS
   ========================================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.skill-card {
  position: relative;
  padding: 30px 26px;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  transition: transform 0.4s var(--ease), border-color 0.35s var(--ease), box-shadow 0.4s var(--ease);
}
.skill-card:hover {
  transform: translateY(-8px);
  border-color: var(--red);
  box-shadow: 0 24px 44px -22px var(--red);
}
.skill-card > span {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--red-bright);
  margin-bottom: 18px;
  opacity: 0.8;
}
.skill-card h3 { font-size: 1.08rem; margin-bottom: 16px; font-weight: 700; }

.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tags span {
  font-size: 0.76rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--red-wash);
  color: var(--ink);
  border: 1px solid var(--line);
}

.language-list { display: flex; flex-direction: column; gap: 10px; }
.language-list > div { display: flex; justify-content: space-between; align-items: center; font-size: 0.88rem; }
.language-list strong { font-weight: 700; }
.language-list small { color: var(--ink-faint); }

@media (max-width: 900px) { .skills-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .skills-grid { grid-template-columns: 1fr; } }

/* =========================================================
   PROJECTS
   ========================================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.project {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--line);
  display: block;
}
.project img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.5s var(--ease);
  filter: grayscale(0.25) contrast(1.05);
}
.project:hover img { transform: scale(1.08); filter: grayscale(0) contrast(1.1); }

.project-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 24px;
  background: linear-gradient(to top, rgba(20,10,12,0.92) 10%, rgba(20,10,12,0.15) 65%, transparent);
  color: #f4efe8;
  transform: translateY(14%);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
}
.project:hover .project-overlay { transform: translateY(0); opacity: 1; }

.project-overlay small { font-size: 0.7rem; letter-spacing: 0.2em; color: var(--red-bright); }
.project-overlay h3 { font-family: var(--font-display); font-size: 1.15rem; }
.project-overlay span { font-size: 0.82rem; color: #d9d2ca; }

@media (max-width: 900px) { .projects-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .projects-grid { grid-template-columns: 1fr; } .project-overlay { opacity: 1; transform: none; background: linear-gradient(to top, rgba(20,10,12,0.9), transparent 70%); } }

/* =========================================================
   SERVICES
   ========================================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.glass-card.service-card {
  padding: 34px 28px;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-soft) 70%, transparent);
  backdrop-filter: blur(10px);
  transition: transform 0.4s var(--ease), border-color 0.35s var(--ease);
}
.glass-card.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--red);
}
.glass-card.service-card > span {
  display: inline-block;
  font-family: var(--font-display);
  color: var(--red-bright);
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.glass-card.service-card h3 { font-size: 1.15rem; margin-bottom: 12px; font-weight: 700; }
.glass-card.service-card p { color: var(--ink-dim); font-size: 0.9rem; }

@media (max-width: 900px) { .services-grid { grid-template-columns: 1fr; } }

/* =========================================================
   CONTACT
   ========================================================= */
.contact-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: clamp(36px, 5vw, 64px);
  border-radius: var(--radius-l);
  background: linear-gradient(135deg, var(--red-deep), var(--bg-soft) 70%);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
body.light .contact-box { background: linear-gradient(135deg, #f6e4d6, var(--bg-soft) 75%); }

.contact-content small {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--red-bright);
  font-weight: 700;
  margin-bottom: 14px;
}
.contact-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.2;
  margin-bottom: 14px;
}
.contact-content p { color: var(--ink-dim); max-width: 40ch; }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-links a {
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  transition: transform 0.35s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.contact-links a:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  transform: translateX(-4px);
}
[dir="rtl"] .contact-links a:hover { transform: translateX(4px); }

@media (max-width: 700px) {
  .contact-box { flex-direction: column; text-align: center; }
  .contact-links { width: 100%; }
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px var(--pad) 40px;
  font-size: 0.8rem;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
}

/* =========================================================
   THEME TOGGLE MICRO-TRANSITION body, .navbar, .creative-id-card, .skill-card, .education-timeline-card,
.glass-card.service-card, .contact-box, .experience-editorial {
  transition: background 0.6s var(--ease), border-color 0.5s var(--ease), color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
   ========================================================= */


/* SMOOTH */

body,
.navbar,
.creative-id-card,
.skill-card,
.education-timeline-card,
.glass-card.service-card,
.contact-box,
.experience-editorial {
  transition: background 0.6s var(--ease), border-color 0.5s var(--ease), color 0.5s var(--ease), box-shadow 0.5s var(--ease), opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
