/* ==========================================================================
   NEELESH KUMAR TRIPATHI — PORTFOLIO
   Theme: Monochrome editorial — paper & black, wide display type,
   boot-sequence intro on a CSS-built computer.
   Sizes are drawn on a 1440px artboard: 1u = min(100vw / 1440, 1.333px).
   ========================================================================== */

@property --r {
  syntax: "<length>";
  inherits: true;
  initial-value: 0px;
}

:root {
  --u: min(calc(100vw / 1440), 1.333px);

  --paper: #dadada;
  --paper-2: #cdcdcd;
  --ink: #111;
  --black: #000;
  --text: #f4f4f4;
  --grey: #6f6f6f;
  --grey-2: #9a9a9a;
  --line: rgba(255, 255, 255, 0.14);
  --line-2: rgba(255, 255, 255, 0.28);
  --line-ink: rgba(0, 0, 0, 0.14);

  --f-ui: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-wide: "Archivo", "Arial Black", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --gx: calc(57 * var(--u));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--paper);
  color: var(--text);
  font-family: var(--f-ui);
  font-size: max(14px, calc(15 * var(--u)));
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

main {
  position: relative;
  overflow-x: hidden;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

svg {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

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

:focus-visible {
  outline: 1.5px solid currentColor;
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- atoms ---------- */
.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: max(11px, calc(13 * var(--u)));
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.mono-muted {
  color: var(--grey);
}

.btn-black,
.btn-ghost-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: max(40px, calc(46 * var(--u)));
  padding: 0 max(16px, calc(20 * var(--u)));
  border-radius: 999px;
  font-size: max(13px, calc(14 * var(--u)));
  font-weight: 500;
  white-space: nowrap;
  transition: transform 0.35s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
}

.btn-black svg,
.btn-ghost-dark svg {
  transition: transform 0.35s var(--ease);
}

.btn-black {
  background: var(--ink);
  color: var(--text);
}

.btn-ghost-dark {
  border: 1px solid rgba(0, 0, 0, 0.35);
  color: var(--ink);
}

.btn-black:hover,
.btn-ghost-dark:hover {
  transform: translateY(-1px);
}

.btn-black:hover svg {
  transform: rotate(45deg);
}

.btn-ghost-dark:hover {
  background: var(--ink);
  color: var(--text);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: #fff;
  mix-blend-mode: difference;
  z-index: 200;
}

/* custom cursor — a difference-blended disc that reads on paper and on black */
.cursor {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  body.has-cursor .cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 300;
    display: grid;
    place-items: center;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: #fff;
    mix-blend-mode: difference;
    pointer-events: none;
    transition: width 0.4s var(--ease), height 0.4s var(--ease), margin 0.4s var(--ease), opacity 0.3s;
  }

  body.has-cursor .cursor.is-hover {
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
  }

  body.has-cursor .cursor.is-label {
    width: 84px;
    height: 84px;
    margin: -42px 0 0 -42px;
  }

  .cursor span {
    font-family: var(--f-wide);
    font-variation-settings: "wdth" 125;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #000;
    opacity: 0;
    transition: opacity 0.2s;
  }

  .cursor.is-label span {
    opacity: 1;
  }

  .cursor.is-hidden {
    opacity: 0;
  }
}

/* reveal on scroll */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   INTRO — the computer
   ========================================================================== */
.intro {
  display: none;
}

/* a fixed overlay: it plays on its own, then is removed from the page */
.js .intro {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 250;
}

.reduced .intro {
  display: none;
}

.intro-stage {
  --p: 0;
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse 60% 55% at 50% 42%, #1b1b1b 0%, #070707 60%, #000 100%);
  color: var(--text);
  pointer-events: auto;
}

.intro.is-gone .intro-stage {
  visibility: hidden;
  pointer-events: none;
}

.intro-grid {
  position: absolute;
  left: -50%;
  right: -50%;
  bottom: -10%;
  height: 55%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(600px) rotateX(62deg);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, #000 10%, transparent 85%);
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 85%);
  animation: grid-run 6s linear infinite;
  opacity: calc(1 - var(--p) * 2.5);
}

@keyframes grid-run {
  to { background-position: 0 64px, 0 0; }
}

.intro-meta,
.intro-caption {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey-2);
  opacity: calc(1 - var(--p) * 4);
}

.intro-meta-tl { top: 26px; left: 28px; }
.intro-meta-tr { top: 26px; right: 28px; font-variant-numeric: tabular-nums; }
.intro-caption-l { bottom: 30px; left: 28px; }
.intro-caption-r { bottom: 30px; right: 28px; gap: 8px; }
.intro-caption svg { font-size: 14px; color: var(--text); }

.intro-meta .dot {
  background: #fff;
  animation: blink 1.2s steps(1) infinite;
}

.intro-skip {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--f-wide);
  font-variation-settings: "wdth" 125;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  opacity: calc(1 - var(--p) * 4);
}

.intro-skip-ring {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font-size: 16px;
  animation: bob 1.8s var(--ease) infinite;
}

.intro.is-ready .intro-skip-ring {
  animation: bob 1.8s var(--ease) infinite, ring 1.8s ease-out infinite;
}

@keyframes bob {
  50% { transform: translateY(5px); }
}

@keyframes ring {
  from { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6); }
  to { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0); }
}

/* the machine */
.computer {
  position: relative;
  width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: transform;
}

.monitor {
  position: relative;
  width: 640px;
  border-radius: 20px;
  box-shadow:
    0 50px 120px -30px rgba(255, 255, 255, 0.12),
    0 30px 60px rgba(0, 0, 0, 0.6);
}

.bezel {
  padding: 16px 16px 0;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, #ededed 0%, #cfcfcf 60%, #bdbdbd 100%);
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  background: radial-gradient(ellipse 120% 90% at 50% 40%, #121212, #050505);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.8), inset 0 0 60px rgba(0, 0, 0, 0.9);
  font-family: var(--f-mono);
  color: #e9e9e9;
}

.screen-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 28px;
  padding: 0 12px;
  font-size: 10.5px;
  color: #7a7a7a;
  border-bottom: 1px solid #1e1e1e;
  background: #0b0b0b;
}

.screen-dots {
  display: flex;
  gap: 6px;
}

.screen-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2d2d2d;
}

.screen-dots i:first-child {
  background: #e9e9e9;
}

.screen-bar-r {
  margin-left: auto;
}

.screen-body {
  position: absolute;
  inset: 28px 0 0;
  padding: 12px 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  font-size: 12.5px;
  line-height: 1.62;
  overflow: hidden;
}

.sl {
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sl .t-user { color: #8d8d8d; }
.sl .t-path { color: #fff; font-weight: 600; }
.sl .t-dim { color: #6c6c6c; }
.sl .t-tag { color: #0b0b0b; background: #cfcfcf; padding: 0 4px; border-radius: 2px; }
.sl .t-ok { color: #fff; font-weight: 600; }
.sl .t-plus { color: #fff; }

.caret {
  display: inline-block;
  width: 0.6em;
  height: 1.05em;
  vertical-align: -0.18em;
  background: #e9e9e9;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.screen-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
  mix-blend-mode: screen;
  animation: flicker 4s steps(2) infinite;
}

@keyframes flicker {
  50% { opacity: 0.7; }
}

.screen-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.09) 0%, transparent 38%);
}

.screen-paper {
  position: absolute;
  inset: 0;
  background: var(--paper);
  opacity: 0;
  pointer-events: none;
}

.monitor-chin {
  position: relative;
  height: 40px;
  border-radius: 0 0 20px 20px;
  background: linear-gradient(180deg, #c9c9c9, #a7a7a7);
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.chin-mark {
  font-family: var(--f-wide);
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #6b6b6b;
}

.chin-led {
  position: absolute;
  right: 26px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px #fff;
  animation: blink 2.4s steps(1) infinite;
}

.stand-neck {
  width: 120px;
  height: 66px;
  background: linear-gradient(90deg, #8c8c8c, #d6d6d6 45%, #9b9b9b);
  clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
}

.stand-base {
  width: 280px;
  height: 14px;
  border-radius: 4px 4px 14px 14px;
  background: linear-gradient(180deg, #d8d8d8, #8f8f8f);
}

.desk-shadow {
  width: 520px;
  height: 26px;
  margin-top: -8px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.14), transparent);
  filter: blur(4px);
}

.keyboard {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 580px;
  margin-top: 6px;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #cfcfcf, #a9a9a9);
  transform: perspective(900px) rotateX(58deg);
  transform-origin: 50% 0;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.6);
}

.kb-row {
  display: flex;
  gap: 5px;
  justify-content: center;
}

.key {
  flex: 1;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: linear-gradient(180deg, #1d1d1d, #121212);
  box-shadow: 0 2px 0 #000, inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-family: var(--f-mono);
  font-size: 9px;
  color: #6f6f6f;
  text-transform: uppercase;
  transition: background 0.12s, color 0.12s, transform 0.12s, box-shadow 0.12s;
}

.key.is-wide { flex: 1.7; }
.key.is-space { flex: 7; }

.key.is-down {
  background: #f4f4f4;
  color: #000;
  transform: translateY(2px);
  box-shadow: 0 0 0 #000, 0 0 18px rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(61 * var(--u)) var(--gx) 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-16px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), padding 0.5s var(--ease);
}

.site-header > * {
  pointer-events: auto;
}

.is-entered .site-header,
.reduced .site-header {
  opacity: 1;
  transform: none;
}

.site-header.is-scrolled {
  padding-top: 18px;
}

.seg-nav {
  position: relative;
  display: flex;
  align-items: center;
  height: max(42px, calc(48 * var(--u)));
  padding: 4px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.35);
}

.seg-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: 0;
  border-radius: 999px;
  background: var(--ink);
  transition: left 0.5s var(--ease), width 0.5s var(--ease);
}

.seg-link {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 100%;
  padding: 0 max(14px, calc(20 * var(--u)));
  border-radius: 999px;
  font-size: max(13px, calc(14 * var(--u)));
  color: var(--ink);
  transition: color 0.35s;
}

.seg-link.is-pilled {
  color: var(--text);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-loc {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: calc(40 * var(--u));
  font-size: max(12px, calc(14 * var(--u)));
  color: var(--text);
  transition: color 0.4s;
}

.header-loc svg {
  font-size: 1.15em;
}

.site-header.on-paper .header-loc {
  color: var(--ink);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: max(40px, calc(46 * var(--u)));
  height: max(40px, calc(46 * var(--u)));
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s var(--ease);
}

.icon-btn:hover {
  transform: translateY(-1px);
}

.btn-contact {
  min-width: calc(144 * var(--u));
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   HERO (paper)
   ========================================================================== */
.hero {
  position: relative;
  height: calc(938 * var(--u));
  min-height: 600px;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}

.hero-photo {
  position: absolute;
  left: calc(240 * var(--u));
  top: calc(56 * var(--u));
  width: calc(960 * var(--u));
  height: calc(782 * var(--u));
  transform: translate3d(0, var(--drift, 0px), 0);
  will-change: transform;
}

.portrait {
  --mx: 50%;
  --my: 40%;
  position: absolute;
  inset: 0;
  transition: --r 0.6s var(--ease);
  mask-image: linear-gradient(to bottom, #000 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 90%, transparent 100%);
}

.portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
  user-select: none;
  -webkit-user-drag: none;
}

.portrait-mono {
  filter: grayscale(1) contrast(1.12) brightness(0.96);
}

/* only the area around the pointer brightens into full colour */
.portrait-color {
  filter: contrast(1.04) brightness(1.1);
  mask-image: radial-gradient(circle var(--r) at var(--mx) var(--my), #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--mx) var(--my), #000 35%, transparent 100%);
}

.portrait.is-lit {
  --r: 150px;
}

.hero-title {
  position: absolute;
  left: var(--gx);
  top: calc(168 * var(--u));
  z-index: 3;
  font-family: var(--f-wide);
  font-variation-settings: "wdth" 104;
  font-weight: 640;
  font-size: calc(98 * var(--u));
  line-height: 0.86;
  letter-spacing: -0.06em;
  color: var(--ink);
}

.t-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.04em;
}

.t-inner {
  display: block;
}

.js .hero .t-inner,
.js .contact .t-inner {
  transform: translateY(110%);
}

.hero-about {
  position: absolute;
  left: var(--gx);
  top: calc(470 * var(--u));
  z-index: 3;
  width: calc(310 * var(--u));
  min-width: 240px;
}

.hero-about-copy {
  margin: calc(14 * var(--u)) 0 calc(22 * var(--u));
  font-size: max(13px, calc(15 * var(--u)));
  line-height: 1.45;
}

.hero-ctas {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* stats frame */
.hero-stats {
  position: absolute;
  left: var(--gx);
  top: calc(693 * var(--u));
  z-index: 3;
  width: calc(341 * var(--u));
  height: calc(208 * var(--u));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(6 * var(--u));
  padding: calc(6 * var(--u));
  border-radius: calc(12 * var(--u));
  background: var(--paper-2);
}

.hs-card {
  position: relative;
  overflow: hidden;
  border-radius: calc(8 * var(--u));
  padding: calc(12 * var(--u));
  display: flex;
  flex-direction: column;
}

.hs-dark {
  background: var(--ink);
  color: var(--text);
}

.hs-num {
  font-size: calc(30 * var(--u));
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.hs-label {
  margin-top: calc(4 * var(--u));
  font-size: max(10px, calc(11 * var(--u)));
  color: var(--grey-2);
}

.hs-marks {
  display: flex;
  flex-direction: column;
  gap: calc(3 * var(--u));
  margin-top: auto;
  margin-bottom: calc(8 * var(--u));
}

.hs-marks span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: max(9px, calc(10 * var(--u)));
  color: #bdbdbd;
}

.hs-marks b {
  display: grid;
  place-items: center;
  min-width: calc(26 * var(--u));
  height: calc(14 * var(--u));
  padding: 0 3px;
  border-radius: 3px;
  background: #2a2a2a;
  font-family: var(--f-wide);
  font-variation-settings: "wdth" 125;
  font-size: max(7px, calc(8 * var(--u)));
  font-weight: 700;
  color: #fff;
}

.hs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(26 * var(--u));
  padding: 0 calc(10 * var(--u));
  border-radius: calc(5 * var(--u));
  background: var(--text);
  color: var(--ink);
  font-size: max(10px, calc(11 * var(--u)));
  transition: transform 0.35s var(--ease);
}

.hs-bar:hover {
  transform: translateY(-1px);
}

.hs-photo {
  justify-content: space-between;
  color: var(--text);
  background: #222;
}

.hs-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.55) contrast(1.1);
}

.hs-photo-top,
.hs-photo-bottom {
  position: relative;
}

.hs-photo-top {
  display: flex;
  justify-content: space-between;
  padding-top: calc(6 * var(--u));
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  font-size: max(9px, calc(10 * var(--u)));
}

.hs-photo-bottom {
  text-align: right;
}

/* right column */
.hero-right {
  position: absolute;
  right: var(--gx);
  top: calc(258 * var(--u));
  z-index: 3;
  width: calc(196 * var(--u));
  min-width: 170px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.glass-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: max(36px, calc(42 * var(--u)));
  padding: 0 16px 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: max(12px, calc(14 * var(--u)));
}

.check-disc {
  display: grid;
  place-items: center;
  width: max(28px, calc(32 * var(--u)));
  height: max(28px, calc(32 * var(--u)));
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
}

.hero-available {
  margin-top: calc(130 * var(--u));
  text-align: right;
  font-size: max(13px, calc(15 * var(--u)));
  line-height: 1.35;
}

.hero-available .dot {
  margin-right: 4px;
  vertical-align: 1px;
}

.feature {
  margin-top: calc(44 * var(--u));
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: calc(10 * var(--u));
}

.feature-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.feature-head .label {
  font-size: max(10px, calc(11 * var(--u)));
}

.feature-name {
  font-size: max(14px, calc(17 * var(--u)));
  font-weight: 600;
}

.feature-img {
  position: relative;
  display: block;
  height: calc(196 * var(--u));
  min-height: 150px;
  border-radius: calc(10 * var(--u));
  overflow: hidden;
  background: #222;
}

.feature-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.55);
  transform-origin: 30% 45%;
  filter: grayscale(1) contrast(1.15);
  transition: transform 0.9s var(--ease), filter 0.6s;
}

.feature:hover .feature-img img {
  transform: scale(1.7);
  filter: grayscale(0.2) contrast(1.05);
}

.feature-arrow {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  transition: transform 0.5s var(--ease);
}

.feature:hover .feature-arrow {
  transform: rotate(45deg);
}

.feature-progress {
  position: relative;
  display: block;
  height: 2px;
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.feature-progress span {
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform-origin: 0 50%;
  transform: scaleX(0.62);
}

/* glass name plate on the chest */
.brand-plate {
  position: absolute;
  left: 50%;
  top: 58%;
  z-index: 4;
  width: calc(364 * var(--u));
  min-width: 260px;
  height: calc(73 * var(--u));
  min-height: 56px;
  margin-left: calc(-182 * var(--u));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 calc(20 * var(--u));
  border-radius: calc(12 * var(--u));
  background: rgba(12, 12, 12, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  color: var(--text);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
  transition: transform 0.4s var(--ease), background 0.3s;
}

.brand-plate:hover {
  transform: translateY(-2px);
  background: rgba(12, 12, 12, 0.7);
}

.plate-mark {
  position: relative;
  width: 28px;
  height: 24px;
}

.plate-mark i {
  position: absolute;
  bottom: 0;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 22px solid #fff;
}

.plate-mark i:first-child { left: 0; }
.plate-mark i:last-child { left: 10px; border-bottom-color: #8d8d8d; }

.plate-name {
  font-family: var(--f-wide);
  font-variation-settings: "wdth" 125;
  font-weight: 700;
  font-size: max(18px, calc(25 * var(--u)));
  letter-spacing: 0.02em;
}

.plate-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 26px;
}

.plate-menu i {
  height: 2px;
  background: #fff;
}

.plate-menu i:last-child {
  width: 60%;
  margin-left: auto;
}

/* entrance initial states (animated in by JS) */
.js .h-in,
.js .hero-photo {
  opacity: 0;
}

.reduced .h-in,
.reduced .hero-photo {
  opacity: 1 !important;
}

.reduced .t-inner {
  transform: none !important;
}

/* ==========================================================================
   BAR + STATEMENT (black)
   ========================================================================== */
/* the page itself is paper so the intro dissolves straight into the hero;
   dark sections paint their own black */
.bar,
.statement,
.work,
.proof,
.journey-sec,
.footer {
  background: var(--black);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(111 * var(--u));
  min-height: 72px;
  padding: 0 var(--gx);
  border-bottom: 1px solid var(--line);
  font-family: var(--f-wide);
  font-variation-settings: "wdth" 125;
  font-weight: 600;
  font-size: max(11px, calc(14 * var(--u)));
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.bar em {
  font-style: normal;
  color: var(--grey);
}

.bar-mid {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.bar-ring {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font-size: 15px;
  transition: transform 0.4s var(--ease);
}

.bar-mid:hover .bar-ring {
  transform: translateY(3px);
}

.statement {
  padding: calc(170 * var(--u)) var(--gx) calc(230 * var(--u));
  text-align: center;
}

.statement-text {
  max-width: calc(860 * var(--u));
  margin: 0 auto;
  font-size: calc(52 * var(--u));
  line-height: 1.33;
  letter-spacing: -0.028em;
  font-weight: 500;
  color: var(--grey);
}

.statement-sub {
  margin-top: calc(150 * var(--u));
  font-size: max(16px, calc(23 * var(--u)));
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.statement-sub em {
  font-style: normal;
  color: var(--grey);
}

/* ==========================================================================
   SECTION HEAD
   ========================================================================== */
.sec-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 20px;
  margin-bottom: calc(60 * var(--u));
}

.sec-head > :last-child {
  justify-self: end;
}

.sec-title {
  font-family: var(--f-wide);
  font-variation-settings: "wdth" 125;
  font-weight: 700;
  font-size: calc(120 * var(--u));
  line-height: 0.86;
  letter-spacing: -0.05em;
  text-align: center;
}

.sec-title sup {
  font-family: var(--f-ui);
  font-size: max(12px, calc(18 * var(--u)));
  font-weight: 500;
  letter-spacing: 0;
  vertical-align: top;
  color: var(--grey);
}

.sec-link,
.sec-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: max(12px, calc(14 * var(--u)));
  color: var(--grey-2);
  transition: color 0.3s;
}

.sec-link:hover {
  color: var(--text);
}

.sec-link svg {
  transition: transform 0.35s var(--ease);
}

.sec-link:hover svg {
  transform: rotate(45deg);
}

/* ==========================================================================
   WORK (black list with cursor preview)
   ========================================================================== */
.work {
  position: relative;
  padding: 0 var(--gx) calc(150 * var(--u));
}

.work-list {
  border-bottom: 1px solid var(--line);
}

.work-row {
  position: relative;
  display: grid;
  grid-template-columns: calc(80 * var(--u)) 1fr calc(260 * var(--u)) calc(250 * var(--u)) calc(150 * var(--u)) 56px;
  align-items: center;
  gap: 20px;
  padding: calc(34 * var(--u)) 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
  outline-offset: -2px;
}

.wr-num {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--grey);
}

.wr-title {
  font-family: var(--f-wide);
  font-variation-settings: "wdth" 112;
  font-weight: 640;
  font-size: calc(64 * var(--u));
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--grey);
  transition: color 0.4s, transform 0.6s var(--ease), letter-spacing 0.6s var(--ease);
}

.wr-type,
.wr-tags {
  font-size: max(12px, calc(14 * var(--u)));
  color: var(--grey-2);
  transition: color 0.4s;
}

.wr-tags {
  color: var(--grey);
}

.wr-badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: max(11px, calc(12 * var(--u)));
  white-space: nowrap;
}

.wr-go {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  font-size: 18px;
  transition: transform 0.5s var(--ease), background 0.4s, color 0.4s, border-color 0.4s;
}

.wr-thumb {
  display: none;
}

.work-row:hover .wr-title,
.work-row:focus-visible .wr-title {
  color: var(--text);
  transform: translateX(calc(18 * var(--u)));
  letter-spacing: -0.03em;
}

.work-row:hover .wr-type {
  color: var(--text);
}

.work-row:hover .wr-go {
  transform: rotate(45deg);
  background: #fff;
  color: #000;
  border-color: #fff;
}

.work-preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: calc(340 * var(--u));
  min-width: 240px;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  scale: 0.6;
  rotate: -4deg;
  transition: opacity 0.35s, scale 0.5s var(--ease), rotate 0.5s var(--ease);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.work-preview.is-on {
  opacity: 1;
  scale: 1;
  rotate: -2deg;
}

.work-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1);
}

@media (hover: none) {
  .work-preview { display: none; }
}

/* ==========================================================================
   PROOF PANEL
   ========================================================================== */
.proof {
  padding: 0 var(--gx) calc(150 * var(--u));
}

.proof-panel {
  position: relative;
  width: min(100%, calc(1302 * var(--u)));
  min-height: calc(429 * var(--u));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: calc(40 * var(--u));
  padding: calc(36 * var(--u)) calc(36 * var(--u)) calc(36 * var(--u)) calc(44 * var(--u));
  border: 1px solid var(--line-2);
  border-radius: calc(14 * var(--u));
  overflow: hidden;
}

.proof-left {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.proof-title {
  font-size: calc(55 * var(--u));
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
}

.glass-tile {
  position: absolute;
  display: grid;
  place-items: center;
  width: calc(88 * var(--u));
  height: calc(88 * var(--u));
  border-radius: calc(12 * var(--u));
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: calc(30 * var(--u));
  animation: float 6s ease-in-out infinite;
}

.glass-tile-1 {
  left: calc(230 * var(--u));
  top: calc(-14 * var(--u));
}

.glass-tile-2 {
  left: calc(170 * var(--u));
  top: calc(150 * var(--u));
  animation-delay: -3s;
}

@keyframes float {
  50% { transform: translateY(-8px) rotate(4deg); }
}

.proof-copy {
  max-width: calc(330 * var(--u));
  margin-top: 24px;
  font-size: max(13px, calc(14.5 * var(--u)));
  line-height: 1.5;
  color: var(--grey-2);
}

.proof-cards {
  display: flex;
  gap: calc(12 * var(--u));
}

.p-card {
  position: relative;
  height: calc(326 * var(--u));
  min-height: 260px;
  padding: calc(20 * var(--u));
  border-radius: calc(8 * var(--u));
  display: flex;
  flex-direction: column;
  transition: transform 0.5s var(--ease);
}

.p-card:hover {
  transform: translateY(calc(-6 * var(--u)));
}

.p-light {
  width: calc(293 * var(--u));
  background: #d6d6d6;
  color: var(--ink);
  justify-content: space-between;
}

.p-dark {
  width: calc(298 * var(--u));
  background: #262626;
}

.p-paper {
  width: calc(260 * var(--u));
  background: var(--text);
  color: var(--ink);
}

.p-discs {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  gap: calc(10 * var(--u));
}

.p-disc {
  display: grid;
  place-items: center;
  width: max(36px, calc(48 * var(--u)));
  height: max(36px, calc(48 * var(--u)));
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--f-wide);
  font-variation-settings: "wdth" 125;
  font-size: max(9px, calc(11 * var(--u)));
  font-weight: 700;
}

.p-num {
  font-size: calc(43 * var(--u));
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.p-num sup {
  font-size: 0.45em;
  vertical-align: top;
}

.p-label {
  margin-top: 6px;
  font-size: max(12px, calc(14 * var(--u)));
  opacity: 0.7;
}

.laurel {
  width: 70%;
  height: auto;
  margin: auto auto calc(10 * var(--u));
  color: #fff;
}

.laurel-t1 {
  font-family: var(--f-wide);
  font-variation-settings: "wdth" 125;
  font-size: 13px;
  font-weight: 700;
  fill: #fff;
}

.laurel-t2 {
  font-family: var(--f-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  fill: #bdbdbd;
}

.p-note {
  font-size: max(11px, calc(12.5 * var(--u)));
  line-height: 1.45;
  opacity: 0.65;
}

.p-paper .p-note {
  margin-top: auto;
}

.p-meter {
  height: 6px;
  margin: calc(26 * var(--u)) 0;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.p-meter span {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: var(--ink);
  transform-origin: 0 50%;
  transform: scaleX(var(--v));
  transition: transform 1.4s var(--ease);
}

.js .proof-panel:not(.is-counted) .p-meter span {
  transform: scaleX(0);
}

/* ==========================================================================
   STACK (paper)
   ========================================================================== */
.stack {
  padding: calc(150 * var(--u)) var(--gx);
  background: var(--paper);
  color: var(--ink);
}

.sec-head-dark .sec-title sup,
.sec-head-dark .sec-hint {
  color: #555;
}

.stack-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: calc(70 * var(--u));
  align-items: start;
}

.cap-list {
  border-bottom: 1px solid var(--line-ink);
}

.cap {
  position: relative;
  display: grid;
  grid-template-columns: calc(60 * var(--u)) 1fr;
  column-gap: 16px;
  width: 100%;
  text-align: left;
  padding: calc(22 * var(--u)) 0;
  border-top: 1px solid var(--line-ink);
}

.cap::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  height: 2px;
  width: 100%;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.6s var(--ease);
}

.cap-num {
  grid-row: span 2;
  font-family: var(--f-mono);
  font-size: 12px;
  color: #777;
  padding-top: 6px;
}

.cap-title {
  font-family: var(--f-wide);
  font-variation-settings: "wdth" 125;
  font-weight: 650;
  font-size: max(16px, calc(24 * var(--u)));
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #6d6d6d;
  transition: color 0.35s;
}

.cap-desc {
  max-height: 0;
  overflow: hidden;
  font-size: max(13px, calc(14 * var(--u)));
  line-height: 1.55;
  color: #444;
  transition: max-height 0.6s var(--ease), margin 0.6s var(--ease);
}

.cap:hover .cap-title,
.cap.is-active .cap-title {
  color: var(--ink);
}

.cap:hover::before,
.cap.is-active::before {
  transform: scaleX(1);
}

.cap:hover .cap-desc,
.cap.is-active .cap-desc {
  max-height: 120px;
  margin-top: 8px;
}

.tools {
  position: sticky;
  top: 110px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.tool {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--line-ink);
  font-size: max(12px, calc(13 * var(--u)));
  line-height: 1.25;
  transition: opacity 0.35s, background 0.35s, color 0.35s, transform 0.35s var(--ease), border-color 0.35s;
}

.tool b {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.07);
  font-family: var(--f-wide);
  font-variation-settings: "wdth" 125;
  font-size: 10px;
  font-weight: 700;
  transition: background 0.35s, color 0.35s;
}

.tools.is-filtering .tool {
  opacity: 0.28;
}

.tools.is-filtering .tool.is-lit {
  opacity: 1;
  background: var(--ink);
  border-color: var(--ink);
  color: var(--text);
  transform: translateY(-2px);
}

.tools.is-filtering .tool.is-lit b {
  background: var(--text);
  color: var(--ink);
}

/* ==========================================================================
   JOURNEY (black)
   ========================================================================== */
.journey-sec {
  padding: calc(150 * var(--u)) var(--gx);
}

.journey {
  --p: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  padding-top: 34px;
  margin-bottom: calc(60 * var(--u));
}

.journey-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}

.journey-line span {
  position: absolute;
  inset: 0;
  background: #fff;
  transform-origin: 0 50%;
  transform: scaleX(var(--p));
}

.step {
  position: relative;
  opacity: 0.35;
  transition: opacity 0.6s var(--ease);
}

.step::before {
  content: "";
  position: absolute;
  top: -39px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #000;
  border: 1px solid #fff;
  transition: background 0.4s;
}

.step.is-on {
  opacity: 1;
}

.step.is-on::before {
  background: #fff;
}

.step-year {
  display: block;
  font-family: var(--f-wide);
  font-variation-settings: "wdth" 125;
  font-weight: 700;
  font-size: calc(48 * var(--u));
  letter-spacing: -0.04em;
  line-height: 1;
}

.step-title {
  margin: 14px 0 6px;
  font-size: max(12px, calc(13 * var(--u)));
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.step-text {
  font-size: max(13px, calc(14 * var(--u)));
  line-height: 1.5;
  color: var(--grey-2);
}

.journey-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.j-card {
  padding: calc(28 * var(--u));
  border: 1px solid var(--line-2);
  border-radius: calc(14 * var(--u));
}

.j-card .label {
  color: var(--grey-2);
  margin-bottom: 8px;
}

.j-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.j-card .label + .j-row {
  border-top: 0;
}

.j-title {
  font-size: max(14px, calc(16 * var(--u)));
  font-weight: 500;
}

.j-meta {
  font-size: max(12px, calc(13 * var(--u)));
  color: var(--grey);
  margin-top: 2px;
}

.j-score {
  font-size: calc(38 * var(--u));
  font-weight: 400;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.j-score small {
  font-size: 0.45em;
  color: var(--grey);
}

.j-list {
  list-style: none;
}

.j-list li {
  position: relative;
  padding: 7px 0 7px 20px;
  font-size: max(13px, calc(14 * var(--u)));
  color: var(--grey-2);
  line-height: 1.55;
}

.j-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 15px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.j-list strong {
  color: var(--text);
  font-weight: 500;
}

/* ==========================================================================
   CONTACT (paper)
   ========================================================================== */
.contact {
  padding: calc(110 * var(--u)) var(--gx) calc(90 * var(--u));
  background: var(--paper);
  color: var(--ink);
}

.contact-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: calc(30 * var(--u));
}

.contact-title {
  font-family: var(--f-wide);
  font-variation-settings: "wdth" 125;
  font-weight: 760;
  font-size: calc(250 * var(--u));
  line-height: 0.84;
  letter-spacing: -0.06em;
}

/* lines never wrap; JS scales the font so the widest line fills the width */
.contact-title .t-inner {
  display: inline-block;
  white-space: nowrap;
}

.contact-arrow {
  display: inline-grid;
  place-items: center;
  width: 0.62em;
  height: 0.62em;
  margin-left: 0.05em;
  vertical-align: 0.06em;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
}

.contact-arrow svg {
  width: 0.36em;
  height: 0.36em;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr auto;
  gap: calc(60 * var(--u));
  align-items: start;
  margin-top: calc(70 * var(--u));
  padding-top: calc(30 * var(--u));
  border-top: 1px solid var(--line-ink);
}

.contact-lead {
  max-width: 380px;
  font-size: max(14px, calc(16 * var(--u)));
  line-height: 1.5;
}

.contact-list {
  list-style: none;
}

.contact-list li {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-ink);
  font-size: max(14px, calc(16 * var(--u)));
}

.contact-list .label {
  color: #666;
  font-size: 11px;
}

.contact-list a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease);
}

.contact-list a:hover {
  background-size: 100% 1px;
}

.copy-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-ink);
  font-size: 13px;
  transition: background 0.3s, color 0.3s;
}

.copy-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.contact-ctas {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px var(--gx);
  font-size: max(12px, calc(13 * var(--u)));
  color: var(--grey-2);
}

.footer kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--text);
}

.footer-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}

.footer-top svg {
  transform: rotate(-45deg);
}

/* ==========================================================================
   PROJECT MODAL
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
}

.modal.is-open {
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}

.modal.is-open .modal-backdrop {
  opacity: 1;
}

.modal-panel {
  position: relative;
  width: min(880px, 100%);
  max-height: calc(100svh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #0d0d0d;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition: opacity 0.45s var(--ease), transform 0.6s var(--ease);
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}

.modal.is-open .modal-panel {
  opacity: 1;
  transform: none;
}

.modal-close {
  position: sticky;
  top: 14px;
  float: right;
  margin: 14px 14px -56px 0;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  background: #fff;
  color: #000;
  transition: transform 0.4s var(--ease);
}

.modal-close:hover {
  transform: rotate(90deg);
}

.modal-hero {
  aspect-ratio: 16 / 8;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent);
}

.modal-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-content {
  position: relative;
  margin-top: -40px;
  padding: 0 clamp(20px, 4vw, 44px) clamp(24px, 4vw, 40px);
}

.modal-type {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--grey-2);
}

.modal-title {
  margin: 8px 0 16px;
  font-family: var(--f-wide);
  font-variation-settings: "wdth" 125;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.modal-lead {
  max-width: 680px;
  color: #bdbdbd;
  font-size: 1rem;
  font-weight: 400;
}

.modal-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 24px 0 28px;
}

.modal-metrics div {
  padding: 16px;
  border-radius: 10px;
  background: #1a1a1a;
}

.modal-metrics strong {
  display: block;
  font-weight: 400;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.modal-metrics span {
  font-size: 0.72rem;
  color: var(--grey-2);
}

.modal-sub {
  margin-bottom: 10px;
  font-family: var(--f-wide);
  font-variation-settings: "wdth" 125;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.modal-list {
  list-style: none;
  margin-bottom: 24px;
}

.modal-list li {
  position: relative;
  padding: 12px 0 12px 24px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.65;
  color: #bdbdbd;
}

.modal-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 21px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
}

.modal-list strong {
  color: var(--text);
  font-weight: 600;
}

.modal-list code {
  font-family: var(--f-mono);
  font-size: 0.85em;
  padding: 1px 6px;
  border-radius: 5px;
  background: #1d1d1d;
  color: var(--text);
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 26px;
}

.modal-tags span {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 0.75rem;
  color: #cfcfcf;
}

.modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* buttons reused inside the project templates */
.modal .btn-chrome,
.modal .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: transform 0.35s var(--ease), background 0.3s, color 0.3s;
}

.modal .btn-chrome {
  background: var(--text);
  color: var(--ink);
}

.modal .btn-ghost {
  border: 1px solid var(--line-2);
  color: var(--text);
}

.modal .btn-chrome:hover,
.modal .btn-ghost:hover {
  transform: translateY(-1px);
}

/* ==========================================================================
   TERMINAL (Ctrl+K)
   ========================================================================== */
.terminal-modal {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}

.terminal-modal.open {
  opacity: 1;
  visibility: visible;
}

.terminal-window {
  width: min(760px, 100%);
  height: min(500px, 80svh);
  display: flex;
  flex-direction: column;
  background: #0a0a0a;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  overflow: hidden;
  font-family: var(--f-mono);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.9);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.45s var(--ease);
}

.terminal-modal.open .terminal-window {
  transform: none;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #111;
}

.terminal-lights {
  display: flex;
  gap: 7px;
}

.terminal-lights span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #333;
}

.terminal-lights span:first-child {
  background: #e9e9e9;
}

.terminal-title {
  font-size: 0.72rem;
  color: var(--grey);
}

.terminal-close {
  width: 28px;
  height: 28px;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--grey-2);
}

.terminal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.7;
  color: #cfcfcf;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}

.term-line {
  margin-bottom: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

.term-line a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.term-accent {
  color: #fff;
  font-weight: 600;
}

.term-muted {
  color: var(--grey);
}

.terminal-chips {
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  scrollbar-width: none;
}

.terminal-chips button {
  flex-shrink: 0;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-family: var(--f-mono);
  font-size: 0.7rem;
  color: var(--grey-2);
  transition: color 0.3s, background 0.3s;
}

.terminal-chips button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}

.terminal-prompt {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
}

.terminal-input-row input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  color: var(--text);
  font-family: var(--f-mono);
  font-size: 16px;
  caret-color: #fff;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 400;
  padding: 12px 20px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-size: 0.82rem;
  transform: translate(-50%, 30px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s var(--ease), opacity 0.4s;
}

.toast.is-show {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* ==========================================================================
   TABLET & PHONE (stacked layout)
   ========================================================================== */
@media (max-width: 1024px) {
  :root {
    --u: min(calc(100vw / 390), 1.7px);
    --gx: calc(16 * var(--u));
  }

  .site-header {
    padding: 14px var(--gx) 0;
  }

  .site-header.is-scrolled {
    padding-top: 10px;
  }

  .header-loc {
    display: none;
  }

  .seg-link {
    padding: 0 12px;
    font-size: 12.5px;
  }

  .btn-contact {
    min-width: 0;
    width: 40px;
    height: 40px;
    padding: 0;
  }

  .btn-contact-label {
    display: none;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
  }

  /* hero becomes a single column */
  .hero {
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 96px var(--gx) 36px;
  }

  .hero > * {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
  }

  .hero-title {
    order: 1;
    font-size: calc(66 * var(--u));
    width: max-content;
    max-width: 100%;
  }

  .hero-about {
    order: 2;
    width: 100%;
    margin-top: 22px;
  }

  .hero-photo {
    order: 3;
    width: calc(100% + 2 * var(--gx));
    height: calc(400 * var(--u));
    margin: 18px calc(-1 * var(--gx)) 26px;
    /* stacked layout: drifting would push the photo into the stack row */
    --drift: 0px !important;
  }

  .portrait img {
    object-fit: cover;
  }

  .brand-plate {
    top: auto;
    bottom: 40%;
    width: calc(300 * var(--u));
    margin-left: calc(-150 * var(--u));
  }

  .hero-right {
    order: 5;
    width: 100%;
    align-items: stretch;
  }

  .glass-pill {
    align-self: flex-start;
  }

  .hero-available {
    margin-top: 18px;
    text-align: left;
  }

  .feature {
    margin-top: 22px;
  }

  .feature-img {
    height: calc(220 * var(--u));
  }

  .hero-stats {
    order: 6;
    width: 100%;
    height: calc(230 * var(--u));
    margin-top: 22px;
  }

  .hs-num {
    font-size: calc(34 * var(--u));
  }

  .bar {
    padding: 0 var(--gx);
  }

  .bar > span:first-child,
  .bar > span:last-child {
    font-size: 10px;
  }

  .bar-mid {
    font-size: 0;
    gap: 0;
  }

  .statement {
    padding: 90px var(--gx) 110px;
  }

  .statement-text {
    font-size: calc(28 * var(--u));
  }

  .statement-sub {
    margin-top: 70px;
  }

  .sec-head {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 10px;
    margin-bottom: 30px;
  }

  .sec-head > :last-child {
    justify-self: start;
  }

  .sec-title {
    font-size: calc(42 * var(--u));
    text-align: left;
  }

  .work {
    padding-bottom: 90px;
  }

  .work-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "num badge"
      "title go"
      "type type"
      "tags tags"
      "thumb thumb";
    gap: 8px 12px;
    padding: 22px 0 26px;
  }

  .wr-num { grid-area: num; }
  .wr-badge { grid-area: badge; justify-self: end; }
  .wr-title { grid-area: title; font-size: calc(36 * var(--u)); color: var(--text); }
  .wr-go { grid-area: go; width: 42px; height: 42px; }
  .wr-type { grid-area: type; }
  .wr-tags { grid-area: tags; }

  .wr-thumb {
    grid-area: thumb;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 10px;
    filter: grayscale(1) contrast(1.1);
  }

  .proof {
    padding-bottom: 90px;
  }

  .proof-panel {
    grid-template-columns: 1fr;
    padding: 24px 18px;
    border-radius: 14px;
  }

  .proof-title {
    font-size: calc(46 * var(--u));
  }

  .glass-tile {
    width: 64px;
    height: 64px;
    font-size: 22px;
  }

  .glass-tile-1 {
    left: auto;
    right: 4px;
    top: 0;
  }

  .glass-tile-2 {
    display: none;
  }

  .proof-copy {
    max-width: none;
  }

  .proof-cards {
    flex-direction: column;
  }

  .p-card,
  .p-light,
  .p-dark,
  .p-paper {
    width: 100%;
    height: auto;
    min-height: 220px;
    gap: 14px;
  }

  .p-num {
    font-size: calc(44 * var(--u));
  }

  .laurel {
    width: 180px;
  }

  .stack,
  .journey-sec {
    padding: 90px var(--gx);
  }

  .stack-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .cap-desc {
    max-height: none;
    margin-top: 6px;
  }

  .cap-title {
    color: var(--ink);
  }

  .tools {
    position: static;
    grid-template-columns: repeat(2, 1fr);
  }

  .journey {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 0 0 26px;
  }

  .journey-line {
    top: 6px;
    bottom: 6px;
    left: 4px;
    right: auto;
    width: 1px;
    height: auto;
  }

  .journey-line span {
    transform-origin: 50% 0;
    transform: scaleY(var(--p));
  }

  .step {
    padding: 0 0 26px;
  }

  .step::before {
    top: 10px;
    left: -26px;
  }

  .step-year {
    font-size: calc(36 * var(--u));
  }

  .journey-cards {
    grid-template-columns: 1fr;
  }

  .j-card {
    padding: 20px;
  }

  .j-score {
    font-size: 28px;
  }

  .contact {
    padding: 80px var(--gx) 60px;
  }

  .contact-top {
    flex-direction: column;
    gap: 6px;
  }

  .contact-title {
    font-size: calc(80 * var(--u));
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .contact-list li {
    grid-template-columns: 70px 1fr auto;
    font-size: 14px;
  }

  .footer {
    flex-direction: column;
    text-align: center;
  }

  .modal {
    padding: 0;
    place-items: end stretch;
  }

  .modal-panel {
    max-height: 92svh;
    border-radius: 18px 18px 0 0;
    transform: translateY(100%);
  }

  .modal-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .modal-metrics div:last-child {
    grid-column: span 2;
  }

  .keyboard {
    display: none;
  }
}

@media (max-width: 520px) {
  .seg-link[data-nav="journey"] {
    display: none;
  }

  .intro-meta-tr,
  .intro-caption-l,
  .intro-caption-r {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
