/* ==========================================================================
   Shubhay Harnale — portfolio
   Light editorial system: paper, ink, one red-pencil accent.
   ========================================================================== */

:root {
  --paper: #f4f0e7;
  --paper-2: #ebe5d8;
  --paper-3: #e2dac9;
  --card: #fbf9f4;
  --ink: #17160f;
  --ink-2: #45423a;
  --mute: #645f54;
  --rule: #d5cdbb;
  --rule-strong: #17160f;
  --accent: #d4431a;
  --accent-soft: #f6dccf;
  --ok: #2f6b45;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* paper grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 100;
  opacity: .32; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.4 0 0 0 0 0.3 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 10px 14px;
  font: 500 14px var(--sans); text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- type primitives ---------- */
.kicker {
  font: 500 12px/1.4 var(--mono);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--mute);
}
.kicker b { color: var(--accent); font-weight: 500; }
.serif { font-family: var(--serif); }
em, .em { font-style: italic; }
.accent { color: var(--accent); }

h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 8.4vw, 124px);
  line-height: .94;
  letter-spacing: -.025em;
  font-variation-settings: "opsz" 72;
}
.display em { color: var(--accent); }

.h2 {
  font-family: var(--serif);
  font-size: clamp(38px, 5.2vw, 72px);
  line-height: 1;
  letter-spacing: -.02em;
  font-variation-settings: "opsz" 72;
}
.h2 em { color: var(--accent); }

.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 36em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font: 500 15px/1 var(--sans);
  text-decoration: none;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
  white-space: nowrap;
}
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--accent); border-color: var(--accent); }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.btn--paper { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--paper:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn--ghost-light { color: var(--paper); border-color: rgba(244,240,231,.45); }
.btn--ghost-light:hover { background: var(--paper); color: var(--ink); }

.link {
  font: 500 15px var(--sans);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat;
  padding-bottom: 2px;
  transition: background-size .3s var(--ease), color .2s;
}
.link:hover { color: var(--accent); background-size: 0 1.5px; background-position: 100% 100%; }

/* ---------- masthead + nav ---------- */
.masthead {
  border-bottom: 1px solid var(--rule);
  font: 500 11.5px/1 var(--mono);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--mute);
}
.masthead .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(47,107,69,.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(47,107,69,0); } 100% { box-shadow: 0 0 0 0 rgba(47,107,69,0); } }
@media (max-width: 720px) { .masthead .hide-sm { display: none; } }

.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.is-stuck { border-bottom-color: var(--rule); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.wordmark {
  font: 400 24px/1 var(--serif);
  letter-spacing: -.01em;
  text-decoration: none;
  display: inline-flex; align-items: baseline; gap: 2px;
}
.wordmark i { color: var(--accent); font-style: normal; }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links a:not(.btn) { font: 500 15px var(--sans); text-decoration: none; color: var(--ink-2); transition: color .2s; }
.nav-links a:not(.btn):hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav-links .btn { padding: 10px 16px; font-size: 14px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; margin-right: -8px; cursor: pointer; color: var(--ink); }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: currentColor; margin: 5px 0; transition: transform .3s var(--ease), opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 24px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; border-bottom: 1px solid var(--rule); }
  .nav-links li:last-child { border: 0; padding-top: 18px; }
  .nav-links a:not(.btn) { display: block; padding: 16px 0; font-size: 20px; font-family: var(--serif); color: var(--ink); }
}

/* ---------- sections ---------- */
.section { padding: clamp(80px, 11vw, 150px) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.sec-head {
  display: grid; grid-template-columns: 220px 1fr; gap: 24px 48px;
  align-items: end; margin-bottom: clamp(48px, 6vw, 80px);
}
.sec-num { font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); padding-bottom: 12px; border-top: 2px solid var(--ink); padding-top: 12px; align-self: start; }
.sec-num b { color: var(--accent); font-weight: 500; }
.sec-head .lede { margin-top: 20px; }
@media (max-width: 820px) { .sec-head { grid-template-columns: 1fr; } .sec-num { max-width: 220px; } }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 8vw, 110px) 0 clamp(64px, 8vw, 100px); }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: clamp(28px, 4vw, 48px); padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.hero h1 { max-width: 12.5ch; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 96px); margin-top: clamp(40px, 5vw, 64px); align-items: start; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.facts { border-top: 1px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 112px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.facts dt { font: 500 11.5px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.facts dd { margin: 0; font-size: 16px; color: var(--ink); }
.facts dd strong { font-family: var(--serif); font-weight: 400; font-size: 22px; letter-spacing: -.01em; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* staggered load */
.rise { opacity: 0; transform: translateY(18px); animation: rise .9s var(--ease) forwards; animation-delay: calc(var(--d, 0) * 90ms + 80ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- two paths ---------- */
.paths { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--ink); }
.path { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 18px; text-decoration: none; position: relative; transition: background .35s var(--ease), color .35s var(--ease); min-height: 280px; }
.path + .path { border-left: 1.5px solid var(--ink); }
.path h3 { font: 400 clamp(30px, 3.4vw, 44px)/1.04 var(--serif); letter-spacing: -.015em; }
.path p { color: var(--ink-2); max-width: 30em; transition: color .35s; }
.path .go { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font: 500 15px var(--sans); padding-top: 18px; border-top: 1px solid var(--rule); transition: border-color .35s; }
.path .go span:last-child { font-size: 22px; transition: transform .35s var(--ease); }
.path:hover { background: var(--ink); color: var(--paper); }
.path:hover p { color: rgba(244,240,231,.72); }
.path:hover .go { border-color: rgba(244,240,231,.25); }
.path:hover .go span:last-child { transform: translateX(6px); color: var(--accent); }
.path:hover .kicker { color: rgba(244,240,231,.78); }
@media (max-width: 760px) { .paths { grid-template-columns: 1fr; } .path + .path { border-left: 0; border-top: 1.5px solid var(--ink); } }

/* ---------- featured work ---------- */
.work-list { display: flex; flex-direction: column; }
.feature {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(48px, 6vw, 88px) 0;
  border-top: 1px solid var(--rule);
  align-items: center;
}
.feature:first-child { border-top: 2px solid var(--ink); }
.feature:nth-child(even) .feature-media { order: -1; }
.feature-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.feature-num { font: 400 15px var(--serif); font-style: italic; color: var(--accent); }
.feature h3 { font: 400 clamp(44px, 5.4vw, 76px)/.95 var(--serif); letter-spacing: -.025em; margin-bottom: 18px; }
.feature h3 a { text-decoration: none; }
.feature h3 a:hover { color: var(--accent); }
.feature .pitch { font: 400 clamp(20px, 1.8vw, 24px)/1.35 var(--serif); color: var(--ink); margin-bottom: 18px; max-width: 26em; }
.feature .desc { color: var(--ink-2); margin-bottom: 24px; }
.feature ul.points { list-style: none; padding: 0; margin: 0 0 26px; border-top: 1px solid var(--rule); }
.feature ul.points li { padding: 11px 0 11px 26px; border-bottom: 1px solid var(--rule); position: relative; font-size: 15.5px; color: var(--ink-2); }
.feature ul.points li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.feature ul.points strong { color: var(--ink); font-weight: 600; }
.stack { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 26px; }
.stack li { list-style: none; font: 500 12px/1 var(--mono); padding: 7px 10px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-2); background: var(--card); }
.stack { padding: 0; margin-top: 0; }
.feature-links { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; }
.tag { display: inline-block; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 6px 9px; border-radius: 3px; background: var(--ink); color: var(--paper); }
.tag--client { background: var(--accent); }
@media (max-width: 960px) {
  .feature { grid-template-columns: 1fr; }
  .feature:nth-child(even) .feature-media { order: 0; }
}

/* media frames */
.feature-media { position: relative; }
.shot {
  position: relative; border-radius: 6px; overflow: hidden;
  background: var(--paper-3);
  box-shadow: 0 1px 0 rgba(23,22,15,.05), 0 30px 60px -30px rgba(23,22,15,.35);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
a.shot:hover, .feature:hover .shot { transform: translateY(-4px) rotate(-.3deg); box-shadow: 0 1px 0 rgba(23,22,15,.05), 0 44px 70px -34px rgba(23,22,15,.45); }
.shot img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.caption { margin-top: 14px; font: 500 12px/1.5 var(--mono); color: var(--mute); display: flex; justify-content: space-between; gap: 12px; }

/* ---------- code-built interface specimens ---------- */
.spec { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; font-family: var(--sans); color: var(--ink); box-shadow: 0 30px 60px -32px rgba(23,22,15,.35); transition: transform .6s var(--ease); }
.feature:hover .spec { transform: translateY(-4px) rotate(.3deg); }
.spec-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; border-bottom: 1px solid var(--rule); background: var(--paper-2); }
.spec-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--rule); }
.spec-bar span { margin-left: 10px; font: 500 11px var(--mono); color: var(--mute); background: var(--card); border: 1px solid var(--rule); border-radius: 4px; padding: 3px 10px; flex: 1; max-width: 260px; }
.spec-body { padding: 18px; }

/* ChartUPP */
.cu { display: grid; grid-template-columns: 1.05fr 1fr; gap: 14px; }
.cu-col h5 { margin: 0 0 10px; font: 600 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.cu-card { border: 1px solid var(--rule); border-radius: 8px; padding: 11px 12px; margin-bottom: 8px; background: #fff; }
.cu-card b { display: block; font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.cu-card small { font-size: 11.5px; color: var(--mute); display: flex; justify-content: space-between; }
.cu-card .pill { display: inline-block; margin-top: 8px; font: 600 10px var(--mono); padding: 3px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.cu-card.on { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.cu-chat { border: 1px solid var(--rule); border-radius: 8px; background: #fff; padding: 12px; display: flex; flex-direction: column; gap: 8px; height: 100%; }
.msg { font-size: 12px; line-height: 1.4; padding: 8px 10px; border-radius: 10px; max-width: 88%; }
.msg.in { background: var(--paper-2); align-self: flex-start; border-bottom-left-radius: 2px; }
.msg.out { background: var(--ink); color: var(--paper); align-self: flex-end; border-bottom-right-radius: 2px; }
.typing { font: 500 10.5px var(--mono); color: var(--mute); margin-top: auto; display: flex; align-items: center; gap: 6px; }
.typing::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

/* DriftGuard */
.dg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.dg-head b { font-size: 13px; font-weight: 600; }
.dg-badge { font: 600 10.5px var(--mono); padding: 4px 8px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); }
.dg-table { width: 100%; border-collapse: collapse; font: 500 11.5px var(--mono); background: #fff; border: 1px solid var(--rule); }
.dg-table th { text-align: left; font-weight: 600; color: var(--mute); padding: 8px 10px; border-bottom: 1px solid var(--rule); background: var(--paper); }
.dg-table td { padding: 8px 10px; border-bottom: 1px solid var(--paper-2); }
.dg-table del { color: var(--mute); text-decoration-color: var(--accent); }
.dg-table ins { text-decoration: none; color: var(--ok); background: #e3efe5; padding: 1px 4px; border-radius: 3px; }
.dg-actions { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.dg-btn { font: 600 11.5px var(--sans); padding: 7px 12px; border-radius: 6px; border: 1px solid var(--ink); }
.dg-btn.yes { background: var(--ink); color: var(--paper); }
.dg-log { margin-left: auto; font: 500 10.5px var(--mono); color: var(--mute); }

/* SiteCheck */
.sc { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: center; }
.gauge { width: 110px; height: 110px; border-radius: 50%; background: conic-gradient(var(--accent) 0 72%, var(--paper-2) 72% 100%); display: grid; place-items: center; }
.gauge div { width: 84px; height: 84px; border-radius: 50%; background: var(--card); display: grid; place-items: center; text-align: center; font: 400 30px/1 var(--serif); }
.gauge small { display: block; font: 500 9px var(--mono); color: var(--mute); letter-spacing: .06em; margin-top: 3px; }
.sc ul { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.sc li { display: flex; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--paper-2); }
.sc li span { font: 600 10px var(--mono); padding: 2px 6px; border-radius: 3px; height: fit-content; }
.sev-h { background: var(--accent-soft); color: var(--accent); }
.sev-m { background: #f2e9cf; color: #8a6a12; }
.sev-l { background: #e3efe5; color: var(--ok); }

/* Chess */
.ch { display: grid; grid-template-columns: 14px 1fr 1fr; gap: 14px; align-items: stretch; }
.evalbar { border-radius: 3px; overflow: hidden; background: var(--ink); display: flex; flex-direction: column; justify-content: flex-end; }
.evalbar i { display: block; height: 62%; background: #fff; border-top: 1px solid var(--rule); }
.board { display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; border: 1px solid var(--ink-2); }
.board span { display: grid; place-items: center; font-size: clamp(10px, 1.3vw, 17px); line-height: 1; background: #efe7d6; }
.board span.d { background: #b9a888; }
.board span.hl { background: #e8a68e; }
.ch-notes { font-size: 12px; display: flex; flex-direction: column; gap: 8px; }
.ch-notes .mv { font: 600 12px var(--mono); }
.ch-notes .q { font: 600 10px var(--mono); padding: 3px 7px; border-radius: 3px; background: var(--accent-soft); color: var(--accent); width: fit-content; }
.ch-notes p { color: var(--ink-2); line-height: 1.45; }

/* ---------- more projects ---------- */
.more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 2px solid var(--ink); margin-top: clamp(40px, 5vw, 64px); }
.mini { padding: 28px 28px 32px 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 12px; }
.mini + .mini { padding-left: 28px; border-left: 1px solid var(--rule); }
.mini:nth-child(3n+1) { padding-left: 0; border-left: 0; }
.mini h4 { font: 400 28px/1.05 var(--serif); letter-spacing: -.01em; }
.mini p { font-size: 15px; color: var(--ink-2); }
.mini .kicker { display: flex; justify-content: space-between; gap: 10px; }
.mini .link { margin-top: auto; align-self: flex-start; font-size: 14px; }
.more-label { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-top: clamp(64px, 8vw, 110px); }
.more-label h3 { font: 400 clamp(30px, 3.4vw, 44px)/1 var(--serif); letter-spacing: -.015em; }
@media (max-width: 900px) {
  .more { grid-template-columns: 1fr 1fr; }
  .mini, .mini + .mini { padding: 24px 20px 28px 0; border-left: 0; }
  .mini:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--rule); }
}
@media (max-width: 600px) {
  .more { grid-template-columns: 1fr; }
  .mini, .mini + .mini, .mini:nth-child(even) { padding: 24px 0; border-left: 0; }
}

/* ---------- experience ---------- */
.xp { border-top: 2px solid var(--ink); }
.xp-row { display: grid; grid-template-columns: 220px 1fr 1.4fr; gap: 20px 48px; padding: 34px 0; border-bottom: 1px solid var(--rule); }
.xp-when { font: 500 13px/1.5 var(--mono); color: var(--mute); }
.xp-when .now { display: inline-block; margin-top: 8px; color: var(--ok); }
.xp-role h3 { font: 400 32px/1.05 var(--serif); letter-spacing: -.01em; }
.xp-role p { color: var(--ink-2); margin-top: 6px; font-size: 15.5px; }
.xp-row ul { margin: 0; padding: 0; list-style: none; }
.xp-row li { padding-left: 22px; position: relative; color: var(--ink-2); font-size: 15.5px; margin-bottom: 10px; }
.xp-row li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 1.5px; background: var(--accent); }
.xp-row li strong { color: var(--ink); font-weight: 600; }
@media (max-width: 900px) { .xp-row { grid-template-columns: 1fr; gap: 12px; } }

/* ---------- skills ---------- */
.skills { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); }
.skill-col { padding: 26px 24px 30px 0; }
.skill-col + .skill-col { padding-left: 24px; border-left: 1px solid var(--rule); }
.skill-col h3 { font: 400 22px/1.15 var(--serif); margin-bottom: 16px; }
.skill-col ul { list-style: none; margin: 0; padding: 0; }
.skill-col li { padding: 7px 0; border-bottom: 1px dashed var(--rule); font-size: 15px; color: var(--ink-2); }
@media (max-width: 900px) {
  .skills { grid-template-columns: 1fr 1fr; }
  .skill-col, .skill-col + .skill-col { padding: 24px 18px 24px 0; border-left: 0; }
  .skill-col:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--rule); }
}

/* ---------- ink band (freelance) ---------- */
.band { background: var(--ink); color: var(--paper); position: relative; overflow: hidden; }
.band .kicker, .band .sec-num { color: rgba(244,240,231,.74); }
.band .sec-num { border-top-color: var(--paper); }
.band .lede { color: rgba(244,240,231,.75); }
.band .h2 em { color: var(--accent); }
.band::after {
  content: "for hire"; position: absolute; right: -2vw; bottom: -6vw;
  font: italic 400 22vw/1 var(--serif); color: rgba(244,240,231,.04);
  pointer-events: none; white-space: nowrap;
}
.offer { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(244,240,231,.3); position: relative; z-index: 1; }
.offer > div { padding: 28px 28px 32px 0; }
.offer > div + div { padding-left: 28px; border-left: 1px solid rgba(244,240,231,.18); }
.offer .n { font: italic 400 16px var(--serif); color: var(--accent); }
.offer h3 { font: 400 28px/1.1 var(--serif); margin: 14px 0 10px; }
.offer p { color: rgba(244,240,231,.7); font-size: 15.5px; }
.band-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 48px; position: relative; z-index: 1; }
.band-cta .proof { font: 500 12.5px var(--mono); color: rgba(244,240,231,.6); }
@media (max-width: 820px) {
  .offer { grid-template-columns: 1fr; }
  .offer > div, .offer > div + div { padding: 24px 0; border-left: 0; border-bottom: 1px solid rgba(244,240,231,.18); }
}

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); }
.about .big { font: 400 clamp(26px, 2.6vw, 36px)/1.25 var(--serif); letter-spacing: -.01em; }
.about .big em { color: var(--accent); }
.about-body p + p { margin-top: 18px; }
.about-body p { color: var(--ink-2); }
.edu { margin-top: 36px; border-top: 1px solid var(--ink); }
.edu div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.edu dt { font: 500 11.5px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.edu dd { margin: 0; font-size: 15.5px; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }

/* ---------- contact ---------- */
.contact { padding: clamp(90px, 12vw, 170px) 0 clamp(60px, 8vw, 100px); border-top: 1px solid var(--rule); }
.contact .display { max-width: 11ch; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: clamp(44px, 6vw, 72px); border: 1.5px solid var(--ink); }
.contact-card { padding: clamp(26px, 3.4vw, 40px); display: flex; flex-direction: column; gap: 14px; }
.contact-card + .contact-card { border-left: 1.5px solid var(--ink); }
.contact-card h3 { font: 400 30px/1.1 var(--serif); }
.contact-card p { color: var(--ink-2); }
.contact-card .btn { align-self: flex-start; margin-top: 8px; }
.direct { display: flex; flex-wrap: wrap; gap: 14px 36px; margin-top: 36px; font: 500 15px var(--sans); }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } .contact-card + .contact-card { border-left: 0; border-top: 1.5px solid var(--ink); } }

/* ---------- footer ---------- */
.footer { border-top: 2px solid var(--ink); padding: 26px 0 40px; font: 500 12px/1.5 var(--mono); letter-spacing: .04em; color: var(--mute); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; }

/* ---------- services page ---------- */
.svc-hero h1 { max-width: 11ch; }
.results { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); margin-top: clamp(48px, 6vw, 80px); }
.results div { padding: 24px 22px 26px 0; }
.results div + div { padding-left: 22px; border-left: 1px solid var(--rule); }
.results strong { display: block; font: 400 clamp(36px, 4vw, 54px)/1 var(--serif); letter-spacing: -.02em; }
.results strong em { color: var(--accent); }
.results span { display: block; margin-top: 10px; font-size: 14.5px; color: var(--ink-2); }
@media (max-width: 820px) {
  .results { grid-template-columns: 1fr 1fr; }
  .results div, .results div + div { padding: 22px 16px 22px 0; border-left: 0; }
  .results div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--rule); }
}

.svc-list { border-top: 2px solid var(--ink); }
.svc { display: grid; grid-template-columns: 70px 1fr 1.2fr; gap: 16px 40px; padding: 36px 0; border-bottom: 1px solid var(--rule); }
.svc .n { font: italic 400 20px var(--serif); color: var(--accent); }
.svc h3 { font: 400 clamp(30px, 3vw, 40px)/1.05 var(--serif); letter-spacing: -.015em; }
.svc h3 + p { margin-top: 10px; color: var(--ink-2); font-size: 15.5px; }
.svc ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 28px; }
.svc li { break-inside: avoid; padding: 8px 0 8px 20px; position: relative; font-size: 15px; color: var(--ink-2); border-bottom: 1px dashed var(--rule); }
.svc li::before { content: "+"; position: absolute; left: 0; color: var(--accent); font-weight: 600; }
@media (max-width: 900px) { .svc { grid-template-columns: 1fr; } .svc ul { columns: 1; } }

.process { display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: step; border-top: 2px solid var(--ink); }
.step { padding: 28px 24px 30px 0; counter-increment: step; }
.step + .step { padding-left: 24px; border-left: 1px solid var(--rule); }
.step::before { content: "0" counter(step); display: block; font: 400 52px/1 var(--serif); color: var(--accent); margin-bottom: 18px; letter-spacing: -.02em; }
.step h3 { font: 400 24px/1.15 var(--serif); margin-bottom: 8px; }
.step p { font-size: 15px; color: var(--ink-2); }
.step .kicker { margin-top: 14px; display: block; }
@media (max-width: 900px) {
  .process { grid-template-columns: 1fr 1fr; }
  .step, .step + .step { padding: 24px 18px 26px 0; border-left: 0; }
  .step:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--rule); }
}
@media (max-width: 560px) { .process { grid-template-columns: 1fr; } .step:nth-child(even) { padding-left: 0; border-left: 0; } }

.faq { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; padding: 24px 0; font: 400 clamp(21px, 2vw, 26px)/1.25 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 300 28px/1 var(--sans); color: var(--accent); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 26px; max-width: 46em; color: var(--ink-2); }

/* ---------- case study pages ---------- */
.cs-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 5vw, 64px); }
.back { font: 500 13px var(--mono); text-decoration: none; color: var(--mute); display: flex; width: fit-content; gap: 8px; margin-bottom: 36px; }
.back:hover { color: var(--accent); }
.cs-hero h1 { margin: 18px 0 22px; }
.cs-meta { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); margin-top: clamp(40px, 5vw, 64px); }
.cs-meta div { padding: 18px 18px 20px 0; border-bottom: 1px solid var(--rule); }
.cs-meta div + div { padding-left: 18px; border-left: 1px solid var(--rule); }
.cs-meta dt { font: 500 11.5px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin-bottom: 6px; }
.cs-meta dd { margin: 0; font-size: 15.5px; }
@media (max-width: 760px) {
  .cs-meta { grid-template-columns: 1fr 1fr; }
  .cs-meta div, .cs-meta div + div { padding: 16px 12px 16px 0; border-left: 0; }
  .cs-meta div:nth-child(even) { padding-left: 12px; border-left: 1px solid var(--rule); }
}
.cs-figure { margin: clamp(40px, 5vw, 72px) 0 0; }
.cs-figure .spec-body { padding: clamp(18px, 3vw, 32px); }
.cs-block { display: grid; grid-template-columns: 220px 1fr; gap: 20px 48px; padding: clamp(48px, 6vw, 80px) 0; border-top: 1px solid var(--rule); }
.cs-block h2 { font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); border-top: 2px solid var(--ink); padding-top: 12px; align-self: start; }
.cs-block .prose p { font-size: 18px; color: var(--ink-2); max-width: 40em; }
.cs-block .prose p + p { margin-top: 18px; }
.cs-block .prose p.big { font: 400 clamp(24px, 2.4vw, 32px)/1.3 var(--serif); color: var(--ink); }
.cs-block ol { margin: 0; padding: 0; list-style: none; counter-reset: c; border-top: 1px solid var(--ink); }
.cs-block ol li { counter-increment: c; display: grid; grid-template-columns: 48px 1fr; padding: 18px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.cs-block ol li::before { content: counter(c, decimal-leading-zero); font: italic 400 18px var(--serif); color: var(--accent); }
.cs-block ol li strong { color: var(--ink); font-weight: 600; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--ink); }
.pillars div { padding: 22px 22px 24px 0; }
.pillars div + div { padding-left: 22px; border-left: 1px solid var(--rule); }
.pillars h3 { font: 400 23px/1.15 var(--serif); margin-bottom: 10px; }
.pillars p { font-size: 15px; color: var(--ink-2); }
@media (max-width: 860px) {
  .cs-block { grid-template-columns: 1fr; }
  .cs-block h2 { max-width: 220px; }
  .pillars { grid-template-columns: 1fr; }
  .pillars div, .pillars div + div { padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
}

/* system flow diagram */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 0; }
.flow .node { border: 1.5px solid var(--ink); border-radius: 8px; background: #fff; padding: 16px; }
.flow .node .kicker { display: block; margin-bottom: 8px; }
.flow .node b { display: block; font: 400 22px/1.1 var(--serif); margin-bottom: 6px; }
.flow .node span { font-size: 13.5px; color: var(--ink-2); }
.flow .arrow { display: grid; place-items: center; padding: 0 10px; color: var(--accent); font-size: 22px; }
.flow-foot { margin-top: 14px; border: 1.5px dashed var(--accent); border-radius: 8px; padding: 14px 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.flow-foot b { font: 600 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.flow-foot span { font-size: 14px; color: var(--ink-2); }
@media (max-width: 760px) {
  .flow { grid-template-columns: 1fr; }
  .flow .arrow { transform: rotate(90deg); padding: 6px 0; }
}

.next { display: block; text-decoration: none; border-top: 2px solid var(--ink); padding: clamp(40px, 6vw, 72px) 0; transition: color .3s; }
.next .kicker { display: block; margin-bottom: 14px; }
.next .display { font-size: clamp(48px, 8vw, 110px); display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.next .display span:last-child { font-family: var(--sans); font-size: .5em; transition: transform .4s var(--ease); }
.next:hover { color: var(--accent); }
.next:hover .display span:last-child { transform: translateX(10px); }
.next p { color: var(--ink-2); margin-top: 14px; max-width: 40em; }

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

@media (prefers-reduced-motion: reduce) {
  .rise, .js .reveal { animation: none; opacity: 1; transform: none; transition: none; }
  .dot { animation: none; }
  .shot, .spec, .btn .arr { transition: none; }
}

/* ---------- print (for recruiters who print) ---------- */
@media print {
  body::before, .nav, .masthead, .band::after, .hero-cta, .paths { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .section { padding: 28px 0; }
  .js .reveal, .rise { opacity: 1 !important; transform: none !important; }
}

/* ---------- secondary freelance note (homepage) ---------- */
.section--tight { padding: clamp(56px, 7vw, 96px) 0; }
.side-note {
  display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: end;
  background: var(--paper-2); border: 1px solid var(--rule); border-left: 4px solid var(--accent);
  padding: clamp(24px, 3.4vw, 40px);
}
.side-note h2 { font: 400 clamp(24px, 2.4vw, 32px)/1.2 var(--serif); letter-spacing: -.01em; margin: 14px 0 10px; max-width: 26em; }
.side-note p { color: var(--ink-2); max-width: 40em; font-size: 16px; }
@media (max-width: 760px) { .side-note { grid-template-columns: 1fr; } }

/* ==========================================================================
   Motion layer — subtle, purposeful, disabled for reduced-motion users
   ========================================================================== */

/* scroll progress hairline */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 120; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* headline: words rise out of a mask */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.split .w > span { display: inline-block; transform: translateY(105%); animation: word-up 1s var(--ease) forwards; animation-delay: calc(var(--i) * 70ms + 150ms); }
@keyframes word-up { to { transform: none; } }

/* hand-drawn underline under the accent word */
.split em { position: relative; }
.split em::after {
  content: ""; position: absolute; left: 2%; right: 2%; bottom: .02em; height: .06em;
  background: var(--accent); border-radius: 2px; opacity: .85;
  transform: scaleX(0); transform-origin: 0 50%;
  animation: draw 0.9s var(--ease) forwards; animation-delay: 1.1s;
}
@keyframes draw { to { transform: scaleX(1); } }

/* rules draw in from the left */
.js .sec-num, .js .reveal.rule-draw { border-top-color: transparent; position: relative; }
.js .sec-num::before {
  content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: currentColor;
  color: var(--ink); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.1s var(--ease) .1s;
}
.band .sec-num::before { color: var(--paper); }
.js .in .sec-num::before, .js .sec-num.in::before { transform: scaleX(1); }

/* staggered children inside revealed blocks */
.js .stagger > * { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 80ms + 120ms); }
.js .in.stagger > *, .js .in .stagger > * { opacity: 1; transform: none; }

/* nav + footer link underline slide */
.nav-links a:not(.btn) { background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat; padding-bottom: 3px; transition: background-size .35s var(--ease), color .2s; }
.nav-links a:not(.btn):hover { background-size: 100% 2px; }
.nav-links a[aria-current="page"] { text-decoration: none; background-size: 100% 2px; }

/* --- interface sketches come alive when their feature enters --- */
/* ChartUPP: campaign cards settle, messages arrive in sequence */
.js .feature .cu-card, .js .cs-figure .cu-card { opacity: 0; transform: translateX(-10px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .feature .cu-card:nth-child(3), .js .cs-figure .cu-card:nth-child(3) { transition-delay: .15s; }
.js .feature .cu-card:nth-child(4), .js .cs-figure .cu-card:nth-child(4) { transition-delay: .3s; }
.js .in .cu-card, .js .cs-figure.in .cu-card { opacity: 1; transform: none; }
.js .feature .msg, .js .cs-figure .msg { opacity: 0; transform: translateY(8px) scale(.97); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js .in .msg:nth-child(1) { transition-delay: .5s; }
.js .in .msg:nth-child(2) { transition-delay: 1.3s; }
.js .in .msg:nth-child(3) { transition-delay: 2.1s; }
.js .in .msg { opacity: 1; transform: none; }
.typing::after { content: ""; width: 14px; height: 4px; background: radial-gradient(circle, var(--mute) 1.5px, transparent 2px) 0 0 / 5px 4px repeat-x; animation: dots 1.2s steps(3) infinite; }
@keyframes dots { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* DriftGuard: rows load, then the fixes highlight */
.js .feature .dg-table tbody tr, .js .cs-figure .dg-table tbody tr { opacity: 0; transition: opacity .5s var(--ease); }
.js .in .dg-table tbody tr { opacity: 1; }
.js .in .dg-table tbody tr:nth-child(2) { transition-delay: .2s; }
.js .in .dg-table tbody tr:nth-child(3) { transition-delay: .4s; }
.js .feature .dg-table ins, .js .cs-figure .dg-table ins { background-size: 0 100%; background-image: linear-gradient(#cfe5d4, #cfe5d4); background-repeat: no-repeat; background-color: transparent; transition: background-size .7s var(--ease); }
.js .in .dg-table ins { background-size: 100% 100%; }
.js .in .dg-table tr:nth-child(1) ins { transition-delay: .9s; }
.js .in .dg-table tr:nth-child(2) ins { transition-delay: 1.15s; }
.js .in .dg-table tr:nth-child(3) ins { transition-delay: 1.4s; }
.dg-btn.yes { animation: nudge 3.2s var(--ease) 2.4s infinite; }
@keyframes nudge { 0%, 86%, 100% { box-shadow: 0 0 0 0 rgba(23,22,15,0); } 92% { box-shadow: 0 0 0 4px rgba(212,67,26,.25); } }

/* SiteCheck: gauge sweeps to its score */
@property --g { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
.gauge { background: conic-gradient(var(--accent) 0 var(--g), var(--paper-2) var(--g) 100%); --g: 72%; }
.js .feature .gauge { --g: 0%; transition: --g 1.6s var(--ease) .3s; }
.js .in .gauge { --g: 72%; }
.js .feature .sc li { opacity: 0; transform: translateX(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js .in .sc li { opacity: 1; transform: none; }
.js .in .sc li:nth-child(2) { transition-delay: .25s; }
.js .in .sc li:nth-child(3) { transition-delay: .5s; }
.js .in .sc li:nth-child(4) { transition-delay: .75s; }

/* Chess: eval bar swings, highlighted move pulses */
.js .feature .evalbar i { height: 50%; transition: height 1.4s var(--ease) .4s; }
.js .in .evalbar i { height: 62%; }
.board span.hl { animation: hl 2.6s ease-in-out infinite; }
@keyframes hl { 50% { background: #f0c2b1; } }

/* hero facts: soft highlight sweep once counted */
.facts strong { background: linear-gradient(transparent 62%, var(--accent-soft) 62%) 0 0 / 0 100% no-repeat; transition: background-size .8s var(--ease); }
.facts.counted strong { background-size: 100% 100%; }

/* image frames: gentle drift on scroll (set by JS) */
.shot img { transform: translateY(var(--drift, 0)) scale(1.04); transition: transform .1s linear; will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .split .w > span, .split em::after { animation: none; transform: none; }
  .js .sec-num::before { transform: scaleX(1); transition: none; }
  .js .stagger > *, .js .feature .cu-card, .js .feature .msg, .js .cs-figure .cu-card, .js .cs-figure .msg,
  .js .feature .dg-table tbody tr, .js .cs-figure .dg-table tbody tr, .js .feature .sc li { opacity: 1; transform: none; transition: none; }
  .js .feature .dg-table ins, .js .cs-figure .dg-table ins { background-size: 100% 100%; transition: none; }
  .js .feature .gauge { --g: 72%; transition: none; }
  .js .feature .evalbar i { height: 62%; transition: none; }
  .typing::after, .dg-btn.yes, .board span.hl { animation: none; }
  .progress { display: none; }
  .shot img { transform: none; }
}
