/* ============================================================
   W/ — ASCII PORTFOLIO
   monochrome only: #070708 → #ffffff
   ============================================================ */

:root {
  --bg: #070708;
  --bg-soft: #0b0b0d;
  --bg-elev: #0e0e10;
  --ink: #f4f4f4;
  --muted: #a6a6a6;
  --faint: #6a6a6a;
  --ghost: #2c2c2e;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.3);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --font: var(--font-mono);
  --ease: cubic-bezier(0.22, 0.8, 0.2, 1);
  --wrap: min(1240px, calc(100% - clamp(32px, 8vw, 96px)));
  --header-h: 64px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

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

h1, h2, h3, p, ul, pre { margin: 0; }
ul { padding: 0; list-style: none; }

/* ---------- type system ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
}

.mono-label, .kicker, .brand-text, .brand-mark, .nav, .status, .clock,
.menu-toggle, .eyebrow, .btn, .hero-stats, .stage-tag, .stage-hint, .ticker,
.card-index, .card-tag, .card-foot, .stack-row, .terminal, .work-index,
.work-meta, .work-tags, .work-link, .contact-label, .contact-value, .copy-btn,
.contact-note, .site-footer, .to-top, .facts li span, .facts em {
  font-family: var(--font-mono);
}

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

/* ---------- background layers ---------- */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 18%, #000 10%, transparent 78%);
  mask-image: radial-gradient(ellipse at 50% 18%, #000 10%, transparent 78%);
  transition: opacity 0.8s ease;
}

html.bg-grid-ready body::before { opacity: 0; }

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse at 50% 18%, #000 10%, transparent 78%);
  mask-image: radial-gradient(ellipse at 50% 18%, #000 10%, transparent 78%);
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.026) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
  opacity: 0.55;
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 56;
  pointer-events: none;
  opacity: 0.05;
  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.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.8s steps(2) infinite;
}

@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(2%, 2%); }
  100% { transform: translate(-1%, -1%); }
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 70;
  width: 0;
  height: 1px;
  background: var(--ink);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.55);
  transition: width 0.1s linear;
}

/* ---------- header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
  padding: 0 clamp(20px, 4vw, 52px);
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}

.site-header.scrolled {
  background: rgba(7, 7, 8, 0.78);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 26px;
  border: 1px solid var(--line-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.04em;
  transition: background 0.25s, color 0.25s;
}

.brand:hover .brand-mark { background: var(--ink); color: var(--bg); }

.brand-text {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 30px);
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  transition: color 0.25s;
}

.nav a span { color: var(--faint); font-size: 9px; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav a:hover, .nav a.active { color: var(--ink); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }

.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.clock {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.menu-toggle {
  display: none;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 4px 0;
}

/* ---------- shared ---------- */

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

.mono-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
}

.kicker {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}

.section {
  position: relative;
  padding: clamp(76px, 11vw, 148px) 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: clamp(36px, 5.5vw, 68px);
}

.section-title {
  margin-top: 12px;
  font-size: clamp(2rem, 4.6vw, 3.9rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-transform: uppercase;
  font-weight: 600;
}

.section-note {
  max-width: 36ch;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.hollow {
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 244, 244, 0.78);
}

@supports not (-webkit-text-stroke: 1px #fff) {
  .hollow { color: var(--ink); }
}

/* ---------- reveal ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
  transition-delay: var(--d, 0ms);
}

[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + clamp(24px, 4vh, 48px));
  overflow: hidden;
}

.hero-top {
  width: var(--wrap);
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.hero-stage {
  position: relative;
  flex: 1 1 auto;
  width: min(980px, 94vw);
  height: clamp(360px, 48vh, 560px);
  margin: 4px auto 0;
  isolation: isolate;
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 4% 12%;
  z-index: -1;
  background: radial-gradient(ellipse at 50% 48%, rgba(255, 255, 255, 0.06), transparent 68%);
  filter: blur(24px);
  pointer-events: none;
}

#w-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

#w-canvas.grabbing { cursor: grabbing; }

.stage-frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.corner {
  position: absolute;
  font-size: 13px;
  line-height: 1;
  color: var(--faint);
}
.corner.tl { top: -7px; left: -5px; }
.corner.tr { top: -7px; right: -5px; }
.corner.bl { bottom: -7px; left: -5px; }
.corner.br { bottom: -7px; right: -5px; }

.stage-tag {
  position: absolute;
  top: 12px;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}
.stage-tag.left { left: 14px; }
.stage-tag.right { right: 14px; }

.stage-hint {
  position: absolute;
  left: 14px;
  bottom: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
  pointer-events: none;
}

.stage-hint .blink { color: var(--ink); animation: blink 1.1s steps(2) infinite; }
.stage-hint .hint-sep { color: var(--ghost); }
#spin-state { color: var(--muted); }

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hero-copy {
  width: var(--wrap);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(28px, 4vw, 70px);
  align-items: end;
  padding: clamp(16px, 2.4vh, 28px) 0 clamp(40px, 6vh, 64px);
}

.hero-copy-main { min-width: 0; }
.hero-copy-side { min-width: 0; padding-bottom: 4px; }

.eyebrow {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.accent { color: var(--ink); }

.hero-title {
  margin-top: 14px;
  font-size: clamp(2.5rem, 7vw, 6.1rem);
  line-height: 1.03;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  font-weight: 600;
}

.hero-title .line { display: block; }
.hero-title .line:nth-child(2) { margin-left: clamp(0px, 3vw, 48px); }

.hero-lede {
  max-width: 48ch;
  margin-top: 0;
  color: var(--muted);
  font-size: clamp(12.5px, 1.1vw, 14px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 13px 18px;
  border: 1px solid var(--line-strong);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  overflow: hidden;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateY(101%);
  transition: transform 0.35s var(--ease);
  z-index: 0;
}

.btn span { position: relative; z-index: 1; }
.btn .btn-arrow { font-size: 13px; line-height: 1; }

.btn:hover { color: var(--bg); border-color: var(--ink); }
.btn:hover::before { transform: translateY(0); }

.btn.ghost { border-color: var(--line); color: var(--muted); }
.btn.ghost:hover { color: var(--bg); }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(18px, 2.4vw, 32px);
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.hero-stats b {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.hero-stats span {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.hero-side {
  position: absolute;
  bottom: 90px;
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--faint);
  writing-mode: vertical-rl;
  pointer-events: none;
}

.hero-side.left { left: clamp(10px, 2vw, 26px); }
.hero-side.right { right: clamp(10px, 2vw, 26px); transform: rotate(180deg); }
.hero-side span { display: inline-block; margin-top: 8px; }

/* ---------- ticker ---------- */

.ticker {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: marquee 42s linear infinite;
  will-change: transform;
}

.ticker:hover .ticker-track { animation-play-state: paused; }

.ticker span {
  padding-right: 1.9em;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.ticker .sep { color: var(--faint); }

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- services ---------- */

.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 400px;
  padding: clamp(24px, 3.4vw, 44px);
  background: var(--bg);
  overflow: hidden;
  transition: background 0.4s var(--ease);
}

.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.07), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
}

.service-card:hover { background: var(--bg-soft); }
.service-card:hover::after { opacity: 1; }

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(28px, 5vw, 54px);
}

.card-index {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--faint);
}

.card-tag {
  border: 1px solid var(--line);
  padding: 3px 9px;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.service-card h3 {
  font-size: clamp(2.2rem, 4.2vw, 3.7rem);
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
  font-weight: 600;
}

.card-desc {
  max-width: 44ch;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.ticks {
  display: grid;
  gap: 7px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.ticks li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 11.5px;
  color: var(--muted);
}

.ticks li::before {
  content: "+";
  color: var(--faint);
  font-size: 11px;
}

.card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: auto;
  padding-top: 32px;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.card-foot .arrow {
  color: var(--muted);
  transition: transform 0.3s var(--ease), color 0.3s;
}

.service-card:hover .card-foot .arrow {
  color: var(--ink);
  transform: translateX(5px);
}

/* ---------- stack ---------- */

.stack-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.stack-list { border-top: 1px solid var(--line); }

.stack-row {
  display: grid;
  grid-template-columns: 40px minmax(100px, 0.7fr) 1.4fr auto;
  gap: 16px;
  align-items: center;
  padding: 17px 4px;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s, padding 0.3s var(--ease);
}

.stack-row:hover {
  background: rgba(255, 255, 255, 0.025);
  padding-left: 12px;
  padding-right: 12px;
}

.stack-num {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--faint);
}

.stack-name {
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 500;
  transition: color 0.25s;
}

.stack-row:hover .stack-name { color: #fff; }

.stack-desc {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.stack-tag {
  border: 1px solid var(--line);
  padding: 3px 8px;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  justify-self: end;
}

.terminal {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.terminal-body {
  min-height: 300px;
  padding: 20px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}

.term-line { min-height: 1.9em; white-space: pre-wrap; word-break: break-word; }
.term-line.cmd { color: var(--ink); }
.term-line.out { color: var(--muted); }
.term-line.gap { min-height: 0.9em; }

.terminal-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px 18px;
  color: var(--ink);
  font-size: 12px;
}

.term-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--ink);
  animation: blink 1.1s steps(2) infinite;
}

/* ---------- work ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.work-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--bg);
  transition: border-color 0.3s, transform 0.5s var(--ease), background 0.3s;
}

.work-card:hover {
  border-color: var(--line-strong);
  background: var(--bg-soft);
  transform: translateY(-4px);
}

.work-visual {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.055), transparent 68%),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
}

.work-visual pre {
  font-size: clamp(8px, 0.95vw, 11px);
  line-height: 1.28;
  color: var(--muted);
  transition: color 0.35s, transform 0.6s var(--ease);
  white-space: pre;
}

.work-card:hover .work-visual pre {
  color: var(--ink);
  transform: scale(1.035);
}

.work-index {
  position: absolute;
  top: 11px;
  left: 13px;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--faint);
}

.work-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px;
}

.work-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}

.work-body h3 {
  margin-top: 18px;
  font-size: clamp(1.35rem, 2.1vw, 1.8rem);
  line-height: 1;
  letter-spacing: 0.01em;
  font-weight: 500;
}

.work-body p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.work-tags span {
  border: 1px solid var(--line);
  padding: 2px 7px;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

.work-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 24px;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s;
}

.work-link span { transition: transform 0.3s var(--ease); }
.work-link:hover { color: var(--ink); }
.work-link:hover span { transform: translateX(5px); }

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 6vw, 90px);
  align-items: start;
}

.about-lead {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.about-text p + p {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  max-width: 58ch;
}

.facts {
  border-top: 1px solid var(--line);
}

.facts li {
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  padding: 17px 2px;
  border-bottom: 1px solid var(--line);
}

.facts li > span {
  grid-row: 1 / 3;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--faint);
  padding-top: 3px;
}

.facts b {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.facts em {
  margin-top: 3px;
  font-style: normal;
  font-size: 10.5px;
  color: var(--faint);
  letter-spacing: 0.02em;
}

/* ---------- contact ---------- */

.contact { padding-bottom: clamp(80px, 12vw, 150px); }

.contact-head {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: end;
  margin-top: 24px;
}

.contact-title {
  font-size: clamp(3.2rem, 10vw, 8.4rem);
  line-height: 0.82;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  font-weight: 600;
}

.contact-lede {
  max-width: 34ch;
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.75;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: clamp(44px, 7vw, 80px);
  border: 1px solid var(--line);
  background: var(--line);
}

.contact-link {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--bg);
  transition: background 0.3s;
}

.contact-link:hover { background: var(--bg-soft); }

.contact-label {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
}

.contact-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  letter-spacing: -0.02em;
}

.contact-value i {
  font-style: normal;
  font-size: 13px;
  color: var(--faint);
  transition: transform 0.3s var(--ease), color 0.3s;
}

.contact-link:hover .contact-value i {
  color: var(--ink);
  transform: translate(3px, -3px);
}

.contact-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
}

.copy-btn {
  border: 1px solid var(--line);
  padding: 9px 13px;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}

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

.contact-note {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
}

.footer-row {
  width: var(--wrap);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand,
.footer-copy,
.to-top {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.footer-ascii {
  color: var(--ghost);
  font-size: 9px;
  letter-spacing: 0.08em;
  overflow: hidden;
  white-space: nowrap;
}

.to-top { color: var(--muted); transition: color 0.25s; }
.to-top:hover { color: var(--ink); }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .work-grid { grid-template-columns: 1fr 1fr; }
  .work-card:last-child { grid-column: span 2; }
  .work-card:last-child .work-visual { aspect-ratio: 21 / 7; }
}

@media (max-width: 860px) {
  :root { --header-h: 58px; }

  .brand-text, .status, .clock { display: none; }
  .menu-toggle { display: inline-block; }

  .nav {
    position: fixed;
    top: calc(var(--header-h) + 8px);
    left: 12px;
    right: 12px;
    z-index: 59;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px;
    background: rgba(9, 9, 11, 0.97);
    border: 1px solid var(--line);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }

  .nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav a {
    padding: 13px 10px;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
  }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { display: none; }

  .hero-side { display: none; }

  .hero-copy {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 22px;
  }

  .hero-copy-side { padding-bottom: 0; }

  .hero-title { font-size: clamp(2.3rem, 8.5vw, 4rem); }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .section-note { text-align: left; }

  .service-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 0; }

  .stack-layout { grid-template-columns: 1fr; }
  .terminal { position: static; }

  .about-grid { grid-template-columns: 1fr; }
  .contact-head { grid-template-columns: 1fr; gap: 24px; }
  .contact-lede { padding-bottom: 0; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 14px; }

  .hero { min-height: auto; }
  .hero-top { font-size: 8.5px; }
  .hero-stage { height: clamp(260px, 40vh, 360px); width: 94vw; }
  .stage-tag { display: none; }
  .stage-hint {
    left: 50%;
    bottom: 2px;
    transform: translateX(-50%);
    padding: 4px 7px;
    background: rgba(7, 7, 8, 0.82);
    font-size: 8px;
    letter-spacing: 0.14em;
  }

  .hero-title { font-size: clamp(2rem, 11.5vw, 3.4rem); }
  .hero-title .line:nth-child(2) { margin-left: 0; }
  .hero-lede { font-size: 12px; }

  .hero-stats { gap: 18px; }
  .hero-stats li { flex-direction: column; gap: 2px; }

  .work-grid { grid-template-columns: 1fr; }
  .work-card:last-child { grid-column: auto; }
  .work-card:last-child .work-visual { aspect-ratio: 16 / 10; }

  .stack-row {
    grid-template-columns: 28px 1fr auto;
    gap: 10px;
  }
  .stack-desc { grid-column: 2 / 4; font-size: 10px; }
  .stack-tag { grid-row: 1; grid-column: 3; }

  .footer-ascii { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .ticker-track { animation: none; }
  .grain { animation: none; }
  .status i { animation: none; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
