@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("/fonts/martian-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

/* Colours taken from the photo: storm sky, the break of gold light, the maroon shirt, the sand. */
:root {
  --sand: #efe8dc;
  --sand-2: #e3dacb;
  --ink: #1f1b1a;
  --ink-2: #4a4440;
  --muted: #7f776f;
  --storm: #3b434d;
  --storm-2: #2b3139;
  --gold: #f2c65a;
  --maroon: #6c1f28;
  --orange: #ff8a1f; /* pounce's own colour, only on its codes */
  --tag: #16161a;
  --sans: "Schibsted Grotesk", ui-sans-serif, sans-serif;
  --mono: "Martian Mono", ui-monospace, monospace;
  --wrap: 1180px;
  --gutter: clamp(18px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--sand); color: var(--ink); font: 400 17.5px/1.62 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-color: currentColor; }
img { display: block; max-width: 100%; height: auto; }
kbd { font: 500 0.72em var(--mono); padding: 0.12em 0.5em; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); border-bottom-width: 2px; border-radius: 5px; }
:focus-visible { outline: 2px solid var(--maroon); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ------------------------------------------------------------ top */

.top { max-width: var(--wrap); margin: 0 auto; padding: 22px var(--gutter); display: flex; justify-content: space-between; align-items: center; }
.mark { font: 700 15px/1 var(--mono); text-decoration: none; letter-spacing: -0.02em; background: var(--ink); color: var(--sand); padding: 8px 9px 7px; border-radius: 8px; }
.top-links { display: flex; gap: 22px; font-size: 15.5px; }
.top-links a { text-decoration: none; }
.top-links a:hover { color: var(--maroon); }

/* ------------------------------------------------------------ hero: about him */

.hero { max-width: var(--wrap); margin: 0 auto; padding: clamp(16px, 4vw, 48px) var(--gutter) clamp(56px, 8vw, 96px); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
h1 { margin: 0; font-size: clamp(52px, 8.6vw, 118px); line-height: 0.92; letter-spacing: -0.045em; font-weight: 800; color: var(--ink); }
.role { margin: 18px 0 0; font-size: clamp(18px, 1.8vw, 22px); color: var(--maroon); font-weight: 600; }
.about { margin: 18px 0 30px; font-size: clamp(18px, 1.7vw, 21px); color: var(--ink-2); max-width: 32em; }

.reach { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 11px 15px; border-radius: 999px; border: 1px solid var(--sand-2); background: #f7f2e9; color: var(--ink); font: 500 15px/1 var(--sans); text-decoration: none; cursor: pointer; transition: transform 0.12s, background 0.15s, border-color 0.15s; }
.btn:hover { border-color: var(--ink); }
.btn:active, .btn.pressed { transform: translateY(1px) scale(0.98); }
.btn small { font: 500 10px/1 var(--mono); opacity: 0.6; }
.btn-main { background: var(--ink); color: var(--sand); border-color: var(--ink); font-weight: 600; }
.btn-main:hover { background: var(--maroon); border-color: var(--maroon); }
.hint { margin: 22px 0 0; font-size: 15px; color: var(--muted); }
.hint a { color: var(--ink-2); }
.hint-touch { display: none; }

.hero-photo { margin: 0; position: relative; }
.photo { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(43, 49, 57, 0.6); transform: rotate(1.2deg); transition: transform 0.4s cubic-bezier(.2, .8, .2, 1); }
.photo:hover, .photo.wave { transform: rotate(-0.6deg) scale(1.01); }
.photo img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; width: 100%; }

/* ------------------------------------------------------------ the two things he made */

.made { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding: clamp(48px, 7vw, 88px) 0; border-top: 1px solid var(--sand-2); }
.work-gitdiffer { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.work-gitdiffer .work-text { order: 2; }
.work h2 { margin: 0; font-size: clamp(36px, 4.6vw, 56px); letter-spacing: -0.035em; line-height: 1; color: var(--maroon); }
.work h2 a { text-decoration: none; }
.lede { margin: 10px 0 18px; font-size: 20px; font-weight: 600; }
.work-text p { color: var(--ink-2); margin: 0 0 14px; }
.work-text .lede { color: var(--ink); }
.hard { border-left: 3px solid var(--gold); padding-left: 16px; color: var(--ink) !important; }
.links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 15px; margin-top: 20px !important; }

/* pounce's own picture, in its own colours */
.tag { display: inline-block; font: 600 9px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 4px 2px; border-radius: 3px; background: var(--tag); color: var(--orange); border: 1px solid rgba(255, 138, 31, 0.8); }
.tag.dim { opacity: 0.22; }
.tag.on { background: var(--orange); color: var(--tag); }
.pw { position: relative; border-radius: 14px; background: #fbfaf6; border: 1px solid var(--sand-2); box-shadow: 0 28px 50px -34px rgba(43, 49, 57, 0.55); overflow: hidden; font-size: 14px; }
.pw-bar { display: flex; align-items: center; gap: 6px; padding: 11px 12px; background: #efece4; border-bottom: 1px solid var(--sand-2); }
.pw-bar b { flex: 1; text-align: center; font-weight: 600; }
.pw-body { display: grid; grid-template-columns: 40% 1fr; min-height: 280px; }
.pw-side { list-style: none; margin: 0; padding: 10px 8px; background: #f5f2ea; border-right: 1px solid var(--sand-2); }
.pw-side li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 7px; color: var(--ink-2); margin-bottom: 2px; }
.pw-side li.sel { background: var(--sand-2); }
.pw-side li.hit { outline: 2.5px solid var(--orange); outline-offset: -2px; background: rgba(255, 138, 31, 0.12); color: var(--ink); }
.pw-pane { padding: 16px 18px 76px; }
.pw-pane b { display: block; margin-bottom: 12px; }
.pw-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border: 1px solid var(--sand-2); margin-top: -1px; color: var(--ink-2); }
.pw-row:first-of-type { border-radius: 8px 8px 0 0; }
.pw-row:last-of-type { border-radius: 0 0 8px 8px; }
.pw-row i { margin-left: auto; font-style: normal; color: var(--muted); font-size: 13px; }
.pw-row .sw { width: 30px; height: 17px; border-radius: 9px; background: var(--sand-2); }
.pw-card { position: absolute; left: 50%; bottom: 16px; transform: translateX(-40%); width: 56%; display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 10px; background: #1b1b1f; color: #efede8; box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.45); }
.count { margin-left: auto; font: 600 10px/1 var(--mono); color: var(--orange); background: rgba(255, 138, 31, 0.18); padding: 4px 7px; border-radius: 99px; }
.caret { display: inline-block; width: 2px; height: 16px; background: var(--orange); animation: blink 1s steps(1) infinite; vertical-align: middle; }
@keyframes blink { 50% { opacity: 0; } }

/* gitdiffer: a terminal that runs the real command */
.term { border-radius: 14px; background: var(--storm-2); color: #e9e5dc; box-shadow: 0 28px 50px -30px rgba(43, 49, 57, 0.7); overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--storm); font: 12px var(--mono); color: #b9b3a9; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.term-out { margin: 0; padding: 16px 18px 20px; min-height: 290px; font: 12px/1.75 var(--mono); white-space: pre; overflow-x: auto; }
.term-out .p { color: var(--gold); }
.term-out .ok { color: #9fd3ae; }
.term-out .h { color: #a7a196; }
.term-out .d { color: #f2b3ad; background: rgba(179, 50, 43, 0.25); display: block; }
.term-out .a { color: #b6e3c2; background: rgba(31, 122, 61, 0.3); display: block; }
.term-out .c { display: block; color: #cfc9be; }

/* ------------------------------------------------------------ away from the keyboard */

.offline { background: var(--storm); color: #efe8dc; margin-top: clamp(24px, 4vw, 48px); }
.offline-inner { max-width: var(--wrap); margin: 0 auto; padding: clamp(56px, 8vw, 104px) var(--gutter); }
.offline h2 { margin: 0 0 28px; font-size: clamp(30px, 4vw, 48px); letter-spacing: -0.03em; color: var(--gold); }
.offline-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; max-width: 900px; }
.offline-grid p { margin: 0; font-size: 20px; line-height: 1.5; color: #d7d0c4; }
.offline-grid b { color: #fff; }

/* ------------------------------------------------------------ write to me */

.write { max-width: var(--wrap); margin: 0 auto; padding: clamp(64px, 9vw, 120px) var(--gutter) clamp(40px, 6vw, 72px); }
.write h2 { margin: 0; font-size: 18px; color: var(--muted); font-weight: 600; }
.write-mail { margin: 10px 0 24px; font-size: clamp(30px, 6vw, 76px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; word-break: break-word; }
.write-mail a { text-decoration-color: var(--gold); text-decoration-thickness: 5px; text-underline-offset: 10px; }
.write-mail a:hover { color: var(--maroon); }
.write-more { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.foot { max-width: var(--wrap); margin: 0 auto; padding: 24px var(--gutter) 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--sand-2); }
.foot p { margin: 0; }

/* ------------------------------------------------------------ pounce on this page */

.lp { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.lp-tags { position: absolute; inset: 0; }
.lp-tag { position: absolute; font: 600 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 5px 2px; border-radius: 4px; background: var(--tag); color: var(--orange); border: 1px solid rgba(255, 138, 31, 0.9); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25); }
@media (prefers-reduced-motion: no-preference) {
  .lp-tag { animation: pop 0.22s cubic-bezier(.3, 1.6, .5, 1) backwards; }
}
@keyframes pop { from { opacity: 0; transform: scale(0.5); } }
.lp-tag.dim { opacity: 0.16; }
.lp-tag.hit { background: var(--orange); color: var(--tag); }
.lp-target { outline: 3px solid var(--orange) !important; outline-offset: 4px; }
.lp-card { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); width: min(480px, calc(100% - 24px)); border-radius: 16px; background: #1b1b1f; color: #efede8; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); padding: 10px; pointer-events: auto; }
.lp-top { display: flex; align-items: center; gap: 9px; padding: 6px 8px; font-size: 16px; }
.lp-q { font-family: var(--sans); }
.ph { color: #6c6a66; margin-left: 2px; white-space: nowrap; }
[data-q]:not(:empty) ~ .ph { display: none; }
.lp-n { margin-left: auto; font: 600 11px/1 var(--mono); color: var(--orange); background: rgba(255, 138, 31, 0.18); padding: 5px 8px; border-radius: 99px; }
.pad { display: none; }

.fab { position: fixed; right: 18px; bottom: 18px; z-index: 55; width: 56px; height: 56px; border-radius: 18px; border: 0; background: var(--orange); box-shadow: 0 12px 28px -8px rgba(255, 138, 31, 0.7); display: grid; place-items: center; cursor: pointer; transition: transform 0.15s; }
.fab:active { transform: scale(0.94); }
.fab img { filter: brightness(0); opacity: 0.85; }

.toast { visibility: hidden; position: fixed; left: 50%; top: 18px; transform: translate(-50%, calc(-100% - 40px)); z-index: 70; max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 12px; background: var(--ink); color: var(--sand); font-size: 15px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3); transition: transform 0.35s cubic-bezier(.2, .9, .2, 1); pointer-events: none; }
.toast.show { visibility: visible; transform: translate(-50%, 0); }
.toast b { color: var(--gold); }

.dockbar { display: none; }

/* copy buttons say what they copy, and confirm it */
.btn-copy svg { fill: none; stroke: currentColor; stroke-width: 1.5; }
.btn-copy.done { background: var(--gold); border-color: var(--gold); color: var(--ink); }

/* ------------------------------------------------------------ data: what he does most days */

.data { max-width: var(--wrap); margin: 0 auto; padding: clamp(48px, 7vw, 88px) var(--gutter); border-top: 1px solid var(--sand-2); display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.kicker { margin: 0 0 12px; font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--maroon); }
.data h2 { margin: 0 0 18px; font-size: clamp(30px, 3.8vw, 46px); line-height: 1.04; letter-spacing: -0.035em; }
.data-text > p { color: var(--ink-2); margin: 0 0 14px; }
.facts { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 10px; }
.facts li { display: flex; align-items: baseline; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #f7f2e9; border: 1px solid var(--sand-2); }
.facts b { font-size: 28px; line-height: 1; letter-spacing: -0.03em; color: var(--maroon); min-width: 2.4em; flex: none; font-variant-numeric: tabular-nums; }
.facts span { color: var(--ink-2); font-size: 15.5px; line-height: 1.35; }
.data .help { color: var(--ink) !important; font-weight: 600; }
.data .help a { text-decoration-color: var(--gold); text-decoration-thickness: 3px; }
.stack { font: 500 12px/1.9 var(--mono); color: var(--muted) !important; }

.flow { border-radius: 16px; background: var(--storm-2); color: #e9e5dc; box-shadow: 0 28px 50px -30px rgba(43, 49, 57, 0.7); overflow: hidden; }
.flow-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--storm); font: 12px var(--mono); color: #b9b3a9; }
.flow-bar i { width: 8px; height: 8px; border-radius: 50%; background: #7fd49a; box-shadow: 0 0 0 0 rgba(127, 212, 154, 0.6); animation: live 1.6s infinite; }
.flow-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow-bar em { margin-left: auto; white-space: nowrap; font-style: normal; font-size: 10px; opacity: 0.6; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(127, 212, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 212, 154, 0); } }
.flow-svg { display: block; width: 100%; height: auto; }
.flow-svg .edge { fill: none; stroke: #4a535e; stroke-width: 1.5; stroke-dasharray: 3 5; }
.flow-svg .edge.bad { stroke: #6b3a3d; }
.flow-svg .node rect { fill: #353d47; stroke: #56606c; }
.flow-svg .node text { fill: #e9e5dc; font: 500 11px var(--mono); text-anchor: middle; dominant-baseline: central; }
.flow-svg .node.mid rect { fill: var(--gold); stroke: var(--gold); }
.flow-svg .node.mid text { fill: var(--ink); font-weight: 700; }
.flow-svg .node.sink rect { stroke: #7fd49a; }
.flow-svg .node.dlq rect { fill: #3f2a2e; stroke: #b5555b; }
.flow-svg .node.dlq text { fill: #f2b3ad; }
.flow-svg .node.blip rect { animation: blip 0.35s ease-out; }
@keyframes blip { 40% { stroke-width: 3; } }
.flow-svg .pk { fill: var(--gold); }
.flow-svg .pk.ok { fill: #7fd49a; }
.flow-svg .pk.bad { fill: #ff6b6b; }
.flow-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #3a424c; border-bottom: 1px solid #3a424c; }
.flow-stats div { padding: 10px 14px; }
.flow-stats div + div { border-left: 1px solid #3a424c; }
.flow-stats b { display: block; font: 600 17px/1.2 var(--mono); color: #fff; font-variant-numeric: tabular-nums; }
.flow-stats span { font-size: 12px; color: #a7a196; }
.flow-log { list-style: none; margin: 0; padding: 10px 14px 4px; height: 124px; overflow: hidden; font: 11px/1.9 var(--mono); color: #cfc9be; }
.flow-log li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-reduced-motion: no-preference) { .flow-log li:first-child { animation: slidein 0.3s ease-out; } }
@keyframes slidein { from { opacity: 0; transform: translateY(-6px); } }
.flow-log .op { display: inline-block; width: 7ch; font-weight: 700; }
.flow-log .ins { color: #7fd49a; }
.flow-log .upd { color: var(--gold); }
.flow-log .del { color: #f2b3ad; }
.flow-log .bad { color: #ff8f8f; }
.flow-bad { display: block; width: calc(100% - 28px); margin: 6px 14px 14px; min-height: 42px; border-radius: 10px; border: 1px dashed #b5555b; background: transparent; color: #f2b3ad; font: 600 13px var(--mono); cursor: pointer; }
.flow-bad:hover { background: rgba(181, 85, 91, 0.15); }
.flow-bad:active { transform: scale(0.98); }

/* ------------------------------------------------------------ phones */

@media (max-width: 820px) {
  .hero, .data { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: clamp(44px, 13vw, 72px); }
  .top-links { gap: 16px; }
  .hero-photo { order: -1; max-width: 420px; }
  .photo img { aspect-ratio: 4 / 3.4; object-position: 50% 28%; max-height: 46vh; }
  .photo { transform: rotate(0); }
  .work, .work-gitdiffer { grid-template-columns: minmax(0, 1fr); }
  .work-art, .work-text, .hero-text, .data-text { min-width: 0; }
  .term-out { font-size: 10px; min-height: 250px; padding: 14px; }
  .pw { font-size: 13px; }
  .pw-body { min-height: 250px; }
  .pw-pane { padding: 12px 10px 70px; }
  .pw-row { padding: 9px 8px; gap: 6px; }
  .pw-card { width: 70%; transform: translateX(-50%); }
  .btn { padding: 11px 13px; }
  .work-gitdiffer .work-text { order: 0; }
  .offline-grid { grid-template-columns: 1fr; }
  .top-links a[href="#made"] { display: none; }
}
@media (hover: none), (pointer: coarse) {
  .hint-keys { display: none; }
  .hint-touch { display: block; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .dockbar { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--sand) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--sand-2); }
  .dockbar a, .dockbar button { display: grid; place-items: center; min-height: 48px; border-radius: 12px; background: var(--ink); color: var(--sand); font: 600 15px var(--sans); text-decoration: none; border: 0; }
  .dockbar a + a { background: var(--maroon); }
  .dockbar button { background: #f7f2e9; color: var(--ink); border: 1px solid var(--sand-2); }
  .fab { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .lp-card { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .pad { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 8px 4px 4px; }
  .pad button { min-height: 44px; border-radius: 9px; border: 0; background: #2c2c33; color: #efede8; font: 600 16px var(--mono); text-transform: uppercase; }
  .pad button.wide { grid-column: span 2; font-size: 12px; text-transform: none; font-family: var(--sans); }
  .pad button:active { background: var(--orange); color: var(--tag); }
}
@media (hover: hover) and (pointer: fine) { .fab { display: none; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } .photo, .toast, .btn { transition: none; } }
