/* Header font: Jersey 15 (SIL Open Font License), served from assets/fonts.
   size-adjust matches the old font's cap height; the weight range stops browsers faking a bold. */
@font-face {
  font-family: "Display";
  src: url("fonts/jersey15-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  size-adjust: 114%;
}

/* =====================================================================
   CANVAS FOLIO — shared styles for every page
   ===================================================================== */

/* ============ TOKENS — edit these to re-theme ============ */
:root {
  --paper: #fbf8f2;
  --ink: #1b1512;
  --grid: rgba(27, 21, 18, 0.06);
  --muted: #756b64;
  --indigo: #3fa7e8;   /* sky blue — frames, selection, accents */
  --tomato: #e8434f;   /* red */
  --lime: #f5c542;     /* warm yellow — primary highlight */
  --violet: #9fd4f2;   /* pale sky */
  --sun: #f7dc8a;      /* butter */
  --mint: #93d3a6;     /* sage */
  --brown: #3d2a24;    /* contact panel */
  --ruler: 22px;
  --bar: 56px;
  --max: 1120px;
  --font-display: "Display", "Pixelify Sans", system-ui, sans-serif;
  --font-sans: "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;
  --spring: cubic-bezier(.3, 1.6, .5, 1);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper); color: var(--ink); font-family: var(--font-sans);
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
  font-variant-ligatures: none; /* the pixel font merges "fi" into one odd glyph */
}
body.has-cursor, body.has-cursor * { cursor: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
img, svg { max-width: 100%; }
::selection { background: var(--lime); }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }

.canvas-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px; background-position: -1px -1px;
}
main { padding-left: var(--ruler); }
section { position: relative; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* ============ LOADER (home only) ============ */
.loader { position: fixed; inset: 0; z-index: 1000; background: var(--ink); color: var(--paper); display: grid; place-items: center; transition: clip-path .9s cubic-bezier(.77,0,.18,1); clip-path: inset(0 0 0 0); }
.loader.done { clip-path: inset(0 0 100% 0); }
.loader-inner { text-align: center; }
.loader-count { font-family: var(--font-display); font-weight: 700; font-size: clamp(64px, 14vw, 180px); line-height: 1; }
.loader-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .2em; opacity: .6; margin-top: 12px; }
.loader-bar { width: 220px; height: 4px; background: rgba(255,255,255,.12); margin: 20px auto 0; border-radius: 4px; overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--lime); }

/* page-to-page wipe */
.wipe { position: fixed; inset: 0; z-index: 900; background: var(--lime); pointer-events: none; transform: translateY(100%); display: grid; place-items: center; }
.wipe span { font-family: var(--font-display); font-weight: 700; font-size: clamp(36px, 6vw, 72px); }
.wipe.in { transition: transform .45s cubic-bezier(.77,0,.18,1); transform: translateY(0); }
.wipe.out { transform: translateY(0); animation: wipeOut .55s cubic-bezier(.77,0,.18,1) .05s forwards; }
@keyframes wipeOut { to { transform: translateY(-100%); } }

/* ============ TOP BAR ============ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--bar); z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 16px 0 calc(var(--ruler) + 12px);
  background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(27,21,18,.08);
}
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-weight: 700; font-size: 13px; flex-shrink: 0; }
.logo-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--ink); display: grid; place-items: center; }
.logo-mark span { width: 10px; height: 10px; background: var(--lime); border-radius: 50%; transition: transform .4s; }
.logo:hover .logo-mark span { transform: scale(1.6); }
.nav { display: flex; gap: 2px; padding: 4px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper); }
.nav a { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; transition: background .2s, color .2s; white-space: nowrap; }
.nav a:hover { background: var(--sun); }
.nav a.active { background: var(--ink); color: var(--paper); }
.bar-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.clock { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.clock b { color: var(--ink); font-weight: 400; }
.menu-btn { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .08em; border: 1.5px solid var(--ink); border-radius: 999px; padding: 7px 14px; display: flex; gap: 10px; align-items: center; transition: background .2s, color .2s; }
.menu-btn:hover { background: var(--ink); color: var(--paper); }
.menu-btn .bars { width: 14px; display: grid; gap: 3px; }
.menu-btn .bars i { height: 1.5px; background: currentColor; display: block; }

/* ============ RULERS + HUD ============ */
.ruler-x, .ruler-y { position: fixed; z-index: 90; background: var(--paper); pointer-events: none; overflow: hidden; }
.ruler-x { top: var(--bar); left: var(--ruler); right: 0; height: var(--ruler); border-bottom: 1px solid rgba(27,21,18,.12); }
.ruler-y { top: var(--bar); left: 0; bottom: 0; width: var(--ruler); border-right: 1px solid rgba(27,21,18,.12); }
.ruler-x canvas, .ruler-y canvas { display: block; }
.ruler-mark { position: absolute; background: var(--tomato); }
.ruler-x .ruler-mark { top: 0; bottom: 0; width: 1px; }
.ruler-y .ruler-mark { left: 0; right: 0; height: 1px; }
.hud { position: fixed; left: calc(var(--ruler) + 12px); bottom: 14px; z-index: 80; font-family: var(--font-mono); font-size: 11px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 8px; padding: 5px 10px; pointer-events: none; }
.hud b { font-weight: 400; color: var(--indigo); }

/* ============ CURSORS ============ */
.me-cursor { position: fixed; left: 0; top: 0; z-index: 999; pointer-events: none; display: none; opacity: 0; }
body.has-cursor .me-cursor { display: block; }
.me-cursor .tag { position: absolute; left: 16px; top: 18px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; background: var(--indigo); color: var(--ink); padding: 3px 8px; border-radius: 0 8px 8px 8px; white-space: nowrap; transition: background .2s; }
.me-cursor.press svg { transform: scale(.85); }
.me-cursor.link .tag { background: var(--lime); }
.ghost { position: absolute; top: 0; left: 0; z-index: 6; pointer-events: none; transition: transform 1.6s cubic-bezier(.45,.05,.3,1); }
.ghost svg { display: block; }
.ghost .tag { position: absolute; left: 16px; top: 18px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 0 8px 8px 8px; white-space: nowrap; color: var(--ink); }

/* ============ MENU OVERLAY ============ */
.menu { position: fixed; inset: 0; z-index: 200; background: var(--lime); color: var(--ink); clip-path: circle(0% at calc(100% - 60px) 28px); transition: clip-path .7s cubic-bezier(.77,0,.18,1); display: flex; flex-direction: column; padding: 90px 32px 32px; visibility: hidden; }
.menu.open { clip-path: circle(150% at calc(100% - 60px) 28px); visibility: visible; }
.menu-close { position: absolute; top: 12px; right: 16px; font-family: var(--font-mono); font-size: 12px; font-weight: 700; border: 2px solid var(--ink); border-radius: 999px; padding: 8px 14px; }
.menu nav { display: flex; flex-direction: column; margin: auto 0; }
.menu nav a { font-family: var(--font-display); font-weight: 700; font-size: clamp(36px, 7vw, 88px); line-height: 1.08; display: flex; align-items: baseline; gap: 18px; opacity: 0; transform: translateY(30px); transition: opacity .5s, transform .5s, color .2s; }
.menu.open nav a { opacity: 1; transform: none; }
.menu nav a small { font-family: var(--font-mono); font-size: 13px; opacity: .6; }
.menu nav a:hover, .menu nav a.active { color: var(--tomato); }
.menu-foot { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 12px; flex-wrap: wrap; gap: 10px; }

/* ============ SHARED BITS ============ */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s, transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: .15em; color: var(--muted); text-transform: uppercase; }
.sec { padding: 110px 0; }
.sec-head { text-align: center; padding: 0 16px; margin-bottom: 56px; }
.sec-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(38px, 7vw, 92px); line-height: 1; margin-top: 10px; }
.sec-sub { max-width: 480px; margin: 18px auto 0; color: var(--muted); font-size: 17px; line-height: 1.5; }
.sec-head.left { text-align: left; padding: 0; }
.sec-head.left .sec-sub { margin-left: 0; }

/* selection frame with handles (data-resize makes it stretchy) */
.frame { position: relative; display: inline-block; padding: 16px 26px; outline: 2px solid var(--indigo); transform-origin: center; }
.frame-label { position: absolute; top: -26px; left: -2px; font-family: var(--font-mono); font-size: 11px; color: var(--ink); background: var(--indigo); padding: 3px 7px; border-radius: 4px 4px 4px 0; white-space: nowrap; }
.frame-size { position: absolute; bottom: -28px; left: 50%; transform: translateX(-50%); font-family: var(--font-mono); font-size: 11px; color: var(--ink); background: var(--indigo); padding: 3px 7px; border-radius: 4px; white-space: nowrap; }
.handle { position: absolute; width: 14px; height: 14px; background: var(--indigo); border: 2px solid var(--ink); border-radius: 2px; touch-action: none; z-index: 2; }
.handle.tl { top: -7px; left: -7px; } .handle.tr { top: -7px; right: -7px; }
.handle.bl { bottom: -7px; left: -7px; } .handle.br { bottom: -7px; right: -7px; }
.handle:hover { background: var(--lime); }
.bounce span { display: inline-block; transition: transform .35s var(--spring), color .2s; }
.bounce span:hover { transform: translateY(-12px) rotate(-6deg); color: var(--tomato); }

/* draggable things */
[data-drag] { position: absolute; touch-action: none; user-select: none; transform: translate(var(--dx,0px), var(--dy,0px)) rotate(var(--r,0deg)) scale(var(--s,1)); transition: box-shadow .2s; z-index: 5; }
[data-drag].dragging { --s: 1.06; box-shadow: 0 18px 40px rgba(0,0,0,.18); z-index: 50; transition: none; }
.note { font-size: 15px; font-weight: 600; padding: 12px 16px; border-radius: 4px; border: 1.5px solid var(--ink); box-shadow: 0 6px 14px rgba(0,0,0,.08); max-width: 220px; text-align: left; }
.note small { display: block; font-family: var(--font-mono); font-size: 10px; font-weight: 400; opacity: .7; margin-bottom: 4px; letter-spacing: .08em; }
.tag-chunk { font-family: var(--font-mono); font-size: 13px; font-weight: 700; letter-spacing: .08em; padding: 12px 20px; border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); text-transform: uppercase; white-space: nowrap; }
.tag-chunk .ptr { position: absolute; width: 26px; height: 26px; }
.tag-chunk .ptr svg { width: 100%; height: 100%; display: block; }
.tag-chunk .ptr.r { right: -30px; top: -14px; } .tag-chunk .ptr.l { left: -30px; top: -14px; transform: scaleX(-1); }

/* buttons */
.cta { display: inline-flex; align-items: center; gap: 12px; background: var(--ink); color: var(--paper); padding: 12px 20px 12px 12px; border-radius: 14px; font-family: var(--font-mono); font-weight: 700; font-size: 13px; letter-spacing: .06em; box-shadow: 4px 4px 0 var(--lime); border: 2px solid var(--ink); transition: transform .2s, box-shadow .2s; text-transform: uppercase; }
.cta:hover { transform: translate(-2px,-2px); box-shadow: 7px 7px 0 var(--lime); }
.cta .ico { width: 30px; height: 30px; border-radius: 4px; background: var(--indigo); color: var(--ink); display: grid; place-items: center; transition: transform .3s; }
.cta:hover .ico { transform: rotate(-45deg); }
.cta.light { background: var(--paper); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.cta.light:hover { box-shadow: 7px 7px 0 var(--ink); }
.link-u { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .1em; display: inline-flex; gap: 8px; align-items: center; border-bottom: 1.5px solid currentColor; padding-bottom: 4px; text-transform: uppercase; }
.link-u span { transition: transform .2s; }
.link-u:hover span { transform: translate(3px,-3px); }
.chip { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; padding: 8px 14px; background: var(--ink); color: var(--paper); clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); text-transform: uppercase; display: inline-block; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 44px; }
.filter { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .08em; padding: 9px 16px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); transition: background .2s, color .2s, transform .2s var(--spring); text-transform: uppercase; }
.filter:hover { transform: translateY(-2px); background: var(--sun); }
.filter.on { background: var(--ink); color: var(--paper); }
.filter .count { opacity: .5; margin-left: 4px; }

/* ============ PAGE HERO (inner pages) ============ */
.page-hero { position: relative; min-height: 78vh; padding: 150px 16px 90px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.page-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(52px, 11vw, 150px); line-height: .92; user-select: none; }
.page-lead { font-size: clamp(19px, 2.4vw, 26px); font-weight: 500; line-height: 1.35; max-width: 640px; margin-top: 54px; }
.page-lead em { font-style: normal; background: var(--lime); padding: 0 .2em; border-radius: 6px; }
.crumbs { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-bottom: 40px; letter-spacing: .06em; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* ============ FOLDERS (mini, for grids) ============ */
.folder { position: relative; padding-top: 38px; display: block; --tab-w: 150px; transition: transform .35s var(--spring); }
.folder:hover { transform: translateY(-6px) rotate(-.4deg); }
.folder-tab { position: absolute; top: 0; left: 0; width: var(--tab-w); height: 40px; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 0 34px 0 14px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--fg); }
.folder-tab .shape { position: absolute; inset: 0; width: 100%; height: calc(100% + 3px); z-index: -1; overflow: visible; }
.folder-tab .shape path, .card-tab .shape path { fill: var(--bg); stroke: none; stroke-width: 0; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.folder-tab .num, .card-tab .num { width: 22px; height: 22px; display: grid; place-items: center; font-size: 10px; background: var(--fg); color: var(--bg); border-radius: 4px; transition: transform .3s var(--spring); }
.folder:hover .folder-tab .num { transform: rotate(-8deg) scale(1.1); }
.folder-body { background: var(--bg); color: var(--fg); border-radius: 0 10px 10px 10px; padding: 18px; box-shadow: 0 10px 24px rgba(27,21,18,.12); transition: box-shadow .3s; }
.folder:hover .folder-body { box-shadow: 0 20px 38px rgba(27,21,18,.18); }
.folder-media { position: relative; aspect-ratio: 3 / 2; outline: 2px solid var(--indigo); margin: 4px 4px 18px; }
.folder-media .clip { position: absolute; inset: 0; overflow: hidden; }
.folder-media .art { position: absolute; inset: 0; transition: transform .8s var(--ease); background: rgba(0,0,0,.08); }
.folder:hover .folder-media .art { transform: scale(1.07); }
.folder-meta { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; }
.folder-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.05; margin: 10px 0 8px; overflow-wrap: break-word; }
.folder-desc { font-size: 16px; line-height: 1.4; opacity: .85; min-height: 2.8em; }
.folder .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.h4 { position: absolute; width: 11px; height: 11px; background: #fff; border: 2px solid var(--indigo); z-index: 3; }
.h4:nth-of-type(1) { top: -6px; left: -6px; } .h4:nth-of-type(2) { top: -6px; right: -6px; }
.h4:nth-of-type(3) { bottom: -6px; left: -6px; } .h4:nth-of-type(4) { bottom: -6px; right: -6px; }
.file { position: absolute; top: 10px; right: 10px; font-family: var(--font-mono); font-size: 11px; background: var(--ink); color: var(--paper); padding: 5px 9px; border-radius: 6px; z-index: 2; }

/* ============ FOLDER STACK (home) ============ */
.stack { max-width: var(--max); margin: 0 auto; padding: 0 16px 10vh; --stick: 96px; --tab-h: 48px; --tab-step: 180px; --tab-w: 214px; --card-h: 500px; }
.card { position: sticky; top: var(--stick); margin-bottom: 16vh; padding-top: calc(var(--tab-h) - 2px); }
.card:last-child { margin-bottom: 0; }
.card-tab { position: absolute; top: 0; left: calc(var(--i) * var(--tab-step)); width: var(--tab-w); height: var(--tab-h); z-index: 2; display: flex; align-items: center; gap: 10px; padding: 0 46px 0 18px; font-family: var(--font-mono); font-weight: 700; font-size: 12px; letter-spacing: .12em; color: var(--fg); filter: brightness(calc(1 - var(--cover, 0) * .22)); }
.card-tab .shape { position: absolute; left: 0; top: 0; width: 100%; height: calc(100% + 3px); z-index: -1; overflow: visible; }
.card-tab:hover .num, .card-tab:focus-visible .num { background: var(--paper); color: var(--ink); transform: rotate(-8deg) scale(1.1); }
.card-tab:focus-visible { outline: none; }
.card-body { position: relative; height: var(--card-h); overflow: hidden; background: var(--bg); color: var(--fg); border-radius: 10px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; padding: 30px; box-shadow: 0 -14px 34px rgba(27,21,18,.12); }
.card-anchor:first-child + .card .card-body { border-top-left-radius: 0; }
.card-body::after { content: ""; position: absolute; inset: 0; background: var(--ink); opacity: calc(var(--cover, 0) * .35); pointer-events: none; }
.card-info { display: flex; flex-direction: column; }
.card-date { font-family: var(--font-mono); font-size: 12px; display: flex; align-items: center; gap: 8px; }
.card-date::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.card-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 4vw, 54px); line-height: 1; margin-top: 30px; }
.card-desc { font-size: 19px; margin-top: 14px; max-width: 380px; opacity: .85; line-height: 1.35; }
.card-info .link-u { margin-top: 26px; align-self: flex-start; }
.card-tags { margin-top: auto; padding-top: 24px; display: flex; gap: 8px; flex-wrap: wrap; }
.card-media { position: relative; outline: 2px solid var(--indigo); min-height: 0; margin: 6px; }
.card-media .clip { position: absolute; inset: 0; overflow: hidden; }
.card-media .art { position: absolute; inset: 0; transition: transform .8s var(--ease); }
.card:hover .card-media .art { transform: scale(1.06); }

/* ============ CONTACT (shared on every page) ============ */
.contact { padding: 60px 16px 100px; }
.contact-panel { max-width: var(--max); margin: 0 auto; background: var(--brown); color: var(--paper); border-radius: 28px; min-height: 600px; position: relative; overflow: hidden; display: grid; place-items: center; padding: 80px 20px; }
.swoosh { position: absolute; inset: -20%; width: 140%; height: 140%; pointer-events: none; }
.contact-card { position: absolute; top: 40px; left: 40px; max-width: 320px; background: var(--paper); color: var(--ink); border-radius: 16px; padding: 18px; z-index: 3; border: 2px solid var(--ink); }
.contact-card .who { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.contact-card .who small { font-family: var(--font-mono); font-size: 11px; color: var(--muted); font-weight: 400; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: conic-gradient(var(--tomato), var(--sun), var(--lime), var(--indigo), var(--tomato)); border: 2px solid var(--ink); flex-shrink: 0; }
.contact-card p { font-size: 15px; margin-top: 10px; color: #4a403b; line-height: 1.45; }
.react { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 8px; border: 1.5px solid var(--indigo); color: #1f6fa3; background: #e6f4fd; }
.react.pop { animation: pop .4s; }
@keyframes pop { 50% { transform: scale(1.25); } }
.contact-tag { position: relative; z-index: 2; display: flex; align-items: center; gap: 18px; padding: 18px 26px; background: var(--indigo); color: var(--ink); border: 3px solid var(--ink); border-radius: 6px; box-shadow: 0 8px 0 var(--ink); transform: rotate(var(--rot, -8deg)); transition: box-shadow .2s; }
.contact-tag:hover { box-shadow: 0 12px 0 var(--ink); }
.contact-tag .word { font-family: var(--font-display); font-weight: 700; letter-spacing: .04em; font-size: clamp(34px, 7vw, 90px); line-height: 1; white-space: nowrap; }
.contact-tag .badge { width: clamp(40px,6vw,68px); height: clamp(40px,6vw,68px); background: var(--tomato); border: 3px solid var(--ink); display: grid; place-items: center; transition: transform .5s var(--spring); flex-shrink: 0; }
.contact-tag .badge svg { width: 60%; height: 60%; }
.contact-tag:hover .badge { transform: rotate(90deg); }
.contact-links { position: absolute; bottom: 36px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; z-index: 3; padding: 0 16px; }
.contact-links a { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .08em; padding: 9px 14px; border: 1.5px solid rgba(255,255,255,.3); border-radius: 999px; transition: background .2s, color .2s; }
.contact-links a:hover { background: var(--paper); color: var(--ink); }

/* ============ FOOTER ============ */
.site-footer { padding: 40px 16px 60px calc(var(--ruler) + 16px); }
.foot-inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; border-top: 2px solid var(--ink); padding-top: 30px; }
.foot-big { font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 1; }
.foot-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .15em; color: var(--muted); margin-bottom: 12px; font-weight: 400; }
.foot-col a { display: block; font-weight: 600; padding: 3px 0; }
.foot-col a:hover { color: var(--tomato); }
.foot-base { max-width: var(--max); margin: 30px auto 0; display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 12px; color: var(--muted); gap: 10px; flex-wrap: wrap; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 120px); background: var(--ink); color: var(--paper); font-family: var(--font-mono); font-size: 12px; padding: 10px 16px; border-radius: 10px; z-index: 300; transition: transform .4s var(--spring); }
.toast.show { transform: translate(-50%, 0); }

/* ============ PROSE (journal posts, case studies) ============ */
.prose { max-width: 680px; margin: 0 auto; font-size: 19px; line-height: 1.65; }
.prose p { margin: 0 0 1.2em; }
.prose h2 { font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 1.1; margin: 1.6em 0 .6em; }
.prose ul { margin: 0 0 1.4em; padding: 0; list-style: none; }
.prose li { padding-left: 34px; position: relative; margin-bottom: .6em; }
.prose li::before { content: ""; position: absolute; left: 4px; top: .45em; width: 14px; height: 14px; background: var(--lime); border: 2px solid var(--ink); transform: rotate(45deg); }
.prose blockquote { margin: 1.6em 0; padding: 26px 30px; background: var(--sun); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); font-family: var(--font-display); font-size: 28px; line-height: 1.2; transform: rotate(-1deg); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1180px) { .nav { display: none; } }
/* when the tab bar is showing, the MENU button would just repeat it */
@media (min-width: 1181px) { .menu-btn { display: none; } }
@media (max-width: 1100px) { .hero .note, .page-hero .note { display: none; } }
@media (max-width: 820px) {
  :root { --ruler: 0px; }
  .ruler-x, .ruler-y, .clock, .ghost, .hud { display: none; }
  .stack { --stick: 72px; --tab-h: 42px; --tab-step: calc((100% - 18px) / 4); --tab-w: calc((100% - 18px) / 4 + 18px); --card-h: 590px; }
  .card { margin-bottom: 10vh; }
  .card-tab { padding: 0 24px 0 10px; gap: 6px; font-size: 10px; }
  .card-tab .long { display: none; }
  .card-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 18px; padding: 20px; }
  .card-title { margin-top: 18px; }
  .card-desc { font-size: 16px; }
  .card-info .link-u { margin-top: 16px; }
  .card-tags { padding-top: 16px; }
  .contact-card { position: relative; top: auto; left: auto; margin-bottom: 40px; }
  .contact-panel { display: flex; flex-direction: column; justify-content: center; padding-bottom: 150px; }
  .contact-tag { padding: 14px 16px; gap: 10px; }
  .page-hero [data-drag] { display: none; }
  .foot-inner { grid-template-columns: 1fr 1fr; }
  .foot-inner > :first-child { grid-column: 1 / -1; }
  .prose { font-size: 17px; }
  .sec { padding: 80px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =====================================================================
   V2 ADDITIONS — handwriting notes, section rail, service bands,
   image cards and the scrapbook canvas
   ===================================================================== */
:root { --font-hand: "Caveat", "Comic Sans MS", cursive; }

/* handwritten annotation with a curvy arrow */
.scribble { font-family: var(--font-hand); font-size: 26px; font-weight: 500; line-height: 1.1; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; transform: rotate(var(--r, -4deg)); white-space: nowrap; }
.scribble svg { width: 70px; height: 40px; flex-shrink: 0; overflow: visible; }
.scribble svg path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 160; stroke-dashoffset: 160; transition: stroke-dashoffset 1s var(--ease) .3s; }
.in .scribble svg path, .scribble.in svg path { stroke-dashoffset: 0; }

/* labelled coloured frame around a whole section */
.zone { position: relative; border: 2px solid var(--zc, var(--indigo)); padding: 44px clamp(18px, 4vw, 48px); margin-top: 26px; }
.zone-label { position: absolute; top: -13px; left: -2px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; padding: 4px 8px; background: var(--zc, var(--indigo)); color: var(--zt, var(--ink)); text-transform: uppercase; }
.zone .zh { position: absolute; width: 12px; height: 12px; background: var(--paper); border: 2px solid var(--zc, var(--indigo)); }
.zone .zh:nth-of-type(1) { top: -7px; left: -7px; } .zone .zh:nth-of-type(2) { top: -7px; right: -7px; }
.zone .zh:nth-of-type(3) { bottom: -7px; left: -7px; } .zone .zh:nth-of-type(4) { bottom: -7px; right: -7px; }

/* inline icon chip inside big sentences */
.ichip { display: inline-grid; place-items: center; width: 1.05em; height: 1.05em; vertical-align: -.12em; border: 2px solid var(--ink); border-radius: .22em; background: var(--c, var(--lime)); margin: 0 .08em; transform: rotate(var(--r, -6deg)); transition: transform .4s var(--spring); }
.ichip:hover { transform: rotate(0) scale(1.2); }
.ichip svg { width: 62%; height: 62%; }

/* sticky section rail (scroll-spy) */
.rail { position: fixed; left: calc(var(--ruler) + 18px); top: 50%; transform: translateY(-50%); z-index: 60; display: flex; flex-direction: column; gap: 6px; padding: 6px; background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); }
.rail a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px; border-radius: 9px; font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .08em; transition: background .2s, color .2s; }
.rail a svg { width: 18px; height: 18px; }
.rail a:hover { background: var(--sun); }
.rail a.on { background: var(--ink); color: var(--paper); }
.rail a.on svg * { fill: var(--paper); }

/* page title "decode" letters */
.decode span { transition: color .2s, transform .35s var(--spring); }
.decode span.scrambling { color: #c9c2bb; }

/* service bands with a pixel-step top edge */
.band { position: relative; background: var(--c); padding: 110px 16px 100px; text-align: center; margin-top: -2px; }
.band::before { content: ""; position: absolute; left: 0; right: 0; top: -40px; height: 42px; background: var(--c);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 42' preserveAspectRatio='none'%3E%3Cpath d='M0 42V30h10V20h10V10h10V0h20v10h10v10h10v10h10v12z'/%3E%3C/svg%3E") repeat-x left bottom / 160px 42px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 42' preserveAspectRatio='none'%3E%3Cpath d='M0 42V30h10V20h10V10h10V0h20v10h10v10h10v10h10v12z'/%3E%3C/svg%3E") repeat-x left bottom / 160px 42px; }
.band-num { display: inline-grid; place-items: center; width: 64px; height: 64px; border: 2px solid var(--ink); border-radius: 50%; font-family: var(--font-mono); font-weight: 700; font-size: 14px; background: var(--paper); transition: transform .5s var(--spring); }
.band:hover .band-num { transform: rotate(-20deg) scale(1.08); }
.band-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(52px, 10vw, 128px); line-height: .9; margin: 26px auto 18px; max-width: 900px; }
.band-text { font-size: 19px; line-height: 1.5; max-width: 520px; margin: 0 auto; }
.band-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 10px; max-width: 900px; margin: 44px auto 0; }
.ftab { position: relative; padding: 16px 44px 12px 16px; min-width: 190px; text-align: left; font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .06em; background: var(--tc, var(--ink)); color: var(--tt, var(--paper)); clip-path: polygon(0 8px, 8px 0, 42% 0, calc(42% + 10px) 8px, 100% 8px, 100% 100%, 0 100%); transition: transform .3s var(--spring); }
.ftab:hover { transform: translateY(-4px) rotate(-1.5deg); }
.band-art { position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: .16; }

/* image cards (journal) */
.icard { display: block; border: 2px solid var(--ink); background: var(--paper); border-radius: 10px; overflow: hidden; transition: transform .35s var(--spring), box-shadow .35s; box-shadow: 0 5px 0 var(--ink); }
.icard:hover { transform: translateY(-6px); box-shadow: 0 11px 0 var(--ink); }
.icard-img { position: relative; aspect-ratio: 16 / 10; border-bottom: 2px solid var(--ink); overflow: hidden; background: var(--c); }
.icard-img svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .8s var(--ease); }
.icard:hover .icard-img svg { transform: scale(1.06); }
.icard-foot { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.icard-ico { width: 40px; height: 40px; flex-shrink: 0; border: 2px solid var(--ink); border-radius: 9px; background: var(--c); display: grid; place-items: center; transition: transform .4s var(--spring); }
.icard:hover .icard-ico { transform: rotate(-12deg); }
.icard-ico svg { width: 60%; height: 60%; }
.icard-foot h3 { font-size: 19px; font-weight: 700; line-height: 1.2; }
.icard-foot small { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: .04em; }

@media (max-width: 820px) {
  .rail { display: none; }
  .scribble { font-size: 22px; }
  .band { padding: 90px 16px 80px; }
  .ftab { min-width: 0; flex: 1 1 42%; }
}

/* big headers always stay on one line — site.js scales the font down to fit */
.page-title, .big-name, .cs-title { white-space: nowrap; }

/* small screens: handwritten notes wrap instead of pushing past the edge */
@media (max-width: 820px) {
  .scribble { white-space: normal; max-width: 100%; }
}

/* =====================================================================
   SHARP PASS — square corners, flat surfaces, crisper lines.
   Delete this block to go back to the softer look.
   ===================================================================== */
:root {
  --grid: rgba(27, 21, 18, 0.05);
  --mint: #6fd09a;
  --violet: #8ecbff;
}
*, *::before, *::after { border-radius: 0 !important; }
/* things that are meant to be round stay round */
.avatar, .pulse, .pulse::after, .award .medal, .now-card .blob, .card-date::before,
.stk.round, .date-chip .live, .eq i, .logo-mark span, .skill .dot i { border-radius: 50% !important; }

/* flat: drop every shadow except on loose paper (photos, notes, tape) and while dragging */
*:not(.polaroid):not(.snap):not(.note):not(.tape):not(.dragging) { box-shadow: none !important; }

/* hairline frames */
.frame, .card-media, .folder-media, .cover { outline-width: 1.5px !important; }
.handle { width: 12px; height: 12px; border-width: 1.5px; }
.handle.tl { top: -6px; left: -6px; } .handle.tr { top: -6px; right: -6px; }
.handle.bl { bottom: -6px; left: -6px; } .handle.br { bottom: -6px; right: -6px; }

/* hover lifts without shadows read as flat; keep motion, lose the tilt */
.folder:hover { transform: translateY(-6px); }
.folder:hover .folder-body, .card-body { box-shadow: none; }

/* buttons: flat black slab, accent fills the icon square on hover */
.cta { border-width: 1.5px; }
.cta:hover { transform: none; background: var(--indigo); color: var(--ink); }
.cta.light:hover { background: var(--lime); }
.cta:hover .ico { background: var(--ink); color: var(--paper); }

/* mid-size and smaller screens: hero stickers would cover the tagline, so hide them */
@media (max-width: 1100px) { .hero .tag-chunk { display: none; } }

/* ============ ESSAY FORMATTING (journal posts) ============ */
.prose .standfirst { font-size: 1.25em; line-height: 1.45; font-style: italic; color: #3a302b; border-left: 4px solid var(--lime); padding-left: 18px; margin-bottom: 1.6em; }
.prose strong { font-weight: 700; }
.prose h3 { display: flex; align-items: baseline; gap: 12px; font-size: 21px; font-weight: 700; line-height: 1.3; margin: 1.6em 0 .5em; }
.prose h3 span { flex-shrink: 0; display: inline-grid; place-items: center; width: 30px; height: 30px; background: var(--ink); color: var(--paper); font-family: var(--font-mono); font-size: 13px; transform: translateY(-2px); }
.prose blockquote.pull { font-family: var(--font-sans); font-weight: 700; font-size: 24px; line-height: 1.35; transform: none; background: var(--lime); }
.prose .takeaway { margin: 2.4em 0 0; padding: 28px 30px; background: var(--ink); color: var(--paper); }
.prose .takeaway .tk-k { font-family: var(--font-mono); font-size: 13px; letter-spacing: .04em; color: var(--lime); margin: 0 0 10px; font-style: normal; }
.prose .takeaway .tk-k em { font-style: normal; }
.prose .takeaway .tk-q { font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; margin: 0; }
@media (max-width: 820px) { .prose blockquote.pull { font-size: 20px; padding: 20px; } .prose .takeaway { padding: 22px; } }

/* home folders: the whole folder opens its case study (tabs still jump between folders) */
.card-hit { position: absolute; inset: 0; z-index: 1; }
.card-body .card-info, .card-body .card-media { position: relative; }
.card-body .card-info { pointer-events: none; }
.card-body .card-info .link-u { pointer-events: auto; position: relative; z-index: 2; }
.card-body .card-media { pointer-events: none; }
.card:hover .card-info .link-u span { transform: translate(3px, -3px); }
