/* ============================================================
   ALEJANDRO DORADO — PORTFOLIO v2
   Editorial Dark Warm + Majd-inspired layout vocabulary.
   Single CSS file, sectioned, IIFE-friendly.
   ============================================================ */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  /* --- palette --- */
  --bg:           #0a0a0a;
  --bg-2:         #111111;
  --bg-3:         #161616;
  --surface:      #1a1a1a;
  --surface-2:    #222222;
  --cream:        #f0ead6;
  --cream-2:      #d6cfb8;
  --cream-3:      #9c947d;
  --mute:         #5e5849;
  --amber:        #d4a437;
  --amber-2:      #b8862a;
  --amber-glow:   rgba(212, 164, 55, 0.22);
  --line:         rgba(240, 234, 214, 0.10);
  --line-strong:  rgba(240, 234, 214, 0.22);
  --grid-line:    rgba(240, 234, 214, 0.045);

  /* --- type --- v4: Newsreader for headlines (modern publication serif,
       less precious than Fraunces; reads "magazine + tech blog" instead of
       "Italian wedding invitation") --- */
  --serif:  "Newsreader", "Times New Roman", Georgia, serif;
  --sans:   "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono:   "JetBrains Mono", ui-monospace, "SF Mono", Consolas, Monaco, monospace;

  /* --- easing --- */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* --- layout --- */
  --max:        1320px;
  --gutter:     clamp(1.25rem, 4vw, 3rem);
  --section-y:  clamp(5rem, 12vw, 9rem);
  --nav-h:      72px;
  --card-r:     20px;

  color-scheme: dark;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
  min-height: 100vh;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4, h5 {
  text-wrap: balance;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 400;
}
ul, ol { list-style: none; }
::selection { background: var(--amber); color: var(--bg); }
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Native cursor — no custom cursor override */

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  padding: 0.6rem 1rem;
  background: var(--cream);
  color: var(--bg);
  z-index: 99999;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.875rem;
}
.skip-link:focus { top: 1rem; }

.mono {
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0;
  font-feature-settings: "ss01", "ss02";
}
.amber { color: var(--amber); }

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--amber-glow);
  animation: dotPulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes dotPulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.18); }
}
/* Static variant — for declarative facts, not live/broadcasting status.
   No pulse: this badge states where I work, it isn't signaling availability. */
.dot-static {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--cream-3);
  border-radius: 50%;
  flex-shrink: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--cream-3);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* =============================================================
   3b. Background grid — persistent structural columns (A1)
   Static, non-interactive, aligned to the same --max/--gutter
   module every section already uses for its own content edges.
   Painted as a full-viewport overlay rather than a literal DOM
   layer behind each section: several sections carry opaque
   --bg-2/--bg-3 fills, so a true z-index:-1 grid would vanish
   under most of the page. At this opacity it reads as ambient
   structure, not decoration, wherever it lands. Static — no
   scroll/resize listeners, no repaint cost.
   ============================================================= */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.bg-grid-track {
  width: min(calc(100% - var(--gutter) * 2), calc(var(--max) - var(--gutter) * 2));
  height: 100%;
  margin-inline: auto;
  background-image: repeating-linear-gradient(
    to right,
    var(--grid-line) 0,
    var(--grid-line) 1px,
    transparent 1px,
    transparent calc(100% / 6)
  );
}
@media (max-width: 719px) {
  .bg-grid-track {
    background-image: repeating-linear-gradient(
      to right,
      var(--grid-line) 0,
      var(--grid-line) 1px,
      transparent 1px,
      transparent calc(100% / 3)
    );
    opacity: 0.7;
  }
}

/* =============================================================
   4. Reveal (generic) + defensive rule for [data-split]
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.95s var(--ease-out),
    transform 0.95s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.reveal[data-split] {
  opacity: 1;
  transform: none;
}

/* =============================================================
   4.5 Word reveal — fast, no filter blur (was the slowest single
   effect on the page; blur transitions are extremely GPU-heavy)
   ============================================================= */
.blur-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.4s var(--ease-out),
    transform 0.4s var(--ease-out);
  transition-delay: calc(var(--word-i, 0) * 18ms);
}
.blur-word em { font-style: italic; }
[data-blur-reveal].is-revealed .blur-word {
  opacity: 1;
  transform: none;
}

/* =============================================================
   4.5b Line-mask reveal — editorial upgrade reserved for two rare,
   high-weight headlines (about-lede, contact-title). Each detected
   line rises from behind a clip instead of cascading word by word;
   slower and heavier than .blur-word on purpose, since it only ever
   plays once or twice per visit.
   ============================================================= */
.mask-line {
  display: block;
  overflow: hidden;
}
.mask-line-inner {
  display: block;
  transform: translateY(115%);
  transition: transform 0.7s var(--ease-out);
  transition-delay: calc(var(--line-i, 0) * 90ms);
}
[data-mask-reveal].is-revealed .mask-line-inner {
  transform: translateY(0);
}

/* =============================================================
   4.6 Reading progress bar (fixed top)
   ============================================================= */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 101;
  pointer-events: none;
  background: transparent;
}
.progress-bar-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--amber-2), var(--amber));
  box-shadow: 0 0 10px var(--amber-glow);
  transform-origin: left;
  will-change: width;
}

/* Mouse blob + custom cursor REMOVED in v4 — they were the dominant
   cause of perceived lag (mix-blend-mode + constant rAF + style recalc
   on every element via `* { cursor: none }`). Native cursor restored. */
/* cursor styles removed in v4 */

/* =============================================================
   6. Splash
   ============================================================= */
.splash {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: grid;
  place-items: center;
  /* hard safety: gone by 2.5s no matter what */
  animation: splashSafety 0.01s 2.4s forwards;
}
@keyframes splashSafety {
  to { opacity: 0; pointer-events: none; visibility: hidden; }
}
.splash.is-out {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s var(--ease-out);
}
.splash-mark {
  font-family: var(--serif);
  font-size: clamp(4.5rem, 16vw, 10rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  color: var(--cream);
  display: flex;
  gap: 0.05em;
  line-height: 1;
}
.splash-A { display: inline-block; animation: splashCharIn 1s var(--ease-out) 0.1s both; }
.splash-D {
  display: inline-block;
  font-style: italic;
  color: var(--amber);
  animation: splashCharIn 1s var(--ease-out) 0.35s both;
}
@keyframes splashCharIn {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}
.splash-mono {
  position: absolute;
  top: 2rem; left: 2rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--cream-3);
  letter-spacing: 0.04em;
}
.splash-bar {
  position: absolute;
  bottom: 2rem; left: 2rem; right: 2rem;
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.splash-bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--amber);
  animation: splashBar 1.1s var(--ease-out) 0.05s forwards;
}
@keyframes splashBar { to { width: 100%; } }

/* =============================================================
   7. Nav
   ============================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 1.1rem var(--gutter);
  height: var(--nav-h);
  background: rgba(10, 10, 10, 0);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}
.nav.is-scrolled {
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom-color: var(--line);
}
@media (prefers-reduced-transparency: reduce) {
  .nav.is-scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--serif);
  font-size: 1.1rem;
}
/* Nav monogram — wider pill badge that respects the 2:1 aspect of the
   "AD" gold logo (the letters need horizontal room or they get cropped).
   No background frame; the image's own black bg blends into our grafito. */
.nav-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 38px;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
  border: 1px solid transparent;
  transition:
    border-color 0.35s var(--ease-out),
    transform 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out);
}
.nav-monogram img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.nav-monogram-fallback {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1rem;
  color: var(--amber);
  letter-spacing: 0.02em;
  padding: 0 0.4rem;
}
.nav-brand:hover .nav-monogram {
  border-color: var(--amber);
  transform: scale(1.05);
  box-shadow: 0 0 0 3px rgba(212, 164, 55, 0.18);
}
.nav-current {
  color: var(--cream-3);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}
.nav-links { display: none; justify-content: center; gap: clamp(1rem, 2.4vw, 2.2rem); }
.nav-links a {
  position: relative;
  font-size: 0.875rem;
  color: var(--cream-2);
  padding: 0.4rem 0;
  transition: color 0.3s var(--ease-out);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}
.nav-links a:hover { color: var(--cream); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-links a.is-active { color: var(--amber); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.8rem;
  transition: border-color 0.3s, background 0.3s, color 0.3s, transform 200ms var(--ease-out);
  will-change: transform;
}
.nav-cta:hover { border-color: var(--amber); color: var(--amber); background: rgba(212, 164, 55, 0.06); }
.nav-cta-dot {
  width: 6px; height: 6px;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--amber-glow);
}
@media (min-width: 960px) { .nav-links { display: flex; } }

/* =============================================================
   7.5 Mobile navigation (hamburger + drawer)
   ============================================================= */
.nav-burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.3s var(--ease-out);
}
.nav-burger-line {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--cream);
  transition: transform 0.4s var(--ease-out), opacity 0.3s var(--ease-out);
  transform-origin: center;
}
.nav-burger:hover { border-color: var(--amber); }
.nav-burger:hover .nav-burger-line { background: var(--amber); }

/* hamburger → X when open */
.nav-burger[aria-expanded="true"] .nav-burger-line:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-burger[aria-expanded="true"] .nav-burger-line:nth-child(2) {
  opacity: 0;
}
.nav-burger[aria-expanded="true"] .nav-burger-line:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(10, 10, 10, 0.97);
  display: flex;
  flex-direction: column;
  padding: calc(var(--nav-h) + 2rem) var(--gutter) 2rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.45s var(--ease-out), transform 0.5s var(--ease-out);
  overflow-y: auto;
}
.mobile-nav.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex-grow: 1;
  border-top: 1px solid var(--line);
}
.mobile-nav-link {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: baseline;
  gap: 1rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: clamp(1.5rem, 6vw, 2.4rem);
  font-weight: 300;
  color: var(--cream);
  letter-spacing: -0.02em;
  line-height: 1;
  transition: color 0.3s var(--ease-out), padding-left 0.4s var(--ease-out);
  /* fade-in stagger on open */
  opacity: 0;
  transform: translateY(8px);
  transition-property: opacity, transform, color, padding-left;
}
.mobile-nav-link .mono {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--cream-3);
  letter-spacing: 0.04em;
  align-self: center;
}
.mobile-nav.is-open .mobile-nav-link {
  opacity: 1;
  transform: translateY(0);
}
.mobile-nav.is-open .mobile-nav-link:nth-child(1) { transition-delay: 0.10s; }
.mobile-nav.is-open .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-nav.is-open .mobile-nav-link:nth-child(3) { transition-delay: 0.20s; }
.mobile-nav.is-open .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-nav.is-open .mobile-nav-link:nth-child(5) { transition-delay: 0.30s; }
.mobile-nav.is-open .mobile-nav-link:nth-child(6) { transition-delay: 0.35s; }
.mobile-nav.is-open .mobile-nav-link:nth-child(7) { transition-delay: 0.40s; }
.mobile-nav.is-open .mobile-nav-link:nth-child(8) { transition-delay: 0.45s; }
.mobile-nav.is-open .mobile-nav-link:nth-child(9) { transition-delay: 0.50s; }
.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
  color: var(--amber);
  padding-left: 0.4rem;
}
.mobile-nav-link:hover .mono,
.mobile-nav-link:focus-visible .mono {
  color: var(--amber);
}

.mobile-nav-foot {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-top: 2rem;
  margin-top: auto;
}
.mobile-nav-cta {
  display: block;
  padding: 1.1rem 1.4rem;
  background: var(--amber);
  color: var(--bg);
  border-radius: 999px;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.35s var(--ease-out);
}
.mobile-nav-cta:hover { background: var(--cream); }
.mobile-nav-secondary {
  display: block;
  padding: 0.95rem 1.4rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--cream-2);
  transition: border-color 0.35s, color 0.35s;
}
.mobile-nav-secondary:hover { border-color: var(--amber); color: var(--amber); }

/* Hide hamburger on desktop, hide drawer on desktop */
@media (min-width: 960px) {
  .nav-burger { display: none; }
  .mobile-nav { display: none; }
}

/* When mobile nav is open, lock body scroll */
body.has-mobile-nav-open { overflow: hidden; }

/* =============================================================
   8. Buttons (pill arrow style — Majd-borrowed)
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.95rem 1.5rem;
  font-size: 0.92rem;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  transition:
    background 200ms var(--ease-out),
    border-color 200ms var(--ease-out),
    color 200ms var(--ease-out),
    transform 320ms var(--ease-bounce);
  will-change: transform;
}
.btn:active {
  transform: scale(0.97);
  transition: transform 100ms var(--ease-out);
}
.btn-pill { border-radius: 999px; padding: 0.95rem 1.6rem; }
.btn-primary { background: var(--amber); color: var(--bg); border-color: var(--amber); }
.btn-primary:hover { background: var(--cream); border-color: var(--cream); color: var(--bg); }
.btn-ghost { color: var(--cream); border-color: var(--line-strong); background: transparent; }
.btn-ghost:hover { border-color: var(--cream); background: rgba(255, 255, 255, 0.03); }

.btn-arrow {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.18);
  transition: transform 0.45s var(--ease-out), background 0.45s var(--ease-out);
}
.btn-primary .btn-arrow { background: rgba(10, 10, 10, 0.22); }
.btn-ghost .btn-arrow   { background: transparent; border: 1px solid var(--line-strong); }
.btn:hover .btn-arrow {
  transform: rotate(45deg);
}
.btn-ghost:hover .btn-arrow { border-color: var(--cream); }

/* =============================================================
   9. Hero
   ============================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 3rem) var(--gutter) clamp(4rem, 8vw, 7rem);
  overflow: hidden;
  isolation: isolate;
  z-index: 1;
  /* paint isolation — keeps hero work out of the rest of the page's compositor */
  contain: layout paint;
}
.hero.is-out {
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  width: 100%;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: start;
}
/* hero atmosphere — STATIC. No animation, no filter blur, no SVG noise. */
.hero-atmos {
  position: absolute;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(50% 45% at 22% 65%, rgba(212, 164, 55, 0.16) 0%, transparent 65%),
    radial-gradient(38% 35% at 78% 25%, rgba(184, 134, 42, 0.10) 0%, transparent 65%),
    radial-gradient(55% 55% at 65% 90%, rgba(212, 164, 55, 0.06) 0%, transparent 70%);
  contain: paint;
}

/* hero text column */
.hero-text-col {
  display: flex;
  flex-direction: column;
  gap: 1.7rem;
  max-width: 680px;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 6.2vw, 5.2rem);
  line-height: 1.04;
  letter-spacing: -0.028em;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 60;
  color: var(--cream);
  margin: 0.4rem 0 0;
  text-wrap: balance;
  max-width: 18ch;
  /* scroll-driven scale + fade controlled by JS via these vars */
  transform-origin: left center;
  transform: scale(var(--hero-scale, 1));
  opacity: var(--hero-opacity, 1);
  transition: transform 0.1s linear, opacity 0.1s linear;
  will-change: transform, opacity;
}
.hero-title em {
  font-style: italic;
  color: var(--amber);
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 100;
  /* perspective text depth — subtle "lift" without DOM duplication */
  display: inline-block;
  transform: translateZ(0);
  text-shadow:
    0 1px 0 rgba(212, 164, 55, 0.18),
    0 2px 0 rgba(212, 164, 55, 0.14),
    0 4px 0 rgba(212, 164, 55, 0.10),
    0 12px 36px rgba(212, 164, 55, 0.22);
}
.hero-meta {
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  line-height: 1.55;
  color: var(--cream-2);
  max-width: 50ch;
}
.hero-meta strong { color: var(--cream); font-weight: 500; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.4rem;
}
.hero-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}
.hero-fact {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.7rem;
  align-items: baseline;
}
.hero-fact dt {
  color: var(--cream-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.68rem;
}
.hero-fact dd { color: var(--cream-2); }

/* Load-time entrance stagger — keyed off html.is-ready (set at the end of
   boot() in main.js, after initBlurReveal has already wired the H1). No JS
   needed: these three elements start hidden and reveal once boot() finishes. */
.hero-meta,
.hero-actions,
.hero-facts {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}
html.is-ready .hero-meta   { opacity: 1; transform: none; transition-delay: 80ms; }
html.is-ready .hero-actions { opacity: 1; transform: none; transition-delay: 160ms; }
html.is-ready .hero-facts  { opacity: 1; transform: none; transition-delay: 240ms; }

/* hero avatar column */
.hero-avatar-col {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.avatar-sticky {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 380px;
}
.avatar {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  contain: layout paint;
}
.avatar-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-3);
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.04) inset,
    0 30px 80px -20px rgba(0, 0, 0, 0.6),
    0 0 0 1px var(--line);
  /* A2 reveal — keyed off html.is-ready (set at the end of boot() in
     main.js), same hook the hero text stagger uses. The avatar is always
     in the initial viewport, so it never "enters" via scroll — a load-time
     class is the correct trigger, not an IntersectionObserver. The `round`
     argument on inset() keeps the circular mask through every frame of the
     reveal, so border-radius doesn't need to fight clip-path for the shape. */
  clip-path: inset(0 0 100% 0 round 50%);
  transition: clip-path 900ms var(--ease-out) 100ms;
}
html.is-ready .avatar-face {
  clip-path: inset(0 0 0% 0 round 50%);
}
.avatar-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  filter: saturate(1.05) contrast(1.05);
}
/* A3 parallax scale lands here (JS, scroll-linked), never on
   .avatar-face itself — that element owns the A2 clip-path reveal
   transition, and mixing scroll-continuous transform writes into
   the same transition would fight the reveal. will-change is scoped
   to exactly when initPhotoParallax actually runs (desktop width,
   motion allowed) — no compositor layer wasted otherwise. */
@media (min-width: 720px) and (prefers-reduced-motion: no-preference) {
  .avatar-face img { will-change: transform; }
}
.avatar-tint {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 25% 95%, rgba(212, 164, 55, 0.12) 0%, transparent 65%),
    linear-gradient(200deg, rgba(10, 10, 10, 0.0) 40%, rgba(10, 10, 10, 0.35) 100%);
  pointer-events: none;
}
.avatar-glow {
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, var(--amber-glow), transparent 70%);
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
}

/* placeholder for missing photo */
.photo-missing {
  position: relative;
  background:
    radial-gradient(60% 50% at 50% 35%, rgba(212, 164, 55, 0.20), transparent 70%),
    linear-gradient(160deg, var(--bg-2), var(--bg-3));
}
.photo-missing::before {
  content: "AD";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: clamp(3rem, 12cqi, 8rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.04em;
  color: var(--amber);
  opacity: 0.85;
  container-type: inline-size;
}

.avatar-caption {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  color: var(--cream-3);
  letter-spacing: 0.04em;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.015);
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: clamp(3rem, 6vw, 5rem);
  }
  .avatar-sticky {
    position: sticky;
    top: calc(var(--nav-h) + 1.5rem);
    max-width: 100%;
  }
}

/* hero scroll cue */
.hero-scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: var(--cream-3);
  letter-spacing: 0.15em;
  text-transform: lowercase;
  z-index: 3;
}
.hero-scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--cream-3), transparent);
  position: relative;
  overflow: hidden;
}
.hero-scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--amber), transparent);
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* =============================================================
   10. Section head
   ============================================================= */
.section {
  position: relative;
  z-index: 0;
  padding: var(--section-y) var(--gutter);
  max-width: var(--max);
  margin-inline: auto;
}

/* =============================================================
   9b. Section watermark — ghost section name (A4)
   Reuses the existing data-section-label attribute. Sits behind
   the section's real content (z-index:-1, scoped by the explicit
   z-index:0 above so it can't escape into a sibling section), at
   an opacity (0.05) matched to A1's grid lines so both read as
   the same "structural, not decorative" layer. Left-aligned to 0
   so it lines up with the same gutter-inset edge as A1's grid and
   every section's real text. One-time reveal on scroll-into-view
   (IntersectionObserver, not a scroll listener) — a slow fade plus
   a small settle-in translateY, not a continuously scrubbed
   parallax (that's A3's job).
   ============================================================= */
.section[data-section-label]::before {
  content: attr(data-section-label);
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.5rem, 13vw, 11rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--cream);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.section[data-section-label].is-revealed::before {
  opacity: 0.05;
  transform: translateY(0);
}
.section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
  color: var(--cream-3);
}
.section-num { font-size: 0.85rem; color: var(--amber); letter-spacing: 0.02em; }
.section-rule { width: 100%; height: 1px; color: var(--line); }
.section-rule line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.6s var(--ease-out) 0.15s;
}
.section.is-visible .section-rule line { stroke-dashoffset: 0; }
.section-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cream-3);
}

/* =============================================================
   11. About
   ============================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
}
.about-text-col { display: flex; flex-direction: column; gap: 1.25rem; }
.about-lede {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.28;
  letter-spacing: -0.018em;
  color: var(--cream);
  font-weight: 300;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 50;
  text-wrap: balance;
  max-width: 32ch;
}
.about-lede em { font-style: italic; color: var(--amber); }
.about-body { font-size: 1rem; line-height: 1.65; color: var(--cream-2); max-width: 56ch; }

.about-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--card-r);
  background: linear-gradient(160deg, rgba(212, 164, 55, 0.03), transparent 60%);
  align-self: start;
}
.fact { display: flex; flex-direction: column; gap: 0.35rem; }
.fact-num {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--amber);
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  line-height: 1;
}
.fact-label { font-size: 0.82rem; color: var(--cream-3); line-height: 1.45; }

@media (min-width: 960px) {
  .about-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
}

/* =============================================================
   12. Pull quote
   ============================================================= */
.pull {
  position: relative;
  padding: clamp(4rem, 8vw, 7rem) var(--gutter);
  max-width: var(--max);
  margin-inline: auto;
  overflow: visible;
  isolation: isolate;
}
.pull-halo {
  position: absolute;
  inset: -10% -5% -10% -5%;
  /* Halo via gradient stops only — no filter blur (was 60px, very expensive) */
  background: radial-gradient(40% 40% at 50% 50%, var(--amber-glow), transparent 75%);
  z-index: -1;
  pointer-events: none;
}
.pull-quote {
  max-width: 28ch;
  margin-inline: auto;
  text-align: center;
  position: relative;
}
.pull-mark {
  position: absolute;
  top: -3rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: clamp(7rem, 16vw, 11rem);
  font-style: italic;
  font-weight: 400;
  color: var(--amber);
  opacity: 0.4;
  line-height: 1;
  pointer-events: none;
  font-variation-settings: "SOFT" 100;
}
.pull-quote p {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.18;
  letter-spacing: -0.022em;
  color: var(--cream);
  font-weight: 300;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 70;
}
.pull-quote em { font-style: italic; color: var(--amber); font-variation-settings: "SOFT" 100; }
.pull-cite {
  display: block;
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--cream-3);
  font-style: normal;
  letter-spacing: 0.02em;
}

/* =============================================================
   13. What I Build — capability cards (Majd "services" pattern)
   ============================================================= */
.capability-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.capability-card {
  position: relative;
  padding: clamp(1.6rem, 3vw, 2.3rem);
  background: linear-gradient(165deg, var(--bg-2) 0%, var(--bg-3) 100%);
  border: 1px solid var(--line);
  border-radius: var(--card-r);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.capability-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 0;
  height: 1px;
  background: var(--amber);
  transition: width 0.7s var(--ease-out);
  z-index: 1;
}
.capability-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
}
.capability-card:hover::before { width: 100%; }
.capability-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--amber);
  letter-spacing: 0.04em;
}
.capability-dot {
  width: 8px;
  height: 8px;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--amber-glow);
}
.capability-title {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  font-weight: 400;
  letter-spacing: -0.018em;
  color: var(--cream);
  line-height: 1.15;
}
.capability-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--cream-2);
  flex-grow: 1;
  max-width: 50ch;
}
.capability-desc em { font-style: italic; color: var(--cream); }

/* dot-separator tag rows (Majd pattern) */
.capability-tags {
  display: flex;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--cream-3);
  letter-spacing: 0.02em;
  margin-top: 0.3rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}
.capability-tags li {
  display: inline-flex;
  align-items: center;
}
.capability-tags li:not(:last-child)::after {
  content: "·";
  color: var(--mute);
  margin-inline: 0.6em;
}
.capability-tags li { transition: color 200ms var(--ease-out); }
.capability-tags li:hover { color: var(--amber); }

@media (min-width: 720px) {
  .capability-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}

/* focus-dim — hovering one capability card dims the siblings
   (Tiny Pod state-machine pattern, vanilla via :has) */
@supports selector(:has(*)) {
  .capability-grid:has(.capability-card:hover) .capability-card:not(:hover) {
    opacity: 0.42;
    filter: saturate(0.7);
    transform: scale(0.985);
  }
}

/* same pattern on projects grid + stack tags */
@supports selector(:has(*)) {
  .projects-grid:has(.project-card:hover) .project-card:not(:hover) {
    opacity: 0.52;
    filter: saturate(0.75);
  }
}

/* =============================================================
   13.5 Now Building (in-development ticker)
   ============================================================= */
.now-building {
  position: relative;
  max-width: var(--max);
  margin: clamp(2rem, 4vw, 3.5rem) auto 0;
  padding: clamp(1.5rem, 3vw, 2.5rem) var(--gutter) 0;
}
.now-building-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: var(--cream-3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(212, 164, 55, 0.04);
}
.now-building-eyebrow [data-live-clock] {
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}
.now-building-sep { color: var(--mute); }
.now-building-viewport {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
}
.now-building-track {
  display: flex;
  width: max-content;
  animation: nowBuildingScroll 90s linear infinite;
  will-change: transform;
}
.now-building-group {
  display: flex;
  gap: clamp(1rem, 2.4vw, 2rem);
  padding-right: clamp(1rem, 2.4vw, 2rem);
  flex-shrink: 0;
}
.now-item {
  flex-shrink: 0;
  width: clamp(280px, 36vw, 420px);
  padding: 1.3rem 1.4rem;
  background: linear-gradient(160deg, var(--bg-2), var(--bg-3));
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: border-color 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.now-item:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}
.now-num {
  font-size: 0.7rem;
  color: var(--amber);
  letter-spacing: 0.04em;
}
.now-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: -0.018em;
  color: var(--cream);
  line-height: 1.2;
}
.now-desc {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--cream-2);
}
.now-desc em { font-style: italic; color: var(--cream); }
.now-tag {
  font-size: 0.68rem;
  color: var(--cream-3);
  letter-spacing: 0.04em;
  padding-top: 0.45rem;
  border-top: 1px solid var(--line);
  margin-top: 0.3rem;
}
@keyframes nowBuildingScroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
.now-building-viewport:hover .now-building-track { animation-play-state: paused; }

/* =============================================================
   14. Marquee
   ============================================================= */
.marquee {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 4vw, 3rem) 0;
  margin: clamp(2rem, 5vw, 4rem) 0;
  border-block: 1px solid var(--line);
  background: radial-gradient(60% 60% at 50% 50%, rgba(212, 164, 55, 0.025) 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 60s linear infinite;
  will-change: transform;
}
.marquee-group {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.75rem);
  padding-right: clamp(1rem, 2vw, 1.75rem);
  white-space: nowrap;
  flex-shrink: 0;
}
.m-item {
  font-family: var(--mono);
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--cream-2);
  letter-spacing: 0.01em;
}
.m-amber { color: var(--amber); }
.m-italic {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  color: var(--cream);
  font-weight: 300;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 100;
  letter-spacing: -0.015em;
}
.m-sep { color: var(--mute); font-size: 0.9rem; user-select: none; }
@keyframes marqueeScroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
.marquee:hover .marquee-track { animation-play-state: paused; }

/* =============================================================
   15. Work (timeline)
   ============================================================= */
.timeline { display: flex; flex-direction: column; gap: clamp(2.5rem, 5vw, 4.5rem); position: relative; }
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding-left: 1.75rem;
  border-left: 1px solid var(--line);
}
.timeline-spine { position: absolute; left: -5px; top: 0.4rem; }
.timeline-dot {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--cream-3);
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
}
.timeline-item.is-current .timeline-dot {
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 0 6px rgba(212, 164, 55, 0.12);
  animation: dotPulse 2.4s ease-in-out infinite;
}
.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--cream-3);
  letter-spacing: 0.02em;
}
.timeline-loc { color: var(--mute); font-size: 0.72rem; }
.timeline-body { display: flex; flex-direction: column; gap: 0.85rem; }
.timeline-role {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 1.85rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--cream);
}
.timeline-org { font-size: 1rem; color: var(--cream-2); }
.timeline-desc { font-size: 0.95rem; color: var(--cream-2); line-height: 1.65; max-width: 64ch; }
.timeline-bullets { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 0.3rem; }
.timeline-bullets li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.95rem;
  color: var(--cream-2);
  line-height: 1.6;
  max-width: 64ch;
}
.timeline-bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.65em;
  width: 6px; height: 1px;
  background: var(--cream-3);
}
.timeline-bullets strong { color: var(--cream); font-weight: 500; }
.timeline-stack {
  font-size: 0.72rem;
  color: var(--cream-3);
  letter-spacing: 0.02em;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
  margin-top: 0.4rem;
}
@media (min-width: 960px) {
  .timeline-item { grid-template-columns: 200px 1fr; gap: 3.5rem; padding-left: 2.5rem; }
}

/* =============================================================
   16. Featured Projects (Majd project card pattern)
   ============================================================= */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: linear-gradient(165deg, var(--bg-2) 0%, var(--bg-3) 100%);
  border: 1px solid var(--line);
  border-radius: var(--card-r);
  padding: 1rem 1rem 1.5rem;
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.4s var(--ease-out), transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
  will-change: transform;
}
.project-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-6px);
  box-shadow: 0 30px 80px -25px rgba(212, 164, 55, 0.18);
}

/* the CSS-art "visual" area at the top of each card */
.project-visual {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: calc(var(--card-r) - 8px);
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-3), var(--bg));
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  isolation: isolate;
}
.project-visual-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 164, 55, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 164, 55, 0.08) 1px, transparent 1px);
  background-size: 36px 36px;
  background-position: -1px -1px;
  mask-image: radial-gradient(60% 60% at 50% 50%, #000 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(60% 60% at 50% 50%, #000 0%, transparent 80%);
}
.project-visual-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  z-index: 2;
  text-align: center;
}
.project-visual-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(3.5rem, 9vw, 6rem);
  font-weight: 300;
  color: var(--amber);
  line-height: 1;
  letter-spacing: -0.04em;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 100;
  text-shadow: 0 0 40px rgba(212, 164, 55, 0.25);
}
.project-visual-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--cream-3);
}
.project-visual-tag {
  position: absolute;
  bottom: 0.85rem;
  left: 0.85rem;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--cream-3);
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.85);
  z-index: 3;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--cream-3);
  letter-spacing: 0.04em;
  padding: 0 0.4rem;
  margin-top: 0.3rem;
}
.project-status { display: inline-flex; align-items: center; gap: 0.4rem; }
.project-title {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.5vw, 1.75rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--cream);
  padding: 0 0.4rem;
}
.project-desc {
  font-size: 0.92rem;
  color: var(--cream-2);
  line-height: 1.6;
  padding: 0 0.4rem;
  max-width: 50ch;
}
.project-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 56ch;
}
.project-bullets li { padding-left: 1rem; position: relative; }
.project-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
}
.project-bullets strong { color: var(--cream); font-weight: 500; }

.project-tags {
  display: flex;
  flex-wrap: wrap;
  font-size: 0.74rem;
  color: var(--cream-3);
  padding: 0 0.4rem;
}
.project-tags li {
  display: inline-flex;
  align-items: center;
}
.project-tags li:not(:last-child)::after {
  content: "·";
  color: var(--mute);
  margin-inline: 0.6em;
}
.project-tags li { transition: color 200ms var(--ease-out); }
.project-tags li:hover { color: var(--amber); }
.project-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0.4rem 0;
  border-top: 1px solid var(--line);
  margin-top: 0.3rem;
  font-size: 0.82rem;
}
.project-metric { color: var(--cream-2); }
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--cream);
  font-weight: 500;
  position: relative;
  transition: color 0.3s var(--ease-out), transform 200ms var(--ease-out);
}
.project-link-arrow { transition: transform 0.4s var(--ease-out); }
.project-link:hover { color: var(--amber); }
.project-link:hover .project-link-arrow { transform: translate(2px, -2px); }

@media (min-width: 720px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}
/* 4 projects now → 2x2 reads better than a cramped 4-column row */
@media (min-width: 1200px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
}

/* =============================================================
   17. Writing
   ============================================================= */
.writing-feature {
  max-width: 64ch;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.writing-kicker {
  font-size: 0.78rem;
  color: var(--amber);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.writing-title {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 300;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 60;
  color: var(--cream);
  text-wrap: balance;
}
.writing-title em {
  font-style: italic;
  color: var(--amber);
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 100;
}
.writing-lede {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.5;
  font-weight: 300;
  color: var(--cream-2);
  font-variation-settings: "SOFT" 30;
}
.writing-lede::first-letter {
  font-family: var(--serif);
  font-style: italic;
  font-size: 3.4em;
  float: left;
  line-height: 0.85;
  padding: 0.12em 0.18em 0 0;
  color: var(--amber);
  font-variation-settings: "SOFT" 100;
}
.writing-body { font-size: 1rem; line-height: 1.7; color: var(--cream-2); display: flex; flex-direction: column; gap: 1rem; }
.writing-list { display: flex; flex-direction: column; gap: 0.85rem; counter-reset: writing-counter; padding-left: 0; }
.writing-list li {
  position: relative;
  padding-left: 2.5rem;
  counter-increment: writing-counter;
}
.writing-list li::before {
  content: counter(writing-counter, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0.15em;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--amber);
  letter-spacing: 0.02em;
}
.writing-list strong { color: var(--cream); font-weight: 500; }
.writing-close {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--cream-2);
  font-variation-settings: "SOFT" 60;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

/* =============================================================
   17.5 Articles (LinkedIn list)
   ============================================================= */
.articles-intro {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  line-height: 1.45;
  color: var(--cream-2);
  max-width: 56ch;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
}
.articles-intro a { text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 4px; }
.articles-intro a:hover { color: var(--cream); }

.articles-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.article-card {
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(165deg, var(--bg-2), var(--bg-3));
  overflow: hidden;
  transition: border-color 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.article-card:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
}
.article-link {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.25rem 1.4rem;
  text-decoration: none;
  color: inherit;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.7rem;
  color: var(--cream-3);
  letter-spacing: 0.05em;
}
.article-num { color: var(--amber); }
.article-title {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.018em;
  color: var(--cream);
}
.article-card:hover .article-title { color: var(--amber); }
.article-excerpt {
  font-size: 0.93rem;
  line-height: 1.55;
  color: var(--cream-2);
  max-width: 64ch;
}
.article-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
  font-size: 0.74rem;
}
.article-tags { color: var(--cream-3); }
.article-cta {
  color: var(--cream);
  font-weight: 500;
}
.article-card:hover .article-cta { color: var(--amber); }

.articles-all {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 2rem;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--cream);
  background: transparent;
  transition: border-color 0.35s, background 0.35s, color 0.35s, transform 200ms var(--ease-out);
  will-change: transform;
}
.articles-all:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(212, 164, 55, 0.06);
}

.external-arrow {
  display: inline-block;
  transition: transform 200ms var(--ease-out);
}
.article-card:hover .external-arrow,
.articles-all:hover .external-arrow {
  transform: translate(2px, -2px);
}

@media (min-width: 720px) {
  .articles-list { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
}

/* =============================================================
   18. Stack
   ============================================================= */
.stack-groups { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.stack-group {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.stack-cat { font-size: 0.78rem; color: var(--amber); letter-spacing: 0.05em; text-transform: uppercase; }
.stack-tags { display: flex; flex-wrap: wrap; gap: 0.5rem 0.6rem; }
.stack-tags li {
  padding: 0.6rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--cream-2);
  background: rgba(255, 255, 255, 0.015);
  transition:
    border-color 0.35s var(--ease-out),
    color 0.35s var(--ease-out),
    background 0.35s var(--ease-out),
    transform 0.35s var(--ease-out);
  will-change: transform;
}
.stack-tags li:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(212, 164, 55, 0.05);
  transform: translateY(-2px);
}
@media (min-width: 720px) {
  .stack-groups { grid-template-columns: repeat(2, 1fr); }
  .stack-group:nth-last-child(-n+2) { border-bottom: 0; padding-bottom: 0; }
}
@media (min-width: 1100px) {
  .stack-groups { grid-template-columns: repeat(3, 1fr); gap: 2.5rem 3rem; }
  .stack-group:nth-last-child(-n+3) { border-bottom: 0; padding-bottom: 0; }
}

/* =============================================================
   19. Education
   ============================================================= */
.edu-list { display: flex; flex-direction: column; gap: 2.5rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.edu-item {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.edu-item:last-child { border-bottom: 0; padding-bottom: 0; }
.edu-meta { font-size: 0.78rem; color: var(--cream-3); letter-spacing: 0.02em; }
.edu-degree {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--cream);
}
.edu-school { font-size: 1rem; color: var(--cream-2); }
.edu-tags {
  display: flex;
  flex-wrap: wrap;
  font-size: 0.78rem;
  margin: 0.4rem 0;
  color: var(--cream-2);
}
.edu-tags li { display: inline-flex; align-items: center; }
.edu-tags li:not(:last-child)::after {
  content: "·";
  color: var(--mute);
  margin-inline: 0.6em;
}
.edu-courses, .edu-desc { font-size: 0.92rem; color: var(--cream-2); line-height: 1.6; max-width: 64ch; }

.certs { display: flex; flex-direction: column; gap: 1.25rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.certs-head { font-size: 0.78rem; color: var(--amber); letter-spacing: 0.05em; text-transform: uppercase; }
.certs-list { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.cert {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  transition: border-color 0.35s var(--ease-out), background 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.cert:hover {
  border-color: var(--amber);
  background: var(--bg-3);
  transform: translateY(-2px);
}
.cert-logo {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.cert-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}
/* Official brand marks (edX, Meta, freeCodeCamp) sit on a light tile with breathing room */
.cert-logo-light { background: #fff; }
.cert-logo-light img {
  width: 56%;
  height: 56%;
  object-fit: contain;
  display: block;
}
/* UPE honor society — no official SVG exists, so a refined gold medallion on a deep tile */
.cert-logo-upe { background: radial-gradient(circle at 50% 38%, #14142e, #0a0a18); }
.cert:hover .cert-logo {
  transform: scale(1.06) rotate(-2deg);
  box-shadow: 0 6px 18px -4px rgba(212, 164, 55, 0.35);
}
.cert-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.cert-name {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--cream);
  line-height: 1.25;
}
.cert-issuer { font-size: 0.74rem; color: var(--cream-3); letter-spacing: 0.02em; }
@media (min-width: 720px) { .certs-list { grid-template-columns: repeat(2, 1fr); } }

/* =============================================================
   20. Languages
   ============================================================= */
.langs-list { display: flex; flex-direction: column; gap: 2rem; max-width: 760px; }
.lang { display: flex; flex-direction: column; gap: 0.7rem; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.lang-name {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--cream);
}
.lang-level { font-size: 0.75rem; color: var(--cream-3); letter-spacing: 0.02em; }
.lang-bar { width: 100%; height: 2px; background: var(--line); overflow: hidden; position: relative; }
.lang-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--amber);
  transition: width 1.6s var(--ease-out) 0.2s;
}
.lang.is-visible .lang-bar-fill { width: var(--level); }

/* =============================================================
   21. Photos (mask fade for contact)
   ============================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}
.contact-photo-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 360px;
  background: transparent;
  transform-style: preserve-3d;
  transition: transform 120ms var(--ease-out), filter 0.6s var(--ease-out);
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at center, #000 45%, rgba(0, 0, 0, 0.85) 65%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 90% at center, #000 45%, rgba(0, 0, 0, 0.85) 65%, transparent 100%);
}
/* A3 parallax scale target — a dedicated layer between the wrap (tilt
   transform) and the img (A2 clip-path + hover scale), so the three
   transform sources never write to the same element. */
.contact-photo-zoom {
  width: 100%;
  height: 100%;
}
@media (min-width: 720px) and (prefers-reduced-motion: no-preference) {
  .contact-photo-zoom { will-change: transform; }
}
.contact-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: saturate(0.88) contrast(1.04) brightness(0.94);
  transition: filter 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
/* A2 reveal — scroll-triggered via IntersectionObserver (initPhotoReveal in
   main.js), same threshold/rootMargin/unobserve-once pattern as initReveals
   and initBlurReveal. Lives on the inner img, not .contact-photo-wrap, so it
   doesn't interact with the wrap's own transform (mouse-tilt) or mask-image
   (vignette) transitions. */
.contact-photo[data-photo-reveal] {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 900ms var(--ease-out), filter 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.contact-photo.is-revealed {
  clip-path: inset(0 0 0% 0);
}
.contact-photo-wrap:hover .contact-photo {
  filter: saturate(1.05) contrast(1.02) brightness(1);
  transform: scale(1.02);
}
.contact-photo-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 25% 15%, rgba(212, 164, 55, 0.18) 0%, transparent 60%),
    radial-gradient(80% 70% at 50% 100%, rgba(10, 10, 10, 0.55) 0%, transparent 70%);
  z-index: 2;
  mix-blend-mode: multiply;
}

.contact-text-col { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--cream-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.contact-title {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3.8vw, 2.85rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 300;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 60;
  color: var(--cream);
  max-width: 22ch;
}
.contact-title em { font-style: italic; color: var(--amber); font-optical-sizing: auto; font-variation-settings: "SOFT" 100; }
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.contact-links li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-links li:last-child { border-bottom: 0; }
.contact-key { font-size: 0.72rem; color: var(--cream-3); text-transform: uppercase; letter-spacing: 0.05em; }
.contact-val {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--cream);
  font-weight: 400;
  position: relative;
  padding-bottom: 2px;
  word-break: break-word;
  transition: color 0.35s var(--ease-out), transform 200ms var(--ease-out);
}
a.contact-val::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
a.contact-val:hover { color: var(--amber); }
a.contact-val:hover::after { transform: scaleX(1); }
.contact-val-static { color: var(--cream-2); font-size: 1rem; font-family: var(--sans); }

@media (min-width: 960px) {
  .contact-grid { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); }
  .contact-photo-wrap { max-width: 100%; }
}

/* =============================================================
   22. Footer
   ============================================================= */
.footer {
  position: relative;
  padding: clamp(3rem, 6vw, 5rem) var(--gutter);
  border-top: 1px solid var(--line);
  background: var(--bg);
  margin-top: clamp(3rem, 6vw, 5rem);
}
.footer-inner {
  max-width: var(--max);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.85rem; }
/* Footer monogram — same proportions as the nav badge for consistency */
.footer-monogram {
  display: inline-block;
  width: 64px;
  height: 38px;
  border-radius: 8px;
  overflow: hidden;
  background-image: url("assets/img/logo-ad.png?v=20260529");
  background-size: cover;
  background-position: center;
  background-color: transparent;
}
.footer-name { font-family: var(--serif); font-size: 1.05rem; color: var(--cream); }
.footer-tag, .footer-loc { font-size: 0.72rem; color: var(--cream-3); letter-spacing: 0.02em; }
.footer-loc { color: var(--mute); }

/* =============================================================
   23. Reduced motion (only the truly intrusive)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-line::after,
  .marquee-track,
  .now-building-track {
    animation: none !important;
  }
  .blur-word,
  .hero-title {
    transition: none !important;
    transform: none !important;
  }
  .mask-line-inner {
    transition: none !important;
    transform: none !important;
  }
  .section[data-section-label]::before {
    transition: none !important;
    transform: none !important;
  }
  .hero-meta,
  .hero-actions,
  .hero-facts {
    transform: none !important;
    transition: opacity 300ms ease !important;
  }
  /* Keep press feedback (it's a small, non-vestibular scale) but drop the
     spring overshoot on release — reduced motion means gentler, not zero. */
  .btn {
    transition-timing-function: ease !important;
  }
  /* A2 photo reveals — show both portraits already visible, no clip animation. */
  .avatar-face,
  html.is-ready .avatar-face,
  .contact-photo[data-photo-reveal],
  .contact-photo.is-revealed {
    clip-path: none !important;
    transition: none !important;
  }
}

/* =============================================================
   24. Small-screen tweaks
   ============================================================= */
@media (max-width: 540px) {
  .nav-current { display: none; }
  .nav-cta span:last-child { display: none; }
  .nav-cta { padding: 0.55rem; }
  .nav { grid-template-columns: auto 1fr auto; }
  .hero { padding-top: calc(var(--nav-h) + 1.5rem); }
  .contact-links li { grid-template-columns: 1fr; gap: 0.3rem; }
  .avatar-ring { display: none; }
}
