/* Editorial data-story layout: warm paper, one heavy grotesk, a color per project.
   The dot canvas is fixed behind the page; dots-engine.js places the picture in the right
   column on wide screens and in a band under the nav on phones. */
:root {
  --paper: #f3eee4; --panel: #fbf8f2; --ink: #161616; --dim: #5a564e; --line: #dcd3c3;
  --red: #b3001f; --blue: #1f6f99; --gold: #8a5800; --green: #2a6b43; --hue: var(--ink);
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; --nav-h: 56px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 18px/1.55 var(--sans); overflow-wrap: anywhere; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--hue); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--panel); padding: 8px 12px; z-index: 30; }
h1, h2, h3 { margin: 0; line-height: 1.05; letter-spacing: -0.02em; }
.dim { color: var(--dim); }
.small { font-size: 14px; }
main, .foot { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }

/* Dot canvas and its one-line key */
#dots { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
html:not(.js) #dots { display: none; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; height: var(--nav-h); display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 0 clamp(16px, 4vw, 48px); background: var(--paper); border-bottom: 2px solid var(--ink); }
.me { text-decoration: none; font-weight: 900; letter-spacing: -0.01em; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav nav { display: flex; gap: 22px; font-size: 15px; font-weight: 500; }
.nav nav a { text-decoration: none; white-space: nowrap; }
@media (max-width: 400px) { .me .sur { display: none; } }
.nav nav a.on { text-decoration: underline; text-decoration-thickness: 2px; }
@media (max-width: 640px) { .nav nav { gap: 12px; font-size: 14px; } .nav nav a[target] { display: none; } }

/* Hero: the name sits on the scattered field */
.hero { min-height: calc(100svh - var(--nav-h)); display: flex; flex-direction: column; justify-content: flex-end; padding: 48px 0 56px; }
.hero-role { font-size: clamp(18px, 2vw, 22px); font-weight: 700; margin: 0 0 12px; }
/* 10vw keeps "Jammalamadaka" on one line from 320px up; 128px is the widest that fits the 1144px column. */
.hero h1 { overflow-wrap: normal; font-size: clamp(28px, 10vw, 128px); font-weight: 900; line-height: .9; letter-spacing: -0.045em; }
.intro { max-width: 640px; font-size: clamp(18px, 1.6vw, 21px); margin: 28px 0 40px; background: color-mix(in srgb, var(--paper) 82%, transparent); }
.stats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.stats li { padding: 14px 16px 0 0; background: color-mix(in srgb, var(--paper) 82%, transparent); }
.stats b { display: block; font-size: clamp(28px, 3.4vw, 46px); font-weight: 900; letter-spacing: -0.03em; line-height: 1.05; }
.stats span { display: block; font-size: 15px; color: var(--dim); margin-top: 4px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; } }

/* Story: text column on the left, dots on the right */
.work { padding-top: 96px; }
.sec-title { font-size: clamp(34px, 5vw, 64px); font-weight: 900; max-width: 900px; }
.sec-sub { font-size: 20px; color: var(--dim); margin: 14px 0 0; max-width: 640px; }
.story, .ch-head, .step { width: min(44vw, 540px); }
.chapter { padding-top: 22vh; }
.ch-head { border-top: 8px solid var(--hue); padding-top: 18px; }
.ch-org { margin: 0 0 8px; font-weight: 700; color: var(--hue); }
.ch-head h2 { font-size: clamp(30px, 3.6vw, 48px); font-weight: 900; }
.ch-head h2 a { text-decoration: none; }
.step { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; }
.step > p { font-size: clamp(20px, 1.9vw, 25px); line-height: 1.4; margin: 0; }
.dots-live .step > p { color: var(--dim); transition: color .4s; }
.dots-live .step.on > p, .dots-live .step:focus-within > p { color: var(--ink); }
html:not(.js) .step { min-height: 0; padding: 24px 0; }
.num { font-size: 1.7em; font-weight: 900; color: var(--hue); letter-spacing: -0.03em; line-height: 1; }
.step b { font-weight: 800; }
.step .win { margin-top: 22px; }
.ch-more { margin: 0 0 8vh; font-weight: 700; }
@media (max-width: 899px) {
  .story, .ch-head, .step { width: 100%; }
  .chapter { padding-top: 12vh; }
  .ch-head { background: var(--paper); padding-bottom: 12px; }
  .step { min-height: 92svh; justify-content: flex-end; padding: 0 0 8svh; }
  .step > p, .step .win, .step .try { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
  .step > p { font-size: 19px; }
  .dots-live .step > p { color: var(--ink); }
}

/* Windows around the work */
.win { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.step .win { padding: 0 !important; }
.win-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #eee7da; }
.win-bar i { width: 9px; height: 9px; border-radius: 50%; background: #cfc5b3; }
.win-bar span { margin-left: 8px; font: 12px var(--mono); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-body { padding: 16px 18px; }
.win.shot .win-body { padding: 0; } .win img { display: block; width: 100%; height: auto; }
.stage { max-width: 760px; margin: 0 auto; }
.chart { width: 100%; max-width: 560px; height: auto; display: block; }
.chart .t { font: 500 13px var(--sans); fill: var(--dim); } .chart .v { font: 700 12px var(--mono); fill: var(--ink); }
.bar { fill: var(--hue); transform-box: fill-box; transform-origin: left; } .bar.alt { fill: #9c958a; }
.js .bar { transform: scaleX(0); transition: transform .8s ease-out; } .js .in .bar { transform: scaleX(1); }
.cap { margin: 10px 0 0; font-size: 13px; color: var(--dim); }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--dim); margin: 0 0 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; background: var(--hue); } .legend i.alt { background: #9c958a; }
pre { margin: 0; font: 13px/1.65 var(--mono); overflow-x: auto; white-space: pre; }
pre b { color: var(--blue); font-weight: 700; } pre em { color: var(--green); font-style: normal; } pre strong { color: var(--red); }
.nb { font: 12px var(--mono); color: var(--dim); margin: 0 0 10px; } .nb span { color: var(--blue); }
.log .ln { display: flex; justify-content: space-between; gap: 12px; font: 13px/1.85 var(--mono); }
.log .ln b { color: var(--green); } .log .cmd { color: var(--blue); }
.log .halt { color: var(--red); font-style: normal; } .log .pass { color: var(--green); font-style: normal; }
.log:not(.passing) .pass, .log.passing .halt { display: none; }
.scale { position: relative; height: 6px; margin: 40px 0 62px; background: var(--line); }
.mk { position: absolute; top: -6px; width: 2px; height: 18px; background: var(--ink); transition: left .3s; }
.mk b { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); font: 700 11px var(--mono); white-space: nowrap; }
.mk.alt { background: var(--gold); } .mk.alt b { color: var(--gold); bottom: auto; top: 22px; }
.mk.you { background: var(--blue); } .mk.you b { color: var(--blue); bottom: auto; top: 40px; }
.ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); margin: 0; }
.res { width: 100%; border-collapse: collapse; font: 13px var(--mono); }
.res th { text-align: left; color: var(--dim); font-weight: 400; border-bottom: 1px solid var(--line); padding: 6px 0; }
.res td { padding: 6px 0; border-bottom: 1px solid var(--line); } .res td + td, .res th + th { text-align: right; }
.res .hi td { font-weight: 700; color: var(--green); }
/* Controls */
html:not(.js) .try { display: none; }
.try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; }
.step > .try { border-top: 0; }
.try.col { flex-direction: column; align-items: stretch; } .try .row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.try button { font: 600 14px var(--sans); color: var(--ink); background: var(--panel); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.try button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.try input[type="range"] { accent-color: var(--ink); flex: 1; min-width: 120px; }
.try b, .try output { font-family: var(--mono); }
@media (max-width: 600px) { .chart .t, .chart .v { font-size: 14px; } pre { font-size: 11px; } .log .ln { font-size: 11px; } }

/* Other projects */
.links { display: flex; gap: 16px; margin-top: 8px !important; font-weight: 700; }

/* About */
.about { padding: 96px 0 72px; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 56px; margin-top: 32px; }
@media (max-width: 860px) { .about-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.bio p { font-size: 20px; margin: 0 0 16px; }
.about h3 { font-size: 22px; font-weight: 900; margin: 32px 0 10px; } .about-grid h3:first-child { margin-top: 0; }
.xp { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.xp li { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.xp .when { color: var(--dim); font-weight: 500; } .xp b { font-weight: 800; } .xp small { display: block; color: var(--dim); font-size: 14px; }
@media (max-width: 520px) { .xp li { grid-template-columns: minmax(0, 1fr); gap: 0; } }
.tools { font-size: 16px; margin: 0; } ul.tools { padding-left: 20px; }

/* Case study pages */
.cs { padding: 32px 0 72px; max-width: 860px; margin: 0 auto; }
.back { font-weight: 700; }
.kicker { font-weight: 700; color: var(--dim); margin: 0 0 10px; }
.cs-head { padding: 36px 0 32px; border-bottom: 2px solid var(--ink); margin-bottom: 36px; }
.cs-head h1 { font-size: clamp(36px, 6vw, 72px); font-weight: 900; letter-spacing: -0.035em; margin-bottom: 14px; }
.cs-head .dim { font-size: 20px; margin: 0; }
.cs-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; margin-top: 44px; }
@media (max-width: 760px) { .cs-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.meta { margin: 0; font-size: 15px; } .meta dt { color: var(--dim); font-weight: 700; margin-top: 16px; } .meta dt:first-child { margin-top: 0; } .meta dd { margin: 2px 0 0; }
.cs-body p { margin: 0 0 16px; font-size: 18px; }
.h-find { font-size: 26px; font-weight: 900; margin: 32px 0 10px; }
.figs { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 16px; border-top: 2px solid var(--ink); }
.figs th, .figs td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.figs th { color: var(--dim); } .figs td { text-align: right; font-weight: 800; }
.next { margin-top: 56px; padding-top: 20px; border-top: 2px solid var(--ink); font-size: 20px; font-weight: 700; }

.foot { border-top: 2px solid var(--ink); padding-top: 18px; padding-bottom: 44px; color: var(--dim); font-size: 15px; }
.foot p { margin: 0 0 6px; }
main:has(.cs) + .foot { max-width: 860px; }

.js .reveal { opacity: 0; transition: opacity .6s; } .js .reveal.in { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .bar { opacity: 1; transform: none; transition: none; }
}

/* Recruiter lens: lane tabs, project cards, and the map of where each project sits */
.jump { margin: 18px 0 0; font-size: 18px; font-weight: 500; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.jump a { font-weight: 800; color: var(--hue); text-decoration-thickness: 2px; }
.lens { padding: 96px 0 48px; position: relative; z-index: 2; background: var(--paper); box-shadow: 0 0 0 100vmax var(--paper); clip-path: inset(0 -100vmax); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 20px; border-bottom: 2px solid var(--ink); }
html:not(.js) .tabs { display: none; }
.tabs [role="tab"] { font: 700 17px/1 var(--sans); padding: 12px 16px; background: var(--panel); color: var(--ink); border: 2px solid var(--line);
  border-bottom: 0; border-radius: 6px 6px 0 0; cursor: pointer; --hue: var(--ink); transition: background .2s, color .2s; }
.tabs [role="tab"] small { font-weight: 500; color: var(--dim); margin-left: 4px; }
.tabs [role="tab"]:hover { border-color: var(--hue); }
.tabs [role="tab"][aria-selected="true"] { background: var(--hue); color: var(--paper); border-color: var(--hue); }
.tabs [role="tab"][aria-selected="true"] small { color: var(--paper); }
.lane-intro { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; margin: 8px 0 28px; }
.lane-intro[hidden], .pcard[hidden] { display: none; }
.lane-pitch { font-size: 22px; font-weight: 500; margin: 0; }
.lane-skills, .p-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-content: start; }
.lane-skills li { font-size: 15px; padding: 5px 10px; border: 1px solid var(--ink); border-radius: 99px; background: var(--panel); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 20px; }
.pcard { background: var(--panel); border-top: 8px solid var(--hue); padding: 20px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .2s; }
.pcard:hover { transform: translateY(-3px); }
.pcard:target { outline: 3px solid var(--hue); outline-offset: 3px; }
.pcard.enter { animation: card-in .35s ease-out backwards; animation-delay: var(--delay, 0ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.pcard img { width: 100%; height: auto; border: 1px solid var(--line); }
.pcard { scroll-margin-top: calc(var(--nav-h) + 16px); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.p-org { margin: 0; font-size: 14px; color: var(--dim); font-weight: 500; }
.pcard h3 { font-size: 24px; font-weight: 900; } .pcard h3 a { text-decoration: none; }
.p-metric { margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.p-metric b { font-size: 34px; font-weight: 900; color: var(--hue); letter-spacing: -0.02em; line-height: 1; }
.p-metric span { font-size: 15px; color: var(--dim); }
.p-line { margin: 0; font-size: 16px; }
.p-tags li { font-size: 13px; padding: 3px 8px; background: var(--paper); border-radius: 4px; }
.p-tags .lane-tag { background: var(--hue); color: var(--paper); font-weight: 700; }
.pcard .links { margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 14px; font-weight: 700; font-size: 15px; }
.pmap { margin-top: 40px; background: var(--panel); padding: 16px 20px; }
.pmap summary { font-weight: 800; font-size: 20px; cursor: pointer; }
.pmap-wrap { overflow-x: auto; margin-top: 12px; }
.pmap table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; }
.pmap th, .pmap td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: center; }
.pmap tbody th { text-align: left; font-weight: 500; } .pmap tbody th a { text-decoration: none; }
.pmap thead th:first-child { text-align: left; }
.pmap [data-col].on { background: var(--paper); font-weight: 800; }
.pmap tr { transition: opacity .2s; } .pmap tr.dim { opacity: .3; }
.pmap .dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--hue); }
@media (max-width: 760px) { .lane-intro { grid-template-columns: minmax(0, 1fr); } .tabs [role="tab"] { font-size: 15px; padding: 10px 12px; } }
@media (prefers-reduced-motion: reduce) { .pcard.enter { animation: none; } .pcard:hover { transform: none; } }
