/* Hallmark · macrostructure: Portfolio Grid · tone: playful-editorial · anchor hue: graphite on cream
 * redesign of an existing hand-built site · nav: N5 floating pill · footer: Ft5 statement
 * pre-emit critique: P4 H4 E4 S5 R4 V4
 */
/* ============================================================
   Karunya Muddana — Portfolio
   B&W pencil · crumpled paper · sketchy hand-drawn energy
   ============================================================ */

/* ---- Fonts: self-hosted latin subsets (all SIL OFL) ----
   Three families: Fraunces (display), DM Sans (body), Victor Mono
   (code). Victor's italic is cursive, so it is also the handwriting:
   code sits upright, notes and asides are written in its italic. */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 500 800; font-display: swap; src: url(fonts/fraunces.woff2) format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/dm-sans.woff2) format('woff2'); }
@font-face { font-family: 'Victor Mono'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/victor-mono.woff2) format('woff2'); }
@font-face { font-family: 'Victor Mono'; font-style: italic; font-weight: 400 600; font-display: swap; src: url(fonts/victor-mono-italic.woff2) format('woff2'); }

:root {
  /* Palette — pure pencil */
  --paper:        #EEE9DD;       /* warm cream paper */
  --paper-shade:  #E3DDCC;       /* slight shade */
  --paper-light:  #F6F2E7;
  --ink:          #1A1916;       /* graphite */
  --ink-strong:   #0E0D0C;
  --pencil:       #3D3A34;
  --pencil-soft:  #6E6B62;
  --pencil-light: #A8A398;
  --line:         #BCB6A6;
  --line-soft:    rgba(26,25,22,0.16);
  --shadow-warm:  rgba(60,50,30,0.18);
  --status:       #5F7547;       /* muted moss for "available" */
  --tape-yellow:  rgba(232,210,140,0.62);

  --font-display: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'Victor Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-hand:    'Victor Mono', ui-monospace, monospace;  /* always set italic: see .hand rule */

  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);

  --max-w:       1280px;
  --pad-x:       40px;
  --section-gap: 96px;
}
@media (max-width: 900px) {
  :root { --pad-x: 20px; --section-gap: 80px; }
}

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

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Accessible keyboard focus */
:focus { outline: none; }
:focus-visible {
  outline: 2px dashed var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}
.btn:focus-visible,
.nav-email:focus-visible,
.suggest-btn:focus-visible,
.send-btn:focus-visible {
  outline-offset: 4px;
}

/* Minimal scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(26,25,22,0.18); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(26,25,22,0.32); background-clip: content-box; border: 2px solid transparent; }

/* Smooth scroll-margin so anchored sections don't get hidden under the fixed nav */
section[id], a[id] { scroll-margin-top: 90px; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--paper); }

/* ====================================================
   CRUMPLED PAPER (stacked layers)
   ==================================================== */
.paper-base { /* warm patches of light from across the page */
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(700px 500px at 12% 8%, rgba(255,245,220,0.55), transparent 60%),
    radial-gradient(800px 600px at 92% 6%, rgba(190,170,130,0.16), transparent 60%),
    radial-gradient(900px 700px at 50% 100%, rgba(120,100,70,0.10), transparent 60%);
}
.paper-creases { /* simulated soft crumple highlights/shadows */
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(2px 70px at 22% 28%, rgba(255,255,255,0.5), transparent 70%),
    radial-gradient(2px 90px at 78% 42%, rgba(0,0,0,0.05), transparent 70%),
    radial-gradient(2px 60px at 38% 70%, rgba(255,255,255,0.45), transparent 70%),
    radial-gradient(2px 80px at 64% 22%, rgba(0,0,0,0.05), transparent 70%),
    radial-gradient(2px 50px at 15% 84%, rgba(255,255,255,0.4), transparent 70%),
    radial-gradient(2px 90px at 85% 88%, rgba(0,0,0,0.06), transparent 70%);
  mix-blend-mode: overlay;
  opacity: 0.7;
}
.paper-folds { /* faint diagonal fold lines */
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background-image:
    linear-gradient(122deg, transparent 49.85%, rgba(0,0,0,0.06) 49.95%, transparent 50.1%),
    linear-gradient(64deg,  transparent 49.85%, rgba(0,0,0,0.05) 49.95%, transparent 50.1%),
    linear-gradient(105deg, transparent 79.85%, rgba(0,0,0,0.04) 79.95%, transparent 80.1%);
  background-size: 100% 100%;
  background-position: -10% 0, 18% 0, 6% 0;
  opacity: 0.85;
  mix-blend-mode: multiply;
}
.paper-fibers { /* long fiber noise */
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  opacity: 0.55;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='420' height='420'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='0.013 0.42' numOctaves='3' stitchTiles='stitch' seed='12'/><feColorMatrix values='0 0 0 0 0.21  0 0 0 0 0.19  0 0 0 0 0.15  0 0 0 0.16 0'/></filter><rect width='100%' height='100%' filter='url(%23f)'/></svg>");
}
.paper-grain { /* fine grain on top */
  position: fixed;
  inset: -8px;
  pointer-events: none;
  z-index: 5;
  opacity: 0.95;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='540' height='540'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch' seed='5'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.paper-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  background: radial-gradient(ellipse at center, transparent 38%, rgba(70,55,30,0.13) 100%);
}

/* ====================================================
   ROUGH overlays (drawn by rough.js)
   ==================================================== */
[data-rough] {
  position: relative;
  isolation: isolate;
}
[data-rough] > .rough-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: visible;
}
.rough-stroke {
  /* fallback stroke style if used inline */
  stroke: var(--ink);
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Standalone rough underline anchored to a word */
.rough-underline {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.rough-underline > svg {
  position: absolute;
  left: -3%;
  right: -3%;
  width: 106%;
  bottom: -0.34em;
  height: 0.32em;
  overflow: visible;
  pointer-events: none;
}
.rough-underline > svg path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  animation: drawLine 1300ms cubic-bezier(.55,.05,.25,1) 700ms forwards;
}
.rough-underline > svg path.thin {
  stroke-width: 1.8;
  opacity: 0.55;
  animation-delay: 1000ms;
}
@keyframes drawLine { to { stroke-dashoffset: 0; } }

/* ====================================================
   NAVIGATION
   ==================================================== */
.nav {
  position: fixed;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 28px);
  max-width: 1320px;
  padding: 8px 10px 8px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 9999px;
  background: rgba(246, 242, 231, 0.55);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1.5px solid var(--ink);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 8px 24px -14px rgba(30,25,15,0.30);
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--ink);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-style: normal;
}
.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
  position: relative;
  padding: 4px 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%; bottom: -2px;
  height: 1.4px;
  background: var(--ink);
  transition: right 220ms ease;
}
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }
.nav-email {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 9999px;
  border: none;
  background: var(--ink);
  color: var(--paper);
  transition: opacity 180ms;
}
.nav-email:hover { opacity: 0.85; }

.hamburger { display: none; width: 24px; height: 18px; position: relative; cursor: pointer; border: none; background: none; }
.hamburger span {
  position: absolute; left: 0; right: 0;
  height: 1.5px; background: var(--ink);
  transition: transform 240ms ease, opacity 240ms ease;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 8px; }
.hamburger span:nth-child(3) { top: 16px; }
body.menu-open .hamburger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.menu-open .hamburger span:nth-child(2) { opacity: 0; }
body.menu-open .hamburger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.mobile-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 260ms ease-out;
}
body.menu-open .mobile-overlay { opacity: 1; pointer-events: auto; }
.mobile-overlay a {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  font-size: 38px;
  color: var(--ink);
}
@media (max-width: 768px) {
  .nav-links, .nav-email { display: none; }
  .hamburger { display: block; }
}

/* ====================================================
   LAYOUT primitives
   ==================================================== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  position: relative;
  z-index: 10;
}
section { position: relative; }
.section-pad {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pencil-soft);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .bar {
  display: inline-block;
  width: 22px; height: 1.2px;
  background: currentColor;
}
.caveat {
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.01em;
  color: var(--ink);
  line-height: 1;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.section-title, .hero-title, .about-quote-hero { overflow-wrap: anywhere; min-width: 0; }
.section-title em {
  font-style: normal;
  padding-bottom: 0.08em;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'><path d='M2 5.5C30 2.5 62 6.5 90 3.8S114 4 118 3' fill='none' stroke='%231A1916' stroke-width='2.2' stroke-linecap='round'/></svg>") left bottom / 100% 0.16em no-repeat;
}

/* Reveal */
/* ====================================================
   BUTTONS (sketched look)
   ==================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  border-radius: 9999px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--ink);
  transition: transform 80ms ease, color 200ms ease, background 200ms ease;
  position: relative;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--ink-strong); }
.btn-sketched {
  background: rgba(255,255,255,0.25);
}
.btn-sketched:hover {
  background: rgba(26,25,22,0.06);
}

/* ====================================================
   HERO
   ==================================================== */
.hero {
  min-height: 100vh;
  padding: 100px var(--pad-x) 60px;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

/* Top status row */
.hero-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  color: var(--ink);
  padding: 9px 18px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.4);
  backdrop-filter: blur(10px);
}
.status-pill .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--status);
  box-shadow: 0 0 0 3px rgba(95,117,71,0.20);
}
.hero-aside {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-aside .caveat { font-size: 22px; transform: translateY(-2px); color: var(--ink); }
.hero-location {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--pencil-soft);
  text-transform: uppercase;
}

/* Main hero grid */
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  min-height: 540px;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; min-height: auto; }
}

.hero-text { position: relative; z-index: 3; }
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pencil-soft);
  margin-bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 26px; height: 1.5px;
  background: currentColor;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(52px, 8.4vw, 116px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--ink);
  /* The last line carries .rough-underline, whose SVG hangs ~0.66em below
     the text box. Clear it, or the stroke lands on .hero-sub. */
  margin-bottom: clamp(40px, 5vw, 64px);
  text-wrap: balance;
}
.hero-title .ln {
  display: block;
  opacity: 0;
  transform: translateY(40px);
  animation: lineUp 900ms cubic-bezier(.16,.84,.4,1) forwards;
}
.hero-title .ln:nth-child(1) { animation-delay: 80ms; }
.hero-title .ln:nth-child(2) { animation-delay: 220ms; }
.hero-title .ln:nth-child(3) { animation-delay: 360ms; }
@keyframes lineUp { to { opacity: 1; transform: translateY(0); } }
.hero-title em { font-style: normal; font-weight: 700; }

.hero-sub {
  font-size: 17px;
  line-height: 1.65;
  color: var(--pencil);
  max-width: 460px;
  margin-bottom: 26px;
  opacity: 0;
  animation: fadeIn 800ms ease 900ms forwards;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeIn 800ms ease 1050ms forwards;
}
@keyframes fadeIn { to { opacity: 1; } }

/* Hero photo column */
.hero-photo-col {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 480px;
  perspective: 1400px;
}

/* Hand-drawn annotation badge */
.annotation {
  position: absolute;
  z-index: 5;
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.annotation.tag-1 { top: 4%; left: 2%; transform: rotate(-6deg); }
.annotation.tag-2 { bottom: 0%; right: -9%; transform: rotate(5deg); }
.annotation .arrow {
  width: 64px; height: 36px;
  flex: none;
}

/* Polaroid */
.polaroid {
  position: relative;
  width: min(360px, 92%);
  padding: 14px 14px 56px;
  background: var(--paper-light);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  transform: rotate(-2deg);
  box-shadow:
    0 30px 56px -28px rgba(30,25,15,0.45),
    0 6px 16px -8px rgba(30,25,15,0.22);
  transition: transform 360ms cubic-bezier(.2,.7,.2,1);
  z-index: 3;
  will-change: transform;
}
.polaroid::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 4px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.45;
  pointer-events: none;
}
.polaroid .polaroid-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #B8B2A4;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18) inset;
  z-index: 1;
  isolation: isolate;
}
.polaroid .polaroid-inner img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 18%;
  /* B&W pencil effect */
  filter: grayscale(100%) contrast(1.18) brightness(0.98);
  mix-blend-mode: multiply;
}
/* graphite tone overlay on photo */
.polaroid .polaroid-inner::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.0) 0%, rgba(26,25,22,0.12) 100%);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.polaroid .polaroid-caption {
  position: absolute;
  left: 0; right: 0;
  bottom: 14px;
  text-align: center;
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-weight: 700;
  font-size: 26px;
  color: var(--ink);
  letter-spacing: 0.02em;
  z-index: 2;
}
.polaroid .tape {
  position: absolute;
  width: 86px; height: 26px;
  background: linear-gradient(180deg, rgba(232,210,140,0.78), rgba(220,200,130,0.55));
  border: 1px solid rgba(120,95,40,0.18);
  z-index: 4;
  mix-blend-mode: multiply;
}
.polaroid .tape::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='30'><filter id='n'><feTurbulence baseFrequency='0.7' numOctaves='2'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.22 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.4;
}
.polaroid .tape-tl { top: -12px; left: -18px; transform: rotate(-20deg); }
.polaroid .tape-br { bottom: -10px; right: -16px; transform: rotate(16deg); }

/* Floating pencil-style plane */
.hero-floating-plane {
  position: absolute;
  width: 64px;
  height: auto;
  bottom: 2%;
  left: -2%;
  opacity: 0.85;
  transform: rotate(-18deg);
  pointer-events: none;
  filter: contrast(1.1);
}

/* hero bottom strip */
.hero-bottom-strip {
  margin-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeIn 800ms ease 1200ms forwards;
}
.hero-meta-row {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pencil-soft);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-meta-row .dot-sep {
  width: 4px; height: 4px;
  background: var(--pencil-soft);
  border-radius: 50%;
  opacity: 0.6;
}
@media (max-width: 980px) {
  .hero-photo-col { min-height: 360px; margin-top: 8px; }
  .annotation.tag-1, .annotation.tag-2 { display: none; }
}

/* ====================================================
   ABOUT SNAPSHOT
   ==================================================== */
.about-snap {
  padding: var(--section-gap) 0;
  position: relative;
}
.about-snap .container {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: start;
}
.about-snap .left .eyebrow { margin-bottom: 22px; }
.about-snap .left h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.about-snap .left .hand-note {
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 18px;
  display: inline-block;
  transform: rotate(-3deg);
}

/* Closing peep on about page */
.close-peep-wrap {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 28px;
}
.close-peep {
  width: 220px;
  height: auto;
  filter: grayscale(100%) contrast(1.05);
  mix-blend-mode: multiply;
  display: block;
}
.close-peep-note {
  position: relative;
  margin-bottom: 26px;
  padding-bottom: 8px;
  text-align: left;
}
.close-peep-note .caveat {
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-weight: 600;
  font-size: 26px;
  color: var(--ink);
  line-height: 1.1;
  display: inline-block;
  transform: rotate(-4deg);
}
.close-peep-arrow {
  position: absolute;
  bottom: -28px;
  left: -28px;
  width: 80px;
  height: 50px;
  color: var(--ink);
  transform: rotate(8deg);
}
@media (max-width: 700px) {
  .close-peep-wrap { flex-direction: column; align-items: center; gap: 4px; }
  .close-peep { width: 180px; }
  .close-peep-note { margin-bottom: 0; text-align: center; }
  .close-peep-arrow { display: none; }
}
.about-snap .right p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  margin-bottom: 18px;
  max-width: 600px;
}
.about-snap .right p:last-of-type { color: var(--pencil); }
.about-snap .read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  margin-top: 12px;
  padding-bottom: 3px;
  border-bottom: 1.4px solid var(--ink);
  transition: padding-bottom 220ms ease, border-bottom-color 220ms ease;
}
.about-snap .read-more:hover { padding-bottom: 7px; border-bottom-color: var(--pencil-soft); }
@media (max-width: 900px) {
  .about-snap .container { grid-template-columns: 1fr; gap: 32px; }
}

/* ====================================================
   PROJECTS (paper notes)
   ==================================================== */
.projects-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 20px;
}
.projects-head .eyebrow { margin-bottom: 14px; }

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(210px, auto);
  gap: 22px;
}
.card {
  background: var(--paper-light);
  border-radius: 4px;
  padding: 28px;
  position: relative;
  transition: translate 220ms var(--ease-out);
  overflow: visible;
  display: flex;
  flex-direction: column;
  z-index: 1;
}
.card::before {
  /* paper inner grain */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='1.2' numOctaves='1'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.16 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
}
.card > * { position: relative; z-index: 1; }
.card:nth-child(odd)  { transform: rotate(-0.4deg); }
.card:nth-child(even) { transform: rotate(0.5deg); }
/* Hover lifts on `translate`, so the card keeps its pinned-paper tilt */
@media (hover: hover) { .card:hover { translate: 0 -3px; } }
.card .cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--pencil-soft);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
  color: var(--ink);
  line-height: 1.12;
}
.card.small h3 { font-size: 18px; }
.card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--pencil);
  margin-bottom: 18px;
}
.card .pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.card .pill {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 11px;
  border-radius: 9999px;
  color: var(--ink);
  background: rgba(0,0,0,0.04);
}
.card .impact {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin: 10px 0 16px;
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
}
.card .impact strong { font-weight: 700; font-size: 24px; }
.card .impact .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
  letter-spacing: -0.02em;
  margin-right: 4px;
}
.card .links {
  position: absolute;
  right: 22px; bottom: 22px;
  display: flex;
  gap: 8px;
}
.card .links a {
  width: 34px; height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 14px;
  background: var(--paper);
}
/* sketched tape on featured cards */
.card.featured > .card-tape {
  position: absolute;
  top: -12px; left: 22px;
  width: 70px; height: 22px;
  background: var(--tape-yellow);
  transform: rotate(-3deg);
  z-index: 2;
  mix-blend-mode: multiply;
}
.card.featured > .card-tape::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='30'><filter id='n'><feTurbulence baseFrequency='0.7' numOctaves='2'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.22 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.45;
}

.card.span-3 { grid-column: span 3; }
.card.span-2 { grid-column: span 2; }
.card.span-4 { grid-column: span 4; }
.card.span-6 { grid-column: span 6; }

/* Inline identifiers inside project copy */
.card code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: rgba(26,25,22,0.06);
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
}
.card.row-2  { grid-row: span 2; }
.card.tall   { min-height: 380px; }
@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .card.span-3, .card.span-2, .card.span-4, .card.span-6 { grid-column: span 2; }
  .card.row-2 { grid-row: auto; }
}

/* ---- full-width hero project card (Native) ---- */
.card.hero-project { padding: 34px 32px 30px; }
.card.hero-project:hover,
.card.hero-project:nth-child(even):hover { transform: translateY(-5px) rotate(-0.3deg); }
.hero-project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 34px;
  align-items: start;
}
.hero-project-copy { display: flex; flex-direction: column; min-width: 0; }
.hero-project-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 4px;
}
.hero-project-title .cat { margin-bottom: 6px; }
.card.hero-project h3 {
  font-size: 40px;
  letter-spacing: -0.03em;
  margin-bottom: 0;
}
.hero-project-mark {
  width: 74px;
  height: 74px;
  margin: -12px -6px -12px -14px;
  flex: none;
  transform: rotate(-2deg);
}
.card.hero-project p { margin-bottom: 12px; }
.card.hero-project .hero-project-note {
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 16px;
}
.chain-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
}
.chain-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 3px;
  color: var(--pencil);
  background: rgba(0,0,0,0.045);
}
.chain-link.chain-local {
  color: var(--ink);
  font-weight: 600;
  background: var(--tape-yellow);
  mix-blend-mode: multiply;
}
.chain-arrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--pencil-soft);
}
.card.hero-project .impact { margin: 14px 0 16px; }
.hero-project-shot {
  position: relative;
  margin: 0;
  padding: 10px 10px 0;
  background: var(--paper);
  transform: rotate(0.6deg);
}
.hero-project-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
}
.hero-project-shot figcaption {
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--pencil-soft);
  padding: 10px 4px 12px;
}
@media (max-width: 900px) {
  .hero-project-grid { grid-template-columns: 1fr; gap: 26px; }
  .card.hero-project { padding: 28px 24px 26px; }
  .card.hero-project h3 { font-size: 30px; }
  .hero-project-mark { width: 58px; height: 58px; margin: -10px -4px -10px -12px; }
  .hero-project-shot { transform: none; }
}

/* ====================================================
   SKILLS
   ==================================================== */
.skills-wrap {
  background: var(--paper-shade);
  padding: var(--section-gap) 0;
  position: relative;
  z-index: 10;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
}
.skills-wrap::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.14 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.5;
  pointer-events: none;
}
.skills-wrap > .container { position: relative; z-index: 2; }
.skills-wrap .section-title { text-align: center; margin-bottom: 8px; }
.skills-wrap .eyebrow { display: flex; justify-content: center; margin-bottom: 14px; }
.skills-wrap .section-sub {
  text-align: center;
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 8px;
  margin-bottom: 56px;
  transform: rotate(-1deg);
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  max-width: 1040px;
  margin: 0 auto;
}
@media (max-width: 900px) { .skills-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; } }
.skill-group h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1.4px solid var(--ink);
}
.pills-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pills-cluster .pill {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 7px 14px;
  color: var(--ink);
  border-radius: 9999px;
  background: transparent;
  opacity: 0;
  transform: translateY(6px);
  transition: background 180ms, color 180ms,
              transform 360ms ease-out, opacity 360ms ease-out;
}
.pills-cluster .pill.in { opacity: 1; transform: translateY(0); }
.pills-cluster .pill:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ====================================================
   WRITING
   ==================================================== */
.writing-head { margin-bottom: 40px; }
.writing-head .eyebrow { margin-bottom: 14px; }
.writing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 900px) { .writing-grid { grid-template-columns: 1fr; } }
.post-card {
  background: var(--paper-light);
  border-radius: 4px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: translate 220ms var(--ease-out);
  position: relative;
  z-index: 1;
}
.post-card:nth-child(odd) { transform: rotate(0.4deg); }
.post-card:nth-child(even) { transform: rotate(-0.5deg); }
@media (hover: hover) { .post-card:hover { translate: 0 -3px; } }
.post-card .cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--pencil-soft);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.post-card h3 {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.post-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--pencil);
  margin-bottom: 20px;
  flex: 1;
}
.post-card .read {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding-bottom: 2px;
  border-bottom: 1.4px solid var(--ink);
  transition: padding-bottom 200ms ease, border-bottom-color 200ms ease;
}
.post-card .read:hover { padding-bottom: 6px; border-bottom-color: var(--pencil-soft); }

/* ====================================================
   CONTACT
   ==================================================== */
.contact {
  background: var(--ink);
  color: var(--paper);
  padding: var(--section-gap) 0;
  position: relative;
  overflow: hidden;
  z-index: 10;
}
.contact::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><filter id='n'><feTurbulence 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.05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: screen;
  opacity: 0.7;
  pointer-events: none;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 72px;
  align-items: start;
  position: relative; z-index: 2;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
.contact h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  color: var(--paper);
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.contact h2 em { font-style: normal; }
.contact h2 .underline-on-dark { position: relative; display: inline-block; }
.contact h2 .underline-on-dark::after {
  content: '';
  position: absolute;
  left: -2%; right: -2%;
  bottom: 0.04em;
  height: 5px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 12' preserveAspectRatio='none'><path d='M 4 7 C 60 2, 120 11, 180 5 S 280 9, 296 6' stroke='%23EEE9DD' stroke-width='3.6' fill='none' stroke-linecap='round'/></svg>");
  background-size: 100% 100%;
}
.contact .lede {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(238,233,221,0.65);
  margin-bottom: 36px;
  max-width: 420px;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-links a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: opacity 180ms;
  width: fit-content;
}
.contact-links a::before {
  content: '↗';
  font-family: var(--font-body);
  color: rgba(238,233,221,0.5);
  transition: transform 180ms;
}
.contact-links a:hover { opacity: 0.85; }
.contact-links a:hover::before { transform: translate(2px, -2px); }
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.contact-form label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(238,233,221,0.55);
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1.4px solid rgba(238,233,221,0.25);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 10px 0;
  outline: none;
  transition: border-color 200ms ease;
  resize: none;
}
.contact-form input:focus,
.contact-form textarea:focus { border-bottom-color: var(--paper); }
.contact-form textarea { min-height: 100px; }
.contact-form button {
  margin-top: 8px;
  padding: 12px 22px;
  background: var(--paper);
  color: var(--ink);
  border: none;
  border-radius: 9999px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: transform 80ms, opacity 180ms;
  align-self: flex-start;
}
.contact-form button:hover { opacity: 0.9; }
.contact-form button:active { transform: scale(0.97); }
.contact-form button:disabled { opacity: 0.5; cursor: wait; }
.contact-form .form-status {
  margin-top: 6px;
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-size: 20px;
  line-height: 1.3;
  min-height: 24px;
}
.contact-form .form-status.success { color: #b8e0b5; }
.contact-form .form-status.mailto  { color: rgba(238,233,221,0.85); }
.contact-form .form-status.error   { color: #e8b59a; }
.contact-form .form-status.pending { color: rgba(238,233,221,0.55); font-style: italic; }

/* Footer */
.footer {
  background: var(--ink);
  color: rgba(238,233,221,0.45);
  padding: 28px var(--pad-x);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-top: 1px solid rgba(238,233,221,0.08);
  text-align: center;
  position: relative; z-index: 10;
}

/* ====================================================
   ABOUT PAGE
   ==================================================== */
.about-nav {
  position: fixed;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 1100px;
  z-index: 100;
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(246, 242, 231, 0.65);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1.5px solid var(--ink);
  border-radius: 9999px;
}
.about-nav .back {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 200ms;
}
.about-nav .back:hover { gap: 12px; }
.about-nav .who {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--pencil-soft);
  text-transform: uppercase;
}
.about-page {
  padding: 140px var(--pad-x) 80px;
  position: relative;
}

/* Plane track */
.plane-track {
  position: fixed;
  right: clamp(28px, 5vw, 80px);
  top: 0;
  width: 70px;
  height: 100vh;
  z-index: 30;
  pointer-events: none;
}
.plane-track svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
}
.plane-track #plane-path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.4;
  stroke-dasharray: 4 7;
  stroke-linecap: round;
  opacity: 0.55;
}
.plane-track .plane-img {
  position: absolute;
  width: 56px; height: 56px;
  top: 0; left: 0;
  will-change: transform;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.10));
}
.plane-track .plane-img img {
  width: 100%; height: 100%;
  transform: rotate(90deg);
}
@media (max-width: 820px) {
  .plane-track { right: 8px; width: 50px; }
  .plane-track .plane-img { width: 40px; height: 40px; }
}
.about-progress {
  position: fixed;
  right: 14px;
  top: 80px;
  bottom: 60px;
  width: 1px;
  background: var(--line);
  z-index: 20;
}
.about-progress::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: var(--progress, 0%);
  background: var(--ink);
  transition: height 80ms linear;
}
@media (max-width: 820px) { .about-progress { display: none; } }

.about-col {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  z-index: 12;
}
.about-intro { padding: 30px 0 60px; }
.about-intro .eyebrow { margin-bottom: 28px; }
.about-quote-hero {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
  margin-bottom: 32px;
}
.about-intro p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 20px;
}
.about-intro p:last-child { color: var(--pencil); }

.about-section {
  padding: 56px 0;
  position: relative;
}
.about-section .section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--pencil-soft);
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.about-section .section-label .num {
  font-family: var(--font-display);
  font-style: normal;
  font-size: 18px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.about-section p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 20px;
}
.about-section p em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  color: var(--ink);
}
.about-section .underline-soft {
  border-bottom: 1.4px solid var(--ink);
  padding-bottom: 1px;
}
.about-beat {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.4;
  color: var(--ink);
  text-align: center;
  margin: 36px 0;
}
.diamond-break {
  text-align: center;
  color: var(--pencil-soft);
  font-size: 10px;
  margin: 56px 0;
  letter-spacing: 0.6em;
  opacity: 0.7;
}
.about-close {
  padding: 60px 0 100px;
  text-align: center;
}
.about-close p {
  max-width: 540px;
  margin: 0 auto 18px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--pencil);
}
.about-close .about-quote-hero { text-align: center; }
.about-close .ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* ====================================================
   STATS STRIP — "By the numbers"
   ==================================================== */.stats-strip {
  padding: 72px 0;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  background: rgba(0,0,0,0.02);
  position: relative;
  z-index: 10;
}
.stats-strip .label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}
.stats-strip .label-row h3 {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 30px);
  color: var(--ink);
  letter-spacing: -0.015em;
}
.stats-strip .label-row .caveat {
  font-size: 22px;
  transform: rotate(-2deg);
  color: var(--pencil);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
  align-items: end;
}
.stat-card {
  position: relative;
  padding: 12px 8px 6px;
}
.stat-card + .stat-card { border-left: 1.4px dashed var(--line); padding-left: 24px; }
/* break dashed border at row start */
.stat-card:nth-child(4n+1) { border-left: none; padding-left: 8px; }
.stat-card .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(38px, 4.6vw, 68px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.stat-card .num small {
  font-size: 0.34em;
  font-weight: 700;
  vertical-align: super;
  letter-spacing: 0;
}
.stat-card .label {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pencil-soft);
}
.stat-card .desc {
  margin-top: 3px;
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-size: 19px;
  color: var(--ink);
  line-height: 1.1;
}
.stat-card.stat-tail {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}
.stat-card.stat-tail .tail-caveat {
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-weight: 600;
  font-size: 32px;
  color: var(--ink);
  line-height: 1;
  transform: rotate(-3deg);
  padding-bottom: 8px;
}
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
  .stat-card + .stat-card { border-left: none; padding-left: 8px; }
  .stat-card:nth-child(2n+1) { border-left: none; padding-left: 8px; }
  .stat-card:nth-child(n+3) { border-top: 1.4px dashed var(--line); padding-top: 18px; }
}

/* ====================================================
   SKILLS — clean inline categories (no rough)
   ==================================================== */
.skills-wrap-v2 {
  background: var(--paper-shade);
  padding: var(--section-gap) 0;
  position: relative;
  z-index: 10;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
}
.skills-wrap-v2::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.14 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.5;
  pointer-events: none;
}
.skills-wrap-v2 > .container { position: relative; z-index: 2; }
.skills-head { text-align: center; margin-bottom: 64px; }
.skills-head .eyebrow { justify-content: center; display: inline-flex; margin-bottom: 24px; }
.skills-head .section-title { display: block; margin-bottom: 18px; }
.skills-head .sub {
  margin-top: 6px;
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-size: 24px;
  color: var(--ink);
  transform: rotate(-1deg);
  display: inline-block;
}
.skills-cats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 56px;
  max-width: 1080px;
  margin: 0 auto;
}
@media (max-width: 900px) { .skills-cats { grid-template-columns: 1fr; gap: 28px; } }
.skill-cat { position: relative; }
.skill-cat h4 {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 6px;
  display: inline-block;
}
.skill-cat .cat-rule {
  display: block;
  height: 1.5px;
  background: var(--ink);
  margin-bottom: 14px;
}
.skill-cat .list {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.skill-cat .list .sep {
  color: var(--pencil-light);
  margin: 0 6px;
}

/* ====================================================
   RESUME PAGE
   ==================================================== */
.resume-page {
  padding: 120px var(--pad-x) 100px;
  position: relative;
}
.resume-stack {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
  z-index: 10;
}
.resume-card {
  background: var(--paper-light);
  border-radius: 4px;
  padding: 36px 42px;
  position: relative;
  box-shadow:
    0 18px 38px -22px rgba(30,25,15,0.32),
    0 4px 10px -6px rgba(30,25,15,0.16);
  transition: transform 280ms cubic-bezier(.2,.7,.2,1), box-shadow 280ms ease;
}
.resume-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 4px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='1' numOctaves='1'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.15 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.5;
  pointer-events: none;
}
.resume-card > * { position: relative; z-index: 1; }
.resume-card:nth-child(odd)  { transform: rotate(-0.4deg); }
.resume-card:nth-child(even) { transform: rotate(0.5deg); }
.resume-card .corner-tape {
  position: absolute;
  width: 86px; height: 22px;
  top: -10px; left: 32px;
  background: var(--tape-yellow);
  transform: rotate(-3deg);
  z-index: 4;
  mix-blend-mode: multiply;
}
.resume-card .corner-tape.right { left: auto; right: 32px; top: -10px; transform: rotate(2deg); }
.resume-card .corner-tape::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='30'><filter id='n'><feTurbulence baseFrequency='0.7' numOctaves='2'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.22 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.45;
}

.resume-header {
  text-align: center;
  padding: 48px 42px 44px;
}
.resume-header h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}
.resume-header h1 em { font-style: normal; }
.resume-header .role {
  margin-top: 12px;
  font-family: var(--font-display);
  font-style: normal;
  font-size: 20px;
  color: var(--pencil);
}

/* Positioning line under the name. Reads before anything else on the page,
   so it carries the claim the rest of the resume has to back up. */
.resume-summary {
  max-width: 62ch;
  margin: 14px auto 0;
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--pencil);
}
.resume-summary strong { color: var(--ink); font-weight: 600; }

/* Inline identifiers inside resume bullets */
.resume-item code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(26,25,22,0.055);
  border-radius: 3px;
  padding: 1px 5px;
}
@media (max-width: 900px) {
  .resume-summary { font-size: 13.5px; margin-top: 12px; }
}
@media print {
  .resume-summary { font-size: 10.5pt; margin-top: 8pt; color: #000; }
  .resume-item code { background: none; padding: 0; }
}
.resume-header .contact {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.resume-header .contact a { border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.resume-header .contact a:hover { border-color: var(--ink); }
.resume-header .resume-meta-row {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.resume-header .resume-meta-row a { border-bottom: 1px solid var(--line); padding-bottom: 1px; transition: border-color 180ms; }
.resume-header .resume-meta-row a:hover { border-color: var(--ink); }
.resume-header .download {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 9999px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  border: none;
  transition: opacity 180ms;
}
.resume-header .download:hover { opacity: 0.9; }

.resume-section h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 4px;
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
}
.resume-section h2 em { font-style: normal; font-weight: 500; color: var(--pencil-soft); }
.resume-section .head-rule {
  display: block;
  height: 1.4px;
  background: var(--ink);
  margin-bottom: 24px;
}
.resume-item { margin-bottom: 20px; }
.resume-item:last-child { margin-bottom: 0; }
.resume-item .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.resume-item h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.resume-item .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--pencil-soft);
  letter-spacing: 0.04em;
}
.resume-item .sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--pencil);
  margin-top: 2px;
  letter-spacing: 0.02em;
}
.resume-item ul {
  margin-top: 8px;
  padding-left: 20px;
  list-style: none;
}
.resume-item ul li {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 6px;
  position: relative;
}
.resume-item ul li::before {
  content: '▸';
  position: absolute;
  left: -16px;
  top: 1px;
  color: var(--pencil-soft);
  font-size: 11px;
}
.resume-item .tech {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--pencil);
  letter-spacing: 0.02em;
}

.resume-skills .skills-cats { gap: 22px 40px; }
.resume-skills .skill-cat h4 { font-size: 19px; }
.resume-skills .skill-cat .list { font-size: 12.5px; line-height: 1.7; }

@media print {
  @page { margin: 0.5in; }
  body { background: white !important; color: black !important; font-size: 10.5pt; }
  .nav, .about-nav, .scroll-progress,
  .paper-base, .paper-creases, .paper-folds, .paper-fibers, .paper-grain, .paper-vignette,
  .doodle, .download { display: none !important; }

  .resume-page { padding: 0 !important; }
  .resume-stack { gap: 10pt !important; max-width: 100% !important; }
  .resume-card {
    box-shadow: none !important;
    transform: none !important;
    background: white !important;
    padding: 10pt 0 !important;
    border-radius: 0 !important;
    border-bottom: 0.5pt solid #555;
    page-break-inside: avoid;
  }
  .resume-card:last-child { border-bottom: none; }
  .resume-card::before { display: none !important; }
  .resume-card .corner-tape { display: none !important; }

  .resume-header { padding: 0 0 12pt !important; text-align: left !important; border-bottom: 1pt solid black !important; }
  .resume-header h1 { font-size: 26pt !important; line-height: 1 !important; color: black !important; }
  .resume-header .role { font-size: 11pt !important; margin-top: 4pt !important; color: #333 !important; }
  .resume-header .resume-meta-row {
    justify-content: flex-start !important;
    margin-top: 8pt !important;
    font-size: 9pt !important;
    gap: 4pt 10pt !important;
  }
  .resume-header .resume-meta-row a {
    color: black !important;
    border-bottom: none !important;
  }

  .resume-section h2 {
    font-size: 13pt !important;
    margin-bottom: 2pt !important;
    display: block !important;
  }
  .resume-section h2 em { display: none; }
  .resume-section .head-rule { margin-bottom: 8pt !important; background: black !important; }
  .resume-item { margin-bottom: 10pt !important; page-break-inside: avoid; }
  .resume-item h3 { font-size: 11pt !important; color: black !important; }
  .resume-item .meta { font-size: 9pt !important; color: #444 !important; }
  .resume-item .sub { font-size: 9.5pt !important; color: #333 !important; margin-top: 1pt !important; }
  .resume-item ul { margin-top: 4pt !important; padding-left: 14pt !important; }
  .resume-item ul li { font-size: 9.5pt !important; line-height: 1.45 !important; margin-bottom: 3pt !important; color: black !important; }
  .resume-item ul li::before { color: black !important; left: -10pt !important; }
  .resume-item .tech { font-size: 9pt !important; color: #444 !important; margin-top: 4pt !important; font-style: italic; }

  .skills-cats { gap: 8pt 28pt !important; grid-template-columns: repeat(2, 1fr) !important; }
  .skill-cat h4 { font-size: 10.5pt !important; color: black !important; margin-bottom: 2pt !important; }
  .skill-cat .cat-rule { background: black !important; margin-bottom: 4pt !important; }
  .skill-cat .list { font-size: 9pt !important; line-height: 1.55 !important; color: black !important; }
  .skill-cat .list .sep { color: #888 !important; }
}

/* ====================================================
   DOODLE decorations (from dddoodle pack)
   ==================================================== */
.doodle {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 7;
  opacity: 0.7;
  color: var(--ink);
}
.doodle img { width: 100%; height: auto; display: block; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-title .ln { opacity: 1; transform: none; }
  .hero-sub, .hero-ctas, .hero-bottom-strip { opacity: 1; }
}

/* ====================================================
   COMPREHENSIVE RESPONSIVE OPTIMIZATION
   ==================================================== */

/* Tablet (769–1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .nav { padding: 8px 8px 8px 18px; gap: 12px; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 13px; }
  .nav-email { font-size: 11px; padding: 7px 12px; }
  .hero-grid { gap: 28px; }
  .polaroid { width: min(320px, 80%); }
  .annotation.tag-1 { left: -2%; font-size: 18px; }
  .annotation.tag-2 { right: -2%; font-size: 18px; }
  .stats-grid { gap: 24px 18px; }
  .stat-card + .stat-card { padding-left: 18px; }
}

/* Mobile breakpoint (≤900px) — major adjustments */
@media (max-width: 900px) {
  :root { --pad-x: 18px; }

  /* Nav — tighter glass pill */
  .nav { top: 10px; padding: 7px 12px; gap: 8px; }
  .logo { font-size: 17px; }

  /* Hero */
  .hero { padding-top: 86px; padding-bottom: 40px; min-height: auto; }
  .hero-top-row { margin-bottom: 14px; gap: 10px; }
  .status-pill { font-size: 12px; padding: 7px 14px; }
  .hero-aside .caveat { font-size: 18px; }
  .hero-location { font-size: 10px; letter-spacing: 0.14em; }
  .hero-eyebrow { font-size: 11px; margin-bottom: 16px; }
  .hero-eyebrow::before { width: 18px; }
  .hero-title { font-size: clamp(48px, 12.5vw, 92px); line-height: 0.94; margin-bottom: 18px; }
  .hero-sub { font-size: 15px; margin-bottom: 22px; max-width: 100%; }
  .hero-grid { gap: 24px; min-height: auto; }
  .hero-photo-col { min-height: 300px; perspective: none; }
  .polaroid { width: min(260px, 78%); padding: 10px 10px 42px; }
  .polaroid .polaroid-caption { font-size: 20px; bottom: 10px; }
  .polaroid .tape { width: 70px; height: 22px; }
  .hero-floating-plane { display: none; }
  .hero-bottom-strip { margin-top: 18px; }
  .hero-meta-row { font-size: 10px; letter-spacing: 0.12em; gap: 8px; }
  .scroll-cue { font-size: 10px; letter-spacing: 0.18em; }
  .scroll-cue .line { width: 40px; }

  /* Marquee strip */

  /* About snap */
  .about-snap { padding: 64px 0; }
  .about-snap .right p { font-size: 15.5px; }

  /* Stats */
  .stats-strip { padding: 48px 0; }
  .stats-strip .label-row { margin-bottom: 22px; }
  .stats-strip .label-row h3 { font-size: 22px; }
  .stat-card .num { font-size: 40px; }
  .stat-card .num small { font-size: 0.36em; }
  .stat-card .label { font-size: 10px; margin-top: 6px; }
  .stat-card .desc { font-size: 16px; }
  .stat-card.stat-tail .tail-caveat { font-size: 26px; padding-bottom: 4px; }

  /* Projects */
  .section-pad { padding-top: 72px; padding-bottom: 72px; }
  .projects-head { margin-bottom: 28px; }
  .bento { gap: 16px; grid-auto-rows: auto; }
  .card { padding: 22px; }
  .card.tall { min-height: 280px; }
  .card h3 { font-size: 20px; }
  .card.small h3 { font-size: 17px; }
  .card p { font-size: 13.5px; }
  .card .impact { font-size: 18px; margin: 6px 0 12px; }
  .card .impact .num { font-size: 28px; }
  .card .links { right: 16px; bottom: 16px; opacity: 1; transform: none; }
  .card .links a { width: 30px; height: 30px; font-size: 12px; }
  .card.featured > .card-tape { display: none; }

  /* Skills */
  .skills-wrap-v2 { padding: 64px 0; }
  .skills-head { margin-bottom: 40px; }
  .skills-head .eyebrow { margin-bottom: 16px; }
  .skills-head .section-title { margin-bottom: 10px; }
  .skills-head .sub { font-size: 20px; }
  .skills-cats { gap: 28px; }
  .skill-cat h4 { font-size: 19px; }
  .skill-cat .list { font-size: 12.5px; line-height: 1.75; }

  /* Writing */
  .post-card { padding: 22px; }
  .post-card h3 { font-size: 17px; }
  .post-card p { font-size: 13.5px; }

  /* Contact */
  .contact { padding: 64px 0; }
  .contact h2 { font-size: clamp(36px, 11vw, 60px); margin-bottom: 16px; }
  .contact .lede { font-size: 15px; margin-bottom: 26px; }
  .contact-links a { font-size: 12.5px; }
  .contact-form input, .contact-form textarea { font-size: 14.5px; }

  /* Footer */
  .footer { padding: 22px 18px; font-size: 10px; letter-spacing: 0.14em; }

  /* About page */
  .about-nav { padding: 8px 14px; top: 10px; }
  .about-nav .back { font-size: 13px; }
  .about-page { padding: 100px 18px 60px; }
  .about-quote-hero { font-size: clamp(24px, 7vw, 36px); }
  .about-intro p, .about-section p { font-size: 15.5px; line-height: 1.75; }
  .about-section { padding: 36px 0; }
  .about-beat { font-size: 19px; }
  .diamond-break { margin: 36px 0; }

  /* Plane track on mobile */
  .plane-track { right: 4px; width: 40px; }
  .plane-track .plane-img { width: 34px; height: 34px; }

  /* Doodles — hide most on mobile (too cramped) */
  .doodle { display: none; }

  /* Resume page */
  .resume-page { padding: 100px 16px 60px; }
  .resume-stack { gap: 18px; }
  .resume-card { padding: 24px 22px; transform: none !important; }
  .resume-card:nth-child(odd), .resume-card:nth-child(even) { transform: none !important; }
  .resume-card:hover, .resume-card:nth-child(even):hover { transform: translateY(-2px) !important; }
  .resume-header { padding: 32px 22px 26px; }
  .resume-header h1 { font-size: 36px; }
  .resume-header .role { font-size: 14px; margin-top: 8px; }
  .resume-header .resume-meta-row { font-size: 11px; gap: 4px 12px; margin-top: 14px; justify-content: flex-start; }
  .resume-header .download { font-size: 12px; padding: 9px 16px; margin-top: 18px; }
  .resume-card .corner-tape { display: none; }
  .resume-section h2 { font-size: 22px; }
  .resume-section .head-rule { margin-bottom: 18px; }
  .resume-item { margin-bottom: 16px; }
  .resume-item .row { flex-direction: column; align-items: flex-start; gap: 2px; }
  .resume-item h3 { font-size: 17px; }
  .resume-item .meta { font-size: 11px; }
  .resume-item ul li { font-size: 13.5px; }
  .resume-item .tech { font-size: 11px; }
  .resume-skills .skill-cat h4 { font-size: 17px; }
  .resume-skills .skill-cat .list { font-size: 12px; }

  /* Close peep on about */
  .close-peep { width: 160px; }
  .close-peep-wrap { margin-bottom: 16px; }

  /* Mobile overlay */
  .mobile-overlay a { font-size: 34px; }
}

/* Phone (≤540px) — tighter still */
@media (max-width: 540px) {
  :root { --pad-x: 16px; --section-gap: 64px; }

  /* Paper textures — reduce GPU load on phones */
  .paper-creases, .paper-folds { opacity: 0.4; }

  .nav { width: calc(100% - 16px); top: 8px; padding: 6px 10px; }
  .logo { font-size: 15px; }
  .hamburger { width: 22px; height: 16px; }
  .hamburger span:nth-child(2) { top: 7px; }
  .hamburger span:nth-child(3) { top: 14px; }

  .hero { padding-top: 72px; padding-bottom: 32px; }
  .hero-eyebrow { font-size: 10px; letter-spacing: 0.14em; }
  .hero-title { font-size: clamp(42px, 13.5vw, 72px); }
  .hero-photo-col { min-height: 260px; }
  .polaroid { width: min(240px, 78%); }
  .polaroid .polaroid-caption { font-size: 18px; }
  .hero-bottom-strip { gap: 12px; }


  .stats-strip { padding: 40px 0; }
  .stats-strip .label-row { flex-direction: column; align-items: flex-start; }
  .stat-card .num { font-size: 36px; }
  .stat-card .desc { font-size: 15px; }

  .section-title { font-size: clamp(28px, 9vw, 44px); }

  .bento { grid-template-columns: 1fr; }
  .card.span-3, .card.span-2, .card.span-4, .card.span-6 { grid-column: span 1; }
  .card { padding: 20px; transform: none !important; }
  .card:hover { transform: translateY(-3px) !important; box-shadow: none !important; }

  .skills-wrap-v2 { padding: 56px 0; }
  .skill-cat .list { font-size: 12px; line-height: 1.7; word-break: break-word; }

  .contact { padding: 56px 0; }
  .contact h2 { font-size: clamp(32px, 12vw, 52px); }
  .contact-form button { width: 100%; text-align: center; justify-content: center; }

  .about-page { padding: 90px 16px 56px; }
  .about-quote-hero { font-size: clamp(22px, 7vw, 32px); }
  .about-section .section-label .num { font-size: 16px; }

  .resume-card { padding: 20px 16px; }
  .resume-header { padding: 26px 18px 22px; }
  .resume-header h1 { font-size: 30px; }
  .resume-header .role { font-size: 13px; }
  .resume-section h2 { font-size: 19px; }
  .resume-item h3 { font-size: 16px; }
}

/* Touch device — disable hover lift/rotate that feels off without a pointer */
@media (hover: none) {
  .card:hover, .card:nth-child(even):hover { transform: rotate(0deg); box-shadow: none; background: var(--paper-light); }
  .card:nth-child(odd) { transform: rotate(-0.3deg); }
  .card:nth-child(even) { transform: rotate(0.4deg); }
  .post-card:hover { transform: rotate(0deg); box-shadow: none; }
  .post-card:nth-child(odd) { transform: rotate(0.3deg); }
  .post-card:nth-child(even) { transform: rotate(-0.4deg); }
  .resume-card:hover, .resume-card:nth-child(even):hover { transform: rotate(0deg) !important; }
  .resume-card:nth-child(odd) { transform: rotate(-0.3deg) !important; }
  .resume-card:nth-child(even) { transform: rotate(0.4deg) !important; }
}

/* Large screens (>1400px) — give content breathing room */
@media (min-width: 1400px) {
  :root { --max-w: 1280px; --pad-x: 56px; }
  .hero-title { font-size: clamp(56px, 8.4vw, 124px); }
}

/* ====================================================
   MOTION LAYER
   Everything below is additive polish. Each block ends
   up neutralised by the reduced-motion guard at the
   bottom of this file, so the page still reads as a
   static document when motion is unwelcome.
   ==================================================== */

/* ---- Lenis inertial scroll ---- */
html.lenis-on { scroll-behavior: auto; }
html.lenis-on, html.lenis-on body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }



/* ---- Nav: condense, then get out of the way ---- */
.nav {
  transition:
    transform 520ms cubic-bezier(.2,.75,.25,1),
    opacity 360ms ease,
    padding 320ms ease,
    background 320ms ease,
    box-shadow 320ms ease;
}
.nav.nav-condensed {
  background: rgba(246, 242, 231, 0.78);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 14px 34px -18px rgba(30,25,15,0.42);
}
.nav.nav-away {
  transform: translateX(-50%) translateY(calc(-100% - 22px));
  opacity: 0;
  pointer-events: none;
}

/* ---- Reading progress hairline ---- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  z-index: 200;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: 0 50%;
  opacity: 0.55;
  pointer-events: none;
}


/* Project links: a colour shift, nothing else */
.card .links a { transition: background-color 160ms var(--ease-out); }
.card .links a:hover { background: var(--tape-yellow); }

/* ---- Reduced motion: hand everything back ---- */
@media (prefers-reduced-motion: reduce) {
  .nav.nav-away { transform: translateX(-50%); opacity: 1; pointer-events: auto; }
  .scroll-progress { display: none; }
}

/* ====================================================
   MASCOT (mascot.js) — paper-sticker cloud
   ==================================================== */
.kmascot, .km-ghost {
  position: fixed;
  top: 0; left: 0;
  z-index: 95;
  pointer-events: none;
  will-change: transform;
}
.kmascot { opacity: 0; transition: opacity 160ms ease; }
.kmascot.is-in { opacity: 1; }
.kmascot.km-blink-move { opacity: 0; }
.kmascot svg {
  display: block;
  overflow: visible;
  filter: drop-shadow(0 2px 1.2px rgba(40,28,14,0.30)) drop-shadow(0 7px 9px rgba(40,28,14,0.14));
}
.kmascot .km-sticker, .kmascot .km-sticker-edge {
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  stroke-linejoin: round;
}
.kmascot.is-held .km-sticker { cursor: grabbing; }
.kmascot .km-sticker-edge { fill: rgba(60,45,25,0.16); stroke: rgba(60,45,25,0.16); stroke-width: 15.5; }
.kmascot .km-sticker { fill: #F7F0E1; stroke: #F7F0E1; stroke-width: 13; }
.kmascot .km-fill { fill: #A9C7EC; transition: fill 220ms ease; }
.kmascot.is-red .km-fill { fill: #E0594D; }
.kmascot .km-line { fill: #2B3140; stroke: #2B3140; stroke-width: 5.4; stroke-linejoin: round; }
.kmascot .km-white { fill: #FFFDF8; stroke: #2B3140; stroke-width: 1.6; }
.kmascot .km-pupil { fill: #1F2430; }
.kmascot .km-shine { fill: #fff; transition: opacity 80ms; }
.kmascot .km-cheeks { fill: #F08C84; }
.kmascot .km-mouth { opacity: 0; transition: opacity 120ms ease; }
.kmascot .km-smile { fill: none; stroke: #2B3140; stroke-width: 2.3; stroke-linecap: round; }
.kmascot .km-o { fill: #2B3140; }
.kmascot[data-expr="excited"] .km-smile,
.kmascot[data-expr="shy"] .km-smile { opacity: 1; }
.kmascot[data-expr="surprised"] .km-o { opacity: 1; }
.kmascot[data-expr="angry"] .km-cheeks { opacity: 0 !important; }
.km-puff {
  position: fixed;
  z-index: 94;
  width: 9px; height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: #F7F0E1;
  box-shadow: 0 0 0 1.4px rgba(51,36,26,0.55);
  pointer-events: none;
  animation: kmPuff 520ms cubic-bezier(.2,.8,.3,1) forwards;
}
@keyframes kmPuff {
  from { transform: translate(0, 0) scale(0.4); opacity: 1; }
  to   { transform: translate(var(--dx), -10px) scale(1.25); opacity: 0; }
}
.kmascot .km-angry path { fill: #FFFDF8; stroke: #2B3140; stroke-width: 1.8; stroke-linejoin: round; }
.kmascot .km-angry { opacity: 0; transition: opacity 90ms; }
.kmascot .km-eyes { transition: opacity 90ms; }
.kmascot[data-expr="angry"] .km-angry { opacity: 1; }
.kmascot[data-expr="angry"] .km-eyes { opacity: 0; }
.kmascot .km-mark {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.4);
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 140ms ease, transform 260ms cubic-bezier(.3,1.6,.5,1);
}
.kmascot[data-mark="excite"] .km-excite,
.kmascot[data-mark="alarm"]  .km-alarm,
.kmascot[data-mark="shy"]    .km-shy,
.kmascot[data-mark="zz"]     .km-zz,
.kmascot[data-mark="anger"]  .km-anger,
.kmascot[data-mark="motion"] .km-motion { opacity: 1; transform: scale(1); }
.kmascot[data-mark="zz"] .km-zz { animation: kmZz 2.4s ease-in-out infinite; }
@keyframes kmZz {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-2px, -4px); }
}
.km-ghost { opacity: 0; transition: opacity 200ms ease; }
.km-ghost.on { opacity: 1; }
.km-ghost svg { display: block; overflow: visible; }
.km-ghost g { fill: #1A1916; opacity: 0.12; }
@media (prefers-reduced-motion: reduce) {
  .kmascot[data-mark="zz"] .km-zz { animation: none; }
  .kmascot .km-mark { transition: opacity 140ms ease; }
}
@media print { .kmascot, .km-ghost { display: none; } }

/* ---- Mascot: more faces ---- */
.kmascot[data-expr="joy"] .km-smile,
.kmascot[data-expr="wink"] .km-smile,
.kmascot[data-expr="love"] .km-smile,
.kmascot[data-expr="laugh"] .km-grin,
.kmascot[data-expr="sad"] .km-frown,
.kmascot[data-expr="think"] .km-flat,
.kmascot[data-expr="smug"] .km-smirk,
.kmascot[data-expr="dizzy"] .km-wavy { opacity: 1; }
.kmascot .km-grin { fill: #2B3140; stroke: #2B3140; stroke-width: 1.4; stroke-linejoin: round; }
.kmascot .km-frown, .kmascot .km-flat, .kmascot .km-smirk, .kmascot .km-wavy {
  fill: none; stroke: #2B3140; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round;
}

/* Eyes that swap shape: arcs, chevrons, hearts, spirals */
.kmascot .km-alt { opacity: 0; transition: opacity 90ms; }
.kmascot .km-joy path, .kmascot .km-laugh path {
  fill: none; stroke: #2B3140; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round;
}
.kmascot .km-love path { fill: #E0594D; stroke: #2B3140; stroke-width: 1.8; stroke-linejoin: round; }
.kmascot .km-dizzy path { fill: none; stroke: #2B3140; stroke-width: 2.2; stroke-linecap: round; }
.kmascot .km-spin { transform-box: fill-box; transform-origin: center; animation: kmSpin 900ms linear infinite; }
.kmascot[data-expr="joy"] .km-eyes, .kmascot[data-expr="laugh"] .km-eyes,
.kmascot[data-expr="love"] .km-eyes, .kmascot[data-expr="dizzy"] .km-eyes { opacity: 0; }
.kmascot[data-expr="joy"] .km-joy, .kmascot[data-expr="laugh"] .km-laugh,
.kmascot[data-expr="love"] .km-love, .kmascot[data-expr="dizzy"] .km-dizzy { opacity: 1; }
.kmascot[data-expr="love"] .km-love path { animation: kmBeat 700ms ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.kmascot[data-expr="laugh"] .km-squash { animation: kmGiggle 240ms ease-in-out infinite alternate; }
@keyframes kmSpin { to { transform: rotate(360deg); } }
@keyframes kmBeat { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.18); } }
@keyframes kmGiggle { from { translate: 0 0; } to { translate: 0 -1.5px; } }

/* More marks above the head */
.kmascot[data-mark="question"] .km-question,
.kmascot[data-mark="dots"]     .km-dots,
.kmascot[data-mark="note"]     .km-note,
.kmascot[data-mark="sweat"]    .km-sweat,
.kmascot[data-mark="bulb"]     .km-bulb { opacity: 1; transform: scale(1); }
.kmascot .km-dot { animation: kmDot 1.1s ease-in-out infinite; transform-box: fill-box; }
.kmascot .km-note-a { animation: kmFloat 1.6s ease-in-out infinite; }
.kmascot .km-note-b { animation: kmFloat 1.6s ease-in-out -0.8s infinite; }
.kmascot[data-mark="sweat"] .km-sweat path { animation: kmDrip 1.8s ease-in infinite; }
@keyframes kmDot { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-3px); } }
@keyframes kmFloat { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(2px, -5px) rotate(8deg); } }
@keyframes kmDrip { 0%, 30% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(10px); opacity: 0; } }

/* ---- Mascot: props ---- */
.kmascot .km-prop {
  opacity: 0;
  transform: translateY(8px) scale(0.6);
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transition: opacity 160ms ease, transform 340ms cubic-bezier(.3,1.7,.5,1);
  pointer-events: none;
}
.kmascot .km-glasses rect { fill: rgba(255,255,255,0.16); stroke: #2B3140; stroke-width: 2.6; }
.kmascot .km-cap, .kmascot .km-party { transform: translateY(-14px) scale(0.6); }
.kmascot[data-prop~="glasses"]    .km-glasses,
.kmascot[data-prop~="cap"]        .km-cap,
.kmascot[data-prop~="party"]      .km-party,
.kmascot[data-prop~="magnifier"]  .km-magnifier,
.kmascot[data-prop~="headphones"] .km-headphones,
.kmascot[data-prop~="chai"]       .km-chai,
.kmascot[data-prop~="book"]       .km-book,
.kmascot[data-prop~="camera"]     .km-camera,
.kmascot[data-prop~="bat"]        .km-bat { opacity: 1; transform: none; }
/* Each prop gets a little business */
.kmascot[data-prop~="chai"] .km-chai { animation: kmSip 3.2s ease-in-out 400ms infinite; transform-origin: 80% 90%; }
.kmascot[data-prop~="bat"] .km-bat { animation: kmSwing 2.4s cubic-bezier(.5,0,.3,1) 500ms infinite; transform-origin: 20% 90%; }
.kmascot[data-prop~="headphones"] .km-headphones { animation: kmBob 520ms ease-in-out infinite alternate; }
.kmascot[data-prop~="magnifier"] .km-magnifier { animation: kmPeer 3s ease-in-out infinite; }
.kmascot[data-prop~="camera"] .km-camera { animation: kmSnap 3.4s ease-in-out 600ms infinite; }
@keyframes kmSip   { 0%, 55%, 100% { transform: none; } 70%, 85% { transform: translate(10px, -14px) rotate(24deg); } }
@keyframes kmSwing { 0%, 50%, 100% { transform: none; } 62% { transform: rotate(-70deg); } 74% { transform: rotate(18deg); } }
@keyframes kmBob   { from { transform: translateY(0); } to { transform: translateY(-1.5px); } }
@keyframes kmPeer  { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-3px, 2px); } }
@keyframes kmSnap  { 0%, 88%, 100% { transform: none; filter: none; } 90% { transform: scale(1.06); filter: brightness(1.6); } }
@media (prefers-reduced-motion: reduce) {
  .kmascot .km-prop, .kmascot .km-spin, .kmascot .km-dot, .kmascot .km-note-a, .kmascot .km-note-b,
  .kmascot .km-love path, .kmascot .km-squash, .kmascot .km-sweat path { animation: none !important; }
}

/* ====================================================
   REAL PAPER PIECES — scanned tape replaces the CSS tape
   ==================================================== */
.polaroid .tape,
.card.featured > .card-tape,
.resume-card .corner-tape,
.stack-grid .stack-tape {
  background: url("assets/paper/tape-short-1.webp") center / 100% 100% no-repeat;
  border: 0;
  box-shadow: none;
  mix-blend-mode: multiply;
}
.polaroid .tape { width: 96px; height: 27px; }
.polaroid .tape-br { background-image: url("assets/paper/tape-short-2.webp"); }
.card.featured > .card-tape { width: 84px; height: 23px; background-image: url("assets/paper/tape-short-3.webp"); }
.resume-card .corner-tape { width: 92px; height: 25px; background-image: url("assets/paper/tape-short-4.webp"); }
.resume-card .corner-tape.right { background-image: url("assets/paper/tape-short-2.webp"); }
.stack-grid .stack-tape { width: 78px; height: 22px; opacity: 1; }
.stack-grid .stack-card:nth-child(even) .stack-tape { background-image: url("assets/paper/tape-short-4.webp"); }
.polaroid .tape::after,
.card.featured > .card-tape::after,
.resume-card .corner-tape::after { display: none; }

/* ====================================================
   HERO ADDITIONS — cut paper, pencil guides, hand note
   ==================================================== */
.hero { position: relative; }

/* Cut-paper stack that sits right after "ship." Sized in em so it
   scales with the headline. */
.hero-cuts {
  position: relative;
  display: inline-block;
  width: 1.3em;
  height: 0.9em;
  margin-left: 0.22em;
  vertical-align: -0.04em;
}
.hero-cuts .cut {
  position: absolute;
  display: block;
  height: auto;
  filter: drop-shadow(0 1px 1px rgba(40,28,14,0.22)) drop-shadow(0 4px 6px rgba(40,28,14,0.10));
}
.hero-cuts .cut-square { width: 0.62em; left: 0;      bottom: 0;      transform: rotate(-4deg); }
.hero-cuts .cut-circle { width: 0.36em; left: 0.15em; bottom: 0.57em; }
.hero-cuts .cut-rect   { width: 0.8em;  left: 0.48em; bottom: 0.3em;  transform: rotate(-64deg); }
.hero-cuts .cut-tape   { width: 0.5em;  left: -0.1em; bottom: 0.46em; transform: rotate(-24deg); mix-blend-mode: multiply; filter: none; }

/* Pencil construction guides, drawn by motion.js with rough.js */
.hero-guides {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 1200ms ease;
}
.hero-guides.on { opacity: 1; }

/* Hand note with a loopy arrow */
.hero-hand {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  margin: 26px 0 0 6px;
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-weight: 600;
  font-size: 25px;
  line-height: 1;
  color: var(--ink);
  transform: rotate(-2.5deg);
  transform-origin: left center;
  opacity: 0;
  animation: fadeIn 700ms ease 1500ms forwards;
}
.hero-hand-arrow {
  width: 74px;
  height: 48px;
  flex: none;
  margin-bottom: 10px;
  overflow: visible;
}
.hero-hand-arrow path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: drawLine 900ms cubic-bezier(.55,.05,.25,1) 1800ms forwards;
}
.hero-hand-arrow path + path { animation-delay: 2550ms; }

/* Split-text write-in. Until motion.js splits the headline it stays
   hidden (the inline script in <head> gives up after 2.5s, and the
   original line-up animation takes over). */
.split-pending .hero-title .sp,
.split-pending .hero-cuts { visibility: hidden; }
.split-pending .hero-title .ln,
.split-on .hero-title .ln { opacity: 1; transform: none; animation: none; }
.split-on .hero-title .ch { display: inline-block; will-change: transform, opacity; }
.split-on .rough-underline > svg path { animation-delay: 1250ms; }
.split-on .rough-underline > svg path.thin { animation-delay: 1500ms; }

@media (max-width: 900px) {
  .hero-hand { font-size: 21px; margin-top: 20px; }
  .hero-hand-arrow { width: 56px; height: 36px; }
}
@media (max-width: 560px) {
  .hero-guides { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-hand { opacity: 1; animation: none; }
  .hero-hand-arrow path { stroke-dashoffset: 0; animation: none; }
}

/* ====================================================
   STICKY NOTES + EXCELMCP PRINTOUT
   ==================================================== */
.sticky {
  position: absolute;
  z-index: 4;
  width: 152px;
  aspect-ratio: 560 / 364;
  margin: 0;
  padding: 18px 16px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url("assets/paper/sticky-yellow.webp") center / 100% 100% no-repeat;
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-weight: 600;
  font-size: 21px;
  line-height: 1.02;
  color: var(--ink);
  transform: rotate(var(--r, -4deg));
  filter: drop-shadow(0 3px 3px rgba(40,28,14,0.16));
  pointer-events: none;
}
.sticky-pin {
  position: absolute;
  top: 3px; left: 50%;
  width: 17px; height: auto;
  margin-left: -8px;
  filter: drop-shadow(0 2px 1.5px rgba(0,0,0,0.3));
}
.sticky.sm {
  width: 118px;
  padding: 14px 10px 10px;
  font-size: 17px;
  top: -16px; right: -12px;
}

/* Native: note stuck on the screenshot's corner */
.hero-project-shot.has-sticky { position: relative; }
.hero-project-shot .sticky { top: -26px; right: -18px; }

/* ExcelMCP: taped-in printout of a live response */
.excel-card .hero-project-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; }
.printout {
  position: relative;
  margin: 10px 8px 40px;
  justify-self: center;
  width: min(100%, 380px);
  transform: rotate(1.6deg);
  filter: drop-shadow(0 10px 14px rgba(40,28,14,0.14)) drop-shadow(0 2px 2px rgba(40,28,14,0.14));
}
.printout-paper {
  border-style: solid;
  border-width: 20px 14px;
  border-image: url("assets/paper/printout.webp") 70 60 fill / 20px 14px round stretch;
  padding: 6px 10px 4px;
  font-family: var(--font-mono);
  color: #2a2824;
}
.printout-head {
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--pencil-soft);
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px dashed rgba(26,25,22,0.25);
}
.printout pre { margin: 0; overflow-x: auto; }
.printout code { font-size: 12.5px; line-height: 1.62; background: none; padding: 0; }
.printout-foot {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pencil-light);
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(26,25,22,0.25);
}
.printout-tape {
  position: absolute;
  top: -12px; left: 50%;
  width: 104px; height: 29px;
  margin-left: -52px;
  transform: rotate(-3deg);
  z-index: 2;
  mix-blend-mode: multiply;
}
.printout .sticky { left: -34px; bottom: -34px; }
.circled { position: relative; display: inline-block; }
.circled svg {
  position: absolute;
  left: -9px; top: -5px;
  width: calc(100% + 16px); height: calc(100% + 10px);
  overflow: visible;
  pointer-events: none;
}
.circled path {
  fill: none;
  stroke: #C8453A;
  stroke-width: 1.8;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  transition: stroke-dashoffset 900ms cubic-bezier(.55,.05,.25,1) 300ms;
}
.printout.in .circled path { stroke-dashoffset: 0; }

.writing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .excel-card .hero-project-grid { grid-template-columns: 1fr; }
  .printout { margin: 18px auto 44px; }
  .writing-grid { grid-template-columns: 1fr; }
  .sticky { width: 128px; font-size: 18px; }
  .sticky.sm { width: 104px; font-size: 15px; top: -12px; right: -6px; }
  .hero-project-shot .sticky { right: -6px; }
  .printout .sticky { left: -10px; }
}
@media (prefers-reduced-motion: reduce) {
  .circled path { stroke-dashoffset: 0; transition: none; }
}
.sticky .sticky-pin { width: 17px; height: auto; display: block; border-radius: 0; box-shadow: none; transform: none; }
.printout code { white-space: pre; display: block; }

/* ====================================================
   RESUME SHEET (resume-sheet.js)
   ==================================================== */
.rsheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}
.rsheet[hidden] { display: none; }
.rsheet-lock, .rsheet-lock body { overflow: hidden; }
.rsheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40,34,24,0.30);
  backdrop-filter: blur(7px) saturate(0.9);
  -webkit-backdrop-filter: blur(7px) saturate(0.9);
  opacity: 0;
  transition: opacity 320ms ease;
}
.rsheet.open .rsheet-backdrop { opacity: 1; }
.rsheet-paper {
  position: relative;
  width: min(940px, 100%);
  height: min(88vh, 1100px);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  box-shadow: 0 40px 80px -30px rgba(30,25,15,0.55), 0 8px 20px -10px rgba(30,25,15,0.3);
  transform: translateY(70px) rotate(-2.4deg);
  opacity: 0;
  transition: transform 420ms var(--ease-out), opacity 240ms var(--ease-out);
}
.rsheet.open .rsheet-paper { transform: none; opacity: 1; }
.rsheet-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 5px;
  background: var(--paper);
}
.rsheet-tape {
  position: absolute;
  top: -13px;
  width: 108px; height: 30px;
  z-index: 3;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.rsheet-tape-l { left: 38px; transform: rotate(-4deg); }
.rsheet-tape-r { right: 38px; transform: rotate(3deg); }
.rsheet-actions {
  position: absolute;
  top: 16px; right: 18px;
  z-index: 2;
  display: flex;
  gap: 8px;
}
.rsheet-btn {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  font: 500 16px/1 var(--font-body);
  color: var(--ink);
  text-decoration: none;
  background: var(--paper-light);
  border: 1.5px solid var(--ink);
  border-radius: 52% 46% 50% 48% / 48% 52% 46% 50%;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out);
}
.rsheet-btn:hover { background: var(--paper-light); }
.rsheet-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (max-width: 640px) {
  .rsheet { padding: 18px 8px 8px; }
  .rsheet-paper { height: 92vh; }
  .rsheet-actions { top: 10px; right: 10px; }
  .rsheet-btn { width: 36px; height: 36px; font-size: 14px; }
  .rsheet-tape { width: 84px; height: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .rsheet-paper { transform: none; transition: opacity 200ms ease; }
}

/* resume.html inside the sheet */
.embed .about-nav,
.embed .doodle { display: none !important; }
.embed .resume-page { padding-top: 64px; }

/* ====================================================
   GRASS EDGE (grass.js) — grows up out of the contact section
   ==================================================== */
.grass-edge {
  position: relative;
  height: clamp(240px, 26vw, 380px);
  margin-top: 20px;
  margin-bottom: -34px;          /* roots overlap the dark contact block */
  pointer-events: none;
}
/* Back canvas: above the contact block, behind the mascot (z 95).
   Front canvas: in front of the mascot. */
.grass-back, .grass-front {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.grass-back { z-index: 11; }
.grass-front { z-index: 96; }
.grass-perch {
  position: absolute;
  left: 0; right: 0;
  top: 74%;
  height: 0;
}
.card .card-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 900 / 486;
  object-fit: cover;
  object-position: top;
  margin: 0 0 16px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(26,25,22,0.14), 0 6px 14px -8px rgba(30,25,15,0.35);
  transform: rotate(-0.8deg);
}

/* ====================================================
   MASCOT SPEECH BUBBLE
   ==================================================== */
.km-bubble {
  position: fixed;
  top: 0; left: 0;
  z-index: 97;
  max-width: 236px;
  padding: 8px 14px 10px;
  background: #FFFDF7;
  border: 1.5px solid var(--ink);
  border-radius: 16px 19px 15px 18px / 17px 15px 19px 16px;
  box-shadow: 0 10px 20px -12px rgba(30,25,15,0.45);
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-weight: 600;
  font-size: 19px;
  line-height: 1.12;
  color: var(--ink);
  pointer-events: none;
  opacity: 0;
  scale: 0.6;
  transform-origin: var(--tail, 30px) 100%;
  transition: opacity 150ms ease, scale 300ms cubic-bezier(.3,1.7,.5,1);
}
.km-bubble.on { opacity: 1; scale: 1; }
.km-bubble.below { transform-origin: var(--tail, 30px) 0; }
/* The full line sets the size up front, so the bubble doesn't grow
   (and jump sideways) while the words type in over it. */
.km-bubble-size { visibility: hidden; display: block; }
.km-bubble-typed { position: absolute; inset: 8px 14px 10px; }
.km-bubble::after {
  content: '';
  position: absolute;
  left: calc(var(--tail, 30px) - 7px);
  bottom: -8px;
  width: 13px; height: 13px;
  background: #FFFDF7;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: rotate(45deg) skew(6deg, 6deg);
}
.km-bubble.below::after { bottom: auto; top: -8px; transform: rotate(225deg) skew(6deg, 6deg); }
.game-open .kmascot, .game-open .km-bubble, .game-open .km-ghost { visibility: hidden; }
@media (max-width: 640px) {
  .km-bubble { font-size: 16.5px; max-width: 190px; }
}
@media (prefers-reduced-motion: reduce) {
  .km-bubble { transition: opacity 150ms ease; scale: 1; }
}

/* ====================================================
   FOOTER — sign-off and the loose corner
   ==================================================== */
.footer { position: relative; overflow: hidden; }
.footer p { margin: 0; }
.footer-signoff {
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-weight: 600;
  font-size: 21px;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(238,233,221,0.82);
  margin-bottom: 8px !important;
  padding: 0 44px;
}
.dogear {
  position: absolute;
  right: 0; bottom: 0;
  width: 42px; height: 42px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
/* A folded-back corner: paper showing where the dark page peels. */
.dogear-flap {
  position: absolute;
  right: 0; bottom: 0;
  width: 26px; height: 26px;
  background: linear-gradient(135deg, var(--paper-light) 0 50%, transparent 50%);
  box-shadow: -2px -2px 4px rgba(0,0,0,0.35);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  transform-origin: 100% 100%;
  transition: scale 220ms var(--ease-out);
  animation: dogearNudge 7s ease-in-out 4s 2;
}
.dogear-flap::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 38%, rgba(0,0,0,0.12) 50%, transparent 51%);
}
.dogear:hover .dogear-flap,
.dogear:focus-visible .dogear-flap { scale: 1.54; }
.dogear:focus-visible { outline: 2px dashed var(--paper); outline-offset: -6px; }
@keyframes dogearNudge {
  0%, 88%, 100% { scale: 1; }
  92% { scale: 1.27; }
  96% { scale: 1.04; }
}

/* ====================================================
   CLOUD STACK (game.js)
   ==================================================== */
.cs {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: grid;
  place-items: center;
  padding: 16px;
}
.cs[hidden] { display: none; }
.cs-backdrop {
  position: absolute; inset: 0;
  background: rgba(26,25,22,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 260ms ease;
}
.cs.open .cs-backdrop { opacity: 1; }
.cs-card {
  position: relative;
  width: min(440px, 100%);
  padding: 14px 16px 12px;
  background: var(--paper-light);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.6);
  transform: translateY(40px) rotate(2deg) scale(0.96);
  opacity: 0;
  transition: transform 420ms var(--ease-out), opacity 220ms var(--ease-out);
}
.cs.open .cs-card { transform: none; opacity: 1; }
.cs-tape {
  position: absolute;
  top: -13px; left: 50%;
  width: 104px; height: 29px;
  margin-left: -52px;
  transform: rotate(-3deg);
  mix-blend-mode: multiply;
}
.cs-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.cs-head h2 {
  margin: 0;
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  color: var(--ink);
}
.cs-score {
  margin-left: auto;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--pencil-soft);
}
.cs-score b {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cs-close {
  width: 34px; height: 34px;
  border: 1.5px solid var(--ink);
  border-radius: 52% 46% 50% 48% / 48% 52% 46% 50%;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
}
.cs-close:hover { background: var(--paper-light); }
.cs-canvas {
  display: block;
  margin: 0 auto;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  touch-action: manipulation;
  cursor: pointer;
  max-width: 100%;
}
.cs-canvas:focus { outline: none; }
.cs-canvas:focus-visible { outline: 2px dashed rgba(26,25,22,0.3); outline-offset: 4px; }
.cs-hint {
  margin: 8px 0 0;
  text-align: center;
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-size: 18px;
  color: var(--pencil-soft);
}
@media (prefers-reduced-motion: reduce) {
  .cs-card { transform: none; transition: opacity 200ms ease; }
  .dogear-flap { animation: none; }
}

/* WebGL meadow (grass3d.js) replaces the 2D canvases once it's running */
.grass-3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 11;
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 18%);
}
.grass-edge.is-3d .grass-back,
.grass-edge.is-3d .grass-front { display: none; }

/* Small cards: the same media height whether it's a screenshot or drawn art */
.card .card-thumb { height: 150px; aspect-ratio: auto; }
.card .card-art {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: contain;
  margin: 0 0 16px;
  filter: drop-shadow(0 4px 6px rgba(40,28,14,0.14));
}
.grass-perch { top: 80% !important; }

/* ====================================================
   SMALL DETAILS
   ==================================================== */
/* Selecting text looks like a highlighter pass */
::selection { background: rgba(243,220,142,0.9); color: var(--ink); }
.contact ::selection, .footer ::selection { background: rgba(243,220,142,0.95); color: var(--ink); }

/* A thin pencil scrollbar */
html { scrollbar-width: thin; scrollbar-color: #A8A398 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #B9B3A3;
  border: 3px solid var(--paper);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: #8F8A7D; }

/* No grey flash when tapping on phones */
a, button, [role="button"], .polaroid, .card { -webkit-tap-highlight-color: transparent; }

/* Nav underline draws in as a pencil squiggle instead of a ruled line */
.nav-links a::after {
  height: 6px;
  bottom: -6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='6' viewBox='0 0 18 6'%3E%3Cpath d='M0 3.2Q4.5 0.4 9 3.2T18 3.2' fill='none' stroke='%231A1916' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x 0 50% / 18px 6px;
}

/* Buttons press in */
.btn, .nav-email, .rsheet-btn, .cs-close, .copy-chip, .card .links a {
  transition-property: transform, background, color, opacity, box-shadow;
  transition-duration: 180ms;
}
.btn:active, .nav-email:active, .rsheet-btn:active, .cs-close:active, .copy-chip:active, .card .links a:active {
  transform: scale(0.95);
}

/* Keyboard focus: a dashed pencil ring, never the browser default glow */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px dashed var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}
.contact :where(a, button, input, textarea):focus-visible,
.footer :where(a, button):focus-visible { outline-color: var(--paper); }

/* Form fields: the rule under each field thickens when you're in it */
.contact-form input, .contact-form textarea { transition: border-color 200ms ease, box-shadow 200ms ease; }
.contact-form input:focus, .contact-form textarea:focus { box-shadow: 0 1.5px 0 0 var(--paper); }

/* Copy-email chip */
.email-row { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.copy-chip {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(238,233,221,0.4);
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
}
.copy-chip:hover { background: rgba(238,233,221,0.1); border-color: rgba(238,233,221,0.7); }
.copy-chip.done { background: #A7BB6E; border-color: #A7BB6E; color: var(--ink); }

/* ====================================================
   PERFORMANCE
   ==================================================== */
/* Give each fixed paper layer its own compositor layer, so scrolling
   moves pixels instead of re-blending the textures every frame. */
.paper-base, .paper-creases, .paper-folds, .paper-fibers, .paper-grain, .paper-vignette {
  transform: translateZ(0);
  contain: strict;
}
/* Phones: keep the grain and the warm light, drop the three heaviest
   layers (fibre noise and blended creases/folds). */
@media (max-width: 900px), (pointer: coarse) {
  .paper-creases, .paper-folds, .paper-fibers { display: none; }
}

/* Touch screens only. Laptops and desktops, touchscreen laptops
   included (they report a fine pointer), never match this. */
@media (hover: none) and (pointer: coarse) {
  /* The grain layers are black (or white) noise with alpha, which comes
     out identical under normal blending. Multiply/screen only made the
     compositor re-blend them against the page on every scroll frame. */
  .paper-grain, .card::before, .polaroid::after,
  .skills-wrap::before, .contact::before { mix-blend-mode: normal; }

  /* Keep the frosted nav, with a lighter blur that phones can afford. */
  .nav, .about-nav {
    background: rgba(246, 242, 231, 0.72);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
  }

  /* Animated box-shadow repaints the polaroid every frame, forever. */
  .polaroid { animation: none; will-change: auto; }
  .reveal { will-change: auto; }
  .split-done .hero-title .ch { will-change: auto; }
}

/* ====================================================
   FROSTED GLASS (mouse and trackpad screens)
   Only where something shows through it: the page grain
   and pencil guides behind the hero chips, the contact
   grain behind the form, the card art behind the links.
   ==================================================== */
@media (hover: hover) and (pointer: fine) {
  /* "based in Hyderabad" becomes a glass chip opposite the status pill */
  .hero-aside {
    align-items: center;
    padding: 6px 16px 7px;
    border-radius: 9999px;
    background: linear-gradient(180deg, rgba(255,255,255,0.46), rgba(255,255,255,0.18));
    border: 1px solid rgba(26,25,22,0.10);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.7),
      0 8px 18px -14px rgba(30,25,15,0.45);
    backdrop-filter: blur(10px) saturate(1.25);
    -webkit-backdrop-filter: blur(10px) saturate(1.25);
  }
  .hero-aside .caveat { transform: none; }

  /* Contact form sits on a pane of smoked glass. The white grain on the
     dark section blurs out underneath it, which is what sells the frost. */
  .contact-form {
    padding: 30px 30px 26px;
    border-radius: 20px;
    background:
      linear-gradient(155deg, rgba(238,233,221,0.11) 0%, rgba(238,233,221,0.035) 55%, rgba(238,233,221,0.065) 100%);
    border: 1px solid rgba(238,233,221,0.16);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.14),
      inset 0 -1px 0 rgba(0,0,0,0.25),
      0 30px 60px -34px rgba(0,0,0,0.7);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
  }
  .contact-form input:focus,
  .contact-form textarea:focus { background: rgba(238,233,221,0.035); }
  .copy-chip {
    background: rgba(238,233,221,0.07);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  /* The ↗ links on the project cards: small glass lenses */
  .card .links a {
    border-radius: 50%;
    background: rgba(246,242,231,0.5);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
    backdrop-filter: blur(6px) saturate(1.3);
    -webkit-backdrop-filter: blur(6px) saturate(1.3);
  }
}

/* ====================================================
   MOBILE LAYOUT — grid tracks that can shrink
   ==================================================== */
/* A `1fr` track never shrinks below its widest content, so the
   ExcelMCP printout's <pre> was stretching every project card past
   the right edge of the screen. minmax(0, 1fr) lets them fit. */
@media (max-width: 900px) {
  .bento > *, .hero-project-grid > *, .stats-grid > *,
  .writing-grid > *, .contact-grid > * { min-width: 0; }
  .bento, .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-project-grid,
  .excel-card .hero-project-grid,
  .writing-grid,
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 540px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .printout { margin-left: 4px; margin-right: 4px; }
  .printout code { font-size: 10.5px; }
}

/* Lenis 1.3 recommended styles */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }

/* iPhone home bar */
.footer { padding-bottom: max(28px, calc(env(safe-area-inset-bottom) + 18px)); }

/* ====================================================
   CODE × HAND
   Code is upright Victor Mono; comments, notes and asides
   are its cursive italic, so they read as handwriting.
   code-motion.js (anime.js) animates it.
   ==================================================== */
:root {
  --ink-add:   #4E6B3A;   /* moss: an added line, a merged stamp */
  --ink-fix:   #B4532A;   /* red pencil: a fix */
  --ink-str:   #7A5631;   /* brown pencil: strings */
}
.toolkit-note { font-style: italic; }

/* Comment-style line under a section title */
.code-comment {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--pencil-soft);
  letter-spacing: 0.01em;
}

/* ---- Experience: git log --graph ---- */
.xp-head { margin-bottom: 52px; }
.xp-head .eyebrow { margin-bottom: 14px; }
.xp-log {
  position: relative;
  list-style: none;
  max-width: 860px;
  padding-left: 64px;
}
.xp-branch {
  position: absolute;
  left: 0; top: 0;
  width: 48px; height: 100%;
  overflow: visible;
  pointer-events: none;
}
.xp-branch path { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; }
.xp-commit {
  position: relative;
  padding-bottom: 54px;
}
.xp-commit:last-child { padding-bottom: 0; }
.xp-node {
  position: absolute;
  left: -51px; top: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 0 0 0 5px var(--paper);
}
.xp-commit.is-head .xp-node { background: var(--ink); }
.xp-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.xp-ref {
  padding: 2px 9px 3px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper-light);
  letter-spacing: 0.02em;
}
.xp-ref-alt { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.3px var(--ink); }
.xp-when { font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4; font-weight: 600; font-size: 20px; color: var(--pencil-soft); line-height: 1; }
.xp-commit h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.xp-kind {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--pencil-soft);
  vertical-align: 0.35em;
  margin-left: 6px;
  white-space: nowrap;
}
.xp-org { margin: 4px 0 16px; color: var(--pencil-soft); font-size: 15px; }
.xp-diff { list-style: none; display: grid; gap: 10px; }
.xp-diff li {
  position: relative;
  padding-left: 26px;
  font-size: 15.5px;
  line-height: 1.62;
  color: var(--pencil);
}
.xp-diff li::before {
  content: attr(data-op);
  position: absolute;
  left: 0; top: 0.08em;
  width: 18px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink-add);
}
.xp-diff li[data-op="~"]::before { color: var(--ink-fix); }
.xp-diff li[data-op="•"]::before { color: var(--pencil-soft); }
.xp-diff strong { color: var(--ink); font-weight: 700; }
.xp-diff em { font-style: normal; text-decoration: line-through; text-decoration-color: var(--ink-fix); text-decoration-thickness: 2px; }
.xp-jump {
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
  border-bottom: 1.4px solid currentColor;
  white-space: nowrap;
  margin-left: 4px;
}
.xp-scrawl {
  position: absolute;
  right: -40px; top: 30px;
  max-width: 150px;
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.05;
  color: var(--ink-fix);
  transform: rotate(5deg);
  text-align: center;
}
.xp-root h3 { font-size: clamp(19px, 2.2vw, 22px); }
.xp-root .xp-org { margin-bottom: 0; }

/* ---- Open source: PR cards with rubber stamps ---- */
.oss-head { margin-bottom: 46px; }
.oss-head .eyebrow { margin-bottom: 14px; }
.oss-sub { margin-top: 16px; max-width: 560px; color: var(--pencil); font-size: 16px; line-height: 1.6; }
.oss-hand {
  display: inline-block;
  font-family: var(--font-hand); font-style: italic; font-size-adjust: 0.4;
  font-weight: 600;
  font-size: 23px;
  color: var(--ink-add);
  transform: rotate(-2deg);
  white-space: nowrap;
}
.pr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}
.pr-card {
  position: relative;
  padding: 26px 26px 22px;
  background: var(--paper-light);
  display: flex;
  flex-direction: column;
  transition: translate 220ms var(--ease-out);
}
.pr-card:nth-child(4n+1) { transform: rotate(-0.6deg); }
.pr-card:nth-child(4n+2) { transform: rotate(0.5deg); }
.pr-card:nth-child(4n+3) { transform: rotate(0.3deg); }
.pr-card:nth-child(4n)   { transform: rotate(-0.4deg); }
@media (hover: hover) { .pr-card:hover { translate: 0 -3px; } }
.pr-repo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--pencil-soft);
  margin-bottom: 10px;
}
.pr-card .pr-repo { padding-right: 112px; }
.pr-glyph {
  display: inline-grid;
  place-items: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  font-size: 11px;
  color: var(--paper-light);
  background: var(--ink-add);
}
.is-open .pr-glyph { background: none; color: var(--pencil-soft); box-shadow: inset 0 0 0 1.4px currentColor; }
.pr-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin-bottom: 8px;
}
.pr-card p { font-size: 14.5px; line-height: 1.6; color: var(--pencil); max-width: 34ch; }
.pr-link {
  margin-top: auto;
  padding-top: 18px;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color 200ms;
}
.pr-link:hover { border-bottom-color: var(--ink); }

/* Rubber stamp. The noise mask lets paper show through the ink. */
.stamp {
  position: absolute;
  top: 20px; right: 18px;
  padding: 5px 12px 4px;
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-add);
  border: 3px double currentColor;
  border-radius: 6px;
  transform: rotate(-11deg);
  opacity: 0.88;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='60'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -1.5 1.55'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='60'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -1.5 1.55'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  pointer-events: none;
}
.is-open .stamp { color: var(--pencil-soft); border-style: dashed; border-width: 2px; transform: rotate(7deg); letter-spacing: 0.1em; }

/* ---- engraph: the install line, ruled like a code listing ---- */
.install {
  margin: 4px 0 20px;
  padding: 10px 0 12px;
  border-top: 1.4px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.install-label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-style: italic;
  font-size: 12.5px;
  color: var(--pencil-soft);
}
.install-row { display: flex; align-items: center; gap: 10px; }
.install code {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink);
  background: none;
  padding: 0;
  white-space: nowrap;
}
.install code::before { content: '$ '; color: var(--pencil-soft); }
.install .copy-chip {
  margin-left: auto;
  color: var(--ink);
  border-color: var(--line);
}
.install .copy-chip:hover { background: var(--paper-shade); border-color: var(--ink); }
.install .copy-chip.done { background: var(--status); border-color: var(--status); color: var(--paper-light); }

/* ---- Stack: toolkit printout ---- */
.toolkit {
  position: relative;
  max-width: 720px;
  margin: 64px 0 0;
  transform: rotate(-0.7deg);
  filter: drop-shadow(0 10px 14px rgba(40,28,14,0.14)) drop-shadow(0 2px 2px rgba(40,28,14,0.12));
}
.toolkit .printout-paper { padding: 8px 16px 10px; }
.toolkit .printout-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.toolkit-note { font-family: var(--font-mono); font-size: 12px; color: var(--pencil-soft); }
.toolkit pre { margin: 0; overflow-x: auto; }
.toolkit code {
  display: block;
  white-space: pre;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--pencil);
}
.tk-k { color: var(--ink); }
.tk-s { color: var(--ink-str); }
.tk-v { color: var(--pencil); }
.toolkit .printout-tape { top: -13px; }

/* Stack on wide screens: language cards left, toolkit printout right,
   so the section uses the page width instead of hugging the left edge */
@media (min-width: 1100px) {
  .stack-body {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 64px;
    align-items: center;
  }
  .stack-body .stack-grid { display: grid; grid-template-columns: repeat(3, 152px); gap: 34px 26px; }
  .stack-body .toolkit { margin-top: 0; max-width: none; }
}

/* Sticky notes are <p>s, so `.card p` used to shrink their handwriting */
.card .sticky { font-size: 20px; line-height: 1.02; color: var(--ink); margin: 0; }
.card .sticky.sm { font-size: 17px; }
@media (max-width: 900px) {
  .card .sticky { font-size: 17px; }
  .card .sticky.sm { font-size: 15px; }
}

/* Sticky notes you can peel off and move around (code-motion.js) */
.sticky.is-draggable { pointer-events: auto; cursor: grab; touch-action: none; }
.sticky.is-draggable:active { cursor: grabbing; }


@media (max-width: 900px) {
  .xp-log { padding-left: 48px; }
  .xp-branch { width: 36px; }
  .xp-node { left: -41px; width: 20px; height: 20px; }
  .xp-scrawl { position: static; display: block; margin: 12px 0 0 auto; transform: rotate(-3deg); }
  .pr-grid { grid-template-columns: 1fr; }
  /* Too narrow for the aligned dict: each list drops under its key */
  .toolkit code { font-size: 12px; }
  .tk-list { display: block; white-space: normal; padding-left: 8ch; text-indent: -1ch; }
  .tk-list .tk-v { white-space: nowrap; }
}
@media (max-width: 540px) {
  .xp-diff li { font-size: 15px; }
  .stamp { font-size: 12px; top: 14px; right: 12px; }
  .pr-card h3 { font-size: 23px; }
  .toolkit { margin-top: 48px; }
}

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