/* =====================================================================
   Timothy Nasilele — Portfolio
   Art direction: "Ember" — black + charcoal surfaces, fiery orange light,
   editorial type, restrained glass. One accent family, one neutral family.
   ===================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }

/* ---------- Tokens ---------- */
:root {
  --bg: #070505;
  --bg-2: #0b0807;
  --bg-3: #110c0a;
  --glass: rgba(255, 236, 224, 0.035);
  --glass-2: rgba(255, 236, 224, 0.06);
  --line: rgba(255, 226, 208, 0.09);
  --line-2: rgba(255, 226, 208, 0.16);

  --text: #f6efe9;
  --text-2: #cdc1b8;
  --muted: #968a81;

  --orange: #ff5a1f;
  --orange-2: #ff7a2f;
  --amber: #ffb072;
  --red: #e1361b;
  --orange-a12: rgba(255, 90, 31, 0.12);
  --orange-a25: rgba(255, 90, 31, 0.25);
  --orange-a45: rgba(255, 90, 31, 0.45);
  --ok: #7ad99a;

  --grad-fire: linear-gradient(135deg, #ff8a3d 0%, #ff5a1f 45%, #d9311a 100%);

  --f-sans: 'Geist', 'Segoe UI', system-ui, sans-serif;
  --f-serif: 'Instrument Serif', 'Times New Roman', serif;
  --f-mono: 'Geist Mono', 'Consolas', monospace;

  --gutter: clamp(16px, 4.4vw, 64px);
  --maxw: 1320px;
  --nav-h: 84px;

  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --t-fast: 180ms;
  --t-med: 320ms;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html, body { overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body.is-locked { overflow: hidden; }

::selection { background: var(--orange); color: #120604; }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 5000;
  padding: 10px 18px; border-radius: 999px;
  background: var(--orange); color: #120604; font-weight: 600; font-size: 0.875rem;
  transition: top var(--t-fast) var(--ease-out);
}
.skip-link:focus { top: 14px; }

/* Film grain — static, GPU-cheap texture over everything */
.grain {
  position: fixed; inset: 0; z-index: 4000; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Typographic primitives ---------- */
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.fire-text {
  background: linear-gradient(100deg, #ffb072 0%, #ff7a2f 35%, #ff5a1f 65%, #e1361b 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: 0.06em; /* italic overhang */
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--f-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-2);
}

.kicker {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 22px;
}
.kicker .num { color: var(--orange-2); }
.kicker::after { content: ''; flex: 0 0 56px; height: 1px; background: linear-gradient(90deg, var(--orange-a45), transparent); }

.h-section {
  font-size: clamp(2.3rem, 5.6vw, 4.6rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.h-section .serif { font-size: 1.08em; letter-spacing: -0.02em; }

.lede { max-width: 54ch; color: var(--text-2); font-size: clamp(1rem, 1.25vw, 1.125rem); line-height: 1.7; }

.section { position: relative; padding-block: clamp(96px, 12vw, 168px); }
.section-head { display: grid; gap: 22px; margin-bottom: clamp(48px, 6vw, 80px); }
.section-head.split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; gap: 32px 64px; }

/* ---------- Buttons ---------- */
.btn {
  --h: 52px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: var(--h); padding: 0 26px; border-radius: 999px;
  font-size: 0.95rem; font-weight: 500; letter-spacing: -0.005em; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease-out), background-color var(--t-med) var(--ease-out),
              border-color var(--t-med) var(--ease-out), color var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
  will-change: transform;
}
.btn:active { transform: scale(0.97); }
.btn.magnetic { transition-property: background-color, border-color, color, box-shadow; }
.btn.magnetic:active { transform: none; }
.btn.magnetic:active > * { transform: scale(0.94); }
.btn i { font-size: 0.85em; }

.btn-fire {
  padding-right: 6px;
  background: var(--grad-fire);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 14px 40px -14px rgba(255, 90, 31, 0.75);
}
.btn-fire .orb {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: #fff; color: #1a0a05;
  transition: transform var(--t-med) var(--ease-out);
}
.btn-fire:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 18px 50px -12px rgba(255, 90, 31, 0.95); }
.btn-fire:hover .orb { transform: rotate(-45deg); }

.btn-ghost {
  border: 1px solid var(--line-2);
  background: rgba(255, 236, 224, 0.03);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover { border-color: rgba(255, 140, 80, 0.45); background: rgba(255, 90, 31, 0.08); }

.btn-light { background: #f6efe9; color: #120806; font-weight: 600; }
.btn-light:hover { background: #fff; }

.btn-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.9rem; color: var(--text-2);
  border-bottom: 1px solid var(--line-2); padding-bottom: 3px;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.btn-link:hover { color: var(--text); border-color: var(--orange-2); }

/* ---------- Social chips ---------- */
.socials { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.social {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-2); color: var(--text-2); font-size: 0.95rem;
  background: rgba(255, 236, 224, 0.02);
  transition: color var(--t-fast), border-color var(--t-fast), background-color var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.social:hover { color: #fff; border-color: var(--orange); background: var(--orange); transform: translateY(-2px); }

/* ---------- Glass card primitive ---------- */
.glass {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 236, 224, 0.055), rgba(255, 236, 224, 0.02));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 240, 230, 0.06), 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}
/* Pointer spotlight + glowing border (driven by --mx/--my) */
.spot { isolation: isolate; }
.spot::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; z-index: -1;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, -40%), rgba(255, 122, 47, 0.75), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity var(--t-med);
  pointer-events: none;
}
.spot::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -40%), rgba(255, 90, 31, 0.08), transparent 55%);
  opacity: 0; transition: opacity var(--t-med);
}
@media (hover: hover) { .spot:hover::before, .spot:hover::after { opacity: 1; } }

/* =====================================================================
   LOADER
   ===================================================================== */
#loader {
  position: fixed; inset: 0; z-index: 4500;
  display: grid; place-items: center;
  background: var(--bg);
  transition: clip-path 1s var(--ease-io), visibility 0s linear 1s;
  clip-path: inset(0 0 0 0);
}
#loader.done { clip-path: inset(0 0 100% 0); visibility: hidden; }
.loader-core { display: grid; justify-items: center; gap: 26px; }
.loader-ring { position: relative; width: 112px; height: 112px; }
.loader-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.loader-ring circle { fill: none; stroke-width: 1.5; }
.loader-ring .track { stroke: rgba(255, 226, 208, 0.1); }
.loader-ring .bar { stroke: url(#lg); stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: 339.3; transition: stroke-dashoffset 0.35s var(--ease-out); }
.loader-ring .pct {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 0.8rem; color: var(--text-2); letter-spacing: 0.08em;
}
.loader-name { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--muted); }
.loader-glow { position: absolute; width: 60vmin; height: 60vmin; border-radius: 50%; background: radial-gradient(circle, rgba(255, 90, 31, 0.16), transparent 65%); pointer-events: none; }

/* =====================================================================
   NAVIGATION
   ===================================================================== */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 1300; transform-origin: 0 50%; transform: scaleX(0); background: var(--grad-fire); }

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1200;
  height: var(--nav-h);
  transition: transform 0.5s var(--ease-out);
}
.site-header.is-hidden { transform: translateY(-110%); }
.nav-shell {
  height: 100%; max-width: calc(var(--maxw) + 40px); margin-inline: auto; padding-inline: var(--gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
}
.site-header::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: rgba(7, 5, 5, 0.66);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
  mask-image: linear-gradient(180deg, #000 70%, transparent);
  opacity: 0; transition: opacity var(--t-med);
}
.site-header.is-scrolled::before { opacity: 1; }

.brand { display: inline-flex; align-items: center; gap: 12px; justify-self: start; font-weight: 600; font-size: 1.12rem; letter-spacing: -0.03em; }
.brand-avatar {
  position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; padding: 2px; isolation: isolate;
  box-shadow: 0 6px 18px -6px rgba(255, 90, 31, 0.7);
}
.brand-avatar::before { /* gradient ring */
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: 50%;
  background: conic-gradient(from 210deg, #ffb072, #ff5a1f, #e1361b, #ff8a3d, #ffb072);
  transition: transform 0.9s var(--ease-out);
}
.brand:hover .brand-avatar::before { transform: rotate(180deg); }
.brand-avatar img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 30%;
  border: 2px solid var(--bg); background: var(--bg-3);
}
.brand-dot {
  position: absolute; right: 0; bottom: 1px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--ok); border: 2px solid var(--bg); box-shadow: 0 0 8px rgba(122, 217, 154, 0.8);
}
.footer-brand .brand-avatar { width: 48px; height: 48px; }
.brand-name b { color: var(--orange); font-weight: 600; }

.nav-pill {
  position: relative; display: flex; align-items: center; gap: 2px;
  padding: 5px; border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(14, 10, 9, 0.55);
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 240, 230, 0.05);
}
.nav-pill a {
  position: relative; z-index: 1; padding: 9px 17px; border-radius: 999px;
  font-size: 0.875rem; font-weight: 500; color: var(--text-2);
  transition: color var(--t-fast);
}
.nav-pill a:hover, .nav-pill a.is-active { color: #fff; }
.nav-indicator {
  position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 122, 47, 0.28), rgba(255, 90, 31, 0.14));
  box-shadow: inset 0 0 0 1px rgba(255, 122, 47, 0.45), 0 6px 20px -8px rgba(255, 90, 31, 0.7);
  opacity: 0;
  transition: transform 0.5s var(--ease-out), width 0.5s var(--ease-out), opacity var(--t-med);
}

.nav-end { justify-self: end; display: flex; align-items: center; gap: 10px; }
.nav-cta { --h: 46px; padding: 0 20px; font-size: 0.875rem; }
.nav-cta i { transition: transform var(--t-med) var(--ease-out); }
.nav-cta:hover i { transform: translateX(3px); }

.menu-btn {
  display: none; position: relative; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(14, 10, 9, 0.6);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.menu-btn span { position: absolute; left: 14px; right: 14px; height: 1.5px; background: var(--text); border-radius: 2px; transition: transform 0.45s var(--ease-out), top 0.45s var(--ease-out); }
.menu-btn span:nth-child(1) { top: 18px; }
.menu-btn span:nth-child(2) { top: 26px; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 1100;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--nav-h) + 24px) var(--gutter) 32px;
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(255, 90, 31, 0.22), transparent 60%),
    var(--bg);
  clip-path: circle(0% at calc(100% - 44px) 42px);
  visibility: hidden;
  transition: clip-path 0.7s var(--ease-io), visibility 0s linear 0.7s;
  overflow-y: auto;
}
.mobile-menu.is-open { clip-path: circle(150% at calc(100% - 44px) 42px); visibility: visible; transition: clip-path 0.7s var(--ease-io), visibility 0s; }
.mobile-menu ol { display: grid; }
.mobile-menu li { overflow: hidden; border-bottom: 1px solid var(--line); }
.mobile-menu ol a {
  display: flex; align-items: baseline; gap: 16px; padding: 14px 0;
  font-size: clamp(2rem, 9vw, 3rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1.1;
  transform: translateY(105%); transition: transform 0.6s var(--ease-out), color var(--t-fast);
}
.mobile-menu ol a small { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.12em; color: var(--orange-2); }
.mobile-menu ol a:hover, .mobile-menu ol a.is-active { color: var(--orange-2); }
.mobile-menu.is-open ol a { transform: translateY(0); }
.mobile-menu.is-open li:nth-child(2) a { transition-delay: 50ms; }
.mobile-menu.is-open li:nth-child(3) a { transition-delay: 100ms; }
.mobile-menu.is-open li:nth-child(4) a { transition-delay: 150ms; }
.mobile-menu.is-open li:nth-child(5) a { transition-delay: 200ms; }
.mobile-menu.is-open li:nth-child(6) a { transition-delay: 250ms; }
.mobile-menu-foot { display: grid; gap: 18px; padding-top: 32px; opacity: 0; transition: opacity 0.5s var(--ease-out) 0.3s; }
.mobile-menu.is-open .mobile-menu-foot { opacity: 1; }
.mobile-menu-foot a.mail { font-size: 1rem; color: var(--text-2); word-break: break-all; }

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  padding-top: calc(var(--nav-h) + clamp(20px, 4vh, 48px));
  overflow: hidden; isolation: isolate;
}
.hero-stage { position: absolute; inset: 0; z-index: -2; }
.hero-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s var(--ease-out); }
.hero.is-3d .hero-stage canvas { opacity: 1; }
.hero-fallback {
  position: absolute; inset: 0;
  background: url('../img/monoliths-1920.webp') 70% 50% / cover no-repeat;
  opacity: 0.9; transition: opacity 1.4s var(--ease-out);
}
.hero.is-3d .hero-fallback { opacity: 0; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7, 5, 5, 0.92) 0%, rgba(7, 5, 5, 0.55) 34%, rgba(7, 5, 5, 0) 58%),
    linear-gradient(0deg, var(--bg) 0%, rgba(7, 5, 5, 0) 22%);
}

.hero-inner {
  position: relative; flex: 1;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 24px;
}
.hero-copy { position: relative; z-index: 3; align-self: center; padding-bottom: clamp(40px, 7vh, 88px); max-width: 640px; }

.hero-eyebrow { margin-bottom: clamp(20px, 3vh, 30px); }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 12px var(--orange); }
.pulse::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid var(--orange); animation: ping 2.2s var(--ease-out) infinite; }
@keyframes ping { 0% { transform: scale(0.5); opacity: 1; } 100% { transform: scale(2.2); opacity: 0; } }

.hero-title {
  font-size: clamp(2.9rem, 6.6vw, 6.1rem);
  font-weight: 500; line-height: 0.98; letter-spacing: -0.055em;
  margin-bottom: clamp(20px, 3vh, 30px);
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero-title .line > span { display: inline-block; transform-origin: 0% 100%; will-change: transform; }
.hero-title .serif { font-size: 1.12em; letter-spacing: -0.03em; line-height: 0.9; }

.hero-desc { max-width: 47ch; color: var(--text-2); font-size: clamp(1rem, 1.2vw, 1.14rem); line-height: 1.65; margin-bottom: clamp(26px, 4vh, 38px); }
.hero-desc strong { color: var(--text); font-weight: 500; }

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: clamp(26px, 4vh, 40px); }

.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.avail {
  display: inline-flex; align-items: center; gap: 12px; padding: 8px 16px 8px 12px; border-radius: 999px;
  border: 1px solid rgba(122, 217, 154, 0.22); background: rgba(122, 217, 154, 0.06);
  font-size: 0.82rem; color: var(--text-2);
}
.avail .dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.avail .dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--ok); animation: ping 2.4s var(--ease-out) infinite; }
.hero-meta .socials .social { width: 40px; height: 40px; font-size: 0.85rem; }
.hero-meta .resume { font-size: 0.85rem; }

/* Visual column */
.hero-visual { position: relative; z-index: 2; min-height: 520px; --pcx: 40%; }
.portrait-wrap { position: absolute; inset: 0; pointer-events: none; }
.portrait-wrap .portrait { pointer-events: auto; }
.orb-anchor { position: absolute; left: var(--pcx); top: 38%; width: min(88%, 560px); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }

.portrait {
  position: absolute; left: var(--pcx); bottom: 0; height: min(100%, 900px); aspect-ratio: 825 / 1080; max-width: 100%;
  transform: translate3d(calc(-50% + var(--px, 0px)), var(--py, 0px), 0);
  will-change: transform;
}
.portrait img {
  width: 100%; height: 100%; object-fit: contain; object-position: bottom center;
  /* rim-light the cut-out like the reference: warm edge, deep shadow */
  filter: drop-shadow(0 0 1px rgba(255, 150, 90, 0.55)) drop-shadow(14px -6px 26px rgba(255, 90, 31, 0.35)) drop-shadow(0 30px 60px rgba(0, 0, 0, 0.6));
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 99%);
  mask-image: linear-gradient(180deg, #000 72%, transparent 99%);
}
/* Fallback when only the framed (non-cutout) photo exists */
.portrait.is-framed img { border-radius: 50% 50% 0 0 / 40% 40% 0 0; -webkit-mask-image: radial-gradient(120% 100% at 50% 30%, #000 55%, transparent 80%); mask-image: radial-gradient(120% 100% at 50% 30%, #000 55%, transparent 80%); }

.hero-cards { position: absolute; right: 0; top: 6%; z-index: 3; display: grid; gap: 12px; width: 304px; }
.service-chip {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 14, 12, 0.72), rgba(14, 10, 9, 0.6));
  transition: transform var(--t-med) var(--ease-out), border-color var(--t-med);
}
.service-chip:hover { transform: translateX(-6px); border-color: rgba(255, 122, 47, 0.4); }
.chip-icon {
  position: relative; flex: none; display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 14px; isolation: isolate; overflow: hidden;
  background: linear-gradient(145deg, #ffb072 0%, #ff6a26 42%, #e1361b 100%);
  color: #fff; font-size: 1.1rem; line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -6px 12px rgba(120, 20, 4, 0.45),
    0 0 0 1px rgba(255, 150, 90, 0.35),
    0 12px 28px -10px rgba(255, 90, 31, 0.9);
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.chip-icon::before { /* glass highlight */
  content: ''; position: absolute; inset: 0 0 52% 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0));
}
.chip-icon i { display: block; width: 1.25em; text-align: center; line-height: 1; filter: drop-shadow(0 1px 2px rgba(90, 16, 2, 0.55)); }
.service-chip:hover .chip-icon { transform: translateY(-2px) rotate(-4deg); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), inset 0 -6px 12px rgba(120,20,4,0.45), 0 0 0 1px rgba(255,170,110,0.55), 0 16px 34px -10px rgba(255,90,31,1); }
.service-chip .chip-text { min-width: 0; }
.service-chip strong { display: block; font-size: 0.98rem; font-weight: 500; letter-spacing: -0.015em; line-height: 1.25; margin-bottom: 3px; }
.service-chip .chip-text span { display: block; font-size: 0.78rem; color: var(--muted); line-height: 1.45; }
.service-chip .arrow { color: var(--orange-2); transition: transform var(--t-med) var(--ease-out); }
.service-chip:hover .arrow { transform: translateX(4px); }

.hero-stats { position: absolute; right: var(--gutter); bottom: clamp(24px, 4vh, 40px); z-index: 3; display: flex; gap: 12px; }
.stat-card { width: 200px; padding: 18px 20px 20px; border-radius: 18px; background: linear-gradient(180deg, rgba(20, 14, 12, 0.7), rgba(14, 10, 9, 0.55)); }
.stat-card .val { font-size: 2.3rem; font-weight: 500; letter-spacing: -0.05em; line-height: 1; }
.stat-card .val sup { font-size: 0.55em; color: var(--orange-2); vertical-align: 0.6em; margin-left: 2px; }
.stat-card .lbl { margin-top: 8px; font-size: 0.82rem; color: var(--text-2); }
.stat-card .bar { margin-top: 14px; height: 3px; border-radius: 3px; background: rgba(255, 226, 208, 0.08); overflow: hidden; }
.stat-card .bar i { display: block; height: 100%; width: var(--w, 40%); border-radius: inherit; background: var(--grad-fire); }
.stat-card .star { position: absolute; top: 14px; right: 16px; color: var(--orange-2); font-size: 0.7rem; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 22px; z-index: 4; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted);
}
.scroll-cue .rail { width: 1px; height: 44px; background: var(--line-2); position: relative; overflow: hidden; }
.scroll-cue .rail::after { content: ''; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--orange); animation: rail 2s var(--ease-io) infinite; }
@keyframes rail { to { top: 100%; } }

/* =====================================================================
   MARQUEE
   ===================================================================== */
.marquee { position: relative; overflow: hidden; padding-block: 26px; border-block: 1px solid var(--line); background: var(--bg-2); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; align-items: center; gap: 48px; padding-right: 48px; }
.marquee-item { display: inline-flex; align-items: center; gap: 48px; font-size: clamp(1.4rem, 2.6vw, 2.1rem); font-weight: 500; letter-spacing: -0.035em; color: var(--text-2); white-space: nowrap; }
.marquee-item .serif { color: var(--orange-2); }
.marquee-item::after { content: '✦'; font-size: 0.6em; color: var(--orange); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =====================================================================
   ABOUT
   ===================================================================== */
.about-statement {
  font-size: clamp(1.75rem, 3.9vw, 3.4rem); font-weight: 400; line-height: 1.14; letter-spacing: -0.04em;
  max-width: 22ch; max-width: 26ch; margin-bottom: clamp(64px, 8vw, 112px);
  text-wrap: pretty;
}
.about-statement .w { opacity: 0.16; transition: opacity 0.3s linear; }
.about-statement .w.on, .no-anim .about-statement .w { opacity: 1; }
.about-statement .serif { color: var(--orange-2); }

.about-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }

.about-photo { position: relative; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 4 / 5; border: 1px solid var(--line-2); background: var(--bg-3); }
.about-photo img { width: 100%; height: 115%; object-fit: cover; object-position: 50% 20%; filter: saturate(0.9) contrast(1.05); }
.about-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(7, 5, 5, 0.85)), linear-gradient(120deg, rgba(255, 90, 31, 0.18), transparent 40%); pointer-events: none; }
.about-photo .cap { position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 1; display: flex; justify-content: space-between; align-items: end; gap: 12px; font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-2); }
.about-photo-wrap { position: relative; }
.about-badge { position: absolute; right: -18px; top: 36px; display: flex; align-items: center; gap: 14px; padding: 12px 20px 12px 12px; border-radius: 18px; background: rgba(16, 11, 9, 0.78); }
.about-badge .chip-icon { width: 44px; height: 44px; border-radius: 13px; font-size: 1rem; }
.about-badge strong { display: block; font-size: 1rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.about-badge .chip-text span { display: block; letter-spacing: 0.04em; font-size: 0.75rem; color: var(--muted); }

.about-body p { color: var(--text-2); font-size: 1.05rem; margin-bottom: 18px; max-width: 60ch; }
.about-body p strong { color: var(--text); font-weight: 500; }

.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 34px 0; }
.principle { padding: 20px; border-radius: var(--r-md); }
.principle i { color: var(--orange-2); font-size: 1rem; margin-bottom: 14px; display: block; }
.principle h3 { font-size: 0.98rem; font-weight: 500; letter-spacing: -0.015em; margin-bottom: 4px; }
.principle p { font-size: 0.82rem; color: var(--muted); line-height: 1.5; margin: 0; }

.traits { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 34px; }
.trait { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 0.82rem; color: var(--text-2); transition: border-color var(--t-fast), color var(--t-fast); }
.trait i { color: var(--orange-2); font-size: 0.78rem; }
.trait:hover { border-color: var(--orange-a45); color: var(--text); }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); margin-bottom: 36px; }
.fact { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.fact:nth-child(odd) { padding-right: 16px; }
.fact .k { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.fact .v { font-size: 0.98rem; }
.fact .v.ok { color: var(--ok); }

.about-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.numbers { margin-top: clamp(72px, 9vw, 128px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.number { position: relative; padding: clamp(28px, 3.4vw, 44px) clamp(14px, 2vw, 28px); }
.number + .number { border-left: 1px solid var(--line); }
.number .val { font-size: clamp(2.8rem, 5.6vw, 5rem); font-weight: 500; letter-spacing: -0.06em; line-height: 1; }
.number .val sup { font-family: var(--f-serif); font-style: italic; font-weight: 400; color: var(--orange-2); font-size: 0.6em; vertical-align: 0.5em; }
.number .lbl { margin-top: 12px; font-size: 0.9rem; color: var(--muted); }
.number i { position: absolute; top: clamp(20px, 2.4vw, 32px); right: clamp(14px, 2vw, 28px); color: var(--orange-a45); font-size: 1rem; }

/* =====================================================================
   SKILLS
   ===================================================================== */
#skills { background: radial-gradient(70% 60% at 50% 0%, rgba(255, 90, 31, 0.07), transparent 70%), var(--bg-2); }
.skill-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.skill-col { padding: 26px; border-radius: var(--r-xl); }
.skill-col-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.skill-col-head h3 { font-size: 1.3rem; font-weight: 500; letter-spacing: -0.03em; }
.skill-col-head .count { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.12em; color: var(--orange-2); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--orange-a25); }
.skill-col-head .ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--orange-a12); color: var(--orange-2); }
.skill-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; perspective: 800px; }
.skill {
  position: relative; display: grid; gap: 14px; padding: 18px 16px; border-radius: var(--r-md);
  background: rgba(255, 236, 224, 0.025); border: 1px solid var(--line);
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease-out), border-color var(--t-med), background-color var(--t-med), box-shadow var(--t-med);
}
.skill:hover { border-color: rgba(255, 122, 47, 0.45); background: rgba(255, 90, 31, 0.06); box-shadow: 0 20px 40px -20px rgba(255, 90, 31, 0.5); }
.skill .si { font-size: 1.6rem; color: var(--text-2); transform: translateZ(24px); transition: color var(--t-med), transform 0.5s var(--ease-out); }
.skill:hover .si { color: var(--orange-2); }
.skill .sn { font-size: 0.95rem; font-weight: 500; letter-spacing: -0.015em; transform: translateZ(14px); }
.skill .sl { display: flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: -10px; }
.skill .sl .pips { display: inline-flex; gap: 3px; }
.skill .sl .pips i { width: 10px; height: 3px; border-radius: 2px; background: rgba(255, 226, 208, 0.12); }
.skill .sl .pips i.on { background: var(--orange); }

/* =====================================================================
   SERVICES
   ===================================================================== */
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.service {
  position: relative; overflow: hidden; padding: clamp(26px, 3vw, 40px);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  min-height: 250px; display: flex; flex-direction: column;
}
.service::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 90% at 0% 100%, rgba(255, 90, 31, 0.22), transparent 60%), linear-gradient(180deg, rgba(255, 90, 31, 0.04), rgba(255, 90, 31, 0.1));
  transform: translateY(101%); transition: transform 0.6s var(--ease-out);
}
.service { isolation: isolate; }
.service:hover::before { transform: translateY(0); }
.service .no { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.14em; color: var(--muted); }
.service .ic { margin: 28px 0 auto; font-size: 1.5rem; color: var(--orange-2); transition: transform 0.6s var(--ease-out); }
.service:hover .ic { transform: translateY(-4px) scale(1.08); }
.service h3 { margin-top: 32px; font-size: 1.28rem; font-weight: 500; letter-spacing: -0.03em; }
.service p { margin-top: 8px; color: var(--muted); font-size: 0.92rem; line-height: 1.6; max-width: 34ch; }

/* =====================================================================
   PROJECTS
   ===================================================================== */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-2);
  font-size: 0.85rem; color: var(--text-2);
  transition: color var(--t-fast), background-color var(--t-fast), border-color var(--t-fast);
}
.filter:hover { color: var(--text); border-color: var(--orange-a45); }
.filter.is-active { background: var(--text); color: #120806; border-color: var(--text); }
.filter sup { font-family: var(--f-mono); font-size: 0.62rem; margin-left: 4px; opacity: 0.6; }

.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2vw, 28px); }
.work {
  position: relative; display: flex; flex-direction: column; border-radius: var(--r-xl);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.work.is-hidden { display: none; }
.work.is-featured { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.work.is-featured.is-hidden { display: none; }

.work-media {
  position: relative; overflow: hidden; border-radius: calc(var(--r-xl) - 8px);
  margin: 8px; aspect-ratio: 16 / 10; background: var(--bg-3);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease-out);
}
.work-media .reveal-mask { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }
.work-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transform: scale(1.04); transition: transform 1.2s var(--ease-out), filter 0.6s var(--ease-out); }
.work:hover .work-media img { transform: scale(1.1); }
.work-media::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 236, 224, 0.08); background: linear-gradient(180deg, rgba(7, 5, 5, 0) 55%, rgba(7, 5, 5, 0.55)); }
.work-top { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 2; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.work-top .cat { padding: 6px 12px; border-radius: 999px; background: rgba(7, 5, 5, 0.65); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line-2); font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }
.work-top .idx { font-family: var(--f-mono); font-size: 0.7rem; color: #fff; background: var(--orange); padding: 6px 10px; border-radius: 999px; }
.work-peek {
  position: absolute; left: 50%; top: 50%; z-index: 2; width: 104px; height: 104px; border-radius: 50%;
  display: grid; place-items: center; text-align: center; line-height: 1.2;
  background: rgba(246, 239, 233, 0.92); color: #120806; font-size: 0.78rem; font-weight: 600;
  transform: translate(-50%, -50%) scale(0.4); opacity: 0;
  transition: transform 0.5s var(--ease-out), opacity 0.3s var(--ease-out);
}
.work:hover .work-peek, .work-peek:focus-visible { transform: translate(-50%, -50%) scale(1); opacity: 1; }

.work-body { display: flex; flex-direction: column; gap: 14px; padding: 18px 26px 26px; flex: 1; }
.work.is-featured .work-body { padding: clamp(26px, 3vw, 44px); justify-content: center; }
.work-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 4px 10px; border-radius: 999px; background: var(--orange-a12); color: var(--amber); font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.06em; }
.work-title { font-size: clamp(1.4rem, 2.1vw, 1.9rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1.1; }
.work.is-featured .work-title { font-size: clamp(1.9rem, 3.2vw, 3rem); }
.work-desc { color: var(--muted); font-size: 0.95rem; line-height: 1.6; }
.work-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }
.work-actions .btn { --h: 44px; padding: 0 18px; font-size: 0.85rem; }
.work-actions .btn-fire { padding-right: 5px; }
.work-actions .btn-fire .orb { width: 34px; height: 34px; }

/* =====================================================================
   EXPERIENCE
   ===================================================================== */
.exp-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(40px, 6vw, 110px); align-items: start; }
.exp-aside { position: sticky; top: calc(var(--nav-h) + 32px); }
.exp-aside .lede { margin-top: 22px; }

.edu-card { margin-top: 40px; padding: 26px; border-radius: var(--r-lg); }
.edu-card .k { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--orange-2); }
.edu-card h3 { margin: 10px 0 6px; font-size: 1.25rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1.25; }
.edu-card .f { font-size: 0.85rem; color: var(--muted); line-height: 1.55; }
.edu-card .u { margin-top: 14px; display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-2); }
.edu-card .u i { color: var(--orange-2); }

.timeline { position: relative; padding-left: 44px; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
.tl-progress { position: absolute; left: 11px; top: 8px; width: 1px; height: calc(100% - 16px); background: linear-gradient(180deg, var(--amber), var(--orange) 50%, var(--red)); transform-origin: top; transform: scaleY(0); box-shadow: 0 0 12px rgba(255, 90, 31, 0.7); }
.no-anim .tl-progress { transform: scaleY(1); }
.tl-item { position: relative; padding-bottom: clamp(36px, 4vw, 56px); }
.tl-item:last-child { padding-bottom: 0; }
.tl-node { position: absolute; left: -44px; top: 4px; width: 23px; height: 23px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-2); display: grid; place-items: center; transition: border-color 0.4s; }
.tl-node::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); transition: background-color 0.4s, box-shadow 0.4s; }
.tl-item.is-lit .tl-node { border-color: var(--orange); }
.tl-item.is-lit .tl-node::after { background: var(--orange); box-shadow: 0 0 12px var(--orange); }
.tl-period { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange-2); }
.tl-role { margin-top: 8px; font-size: clamp(1.35rem, 2.3vw, 1.85rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.15; }
.tl-org { margin-top: 4px; color: var(--text-2); font-size: 0.92rem; }
.tl-desc { margin-top: 12px; color: var(--muted); font-size: 0.95rem; line-height: 1.65; max-width: 56ch; }

/* =====================================================================
   TESTIMONIALS
   ===================================================================== */
#testimonials { background: var(--bg-2); }
.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.quote { padding: clamp(26px, 3vw, 38px); border-radius: var(--r-xl); display: flex; flex-direction: column; gap: 22px; }
.quote .mark { font-family: var(--f-serif); font-size: 4.2rem; line-height: 0.6; height: 0.5em; color: var(--orange); }
.quote .stars { display: flex; gap: 4px; color: var(--amber); font-size: 0.75rem; }
.quote blockquote { font-size: clamp(1.02rem, 1.35vw, 1.18rem); line-height: 1.6; color: var(--text); letter-spacing: -0.01em; }
.quote figcaption { margin-top: auto; display: flex; align-items: center; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.quote .av { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--grad-fire); color: #fff; font-size: 0.8rem; font-weight: 600; }
.quote .nm { font-weight: 500; font-size: 0.95rem; }
.quote .rl { font-size: 0.8rem; color: var(--muted); }

/* =====================================================================
   CONTACT
   ===================================================================== */
#contact { overflow: hidden; isolation: isolate; }
.contact-bg { position: absolute; inset: 0; z-index: -1; }
.contact-bg::before { content: ''; position: absolute; inset: 0; background: url('../img/monoliths-1920.webp') 60% 30% / cover no-repeat; opacity: 0.38; }
.contact-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, rgba(7, 5, 5, 0.55) 35%, rgba(7, 5, 5, 0.75) 70%, var(--bg) 100%); }

.contact-head { text-align: center; display: grid; justify-items: center; gap: 22px; margin-bottom: clamp(56px, 7vw, 96px); }
.contact-head .kicker::before { content: ''; flex: 0 0 56px; height: 1px; background: linear-gradient(270deg, var(--orange-a45), transparent); }
.contact-title { font-size: clamp(2.6rem, 8vw, 7.4rem); font-weight: 500; line-height: 0.95; letter-spacing: -0.06em; max-width: 14ch; }
.contact-title .serif { font-size: 1.08em; }
.contact-head .lede { text-align: center; }

.contact-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(20px, 3vw, 36px); align-items: start; }
.contact-info { display: grid; gap: 12px; }
.c-item { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--r-md); transition: border-color var(--t-med), transform var(--t-med) var(--ease-out); }
a.c-item:hover { border-color: var(--orange-a45); transform: translateX(4px); }
.c-item .ci { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--orange-a12); color: var(--orange-2); }
.c-item .ck { font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.c-item .cv { font-size: 0.98rem; overflow-wrap: anywhere; }
.c-item .cv.ok { color: var(--ok); }
.contact-info .socials { margin-top: 10px; }

.contact-form { padding: clamp(24px, 3vw, 40px); border-radius: var(--r-xl); display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }
.field .req { color: var(--orange-2); }
.field input, .field textarea {
  width: 100%; padding: 15px 16px; border-radius: 14px;
  background: rgba(7, 5, 5, 0.55); border: 1px solid var(--line-2); color: var(--text);
  font-size: 1rem; /* ≥16px avoids iOS zoom */
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast);
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: #6e635c; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255, 90, 31, 0.15); background: rgba(7, 5, 5, 0.75); }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.form-foot .note { font-size: 0.8rem; color: var(--muted); }
#form-submit[disabled] { opacity: 0.7; cursor: progress; }
.form-msg { display: none; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px; font-size: 0.9rem; }
.form-msg.show { display: flex; }
#form-success { background: rgba(122, 217, 154, 0.08); border: 1px solid rgba(122, 217, 154, 0.3); color: var(--ok); }
#form-error { background: rgba(225, 54, 27, 0.1); border: 1px solid rgba(225, 54, 27, 0.4); color: #ff9d85; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer { position: relative; overflow: hidden; border-top: 1px solid var(--line); padding-top: clamp(64px, 8vw, 104px); }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.footer-brand p { margin: 18px 0 24px; color: var(--muted); font-size: 0.92rem; max-width: 34ch; }
.footer-col h4 { font-family: var(--f-mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { color: var(--text-2); font-size: 0.92rem; transition: color var(--t-fast); }
.footer-col a:hover { color: var(--orange-2); }
.footer-word {
  margin-top: clamp(48px, 7vw, 96px);
  font-size: clamp(3.6rem, 17.5vw, 17rem); font-weight: 600; letter-spacing: -0.07em; line-height: 0.78;
  text-align: center; white-space: nowrap;
  background: linear-gradient(180deg, rgba(255, 122, 47, 0.55), rgba(255, 90, 31, 0.04) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  user-select: none;
}
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 22px 0 28px; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--muted); }
.footer-bottom .mono { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.1em; }

/* Back to top */
#back-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 900;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(16, 11, 9, 0.8); border: 1px solid var(--line-2); color: var(--text);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity var(--t-med), transform var(--t-med) var(--ease-out), visibility 0s linear var(--t-med), background-color var(--t-fast), border-color var(--t-fast);
}
#back-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity var(--t-med), transform var(--t-med) var(--ease-out), visibility 0s, background-color var(--t-fast), border-color var(--t-fast); }
#back-top:hover { background: var(--orange); border-color: var(--orange); }

/* =====================================================================
   MODAL
   ===================================================================== */
.modal { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 3, 3, 0.78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fadeIn 0.35s var(--ease-out); }
.modal-panel {
  position: relative; width: min(980px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  border-radius: var(--r-xl); background: #0f0b09; border: 1px solid var(--line-2);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 90, 31, 0.08);
  animation: modalIn 0.55s var(--ease-out);
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(0.97); } }
.modal-media { background: var(--bg-3); min-height: 280px; }
.modal-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.modal-body { padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 14px; }
.modal-cat { font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--orange-2); }
.modal-title { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1.1; }
.modal-desc { color: var(--text-2); font-size: 0.98rem; }
.modal-sec { margin-top: 8px; font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 12px; }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(7, 5, 5, 0.75); border: 1px solid var(--line-2);
  transition: background-color var(--t-fast), transform var(--t-med) var(--ease-out);
}
.modal-close:hover { background: var(--orange); transform: rotate(90deg); }

/* =====================================================================
   REVEAL SYSTEM (only hides content once JS confirms it can animate)
   ===================================================================== */
/* Reveals use keyframes (not transitions) so hover transitions on the same
   elements stay instant and are never delayed by the stagger. */
@keyframes revealUp   { from { opacity: 0; transform: translate3d(0, 28px, 0); } }
@keyframes revealFade { from { opacity: 0; } }
@keyframes revealClip { from { clip-path: inset(100% 0 0 0 round 20px); } to { clip-path: inset(0 0 0 0 round 20px); } }
@keyframes wordUp     { from { transform: translate3d(0, 112%, 0) rotate(4deg); } }

.anim [data-reveal]:not(.in) { opacity: 0; }
.anim [data-reveal].in { animation: revealUp 1.15s var(--ease-expo) var(--d, 0ms) backwards; }
.anim [data-reveal="fade"].in { animation-name: revealFade; }
.anim [data-reveal="clip"]:not(.in) { opacity: 1; clip-path: inset(100% 0 0 0 round 20px); }
.anim [data-reveal="clip"].in { animation: revealClip 1.4s var(--ease-io) var(--d, 0ms) backwards; }

/* Word-masked headings */
.wm { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.08em 0.16em; margin: 0 -0.08em -0.16em; }
.wi { display: inline-block; transform-origin: 0% 100%; }
.anim [data-reveal="split"]:not(.in) { opacity: 1; }
.anim [data-reveal="split"]:not(.in) .wi { transform: translate3d(0, 112%, 0); }
.anim [data-reveal="split"].in { animation: none; }
.anim [data-reveal="split"].in .wi { animation: wordUp 1.25s var(--ease-expo) calc(var(--d, 0ms) + var(--i, 0) * 60ms) backwards; }

/* Hero entrance (pre-state set only when animations run) */
.anim .hero-title .line > span { transform: translateY(110%); }
.anim .hero [data-hero] { opacity: 0; transform: translateY(24px); }
.anim .hero .portrait-wrap { opacity: 0; }
.anim .hero.is-entered .hero-title .line > span,
.anim .hero.is-entered [data-hero] { transform: none; opacity: 1; }
.anim .hero.is-entered .portrait-wrap { opacity: 1; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
/* Phones get the 18 KB backdrop instead of the 52 KB one */
@media (max-width: 900px) {
  .hero-fallback, .contact-bg::before { background-image: url('../img/monoliths-960.webp'); }
}

@media (max-width: 1240px) {
  .hero-cards { width: 270px; }
  .stat-card { width: 180px; }
}

@media (max-width: 1100px) {
  .nav-pill { display: none; }
  .nav-shell { grid-template-columns: 1fr auto; }
  .menu-btn { display: block; }

  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); }
  .hero-visual { --pcx: 50%; }
  .hero-cards { display: none; }
  .hero-stats { flex-direction: column; }

  .section-head.split { grid-template-columns: 1fr; align-items: start; }
  .skill-cols { grid-template-columns: 1fr; }
  .skill-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  :root { --nav-h: 74px; }
  .hero { min-height: auto; }
  .hero-shade { background: linear-gradient(180deg, rgba(7, 5, 5, 0.86) 0%, rgba(7, 5, 5, 0.5) 50%, rgba(7, 5, 5, 0.2) 70%, var(--bg) 100%); }
  .hero-inner { grid-template-columns: 1fr; gap: 0; }
  .hero-copy { padding-bottom: 12px; max-width: 680px; }
  .hero-visual { min-height: 0; height: clamp(420px, 108vw, 640px); }
  .portrait { height: 100%; }
  .orb-anchor { top: 42%; width: min(92%, 520px); }
  .hero-stats { left: var(--gutter); right: var(--gutter); bottom: 18px; flex-direction: row; justify-content: space-between; }
  .stat-card { width: auto; flex: 0 1 170px; padding: 14px 16px 16px; }
  .stat-card .val { font-size: 1.8rem; }
  .scroll-cue { display: none; }

  .about-grid { grid-template-columns: 1fr; }
  .about-photo-wrap { max-width: 520px; }
  .about-badge { right: 12px; }
  .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .number:nth-child(3) { border-left: 0; }
  .number:nth-child(n + 3) { border-top: 1px solid var(--line); }

  .work-grid { grid-template-columns: 1fr; }
  .work.is-featured { grid-template-columns: 1fr; display: flex; }

  .exp-grid { grid-template-columns: 1fr; }
  .exp-aside { position: static; }

  .quotes { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .modal-panel { grid-template-columns: 1fr; }
  .modal-media { min-height: 0; aspect-ratio: 16 / 10; }
}

@media (max-width: 640px) {
  .nav-cta { display: none; }
  .principles { grid-template-columns: 1fr; }
  .skill-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services-grid { grid-template-columns: 1fr; }
  .service { min-height: 0; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-body { padding: 14px 18px 22px; }
  .hero-actions .btn { flex: 1 1 auto; }
}

@media (max-width: 430px) {
  .hero-title { font-size: clamp(2.35rem, 11.6vw, 3rem); }
  .hero-meta { gap: 14px; }
  .stat-card .lbl { font-size: 0.74rem; }
  .facts { grid-template-columns: 1fr; }
  .fact:nth-child(odd) { padding-right: 0; }
  .about-badge { top: auto; bottom: 64px; }
  .skill { padding: 14px 12px; }
  .skill-col { padding: 18px; }
  .number .val { font-size: 2.5rem; }
  .c-item { padding: 14px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 360px) {
  .brand-name { display: none; }
  .hero-actions .btn { width: 100%; }
  .skill-list { grid-template-columns: 1fr; }
  .stat-card { padding: 12px; }
}

/* Short-but-wide screens (laptops at 1280×720 etc.) */
@media (min-width: 901px) and (max-height: 780px) {
  .hero-title { font-size: clamp(2.8rem, 5.4vw, 4.8rem); }
  .hero-cards { top: 2%; gap: 10px; }
  .service-chip { padding: 12px 14px; }
  .hero-stats { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .marquee-track { animation: none; }
}
