/* ==========================================================================
   Nocturne — Mohamed Hussein portfolio
   Tokens ported from the Nocturne design system, extended with a light theme.
   ========================================================================== */

:root {
  color-scheme: dark;

  --color-bg: #161826;
  --color-surface: #232532;
  --color-text: #e9e9ed;
  --color-accent: #9184d9;
  --color-accent-2: #a7a1db;
  --color-divider: color-mix(in srgb, #e9e9ed 16%, transparent);

  /* Tonal ramps — one shared lightness scale, so the same step of any role
     matches the others in visual value. */
  --color-neutral-100: #f3f5fe;
  --color-neutral-200: #e4e7f5;
  --color-neutral-300: #cfd3e5;
  --color-neutral-400: #b2b6ca;
  --color-neutral-500: #9397ab;
  --color-neutral-600: #75798c;
  --color-neutral-700: #595d6c;
  --color-neutral-800: #3f424d;
  --color-neutral-900: #292b31;

  --color-accent-100: #f5f4ff;
  --color-accent-200: #e7e5fe;
  --color-accent-300: #d2cefd;
  --color-accent-400: #b5abfc;
  --color-accent-500: #968ae0;
  --color-accent-600: #796cbf;
  --color-accent-700: #5d5294;
  --color-accent-800: #423a6a;
  --color-accent-900: #2b2741;

  /* Saturated deep indigo ground, used only at section scale. */
  --color-section: #262a60;

  /* Surfaces derived from the ground — these are the values the page's
     bands, scrims and glass layers are painted from. */
  --nav-bg: rgba(22, 24, 38, 0.82);
  --band-grad: linear-gradient(180deg, rgba(35, 37, 50, 0.55), rgba(22, 24, 38, 0));
  --contact-grad: linear-gradient(180deg, rgba(38, 42, 96, 0.5), rgba(22, 24, 38, 0.9));
  --contact-card-bg: rgba(22, 24, 38, 0.85);
  --hero-scrim: radial-gradient(120% 90% at 8% 40%,
      rgba(22, 24, 38, 0.94) 0%, rgba(22, 24, 38, 0.55) 45%, rgba(22, 24, 38, 0) 72%);
  --photo-scrim: linear-gradient(180deg, rgba(22, 24, 38, 0) 45%, rgba(22, 24, 38, 0.85) 100%);
  --pill-bg: rgba(66, 58, 106, 0.35);
  --dot-halo: rgba(145, 132, 217, 0.16);
  --scene-blend: normal;
  --scene-ink: #12131f;

  --font-heading: "Inter", system-ui, sans-serif;
  --font-heading-weight: 500;
  --font-body: "Inter", system-ui, sans-serif;

  --space-1: 2.8px;
  --space-2: 5.6px;
  --space-3: 8.4px;
  --space-4: 11.2px;
  --space-6: 16.8px;
  --space-8: 22.4px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --shadow-sm: 0 0 0 1px #3f424d;
  --shadow-md: 0 0 0 1px #595d6c, 0 6px 18px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 0 0 1px #9397ab, 0 16px 40px rgba(0, 0, 0, 0.65);

  --shell: 1180px;
  --gutter: clamp(18px, 3vw, 28px);
  --band-pad: clamp(80px, 11vw, 130px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* --- light theme -------------------------------------------------------
   Nocturne is dark-native. The light variant keeps the blurple accent and
   flips the ramps so every role (body copy, muted label, border, tag)
   lands at the same relative contrast it held on the dark ground. */
:root[data-theme="light"] {
  color-scheme: light;

  --color-bg: #f4f5fb;
  --color-surface: #ffffff;
  --color-text: #191b28;
  --color-accent: #5f5397;
  --color-accent-2: #6f68a8;
  --color-divider: color-mix(in srgb, #191b28 14%, transparent);

  --color-neutral-100: #292b31;
  --color-neutral-200: #33363f;
  --color-neutral-300: #45485a;
  --color-neutral-400: #565a6c;
  --color-neutral-500: #6b6f82;
  --color-neutral-600: #8a8ea1;
  --color-neutral-700: #b8bccd;
  --color-neutral-800: #d6d9e8;
  --color-neutral-900: #e8eaf5;

  --color-accent-100: #2b2741;
  --color-accent-200: #4a4180;
  --color-accent-300: #564a8d;
  --color-accent-400: #7365ae;
  --color-accent-500: #8d80cf;
  --color-accent-600: #a99ee0;
  --color-accent-700: #9a8dd6;
  --color-accent-800: #c9c2f2;
  --color-accent-900: #f0eeff;

  --color-section: #dcdcf2;

  --nav-bg: rgba(244, 245, 251, 0.86);
  --band-grad: linear-gradient(180deg, rgba(224, 226, 240, 0.75), rgba(244, 245, 251, 0));
  --contact-grad: linear-gradient(180deg, rgba(214, 216, 242, 0.75), rgba(244, 245, 251, 0.95));
  --contact-card-bg: rgba(255, 255, 255, 0.86);
  --hero-scrim: radial-gradient(120% 90% at 8% 40%,
      rgba(244, 245, 251, 0.94) 0%, rgba(244, 245, 251, 0.55) 45%, rgba(244, 245, 251, 0) 72%);
  --photo-scrim: linear-gradient(180deg, rgba(25, 27, 40, 0) 45%, rgba(25, 27, 40, 0.8) 100%);
  --pill-bg: rgba(154, 141, 214, 0.14);
  --dot-halo: rgba(95, 83, 151, 0.18);
  --scene-blend: multiply;
  --scene-ink: #eceef8;

  --shadow-sm: 0 0 0 1px #dfe2ee;
  --shadow-md: 0 0 0 1px #d2d6e6, 0 6px 18px rgba(25, 27, 40, 0.09);
  --shadow-lg: 0 0 0 1px #c3c8dc, 0 16px 40px rgba(25, 27, 40, 0.14);
}

/* ========== reset & base ========== */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-2);
}

p { margin: 0 0 var(--space-3); }
img { display: block; max-width: 100%; }
strong { font-weight: 500; color: var(--color-text); }

a {
  color: var(--color-accent-300);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover { color: var(--color-accent-200); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

@keyframes noct-blink { 0%, 49% { opacity: 1 } 50%, 100% { opacity: 0 } }
@keyframes noct-float { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-7px) } }
@keyframes noct-pulse { 0%, 100% { opacity: .35; transform: scale(1) } 50% { opacity: .9; transform: scale(1.5) } }

/* ========== design-system components ========== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2;
  color: var(--color-text);
  background: transparent;
  border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md);
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.btn-primary { color: var(--color-accent); border-color: var(--color-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--color-accent) 12%, transparent); color: var(--color-accent); }
.btn-primary:active { background: color-mix(in srgb, var(--color-accent) 22%, transparent); }
.btn-secondary { border-color: var(--color-divider); color: var(--color-text); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-text); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-ghost { color: var(--color-accent); padding-inline: var(--space-1); }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); color: var(--color-accent); }
.btn-sm { font-size: 13px; }

.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.card-kicker {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--color-accent);
}
.card-title {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 17px; line-height: 1.2;
}
.card-body { margin: 0; font-size: 13px; opacity: .8; flex: 1; }

.tag {
  display: inline-flex; align-items: center;
  font-size: 11px; letter-spacing: .02em;
  padding: 3px 10px;
  border-radius: calc(var(--radius-md) * 0.75);
}
.tag-accent { background: var(--color-accent-800); color: var(--color-accent-100); }
.tag-neutral { background: var(--color-neutral-800); color: var(--color-neutral-100); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); }

:root[data-theme="light"] .tag-accent { background: var(--color-accent-900); color: var(--color-accent-200); }
:root[data-theme="light"] .tag-neutral { background: var(--color-neutral-900); color: var(--color-neutral-200); }

/* ========== scroll progress ========== */

.progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--color-accent-700), var(--color-accent));
  z-index: 60;
}

/* ========== navigation ========== */

.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--color-divider);
}
.nav-inner {
  max-width: var(--shell); margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex; align-items: center; gap: 20px;
}
.nav-brand {
  margin-right: auto;
  font-family: var(--font-heading);
  font-size: 19px; font-weight: 600; letter-spacing: -.02em;
  color: var(--color-text);
}
.nav-brand:hover { color: var(--color-text); }
.nav-brand span { color: var(--color-accent); }

.nav-links {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: clamp(10px, 1.5vw, 22px);
  font-size: 13px; letter-spacing: .01em;
}
.nav-links a { color: var(--color-neutral-400); transition: color .2s ease; }
.nav-links a:hover { color: var(--color-accent-200); }
.nav-links a.is-active { color: var(--color-accent-200); }
.nav-links .btn { color: var(--color-accent); }

.nav-tools { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-neutral-400);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.theme-toggle:hover { color: var(--color-accent-200); border-color: var(--color-accent-700); }
.theme-toggle svg { width: 16px; height: 16px; display: block; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav-toggle {
  display: none;
  width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-neutral-400);
  cursor: pointer;
}
.nav-toggle svg { width: 16px; height: 16px; display: block; margin: 0 auto; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }

/* ========== hero ========== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--color-divider);
}
.hero-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-scrim {
  position: absolute; inset: 0;
  background: var(--hero-scrim);
  pointer-events: none;
}
.hero-inner {
  position: relative; width: 100%;
  max-width: var(--shell); margin: 0 auto;
  padding: 150px var(--gutter) 90px;
}

.pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 13px;
  border: 1px solid var(--color-accent-700);
  border-radius: 999px;
  background: var(--pill-bg);
  font-size: 12.5px;
  color: var(--color-accent-200);
  margin-bottom: 26px;
}
.pill-dot {
  position: relative; display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-accent);
  animation: noct-pulse 2.4s ease-in-out infinite;
}

.hero-name {
  font-size: clamp(44px, 7.4vw, 92px);
  line-height: 1.02; letter-spacing: -.035em;
  margin: 0 0 18px;
}
.hero-name span { color: var(--color-neutral-400); }

.hero-role {
  display: flex; align-items: baseline; gap: 10px;
  font-size: clamp(18px, 2.4vw, 28px);
  font-family: var(--font-heading); font-weight: 400;
  margin-bottom: 26px;
  min-height: 1.5em;
}
.hero-role-lead { color: var(--color-neutral-500); }
.hero-role-text { color: var(--color-accent-300); }
.hero-caret {
  width: 2px; height: 1.05em;
  background: var(--color-accent);
  animation: noct-blink 1.1s step-end infinite;
}

.hero-lede {
  max-width: 47ch;
  color: var(--color-neutral-300);
  font-size: clamp(15px, 1.3vw, 17.5px);
  margin: 0 0 38px;
  text-wrap: pretty;
}

.stats {
  display: flex; flex-wrap: wrap;
  gap: clamp(24px, 4vw, 56px);
  margin-bottom: 42px;
}
.stat-value {
  font-family: var(--font-heading);
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 500; letter-spacing: -.03em;
}
.stat-label {
  font-size: 12px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--color-neutral-500);
  margin-top: 4px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ========== section scaffolding ========== */

.band {
  position: relative;
  border-top: 1px solid var(--color-divider);
  background: var(--band-grad);
}
.band-skills { border-bottom: 1px solid var(--color-divider); }
.section-pad { padding-block: var(--band-pad); }
.plain { max-width: var(--shell); margin: 0 auto; padding: var(--band-pad) var(--gutter); }

.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--color-accent-300);
}
.eyebrow::before {
  content: ""; width: 34px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent));
}

.section-title {
  font-size: clamp(30px, 4.4vw, 52px);
  letter-spacing: -.03em;
  margin: 16px 0 6px;
}
.section-desc { color: var(--color-neutral-500); margin: 0; }

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .05s; }
.reveal[data-delay="2"] { transition-delay: .1s; }
.reveal[data-delay="3"] { transition-delay: .15s; }
.reveal[data-delay="4"] { transition-delay: .2s; }
.reveal[data-delay="5"] { transition-delay: .25s; }
.reveal[data-delay="6"] { transition-delay: .3s; }
.reveal[data-delay="7"] { transition-delay: .35s; }

/* ========== about ========== */

.about-head { margin-bottom: 52px; }
.about-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}
.about-photo {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  animation: noct-float 9s ease-in-out infinite;
}
.about-photo img {
  width: 100%; aspect-ratio: 4 / 5;
  object-fit: cover; object-position: 50% 18%;
}
.about-photo::after {
  content: ""; position: absolute; inset: 0;
  background: var(--photo-scrim);
  pointer-events: none;
}
.about-photo figcaption {
  position: absolute; left: 20px; bottom: 18px; z-index: 1;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--color-accent-200);
}
:root[data-theme="light"] .about-photo figcaption { color: #e7e5fe; }

.about-copy {
  display: flex; flex-direction: column; gap: 20px;
  color: var(--color-neutral-300);
  font-size: clamp(14.5px, 1.15vw, 16.5px);
  text-wrap: pretty;
}
.about-copy p { margin: 0; }

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  margin-top: 36px;
}
.fact {
  background: var(--color-bg);
  box-shadow: 0 0 0 1px var(--color-divider);
  padding: 16px 18px;
}
.fact-label {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--color-neutral-500);
}
.fact-value { margin-top: 6px; font-size: 14px; }

/* ========== skills ========== */

.skills-head { margin-bottom: 14px; }
.scene-wrap { position: relative; margin: 8px 0 44px; }
.scene-hint {
  position: absolute; right: 2px; bottom: 6px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--color-neutral-600);
}
.scene-constellation { width: 100%; height: clamp(320px, 42vw, 440px); }

.skills-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}
.skill-title { font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }

/* ========== how I build ========== */

.build-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.build-lede {
  color: var(--color-neutral-300);
  margin: 0 0 26px; max-width: 44ch;
  text-wrap: pretty;
}
.build-title { margin: 16px 0 18px; }
.layers { display: flex; flex-direction: column; gap: 1px; }
.layer {
  background: var(--color-bg);
  padding: 14px 16px;
  box-shadow: 0 0 0 1px var(--color-divider);
  display: grid; grid-template-columns: 26px 1fr; gap: 12px;
  align-items: baseline;
}
.layer-num { font-size: 12px; color: var(--color-accent); }
.layer-text { font-size: 14.5px; }
.layer-text span { color: var(--color-neutral-500); }
.scene-arch { width: 100%; height: clamp(360px, 44vw, 520px); }

/* ========== experience ========== */

.exp-head { margin-bottom: 56px; }
.timeline { display: flex; flex-direction: column; gap: clamp(28px, 3.5vw, 44px); }
.job {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(18px, 3vw, 44px);
  padding-left: 22px;
  border-left: 1px solid var(--color-neutral-800);
  position: relative;
}
.job-current { border-left-color: var(--color-accent-800); }
.job::before {
  content: ""; position: absolute; left: -4.5px; top: 9px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-neutral-700);
}
.job-current::before {
  background: var(--color-accent);
  box-shadow: 0 0 0 4px var(--dot-halo);
}
.job-role { font-size: clamp(19px, 2vw, 25px); letter-spacing: -.02em; margin: 0 0 6px; }
.job-org { font-size: 14.5px; color: var(--color-accent-300); margin-bottom: 4px; }
.job-when { font-size: 13px; color: var(--color-neutral-500); }
.job-points {
  margin: 0; padding-left: 18px;
  display: flex; flex-direction: column; gap: 10px;
  color: var(--color-neutral-300); font-size: 14.5px;
  text-wrap: pretty;
}
.job-points li::marker { color: var(--color-accent-700); }

/* ========== projects ========== */

.projects-desc { margin-bottom: 22px; }
.projects-intro {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  margin-bottom: clamp(40px, 5vw, 68px);
}
.scene-phone { width: 100%; height: clamp(380px, 46vw, 540px); }
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.project { display: flex; flex-direction: column; gap: 12px; }
.project .card-title { font-size: 21px; }
.project-features {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-size: 12.5px; color: var(--color-neutral-400);
}
.project-features .sep { color: var(--color-accent-700); }
.project-tech { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.project-links {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: auto; padding-top: 6px;
}

/* ========== open source ========== */

.os-head { margin-bottom: 40px; }
.os-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
}
.os-card { display: block; color: inherit; transition: box-shadow .25s ease, transform .25s ease; }
.os-card:hover { color: inherit; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.os-card .card-title { font-size: 20px; }
.os-card .card-body { margin: 8px 0 14px; }
.os-more { font-size: 13px; color: var(--color-accent-300); }

/* ========== education ========== */

.edu-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(20px, 3vw, 48px);
  align-items: end;
}
.edu-title { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -.03em; margin: 16px 0 0; }
.edu-detail { padding-left: 22px; border-left: 1px solid var(--color-neutral-800); }
.edu-degree { font-size: 20px; margin: 0 0 6px; }
.edu-school { color: var(--color-accent-300); font-size: 14.5px; }
.edu-where { color: var(--color-neutral-500); font-size: 13.5px; margin-top: 4px; }

/* ========== contact ========== */

.contact { background: var(--contact-grad); }
.contact .eyebrow { color: var(--color-accent-200); }
.contact-head { margin-bottom: 44px; max-width: 60ch; }
.contact-title {
  font-size: clamp(32px, 5vw, 62px);
  letter-spacing: -.035em;
  margin: 16px 0 10px;
}
.contact-lede {
  color: var(--color-neutral-300);
  margin: 0; font-size: clamp(15px, 1.3vw, 18px);
}
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
}
.contact-card {
  background: var(--contact-card-bg);
  box-shadow: 0 0 0 1px var(--color-divider);
  padding: 22px; display: block; color: inherit;
  transition: background .2s ease;
}
.contact-card:hover { color: inherit; background: color-mix(in srgb, var(--color-accent) 10%, var(--contact-card-bg)); }
.contact-label {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--color-neutral-500);
}
.contact-value { margin-top: 8px; font-size: 15px; color: var(--color-accent-200); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* ========== footer ========== */

.footer { border-top: 1px solid var(--color-divider); }
.footer-inner {
  max-width: var(--shell); margin: 0 auto;
  padding: 26px var(--gutter);
  display: flex; flex-wrap: wrap; gap: 14px;
  justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--color-neutral-500);
}

/* ========== 3D scenes ========== */

hero-field, skill-constellation, arch-stack, phone-stage {
  display: block;
  mix-blend-mode: var(--scene-blend);
}
/* No WebGL / scenes disabled — the layout must not collapse. */
.no-scenes .scene-wrap,
.no-scenes .scene-arch,
.no-scenes .scene-phone,
.no-scenes .hero-scene { display: none; }

/* ========== responsive ========== */

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    position: fixed;
    top: 63px; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-divider);
    font-size: 15px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
    max-height: calc(100vh - 63px);
    overflow-y: auto;
  }
  .nav-links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a {
    padding: 13px 2px;
    border-bottom: 1px solid var(--color-divider);
  }
  .nav-links .btn {
    margin-top: 14px;
    justify-content: center;
    border-bottom: 1px solid var(--color-accent);
  }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 720px) {
  .hero { min-height: auto; }
  .hero-inner { padding: 120px var(--gutter) 72px; }
  .hero-scene { opacity: .55; }
  .stats { gap: 24px 32px; }
  .job { grid-template-columns: 1fr; }
  .edu-grid { align-items: start; }
}

@media (max-width: 480px) {
  .hero-role { flex-wrap: wrap; gap: 6px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .facts, .contact-grid { grid-template-columns: 1fr; }
}

/* ========== reduced motion ========== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .about-photo { animation: none; }
  .pill-dot, .hero-caret { animation: none; }
}
