/* =========================================================
   Fahim Hossain Khan — Luxe Portfolio
   Palette: noir ink · ivory · champagne gold
   ========================================================= */

:root {
  --ink: #0a0908;
  --ink-2: #110f0d;
  --ink-3: #1a1713;
  --ivory: #f2ece0;
  --muted: #a69e8f;
  --dim: #6f685c;
  --gold: #c9a96a;
  --gold-hi: #ecd9a8;
  --gold-lo: #8f6f35;
  --line: rgba(242, 236, 224, 0.1);
  --line-2: rgba(201, 169, 106, 0.38);

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --pad: clamp(20px, 5vw, 72px);
  --nav-h: 84px;

  --gold-grad: linear-gradient(110deg, #a9874a 0%, #d9bd84 18%, #f6e7bf 34%, #c9a96a 50%, #f1dfb0 66%, #b8955a 84%, #a9874a 100%);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 20px;
}

.contact-mail, .facts strong, .edu-facts dd, .t-when, .project-num, .gm-count, .skill-num, .loader-count, .lb-figure figcaption, .g-item figcaption { font-variant-numeric: lining-nums; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: .88em; color: var(--gold-hi); background: rgba(201,169,106,.1); padding: 1px 6px; border-radius: 4px; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; border-radius: 4px; }

.container { width: min(1360px, 100%); margin-inline: auto; padding-inline: var(--pad); position: relative; }

.gold {
  background: var(--gold-grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 7s linear infinite;
  padding-right: .06em;
}
@keyframes shimmer { from { background-position: 0% 50%; } to { background-position: -200% 50%; } }

/* ---------- Ambient layers ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 9s steps(9) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 6%); }
  40% { transform: translate(5%, -3%); }
  60% { transform: translate(-6%, -5%); }
  80% { transform: translate(3%, 7%); }
}

.page-lines {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  display: flex; justify-content: space-between;
  width: min(1360px, 100%); margin-inline: auto; padding-inline: var(--pad);
}
.page-lines span { width: 1px; height: 100%; background: linear-gradient(to bottom, transparent, rgba(242,236,224,.045) 20%, rgba(242,236,224,.045) 80%, transparent); }

main, .footer { position: relative; z-index: 1; }

.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 120;
  background: var(--gold-grad); transform-origin: left; transform: scaleX(0);
}

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200; background: var(--ink);
  display: grid; place-items: center;
  transition: clip-path 1.2s var(--ease-io);
  clip-path: inset(0 0 0 0);
}
.loader.done { clip-path: inset(0 0 100% 0); }
html:not(.js) .loader { display: none; }
.js .loader { animation: loaderFailsafe .6s 6s forwards; }
@keyframes loaderFailsafe { to { opacity: 0; visibility: hidden; } }

.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.loader-mono {
  font-family: var(--serif); font-size: clamp(72px, 12vw, 140px); line-height: .9; font-weight: 400;
  color: var(--ivory); letter-spacing: -.02em;
  animation: loaderIn 1.2s var(--ease) both;
}
.loader-mono em { color: var(--gold); }
.loader-name {
  font-size: 11px; letter-spacing: .45em; text-transform: uppercase; color: var(--muted);
  animation: loaderIn 1.2s .15s var(--ease) both;
}
.loader-count { font-family: var(--serif); font-size: 22px; color: var(--gold); font-style: italic; min-width: 3ch; text-align: center; }
.loader-bar { position: absolute; left: var(--pad); right: var(--pad); bottom: 48px; height: 1px; background: var(--line); }
.loader-bar span { position: absolute; inset: 0; background: var(--gold-grad); transform-origin: left; transform: scaleX(var(--p, 0)); }
@keyframes loaderIn { from { opacity: 0; transform: translateY(24px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- Cursor ---------- */
.cursor { display: none; }
html.has-cursor .cursor { display: block; }
html.has-cursor, html.has-cursor a, html.has-cursor button, html.has-cursor [data-lightbox] { cursor: none; }
.cursor-dot, .cursor-ring { position: fixed; left: 0; top: 0; z-index: 160; pointer-events: none; border-radius: 50%; opacity: 0; transition: opacity .3s; }
.cursor.on .cursor-dot, .cursor.on .cursor-ring { opacity: 1; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--gold-hi); }
.cursor-ring {
  width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border: 1px solid rgba(201,169,106,.55);
  display: grid; place-items: center;
  transition: opacity .3s, width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), background-color .45s, border-color .45s;
}
.cursor-label { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; color: var(--ink); opacity: 0; transform: scale(.6); transition: opacity .3s, transform .45s var(--ease); }
.cursor.hover .cursor-ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(201,169,106,.1); border-color: rgba(236,217,168,.8); }
.cursor.view .cursor-ring { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: var(--gold); border-color: transparent; }
.cursor.view .cursor-label { opacity: 1; transform: none; }
.cursor.view .cursor-dot, .cursor.hover .cursor-dot { opacity: 0; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 110;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-inline: var(--pad);
  transition: transform .7s var(--ease), background-color .5s, border-color .5s, height .5s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(10,9,8,.72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-color: var(--line); height: 68px; }
.nav.hide { transform: translateY(-100%); }
.js .nav { opacity: 0; transform: translateY(-20px); }
.js body.loaded .nav { opacity: 1; transform: none; transition: transform .7s var(--ease), opacity 1s .9s var(--ease), background-color .5s, border-color .5s, height .5s var(--ease); }
.js body.loaded .nav.hide { transform: translateY(-100%); }

.nav-logo { font-family: var(--serif); font-size: 30px; line-height: 1; letter-spacing: -.02em; }
.nav-logo em { color: var(--gold); padding: 0 2px; }
.nav-links { display: flex; gap: clamp(18px, 2.4vw, 38px); }
.nav-links a { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); position: relative; overflow: hidden; display: inline-block; height: 1.65em; transition: color .3s; }
.nav-links a span { display: block; position: relative; transition: transform .6s var(--ease); }
.nav-links a span::after { content: attr(data-text); position: absolute; left: 0; top: 100%; color: var(--gold-hi); }
.nav-links a:hover span, .nav-links a.active span { transform: translateY(-100%); }
.nav-links a.active { color: var(--ivory); }

.nav-cta {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600;
  padding: 12px 22px; border-radius: 999px; border: 1px solid var(--line-2);
  position: relative; overflow: hidden; isolation: isolate;
  transition: color .5s var(--ease), border-color .5s, transform .5s var(--ease);
}
.nav-cta::before { content: ""; position: absolute; inset: 0; background: var(--gold-grad); background-size: 200%; border-radius: inherit; transform: translateY(101%); transition: transform .6s var(--ease); z-index: -1; }
.nav-cta:hover { color: var(--ink); border-color: transparent; }
.nav-cta:hover::before { transform: none; }

.nav-toggle { display: none; width: 44px; height: 44px; position: relative; z-index: 130; }
.nav-toggle span { position: absolute; left: 10px; right: 10px; height: 1px; background: var(--ivory); transition: transform .5s var(--ease), top .5s var(--ease); }
.nav-toggle span:nth-child(1) { top: 18px; }
.nav-toggle span:nth-child(2) { top: 26px; }
body.menu-open .nav-toggle span:nth-child(1) { top: 22px; transform: rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 105; background: var(--ink-2);
  display: flex; flex-direction: column; justify-content: center; padding: 100px var(--pad) 40px;
  clip-path: circle(0% at calc(100% - 44px) 42px);
  visibility: hidden;
  transition: clip-path .9s var(--ease-io), visibility 0s .9s;
}
body.menu-open .menu { clip-path: circle(150% at calc(100% - 44px) 42px); visibility: visible; transition: clip-path .9s var(--ease-io), visibility 0s; }
.menu nav { display: flex; flex-direction: column; gap: 4px; }
.menu a { font-family: var(--serif); font-size: clamp(40px, 11vw, 72px); line-height: 1.1; display: flex; align-items: baseline; gap: 16px; opacity: 0; transform: translateY(30px); transition: opacity .6s var(--ease), transform .8s var(--ease), color .3s; }
.menu a small { font-family: var(--sans); font-size: 12px; color: var(--gold); letter-spacing: .1em; }
.menu a:hover { color: var(--gold-hi); font-style: italic; }
body.menu-open .menu a { opacity: 1; transform: none; transition-delay: calc(.25s + var(--i) * .06s); }
.menu-foot { margin-top: 40px; color: var(--muted); font-size: 13px; letter-spacing: .08em; }

/* ---------- Shared type ---------- */
.label { font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin-bottom: 22px; display: flex; align-items: center; gap: 14px; }
.label::after { content: ""; width: 56px; height: 1px; background: var(--line-2); }
.section-title { font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 7.4vw, 120px); line-height: .95; letter-spacing: -.02em; }
.section-title em { color: var(--gold-hi); font-weight: 400; }
.section-desc { color: var(--muted); max-width: 46ch; font-size: 17px; margin-top: 26px; }
.section-head { margin-bottom: clamp(48px, 7vw, 96px); }

/* Split words */
.sw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.sw-i { display: inline-block; }
.js .sw-i { transform: translateY(110%) rotate(4deg); transform-origin: left top; transition: transform 1.2s var(--ease); transition-delay: calc(var(--i) * 70ms); }
.js .in .sw-i, .js .in.sw-i { transform: none; }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(44px); transition: opacity 1.1s var(--ease), transform 1.2s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* Line masks (hero + contact) */
.line { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.line-inner { display: inline-block; }
.js .line-inner { transform: translateY(115%); transition: transform 1.4s var(--ease); }
.js .line:nth-child(2) .line-inner { transition-delay: .12s; }
.js body.loaded .hero .line-inner, .js .reveal-lines.in .line-inner { transform: none; }

.js .hero-in { opacity: 0; transform: translateY(26px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); transition-delay: var(--d, 0s); }
.js body.loaded .hero-in { opacity: 1; transform: none; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  padding: 17px 30px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  overflow: hidden; isolation: isolate;
  transition: transform .5s var(--ease), box-shadow .5s, color .5s, border-color .5s;
}
.btn i { font-style: normal; display: inline-block; transition: transform .5s var(--ease); }
.btn:hover i { transform: translate(3px, -3px) rotate(0deg); }
.btn-gold { background: var(--gold-grad); background-size: 200% 100%; color: var(--ink); box-shadow: 0 10px 40px -10px rgba(201,169,106,.5); animation: shimmer 6s linear infinite; }
.btn-gold:hover { box-shadow: 0 18px 60px -12px rgba(236,217,168,.65); }
.btn-line { border: 1px solid var(--line-2); color: var(--ivory); }
.btn-line::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--ivory); transform: scale(0); transform-origin: 50% 120%; transition: transform .6s var(--ease); z-index: -1; }
.btn-line:hover { color: var(--ink); border-color: var(--ivory); }
.btn-line:hover::before { transform: scale(1.5); }
[data-magnetic] { transition: transform .6s var(--ease), color .5s, border-color .5s, box-shadow .5s; will-change: transform; }

.text-link { display: inline-flex; gap: 10px; align-items: center; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--gold-hi); margin-top: 28px; }
.text-link span { background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat; padding-bottom: 3px; transition: background-size .6s var(--ease); }
.text-link:hover span { background-size: 0% 1px; background-position: right bottom; }
.text-link i { font-style: normal; transition: transform .5s var(--ease); }
.text-link:hover i { transform: translateX(6px); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--nav-h) + 24px) 0 0; overflow: hidden; }
.hero-glow {
  position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%;
  left: var(--gx, 65%); top: var(--gy, 40%); transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(201,169,106,.16) 0%, rgba(201,169,106,.05) 35%, transparent 65%);
  pointer-events: none; transition: left 1.6s var(--ease), top 1.6s var(--ease);
}
.hero-grid { display: grid; grid-template-columns: 1.35fr .9fr; gap: clamp(24px, 4vw, 72px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 30px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(201,169,106,.6); animation: pulse 2.4s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(201,169,106,0); } 100% { box-shadow: 0 0 0 0 rgba(201,169,106,0); } }

.hero-title { font-family: var(--serif); font-weight: 400; font-size: clamp(60px, 8.3vw, 150px); line-height: .88; letter-spacing: -.035em; margin-bottom: 30px; white-space: nowrap; position: relative; z-index: 2; }
.hero-title .line:first-child { padding-left: .02em; }
.hero-title em { font-weight: 400; }

.hero-role { font-family: var(--serif); font-size: clamp(22px, 2.3vw, 34px); color: var(--ivory); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 0 .35em; align-items: baseline; }
.rotator { display: inline-grid; font-style: italic; color: var(--gold-hi); overflow: hidden; vertical-align: bottom; padding-bottom: .08em; }
.rotator span { grid-area: 1 / 1; white-space: nowrap; transform: translateY(105%); opacity: 0; transition: transform .9s var(--ease), opacity .6s; }
.rotator span.on { transform: none; opacity: 1; }
.rotator span.out { transform: translateY(-105%); opacity: 0; }
html:not(.js) .rotator span:first-child { transform: none; opacity: 1; }

.hero-sub { color: var(--muted); max-width: 54ch; font-size: clamp(15px, 1.15vw, 17px); margin-bottom: 38px; }
.hero-sub strong { color: var(--ivory); font-weight: 500; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.hero-social { display: flex; gap: 22px; margin-left: 14px; }
.hero-social a { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); position: relative; transition: color .3s; }
.hero-social a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.hero-social a:hover { color: var(--ivory); }
.hero-social a:hover::after { transform: scaleX(1); transform-origin: left; }

.hero-visual { position: relative; justify-self: center; width: min(100%, 440px); }
.arch-wrap { position: relative; will-change: transform; }
.arch-wrap::before {
  content: ""; position: absolute; inset: -16px; border: 1px solid var(--line-2);
  border-radius: 999px 999px 28px 28px; pointer-events: none;
}
.arch-wrap::after {
  content: ""; position: absolute; inset: -32px; border: 1px solid rgba(201,169,106,.14);
  border-radius: 999px 999px 36px 36px; pointer-events: none;
}
.arch { position: relative; aspect-ratio: 4 / 5.3; border-radius: 999px 999px 22px 22px; overflow: hidden; background: var(--ink-3); }
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; transform: scale(1.08); transition: transform 2.4s var(--ease); filter: saturate(.9) contrast(1.04); }
.arch::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,9,8,.55), transparent 40%), linear-gradient(120deg, rgba(201,169,106,.18), transparent 50%); mix-blend-mode: normal; }
.js .arch { clip-path: inset(100% 0 0 0 round 999px 999px 22px 22px); transition: clip-path 1.6s .25s var(--ease-io); }
.js body.loaded .arch { clip-path: inset(0 0 0 0 round 999px 999px 22px 22px); }
.js body.loaded .arch img { transform: scale(1); }
.arch-wrap:hover img { transform: scale(1.04); }

.badge-ring { position: absolute; width: 150px; height: 150px; left: -60px; bottom: 54px; display: grid; place-items: center; border-radius: 50%; background: rgba(10,9,8,.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--line); }
.badge-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 22s linear infinite; }
.badge-ring text { font-family: var(--sans); font-size: 11.6px; font-weight: 600; letter-spacing: 3.2px; fill: var(--gold-hi); }
.badge-star { font-size: 24px; color: var(--gold); animation: spin 8s linear infinite reverse; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.js .badge-ring { opacity: 0; transform: scale(.6) rotate(-40deg); transition: opacity 1s 1.2s, transform 1.4s 1.2s var(--ease); }
.js body.loaded .badge-ring { opacity: 1; transform: none; }

.float-tag {
  position: absolute; display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 999px; font-size: 12px; letter-spacing: .06em; white-space: nowrap;
  background: rgba(17,15,13,.72); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.8);
}
.float-tag b { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.float-tag.t1 { top: 12%; right: -44px; animation: float 6s ease-in-out infinite; }
.float-tag.t2 { top: 52%; right: -70px; animation: float 7s -2s ease-in-out infinite; }
.float-tag.t3 { bottom: 6%; right: -20px; animation: float 6.5s -4s ease-in-out infinite; }
@keyframes float { 50% { translate: 0 -12px; } }

.hero-meta { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 24px; margin-top: clamp(40px, 7vh, 80px); padding-top: 22px; padding-bottom: 28px; border-top: 1px solid var(--line); align-items: center; font-size: 14px; }
.hero-meta span { display: block; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); margin-bottom: 2px; }
.scroll-cue { width: 46px; height: 70px; border: 1px solid var(--line-2); border-radius: 999px; position: relative; display: block; }
.scroll-cue span { position: absolute; left: 50%; top: 12px; width: 2px; height: 14px; margin-left: -1px; background: var(--gold); border-radius: 2px; animation: cue 2s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(30px); opacity: 0; } }

/* ---------- Marquee ---------- */
.marquee { position: relative; z-index: 1; padding: clamp(30px, 5vw, 60px) 0; border-block: 1px solid var(--line); overflow: hidden; background: linear-gradient(180deg, transparent, rgba(201,169,106,.03), transparent); }
.marquee-skew { will-change: transform; transition: transform .3s; }
.marquee-row { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee-row.rev { animation-direction: reverse; animation-duration: 56s; margin-top: 10px; }
.marquee-group { display: flex; align-items: center; gap: clamp(22px, 3vw, 46px); padding-right: clamp(22px, 3vw, 46px); }
.marquee-group span { font-family: var(--serif); font-style: italic; font-size: clamp(38px, 5.6vw, 88px); line-height: 1.1; white-space: nowrap; color: var(--ivory); }
.marquee-group i { font-style: normal; color: var(--gold); font-size: clamp(18px, 2vw, 30px); }
.marquee .outline span { font-family: var(--sans); font-style: normal; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: clamp(20px, 2.8vw, 42px); color: transparent; -webkit-text-stroke: 1px rgba(242,236,224,.3); }
.marquee .outline i { color: var(--dim); }
.marquee:hover .marquee-row { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- About ---------- */
.about { padding-top: clamp(100px, 14vw, 200px); padding-bottom: clamp(80px, 10vw, 150px); }
.manifesto { font-family: var(--serif); font-size: clamp(32px, 4.6vw, 72px); line-height: 1.12; letter-spacing: -.015em; max-width: 20ch; max-width: 1100px; }
.manifesto em { color: var(--gold-hi); }
.manifesto .w { opacity: .14; transition: opacity .5s var(--ease); }
.manifesto .w.on { opacity: 1; }
html:not(.js) .manifesto .w { opacity: 1; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 48px); margin-top: clamp(80px, 10vw, 140px); }
.stat { position: relative; padding-top: 28px; }
.stat::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); }
.stat::after { content: ""; position: absolute; left: 0; top: 0; height: 1px; width: 100%; background: var(--gold-grad); transform: scaleX(0); transform-origin: left; transition: transform 1.6s .3s var(--ease); }
.stat.in::after { transform: scaleX(1); }
html:not(.js) .stat::after { transform: scaleX(1); }
.stat-num { font-family: var(--serif); font-size: clamp(52px, 5.6vw, 88px); line-height: 1; letter-spacing: -.02em; background: var(--gold-grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 9s linear infinite; font-variant-numeric: lining-nums tabular-nums; }
.stat-num small { font-size: .42em; letter-spacing: 0; margin-left: 4px; }
.stat-unit { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--ivory); margin: 14px 0 8px; font-weight: 600; }
.stat p { color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 28ch; }

/* ---------- Work: stacked cards ---------- */
.work { padding-top: clamp(60px, 8vw, 120px); padding-bottom: clamp(60px, 8vw, 100px); }
.stack { display: flex; flex-direction: column; gap: 40px; }
.project-card {
  position: relative; display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(28px, 4vw, 64px); align-items: center;
  padding: clamp(26px, 3.6vw, 56px);
  border-radius: 30px; border: 1px solid var(--line);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(201,169,106,.09), transparent 55%),
    linear-gradient(160deg, #17140f 0%, #0f0d0b 60%, #0c0b09 100%);
  box-shadow: 0 -24px 60px -20px rgba(0,0,0,.7), inset 0 1px 0 rgba(236,217,168,.08);
  overflow: hidden; transform-origin: 50% 0;
}
.project-card::after { content: ""; position: absolute; inset: 0; background: #050404; opacity: var(--dim, 0); pointer-events: none; border-radius: inherit; }
.project-card::before { content: ""; position: absolute; left: 8%; right: 8%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .6; }

.project-top { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.project-num { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--gold); }
.project-year { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 16px; }
.project-year::before { content: ""; width: 34px; height: 1px; background: var(--line-2); }
.project-info h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 5vw, 80px); line-height: .95; letter-spacing: -.02em; }
.project-kicker { font-family: var(--serif); font-style: italic; color: var(--gold-hi); font-size: clamp(19px, 1.6vw, 24px); margin: 8px 0 20px; }
.project-info > p:not(.project-kicker) { color: var(--muted); font-size: 15px; line-height: 1.7; margin-bottom: 12px; max-width: 56ch; }

.facts { display: flex; gap: clamp(18px, 2.4vw, 36px); margin: 22px 0; padding: 18px 0; border-block: 1px solid var(--line); }
.facts li { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); display: flex; flex-direction: column; gap: 4px; }
.facts strong { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 2.4vw, 36px); letter-spacing: 0; text-transform: none; color: var(--ivory); line-height: 1; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills li { font-size: 12px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--ivory); background: rgba(242,236,224,.02); transition: border-color .4s, background-color .4s, color .4s; }
.pills li:hover { border-color: var(--line-2); background: rgba(201,169,106,.08); color: var(--gold-hi); }

.project-visual { position: relative; height: clamp(360px, 46vh, 520px); perspective: 1200px; }
.tilt { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .8s var(--ease); }

/* phones */
.phone { position: absolute; top: 50%; left: 50%; width: clamp(150px, 13vw, 200px); aspect-ratio: 495 / 1024; border-radius: 28px; padding: 6px; background: linear-gradient(145deg, #2a251e, #0d0b09); border: 1px solid rgba(236,217,168,.22); box-shadow: 0 40px 80px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(0,0,0,.6); transition: transform 1s var(--ease); }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 22px; }
.phone.p1 { transform: translate(-50%, -50%) translateX(-72%) rotate(-9deg) scale(.9); z-index: 1; }
.phone.p2 { transform: translate(-50%, -50%) translateY(-2%); z-index: 3; }
.phone.p3 { transform: translate(-50%, -50%) translateX(72%) rotate(9deg) scale(.9); z-index: 2; }
.visual-phones:hover .phone.p1 { transform: translate(-50%, -50%) translateX(-92%) rotate(-13deg) scale(.92); }
.visual-phones:hover .phone.p3 { transform: translate(-50%, -50%) translateX(92%) rotate(13deg) scale(.92); }
.visual-phones:hover .phone.p2 { transform: translate(-50%, -50%) translateY(-6%) scale(1.04); }

/* browser frames */
.browser { position: absolute; border-radius: 14px; overflow: hidden; background: #121110; border: 1px solid rgba(236,217,168,.16); box-shadow: 0 40px 80px -30px rgba(0,0,0,.95); transition: transform 1s var(--ease); }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #1b1815; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a342c; }
.browser-bar i:first-child { background: var(--gold); }
.browser-bar span { margin-left: 10px; font-size: 11px; color: var(--muted); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser img { width: 100%; height: auto; }
.visual-browser .back { width: 82%; left: 0; top: 6%; opacity: .75; transform: rotate(-3deg); }
.visual-browser .front { width: 86%; right: 0; bottom: 6%; z-index: 2; }
.visual-browser:hover .back { transform: rotate(-5deg) translate(-10px, -12px); opacity: .9; }
.visual-browser:hover .front { transform: translate(8px, 8px) scale(1.02); }
.crop { aspect-ratio: 1448 / 996; overflow: hidden; }
.crop img { width: 200%; max-width: none; height: auto; }
.crop.right img { margin-left: -100%; }
.visual-wide .back { width: 66%; left: 0; top: 2%; opacity: .8; transform: rotate(-2.5deg); }
.visual-wide .front { width: 70%; right: 0; bottom: 2%; z-index: 2; }
.visual-wide:hover .back { transform: rotate(-4deg) translate(-10px, -10px); opacity: .95; }
.visual-wide:hover .front { transform: translate(8px, 8px) scale(1.02); }

/* vinyl */
.visual-vinyl { display: grid; place-items: center; }
.vinyl { position: relative; z-index: 2; width: min(78%, 400px); aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 31%, rgba(0,0,0,0) 31%),
    repeating-radial-gradient(circle, #121110 0 1.5px, #1c1a17 1.5px 3px);
  box-shadow: 0 50px 90px -30px rgba(0,0,0,.95), inset 0 0 0 10px #0b0a09, 0 0 0 1px rgba(236,217,168,.12);
  display: grid; place-items: center; animation: spin 7s linear infinite; transition: transform 1.2s var(--ease);
}
.vinyl::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 8%, rgba(255,240,210,.12) 12%, transparent 18% 50%, rgba(255,240,210,.1) 62%, transparent 68%); }
.vinyl-label { position: relative; z-index: 1; width: 34%; aspect-ratio: 1; border-radius: 50%; background: var(--gold-grad); background-size: 200% 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink); box-shadow: inset 0 0 0 4px rgba(0,0,0,.12); }
.vinyl-label::after { content: ""; position: absolute; width: 8%; aspect-ratio: 1; border-radius: 50%; background: var(--ink); }
.vinyl-label span { font-size: 10px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; transform: translateY(-120%); }
.vinyl-label em { font-family: var(--serif); font-size: clamp(16px, 1.6vw, 22px); transform: translateY(60%); }
.cd { position: absolute; z-index: 1; width: min(56%, 290px); aspect-ratio: 1; border-radius: 50%; left: 50%; top: 50%; transform: translate(-10%, -62%);
  background:
    radial-gradient(circle, #0a0908 0 9%, rgba(255,255,255,.5) 9% 10%, transparent 10% 30%, rgba(255,255,255,.05) 30%),
    conic-gradient(from 30deg, #d8c9a8, #9fb3c8, #c8a7c9, #e8d7a6, #a8c8b8, #c4b1d6, #d8c9a8);
  opacity: .85; box-shadow: 0 30px 60px -20px rgba(0,0,0,.9); animation: spin 11s linear infinite reverse; transition: transform 1.2s var(--ease);
}
.visual-vinyl:hover .vinyl { transform: translateX(-12%); }
.visual-vinyl:hover .cd { left: 62%; }
.cd { transition: left 1.2s var(--ease); }

/* ---------- Gallery ---------- */
.gallery { position: relative; padding: clamp(60px, 8vw, 100px) 0; }
.gallery-sticky { overflow: hidden; }
.gallery-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: clamp(30px, 5vh, 56px); }
.gallery-meter { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; min-width: 240px; }
.gm-count { font-family: var(--serif); font-size: 22px; color: var(--muted); }
.gm-count b { color: var(--gold-hi); font-weight: 500; font-size: 34px; }
.gm-bar { width: 240px; height: 1px; background: var(--line); position: relative; }
.gm-bar span { position: absolute; inset: 0; background: var(--gold-grad); transform-origin: left; transform: scaleX(var(--gp, .11)); }
.gm-hint { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.gallery-track { display: flex; gap: clamp(18px, 2vw, 32px); padding-inline: var(--pad); width: max-content; align-items: flex-start; will-change: transform; }
.g-item { flex: none; cursor: zoom-in; outline-offset: 6px; }
.g-media { height: clamp(260px, 52vh, 540px); border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--ink-3); position: relative; }
.g-media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(236,217,168,.06); background: linear-gradient(to top, rgba(10,9,8,.35), transparent 30%); pointer-events: none; transition: opacity .6s; }
.g-media img { height: 100%; width: auto; max-width: none; transition: transform 1.2s var(--ease), filter .8s; filter: saturate(.92); }
.g-item:hover .g-media img { transform: scale(1.05); filter: saturate(1.05); }
.g-item:hover .g-media::after { opacity: 0; }
.g-item figcaption { display: flex; align-items: baseline; gap: 12px; margin-top: 16px; font-family: var(--serif); font-size: 22px; }
.g-item figcaption b { font-family: var(--sans); font-size: 11px; color: var(--gold); letter-spacing: .14em; font-weight: 600; }
.g-item figcaption span { font-family: var(--sans); font-size: 13px; color: var(--muted); }

.gallery.pinned { padding: 0; }
.gallery.pinned .gallery-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; }

/* ---------- Expertise ---------- */
.expertise { padding-top: clamp(80px, 10vw, 160px); padding-bottom: clamp(60px, 8vw, 120px); }
.skill-list { border-bottom: 1px solid var(--line); }
.skill-row { position: relative; display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1.35fr); gap: 28px; align-items: start; padding: clamp(28px, 3.4vw, 46px) 0; border-top: 1px solid var(--line); }
.skill-row::after { content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 100%; background: var(--gold-grad); transform: scaleX(0); transform-origin: left; transition: transform 1s var(--ease); }
.skill-row:hover::after { transform: scaleX(1); }
.skill-num { font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--gold); padding-top: 6px; }
.skill-row h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.2vw, 52px); line-height: 1.05; letter-spacing: -.01em; transition: transform .8s var(--ease), color .6s; }
.skill-row:hover h3 { transform: translateX(14px); color: var(--gold-hi); font-style: italic; }
.skill-row .pills { padding-top: 10px; }

/* ---------- Experience ---------- */
.experience { padding-top: clamp(80px, 10vw, 150px); padding-bottom: clamp(60px, 8vw, 120px); }
.timeline { --tl-line: clamp(6px, 1.6vw, 24px); --tl-pad: clamp(34px, 5.5vw, 90px); position: relative; padding-left: var(--tl-pad); }
.timeline-line { position: absolute; left: var(--tl-line); top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.timeline-line span { position: absolute; inset: 0; background: linear-gradient(var(--gold-hi), var(--gold), var(--gold-lo)); transform-origin: top; transform: scaleY(var(--tp, 0)); }
.t-item { position: relative; display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: clamp(20px, 4vw, 60px); padding: 10px 0 clamp(50px, 6vw, 80px); }
.t-item::before { content: ""; position: absolute; left: calc(var(--tl-line) - var(--tl-pad) - 6px); top: 18px; width: 13px; height: 13px; border-radius: 50%; background: var(--ink); border: 1px solid var(--gold); box-shadow: 0 0 0 6px var(--ink), 0 0 22px rgba(201,169,106,.5); }
.t-when { font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--gold-hi); padding-top: 6px; }
.t-head { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; }
.t-logo { width: 64px; height: 64px; border-radius: 16px; border: 1px solid var(--line-2); object-fit: cover; flex: none; background: #000; }
.t-logo-mono { display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: 28px; color: var(--gold-hi); background: radial-gradient(circle at 30% 20%, rgba(201,169,106,.22), #0f0d0b 70%); }
.t-head h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 2.8vw, 42px); line-height: 1.05; }
.t-where { color: var(--muted); font-size: 13px; letter-spacing: .06em; margin-top: 6px; }
.t-list { display: grid; gap: 12px; max-width: 70ch; }
.t-list li { position: relative; padding-left: 26px; color: var(--muted); font-size: 15.5px; }
.t-list li::before { content: "✦"; position: absolute; left: 0; top: 1px; color: var(--gold); font-size: 11px; }
.t-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 30px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--line); max-width: 760px; }
.t-stats div { background: linear-gradient(170deg, #15120f, #0e0c0a); padding: 20px 18px; }
.t-stats strong { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 2.6vw, 40px); line-height: 1; background: var(--gold-grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: lining-nums tabular-nums; }
.t-stats span { display: block; margin-top: 8px; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }

/* ---------- Education ---------- */
.education { padding-top: clamp(60px, 8vw, 120px); padding-bottom: clamp(80px, 10vw, 150px); }
.edu-card { display: grid; grid-template-columns: auto 1fr; gap: clamp(30px, 5vw, 80px); align-items: center; padding: clamp(30px, 4.5vw, 70px); border-radius: 30px; border: 1px solid var(--line); background: radial-gradient(90% 120% at 0% 0%, rgba(201,169,106,.1), transparent 55%), linear-gradient(160deg, #15120f, #0d0b09); position: relative; overflow: hidden; }
.edu-card::before { content: "NSU"; position: absolute; right: -2%; bottom: -18%; font-family: var(--serif); font-size: clamp(140px, 22vw, 340px); line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(201,169,106,.09); pointer-events: none; font-style: italic; }
.edu-crest { position: relative; width: clamp(120px, 13vw, 180px); aspect-ratio: 1; display: grid; place-items: center; }
.edu-crest svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--gold); stroke-width: .6; stroke-dasharray: 4 6; animation: spin 40s linear infinite; }
.edu-crest svg circle:last-child { stroke-dasharray: none; stroke: var(--line-2); }
.edu-crest span { font-family: var(--serif); font-size: clamp(34px, 3.6vw, 52px); color: var(--gold-hi); font-style: italic; }
.edu-main h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4.2vw, 64px); line-height: 1; letter-spacing: -.01em; }
.edu-degree { color: var(--muted); margin-top: 10px; font-size: 16px; }
.edu-facts { display: flex; flex-wrap: wrap; gap: clamp(24px, 4vw, 60px); margin: 28px 0; padding: 20px 0; border-block: 1px solid var(--line); }
.edu-facts dt { font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); }
.edu-facts dd { font-family: var(--serif); font-size: clamp(26px, 2.4vw, 36px); line-height: 1.1; margin-top: 4px; }
.edu-facts dd small { font-size: .55em; color: var(--muted); }
.edu-course-label { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }

.edu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 32px); margin-top: clamp(18px, 2.4vw, 32px); }
.edu-mini { position: relative; overflow: hidden; padding: clamp(26px, 3.2vw, 48px); border-radius: 26px; border: 1px solid var(--line); background: radial-gradient(90% 120% at 100% 0%, rgba(201,169,106,.08), transparent 55%), linear-gradient(160deg, #15120f, #0d0b09); transition: border-color .6s, box-shadow .8s var(--ease); }
.edu-mini::before { content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .55; }
.edu-mini::after { content: attr(data-mark); position: absolute; right: -2%; bottom: -16%; font-family: var(--serif); font-style: italic; font-size: clamp(110px, 12vw, 190px); line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(201,169,106,.09); pointer-events: none; transition: -webkit-text-stroke-color .8s; }
.edu-mini:hover { border-color: var(--line-2); box-shadow: 0 30px 70px -40px rgba(201,169,106,.35); }
.edu-mini:hover::after { -webkit-text-stroke-color: rgba(201,169,106,.22); }
.edu-mini-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.edu-level { width: 60px; height: 60px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--gold-hi); background: radial-gradient(circle at 30% 20%, rgba(201,169,106,.18), transparent 70%); }
.edu-when { font-family: var(--serif); font-style: italic; font-size: clamp(17px, 1.5vw, 21px); color: var(--gold-hi); font-variant-numeric: lining-nums; text-align: right; }
.edu-mini h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 2.8vw, 42px); line-height: 1.05; letter-spacing: -.01em; }
.edu-result { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 10px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.edu-result span { margin-right: auto; font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); }
.edu-result strong { font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 3.4vw, 50px); line-height: 1; background: var(--gold-grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 9s linear infinite; font-variant-numeric: lining-nums tabular-nums; }
.edu-result small { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- Contact ---------- */
.contact { position: relative; padding: clamp(110px, 14vw, 200px) 0 clamp(80px, 10vw, 140px); border-top: 1px solid var(--line); overflow: hidden; }
.contact-glow { position: absolute; left: 50%; bottom: -40vmax; width: 90vmax; height: 70vmax; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(201,169,106,.2), rgba(201,169,106,.05) 55%, transparent); pointer-events: none; animation: breathe 9s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateX(-50%) scale(1.12); opacity: .8; } }
.contact-title { font-family: var(--serif); font-weight: 400; font-size: clamp(54px, 9.6vw, 168px); line-height: .9; letter-spacing: -.035em; }
.contact-title em { font-weight: 400; }
.contact-sub { color: var(--muted); font-size: clamp(16px, 1.3vw, 19px); margin-top: 34px; max-width: 48ch; }
.contact-mail { display: inline-flex; align-items: center; gap: 18px; margin-top: 46px; font-family: var(--serif); font-size: clamp(30px, 4.4vw, 68px); line-height: 1.1; color: var(--ivory); position: relative; padding-bottom: 8px; }
.contact-mail::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold-grad); transform-origin: left; transition: transform .8s var(--ease); }
.contact-mail:hover::after { transform: scaleX(0); transform-origin: right; }
.contact-mail i { font-style: normal; font-size: .6em; color: var(--gold); transition: transform .6s var(--ease); }
.contact-mail:hover i { transform: translate(6px, -6px) rotate(45deg); }
.contact-mail:hover span { font-style: italic; }
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: clamp(60px, 8vw, 110px); }
.contact-grid > * { display: block; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; transition: border-color .5s, color .4s; }
.contact-grid > a:hover { border-color: var(--gold); color: var(--gold-hi); }
.contact-grid span { display: block; font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.contact-grid time { font-variant-numeric: tabular-nums; }

/* ---------- Footer ---------- */
.footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 30px; padding-bottom: 36px; border-top: 1px solid var(--line); font-size: 12px; letter-spacing: .1em; color: var(--dim); }
.footer-mid { text-transform: uppercase; letter-spacing: .2em; font-size: 11px; }
.to-top { text-transform: uppercase; letter-spacing: .2em; font-size: 11px; color: var(--muted); display: inline-flex; gap: 10px; align-items: center; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; transition: color .4s, border-color .4s, transform .6s var(--ease); }
.to-top:hover { color: var(--gold-hi); border-color: var(--line-2); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 180; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; padding: 40px clamp(12px, 3vw, 40px); background: rgba(6,5,4,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility 0s .5s; }
.lightbox.open { opacity: 1; visibility: visible; transition: opacity .5s var(--ease), visibility 0s; }
.lb-figure { display: flex; flex-direction: column; align-items: center; gap: 18px; min-width: 0; }
.lb-figure img { max-width: 100%; max-height: 80vh; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 40px 100px -30px #000; transform: scale(.94) translateY(14px); opacity: 0; transition: transform .7s var(--ease), opacity .5s; }
.lightbox.open .lb-figure img.ready { transform: none; opacity: 1; }
.lb-figure figcaption { display: flex; gap: 18px; align-items: baseline; color: var(--muted); font-size: 14px; }
.lb-figure figcaption span:first-child { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--gold-hi); }
.lb-close { position: absolute; top: 22px; right: 26px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 16px; transition: transform .6s var(--ease), background-color .4s, color .4s; }
.lb-close:hover { transform: rotate(90deg); background: var(--gold); color: var(--ink); }
.lb-nav { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 18px; transition: background-color .4s, color .4s, transform .5s var(--ease); }
.lb-nav:hover { background: var(--gold); color: var(--ink); }
.lb-prev:hover { transform: translateX(-4px); }
.lb-next:hover { transform: translateX(4px); }

/* =========================================================
   Responsive
   ========================================================= */
@media (min-width: 1024px) and (min-height: 700px) {
  .project { position: sticky; top: calc(96px + var(--i) * 22px); }
  .stack { gap: 12vh; padding-bottom: 6vh; }
  .project-card { min-height: min(80vh, 680px); }
}

@media (max-width: 1100px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .float-tag.t2 { right: -30px; }
}

@media (max-width: 1023px) {
  .project-card { grid-template-columns: 1fr; }
  .project-visual { height: clamp(320px, 70vw, 460px); order: -1; }
  .phone { width: clamp(130px, 26vw, 190px); }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 56px; }
  .skill-row { grid-template-columns: 60px 1fr; }
  .skill-row .pills { grid-column: 2; padding-top: 0; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  :root { --nav-h: 72px; }
  .hero { padding-top: calc(var(--nav-h) + 20px); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; width: min(56vw, 250px); margin: 18px auto 34px; }
  .eyebrow { font-size: 11px; letter-spacing: .16em; margin-bottom: 22px; }
  .badge-ring { width: 112px; height: 112px; left: -34px; bottom: 20px; }
  .badge-ring text { font-size: 11.6px; }
  .float-tag { display: none; }
  .hero-title { font-size: clamp(44px, 14.5vw, 110px); }
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .hero-meta .scroll-cue { display: none; }
  .hero-social { margin-left: 4px; width: 100%; margin-top: 10px; }
  .gallery-head { flex-direction: column; align-items: flex-start; }
  .gallery-meter { align-items: flex-start; }
  .gallery:not(.pinned) .gallery-track { overflow-x: auto; scroll-snap-type: x mandatory; width: auto; padding-bottom: 14px; scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }
  .gallery:not(.pinned) .gallery-track { scroll-padding-inline: var(--pad); }
  .gallery:not(.pinned) .g-item { scroll-snap-align: start; }
  .g-media { height: clamp(240px, 62vw, 420px); }
  .t-item { grid-template-columns: 1fr; gap: 8px; }
  .t-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .edu-card { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .lightbox { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; }
  .lb-figure { grid-column: 1 / -1; grid-row: 1; }
  .lb-prev { justify-self: end; grid-row: 2; }
  .lb-next { justify-self: start; grid-row: 2; }
}

@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 40px 18px; }
  .stat-num { font-size: 46px; }
  .facts { gap: 18px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer { flex-direction: column; align-items: flex-start; }
  .page-lines span:nth-child(2), .page-lines span:nth-child(4) { display: none; }
  .btn { padding: 15px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js .reveal, .js .hero-in, .js .nav { opacity: 1; transform: none; }
  .js .line-inner, .js .sw-i { transform: none; }
  .js .arch { clip-path: none; }
  .manifesto .w { opacity: 1; }
  .grain { display: none; }
}
