/* Syed Rayan Iftekhar — portfolio */

@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-tight-full-wght.woff2') format('woff2-variations'), url('../fonts/inter-tight-full-wght.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations'), url('../fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --bg: #141312;
  --panel: #1a1918;
  --story: #181716;
  --paper: #22201e;
  --ink: #ede8e2;
  --ink-2: #aaa39b;
  --ink-3: #958f88;
  --line: rgba(237, 232, 226, 0.1);
  --line-2: rgba(237, 232, 226, 0.2);
  --footer: #0c0b0b;
  --footer-ink: #ece8e3;
  --c-agents: #4f7bd6;
  --c-voice: #e0644b;
  --c-rag: #e8b94a;
  --c-auto: #3fa58b;
  --live: #6cc47c;
  --matte: #0e0e0e;
  --maxw: 1232px;
  --pad: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: 'Inter Tight', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.055 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: 'cv08';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--ink); color: var(--bg); }

.container { width: min(100% - 2 * var(--pad), var(--maxw)); margin-inline: auto; }
.sr-only { position: absolute !important; 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; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); text-decoration: none; }
.skip-link:focus { top: 14px; }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.dot--live { background: var(--live); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(108, 196, 124, 0.55); }
  80%, 100% { box-shadow: 0 0 0 9px rgba(108, 196, 124, 0); }
}

.eyebrow__link { font-weight: 650; color: var(--ink); text-decoration: underline; text-decoration-color: var(--c-voice); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.eyebrow__link:hover { color: var(--c-voice); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn__arrow { display: grid; place-items: center; width: 38px; height: 38px; margin-right: -16px; border-radius: 50%; transition: transform 0.35s var(--ease); }
.btn__arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--dark { background: var(--ink); color: var(--bg); }
.btn--dark .btn__arrow { background: var(--bg); color: var(--ink); }
.btn--ghost { border: 1px solid var(--line-2); color: var(--ink); }
.btn--ghost:hover { background: var(--paper); border-color: var(--ink-3); }
.btn--light { background: var(--footer-ink); color: #1c1b1a; }
.btn--light .btn__arrow { background: #1c1b1a; color: var(--footer-ink); }
.btn--ghost-light { border: 1px solid rgba(236, 232, 227, 0.22); color: var(--footer-ink); }
.btn--ghost-light:hover { border-color: rgba(236, 232, 227, 0.6); }

/* ---------- Header ---------- */
.hdr { position: fixed; inset: 0 0 auto; z-index: 50; transition: background-color 0.35s, box-shadow 0.35s; }
.hdr__inner { position: relative; display: flex; align-items: center; gap: 20px; height: 88px; transition: height 0.35s var(--ease); }
.hdr.is-scrolled { background: color-mix(in srgb, var(--bg) 84%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 1px 0 var(--line); }
.hdr.is-scrolled .hdr__inner { height: 66px; }
.hdr__brand { display: none; position: relative; z-index: 2; font-size: 21px; font-weight: 700; letter-spacing: -0.03em; text-decoration: none; }
.hdr__brand span { color: var(--c-voice); }
.nav { display: flex; gap: 2px; margin-left: -12px; margin-right: auto; }
.nav a { padding: 7px 12px; border-radius: 999px; font-size: 16px; color: var(--ink-2); text-decoration: none; transition: color 0.2s, background-color 0.2s; }
.nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.clock { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.clock__time { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.clock__sep { font-size: 10px; }
.menu-btn { display: none; position: relative; z-index: 2; height: 40px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 999px; background: color-mix(in srgb, var(--paper) 60%, transparent); font-size: 15px; font-weight: 600; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: 0 12px; }
.hero__frame { position: relative; display: flex; flex-direction: column; min-height: max(700px, 100vh); min-height: max(700px, 100svh); border-radius: 0 0 36px 36px; background: radial-gradient(60% 65% at 76% 38%, rgba(255, 255, 255, 0.06), transparent 70%), var(--panel); overflow: hidden; }
.hero__grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 24px; padding-top: 110px; }
.hero__text { align-self: center; padding-bottom: 40px; }
.hero__title { margin-top: 26px; font-size: clamp(3rem, 6.4vw, 5.9rem); font-weight: 650; line-height: 1; letter-spacing: -0.03em; }
.hero__hi, .hero__build { display: block; }
.hero__build { color: var(--ink-3); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.hero__figure { position: relative; align-self: end; display: flex; justify-content: center; }
.hero__img { width: auto; height: min(68vh, 620px); max-width: none; object-fit: contain; object-position: bottom; user-select: none; -webkit-user-drag: none; }
.hero__bar { display: flex; justify-content: space-between; align-items: center; height: 58px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.hero__bar a { text-decoration: none; }
.hero__bar a:hover { color: var(--ink); }

/* Flip calendar */
.flip { position: relative; width: min(100%, 620px); margin-top: 30px; perspective: 1400px; }
.flip__pad { position: relative; height: clamp(104px, 10.4vw, 150px); }
.flip__pad::before, .flip__pad::after { content: ''; position: absolute; left: 6px; right: 6px; border-radius: 16px; background: color-mix(in srgb, var(--paper) 92%, #000); box-shadow: 0 1px 0 var(--line-2); }
.flip__pad::before { top: 7px; bottom: -7px; }
.flip__pad::after { top: 14px; bottom: -13px; left: 12px; right: 12px; opacity: 0.8; box-shadow: 0 24px 40px -18px rgba(0, 0, 0, 0.45); }
.flip__page { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; padding: 10px 34px 0; border-radius: 16px; background: var(--paper); box-shadow: inset 0 -1px 0 var(--line), 0 1px 2px rgba(0, 0, 0, 0.06); transform-origin: 50% 0; backface-visibility: hidden; }
.flip__page--cur { z-index: 2; }
.flip__page--next::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(0, 0, 0, 0.14), transparent 70%); opacity: 0; }
.flip__word { font-size: clamp(2.5rem, 5.3vw, 4.6rem); font-weight: 700; line-height: 1; letter-spacing: -0.03em; white-space: nowrap; }
.flip.is-flipping .flip__page--cur { animation: page-flip 0.7s cubic-bezier(0.5, 0, 0.35, 1) forwards; }
.flip.is-flipping .flip__page--next::after { animation: page-shade 0.7s ease forwards; }
@keyframes page-flip {
  0% { transform: rotateX(0); }
  100% { transform: rotateX(118deg); opacity: 0.2; }
}
@keyframes page-shade { 0% { opacity: 1; } 100% { opacity: 0; } }
.flip__rings { position: absolute; z-index: 3; top: -13px; left: 30px; right: 30px; display: flex; justify-content: space-between; pointer-events: none; }
.flip__rings i { position: relative; width: 9px; height: 27px; border-radius: 6px; background: linear-gradient(90deg, #7d7f84, #f4f4f5 45%, #a3a5aa 75%, #6f7176); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3); }
.flip__rings i::after { content: ''; position: absolute; left: 50%; bottom: -4px; width: 12px; height: 7px; transform: translateX(-50%); border-radius: 50%; background: rgba(0, 0, 0, 0.28); z-index: -1; }
.flip__count { position: absolute; z-index: 3; right: 18px; bottom: 12px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; color: var(--ink-3); }

/* ---------- Work ---------- */
.work { position: relative; padding: clamp(110px, 12vw, 170px) 0 clamp(90px, 10vw, 140px); }
.work__head { text-align: center; }
.work__title { margin-top: 18px; font-size: clamp(3rem, 7vw, 6.2rem); font-weight: 700; line-height: 1; letter-spacing: -0.035em; }
.work__lead { max-width: 40ch; margin: 18px auto 0; font-size: 18.5px; color: var(--ink-2); }
.studio { display: flex; align-items: center; gap: 18px; max-width: 880px; margin: 44px auto 0; padding: 14px 16px 14px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--paper); box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.35); }
.studio__mark { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 21px; font-weight: 800; letter-spacing: -0.04em; }
.studio__text { flex: 1; font-size: 16.5px; line-height: 1.45; color: var(--ink-2); }
.studio__text b { color: var(--ink); font-weight: 650; }
.studio__link { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 18px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 600; text-decoration: none; transition: transform 0.3s var(--ease); }
.studio__link:hover { transform: translateX(3px); }

/* Project cards (black matte) */
.deck { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: clamp(40px, 5vw, 60px); }
.card {
  --mx: 30%;
  --my: 0%;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 26px;
  background: var(--noise), linear-gradient(165deg, #171717, var(--matte) 62%);
  color: #ece8e3;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 34px 60px -36px rgba(0, 0, 0, 0.95);
  transition: border-color 0.3s, transform 0.45s var(--ease);
}
.card::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: radial-gradient(520px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.075), transparent 46%); opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.card:hover { border-color: rgba(255, 255, 255, 0.15); }
.card:hover::before { opacity: 1; }
.card:has(.card__btn:focus-visible) { outline: 2px solid #ece8e3; outline-offset: 3px; }
.card__top { display: flex; justify-content: space-between; align-items: flex-start; }
.card__num { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; color: rgba(236, 232, 227, 0.6); }
.card__num::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 70%, transparent); }
.card__icon { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; background: rgba(255, 255, 255, 0.035); }
.card__icon svg { width: 24px; height: 24px; fill: none; stroke: #ece8e3; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card__title { margin-top: auto; padding-top: 44px; font-size: clamp(2rem, 3.4vw, 2.9rem); font-weight: 650; line-height: 1.02; letter-spacing: -0.03em; }
.card__btn { padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; }
.card__btn::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card__btn:focus-visible { outline: none; }
.card__sum { max-width: 36ch; margin-top: 12px; font-size: 16.5px; line-height: 1.5; color: rgba(236, 232, 227, 0.64); }
.card__meta { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(236, 232, 227, 0.6); }
.card__open { display: none; align-items: center; gap: 10px; color: #ece8e3; }
.js .card__open { display: inline-flex; }
.card__open i { position: relative; width: 28px; height: 28px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50%; transition: transform 0.45s var(--ease), background-color 0.3s; }
.card__open i::before, .card__open i::after { content: ''; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.6px; background: currentColor; transform: translate(-50%, -50%); }
.card__open i::after { transform: translate(-50%, -50%) rotate(90deg); }
.card:hover .card__open i { transform: rotate(90deg); background: rgba(255, 255, 255, 0.08); }
.card__detail { margin-top: 26px; }
.js .card__detail { display: none; }
.card__list { display: grid; margin: 0; padding: 0; list-style: none; counter-reset: proj; }
.card__list li { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 14px; padding: 22px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); counter-increment: proj; }
.card__list li::before { content: counter(proj, decimal-leading-zero); grid-row: span 3; padding-top: 6px; font-family: var(--mono); font-size: 12.5px; color: var(--accent); }
.card__list h4 { margin: 0; font-size: 21px; font-weight: 620; line-height: 1.25; letter-spacing: -0.015em; }
.card__list p { margin-top: 6px; font-size: 16px; line-height: 1.55; color: rgba(236, 232, 227, 0.68); }
.card__list .card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.card__tags span { padding: 3px 10px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; font-family: var(--mono); font-size: 11.5px; line-height: 1.6; color: rgba(236, 232, 227, 0.78); }
.card__foot { padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 15px; color: rgba(236, 232, 227, 0.62); }
.card__foot a { color: #ece8e3; font-weight: 600; text-underline-offset: 4px; }
.card__close { display: none; position: absolute; top: 24px; right: 24px; z-index: 2; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px; background: rgba(255, 255, 255, 0.04); color: #ece8e3; font-size: 14.5px; font-weight: 600; cursor: pointer; transition: background-color 0.25s; }
.card__close:hover { background: rgba(255, 255, 255, 0.1); }
.card__close svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.card__close:focus-visible { outline-color: #ece8e3; }

/* Open: chosen card on the left, the other three stacked on the right */
.deck.is-open { grid-template-columns: minmax(0, 1fr) minmax(250px, 330px); }
.deck.is-open .card { min-height: 0; }
.js .card.is-active .card__detail { display: block; }
.js .card.is-active .card__close { display: inline-flex; }
.deck.is-open .card.is-active { grid-column: 1; grid-row: 1 / span 3; padding: clamp(28px, 3.4vw, 44px); }
.card.is-active .card__btn::after { display: none; }
.card.is-active .card__icon { visibility: hidden; }
.card.is-active .card__title { margin-top: 0; padding-top: 28px; font-size: clamp(2.4rem, 4.4vw, 3.8rem); }
.card.is-active .card__meta { display: none; }
.card.is-active .card__list li { animation: line-in 0.6s var(--ease) both; animation-delay: calc(0.2s + var(--i, 0) * 0.08s); }
.deck.is-open .card:not(.is-active) { grid-column: 2; grid-row: var(--slot, auto); padding: 22px; }
.deck.is-open .card:not(.is-active) .card__sum { display: none; }
.deck.is-open .card:not(.is-active) .card__icon { width: 42px; height: 42px; border-radius: 13px; }
.deck.is-open .card:not(.is-active) .card__title { padding-top: 24px; font-size: clamp(1.4rem, 2vw, 1.75rem); }
.deck.is-open .card:not(.is-active) .card__meta { margin-top: 16px; padding-top: 14px; }
.deck.is-open .card:not(.is-active):hover { transform: translateX(-4px); }
@keyframes line-in { from { opacity: 0; transform: translateX(-10px); } }
::view-transition-group(card-agents), ::view-transition-group(card-voice), ::view-transition-group(card-rag), ::view-transition-group(card-auto) { animation-duration: 0.62s; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); }
::view-transition-image-pair(card-agents), ::view-transition-image-pair(card-voice), ::view-transition-image-pair(card-rag), ::view-transition-image-pair(card-auto) { overflow: clip; border-radius: 26px; }
::view-transition-old(card-agents), ::view-transition-old(card-voice), ::view-transition-old(card-rag), ::view-transition-old(card-auto),
::view-transition-new(card-agents), ::view-transition-new(card-voice), ::view-transition-new(card-rag), ::view-transition-new(card-auto) { width: 100%; height: 100%; object-fit: none; object-position: left top; animation-duration: 0.3s; }
.work__more { margin-top: clamp(48px, 6vw, 72px); text-align: center; font-size: 15.5px; color: var(--ink-2); }
.work__more a { color: var(--ink); text-underline-offset: 4px; }

/* ---------- Story / timeline ---------- */
.story { position: relative; padding: clamp(110px, 12vw, 170px) 0; overflow: clip; background: repeating-linear-gradient(135deg, var(--line) 0 1px, transparent 1px 10px), var(--story); background-blend-mode: normal; transition: background-color 0.5s; }
.story::before { content: ''; position: absolute; inset: 0; background: var(--story); opacity: 0.82; }
.story__glow { position: absolute; inset: 0; pointer-events: none; }
.story__glow::before, .story__glow::after { content: ''; position: absolute; border-radius: 50%; background: var(--glow, var(--c-agents)); -webkit-mask: radial-gradient(closest-side, #000, transparent); mask: radial-gradient(closest-side, #000, transparent); opacity: 0.26; transition: background-color 1s ease; }
.story__glow::before { left: -18vw; top: -8vw; width: 62vw; height: 62vw; }
.story__glow::after { right: -20vw; bottom: -12vw; width: 56vw; height: 56vw; background: var(--glow2, var(--c-rag)); opacity: 0.2; }
.story__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 clamp(32px, 6vw, 96px); }
.story__side { position: relative; }
.story__sticky { position: sticky; top: 18vh; isolation: isolate; text-align: center; }
.dial { position: absolute; left: 50%; top: 50%; z-index: -1; width: min(640px, 112%); max-width: none; height: auto; aspect-ratio: 1; color: var(--ink); opacity: 0.14; transform: translate(-50%, -50%); pointer-events: none; }
.dial__rim { fill: none; stroke: currentColor; stroke-width: 1.4; }
.dial__rim--in { stroke-width: 0.8; opacity: 0.6; }
.dial__tick { stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.dial__tick.is-major { stroke-width: 3.2; }
.dial__num { fill: currentColor; font-size: 30px; font-weight: 500; letter-spacing: -0.02em; text-anchor: middle; dominant-baseline: central; }
.dial__hand line { stroke: currentColor; stroke-linecap: round; }
.dial__hand--h line { stroke-width: 10; }
.dial__hand--m line { stroke-width: 5.5; }
.dial__pin { fill: currentColor; }
.story__title { margin-top: 16px; font-size: clamp(2.4rem, 4.6vw, 4.1rem); font-weight: 700; line-height: 1.02; letter-spacing: -0.03em; }
.year { display: flex; justify-content: center; height: 1em; margin-top: 22px; overflow: hidden; font-size: clamp(6rem, 12.6vw, 11.6rem); font-weight: 700; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.reel { display: block; height: 1em; overflow: hidden; }
.reel__strip { display: flex; flex-direction: column; transform: translateY(calc(var(--d, 0) * -1em)); transition: transform 1s var(--ease); }
.reel:nth-child(2) .reel__strip { transition-delay: 0.05s; }
.reel:nth-child(3) .reel__strip { transition-delay: 0.1s; }
.reel:nth-child(4) .reel__strip { transition-delay: 0.15s; }
.reel__strip span { display: block; height: 1em; text-align: center; }
.story__range { margin-top: 18px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }
.story__count { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 22px; font-family: var(--mono); font-size: 14px; color: var(--ink-3); }
.story__count b { color: var(--ink); }
.story__count svg { width: 19px; height: 19px; fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.story__bar { position: relative; width: 170px; height: 2px; margin-left: 16px; background: var(--line-2); }
.story__bar i { position: absolute; inset: 0; background: var(--ink); transform: scaleX(var(--p, 0.2)); transform-origin: left; transition: transform 0.6s var(--ease); }

.timeline { position: relative; margin: 0; padding: 0 0 0 64px; list-style: none; }
.timeline::before, .timeline::after { content: ''; position: absolute; left: 11px; top: 12vh; bottom: 12vh; width: 2px; background: var(--line-2); }
.timeline::after { background: var(--ink); transform: scaleY(var(--tp, 0)); transform-origin: top; }
.entry { position: relative; padding: 11vh 0; transition: opacity 0.5s ease; }
.js .entry { opacity: 0.3; }
.js .entry.is-active { opacity: 1; }
.entry::before { content: ''; position: absolute; z-index: 1; left: -60px; top: calc(11vh + 4px); width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--story); transition: background-color 0.4s, border-color 0.4s, box-shadow 0.4s; }
.entry.is-active::before { border-color: var(--dot, var(--ink)); background: var(--dot, var(--ink)); box-shadow: 0 0 0 7px color-mix(in srgb, var(--dot, var(--ink)) 22%, transparent); }
.entry__date { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }
.entry__role { margin-top: 10px; font-size: clamp(1.7rem, 2.8vw, 2.45rem); font-weight: 650; line-height: 1.1; letter-spacing: -0.03em; }
.entry__org { margin-top: 6px; font-size: 17px; color: var(--ink-2); }
.entry__points { display: grid; gap: 8px; margin-top: 18px; padding: 0; list-style: none; color: var(--ink-2); }
.entry__points li { position: relative; padding-left: 20px; }
.entry__points li::before { content: '–'; position: absolute; left: 0; color: var(--ink-3); }
.entry.is-active .entry__points { color: color-mix(in srgb, var(--ink) 82%, var(--bg)); }

/* ---------- Certifications ---------- */
.certs { padding: clamp(100px, 11vw, 150px) 0 clamp(110px, 12vw, 170px); }
.certs__title { margin-top: 16px; font-size: clamp(2.6rem, 5.6vw, 4.8rem); font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.certs__list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 44px; padding: 0; list-style: none; }
.cert { display: flex; flex-direction: column; min-height: 210px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); transition: transform 0.4s var(--ease), box-shadow 0.4s, opacity 0.9s var(--ease); }
.cert:hover { transform: translateY(-5px); box-shadow: 0 22px 40px -24px rgba(0, 0, 0, 0.35); }
.cert__issuer { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.cert__name { margin-top: 12px; font-size: 18px; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; }
.cert__foot { display: flex; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 20px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.cert__foot a { color: var(--ink); text-underline-offset: 3px; }

/* ---------- Contact / footer ---------- */
.contact { position: relative; padding: clamp(100px, 11vw, 150px) 0 34px; border-radius: 36px 36px 0 0; background: var(--footer); color: var(--footer-ink); }
.eyebrow--light { color: rgba(236, 232, 227, 0.7); font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; }
.contact__title { margin-top: 24px; font-size: clamp(2.9rem, 7.6vw, 6.8rem); font-weight: 700; line-height: 1; letter-spacing: -0.035em; }
.contact__title span { display: block; color: rgba(236, 232, 227, 0.4); }
.contact__lead { max-width: 560px; margin-top: 30px; font-size: 18px; color: rgba(236, 232, 227, 0.7); }
.contact__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.contact__email { display: inline-block; margin-top: 30px; font-size: clamp(1.15rem, 2.2vw, 1.5rem); font-weight: 600; letter-spacing: -0.02em; text-decoration-color: rgba(236, 232, 227, 0.3); text-underline-offset: 6px; overflow-wrap: anywhere; }
.contact__email:hover { text-decoration-color: currentColor; }
.contact__reach { display: flex; flex-wrap: wrap; gap: 22px 64px; margin-top: 36px; }
.contact__reach .contact__email { margin-top: 0; }
.contact__phone { letter-spacing: 0; word-spacing: 0.14em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.contact__k { margin-bottom: 8px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(236, 232, 227, 0.6); }
.contact__cols { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1.2fr; gap: 32px; margin-top: clamp(72px, 9vw, 110px); padding-top: 44px; border-top: 1px solid rgba(236, 232, 227, 0.12); }
.contact__cols h3 { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(236, 232, 227, 0.6); }
.contact__cols ul { display: grid; gap: 10px; margin-top: 18px; padding: 0; list-style: none; }
.contact__cols a { font-size: 16.5px; font-weight: 500; text-decoration: none; }
.contact__cols a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact__status li { color: rgba(236, 232, 227, 0.85); font-size: 16px; }
.contact__bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 70px; font-size: 14px; color: rgba(236, 232, 227, 0.55); }
.contact__bottom a { text-decoration: none; }
.contact__bottom a:hover { color: var(--footer-ink); }
.contact :focus-visible { outline-color: var(--footer-ink); }

/* ---------- Back to top ---------- */
.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 40; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--ink); color: var(--bg); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 14px 30px -12px rgba(0, 0, 0, 0.5); opacity: 0; transform: translateY(14px) scale(0.9); pointer-events: none; transition: opacity 0.35s, transform 0.35s var(--ease), background-color 0.5s; }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.to-top circle { fill: none; stroke-width: 2; }
.to-top__track { stroke: color-mix(in srgb, var(--bg) 22%, transparent); }
.to-top__ring { stroke: var(--bg); stroke-dasharray: 150.8; stroke-dashoffset: calc(150.8 * (1 - var(--p, 0))); stroke-linecap: round; }
.to-top .to-top__arrow { position: relative; inset: auto; width: 18px; height: 18px; transform: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Intro loader ---------- */
.loader { display: none; }
.intro .loader { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; justify-content: space-between; padding: 36px var(--pad) 44px; background: radial-gradient(60% 55% at 22% 100%, rgba(150, 90, 40, 0.3), transparent 65%), radial-gradient(50% 50% at 90% 10%, rgba(255, 255, 255, 0.05), transparent 70%), #111010; color: #ece8e3; }
.intro.booted body { overflow: hidden; }
.intro:not(.booted) .loader { animation: hide-failsafe 0.01s 4s forwards; }
@keyframes hide-failsafe { to { visibility: hidden; opacity: 0; } }
.loader.is-done { transform: translateY(-100%); transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1); }
.loader__top { display: flex; justify-content: space-between; gap: 16px; font-size: 14.5px; color: rgba(236, 232, 227, 0.6); }
.loader__top b { color: #fff; font-weight: 600; }
.loader__pile { position: absolute; left: 50%; top: 47%; width: clamp(150px, 15vw, 200px); aspect-ratio: 5 / 7; transform: translate(-50%, -50%); filter: drop-shadow(0 26px 30px rgba(0, 0, 0, 0.7)); }
.loader__card { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 16px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 18px; background: var(--noise), linear-gradient(165deg, #1d1d1d, #0a0a0a 65%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); transform: translateY(var(--y)) rotate(var(--r)); animation: card-drop 0.75s cubic-bezier(0.3, 1.35, 0.5, 1) both; animation-delay: calc(0.15s + var(--i) * 0.3s); }
.loader__card b { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.14em; color: rgba(236, 232, 227, 0.6); }
.loader__card b::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.loader__card em { font-size: clamp(18px, 1.8vw, 24px); font-style: normal; font-weight: 650; letter-spacing: -0.02em; color: #ece8e3; }
@keyframes card-drop {
  from { transform: translateY(-75vh) rotate(calc(var(--r) * -5)); }
  to { transform: translateY(var(--y)) rotate(var(--r)); }
}
.loader__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.loader__label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(236, 232, 227, 0.6); }
.loader__count { margin-top: 12px; font-size: clamp(5rem, 13vw, 10.5rem); font-weight: 700; line-height: 0.82; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.loader__bar { position: relative; width: min(240px, 36vw); height: 2px; margin-bottom: 14px; background: rgba(255, 255, 255, 0.14); }
.loader__bar i { position: absolute; inset: 0; background: linear-gradient(90deg, #c9a46a, #f1d9a6); transform: scaleX(var(--p, 0)); transform-origin: left; }

/* ---------- Entrance + reveal ---------- */
.js .hero [data-hero] { opacity: 0; transform: translateY(30px); }
.js .hero .hero__figure[data-hero] { transform: translateY(60px); }
.js.ready .hero [data-hero] { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .cert[data-reveal].is-in:hover { transform: translateY(-5px); transition-delay: 0s; }
.js:not(.booted) .hero [data-hero], .js:not(.booted) [data-reveal] { animation: reveal-failsafe 0.01s 3.5s forwards; }
@keyframes reveal-failsafe { to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .hdr__brand { display: block; }
  .menu-btn { display: inline-flex; align-items: center; }
  .clock { margin-left: auto; }
  .nav { position: fixed; inset: 0; z-index: 1; flex-direction: column; justify-content: center; gap: 0; margin: 0; padding: 100px var(--pad) 48px; background: var(--bg); visibility: hidden; transform: translateY(-100%); transition: transform 0.6s cubic-bezier(0.7, 0, 0.2, 1), visibility 0s 0.6s; }
  .nav.is-open { visibility: visible; transform: none; transition: transform 0.6s cubic-bezier(0.7, 0, 0.2, 1); }
  .nav a { padding: 6px 0; border-radius: 0; font-size: clamp(2rem, 7vw, 3.2rem); font-weight: 650; letter-spacing: -0.035em; line-height: 1.15; color: var(--ink); }
  .nav a:hover { background: none; color: var(--ink-2); }
  .menu-open .hdr { -webkit-backdrop-filter: none; backdrop-filter: none; background: transparent; box-shadow: none; }
  .certs__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .deck.is-open { grid-template-columns: minmax(0, 1fr) minmax(210px, 250px); }
  .deck.is-open .card:not(.is-active) { padding: 18px; }
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-top: 112px; }
  .hero__text { padding-bottom: 0; }
  .hero__img { width: min(100%, 560px); height: auto; }
  .story__grid { grid-template-columns: minmax(0, 1fr); }
  .story__sticky { position: relative; top: 0; }
  .timeline { margin-top: 40px; }
  .timeline::before, .timeline::after { top: 6vh; bottom: 6vh; }
  .entry { padding: 6vh 0; }
  .entry::before { top: calc(6vh + 4px); }
  .contact__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .clock { display: none; }
  .menu-btn { margin-left: auto; }
  .hdr__inner { height: 72px; }
  .hero { padding: 0 8px; }
  .hero__frame { border-radius: 0 0 26px 26px; }
  .hero__title { font-size: clamp(2.7rem, 12.5vw, 3.6rem); }
  .flip { margin-top: 24px; }
  .flip__page { padding: 8px 22px 0; }
  .flip__word { font-size: clamp(2rem, 10vw, 2.8rem); }
  .flip__rings { left: 18px; right: 18px; }
  .flip__rings i:nth-child(n + 9) { display: none; }
  .hero__cta { margin-top: 30px; }
  .btn { height: 50px; font-size: 15px; }
  .hero__bar { font-size: 10.5px; }
  .hero__bar span { max-width: 55%; }
  .deck { gap: 12px; }
  .card { min-height: 220px; padding: 20px; border-radius: 20px; }
  .card__icon { width: 42px; height: 42px; border-radius: 13px; }
  .card__icon svg { width: 21px; height: 21px; }
  .card__title { padding-top: 26px; font-size: 1.55rem; }
  .card__sum { display: none; }
  .card__meta { margin-top: 14px; padding-top: 12px; font-size: 10.5px; letter-spacing: 0.08em; }
  .card__open { font-size: 0; gap: 0; }
  .card__open i { width: 24px; height: 24px; font-size: 12px; }
  .deck.is-open { grid-template-columns: minmax(0, 1fr); }
  .deck.is-open .card.is-active { grid-column: 1; grid-row: 1; padding: 22px 20px; }
  .deck.is-open .card:not(.is-active) { grid-column: 1; grid-row: auto; flex-direction: row; align-items: center; gap: 14px; padding: 12px 16px 12px 12px; border-radius: 18px; }
  .deck.is-open .card:not(.is-active) .card__top { flex-direction: row-reverse; align-items: center; gap: 12px; }
  .deck.is-open .card:not(.is-active) .card__icon { width: 38px; height: 38px; border-radius: 11px; }
  .deck.is-open .card:not(.is-active) .card__icon svg { width: 18px; height: 18px; }
  .deck.is-open .card:not(.is-active) .card__title { flex: 1; min-width: 0; margin: 0; padding: 0; font-size: 1.15rem; letter-spacing: -0.015em; }
  .deck.is-open .card:not(.is-active) .card__meta { margin: 0; padding: 0; border: 0; }
  .deck.is-open .card:not(.is-active) .card__meta > span:first-child { display: none; }
  .deck.is-open .card:not(.is-active):hover { transform: none; }
  .card.is-active .card__title { padding-top: 22px; font-size: 2.3rem; }
  .card__close { top: 16px; right: 16px; height: 38px; padding: 0 14px; }
  .card__list li { grid-template-columns: 32px minmax(0, 1fr); column-gap: 8px; padding: 18px 0; }
  .card__list h4 { font-size: 18.5px; }
  .card__list p { font-size: 15px; }
  .studio { flex-wrap: wrap; border-radius: 22px; padding: 16px; }
  .studio__text { flex-basis: calc(100% - 64px); }
  .studio__link { margin-left: 64px; }
  .year { font-size: clamp(5rem, 26vw, 7.5rem); }
  .story__bar { width: 110px; }
  .timeline { padding-left: 46px; }
  .timeline::before, .timeline::after { left: 8px; }
  .entry::before { left: -45px; width: 16px; height: 16px; }
  .certs__list { grid-template-columns: minmax(0, 1fr); }
  .cert { min-height: 0; }
  .contact { border-radius: 26px 26px 0 0; }
  .contact__bottom { flex-direction: column; }
  .to-top { right: 16px; bottom: 16px; width: 48px; height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .js [data-reveal], .js .hero [data-hero] { transform: none !important; transition: opacity 0.4s ease !important; }
  .reel__strip { transition: none; }
}
