/* ==========================================================================
   Kazi Najua Sultana Sami — Portfolio
   Plain CSS, no framework. Colours and type live in the tokens below.
   ========================================================================== */
:root {
  --bg: #0b0b0d;
  --bg-2: #121215;
  --bg-3: #1a1a1f;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f3efe8;
  --muted: #a49e94;
  --dim: #6f6a62;
  --accent: #f0a33c;
  --accent-ink: #1a1206;
  --accent-soft: rgba(240, 163, 60, 0.14);

  --display: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - var(--gutter) * 2, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  transition: background .35s var(--ease), border-color .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-solid { background: rgba(11, 11, 13, .82); border-color: var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.site-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
/* Header logo: the user's own SAMI mark, recoloured to the theme amber (transparent PNG, 3x for sharp screens) */
.brand { display: inline-flex; align-items: center; text-decoration: none; padding: 6px 2px; }
.brand__logo { display: block; height: 30px; width: auto; transition: transform .4s var(--ease), filter .4s; }
.brand:hover .brand__logo { transform: translateY(-1px); filter: drop-shadow(0 0 10px rgba(240,163,60,.4)); }
.brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { text-decoration: none; font-size: 14px; color: var(--muted); padding: 8px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.site-nav a:hover, .site-nav a.is-current { color: var(--text); background: rgba(255,255,255,.06); }
.site-nav__cta { color: var(--accent-ink) !important; background: var(--accent) !important; font-weight: 600; margin-left: 6px; }
.site-nav__cta:hover { filter: brightness(1.08); }
.menu-btn { display: none; }

/* ---------- Buttons, chips, tags ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .25s var(--ease), background .25s, border-color .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--ghost { background: rgba(255,255,255,.04); border-color: var(--line-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--text); }
.btn--lg { min-height: 58px; padding: 0 28px; font-size: clamp(15px, 2vw, 18px); }

.chip {
  border: 1px solid var(--line-2); background: transparent; color: var(--muted);
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 14px;
  transition: color .2s, background .2s, border-color .2s;
}
.chip span { color: var(--dim); margin-left: 4px; font-size: 12px; }
.chip:hover { color: var(--text); border-color: var(--text); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip.is-active span { color: var(--dim); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }

.tag {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 6px;
}
.tag--ai { position: absolute; top: 12px; left: 12px; z-index: 3; background: rgba(0,0,0,.6); padding: 5px 8px; border-radius: 6px; margin: 0; backdrop-filter: blur(6px); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: calc(var(--header-h) + 40px) 0 28px; isolation: isolate; overflow: hidden; }
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__media img, .hero__loop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__media img { transform: scale(1.04); animation: heroIn 2.4s var(--ease) both; }
.hero__loop { opacity: 0; transition: opacity 1.2s var(--ease); }
.hero__loop.is-playing { opacity: 1; }
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,11,13,.55) 0%, rgba(11,11,13,.15) 30%, rgba(11,11,13,.55) 65%, var(--bg) 100%),
    linear-gradient(90deg, rgba(11,11,13,.75) 0%, rgba(11,11,13,0) 65%);
}
@keyframes heroIn { from { transform: scale(1.12); opacity: 0; } to { transform: scale(1.04); opacity: 1; } }
.hero__content { max-width: var(--wrap); }
.eyebrow { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--text); opacity: .85; margin-bottom: 22px; }
.eyebrow i { font-style: normal; color: var(--accent); margin: 0 6px; }
.hero__title { font: 600 clamp(44px, 8vw, 112px)/1 var(--display); letter-spacing: -.035em; max-width: 15ch; }
.hero__title em, .contact__title em { font-style: normal; color: var(--accent); }
.hero__intro { margin-top: 26px; max-width: 54ch; color: #d9d3ca; font-size: clamp(16px, 1.6vw, 18px); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 56px; font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.hero__rec { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 4px rgba(229,72,77,.18); }
.hero__scroll { writing-mode: vertical-rl; text-transform: uppercase; letter-spacing: .3em; font-size: 10px; }

/* ---------- Facts strip ---------- */
.facts { border-block: 1px solid var(--line); background: var(--bg); }
.facts__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 26px 20px 26px 0; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); padding-left: 20px; }
.fact:first-child { padding-left: 0; }
.fact:last-child { border-right: 0; }
.fact b { font: 600 clamp(30px, 4vw, 44px)/1 var(--display); color: var(--text); }
.fact span { color: var(--muted); font-size: 13px; }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 11vw, 150px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section__head { margin-bottom: clamp(32px, 5vw, 56px); max-width: 760px; }
.kicker { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.section__head h2, .about h2 { font: 600 clamp(36px, 5.6vw, 72px)/1.02 var(--display); letter-spacing: -.04em; }
.section__lede { margin-top: 18px; color: var(--muted); font-size: clamp(16px, 1.5vw, 18px); max-width: 60ch; }
.mini-h { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; font-weight: 600; }

/* ---------- Video cards ---------- */
.vcard {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer;
  background: var(--bg-3); border-radius: var(--radius); overflow: hidden; text-align: left;
  isolation: isolate; aspect-ratio: 16 / 9;
}
.vcard img, .vcard .vcard__preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), opacity .4s; }
.vcard .vcard__preview { z-index: 1; opacity: 0; }
.vcard .vcard__preview.is-on { opacity: 1; }
.vcard::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.78) 100%); transition: opacity .4s; pointer-events: none; }
.vcard:hover img, .vcard:focus-visible img { transform: scale(1.045); }
.vcard__play {
  position: absolute; z-index: 3; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px;
  border-radius: 50%; background: rgba(11,11,13,.45); border: 1px solid rgba(255,255,255,.5);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .35s var(--ease), background .35s, border-color .35s;
}
.vcard__play::before { content: ""; position: absolute; left: 27px; top: 22px; border-style: solid; border-width: 12px 0 12px 19px; border-color: transparent transparent transparent #fff; }
.vcard:hover .vcard__play, .vcard:focus-visible .vcard__play { transform: scale(1.1); background: var(--accent); border-color: var(--accent); }
.vcard:hover .vcard__play::before, .vcard:focus-visible .vcard__play::before { border-left-color: var(--accent-ink); }
.vcard__dur { position: absolute; z-index: 3; right: 12px; bottom: 12px; font-size: 12px; font-variant-numeric: tabular-nums; background: rgba(0,0,0,.6); padding: 4px 8px; border-radius: 6px; }
.vcard__info { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; padding: 18px 20px; display: flex; flex-direction: column; }
.vcard__info b { font: 600 clamp(22px, 2.4vw, 30px)/1.1 var(--display); }
.vcard__info small { color: #cfc9c0; font-size: 13px; margin-top: 4px; }

/* Featured layout */
/* Selected work: one even row. The landscape film sets the height; the two vertical videos fill the same height */
.featured { display: grid; grid-template-columns: 1.9fr .9fr .9fr; gap: 18px; }
.vcard--hero { aspect-ratio: 16 / 9; }
.vcard--tall { aspect-ratio: auto; min-height: 100%; }
.vcard--hero .vcard__info b { font-size: clamp(26px, 3vw, 40px); }

/* Project index */
.index { margin-top: clamp(48px, 7vw, 80px); }
.index__list { list-style: none; border-top: 1px solid var(--line); }
.index__list li { border-bottom: 1px solid var(--line); }
.index__list li[hidden] { display: none; }
/* Each row is a toggle; the details panel opens underneath (one open at a time) */
.prow__head {
  width: 100%; display: grid; grid-template-columns: 40px 2.2fr 1fr 1.2fr 56px 28px; gap: 16px; align-items: center;
  padding: 18px 6px; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-align: left;
  transition: background .25s, padding .35s var(--ease);
}
.prow__head:hover, .prow__head:focus-visible, .prow.is-open .prow__head { background: rgba(255,255,255,.03); padding-left: 16px; }
.prow__head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.index__n { color: var(--dim); font-size: 13px; font-variant-numeric: tabular-nums; }
.index__t { font: 600 clamp(20px, 2.2vw, 28px)/1.15 var(--display); transition: color .25s; }
.prow__head:hover .index__t, .prow.is-open .index__t { color: var(--accent); }
.prow__x { position: relative; width: 18px; height: 18px; justify-self: end; transition: transform .4s var(--ease); }
.prow__x::before, .prow__x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; margin: -1px 0 0 -7px; border-radius: 2px; background: var(--accent); }
.prow__x::after { transform: rotate(90deg); }
.prow.is-open .prow__x { transform: rotate(45deg); }
.prow__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.prow.is-open .prow__body { grid-template-rows: 1fr; }
.prow__in { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s .45s; }
.prow.is-open .prow__in { visibility: visible; transition: visibility 0s; }
.prow__box { display: flex; align-items: center; gap: 24px; padding: 6px 6px 24px 72px; }
.prow__poster { flex: none; width: 220px; aspect-ratio: 16 / 9; height: auto; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.prow__poster--v { width: 108px; aspect-ratio: 9 / 16; }
.prow__text { max-width: 560px; }
.prow__text p { color: var(--muted); font-size: 15px; margin-bottom: 10px; }
.prow__meta { display: flex; align-items: center; gap: 10px; font-size: 13px !important; }
.prow__meta span { font-size: 11px; letter-spacing: .06em; padding: 2px 7px; border-radius: 4px; border: 1px solid rgba(240,163,60,.5); color: var(--accent); }
.prow__watch { min-height: 42px; padding: 0 20px; font-size: 14px; margin-top: 4px; }
.prow__watch svg { width: 15px; height: 15px; fill: currentColor; }
.index__c, .index__r { color: var(--muted); font-size: 14px; }
.index__d { color: var(--muted); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.index__list li.is-entering { animation: rowIn .45s var(--ease) both; }

/* Project filter bar: an amber pill slides behind the active button */
.pfilter { position: relative; display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line-2); border-radius: 999px; }
.pfilter__ind { position: absolute; left: 0; top: 0; width: 0; height: 0; border-radius: 999px; background: var(--accent); opacity: 0; z-index: 0;
  transition: transform .45s var(--ease), width .45s var(--ease), height .45s var(--ease); }
.pfilter.is-ready .pfilter__ind { opacity: 1; }
.pfilter .chip { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; border: 0; padding: 9px 16px 9px 13px; color: var(--text); background: transparent; transition: color .3s; }
.pfilter .chip svg { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s; }
.pfilter .chip span { margin-left: 0; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--muted); text-align: center; transition: background .3s, color .3s; }
.pfilter .chip:hover { border-color: transparent; color: var(--accent); }
.pfilter .chip.is-active { background: transparent; color: var(--accent-ink); }
.pfilter:not(.is-ready) .chip.is-active { background: var(--accent); }
.pfilter .chip.is-active svg { stroke: var(--accent-ink); }
.pfilter .chip.is-active span { background: rgba(26,18,6,.16); color: var(--accent-ink); }
.pfilter .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@keyframes rowIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Travel films */
.film { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.film + .film { margin-top: clamp(56px, 8vw, 96px); }
.film--flip { grid-template-columns: 1fr 1.5fr; }
.film--flip .vcard { order: 2; }
.film__num { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.film__text h3 { letter-spacing: -.03em; font: 600 clamp(30px, 3.6vw, 48px)/1.05 var(--display); margin-bottom: 14px; }
.film__text > p { color: var(--muted); }
.specs { margin: 24px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.specs div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.specs dt { color: var(--dim); }
.specs dd { margin: 0; }
.specs__list { list-style: none; display: grid; gap: 5px; }
.specs__list li { position: relative; padding-left: 16px; }
.specs__list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 1px; background: var(--accent); }

/* Reels gallery */
.reel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.vcard--reel { aspect-ratio: 9 / 16; }
.vcard--reel .vcard__info b { font-size: clamp(18px, 1.6vw, 22px); }
.vcard--reel .vcard__info small { font-size: 12px; }
.vcard--reel .vcard__play { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
.vcard--reel .vcard__play::before { left: 22px; top: 17px; border-width: 11px 0 11px 17px; }

/* University */
.uni { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(20px, 3vw, 36px); align-items: start; }
.uni__item .vcard--film { aspect-ratio: 848 / 464; }
.uni__item .vcard--reel { max-width: 340px; }
.uni__text { margin-top: 20px; }
.uni__text h3 { font: 600 clamp(26px, 2.8vw, 36px)/1.1 var(--display); margin-bottom: 8px; }
.uni__text p { color: var(--muted); }
.uni__text .role { color: var(--accent); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-top: 12px; }

/* ---------- Photography ---------- */
.gallery { list-style: none; columns: 3 280px; column-gap: 16px; }
.gallery li { break-inside: avoid; margin-bottom: 16px; }
.gallery li[hidden] { display: none; }
.gallery button { display: block; width: 100%; padding: 0; border: 0; background: var(--bg-3); border-radius: 10px; overflow: hidden; cursor: zoom-in; position: relative; }
.gallery img { width: 100%; transition: transform .8s var(--ease), filter .4s; }
.gallery button:hover img, .gallery button:focus-visible img { transform: scale(1.04); }
.gallery button::after {
  content: attr(data-caption); position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 14px 12px; font-size: 13px; text-align: left;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.75));
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s var(--ease);
}
.gallery button:hover::after, .gallery button:focus-visible::after { opacity: 1; transform: none; }

/* ---------- Process ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.steps li { background: var(--bg); padding: clamp(22px, 3vw, 36px); transition: background .3s; }
.steps li:hover { background: var(--bg-2); }
.steps span { font: 600 40px/1 var(--display); color: var(--accent); }
.steps h3 { font-size: 18px; font-weight: 600; margin: 14px 0 8px; }
.steps p { color: var(--muted); font-size: 15px; }

/* side cards must never cause sideways scrolling */
.process { overflow-x: hidden; overflow-x: clip; }

/* Process as a circular carousel (JS positions the cards on an ellipse; without JS the grid above stays) */
.orbit__nav, .orbit__count { display: none; }
.js .orbit__stage { position: relative; height: 520px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.js .orbit .steps { display: block; position: absolute; inset: 0; margin: 0; background: none; border: 0; border-radius: 0; overflow: visible; }
.js .orbit .steps li {
  position: absolute; left: 0; top: 0; width: 300px; padding: 20px 22px 22px;
  background: linear-gradient(180deg, #1c1c21, #141417); border: 1px solid var(--line-2); border-radius: 16px;
  box-shadow: 0 18px 40px -20px rgba(0,0,0,.85); cursor: pointer; transform-origin: 50% 50%;
  will-change: transform, opacity; transition: border-color .4s, box-shadow .4s;
}
.js .orbit .steps li:hover { background: linear-gradient(180deg, #202026, #16161a); }
.js .orbit .steps li.is-active { cursor: default; border-color: rgba(240,163,60,.5); box-shadow: 0 28px 60px -26px rgba(240,163,60,.4), 0 18px 40px -20px rgba(0,0,0,.85); }
.js .orbit .steps span { display: inline-block; font: 600 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.07); color: var(--muted); }
.js .orbit .steps span::before { content: "Step "; }
.js .orbit .steps li.is-active span { background: var(--accent-soft); color: var(--accent); }
.js .orbit .steps h3 { font: 600 20px/1.2 var(--display); margin: 12px 0 6px; }
.js .orbit .steps p { font-size: 14.5px; line-height: 1.55; }
.js .orbit__count { display: block; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; }
.orbit__count b { display: block; font: 600 clamp(64px, 7vw, 88px)/1 var(--display); letter-spacing: -.04em; color: var(--accent); }
.orbit__count span { display: block; margin-top: 6px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.js .orbit__nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 8px; }
.orbit__btn { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); cursor: pointer; transition: border-color .3s, background .3s; }
.orbit__btn:hover { border-color: var(--accent); background: var(--bg-3); }
.orbit__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.orbit__btn:focus-visible, .orbit__dots button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.orbit__dots { display: flex; gap: 8px; align-items: center; }
.orbit__dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: var(--line-2); cursor: pointer; transition: width .4s var(--ease), background .4s; }
.orbit__dots button[aria-current="step"] { width: 28px; background: var(--accent); }
.orbit__mini { display: none; font: 600 14px var(--display); color: var(--muted); letter-spacing: .06em; }
/* narrow screens: the counter moves into the nav row so it never sits under a card */
.js .orbit.is-compact .orbit__count { display: none; }
.js .orbit.is-compact .orbit__mini { display: inline; }
.js .orbit.is-compact .orbit__nav { gap: 14px; }

/* ---------- Skills ---------- */
/* Tool cards: a fanned stack. Clicking a back card swaps it to the front. */
.deck { position: relative; height: 360px; max-width: 900px; margin: 8px auto 0; }
.tcard {
  --brand: var(--accent); --glow: rgba(240,163,60,.18);
  position: absolute; left: 50%; top: 24px; width: min(420px, 88%);
  display: flex; flex-direction: column; align-items: flex-start; gap: 0;
  padding: 26px 28px 24px; text-align: left; color: var(--text); font: inherit; cursor: pointer;
  background: linear-gradient(180deg, #1c1c21, #141417); border: 1px solid var(--line-2); border-radius: 18px;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.8);
  transform-origin: 50% 100%;
  transition: transform .6s var(--ease), filter .45s, box-shadow .45s, opacity .45s;
}
.tcard::before { /* brand-colour top edge, like the reference */
  content: ""; position: absolute; inset: -1px -1px auto; height: 4px; border-radius: 18px 18px 0 0; background: var(--brand);
}
.tcard--pr { --brand: #9999FF; --glow: rgba(153,153,255,.28); }
.tcard--cc { --brand: linear-gradient(90deg, #f3efe8, #8a8a8a); --glow: rgba(243,239,232,.16); }
.tcard--cv { --brand: linear-gradient(90deg, #00C4CC, #6420FF 60%, #7D2AE8); --glow: rgba(0,196,204,.24); }

/* positions: 0 = front, 1 = back-left, 2 = back-right */
.tcard[data-pos="0"] { z-index: 3; transform: translateX(-50%) translateY(0) rotate(0); box-shadow: 0 30px 60px -22px var(--glow), 0 18px 40px -18px rgba(0,0,0,.85); }
.tcard[data-pos="1"] { z-index: 2; transform: translateX(-104%) translateY(34px) rotate(-7deg) scale(.92); filter: brightness(.62) saturate(.8); }
.tcard[data-pos="2"] { z-index: 1; transform: translateX(4%) translateY(46px) rotate(7deg) scale(.92); filter: brightness(.55) saturate(.8); }
.tcard[data-pos="1"]:hover, .tcard[data-pos="2"]:hover { filter: brightness(.85); }
.tcard[data-pos="1"]:hover { transform: translateX(-104%) translateY(22px) rotate(-8deg) scale(.93); }
.tcard[data-pos="2"]:hover { transform: translateX(4%) translateY(34px) rotate(8deg) scale(.93); }
.tcard[data-pos="0"]:hover { transform: translateX(-50%) translateY(-6px); }
.tcard.is-rising { animation: rise-front .6s var(--ease); }
@keyframes rise-front { 0% { transform: translateX(-50%) translateY(40px) scale(.94); } 60% { transform: translateX(-50%) translateY(-14px) scale(1.01); } 100% { transform: translateX(-50%) translateY(0) scale(1); } }
.tcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.tcard__logo { display: block; width: 52px; height: 52px; margin-bottom: 18px; }
.tcard__logo svg { display: block; width: 100%; height: 100%; }
.tcard__pr { font: 600 25px var(--display); fill: #9999FF; letter-spacing: -.02em; }
.tcard__cv { font: italic 700 30px Georgia, "Times New Roman", serif; fill: #fff; }
.tcard__tag { position: absolute; top: 28px; right: 26px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tcard__name { display: block; font: 600 22px/1.2 var(--display); letter-spacing: -.01em; margin-bottom: 6px; }
.tcard__desc { display: block; color: var(--muted); font-size: 14.5px; margin-bottom: 16px; }
.tcard__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tcard__chips span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--text); }
.deck__hint { text-align: center; font-size: 13px; color: var(--dim); margin-top: 6px; }
/* Skills as two moving ribbons (opposite directions, pause on hover). Each track holds two identical sets and slides by -50% for a seamless loop */
.rb__sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ribbons { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; margin-top: 48px; }
.rb { min-width: 0; }
.rb .mini-h { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 16px; }
.rb .mini-h::before, .rb .mini-h::after { content: ""; width: 36px; height: 1px; background: linear-gradient(90deg, transparent, rgba(240,163,60,.6)); }
.rb .mini-h::after { transform: scaleX(-1); }
.rb__mask { overflow: hidden; padding: 6px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.rb__track { display: flex; width: max-content; animation: rb-slide 42s linear infinite; }
.rb--rev .rb__track { animation-direction: reverse; animation-duration: 36s; }
.rb__mask:hover .rb__track { animation-play-state: paused; }
.rb__set { display: flex; gap: 10px; padding-right: 10px; }
@keyframes rb-slide { to { transform: translateX(-50%); } }
.rb__pill {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 10px 18px 10px 14px; border: 1px solid var(--line-2); border-radius: 999px;
  font-size: 15px; color: var(--text); background: rgba(18,18,21,.6);
  transition: border-color .3s, color .3s, background .3s, transform .3s var(--ease);
}
.rb__pill svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rb__pill:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
/* reduced motion: no sliding, show each skill once and let them wrap */
@media (prefers-reduced-motion: reduce) {
  .rb__track { animation: none; width: auto; }
  .rb__mask { -webkit-mask-image: none; mask-image: none; }
  .rb__set { flex-wrap: wrap; padding-right: 0; }
  .rb__set--copy { display: none; }
  .rb__set--style .rb__pill:nth-child(n+4) { display: none; }
}

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.about__photo { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--bg-3); position: sticky; top: calc(var(--header-h) + 24px); }
.about__photo img { width: 100%; aspect-ratio: 900 / 1156; object-fit: cover; filter: saturate(.92); }
.about h2 { margin-bottom: 28px; font-size: clamp(38px, 5vw, 68px); }
.about__para { font-size: clamp(18px, 1.9vw, 22px); line-height: 1.6; color: #e6e0d6; }
.about__facts { margin: 36px 0 0; border-top: 1px solid var(--line); }
.about__facts div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.about__facts dt { color: var(--dim); }
.about__facts dd { margin: 0; }
.background { margin-top: 48px; }
.job { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.job__role { font-weight: 600; margin-bottom: 6px; }
.job__role span { color: var(--muted); font-weight: 400; }
.job p:last-child { color: var(--muted); font-size: 15px; }

/* ---------- Contact ---------- */
.contact { text-align: center; background: radial-gradient(ellipse at 50% 120%, rgba(240,163,60,.16), transparent 60%), var(--bg); }
.contact__inner { display: flex; flex-direction: column; align-items: center; }
.contact__title { font: 600 clamp(44px, 8vw, 104px)/1 var(--display); letter-spacing: -.035em; margin-bottom: 40px; }
.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
/* Social buttons in one row, address underneath */
.contact__social { list-style: none; display: flex; flex-wrap: nowrap; justify-content: center; gap: 12px; margin-top: 40px; }
.social {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px 12px 16px;
  border: 1px solid var(--line-2); border-radius: 999px; background: rgba(18,18,21,.7);
  color: var(--text); font-weight: 500; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: border-color .3s, transform .3s var(--ease), background .3s;
}
.social svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.social:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.social:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.contact__addr { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--muted); font-size: 15px; }
.contact__addr svg { width: 18px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linejoin: round; }


/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--dim); font-size: 13px; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { text-decoration: none; color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* ---------- Video player modal ---------- */
dialog { padding: 0; border: 0; color: var(--text); background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(5,5,6,.9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.player { width: min(100% - 32px, 1100px); margin: auto; }
.player[open] { animation: popIn .35s var(--ease); }
.player.is-portrait { width: min(100% - 32px, 460px); }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.player__box { position: relative; }
.player__frame { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; max-height: 80vh; }
.player.is-portrait .player__frame { aspect-ratio: 9 / 16; max-height: 78vh; margin-inline: auto; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player video[hidden] { display: none; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.player__state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; font-size: 14px; color: var(--muted); pointer-events: none; }
.player__state[hidden] { display: none; }
.player__state--error { pointer-events: auto; background: #000; }
.player__state--error a { color: var(--accent); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255,255,255,.15); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.player__meta { padding: 16px 4px 0; }
.player__meta h3 { font: 600 clamp(22px, 3vw, 30px)/1.15 var(--display); }
.player__meta p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.player__close, .lightbox__close {
  position: absolute; top: 10px; right: 10px; z-index: 5; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(0,0,0,.55); cursor: pointer; font-size: 16px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background .2s;
}
.player__close:hover, .lightbox__close:hover { background: rgba(255,255,255,.16); }

/* ---------- Lightbox ---------- */
.lightbox { width: 100vw; height: 100vh; height: 100dvh; margin: 0; display: none; place-items: center; touch-action: pan-y; }
.lightbox[open] { display: grid; animation: fadeIn .3s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox__fig { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: calc(100vw - 140px); }
.lightbox__fig img { max-width: 100%; max-height: calc(100dvh - 120px); width: auto; border-radius: 6px; transition: opacity .25s; }
.lightbox__fig img.is-loading { opacity: .25; }
.lightbox__fig figcaption { display: flex; gap: 16px; justify-content: space-between; width: 100%; padding-top: 12px; font-size: 14px; color: var(--muted); }
.lightbox__count { font-variant-numeric: tabular-nums; color: var(--dim); }
.lightbox__close { position: fixed; top: 18px; right: 18px; }
.lightbox__nav {
  position: fixed; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.06); cursor: pointer; font-size: 28px; line-height: 1;
  transition: background .2s;
}
.lightbox__nav:hover { background: rgba(255,255,255,.16); }
.lightbox__nav--prev { left: 18px; }
.lightbox__nav--next { right: 18px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 80; background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
/* Hero text animates on load (not on scroll) so it paints right away */
@keyframes rise { from { opacity: .01; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.js .rise { animation: rise .8s var(--ease) both; }
.js .hero__title.rise { animation-delay: .06s; }
.js .hero__intro.rise { animation-delay: .12s; }
.js .hero__actions.rise { animation-delay: .18s; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .reel-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  :root { --header-h: 60px; }
  .menu-btn {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid var(--line-2); background: rgba(11,11,13,.5); cursor: pointer; z-index: 2;
  }
  .menu-btn__bars, .menu-btn__bars::before, .menu-btn__bars::after { display: block; width: 18px; height: 1.5px; background: var(--text); transition: transform .3s var(--ease), background .2s; position: relative; }
  .menu-btn__bars::before, .menu-btn__bars::after { content: ""; position: absolute; left: 0; }
  .menu-btn__bars::before { top: -6px; }
  .menu-btn__bars::after { top: 6px; }
  .menu-btn[aria-expanded="true"] .menu-btn__bars { background: transparent; }
  .menu-btn[aria-expanded="true"] .menu-btn__bars::before { transform: translateY(6px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-btn__bars::after { transform: translateY(-6px) rotate(-45deg); }
  .site-nav {
    position: fixed; inset: 0; z-index: 1; flex-direction: column; justify-content: center; align-items: stretch; gap: 0;
    padding: 80px var(--gutter) 40px; background: rgba(11,11,13,.97);
    opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; }
  .site-nav a { font: 600 38px/1.25 var(--display); color: var(--text); padding: 8px 0; border-radius: 0; border-bottom: 1px solid var(--line); background: none !important; }
  .site-nav a.site-nav__cta { margin: 24px 0 0; text-align: center; border-radius: 999px; border-bottom: 0; font: 600 17px/1 var(--sans); padding: 18px; color: var(--accent-ink); background: var(--accent) !important; }
  body.menu-open { overflow: hidden; }

  .facts__grid { grid-template-columns: repeat(2, 1fr); }
  .fact { padding: 20px 16px; border-bottom: 1px solid var(--line); }
  .fact:nth-child(odd) { padding-left: 0; }
  .fact:nth-child(2) { border-right: 0; }
  .fact:nth-child(n+3) { border-bottom: 0; }

  .featured { grid-template-columns: 1fr 1fr; }
  .vcard--hero { grid-column: 1 / -1; }
  .vcard--tall { aspect-ratio: 3 / 4; }

  .film, .film--flip { grid-template-columns: 1fr; }
  .film--flip .vcard { order: 0; }
  .uni { grid-template-columns: 1fr; }
  .uni__item:not(.uni__item--wide) { display: grid; grid-template-columns: minmax(0, 220px) 1fr; gap: 20px; align-items: center; }
  .uni__item:not(.uni__item--wide) .uni__text { margin-top: 0; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .deck { height: 420px; }
  .tcard { width: 84%; padding: 22px 22px 20px; }
  .tcard[data-pos="1"], .tcard[data-pos="1"]:hover { transform: translateX(-62%) translateY(40px) rotate(-5deg) scale(.92); }
  .tcard[data-pos="2"], .tcard[data-pos="2"]:hover { transform: translateX(-38%) translateY(58px) rotate(5deg) scale(.92); }
  .about__grid { grid-template-columns: 1fr; }
  .about__photo { position: relative; top: 0; max-width: 420px; }
  .prow__head { grid-template-columns: 28px 1fr auto 22px; gap: 4px 12px; }
  .index__n { grid-row: 1 / span 2; }
  .index__c { grid-column: 2; grid-row: 2; font-size: 13px; }
  .index__r { display: none; }
  .index__d { grid-column: 3; grid-row: 1 / span 2; }
  .prow__x { grid-column: 4; grid-row: 1 / span 2; }
  .prow__box { padding-left: 46px; }
}
@media (max-width: 640px) {
  .pfilter { border-radius: 22px; }
  .pfilter .chip { padding: 8px 12px 8px 10px; font-size: 13px; }
  .prow__box { flex-direction: column; align-items: flex-start; gap: 14px; padding: 4px 6px 22px; }
  .prow__poster { width: 100%; max-width: 320px; }
  .prow__poster--v { width: 132px; }
  .rb__pill { font-size: 14px; padding: 9px 15px 9px 12px; }
  .rb__track { animation-duration: 32s; }
  .rb--rev .rb__track { animation-duration: 28s; }
  .contact__social { gap: 8px; }
  .social { gap: 7px; padding: 10px 13px 10px 11px; font-size: 13.5px; }
  .social svg { width: 17px; height: 17px; }
  .deck { height: 330px; }
  .deck__hint { margin-top: 0; }
  .hero__foot .hero__scroll { display: none; }
  .hero__title { font-size: clamp(40px, 12vw, 58px); }
  .featured { grid-template-columns: 1fr; }
  .vcard--tall { aspect-ratio: 4 / 5; }
  .reel-grid { grid-template-columns: repeat(4, 72%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); scrollbar-width: thin; }
  .reel-grid .vcard { scroll-snap-align: start; }
  .gallery { columns: 2 140px; column-gap: 10px; }
  .gallery li { margin-bottom: 10px; }
  .steps { grid-template-columns: 1fr; }
  .specs div { grid-template-columns: 110px 1fr; }
  .lightbox__fig { max-width: 100vw; padding: 0 8px; }
  .lightbox__nav { top: auto; bottom: 18px; transform: none; }
  .lightbox__fig img { max-height: calc(100dvh - 170px); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .rise { animation: none; }
  .hero__loop { display: none; }
}
