/* ==========================================================================
   Kamran Kalantari — portfolio
   Tokens → base → header → hero → work → about → footer → case study → media
   ========================================================================== */

:root {
  /* palette: Nothing-derived neutrals, one cold signal blue from the Eva glow */
  --bg: #e8e8e6;
  --bg-2: #f3f3f1;
  --card: #ffffff;
  --ink: #0b0b0b;
  --ink-2: #4b4b49;
  --ink-3: #8b8b87;
  --line: #c6c6c2;
  --line-strong: #0b0b0b;
  --signal: #2432ff;

  --font-display: "Clash Display", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-eva: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", "Times New Roman", serif;

  --gutter: clamp(16px, 3vw, 40px);
  --maxw: 1440px;
  --h: 56px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* radius, measured off se.nothing.tech: 8px on cards and inset media,
     6px on buttons, 0 on anything that runs edge to edge */
  --r: 8px;
  --r-btn: 6px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--font-body);
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0 0 1em; }

.skip {
  position: absolute; left: 8px; top: -48px; z-index: 400;
  background: var(--ink); color: #fff; padding: 8px 12px;
  font: 12px var(--font-mono);
}
.skip:focus { top: 8px; }

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.4;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* aligns full-bleed content to the .wrap text column */
.gut { padding-inline: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter))); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: #fff;
  padding: 12px 16px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--ink);
  border-radius: var(--r-btn);
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}
.btn:hover { background: #fff; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }

/* scroll reveal (only when JS present) */
.js .rv { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 100;
  height: var(--h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: transform 0.32s var(--ease);
  will-change: transform;
}
/* slides away when you scroll down, returns the moment you scroll up */
.hdr.is-hidden { transform: translateY(-101%); }

/* anchor jumps shouldn't land content beneath the header */
:where(section[id], main[id]) { scroll-margin-top: calc(var(--h) + 12px); }
.hdr__brand { justify-self: start; }
.hdr__pill {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-btn);
  padding: 6px 12px;
  display: inline-flex; gap: 10px; align-items: center;
}
.hdr__pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); display: inline-block; }
.hdr__nav { justify-self: end; display: flex; gap: 24px; }
.hdr__nav a { position: relative; padding: 4px 0; }
.hdr__nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--ink); transition: right 0.35s var(--ease);
}
.hdr__nav a:hover::after, .hdr__nav a[aria-current="page"]::after { right: 0; }
@media (max-width: 640px) {
  .hdr { grid-template-columns: 1fr auto; }
  .hdr__pill { display: none; }
  .hdr__nav { gap: 16px; }
}
@media (max-width: 380px) {
  .hdr__nav { gap: 12px; }
}

/* ---------- hero frame + corner ticks ---------- */
.frame { position: relative; border: 1px solid var(--line-strong); }
.tick { position: absolute; width: 11px; height: 11px; pointer-events: none; }
.tick::before, .tick::after { content: ""; position: absolute; background: var(--ink); }
.tick::before { left: 0; right: 0; top: 5px; height: 1px; }
.tick::after { top: 0; bottom: 0; left: 5px; width: 1px; }
.tick.tl { top: -6px; left: -6px; }
.tick.tr { top: -6px; right: -6px; }
.tick.bl { bottom: -6px; left: -6px; }
.tick.br { bottom: -6px; right: -6px; }

/* ---------- hero / title card ---------- */
.hero { padding: var(--gutter); }
.hero__frame {
  min-height: calc(100svh - var(--h) - var(--gutter) * 2);
  display: grid; place-items: center;
  overflow: hidden;
  padding: clamp(56px, 9vw, 140px) var(--gutter);
  background-color: var(--bg);
  background-image: radial-gradient(rgba(11, 11, 11, 0.16) 1px, transparent 1.3px);
  background-size: 12px 12px;
}
.hero__lbl { position: absolute; padding: 10px 12px; color: var(--ink-2); }
.hero__lbl.tl { top: 0; left: 0; }
.hero__lbl.tr { top: 0; right: 0; text-align: right; }
.hero__lbl.bl { bottom: 0; left: 0; }
.hero__lbl.br { bottom: 0; right: 0; text-align: right; }
@media (max-width: 640px) { .hero__lbl.bl, .hero__lbl.tr { display: none; } }

/* the only corner label that does something, so it has to look like it does */
.hero__scroll { padding: 15px 12px; transition: color 0.2s; }
.hero__scroll:hover, .hero__scroll:focus-visible {
  color: var(--ink);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
}

.tc-wrap { width: max-content; max-width: 100%; }
.tc {
  font-family: var(--font-eva); font-weight: 800;
  line-height: 0.86; letter-spacing: -0.02em;
  color: var(--ink);
  text-shadow: 0 0 22px rgba(36, 50, 255, 0.28);
  transform: scaleX(0.86); transform-origin: center;
  display: grid;
}
.tc__l { display: block; font-size: clamp(34px, 9.4vw, 150px); }
.tc__l--big { font-size: clamp(40px, 11.4vw, 182px); }
.tc__ep {
  display: block;
  font: 700 clamp(18px, 2.6vw, 38px) / 1 var(--font-body);
  letter-spacing: -0.01em;
  margin-top: 0.3em;
}
.tc__jp {
  font-family: var(--font-eva); font-weight: 800;
  font-size: clamp(17px, 2.8vw, 40px);
  letter-spacing: 0.04em; line-height: 1.2;
  margin: 0.7em 0 0 8%;
  text-shadow: 0 0 22px rgba(36, 50, 255, 0.28);
}
.tc--sub .tc__l { font-size: clamp(30px, 7.4vw, 108px); }

/* the cut: 420ms of white-on-black, then a hard cut to the page */
.cut {
  position: fixed; inset: 0; z-index: 300;
  background: #000; color: #fff;
  display: grid; place-items: center; padding: var(--gutter);
  pointer-events: none;
  animation: cut-out 0.01s step-end 0.42s forwards;
}
.cut .tc, .cut .tc__jp { color: #fff; text-shadow: none; }
@keyframes cut-out { to { opacity: 0; visibility: hidden; } }
.tc-wrap--anim .tc__l, .tc-wrap--anim .tc__ep, .tc-wrap--anim .tc__jp { opacity: 0; animation: pop 0.01s step-end forwards; }
.tc-wrap--anim .tc__l:nth-child(1) { animation-delay: 0.44s; }
.tc-wrap--anim .tc__l:nth-child(2) { animation-delay: 0.5s; }
.tc-wrap--anim .tc__l:nth-child(3) { animation-delay: 0.58s; }
.tc-wrap--anim .tc__ep { animation-delay: 0.66s; }
.tc-wrap--anim .tc__jp { animation-delay: 0.8s; }
@keyframes pop { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .hdr { transition: none; }
  .hdr.is-hidden { transform: none; }   /* keep the header put entirely */
  .cut { display: none; }
  .tc-wrap--anim .tc__l, .tc-wrap--anim .tc__ep, .tc-wrap--anim .tc__jp { opacity: 1; animation: none; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- sections ---------- */
.sec { padding: clamp(56px, 8vw, 120px) 0; }
.sec__head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  border-top: 1px solid var(--line-strong);
  padding-top: 12px;
  margin-bottom: clamp(24px, 4vw, 48px);
}
.sec__head .mono { color: var(--ink-2); }

/* ---------- work / episodes (full-bleed, no frame) ---------- */
.ep { position: relative; display: block; margin-bottom: 8px; }
.ep__media { background: var(--bg-2); }
/* each case fills the viewport, like the reference site's min-h-svh sections */
.ep__media img { width: 100%; height: 100vh; height: 100svh; object-fit: cover; }
/* device line-ups are shown whole on their ground rather than cropped to fill */
.ep__media--fit img { object-fit: contain; }
/* on a portrait screen a wide line-up would sit tiny in a sea of texture,
   so crop to the centre device instead */
@media (max-width: 700px) {
  .ep__media--fit img { object-fit: cover; }
}

/* dot-grid ground — same texture as the hero frame, for artwork with transparency */
.dots {
  background-color: var(--bg-2);
  background-image: radial-gradient(rgba(11, 11, 11, 0.13) 1px, transparent 1.3px);
  background-size: 12px 12px;
}
.ep__hold { position: absolute; left: 0; right: 0; bottom: 0; }
.ep__card {
  width: 100%;
  max-width: 32rem;                /* the reference site's max-w-lg, centred */
  margin: 0 auto clamp(16px, 2.5vw, 32px);
  background: var(--card);
  border: 1px solid var(--line);   /* keeps its edge when the artwork behind it is white */
  border-radius: var(--r);
  padding: 18px 18px 16px;
  display: grid; gap: 8px;
}
.ep__card .mono { color: var(--ink-3); }
.ep__card h3 { font: 600 clamp(19px, 1.7vw, 23px) / 1.15 var(--font-display); letter-spacing: -0.01em; }
.ep__card p { font-size: 14px; line-height: 1.45; color: var(--ink-2); margin: 0; }
.ep__tags { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--ink-3); }
.ep__card .btn { margin-top: 4px; }
/* the card stays over the artwork at every size, as on the reference site */

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 5vw, 80px); align-items: start; }
.about__fig { margin: 0; }
.about__fig img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r); }
.about__fig figcaption { padding: 12px 0 0; color: var(--ink-3); }
.about h2 {
  font: 500 clamp(26px, 3.4vw, 50px) / 1.06 var(--font-display);
  letter-spacing: -0.02em;
  margin: 6px 0 24px;
  text-wrap: balance;
}
.about p { max-width: 60ch; color: var(--ink-2); }
.tl { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--line-strong); }
.tl li {
  display: grid; grid-template-columns: 106px 1fr; gap: 6px 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.tl li .mono { color: var(--ink-3); padding-top: 3px; }
.tl b { display: block; font: 500 17px / 1.3 var(--font-display); }
.tl span { color: var(--ink-2); font-size: 14px; }
.tl li > div { display: grid; gap: 2px; }
.about__aside { margin-top: 32px; display: grid; gap: 6px; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }

/* ---------- testimonials ---------- */
.says { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.say {
  margin: 0;
  background: var(--card);
  border-radius: var(--r);
  padding: clamp(20px, 2vw, 28px);
  display: grid; align-content: space-between; gap: 24px;
}
.say blockquote {
  margin: 0;
  font: 500 clamp(17px, 1.5vw, 20px) / 1.4 var(--font-display);
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.say figcaption { color: var(--ink-3); }
@media (max-width: 900px) { .says { grid-template-columns: 1fr; } }

/* pull-quote inside a case study */
.pull { padding: clamp(44px, 6vw, 92px) 0 clamp(20px, 3vw, 40px); }
.pull > .mono { display: block; color: var(--ink-3); margin-bottom: 18px; }
.pull blockquote {
  margin: 0 0 18px;
  font: 500 clamp(22px, 2.8vw, 38px) / 1.22 var(--font-display);
  letter-spacing: -0.02em;
  max-width: 26ch;
  text-wrap: pretty;
}
.pull figcaption { color: var(--ink-3); }

/* ---------- footer / contact ---------- */
.ftr {
  background: #0b0b0b; color: #fff;
  padding: clamp(64px, 9vw, 140px) var(--gutter) 24px;
  text-align: center;
}
.ftr__title {
  font: 500 clamp(28px, 4vw, 56px) / 1.05 var(--font-display);
  letter-spacing: -0.02em; margin-bottom: 32px;
}
.ftr__card {
  margin: 0 auto clamp(48px, 8vw, 96px);
  width: min(420px, 100%);
  border: 1px solid #333;
  border-radius: var(--r);
  overflow: hidden;
  text-align: left;
}
.ftr__card a, .ftr__card div {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid #333;
  transition: background 0.2s;
}
.ftr__card > :last-child { border-bottom: 0; }
.ftr__card a:hover { background: #1a1a1a; }
.ftr__card .mono { color: #8b8b87; }
.ftr__card span:not(.mono) { font-size: 14px; }
.ftr__big { display: grid; justify-items: center; gap: 6px; margin: 0 0 clamp(48px, 8vw, 96px); padding: 0; list-style: none; }
.ftr__big a {
  font: 500 clamp(30px, 6vw, 84px) / 1 var(--font-display);
  letter-spacing: -0.02em; text-transform: uppercase;
  transition: opacity 0.2s;
}
.ftr__big a:hover { opacity: 0.45; }
.ftr__meta {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: #8b8b87;
  border-top: 1px solid #2a2a2a; padding-top: 16px;
}
.ftr__meta a:hover { color: #fff; }

/* ==========================================================================
   CASE STUDY
   ========================================================================== */
.cs-title { padding: clamp(40px, 7vw, 96px) 0 clamp(20px, 3vw, 36px); }
.cs-title .mono { color: var(--ink-3); margin-bottom: 20px; display: block; }
.cs-title .tc-wrap { width: auto; }
.cs-title .tc { transform-origin: left center; }
.cs-lede { font: 400 clamp(17px, 1.6vw, 21px) / 1.5 var(--font-body); color: var(--ink-2); max-width: 62ch; margin: 28px 0 0; }

.meta {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line);
  margin: 40px 0 0;
}
.meta > div { padding: 14px 12px 14px 0; border-right: 1px solid var(--line); }
.meta > div:last-child { border-right: 0; }
.meta dt { color: var(--ink-3); margin-bottom: 6px; }
.meta dd { margin: 0; font: 500 15px / 1.35 var(--font-display); padding-right: 12px; }
@media (max-width: 720px) {
  .meta { grid-template-columns: 1fr 1fr; }
  .meta > div:nth-child(2n) { border-right: 0; }
  .meta > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
}

/* text block: eyebrow → heading → body */
.cs-sec { padding: clamp(44px, 6vw, 92px) 0 clamp(20px, 3vw, 40px); }
.cs-sec > .mono { display: block; color: var(--ink-3); margin-bottom: 14px; }
.cs-sec h2 {
  font: 500 clamp(24px, 3.2vw, 44px) / 1.12 var(--font-display);
  letter-spacing: -0.02em; margin: 0 0 20px; max-width: 22ch; text-wrap: balance;
}
.cs-sec p { max-width: 64ch; color: var(--ink-2); }
.cs-sec .stat {
  font: 500 clamp(48px, 8vw, 120px) / 0.95 var(--font-display);
  letter-spacing: -0.04em; color: var(--ink); margin: 0 0 18px;
}
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; max-width: 64ch; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 40px 1fr; gap: 12px;
  padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink-2);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--ink-3); padding-top: 4px;
}
.steps li:last-child { border-bottom: 1px solid var(--line); }

.next {
  border-top: 1px solid var(--line-strong);
  margin-top: clamp(48px, 7vw, 96px);
  padding: 40px 0 clamp(56px, 8vw, 120px);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.next__link { display: grid; gap: 6px; }
.next__link .mono { color: var(--ink-3); }
.next__link b { font: 500 clamp(24px, 3vw, 44px) / 1.05 var(--font-display); letter-spacing: -0.02em; }
.next__link:hover b { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }

/* ==========================================================================
   MEDIA — full-bleed bands, no frames
   ========================================================================== */
/* bands sit outside .wrap, so they already span the page — no vw tricks, no scrollbar overflow */
.band { width: 100%; margin-bottom: clamp(28px, 4vw, 64px); }
.band:last-child { margin-bottom: 0; }
/* a band can carry its own canvas colour: style="--band-bg:#22383c" */
.band--dark { background: var(--band-bg, #0b0b0b); padding-bottom: 4px; }
.band--dark .cap b { color: #fff; }
.band--dark .cap p { color: rgba(255, 255, 255, 0.64); }
.band--tint { background: var(--band-bg, var(--bg-2)); }

/* one wide shot */
.shot { margin: 0; }
.shot img { width: 100%; height: clamp(300px, 48vw, 720px); object-fit: cover; }
.shot--auto img { height: auto; }                     /* image keeps its own proportions */
.shot--pad {
  padding-block: clamp(20px, 4vw, 72px) 0;
  padding-inline: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
}
.shot--pad img { height: auto; max-height: 78vh; width: auto; max-width: min(100%, 1500px); margin-inline: auto; border-radius: var(--r); }
.shot--pad .cap { padding-inline: 0; }   /* the figure already carries the gutter */

/* row of tiles — each tile carries its image's own aspect via --ar */
.tiles { display: grid; gap: 8px; padding-inline: 8px; align-items: start; }
.tiles--2 { grid-template-columns: repeat(2, 1fr); }
.tiles--3 { grid-template-columns: repeat(3, 1fr); }
.tile { margin: 0; }
/* many of these screenshots are transparent PNGs — the tile supplies the canvas */
.tile img { width: 100%; aspect-ratio: var(--ar, 3 / 4); object-fit: cover; background: var(--tile-bg, var(--bg-2)); border-radius: var(--r); }
@media (max-width: 720px) {
  .tiles--3 { grid-template-columns: repeat(2, 1fr); }
  .tiles--3 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
  .tiles--2, .tiles--3 { grid-template-columns: 1fr; }
  .tiles--3 > :last-child:nth-child(odd) { grid-column: auto; }
}

/* image placeholders — swap each one for real artwork, markup stays identical */
.ph {
  display: grid; place-items: center; align-content: center; gap: 10px;
  aspect-ratio: var(--ar, 16 / 10);
  padding: 24px; text-align: center;
  background-color: var(--tile-bg, var(--bg-2));
  background-image: radial-gradient(rgba(11, 11, 11, 0.13) 1px, transparent 1.3px);
  background-size: 12px 12px;
  border-radius: var(--r);
  color: var(--ink-3);
}
.ph--bleed { border-radius: 0; aspect-ratio: auto; height: clamp(300px, 48vw, 720px); }
.ep__media .ph--bleed { height: 100vh; height: 100svh; }
.ph b { display: block; font: 500 clamp(15px, 1.4vw, 19px) / 1.3 var(--font-display); color: var(--ink-2); max-width: 26ch; }
.ph .tag {
  border: 1px solid var(--signal); border-radius: var(--r-btn);
  padding: 4px 9px; background: var(--card);
  color: var(--signal);
}

/* caption sits under the image, on the page — never on top of it */
.cap { padding-top: 14px; max-width: 52ch; }
.shot .cap { padding-bottom: 0; }
.cap b { display: block; font: 500 16px / 1.35 var(--font-display); margin-bottom: 4px; }
.cap p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.tiles .cap { padding-inline: 0; }
