/* ============================================================
   ASIM SYED — PORTFOLIO No.2
   Parchment & charcoal, grid paper, synapse constellation.
   Inspired-by-Synapser vibe: two inks, mono annotations,
   serif italic accents, scroll-driven scenes.
   ============================================================ */

:root {
  --paper: #dcd8c0;
  --ink: #535352;
  --ink-soft: rgba(83, 83, 82, 0.55);
  --line: rgba(83, 83, 82, 0.25);
  --grid: rgba(110, 108, 98, 0.16);
  --accent: #c14a16;
  --font-sans: "General Sans", sans-serif;
  --font-serif: "Newsreader", serif;
  --font-mono: "IBM Plex Mono", monospace;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
}

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

html.lenis { height: auto; scroll-behavior: auto; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

/* ---------- paper texture ---------- */
.paper {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 72px 72px;
}
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 150;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 9s steps(8) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
}

main { position: relative; z-index: 1; }

/* ---------- square cursor ---------- */
@media (hover: hover) and (pointer: fine) {
  body, a, button, .row, .works-btn { cursor: none; }
}
.cursor-sq {
  position: fixed; left: 0; top: 0;
  width: 10px; height: 10px;
  background: var(--accent);
  z-index: 300;
  pointer-events: none;
  opacity: 0;
  transition: width 0.25s ease, height 0.25s ease;
}
body.sq-hover .cursor-sq { width: 24px; height: 24px; }
@media (hover: none), (pointer: coarse) {
  .cursor-sq { display: none; }
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- preloader (brick build) ---------- */
.preloader {
  position: fixed; inset: 0;
  background: var(--ink);
  color: var(--paper);
  z-index: 400;
  display: flex; align-items: center; justify-content: center;
}
.preloader-stage {
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(1.3rem, 3vw, 2.1rem);
}
/* the mark reuses the nav logo's brick geometry (top-left + bottom-right) */
.pl-mark {
  position: relative;
  width: clamp(64px, 9vw, 104px);
  height: clamp(44px, 6.2vw, 72px);
}
.pl-brick {
  position: absolute;
  width: 60%; height: 45%;
  will-change: transform, opacity;
}
.pl-brick-a { top: 0; left: 0; background: var(--paper); }   /* paper, not ink — must read on the charcoal panel */
.pl-brick-b { bottom: 0; right: 0; background: var(--accent); }
/* wordmark: collapsed A/S wipes open to ASIM SYED (widths animated in JS) */
.pl-name {
  display: flex; align-items: center;
  font-weight: 700; letter-spacing: -0.02em;
  font-size: clamp(1.5rem, 5vw, 3rem); line-height: 1;
}
.pl-seg { min-width: 0; overflow: hidden; white-space: nowrap; }
.pl-seg-full { max-width: 0; opacity: 0; }
.pl-mortar {
  width: clamp(120px, 22vw, 240px);
  height: 2px;
  background: rgba(220, 216, 192, 0.16);
  overflow: hidden;
}
.pl-mortar-fill { display: block; height: 100%; width: 0%; background: var(--accent); }
.preloader-foot {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: flex-end; justify-content: center;
  padding: var(--pad);
}
.preloader-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  opacity: 0.55;
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: stretch; justify-content: space-between;
  padding: clamp(0.9rem, 2vw, 1.5rem) var(--pad);
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav-logo {
  display: flex; gap: 0.6rem; align-items: center;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.1;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.45rem 0.8rem;
}
.nav-mark {
  position: relative;
  width: 26px; height: 18px;
}
.brick {
  position: absolute;
  width: 60%; height: 45%;
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}
.brick-a { top: 0; left: 0; background: var(--ink); }
.brick-b { bottom: 0; right: 0; background: var(--accent); }
/* hover: the bricks trade rows — orange rises to the top, ink drops down */
.nav-logo:hover .brick-a { transform: translateY(122%); }
.nav-logo:hover .brick-b { transform: translateY(-122%); }
/* name: collapsed "A/S" monogram that wipes open to the full wordmark on hover */
.nav-name { display: flex; align-items: center; }
.nav-seg {
  min-width: 0; overflow: hidden; white-space: nowrap;
  transition: max-width 0.45s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.3s ease;
}
.nav-seg-mono { max-width: 3rem; }
.nav-seg-full { max-width: 0; opacity: 0; }
.nav-logo:hover .nav-seg-mono { max-width: 0; opacity: 0; }
.nav-logo:hover .nav-seg-full { max-width: 9rem; opacity: 1; }
.nav-box {
  display: flex; align-items: center;
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}
.nav-box a {
  padding: 0.7rem clamp(0.8rem, 2vw, 1.6rem);
  color: var(--ink-soft);
  transition: color 0.25s ease, background 0.25s ease;
}
.nav-box a.is-active, .nav-box a:hover { color: var(--accent); font-weight: 600; }
.nav-side {
  display: flex; align-items: center;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 0.7rem 1rem;
  font-variant-numeric: tabular-nums;
}
.dom-icon-wrap {
  display: flex; align-items: center;
  max-width: 0; overflow: hidden; opacity: 0;
  transition: max-width 0.35s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.3s ease, margin-right 0.35s ease;
}
.nav-side:hover .dom-icon-wrap { max-width: 1.3rem; opacity: 1; margin-right: 0.5rem; }
.dom-icon { width: 1.05rem; height: 1.05rem; color: var(--ink); display: block; }
@media (max-width: 880px) {
  .nav-side { display: none; }
  .nav-box { font-size: 0.62rem; }
}

/* ---------- Cologne Cathedral popup ---------- */
.dom {
  position: fixed; inset: 0; z-index: 130;
  visibility: hidden; pointer-events: none;
}
.dom.is-open { visibility: visible; pointer-events: auto; }
.dom-backdrop {
  position: absolute; inset: 0;
  background: rgba(28, 28, 27, 0.55);
  opacity: 0; transition: opacity 0.4s ease;
}
.dom.is-open .dom-backdrop { opacity: 1; }
.dom-card {
  position: absolute; top: 50%; left: 50%;
  width: min(90vw, 390px);
  transform: translate(-50%, -48%) scale(0.96);
  opacity: 0;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 0 30px 80px rgba(28, 28, 27, 0.35);
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.4s ease;
}
.dom.is-open .dom-card { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.dom-close {
  position: absolute; top: 0.7rem; right: 0.7rem; z-index: 2;
  width: 1.9rem; height: 1.9rem;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line); color: var(--ink);
  font-family: var(--font-mono); font-size: 0.8rem;
  transition: background 0.25s ease, color 0.25s ease;
}
.dom-close:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.dom-stage {
  position: relative;
  aspect-ratio: 1 / 0.82;
  background:
    linear-gradient(rgba(83, 83, 82, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 83, 82, 0.06) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px, 28px 28px, auto;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.dom-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
.dom-canvas:active { cursor: grabbing; }
.dom-fallback {
  position: absolute; top: 50%; left: 50%;
  width: 46%; height: 46%;
  transform: translate(-50%, -50%);
  color: var(--ink); opacity: 0; display: none;
}
.dom.no3d .dom-canvas { display: none; }
.dom.no3d .dom-fallback { display: block; opacity: 0.85; }
.dom-loader {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.18em;
  color: var(--ink-soft); opacity: 0; pointer-events: none;
}
.dom.dom-loading .dom-loader { opacity: 1; }
.dom.dom-loading .dom-stage-tag { opacity: 0; }
.dom-dots { animation: domdots 1.2s steps(4) infinite; }
@keyframes domdots { 0% { opacity: 0.2; } 50% { opacity: 1; } 100% { opacity: 0.2; } }
.dom-stage-tag {
  position: absolute; left: 0.8rem; bottom: 0.7rem;
  font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.16em;
  color: var(--ink-soft);
}
.dom-body { padding: clamp(1.1rem, 3vw, 1.5rem); }
.dom-kicker { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.16em; color: var(--accent); }
.dom-title {
  margin-top: 0.5rem;
  font-family: var(--font-serif); font-weight: 400; font-style: italic;
  font-size: clamp(2rem, 6vw, 2.6rem); line-height: 1; letter-spacing: -0.01em;
}
.dom-lead {
  margin-top: 0.7rem;
  font-size: 0.92rem; line-height: 1.55; color: var(--ink);
}
.dom-lead em { color: var(--accent); font-style: normal; }
.dom-facts { margin-top: 1rem; }
.dom-facts li {
  display: flex; gap: 0.7rem; align-items: baseline;
  padding: 0.55rem 0;
  border-top: 1px dashed var(--line);
  font-size: 0.82rem; line-height: 1.4; color: var(--ink-soft);
}
.dom-facts li span {
  flex: 0 0 3.6rem;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  color: var(--ink); font-weight: 500;
}
.dom-note {
  margin-top: 1rem;
  font-family: var(--font-serif); font-style: italic; font-size: 0.95rem; color: var(--ink-soft);
}

/* ---------- 001 hero ---------- */
.hero { position: relative; }
.hero-stage {
  position: relative;
  height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  overflow: hidden;
}
.constellation { position: absolute; inset: 0; }
.syn-lines {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
}
.syn-lines line {
  stroke: var(--ink);
  stroke-opacity: 0.3;
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}
.kw {
  position: absolute;
  left: 0; top: 0;
  will-change: transform;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.9rem, 1.5vw, 1.3rem);
  background: var(--paper);
  padding: 0 0.4em;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .kw:nth-child(even) { display: none; }
}
.hero-core {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  will-change: transform, opacity;
}
canvas.hero-mark { display: block; }
.hero-sub {
  position: relative;
  margin-top: 1.2rem;
  font-family: var(--font-mono);
  font-size: clamp(0.62rem, 1.1vw, 0.78rem);
  letter-spacing: 0.32em;
  background: var(--paper);
  padding: 0 0.6em;
  display: flex; align-items: center;
  white-space: nowrap;
}
.rotor {
  position: relative;
  display: inline-block;
  overflow: hidden;
  height: 1.5em;
  vertical-align: bottom;
}
.rotor span {
  display: inline-block;
  white-space: nowrap;
  font-weight: 600;
  color: var(--accent);
}
.rotor span + span {
  position: absolute;
  left: 0; top: 0;
  opacity: 0;
}
.hero-hint {
  position: absolute;
  bottom: clamp(1.2rem, 3vh, 2.2rem);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.3em;
  color: var(--ink-soft);
}

/* ---------- 002 manifesto ---------- */
.manifesto {
  padding: clamp(6rem, 14vw, 12rem) 0 clamp(5rem, 10vw, 9rem);
  overflow: hidden;
}
.m-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--accent);
  padding: 0 var(--pad);
  margin-bottom: clamp(3rem, 8vw, 6rem);
}
.strip {
  font-weight: 700;
  font-size: clamp(1.8rem, 5.2vw, 4.6rem);
  letter-spacing: -0.01em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  will-change: transform;
}
.strip-1 { margin-left: 18vw; }
.strip-2 { margin: clamp(3rem, 9vw, 7rem) 0 0 48vw; }
.strip-3 { margin: clamp(3rem, 9vw, 7rem) 0 0 8vw; }
.mrotor {
  position: relative; display: inline-block; overflow: hidden;
  height: 1em; line-height: 1; vertical-align: bottom;
  color: var(--accent);
}
.mrotor > span { display: inline-block; white-space: nowrap; line-height: 1; }
.m-body {
  margin-top: clamp(5rem, 12vw, 10rem);
  padding: 0 var(--pad);
  display: flex; justify-content: flex-end;
}
.m-body p {
  max-width: 30rem;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.65;
}
.m-body em { font-size: 1.15em; }

/* ---------- interlude square ---------- */
.interlude { position: relative; }
.interlude-stage {
  height: 100svh;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.square {
  width: 110px; height: 110px;
  background: var(--ink);
  will-change: transform;
}
.interlude-text {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  color: var(--paper);
  font-weight: 700;
  font-size: clamp(1.6rem, 5vw, 4rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  opacity: 0;
  white-space: nowrap;
}
.interlude-text em { text-transform: none; color: var(--accent); }

/* ---------- 003 works ---------- */
.works { position: relative; }
.works-stage {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  gap: clamp(1.2rem, 3vh, 2.2rem);
  padding: clamp(5rem, 10vh, 7rem) 0 clamp(1.5rem, 4vh, 3rem);
  overflow: hidden;
}
.w-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--accent);
  padding: 0 var(--pad);
  display: flex; justify-content: space-between;
}
.w-count { font-variant-numeric: tabular-nums; }

.strip-wrap { overflow: hidden; }
.strip-track {
  display: flex; align-items: center;
  gap: clamp(0.8rem, 2vw, 1.6rem);
  will-change: transform;
  width: max-content;
}
.tile {
  position: relative;
  width: clamp(180px, 26vw, 360px);
  aspect-ratio: 16 / 11;
  flex-shrink: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}
.tile-dark { background: var(--ink); color: var(--paper); }
.tile-light { background: var(--paper); color: var(--ink); }
.tile:hover { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.tile:hover .tile-cap { color: var(--accent); opacity: 1; }
.tile:hover .tile-big { color: var(--accent); }
.tile-big {
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 5rem);
  letter-spacing: -0.02em;
  line-height: 1;
}
.tile-cap {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  opacity: 0.7;
}

.works-meta {
  display: grid;
  grid-template-columns: 1.4fr 1.1fr 1fr 0.7fr auto;
  gap: clamp(1rem, 2.5vw, 2.5rem);
  align-items: start;
  padding: 0 var(--pad);
}
.meta-key {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.meta-val {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.works-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: inherit;
  background: none;
  border: 1px solid var(--line);
  padding: 0.85rem 1.4rem;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease;
}
.works-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
@media (max-width: 880px) {
  .works-meta { grid-template-columns: 1fr 1fr; }
  .works-btn { grid-column: 2; justify-self: end; }
}

.works-title {
  font-weight: 700;
  font-size: clamp(2.6rem, 9.5vw, 8.6rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  padding: 0 var(--pad);
  white-space: nowrap;
}

/* ---------- 004 profile ---------- */
.profile { padding: clamp(6rem, 14vw, 12rem) var(--pad); }
.profile .m-label { padding: 0; }
.profile-statement {
  font-weight: 600;
  font-size: clamp(1.5rem, 3.6vw, 2.9rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 56rem;
  text-wrap: balance;
}
.profile-statement em { font-size: 1.08em; }

.profile-grid {
  margin-top: clamp(3.5rem, 8vw, 6rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 1px solid var(--line);
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
}
.p-col li {
  font-size: 0.86rem;
  color: var(--ink-soft);
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--line);
}
@media (max-width: 880px) { .profile-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .profile-grid { grid-template-columns: 1fr; } }

.profile-stats {
  margin-top: clamp(3.5rem, 8vw, 6rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.ps-num, .ps-x {
  font-weight: 700;
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ps-x { color: var(--accent); }
.ps p {
  margin-top: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}
@media (max-width: 720px) { .profile-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 005 contact ---------- */
.contact {
  background: var(--ink);
  color: var(--paper);
  position: relative;
}
.contact::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(220, 216, 192, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 216, 192, 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
}
.contact-inner {
  position: relative;
  min-height: 92svh;
  display: flex; flex-direction: column;
  padding: clamp(4rem, 9vw, 7rem) var(--pad) clamp(2rem, 4vw, 3rem);
}
.c-logo {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
}
.c-logo span {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  opacity: 0.6;
}
.c-title {
  margin-top: clamp(3rem, 8vw, 6rem);
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(3.2rem, 10.5vw, 9.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
}
.c-email {
  margin-top: clamp(1.5rem, 4vw, 3rem);
  align-self: flex-start;
  font-weight: 500;
  font-size: clamp(1.4rem, 4.6vw, 3.8rem);
  letter-spacing: -0.01em;
  opacity: 0.85;
  position: relative;
}
.c-email::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}
.c-email:hover::after { transform: scaleX(1); transform-origin: left; }
.c-actions { margin-top: clamp(2rem, 5vw, 3.5rem); }
.c-btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  border: 1px solid rgba(220, 216, 192, 0.4);
  padding: 0.9rem 1.6rem;
  transition: background 0.25s ease, color 0.25s ease;
}
.c-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }

.c-cols {
  margin-top: auto;
  padding-top: clamp(4rem, 8vw, 6rem);
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2rem;
  align-items: end;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  line-height: 1.8;
}
.c-col .meta-key { opacity: 0.55; margin-bottom: 0.3rem; }
.c-col a:hover { opacity: 0.7; }
.c-copy { opacity: 0.55; }
@media (max-width: 880px) {
  .c-cols { grid-template-columns: 1fr 1fr; }
  .c-copy { order: 5; grid-column: 1 / -1; }
}

/* ---------- case overlay ---------- */
.case {
  position: fixed; inset: 0;
  z-index: 120;
  visibility: hidden;
  pointer-events: none;
}
.case.is-open { visibility: visible; pointer-events: auto; }
.case-zoom {
  position: fixed;
  background: var(--ink);
  will-change: transform;
}
.case-page {
  position: absolute; inset: 0;
  overflow-y: auto;
  background: transparent;
  color: var(--paper);
  padding: clamp(1.5rem, 4vw, 3.5rem) var(--pad) clamp(2rem, 5vw, 4rem);
  display: flex; flex-direction: column;
  gap: clamp(1.6rem, 3.5vh, 2.8rem);
  opacity: 0;
}
.case-page::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(220, 216, 192, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 216, 192, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
}
.case-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  opacity: 0.6;
}
.case-close, .case-next {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--paper);
  background: none;
  border: 1px solid rgba(220, 216, 192, 0.4);
  padding: 0.8rem 1.3rem;
  transition: background 0.25s ease, color 0.25s ease;
}
.case-close {
  position: absolute;
  top: clamp(1rem, 2.5vw, 1.8rem);
  right: clamp(1rem, 4vw, 3rem);
  z-index: 10;
  background: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.case-close:hover, .case-next:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }

.case-hero { display: flex; flex-direction: column; gap: clamp(1.4rem, 3vw, 2.4rem); }
.case-title {
  font-weight: 700;
  font-size: clamp(2.6rem, 9vw, 8rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.case-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 2.5rem);
  border-top: 1px solid rgba(220, 216, 192, 0.18);
  padding-top: 1.2rem;
}
.case-meta .meta-key { color: var(--paper); opacity: 0.55; }
.case-val { font-size: 0.86rem; line-height: 1.55; }

/* placeholder image blocks (swap .ph for <img> when real assets arrive) */
.case-shot {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(220, 216, 192, 0.18);
  background: rgba(220, 216, 192, 0.04);
}
.case-shot .ph {
  position: absolute; inset: -10% 0;
  display: flex; align-items: center; justify-content: center;
  background-image: repeating-linear-gradient(45deg, rgba(220, 216, 192, 0.05) 0 14px, transparent 14px 28px);
  will-change: transform;
}
.case-shot .ph-tag {
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.18em;
  color: rgba(220, 216, 192, 0.55);
  border: 1px solid rgba(220, 216, 192, 0.2);
  padding: 0.4rem 0.7rem;
}
.case-shot--hero, .case-shot--wide { aspect-ratio: 16 / 9; }
.case-shot--square { aspect-ratio: 1 / 1; }
.ph-media { background-image: none; }
.case-media { width: 100%; height: 100%; object-fit: cover; display: block; }

/* free hero image — natural aspect, breathing space (no crop) */
.case-shot.case-shot--free {
  aspect-ratio: auto; border: none; background: none; overflow: visible;
}
.case-media-free {
  width: 100%; max-width: 620px; height: auto; display: block; margin: 0 auto;
  border: 1px solid rgba(220, 216, 192, 0.18); border-radius: 4px;
}
.case-shot--free .case-media-free { max-width: 840px; }

/* spacious gallery — small centred media with lots of free space (e.g. Dig) */
.case-gallery.case-gallery--spacious {
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(3rem, 7vw, 6rem);
  padding-top: clamp(1rem, 3vw, 2.5rem);
}
.case-figure { display: flex; flex-direction: column; align-items: center; gap: 0.8rem; width: 100%; }
.case-figure--narrow .case-media-free { max-width: 440px; }
.case-figure--large .case-media-free { max-width: 820px; }
/* two images side by side */
.case-row {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(1.6rem, 4vw, 3rem); width: 100%;
}
.case-row .case-figure { width: clamp(280px, 42%, 520px); }
/* black device frame */
.case-frame {
  width: 100%; background: #121211;
  border-radius: 16px; padding: clamp(8px, 1.4vw, 14px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}
.case-frame img { width: 100%; height: auto; display: block; border-radius: 6px; }
.case-figcap {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.16em;
  color: rgba(220, 216, 192, 0.5);
}
.case-phones {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(1.6rem, 4vw, 3.2rem); width: 100%;
}
.case-phone { display: flex; flex-direction: column; align-items: center; gap: 0.8rem; width: clamp(210px, 26vw, 280px); }
.case-phone video {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block;
  border-radius: 26px; border: 1px solid rgba(220, 216, 192, 0.22);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3);
}

.case-gallery {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(0.8rem, 2vw, 1.4rem);
}
.case-gallery .case-shot--wide { grid-column: 1 / -1; }

.case-sec { display: flex; flex-direction: column; gap: 1rem; }
.case-kicker {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.16em;
  color: var(--accent);
}
.case-lead {
  max-width: 40rem;
  font-size: clamp(1.1rem, 2vw, 1.5rem); line-height: 1.55;
}
.case-list { display: flex; flex-direction: column; gap: 0; max-width: 44rem; }
.case-list li {
  display: flex; gap: 0.8rem;
  font-size: 0.95rem; line-height: 1.55; opacity: 0.9;
  padding: 0.7rem 0;
  border-bottom: 1px dashed rgba(220, 216, 192, 0.14);
}
.case-list li::before { content: "→"; color: var(--accent); }

.case-metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  border-top: 1px solid rgba(220, 216, 192, 0.18);
  padding-top: 1.4rem;
}
.case-metric-num {
  font-weight: 700; font-size: clamp(2.4rem, 5vw, 4rem);
  letter-spacing: -0.02em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.case-metric-num span { color: var(--accent); }
.case-metric p {
  margin-top: 0.6rem;
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; opacity: 0.6;
}

.case-meta-foot {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2.5vw, 2.5rem);
  border-top: 1px solid rgba(220, 216, 192, 0.18);
  padding-top: 1.4rem;
}
.case-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }
.case-tags span {
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.08em;
  border: 1px solid rgba(220, 216, 192, 0.25); padding: 0.4rem 0.7rem; opacity: 0.85;
}
.case-link {
  margin-top: 0.8rem; align-self: flex-start;
  font-size: 1rem; border-bottom: 1px solid var(--accent); padding-bottom: 2px;
}
.case-link:hover { color: var(--accent); }

.case-note {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(1rem, 1.6vw, 1.25rem); opacity: 0.55;
}
.case-foot { margin-top: 1rem; display: flex; justify-content: flex-end; }
.case-next span { opacity: 0.6; }

/* scroll-reveal inside the case */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 720px) {
  .case-meta, .case-gallery, .case-meta-foot { grid-template-columns: 1fr; }
}

.tile { cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  .tile, .case-close, .case-next { cursor: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .preloader { display: none; }
  .strip-wrap { overflow-x: auto; }
  .interlude { display: none; }
}

/* ===================== Lumen case — live UI recreations ===================== */
.lumen-intro {
  width: 100%; max-width: 720px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1.1rem;
}
.lumen-badge {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.14em;
  color: #edc98a; background: rgba(178, 106, 0, 0.16);
  border: 1px solid rgba(178, 106, 0, 0.5); border-radius: 99px;
  padding: 0.45rem 0.95rem; display: inline-flex; align-items: center; gap: 0.55rem;
}
.lumen-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #e7a54d; }
.lumen-lead { font-size: 1rem; line-height: 1.72; color: rgba(220, 216, 192, 0.72); max-width: 40rem; }

.lumen-figure { width: 100%; }
.lumen-step {
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  max-width: 620px; margin-top: 0.5rem; text-align: center;
}
.lumen-step-n { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--accent); }
.lumen-step-t { font-weight: 600; font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--paper); letter-spacing: -0.01em; }
.lumen-step-c { font-size: 0.9rem; line-height: 1.62; color: rgba(220, 216, 192, 0.62); }

/* ---- shared app-shell (light theme, reads as a product screenshot) ---- */
.lumen-mock, .lumen-hero {
  --lm-paper: #f6f8f9; --lm-card: #fff; --lm-ink: #13202b; --lm-soft: #46586a; --lm-line: #dce4e9;
  --lm-teal: #0e7c86; --lm-tealsoft: #e3f1f2; --lm-amber: #b26a00; --lm-ambersoft: #fbf1de;
  --lm-green: #1f7a4d; --lm-greensoft: #e4f2ea;
  width: 100%; max-width: 860px; margin: 0 auto;
  background: var(--lm-paper); color: var(--lm-ink); text-align: left;
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  border: 1px solid rgba(220, 228, 233, 0.9); border-radius: 12px; overflow: hidden;
  box-shadow: 0 22px 48px -26px rgba(19, 32, 43, 0.6);
}
.lm-top {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  background: var(--lm-card); border-bottom: 1px solid var(--lm-line);
}
.lm-logo {
  width: 20px; height: 20px; border-radius: 6px; background: var(--lm-ink); color: #fff;
  font-family: var(--font-mono); font-size: 11px; display: grid; place-items: center; flex-shrink: 0;
}
.lm-name { font-weight: 600; font-size: 12.5px; }
.lm-case { margin-left: auto; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.04em; color: var(--lm-soft); }

.lm-tag {
  font-family: var(--font-mono); font-size: 8.5px; color: var(--lm-teal);
  border: 1px solid var(--lm-teal); border-radius: 4px; padding: 1px 5px; white-space: nowrap;
}

/* ---- hero pipeline ---- */
.case-shot--lumen { display: flex; justify-content: center; }
.lm-pipe { display: flex; align-items: stretch; padding: 18px 14px; gap: 2px; }
.lm-pnode { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; padding: 0 8px; }
.lm-plabel { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.07em; color: var(--lm-soft); }
.lm-plabel--ok { color: var(--lm-green); }
.lm-ptext { font-size: 11px; line-height: 1.42; color: var(--lm-ink); }
.lm-pnode--q .lm-ptext, .lm-pnode--ans .lm-ptext { font-weight: 500; }
.lm-ptext em {
  font-family: var(--font-mono); font-style: normal; font-size: 9px;
  border: 1px solid var(--lm-teal); color: var(--lm-teal); background: var(--lm-tealsoft);
  border-radius: 4px; padding: 0 4px; margin-left: 3px;
}
.lm-pbars { display: flex; flex-direction: column; gap: 3px; width: 100%; }
.lm-pbars b { height: 4px; border-radius: 99px; background: var(--lm-teal); width: var(--w); animation: lmFill 1.1s cubic-bezier(.2,.7,.2,1) both; }
.lm-pdots { display: flex; gap: 5px; }
.lm-pdots s { width: 7px; height: 7px; border-radius: 50%; background: var(--lm-teal); animation: lmDot 1.2s ease-in-out infinite; }
.lm-pdots s:nth-child(2) { animation-delay: 0.2s; }
.lm-pdots s:nth-child(3) { animation-delay: 0.4s; }
.lm-wire { align-self: center; flex: 0 0 30px; height: 2px; margin-top: 14px; background: var(--lm-line); border-radius: 2px; position: relative; overflow: hidden; }
.lm-wire i { position: absolute; top: 0; bottom: 0; width: 45%; background: var(--lm-teal); border-radius: 2px; animation: lmWire 1.9s linear infinite; }
@keyframes lmFill { from { width: 0; } }
@keyframes lmDot { 0%,100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes lmWire { 0% { left: -50%; } 100% { left: 105%; } }
@keyframes lmPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ---- pipeline mock ---- */
.lumen-mock--pipeline .lm-body { padding: 13px; display: flex; flex-direction: column; gap: 11px; }
.lm-stages { display: flex; gap: 5px; flex-wrap: wrap; }
.lm-stage { font-family: var(--font-mono); font-size: 10px; padding: 3px 8px; border-radius: 5px; border: 1px solid var(--lm-line); color: var(--lm-soft); }
.lm-stage--done { background: var(--lm-teal); border-color: var(--lm-teal); color: #fff; }
.lm-stage--live { border-color: var(--lm-teal); color: var(--lm-teal); background: var(--lm-tealsoft); animation: lmPulse 1.3s ease-in-out infinite; }
.lm-subs { display: flex; gap: 6px; flex-wrap: wrap; }
.lm-sub { font-family: var(--font-mono); font-size: 10px; color: var(--lm-soft); background: var(--lm-paper); border: 1px dashed var(--lm-line); border-radius: 5px; padding: 3px 8px; }
.lm-srcs { display: flex; flex-direction: column; gap: 6px; }
.lm-src { display: flex; align-items: center; gap: 9px; border: 1px solid var(--lm-line); border-radius: 7px; padding: 7px 10px; background: var(--lm-card); }
.lm-src-title { font-size: 11.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-bar { position: relative; width: 54px; height: 4px; background: var(--lm-line); border-radius: 99px; overflow: hidden; flex-shrink: 0; }
.lm-bar i { position: absolute; inset: 0; width: var(--w); background: var(--lm-teal); border-radius: 99px; animation: lmFill 1s cubic-bezier(.2,.7,.2,1) both; }
.lm-score { font-family: var(--font-mono); font-size: 9.5px; color: var(--lm-teal); width: 28px; text-align: right; flex-shrink: 0; }

/* ---- answer + limited mocks ---- */
.lm-conf { display: flex; align-items: center; gap: 8px; padding: 8px 13px; border-bottom: 1px solid var(--lm-line); }
.lm-conf--high { background: var(--lm-greensoft); }
.lm-conf--limited { background: var(--lm-ambersoft); }
.lm-conf-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.05em; }
.lm-conf--high .lm-conf-tag { color: var(--lm-green); }
.lm-conf--limited .lm-conf-tag { color: var(--lm-amber); }
.lm-conf-note { font-size: 11px; color: var(--lm-soft); }
.lm-atext { padding: 12px 14px; font-size: 12.5px; line-height: 1.74; margin: 0; }
.lm-cite {
  font-family: var(--font-mono); font-size: 10px; border: 1px solid var(--lm-teal);
  color: var(--lm-teal); background: var(--lm-tealsoft); border-radius: 4px;
  padding: 0 5px; margin: 0 1px; white-space: nowrap; vertical-align: 1px; text-decoration: none;
}
.lm-afoot { display: flex; align-items: center; gap: 7px; padding: 0 14px 12px; }
.lm-btn { font-family: var(--font-mono); font-size: 10px; border: 1px solid var(--lm-line); background: #fff; color: var(--lm-soft); border-radius: 6px; padding: 5px 10px; }
.lm-logged { margin-left: auto; font-family: var(--font-mono); font-size: 9px; color: var(--lm-soft); }
.lm-review { margin: 2px 14px 13px; border: 1px solid rgba(178, 106, 0, 0.38); background: var(--lm-ambersoft); border-radius: 8px; padding: 9px 11px; font-size: 11.5px; line-height: 1.5; }
.lm-review b { font-family: var(--font-mono); font-size: 9.5px; color: var(--lm-amber); font-weight: 500; }
.lm-esc { display: inline-block; margin-left: 6px; font-family: var(--font-mono); font-size: 10px; border: 1px solid var(--lm-amber); color: var(--lm-amber); border-radius: 6px; padding: 2px 8px; }

/* ---- source panel mock ---- */
.lumen-mock--source .lm-body { padding: 15px; }
.lm-shead { display: flex; align-items: center; margin-bottom: 12px; }
.lm-x { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--lm-soft); border: 1px solid var(--lm-line); border-radius: 6px; padding: 1px 8px; }
.lm-stitle { font-size: 14.5px; font-weight: 600; line-height: 1.35; margin: 0 0 4px; }
.lm-smeta { font-family: var(--font-mono); font-size: 10px; color: var(--lm-soft); margin-bottom: 14px; }
.lm-slabel { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em; color: var(--lm-soft); margin-bottom: 7px; }
.lm-passage { font-size: 12.5px; line-height: 1.75; background: var(--lm-paper); border: 1px solid var(--lm-line); border-radius: 8px; padding: 12px 13px; margin: 0 0 13px; }
.lm-mark { background: var(--lm-tealsoft); color: var(--lm-teal); padding: 1px 3px; border-radius: 3px; }
.lm-sopen { display: inline-block; font-family: var(--font-mono); font-size: 10px; border: 1px solid var(--lm-line); color: var(--lm-soft); border-radius: 6px; padding: 5px 10px; }

@media (max-width: 640px) {
  .lm-pipe { flex-direction: column; align-items: stretch; padding: 14px; gap: 4px; }
  .lm-pnode { flex-direction: row; align-items: center; gap: 12px; padding: 6px 2px; }
  .lm-pnode .lm-plabel { width: 84px; flex-shrink: 0; }
  .lm-wire { width: 2px; height: 16px; margin: 0 0 0 8px; flex-basis: auto; align-self: flex-start; }
  .lm-pbars { max-width: 160px; }
}
