@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* Cool paper and slate for the record; one deep water blue for links, the main button and the closing band. */
:root {
  --field: #14478a;
  --field-deep: #0f3970;
  --on-field: #ffffff;
  --on-field-soft: #c9ddf3;
  --paper: #f4f6f8;
  --ink: #15212e;
  --body: #2c3a48;
  --slate: #56616c;
  --rule: #d6dce3;
  --link: #14478a;

  --grotesk: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;

  --gutter: clamp(16px, 5vw, 64px);
  --rail: 14rem;
  --band-gap: clamp(1.5rem, 5vw, 5rem);

  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --field: #123f7b;
    --field-deep: #0c2f5c;
    --paper: #0e1823;
    --ink: #e9eef4;
    --body: #c3cdd8;
    --slate: #93a0ae;
    --rule: #22344a;
    --link: #9cc3f2;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 1.1em; }
h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--grotesk); text-wrap: balance; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 4px; border-radius: 2px; }
.field :focus-visible { outline-color: var(--on-field); }

.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  padding: 0.75rem 1.25rem; background: var(--paper); color: var(--ink);
  font-family: var(--grotesk); font-weight: 600;
}
.skip:focus { top: 1rem; }

/* The blue field: closing band only */
.field { background: var(--field); color: var(--on-field-soft); }
.field h1, .field h2 { color: var(--on-field); }
.field a { color: var(--on-field); }

.nav {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.25rem 1.75rem;
  padding-block: 1.5rem;
  font-family: var(--grotesk); font-size: 0.9375rem; font-weight: 500;
}
.nav a { color: var(--ink); text-decoration: none; padding-block: 0.5rem; }
.nav a:hover { color: var(--link); text-decoration: underline; text-decoration-thickness: 2px; }

.hero-copy {
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--rule);
}
.name {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.role {
  color: var(--ink);
  font-family: var(--grotesk);
  font-size: clamp(1.1875rem, 1.8vw, 1.375rem);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  text-wrap: balance;
}
.intro { max-width: 36em; font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.55; margin-bottom: 2rem; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.75rem; margin: 0; font-family: var(--grotesk); }
.button {
  display: inline-flex; align-items: center; min-height: 3rem;
  padding: 0.75rem 1.4rem;
  background: var(--field); color: #fff !important;
  border-radius: 4px;
  font-size: 1rem; font-weight: 650; text-decoration: none;
}
.button:hover { background: var(--field-deep); }
.field .button { background: var(--on-field); color: var(--field) !important; }
.field .button:hover { background: var(--on-field-soft); }
.quiet-link { font-size: 1rem; font-weight: 500; padding-block: 0.6rem; }

/* Paper bands */
.band {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: var(--band-gap);
  padding-block: clamp(3.5rem, 8vw, 7rem);
}
.band + .band { border-top: 1px solid var(--rule); }
.band > h2 {
  font-size: clamp(1.5rem, 2.2vw, 1.875rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.05;
  align-self: start;
  position: sticky; top: 1.5rem;
}
.band-body { max-width: 50rem; }

.lead { color: var(--ink); font-size: clamp(1.25rem, 1.9vw, 1.5rem); line-height: 1.45; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); max-width: 32em; }
.prose { max-width: 36em; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }

.case {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 2rem;
  border-top: 1px solid var(--rule);
}
.case:last-child { padding-bottom: 0; }
.case-meta, .years {
  margin: 0;
  padding-top: 0.3rem;
  color: var(--slate);
  font-family: var(--grotesk);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
}
.case h3, .job h3, .education h3 { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.015em; line-height: 1.2; margin-bottom: 0.75rem; }
.case-body > :last-child, .job-body > :last-child { margin-bottom: 0; }
.source { font-family: var(--grotesk); font-size: 0.9375rem; font-weight: 500; overflow-wrap: anywhere; }

/* Experience */
.timeline { list-style: none; margin: 0; padding: 0; }
.job {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 2.25rem;
  border-top: 1px solid var(--rule);
}
.job:first-child { border-top: 0; padding-top: 0; }
.years { color: var(--ink); font-weight: 600; }

.roles { list-style: none; margin: 0 0 1.1rem; padding: 0; font-family: var(--grotesk); font-size: 1rem; line-height: 1.35; }
.roles li, .stack dt {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0.15rem 1.5rem;
  padding-block: 0.35rem;
}
.roles li > span:first-child, .stack dt > span:first-child { color: var(--ink); font-weight: 550; }
.role-years { color: var(--slate); text-align: right; }

.points { margin: 0; padding-left: 1.1em; }
.points li { margin-bottom: 0.5em; padding-left: 0.2em; }
.points li::marker { color: var(--slate); }

.stack { margin: 1.25rem 0 0; }
.stack > div { padding-block: 1rem; border-top: 1px dotted var(--rule); }
.stack > div:first-child { border-top: 0; padding-top: 0; }
.stack dt { font-family: var(--grotesk); font-size: 1rem; line-height: 1.35; padding-block: 0 0.35rem; }
.stack dd { margin: 0; }

.education { margin-top: 2.25rem; padding-top: 2.25rem; padding-left: calc(7rem + 1.5rem); border-top: 1px solid var(--rule); }
.education .roles { margin: 0; }

/* Patents */
.patents { width: 100%; border-collapse: collapse; }
.patents th {
  text-align: left; padding: 0 1rem 0.75rem 0;
  color: var(--slate); font-family: var(--grotesk); font-size: 0.875rem; font-weight: 500;
  border-bottom: 1px solid var(--rule);
}
.patents td { padding: 0.9rem 1rem 0.9rem 0; vertical-align: baseline; border-bottom: 1px solid var(--rule); line-height: 1.4; }
.patents td:first-child { white-space: nowrap; font-family: var(--grotesk); font-size: 0.9375rem; font-weight: 600; }
.patents td:last-child, .patents th:last-child { text-align: right; padding-right: 0; white-space: nowrap; color: var(--slate); font-family: var(--grotesk); font-size: 0.9375rem; }
.patents td:nth-child(2) { color: var(--ink); }

/* Closing */
.closing { padding-top: clamp(3.5rem, 8vw, 6rem); }
.closing-grid { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem) var(--band-gap); }
.closing-grid > div { grid-column: 2; }
.closing h2 { font-size: clamp(1.5rem, 2.2vw, 1.875rem); font-weight: 650; letter-spacing: -0.02em; line-height: 1.05; }
.closing-grid p:not(.actions) { max-width: 32em; font-size: clamp(1.1875rem, 1.6vw, 1.3125rem); line-height: 1.45; color: var(--on-field); margin-bottom: 2rem; }
.closing-grid > div { max-width: 50rem; }
.colophon {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: clamp(4rem, 8vw, 6rem); padding-block: 1.5rem 2rem;
  border-top: 1px solid rgb(255 255 255 / 0.22);
  font-family: var(--grotesk); font-size: 0.875rem;
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media (max-width: 1000px) {
  :root { --rail: 1fr; }
  .band, .closing-grid { grid-template-columns: 1fr; gap: 2rem; }
  .band > h2 { position: static; }
  .closing-grid > div { grid-column: 1; }
}
@media (max-width: 760px) {
  body { font-size: 1.125rem; }
  .nav { justify-content: space-between; gap: 0 0.75rem; padding-block: 0.75rem; font-size: 0.875rem; }
  .nav a { padding-block: 0.75rem; }
  .hero-copy { padding-block: 2rem 3rem; }
  .case, .job { grid-template-columns: 1fr; gap: 0.5rem; }
  .education { padding-left: 0; }
  .roles li, .stack dt { grid-template-columns: 1fr; }
  .role-years { text-align: left; }
  .patents thead { display: none; }
  .patents tr { display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 1rem; padding-block: 0.9rem; border-bottom: 1px solid var(--rule); }
  .patents td { padding: 0; border: 0; }
  .patents td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .patents td:last-child { grid-row: 1; grid-column: 2; }
  .colophon { flex-direction: column; }
}
