/* =========================================================
   Jonny — portfolio
   Dark, minimal, Linear/Unseen-coded
   ========================================================= */

:root {
  /* base palette */
  --bg:        oklch(13% 0.005 250);
  --bg-elev:   oklch(16% 0.005 250);
  --bg-deep:   oklch(10% 0.005 250);
  --fg:        oklch(94% 0.004 250);
  --fg-soft:   oklch(82% 0.005 250);
  --muted:     oklch(58% 0.008 250);
  --muted-2:   oklch(44% 0.008 250);
  --hairline:  oklch(22% 0.005 250);
  --hairline-2: oklch(28% 0.005 250);

  /* accent — overridable by tweaks. default: warm sodium amber */
  --accent:    oklch(78% 0.13 65);
  --accent-dim: oklch(78% 0.13 65 / 0.22);
  --accent-soft: oklch(78% 0.13 65 / 0.08);

  /* type */
  --font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-serif: "Instrument Serif", ui-serif, Georgia, serif;

  /* metrics */
  --gutter: clamp(28px, 5vw, 64px);
  --page-max: 1280px;
  --hairline-w: 1px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "ss02", "cv01", "cv11";
}

body {
  overflow-x: hidden;
}

/* Hide the scrollbar visually, keep scroll behaviour. One rule per engine. */
html, body {
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE / old Edge */
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;                  /* Chrome, Safari, modern Edge */
}

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

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

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

/* Film grain — two layers so it doesn't read as flat */
body::before {
  content: "";
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.085;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grainShift 7s steps(6) infinite;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1001;
  opacity: 0.04;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.45' numOctaves='1' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -2%); }
  80%  { transform: translate(3%, 1%); }
  100% { transform: translate(0, 0); }
}

/* =========================================================
   Ambient atmosphere — drifting accent-tinted blobs behind everything
   ========================================================= */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ambient__blob {
  position: absolute;
  width: 90vmax;
  height: 90vmax;
  border-radius: 50%;
  filter: blur(140px);
  will-change: transform;
}
.ambient__blob.a {
  background: radial-gradient(circle, color-mix(in oklch, var(--accent) 65%, transparent) 0%, transparent 55%);
  top: -38vmax;
  left: -28vmax;
  opacity: 0.55;
  animation: drift1 80s ease-in-out infinite;
}
.ambient__blob.b {
  background: radial-gradient(circle, oklch(40% 0.07 260 / 0.85) 0%, transparent 60%);
  bottom: -45vmax;
  right: -30vmax;
  opacity: 0.6;
  animation: drift2 105s ease-in-out infinite;
}
.ambient__blob.c {
  background: radial-gradient(circle, color-mix(in oklch, var(--accent) 35%, transparent) 0%, transparent 55%);
  top: 90vh;
  left: 35vw;
  opacity: 0.4;
  animation: drift3 130s ease-in-out infinite;
}
@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(18vw, 12vh) scale(1.1); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-14vw, -18vh) scale(1.05); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-30%, -65%) scale(1.15); }
}

/* Ensure all real content sits above ambient */
.site-header, main, section, footer, .__tweaks-root { position: relative; z-index: 2; }

/* =========================================================
   Section wireframes — atmospheric supporting forms
   Locked to a cool blue (not the accent), low opacity, behind content.
   ========================================================= */
:root {
  --wire: oklch(76% 0.06 235);
  --wire-soft: oklch(76% 0.06 235 / 0.35);
  --wire-line: oklch(76% 0.06 235 / 0.45);
}

.bg-wire {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

/* ---- About: tilted frame contour (concentric rectangles) ---- */
.bg-wire--frame .rect {
  position: absolute;
  border: 1px solid var(--wire-line);
  top: 50%;
  right: 6%;
  width: clamp(140px, 28vw, 380px);
  aspect-ratio: 7 / 5;
  transform: translateY(-50%) rotate(-5deg);
  opacity: 0.7;
}
.bg-wire--frame .rect.r2 {
  width: clamp(110px, 22vw, 300px);
  right: 12%;
  transform: translateY(-25%) rotate(-5deg);
  border-color: var(--wire-soft);
  opacity: 0.55;
}
.bg-wire--frame .rect::before,
.bg-wire--frame .rect::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  border: 1px solid var(--wire-line);
}
.bg-wire--frame .rect::before {
  top: -5px; left: -5px; border-right: 0; border-bottom: 0;
}
.bg-wire--frame .rect::after {
  bottom: -5px; right: -5px; border-left: 0; border-top: 0;
}

/* ---- Projects: slowly-rotating wireframe cube (CSS 3D) ---- */
.bg-wire--cube {
  perspective: 1400px;
}
.bg-wire--cube .cube {
  position: absolute;
  width: clamp(120px, 22vw, 300px);
  height: clamp(120px, 22vw, 300px);
  top: 50%;
  right: 7%;
  transform-style: preserve-3d;
  transform: translateY(-50%);
  opacity: 0.5;
}
.bg-wire--cube .cube-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: cubeSpin 90s linear infinite;
}
@keyframes cubeSpin {
  from { transform: rotateX(-18deg) rotateY(0deg); }
  to   { transform: rotateX(-18deg) rotateY(360deg); }
}
.bg-wire--cube .face {
  position: absolute;
  inset: 0;
  border: 1px solid var(--wire-line);
  background:
    linear-gradient(transparent calc(50% - 0.5px), var(--wire-soft) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(90deg, transparent calc(50% - 0.5px), var(--wire-soft) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px));
}
.bg-wire--cube .face.f1 { transform: translateZ(calc(clamp(120px, 22vw, 300px) / 2)); }
.bg-wire--cube .face.f2 { transform: rotateY(180deg) translateZ(calc(clamp(120px, 22vw, 300px) / 2)); }
.bg-wire--cube .face.f3 { transform: rotateY(90deg)  translateZ(calc(clamp(120px, 22vw, 300px) / 2)); }
.bg-wire--cube .face.f4 { transform: rotateY(-90deg) translateZ(calc(clamp(120px, 22vw, 300px) / 2)); }
.bg-wire--cube .face.f5 { transform: rotateX(90deg)  translateZ(calc(clamp(120px, 22vw, 300px) / 2)); }
.bg-wire--cube .face.f6 { transform: rotateX(-90deg) translateZ(calc(clamp(120px, 22vw, 300px) / 2)); }

/* ---- Now: isometric desk-and-room ---- */
.bg-wire--iso .iso {
  position: absolute;
  width: clamp(200px, 42vw, 620px);
  aspect-ratio: 7 / 6;
  top: 50%;
  right: 6%;
  transform: translateY(-50%);
  opacity: 0.6;
}
.bg-wire--iso svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.bg-wire--iso svg .iso-line {
  stroke: var(--wire-line);
  stroke-width: 1;
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}
.bg-wire--iso svg .iso-line-soft {
  stroke: var(--wire-soft);
  stroke-width: 1;
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}
.bg-wire--iso svg .iso-screen-glow {
  fill: var(--wire);
  opacity: 0.18;
  filter: blur(6px);
  transform-origin: center;
  animation: isoGlow 5s ease-in-out infinite;
}
@keyframes isoGlow {
  0%, 100% { opacity: 0.12; }
  50%      { opacity: 0.28; }
}

/* ---- Contact: dense radial constellation of nodes connected by thin lines ---- */
.bg-wire--network {
  overflow: visible;
}
.bg-wire--network .net {
  position: absolute;
  inset: 0;
  opacity: 0.75;
  display: grid;
  place-items: center;
}
.bg-wire--network svg {
  width: min(100%, 1100px);
  height: 100%;
  display: block;
  overflow: visible;
}
.bg-wire--network svg .net-line {
  stroke: var(--wire-line);
  stroke-width: 1;
  fill: none;
  vector-effect: non-scaling-stroke;
  opacity: 0.85;
}
.bg-wire--network svg .net-line-faint {
  stroke: var(--wire-soft);
  stroke-width: 1;
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 2 3;
  opacity: 0.7;
}
.bg-wire--network svg .net-node {
  fill: var(--wire);
  stroke: var(--wire-line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.bg-wire--network svg .net-node.lbl {
  fill: var(--wire);
}
.bg-wire--network svg .net-hub {
  fill: var(--accent);
  stroke: var(--accent);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 6px var(--accent));
}
.bg-wire--network svg .net-hub-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  opacity: 0.55;
  transform-box: fill-box;
  transform-origin: center;
  animation: hubRingPulse 4s ease-in-out infinite;
}
@keyframes hubRingPulse {
  0%, 100% { transform: scale(1);    opacity: 0.55; }
  50%      { transform: scale(1.25); opacity: 0.15; }
}
.bg-wire--network svg .net-halo {
  fill: var(--wire);
  opacity: 0.18;
  transform-box: fill-box;
  transform-origin: center;
  animation: netHalo 4.5s ease-in-out infinite;
  filter: blur(3px);
}
.bg-wire--network svg .net-halo.h2 { animation-delay: 0.5s; }
.bg-wire--network svg .net-halo.h3 { animation-delay: 1.0s; }
.bg-wire--network svg .net-halo.h4 { animation-delay: 1.5s; }
.bg-wire--network svg .net-halo.h5 { animation-delay: 2.0s; }
.bg-wire--network svg .net-halo.h6 { animation-delay: 2.5s; }
.bg-wire--network svg .net-halo.h7 { animation-delay: 3.0s; }
@keyframes netHalo {
  0%, 100% { opacity: 0.10; transform: scale(1);   }
  50%      { opacity: 0.30; transform: scale(1.4); }
}
.bg-wire--network svg .net-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  fill: var(--wire-line);
  opacity: 0.75;
}

@media (max-width: 900px) {
  #contact .bg-wire--network { left: 0; right: 0; }
}

@media (max-width: 780px) {
  .bg-wire { opacity: 0.6; }
  .bg-wire--frame .rect { right: 10%; }
  .bg-wire--cube .cube  { right: 10%; }
  .bg-wire--iso .iso    { right: 10%; }
}

/* =========================================================
   Layout primitives
   ========================================================= */

.container {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.hairline {
  border: 0;
  height: 1px;
  background: var(--hairline);
  margin: 0;
}

/* mono micro-label */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}

/* =========================================================
   Header
   ========================================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: color-mix(in oklch, var(--bg) 55%, transparent);
  border-bottom: 1px solid color-mix(in oklch, var(--hairline) 70%, transparent);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--fg);
  position: relative;
}

.brand__mark {
  width: 18px;
  height: 18px;
  border: 1px solid var(--fg-soft);
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  letter-spacing: 0;
  color: var(--fg);
}

.brand__name {
  color: var(--fg);
}

.brand__full {
  color: var(--muted);
  cursor: help;
  border-bottom: 1px dotted var(--muted-2);
  position: relative;
}

.brand__full:hover .tooltip {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.tooltip {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-soft);
  background: var(--bg-elev);
  border: 1px solid var(--hairline-2);
  padding: 8px 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
  pointer-events: none;
  letter-spacing: 0;
  text-transform: none;
}

.tooltip::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 14px;
  width: 7px;
  height: 7px;
  background: var(--bg-elev);
  border-left: 1px solid var(--hairline-2);
  border-top: 1px solid var(--hairline-2);
  transform: rotate(45deg);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  transition: color 160ms ease;
  position: relative;
}

.nav a::before {
  content: attr(data-num);
  color: var(--muted-2);
  font-size: 10px;
}

.nav a:hover { color: var(--fg); }
.nav a.is-active { color: var(--fg); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-dim);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-dim); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 140px;
  padding-bottom: 48px;
  position: relative;
  overflow: hidden;
}

/* =========================================================
   Hero centerpiece — wireframe globe (CSS 3D, no SVG)
   ========================================================= */
.orb-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: grid;
  place-items: center;
  z-index: 1;
  will-change: transform;
}
.orb-stage__inner {
  position: relative;
  width: clamp(280px, 62vmin, 760px);
  aspect-ratio: 1;
  transform: translate(15%, -2%);
}
.orb-halo {
  position: absolute;
  inset: -30%;
  border-radius: 50%;
  background:
    radial-gradient(circle, color-mix(in oklch, var(--accent) 28%, transparent) 0%, transparent 55%);
  filter: blur(30px);
  z-index: 0;
  animation: haloPulse 8s ease-in-out infinite;
}
@keyframes haloPulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.04); }
}
.orb {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  perspective: 1400px;
  animation: orbSpin 60s linear infinite;
}
@keyframes orbSpin {
  from { transform: rotateY(0)    rotateX(-12deg); }
  to   { transform: rotateY(360deg) rotateX(-12deg); }
}
.orb__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid color-mix(in oklch, var(--accent) 45%, transparent);
  transform: rotateY(calc(var(--i) * 22.5deg));
  box-shadow:
    inset 0 0 60px color-mix(in oklch, var(--accent) 7%, transparent);
}
.orb__ring.lat {
  border: 1px dashed color-mix(in oklch, var(--accent) 30%, transparent);
  transform: rotateX(90deg);
  inset: 28%;
}
.orb__core {
  position: absolute;
  top: 50%; left: 50%;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 12px var(--accent),
    0 0 40px var(--accent),
    0 0 90px color-mix(in oklch, var(--accent) 60%, transparent);
  animation: corePulse 3.6s ease-in-out infinite;
}
@keyframes corePulse {
  0%, 100% { opacity: 0.85; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1;    transform: translate(-50%, -50%) scale(1.4); }
}
.orb__faintdot {
  position: absolute;
  width: 2px; height: 2px;
  background: var(--fg-soft);
  border-radius: 50%;
  opacity: 0.35;
}
.orb__faintdot.d1 { top: 12%;  left: 70%; }
.orb__faintdot.d2 { top: 78%;  left: 22%; }
.orb__faintdot.d3 { top: 40%;  left: 6%;  }
.orb__faintdot.d4 { top: 88%;  left: 64%; }
.orb__faintdot.d5 { top: 18%;  left: 32%; }

@media (max-width: 780px) {
  .orb-stage__inner { transform: translate(0, -8%); }
  .orb-stage { opacity: 0.55; }
}

.hero__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, color-mix(in oklch, var(--hairline) 60%, transparent) 1px, transparent 1px);
  background-size: calc((100% - 2 * var(--gutter)) / 12) 100%;
  background-position: var(--gutter) 0;
  background-repeat: no-repeat;
  opacity: 0.4;
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

.hero__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  position: relative;
}

.hero__id {
  display: grid;
  gap: 4px;
}

.hero__id .eyebrow { color: var(--fg-soft); }
.hero__id .sub { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }

.hero__coords {
  text-align: right;
  display: grid;
  gap: 4px;
}

.hero__coords .row {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.hero__coords .row strong {
  color: var(--fg-soft);
  font-weight: 400;
}

.hero__center {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 80px 0;
  position: relative;
  z-index: 2;
}

.hero__top, .hero__bottom { z-index: 3; }

.hero__title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(42px, 12vw, 200px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: 0;
  color: var(--fg);
  text-wrap: balance;
}

.hero__title .ital {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--fg-soft);
}

.hero__sub {
  margin-top: 28px;
  max-width: 520px;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--fg-soft);
  line-height: 1.45;
}

.hero__sub .accent-bar {
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin: 0 12px 4px 0;
}

.hero__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  position: relative;
}

.hero__bottom .eyebrow { color: var(--muted); }

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scroll-cue__line {
  width: 36px;
  height: 1px;
  background: linear-gradient(to right, var(--muted-2), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-cue__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--fg), transparent);
  transform: translateX(-100%);
  animation: scrollLine 2.6s ease-in-out infinite;
}

@keyframes scrollLine {
  0%   { transform: translateX(-100%); }
  60%  { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

/* =========================================================
   Section scaffold
   ========================================================= */

section.block {
  padding-top: 120px;
  padding-bottom: 120px;
  position: relative;
}

.section-head {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  align-items: baseline;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 64px;
}

.section-head__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

.section-head__num span {
  color: var(--fg);
}

.section-head__title {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--fg);
  max-width: 780px;
  text-wrap: balance;
}

.section-head__title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--fg-soft);
}

/* =========================================================
   About
   ========================================================= */

.about-grid {
  display: grid;
  grid-template-columns: 160px 1fr 280px;
  gap: 32px;
}

.about-body {
  font-family: var(--font-sans);
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.55;
  color: var(--fg-soft);
  max-width: 680px;
}

.about-body p { margin: 0 0 1.2em 0; }
.about-body p:last-child { margin-bottom: 0; }

.about-body em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--fg);
  font-weight: 400;
}

.about-body .pull {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.3;
  color: var(--fg);
  margin: 0;
}

.about-side {
  display: grid;
  gap: 24px;
  align-content: start;
  border-left: 1px solid var(--hairline);
  padding-left: 24px;
}

.about-side dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.about-side dd {
  margin: 0 0 16px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-soft);
  line-height: 1.5;
}

.about-side dd:last-child { margin-bottom: 0; }

/* =========================================================
   Projects / Food Decider case study
   ========================================================= */

.project {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  margin-bottom: 96px;
}

.project:last-child { margin-bottom: 0; }

.project__meta {
  display: grid;
  gap: 14px;
  align-content: start;
}

.project__meta .kv {
  display: grid;
  gap: 3px;
}

.project__meta .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.project__meta .v {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-soft);
}

.project__main {}

.project__title {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 8px 0;
}

.project__title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--fg-soft);
}

.project__tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(18px, 1.8vw, 24px);
  color: var(--muted);
  margin: 0 0 40px 0;
}

/* placeholder visual */
.project__visual-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  margin-bottom: 40px;
  position: relative;
}

.project__visual {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-deep);
  border: 1px solid var(--hairline);
  overflow: hidden;
  display: grid;
  place-items: center;
  transition: border-color 220ms ease, transform 320ms cubic-bezier(.2,.7,.2,1);
}

.project__visual-link .project__visual {
  margin-bottom: 0;
}

.project__visual-link:hover .project__visual {
  border-color: color-mix(in oklch, var(--accent) 60%, var(--hairline));
  transform: scale(1.005);
}

.project__visual-hover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  background: radial-gradient(ellipse at center,
    color-mix(in oklch, var(--bg-deep) 70%, transparent) 0%,
    color-mix(in oklch, var(--bg-deep) 85%, transparent) 60%,
    color-mix(in oklch, var(--bg-deep) 95%, transparent) 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.project__visual-hover .vhover__arrow {
  font-size: 16px;
  transition: transform 240ms cubic-bezier(.2,.7,.2,1);
}

.project__visual-link:hover .project__visual-hover {
  opacity: 1;
}

.project__visual-link:hover .project__visual-hover .vhover__arrow {
  transform: translate(3px, -3px);
}

/* Project meta rail — clickable kv */
a.kv.kv--link {
  display: grid;
  gap: 3px;
  text-decoration: none;
  color: inherit;
  transition: color 200ms ease;
}

a.kv.kv--link .v {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

a.kv.kv--link .rail-arrow {
  font-family: var(--font-mono);
  color: var(--accent);
  margin-left: 2px;
  transition: transform 200ms ease;
  display: inline-block;
}

a.kv.kv--link:hover .v {
  color: var(--accent);
}

a.kv.kv--link:hover .rail-arrow {
  transform: translate(2px, -2px);
}

.project__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(135deg,
      transparent 0,
      transparent 14px,
      color-mix(in oklch, var(--hairline) 60%, transparent) 14px,
      color-mix(in oklch, var(--hairline) 60%, transparent) 15px);
  opacity: 0.6;
}

/* When a real screenshot is provided, hide the stripe placeholder
   and let the image fill the frame. */
.project__visual:has(img)::before { display: none; }
.project__visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

.project__visual-label {
  position: relative;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg-deep);
  padding: 6px 12px;
  border: 1px solid var(--hairline-2);
}

.project__body {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg-soft);
}

.project__body > * {
  grid-column: 1 / -1;
}

.project__body p {
  grid-column: 1 / 9;
  margin: 0 0 1em 0;
  max-width: 68ch;
}

.project__body .lede {
  grid-column: 1 / 9;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.35;
  color: var(--fg);
  margin: 0 0 32px 0;
}

.project__body h4 {
  grid-column: 1 / 4;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--muted);
  margin: 8px 0 0 0;
  align-self: start;
  position: sticky;
}

.project__body .body-block {
  display: contents;
}

.project__body .body-text {
  grid-column: 4 / 10;
}

.project__body .body-text p { grid-column: auto; }

.project__body .body-text p:last-child { margin-bottom: 0; }

/* learnings list */
.learnings {
  grid-column: 4 / 10;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.learnings li {
  font-size: 16px;
  color: var(--fg-soft);
  padding-left: 28px;
  position: relative;
  line-height: 1.5;
}

.learnings li::before {
  content: "+";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 14px;
}

.learnings li .lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 2px;
}

/* divider between body rows */
.row-rule {
  grid-column: 1 / -1;
  height: 1px;
  background: var(--hairline);
  margin: 32px 0;
}

/* =========================================================
   /now placeholder
   ========================================================= */

.now {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
}

.now__meta {
  display: grid;
  gap: 14px;
  align-content: start;
}

.now__meta .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.now__meta .v {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-soft);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.now__main {
  display: grid;
  gap: 32px;
}

.now__lede {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--fg);
  max-width: 880px;
  text-wrap: balance;
}

.now__lede em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--fg-soft);
}

.now__scene {
  position: relative;
  aspect-ratio: 21 / 9;
  background: var(--bg-deep);
  border: 1px solid var(--hairline);
  overflow: hidden;
  display: grid;
  place-items: center;
}

/* axis lines, like a 3D viewport waiting */
.now__scene::before,
.now__scene::after {
  content: "";
  position: absolute;
  background: var(--hairline);
}
.now__scene::before {
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--hairline) 20%, var(--hairline) 80%, transparent);
}
.now__scene::after {
  top: 0; bottom: 0; left: 50%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--hairline) 20%, var(--hairline) 80%, transparent);
}

.now__scene-inner {
  position: relative;
  text-align: center;
  display: grid;
  gap: 16px;
  z-index: 1;
}

.now__scene-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.now__scene-badge::before, .now__scene-badge::after {
  content: "";
  width: 14px; height: 1px;
  background: var(--muted-2);
}

.now__scene-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(22px, 2.6vw, 32px);
  color: var(--fg-soft);
  margin: 0;
  line-height: 1.2;
  max-width: 520px;
}

.now__scene-eta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* corner brackets, "render frame" feel */
.bracket {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid var(--muted-2);
  z-index: 2;
}
.bracket.tl { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.bracket.tr { top: 12px; right: 12px; border-left: 0; border-bottom: 0; }
.bracket.bl { bottom: 12px; left: 12px; border-right: 0; border-top: 0; }
.bracket.br { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }

.now__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}

.now__item {
  display: grid;
  gap: 6px;
}

.now__item .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.now__item .v {
  font-size: 15px;
  color: var(--fg-soft);
  line-height: 1.45;
}

/* =========================================================
   Contact
   ========================================================= */

.contact {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 80px;
}

/* Push the network's left edge past the rail label so the rail reads as a
   label, not another node. */
#contact .bg-wire--network {
  left: 220px;
  right: 40px;
}

.contact__main {
  display: grid;
  gap: 64px;
}

.contact__pitch {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(28px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0;
  max-width: 16ch;
  text-wrap: balance;
}

.contact__pitch em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--fg-soft);
  font-weight: 400;
}

.contact__pitch a.email {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline-2);
  padding-bottom: 0.05em;
  transition: border-color 200ms ease, color 200ms ease;
}
.contact__pitch a.email:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.contact__links {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 0;
  border-top: 1px solid var(--hairline);
  align-items: stretch;
}

.contact__link {
  display: grid;
  grid-template-rows: auto auto;
  gap: 8px;
  padding: 24px 0;
  align-content: start;
  position: relative;
  border-bottom: 1px solid transparent;
  transition: color 200ms ease;
}

.contact__link + .contact__link {
  border-left: 1px solid var(--hairline);
  padding-left: 24px;
}

.contact__link .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-right: 28px;
}

.contact__link .v {
  font-size: 18px;
  color: var(--fg);
  line-height: 1.3;
  word-break: break-word;
  padding-right: 28px;
}

.contact__link .arrow {
  position: absolute;
  top: 24px;
  right: 4px;
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  transition: transform 200ms ease, color 200ms ease;
}

.contact__link:hover { color: var(--accent); }
.contact__link:hover .v { color: var(--accent); }
.contact__link:hover .arrow {
  transform: translate(2px, -2px);
  color: var(--accent);
}

/* About — placeholder field styling */
.about-side dd.is-placeholder {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px dashed var(--hairline-2);
  padding: 8px 10px;
  display: inline-block;
  font-style: italic;
  background: color-mix(in oklch, var(--bg-elev) 70%, transparent);
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 40px 0 56px;
}

.site-footer__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.site-footer .col { display: grid; gap: 4px; }
.site-footer .col strong { color: var(--fg-soft); font-weight: 400; }

/* =========================================================
   Section transitions — soft accent-tinted gradient bands
   replace the hard hairlines between blocks
   ========================================================= */
.section-fade {
  position: relative;
  height: 260px;
  margin: -80px 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse 60% 100% at 50% 50%,
      color-mix(in oklch, var(--accent) 6%, transparent) 0%,
      transparent 70%);
}
.section-fade::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(900px, 70%);
  height: 1px;
  background: linear-gradient(to right,
    transparent,
    color-mix(in oklch, var(--accent) 22%, transparent) 40%,
    color-mix(in oklch, var(--accent) 22%, transparent) 60%,
    transparent);
}

/* =========================================================
   Scroll reveal — fade + lift + slight de-blur, staggered
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition:
    opacity 1100ms cubic-bezier(.2,.7,.2,1),
    transform 1100ms cubic-bezier(.2,.7,.2,1),
    filter 1100ms cubic-bezier(.2,.7,.2,1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(4px);
  transition:
    opacity 900ms cubic-bezier(.2,.7,.2,1),
    transform 900ms cubic-bezier(.2,.7,.2,1),
    filter 900ms cubic-bezier(.2,.7,.2,1);
  transition-delay: calc(var(--idx, 0) * 90ms);
}
.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {
  .nav { gap: 18px; }
  .nav a span.label { display: none; }
  .status { display: none; }

  .section-head,
  .about-grid,
  .project,
  .now,
  .contact {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .about-side {
    border-left: 0;
    border-top: 1px solid var(--hairline);
    padding-left: 0;
    padding-top: 24px;
  }

  .project__body {
    grid-template-columns: 1fr;
  }
  .project__body p,
  .project__body .lede,
  .project__body .body-text,
  .learnings,
  .project__body h4 {
    grid-column: 1 / -1;
  }

  .contact__links { grid-template-columns: 1fr; }
  .contact__link + .contact__link {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--hairline);
  }

  .now__list { grid-template-columns: 1fr; }
  .hero__top { flex-direction: column; gap: 12px; }
  .hero__coords { text-align: left; }

  /* Desktop max-widths were sized against the main column. Once the layout
     collapses to a single column, drop them so text fills the gutter width. */
  .section-head__title,
  .about-body,
  .now__lede { max-width: none; }
}
