/* ============================================================
   SAMIN SHORIF — PORTFOLIO ©2026
   All sizes, colours, radii, layers and motion come from tokens.css.
   Order: base → shared components → home page sections → responsive.
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

/* no grey/blue flash over cards and buttons when they're tapped on a phone */
html { scroll-behavior: auto; -webkit-tap-highlight-color: transparent; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body[data-loading] { overflow: hidden; height: 100vh; }

::selection { background: var(--accent); color: var(--accent-ink); }

/* keyboard users still get a clear focus ring (taps don't trigger it) */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2c2f28; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #3a3e34; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
/* "hidden" means hidden, even on elements whose own style sets a display (drafts rely on this) */
[hidden] { display: none !important; }

/* every multi-word display line gets the wider word gap (see --ws-display) */
h1, h2, h3, .project__title, .about__statement, .contact__title, .project__quote blockquote {
  word-spacing: var(--ws-display);
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-dim);
}

.container { width: var(--container); margin-inline: auto; }

.section {
  padding-block: var(--section-pad);
  position: relative;
  /* one hairline between every pair of sections; the first one follows the marquee, which has its own */
  border-top: 1px solid var(--line-soft);
}
.marquee + .section { border-top: 0; }

/* ---------- icons: one family (Phosphor Light, see assets/sprite.svg), one colour rule ---------- */
.icon {
  display: inline-block;
  width: var(--icon-md); height: var(--icon-md);
  flex: none;
  fill: currentColor;
}
.icon--sm { width: var(--icon-sm); height: var(--icon-sm); }
.icon--lg { width: var(--icon-lg); height: var(--icon-lg); }

/* ============================================================
   PRELOADER
   ============================================================ */
.preloader {
  position: fixed; inset: 0; z-index: var(--z-preloader);
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  will-change: transform;
}
/* the curtain's lower edge: a dome hanging below the panel. main.js grows it while the curtain lifts,
   so the middle trails the sides (a curtain being pulled up by its corners) */
.preloader::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%;
  height: var(--curtain-bulge, 0px);
  background: var(--bg);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  pointer-events: none;
}
.preloader__inner { text-align: center; overflow: hidden; padding-inline: var(--space-5); }
.preloader__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 5vw, 56px);
  letter-spacing: 0.04em;
  transform: translateY(110%);
}
.preloader__tag {
  font-family: var(--font-mono);
  font-size: var(--fs-label); letter-spacing: 0.3em;
  color: var(--ink-dim);
  margin-top: var(--space-3);
  opacity: 0;
}

/* ============================================================
   CURSOR (desktop only) — dot, link ring, circle label (data-cursor), tooltip pill (data-tip)
   ============================================================ */
.cursor {
  position: fixed; top: 0; left: 0; z-index: var(--z-cursor);
  pointer-events: none;
}
.cursor__dot {
  position: absolute; top: 0; left: 0;
  width: 12px; height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--accent);
  transition: width var(--dur-base) var(--ease-out), height var(--dur-base) var(--ease-out),
              margin var(--dur-base) var(--ease-out), opacity 0.3s;
}
.cursor__label {
  position: absolute; top: 0; left: 0;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: var(--fs-micro); letter-spacing: 0.18em;
  color: var(--accent-ink);
  white-space: nowrap;
  opacity: 0;
}
.cursor__tip {
  position: absolute; top: 0; left: 0;
  transform: translate(18px, 18px);
  padding: 6px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: var(--fs-micro); letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--dur-fast);
}
.cursor.is-active .cursor__dot { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
.cursor.is-active .cursor__label { opacity: 1; }
.cursor.is-link .cursor__dot {
  width: 36px; height: 36px;
  margin: -18px 0 0 -18px;
  background: transparent;
  border: 1.5px solid var(--accent);
}
.cursor.is-hidden .cursor__dot { opacity: 0; }
.cursor.has-tip .cursor__tip { opacity: 1; }
.cursor.tip-left .cursor__tip { transform: translate(calc(-100% - 18px), 18px); }
@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}
/* when the custom cursor shows a label, hide the OS cursor so it can't cover the text */
html.hide-native-cursor,
html.hide-native-cursor * { cursor: none !important; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav);
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--gutter);
  transition: background var(--dur-base), backdrop-filter var(--dur-base), border-color var(--dur-base), transform 0.5s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(13, 14, 12, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}
.nav.is-hidden { transform: translateY(-100%); }
/* phone menu open: the bar turns solid in the menu's own colour, quickly, so the page behind it
   never shows through, and the menu panel then grows down out of it with no visible seam.
   main.js removes this class only after the menu has fully closed again. */
.nav.is-menu-open {
  background: var(--bg-soft);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
  transition: background 0s, border-color 0s, transform 0.5s var(--ease-out);
}

.nav__logo { display: flex; align-items: center; gap: var(--space-3); }
.nav__logo-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  border-radius: var(--radius-sm);
}
.nav__logo-text {
  font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.16em;
}
.nav__logo-text em { font-style: normal; color: var(--ink-faint); margin-left: var(--space-2); }

.nav__links { display: flex; gap: clamp(18px, 2.4vw, 40px); }
.nav__links a {
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-dim);
  position: relative;
  padding: 6px 0;
  transition: color 0.3s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform var(--dur-base) var(--ease-out);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__burger {
  display: none;
  width: 40px; height: 40px;
  position: relative; z-index: var(--z-burger);
}
/* two-step morph, timed to the menu: opening = the lines meet in the middle, then rotate into ×;
   closing = un-rotate, then separate. Doing both at once with a snappy ease made the icon jump
   into place in ~0.1s while the menu was still sliding. */
.nav__burger span {
  position: absolute; left: 8px; right: 8px;
  height: 2px; background: var(--ink);
  transition: transform 0.26s var(--ease-in-out),
              top 0.2s cubic-bezier(0.4, 0, 0.2, 1) 0.22s;
}
.nav__burger.is-open span {
  transition: top 0.16s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s var(--ease-in-out) 0.13s;
}
.nav__burger span:nth-child(1) { top: 15px; }
.nav__burger span:nth-child(2) { top: 23px; }
.nav__burger.is-open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { top: 19px; transform: rotate(-45deg); }

/* ============================================================
   MOBILE MENU
   ============================================================ */
.menu {
  /* below the nav, so the burger's close (×) stays visible and tappable */
  position: fixed; inset: 0; z-index: var(--z-menu);
  background: var(--bg-soft);
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(24px, 8vw, 64px);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
}
.menu__links { display: flex; flex-direction: column; gap: var(--space-2); }
.menu__links a {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(40px, 11vw, 72px);
  line-height: 1.15;
  display: flex; align-items: baseline; gap: 18px;
  transform: translateY(40px); opacity: 0;
}
.menu__links a em {
  font-family: var(--font-mono); font-style: normal;
  font-size: var(--fs-control); color: var(--accent); letter-spacing: 0.1em;
}
.menu__footer {
  margin-top: var(--space-8);
  display: flex; flex-wrap: wrap; gap: var(--space-5);
}
.menu__footer a {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-mono); font-size: var(--fs-control);
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--ink-dim);
}

/* ============================================================
   BUTTONS & LINKS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: var(--space-4) 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-size: var(--fs-control);
  letter-spacing: var(--ls-control); text-transform: uppercase;
  position: relative; overflow: hidden;
  transition: color var(--dur-base) var(--ease-out), border-color var(--dur-base);
  white-space: nowrap;
}
.btn::before {
  content: ""; position: absolute; inset: 0;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease-out);
  border-radius: inherit;
}
.btn:hover::before { transform: translateY(0); }
.btn:hover { color: var(--accent-ink); border-color: var(--accent); }
.btn__text, .btn__arrow, .btn__icon { position: relative; z-index: 1; }
.btn__arrow { transition: transform 0.35s var(--ease-out); }
.btn:hover .btn__arrow { transform: translate(2px, -2px); }

.btn--fill { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn--fill::before { background: var(--ink); }
.btn--fill:hover { color: var(--bg); }

.btn--small { padding: 11px var(--space-5); font-size: var(--fs-label); }
/* the one persistent call to action: lime-filled, so it is the first thing the eye lands on in the bar */
.nav__cta { padding: 13px var(--space-5); gap: var(--space-2); }
.btn--big { padding: 22px 36px; }
.btn--big .btn__icon { width: var(--icon-lg); height: var(--icon-lg); }

/* text link with an arrow: "Read the case study →" */
.link-arrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  align-self: flex-start;
  font-family: var(--font-mono); font-size: var(--fs-control);
  letter-spacing: var(--ls-control); text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: 3px;
  transition: gap var(--dur-base) var(--ease-out), border-color var(--dur-base);
}
.link-arrow:hover { gap: var(--space-3); border-color: var(--accent); }

/* ============================================================
   STATUS CHIPS — one component, four meanings. Lime is reserved for LIVE.
     live    = in production, used by real people
     shipped = finished and running
     ongoing = a body of work that keeps growing
     dev     = being built (dashed outline)
   ============================================================ */
.status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px var(--space-3) 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-size: var(--fs-micro);
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
.status--live { color: var(--accent); border-color: var(--accent-line); background: var(--accent-wash); }
.status--dev { color: var(--ink-dim); border-style: dashed; }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line-soft);
  padding-block: clamp(16px, 2.4vw, 28px);
  background: var(--bg-soft);
}
.marquee__track { display: flex; width: max-content; will-change: transform; }
/* no padding between items: every gap in the band (word→×, ×→word, and the loop seam) is the × padding */
.marquee__item {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(28px, 4.6vw, 64px);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.marquee__item b {
  color: var(--accent);
  font-weight: 600;
  padding-inline: 0.35em;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  /* a little shorter than the screen, so the top of the BUILD × SHIP band shows at the fold:
     real content peeking in is a clearer "keep going" signal than a label saying so */
  min-height: calc(100svh - var(--hero-peek));
  display: flex; flex-direction: column; justify-content: space-between;
  padding-top: calc(var(--nav-h) + var(--space-3));
  padding-bottom: var(--space-5);
  position: relative;
  overflow: hidden;
}
.hero__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.hero__grain {
  position: fixed; inset: -100px; z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__top, .hero__bottom {
  display: flex; justify-content: space-between; align-items: center;
  position: relative; z-index: 2;
  gap: var(--space-4);
}
.hero__center { position: relative; z-index: 2; padding-block: var(--space-5); }

/* identity line: who he is, in one glance. Product Engineer is the title; the rest qualify it. */
.hero__id { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }
.hero__id li { color: var(--ink-dim); }
.hero__id li:first-child { color: var(--ink); }
.hero__id li + li::before { content: "·"; margin-right: var(--space-3); color: var(--ink-faint); }

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-display-hero);
  line-height: 0.92;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}
.hero__line { display: block; overflow: hidden; padding-block: 0.04em; }
.hero__line--outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
}
.hero__line .char { display: inline-block; will-change: transform; }

.hero__sub {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: var(--space-6);
  margin-top: clamp(24px, 4vh, 48px);
  flex-wrap: wrap;
}
.hero__desc {
  max-width: 420px;
  color: var(--ink-dim);
  font-size: clamp(15px, 1.2vw, 18px);
}

/* ============================================================
   SECTION HEADS — one pattern everywhere:
   label, then --label-gap, then whatever follows (title, or the section's own content)
   ============================================================ */
.section__head { margin-bottom: var(--head-gap); }
.section__head--label-only { margin-bottom: var(--label-gap); }
.section__label {
  color: var(--accent);
  margin-bottom: var(--label-gap);
  display: inline-flex; align-items: center; gap: var(--space-3);
}
.section__head--label-only .section__label { margin-bottom: 0; }
.section__label::before {
  content: ""; width: 36px; height: 1px; background: var(--accent);
  display: inline-block;
}
.section__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-h2);
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: var(--ls-display);
}
/* the outlined half of a heading: brighter and thicker than before so it reads as words, not texture */
.section__title span {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(232, 230, 225, 0.85);
}
.section__note {
  max-width: 520px;
  color: var(--ink-dim);
  margin-top: var(--space-5);
}

/* ============================================================
   PROJECTS
   ============================================================ */
.work { background: var(--bg); }
.work__list { display: grid; gap: clamp(16px, 2vw, 28px); counter-reset: project; }

/* numbering is automatic: hidden drafts are skipped, so publishing one renumbers the list */
.project {
  counter-increment: project;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur-base);
}
.project[hidden] { display: none; }
.project:hover, .project:focus-within { border-color: var(--accent-line); }
.project__index::before { content: counter(project, decimal-leading-zero); }

/* ---- the card: everything a visitor needs to decide is on show, and the button is the card's last word ---- */
.project__card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(220px, 31vw, 440px);
  grid-template-areas: "info visual" "foot visual";
  column-gap: clamp(28px, 4.5vw, 72px);
  row-gap: var(--space-6);
  padding: clamp(24px, 3.4vw, 48px);
  cursor: pointer;
}
.project__info { grid-area: info; display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.project__foot { grid-area: foot; align-self: end; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-5); }

.project__index { color: var(--ink-faint); font-size: var(--fs-control); transition: color 0.3s; }
.project__card:hover .project__index { color: var(--accent); }

/* index + status chip + category, always visible, also on phones */
.project__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.project__tags { font-size: var(--fs-micro); }

.project__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-h3);
  line-height: 1.05;
  text-transform: uppercase;
}
.project__info .project__summary { max-width: 52ch; }
.project__info .project__quote blockquote { font-size: clamp(17px, 1.5vw, 21px); }

.project__visual {
  grid-area: visual; align-self: center;
  aspect-ratio: 200 / 140;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg);
  padding: var(--space-4);
  transform: rotate(2.5deg) scale(0.96);
  opacity: 0.8;
  transition: transform 0.55s var(--ease-out), opacity var(--dur-base), border-color var(--dur-base);
  overflow: hidden;
}
.project__visual svg { width: 100%; height: 100%; }
.project__card:hover .project__visual { transform: none; opacity: 1; border-color: var(--accent-line); }

/* The button is a real link (or button), and its ::after stretches over the whole card,
   so the card is clickable everywhere. It is static, so the stretch is sized by .project__card. */
.project__go { display: inline-flex; border-radius: var(--radius-pill); }
.project__go::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); }
.project__go:focus-visible { outline: none; }
.project__go:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 3px; }
.project__go .btn { min-height: 52px; padding-inline: var(--space-6); }
/* the card is the hover target, so the button fills wherever the pointer is on it */
.project__card:hover .btn::before { transform: translateY(0); }
.project__card:hover .btn { color: var(--accent-ink); border-color: var(--accent); }
.project__card:hover .btn--fill { color: var(--bg); }
.btn--go .btn__arrow { transition: transform 0.35s var(--ease-out); }
.project__card:hover .btn--go .btn__arrow { transform: translateX(4px); }

.sv-panel    { fill: rgba(232,230,225,0.05); stroke: rgba(232,230,225,0.16); }
.sv-chip     { fill: var(--accent-wash);  stroke: var(--accent-line); }
.sv-dim      { fill: rgba(232,230,225,0.18); }
.sv-bar      { fill: rgba(232,230,225,0.25); }
.sv-acc      { fill: var(--accent); }
.sv-line     { stroke: rgba(232,230,225,0.4); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.sv-acc-line { stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.sv-grid     { stroke: rgba(232,230,225,0.08); stroke-width: 1; }
.sv-area     { fill: rgba(214,251,65,0.08); }
.sv-dot      { fill: var(--accent); }
.sv-ring     { stroke: rgba(232,230,225,0.4); stroke-width: 2; fill: none; }
.sv-node     { fill: var(--panel); stroke: rgba(232,230,225,0.35); stroke-width: 2; }
.sv-node-acc { fill: rgba(214,251,65,0.14); stroke: var(--accent); stroke-width: 2; }
.sv-led      { fill: var(--accent); }
.sv-led-dim  { fill: rgba(214,251,65,0.3); }

/* "See what's inside": a plus that turns into a cross, and a label that follows the state */
.project__toggle { position: relative; width: 14px; height: 14px; z-index: 1; transition: transform 0.45s var(--ease-out); }
.project__toggle i {
  position: absolute; top: 50%; left: 50%;
  width: 14px; height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.project__toggle i:last-child { transform: translate(-50%, -50%) rotate(90deg); }
.project.is-open .project__toggle { transform: rotate(135deg); }
.go-close, .project.is-open .go-open { display: none; }
.project.is-open .go-close { display: inline; }

.project__body { height: 0; overflow: hidden; }
.project__body-inner {
  display: flex; gap: clamp(24px, 4vw, 72px); flex-wrap: wrap;
  margin-inline: clamp(24px, 3.4vw, 48px);
  padding-block: var(--space-6) clamp(24px, 3.4vw, 48px);
  border-top: 1px solid var(--line-soft);
}
/* ---- case-study body: summary → proof → Problem/Before/Built/Result → quote ---- */
.project__main {
  flex: 1 1 480px;
  max-width: 640px;
  display: flex; flex-direction: column; gap: var(--space-5);
}
.project__summary { color: var(--ink-dim); font-size: var(--fs-body-sm); }

.project__proof {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 14px 40px;
}
.project__proof li { display: flex; align-items: baseline; gap: 10px; }
.project__proof b {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-stat); line-height: 1;
  color: var(--accent);
}

.project__case > div {
  display: grid; grid-template-columns: 112px 1fr; gap: var(--space-4);
  padding-block: 14px;
  border-top: 1px solid var(--line-soft);
}
.project__case dt { color: var(--accent); font-size: var(--fs-micro); padding-top: 5px; }
.project__case dd { color: var(--ink-dim); font-size: var(--fs-body-sm); }

.project__case ul, .project__features { list-style: none; display: grid; gap: 10px; }
.project__case li, .project__features li { position: relative; padding-left: 20px; color: var(--ink-dim); }
.project__case li::before, .project__features li::before {
  content: ""; position: absolute; left: 0; top: 0.8em;
  width: 9px; height: 1px; background: var(--accent);
}
.project__case strong, .project__features strong { color: var(--ink); font-weight: 500; }

.project__quote { border-left: 2px solid var(--accent); padding: 2px 0 2px 20px; }
.project__quote blockquote {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(20px, 2vw, 27px); line-height: 1.3;
  color: var(--ink);
}
.project__quote figcaption { margin-top: var(--space-3); font-size: var(--fs-micro); }

.project__shots img { width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); }

/* tech chips, each with its logo (assets/sprite.svg, "t-" symbols) */
.project__stack {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: var(--space-2);
  align-content: flex-start;
  max-width: 360px;
}
.project__stack li {
  display: inline-flex; align-items: center; gap: var(--space-2);
  border: 1px solid var(--line);
  padding: 7px 13px 7px 11px; border-radius: var(--radius-pill);
  font-size: var(--fs-micro); color: var(--ink-dim);
  transition: border-color 0.3s, color 0.3s;
}
.project__stack .icon { width: 13px; height: 13px; }
.project__stack li:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   LAB — experiments, shown as cards so they read as different from the products above
   ============================================================ */
.lab { background: var(--bg); }
.lab__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  counter-reset: lab;
}
.lab-card {
  counter-increment: lab;
  display: flex; flex-direction: column; gap: var(--space-4);
  padding: clamp(22px, 2.4vw, 32px);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur-base), background var(--dur-base);
}
.lab-card:hover { border-color: var(--accent-line); background: var(--panel); }
.lab-card__top { display: flex; justify-content: space-between; align-items: center; }
.lab-card__index { color: var(--ink-faint); font-size: var(--fs-control); }
.lab-card__index::before { content: "L" counter(lab, decimal-leading-zero); }
.lab-card__visual {
  height: 150px;
  padding: var(--space-3);
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
}
.lab-card__visual svg { width: 100%; height: 100%; }
.lab-card__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-card-title); line-height: 1.05;
  text-transform: uppercase;
  margin-top: 6px;
}
.lab-card__tags { font-size: var(--fs-micro); margin-top: calc(var(--space-2) * -1); }
.lab-card__desc { color: var(--ink-dim); font-size: var(--fs-body-sm); }
.lab-card .project__stack { margin-top: auto; padding-top: var(--space-1); }

/* ============================================================
   ABOUT
   ============================================================ */
.about { background: var(--bg-soft); }

/* editorial split: the statement sits above the text in the right column, beside the photo */
.about__statement {
  font-family: var(--font-display); font-weight: 500;
  font-size: var(--fs-statement);
  line-height: 1.2;
  max-width: 22em;
  text-wrap: balance;
}
.about__statement .word { opacity: 0.14; display: inline-block; }

.about__grid {
  display: grid;
  grid-template-columns: clamp(260px, 25vw, 360px) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: start;
}
.about__body { display: flex; flex-direction: column; gap: clamp(36px, 4vw, 56px); }
.about__text { color: var(--ink-dim); margin-bottom: 22px; max-width: 560px; }
.about__text strong { color: var(--ink); font-weight: 500; }
.about__col .about__text:last-child { margin-bottom: 0; }

/* Layout B: the photo row ends with the photo; tools and background run full width underneath,
   so there is no empty column below the photo. A hairline above, no boxes: it should read as prose. */
.about__more {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0 clamp(40px, 7vw, 120px);
  margin-top: clamp(48px, 6vw, 88px);
  padding-top: clamp(28px, 3vw, 44px);
  border-top: 1px solid var(--line-soft);
}
.about__more .about__text { max-width: 520px; }

/* ---- photo frame: one photo at a time, the next is revealed over it (main.js) ----
   Without JS only the first photo shows. */
.about__media { position: relative; width: 100%; }
.photo-stack {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-md);
  box-shadow: 0 28px 56px -28px rgba(0, 0, 0, 0.75);
  cursor: pointer;
  touch-action: pan-y;
}
.photo-stack__card {
  position: absolute; inset: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--panel);
  will-change: clip-path;
}
/* Per-photo alignment, set inline on each <img> and tuned in lab/photo-align.html:
   --z  zoom (1 = whole photo, 1.5 = a 1.5x closer crop)
   --fx / --fy  the point of the photo (0 to 1) that sits at the centre of the frame
   Used instead of object-position because every photo is already 4:5, so there is nothing to slide. */
.photo-stack__card img {
  position: absolute;
  max-width: none;              /* the global img { max-width: 100% } would stop the zoom at 1x */
  width: calc(var(--z, 1) * 100%); height: calc(var(--z, 1) * 100%);
  left: calc((0.5 - var(--fx, 0.5) * var(--z, 1)) * 100%);
  top: calc((0.5 - var(--fy, 0.5) * var(--z, 1)) * 100%);
  object-fit: cover;
  pointer-events: none;
  user-select: none; -webkit-user-drag: none;
  will-change: transform;
}
.photo-stack::after {           /* hairline over the photos, so every frame has the same edge */
  content: ""; position: absolute; inset: 0; z-index: 10;
  border-radius: inherit; border: 1px solid var(--line-soft);
  pointer-events: none;
}
.photo-stack:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
html:not(.js) .photo-stack__card:nth-child(n+2) { display: none; }
/* which-photo marker: three short, faint dashes under the frame. Present for anyone who looks, not for anyone who doesn't. */
.photo-ticks { display: flex; gap: var(--space-1); margin-top: var(--space-3); }
.photo-ticks i {
  width: 14px; height: 2px; border-radius: 1px; background: var(--line);
  transition: background var(--dur-base) var(--ease-out), width var(--dur-base) var(--ease-out);
}
.photo-ticks i.is-on { width: 22px; background: var(--ink-faint); }

/* ============================================================
   CONTACT — headline across, then a two-column band:
   the reason (note) on the left, the decision (three channels) on the right
   ============================================================ */
.contact { background: var(--bg-soft); padding-bottom: var(--space-9); }
.contact__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--fs-display-contact);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: var(--ls-display);
  margin-bottom: var(--head-gap);
}
.contact__line { display: block; overflow: hidden; padding-block: 0.05em; white-space: nowrap; }
.contact__line > span { display: block; }
.contact__line--accent { color: var(--accent); }

.contact__band {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(300px, 5fr);
  column-gap: var(--space-8);
  align-items: stretch;
}
.contact__words { display: flex; flex-direction: column; align-items: flex-start; }
.contact__note {
  max-width: 30em;
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--ink);
  text-wrap: pretty;
}
.contact__aside {
  max-width: 34em;
  color: var(--ink-dim);
  font-size: 15px;
  margin-top: var(--space-3);
  margin-bottom: var(--space-5);
}

/* kept for gymdesk/index.html, which still uses a row of two buttons */
.contact__actions { display: flex; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-4); }

/* ---------- the three channels: one stack, one width, one height ---------- */
.contact__channels { display: flex; flex-direction: column; gap: var(--space-3); }
.contact__channel {
  width: 100%;
  min-height: 64px;
  padding: 0 var(--space-5);
  gap: var(--space-3);
  justify-content: center;
  transition: color var(--dur-base) var(--ease-out), border-color var(--dur-base), transform 140ms var(--ease-out);
}
.contact__channel .btn__icon { width: var(--icon-lg); height: var(--icon-lg); }
.contact__channel:active { transform: scale(0.98); }

.contact__channel--outline { border-color: var(--ink-faint); color: var(--ink); }

/* addresses read better in their real case; centered so "Copied" doesn't jump around */
.btn--email { text-transform: none; letter-spacing: 0.04em; }
/* phones show a mail icon (tap opens the mail app); computers show a copy icon (click copies) */
.btn--email .icon-copy, .btn--email .icon-check { display: none; }
@media (hover: hover) and (pointer: fine) {
  .btn--email .icon-mail { display: none; }
  .btn--email .icon-copy { display: block; }
}
.btn--email.is-copied .icon-mail, .btn--email.is-copied .icon-copy { display: none; }
.btn--email.is-copied .icon-check { display: block; color: var(--accent); }
.btn--email.is-copied:hover .icon-check { color: inherit; }

/* ---------- social links: readable, full ink, 44px targets ---------- */
.contact__socials {
  display: grid; grid-template-columns: repeat(2, max-content);   /* two links per column */
  column-gap: var(--space-8); row-gap: var(--space-2);
  margin-top: auto;
}
.contact__socials a {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: 44px;
  font-family: var(--font-mono); font-size: var(--fs-control);
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--ink-dim);
  position: relative;
  transition: color var(--dur-fast) ease;
}
.contact__socials a::after {
  content: ""; position: absolute; left: 0; bottom: 8px;
  width: 100%; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform var(--dur-base) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .contact__socials a:hover { color: var(--ink); }
  .contact__socials a:hover::after { transform: scaleX(1); transform-origin: left; }
}

/* ============================================================
   FOOTER — one quiet line on the same field as the close above it
   ============================================================ */
.footer {
  border-top: 1px solid var(--line-soft);
  padding-block: 28px;
  background: var(--bg-soft);
}
.footer__inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--space-4); flex-wrap: wrap;
}
.footer__inner > p { font-size: var(--fs-control); color: var(--ink-dim); }   /* contrast 5.9:1 (was 3.3:1, failed AA) */
.footer__top {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: 44px;
  font-size: var(--fs-control);
  color: var(--ink);
  transition: color var(--dur-fast) ease;
}
@media (hover: hover) and (pointer: fine) { .footer__top:hover { color: var(--accent); } }

/* ============================================================
   REVEAL DEFAULTS (JS adds motion; keep visible without JS)
   ============================================================ */
.js [data-reveal] { opacity: 0; transform: translateY(44px); }
.js [data-hero-fade] { opacity: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
}

@media (max-width: 820px) {
  .nav__links { display: none; }
  /* phones: "Let's talk" stays next to the burger, but as a compact pill (label only, tighter tracking)
     so it reads as a button, not a banner */
  .nav__cta {
    margin-left: auto; margin-right: var(--space-1);
    min-height: 36px; padding: 0 var(--space-4);
    letter-spacing: 0.08em;
  }
  .nav__cta .btn__arrow { display: none; }
  .nav__burger { display: block; }
  .nav__logo-text { display: none; }

  .hero__sub { flex-direction: column; align-items: flex-start; }
  .hero__bottom { flex-wrap: wrap; gap: var(--space-3); }

  .about__grid { grid-template-columns: 1fr; }
  .about__more { grid-template-columns: 1fr; }
  /* flush with the text column (it used to be centred and narrower, so its edge matched nothing) */
  .about__media { width: 100%; max-width: 360px; }

  .project__card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "info" "visual" "foot";
    row-gap: var(--space-5);
  }
  .project__visual { transform: none; opacity: 1; width: 100%; max-width: 440px; }
  .project__go, .project__go .btn { width: 100%; }
  .project__go .btn { justify-content: center; }
  .project__body-inner { padding-top: var(--space-5); }

  .lab__grid { grid-template-columns: 1fr; max-width: 560px; }

  .contact__actions .btn--big { width: 100%; justify-content: center; }  /* gymdesk */
  .contact__band { grid-template-columns: 1fr; row-gap: 0; }
  .contact__words { display: contents; }        /* lets the channels sit between the text and the socials */
  .contact__note { order: 1; }
  .contact__aside { order: 2; margin-bottom: var(--space-7); }
  .contact__channels { order: 3; max-width: 520px; margin-bottom: var(--space-6); }
  .contact__socials { order: 4; margin-top: 0; }
}

@media (max-width: 520px) {
  body { font-size: var(--fs-body-sm); }
  .container { width: calc(100% - 40px); }
  .hero__id { flex-direction: column; }
  /* phone hero: the name runs the full width of the screen (SHORIF is the widest line), and the hero stops
     at 600px, so a tall phone doesn't get a screenful of empty space between the title and the identity line */
  .hero { min-height: min(calc(100svh - var(--hero-peek)), 600px); }
  .hero__title { font-size: calc((100vw - 40px) / 3.8); }   /* SHORIF measures 3.73em: this fills the container with a little slack */
  .hero__id li + li::before { display: none; }
  .btn--big { padding: 18px var(--space-5); font-size: var(--fs-label); }
  .contact__title { font-size: clamp(34px, 10.5vw, 48px); }
  .contact__line { white-space: normal; }       /* line 1 wraps to LET'S BUILD / SOMETHING here, on purpose */
  .contact__note { font-size: var(--fs-body-sm); }
  .contact__channels { max-width: none; }
  .contact__channel { min-height: 56px; padding: 0 var(--space-4); }
  .btn--email { white-space: normal; }
  .contact__socials { column-gap: var(--space-7); }
  .contact { padding-bottom: var(--space-8); }
  .footer__inner { gap: 0 var(--space-4); }
  .footer__top { display: none; }                  /* phones: no "back to top"; © left, tagline right */
  .project__case > div { grid-template-columns: 1fr; gap: 6px; }
  .preloader__tag { letter-spacing: 0.2em; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal], .js [data-hero-fade] { opacity: 1; transform: none; }
  .contact__channel:active { transform: none; }
}
