@font-face {
  font-family: "Schibsted";
  src: url("fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted";
  src: url("fonts/schibsted-grotesk-latin-wght-italic.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #f3f4f5;
  --surface: #fbfbfc;
  --ink: #15171b;
  --ink-2: #3d424b;
  --muted: #5d636d;
  --line: #d9dce1;
  --line-soft: #e6e8eb;
  --accent: #0f6b55;
  --accent-ink: #f3f4f5;
  --accent-soft: #dcebe5;
  --shadow: 0 1px 0 rgba(21, 23, 27, .04), 0 12px 32px -18px rgba(21, 40, 34, .28);
  --sans: "Schibsted", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 6px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121416;
    --surface: #181b1e;
    --ink: #e9ebee;
    --ink-2: #c3c8cf;
    --muted: #979ea8;
    --line: #2b3035;
    --line-soft: #23272b;
    --accent: #5fc9a6;
    --accent-ink: #0f1a16;
    --accent-soft: #1b2e28;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 16px 36px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121416;
  --surface: #181b1e;
  --ink: #e9ebee;
  --ink-2: #c3c8cf;
  --muted: #979ea8;
  --line: #2b3035;
  --line-soft: #23272b;
  --accent: #5fc9a6;
  --accent-ink: #0f1a16;
  --accent-soft: #1b2e28;
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 16px 36px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: var(--radius); z-index: 30; }
.skip:focus { left: 8px; }
.mono { font-family: var(--mono); }

/* Top bar */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { font-weight: 700; text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--accent); }
.tools { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.chip-btn {
  font: 500 13px/1 var(--mono); color: var(--ink-2); background: transparent;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; cursor: pointer; text-decoration: none;
  transition: border-color .2s ease, color .2s ease, transform .1s ease;
}
.chip-btn:hover { border-color: var(--ink-2); color: var(--ink); }
.chip-btn:active { transform: translateY(1px); }
@media (max-width: 860px) { .nav { display: none; } .tools { margin-left: auto; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font: 600 15px/1 var(--sans); text-decoration: none; padding: 13px 18px; border-radius: var(--radius);
  border: 1px solid var(--ink); transition: background .2s ease, color .2s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

/* Hero */
.hero { padding: clamp(56px, 9vw, 104px) 0 clamp(56px, 8vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: end; }
.hero h1 { font-size: clamp(44px, 7.4vw, 92px); letter-spacing: -0.035em; line-height: .98; }
.hero .role { font-size: clamp(20px, 2.2vw, 26px); color: var(--ink-2); margin: 22px 0 0; max-width: 30ch; line-height: 1.35; font-weight: 450; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.now { border-left: 2px solid var(--accent); padding: 4px 0 4px 20px; font-size: 15px; color: var(--ink-2); }
.now dt { font: 500 12px/1.4 var(--mono); color: var(--muted); letter-spacing: .02em; }
.now dd { margin: 2px 0 14px; }
.now dd:last-child { margin-bottom: 0; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
}

/* Sections with a sticky title column */
.sec { border-top: 1px solid var(--line); padding: clamp(56px, 8vw, 104px) 0; }
.sec > .wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); }
.sec-title { position: sticky; top: 96px; align-self: start; font-size: clamp(26px, 2.6vw, 32px); }
.sec-body { min-width: 0; }
@media (max-width: 860px) {
  .sec > .wrap { grid-template-columns: 1fr; gap: 20px; }
  .sec-title { position: static; }
}
.lead { font-size: clamp(20px, 2.1vw, 25px); line-height: 1.42; color: var(--ink); max-width: 36ch; letter-spacing: -0.01em; margin-bottom: 1.1em; }
.prose { max-width: 66ch; color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 650; }

/* Profile facts */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin: 40px 0 0; }
.facts > div { padding: 18px 0; border-top: 1px solid var(--line-soft); }
.facts dt { font: 500 12.5px/1.4 var(--mono); color: var(--muted); margin-bottom: 6px; }
.facts dd { margin: 0; font-size: 16px; color: var(--ink-2); }
.facts dd b { color: var(--ink); font-weight: 650; }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr; } }

/* Story */
.chapter { margin-top: clamp(48px, 6vw, 72px); }
.chapter h3 { font-size: clamp(22px, 2.2vw, 27px); margin-bottom: 16px; }
.decisions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; margin-top: 8px; counter-reset: d; }
.decisions li { list-style: none; padding-left: 0; }
.decisions { padding: 0; }
.decisions h4 { margin: 0 0 6px; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.decisions p { margin: 0; color: var(--ink-2); font-size: 16px; }
@media (max-width: 640px) { .decisions { grid-template-columns: 1fr; } }

.timeline { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--line); }
.timeline li { position: relative; padding: 28px 18px 0 0; }
.timeline li::before { content: ""; position: absolute; top: 1px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink-2); }
.timeline li.back::before { border-color: var(--muted); border-style: dashed; }
.timeline li.here::before { background: var(--accent); border-color: var(--accent); }
.timeline time { font: 500 13px/1.3 var(--mono); color: var(--muted); display: block; }
.timeline b { display: block; font-size: 17px; margin: 6px 0 4px; letter-spacing: -0.01em; }
.timeline span { display: block; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 860px) {
  .timeline { grid-template-columns: 1fr; }
  .timeline::before { left: 6px; right: auto; top: 6px; bottom: 6px; width: 2px; height: auto; }
  .timeline li { padding: 0 0 22px 32px; }
  .timeline li::before { top: 4px; }
  .timeline b { margin-top: 2px; }
}

.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; margin-top: 8px; }
.figures > div { border-top: 1px solid var(--line); padding: 18px 0 26px; }
.figures .n { font: 500 clamp(24px, 2.6vw, 32px)/1.15 var(--mono); letter-spacing: -0.03em; color: var(--ink); }
.figures .n .to { color: var(--accent); }
.figures .n .from { color: var(--muted); }
.figures p { margin: 8px 0 0; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.figures .first { grid-column: span 2; }
.figures .first .n { font-size: clamp(34px, 4.4vw, 54px); }
@media (max-width: 860px) { .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .figures { grid-template-columns: 1fr; } .figures .first { grid-column: auto; } }

.note { font-size: 14px; color: var(--muted); margin-top: 40px; max-width: 70ch; }

/* Projects */
.status { display: inline-flex; align-items: center; gap: 8px; font: 500 12.5px/1 var(--mono); color: var(--ink-2); padding: 6px 9px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.status i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.status.live i { background: var(--accent); }
.status.part i { background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); border: 1.5px solid var(--accent); width: 9px; height: 9px; }
.status.plan i { border: 1.5px dashed var(--muted); width: 9px; height: 9px; }

.proj { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.proj + .proj, .proj + .jarvis { margin-top: clamp(56px, 7vw, 88px); }
.proj.flip .shot { order: 2; }
.proj h3, .pair h3 { font-size: clamp(22px, 2.3vw, 28px); margin: 14px 0 12px; }
.proj p, .pair p { color: var(--ink-2); font-size: 16px; }
.shot { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.shot img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.tags { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0 18px; padding: 0; list-style: none; font: 500 13px/1.4 var(--mono); color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 10px 20px; font-weight: 600; font-size: 15px; }
.links a { text-decoration-thickness: 1.5px; }
.private { font: 500 13px/1.4 var(--mono); color: var(--muted); }
@media (max-width: 860px) {
  .proj { grid-template-columns: 1fr; }
  .proj.flip .shot { order: 0; }
}

.jarvis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(24px, 4vw, 56px); align-items: start; padding: clamp(24px, 3vw, 36px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.jarvis .big { font: 500 clamp(56px, 8vw, 96px)/1 var(--mono); letter-spacing: -0.05em; color: var(--ink); }
.jarvis .big-cap { font-size: 15px; color: var(--ink-2); margin-top: 12px; max-width: 30ch; }
@media (max-width: 860px) { .jarvis { grid-template-columns: 1fr; } }

.wip-head { margin-top: clamp(64px, 8vw, 96px); font-size: clamp(20px, 2vw, 24px); color: var(--ink); }
.wip-sub { color: var(--ink-2); max-width: 60ch; margin-top: 10px; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); margin-top: 28px; }
.pair > article { padding-top: 22px; border-top: 2px solid var(--ink); }
.pair > article.blocked { border-top-style: dashed; border-top-color: var(--muted); }
@media (max-width: 860px) { .pair { grid-template-columns: 1fr; } }

/* Flow diagrams */
.flow { margin: 22px 0 8px; display: grid; gap: 10px; font-size: 14.5px; }
.flow .box { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 10px 12px; color: var(--ink-2); line-height: 1.4; }
.flow .box b { color: var(--ink); display: block; font-size: 15px; }
.flow .box.key { border-color: var(--accent); background: var(--accent-soft); }
.flow .arrow { font: 500 13px/1 var(--mono); color: var(--muted); padding-left: 12px; }
.flow .fan { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.flow .fan .box { text-align: center; font: 500 14px/1.2 var(--mono); padding: 10px 4px; color: var(--ink); }
.flow .box.dashed { border-style: dashed; }

/* Smaller work */
.small h3 { font-size: clamp(20px, 2vw, 24px); margin-bottom: 8px; }
.small-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 36px; margin-top: 18px; }
.small-list h4 { margin: 0 0 4px; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.small-list .where { font: 500 12.5px/1.4 var(--mono); color: var(--muted); margin-bottom: 8px; }
.small-list p { font-size: 15px; color: var(--ink-2); margin: 0 0 8px; }
@media (max-width: 860px) { .small-list { grid-template-columns: 1fr; } }

/* Contact */
.contact { border-top: 1px solid var(--line); padding: clamp(72px, 10vw, 128px) 0 clamp(48px, 6vw, 72px); }
.contact h2 { font-size: clamp(34px, 5.4vw, 64px); letter-spacing: -0.03em; max-width: 16ch; }
.contact p { color: var(--ink-2); font-size: 18px; max-width: 52ch; margin-top: 20px; }
.contact .mail { display: inline-block; margin-top: 18px; font: 500 clamp(18px, 2.4vw, 26px)/1.3 var(--mono); color: var(--ink); text-decoration-thickness: 2px; word-break: break-all; }
.contact .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
footer { border-top: 1px solid var(--line); padding: 24px 0 40px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* Reveal on scroll */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1); }
  .js [data-reveal].in { opacity: 1; transform: none; }
  .js .hero [data-reveal] { transition-delay: calc(var(--d, 0) * 90ms); }
}

.nw { white-space: nowrap; }
.figures .n .arr { color: var(--muted); margin: 0 .3em; font-size: .7em; vertical-align: .12em; }
.jarvis h3 { font-size: clamp(22px, 2.3vw, 28px); margin: 14px 0 12px; }
.jarvis p { color: var(--ink-2); font-size: 16px; }
.jarvis .tags { margin-bottom: 10px; }
@media (max-width: 420px) {
  .brand .mid { display: none; }
  .top .wrap { gap: 12px; }
  .tools { gap: 6px; }
}
