/* Self-hosted fonts (SIL Open Font License, see assets/fonts) */
@font-face {
  font-family: "Schibsted Grotesk"; font-style: normal; font-display: swap; font-weight: 400 900;
  src: url("/assets/fonts/schibsted-grotesk.woff2") format("woff2-variations"), url("/assets/fonts/schibsted-grotesk.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("/assets/fonts/newsreader.woff2") format("woff2-variations"), url("/assets/fonts/newsreader.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader"; font-style: italic; font-display: swap; font-weight: 200 800;
  src: url("/assets/fonts/newsreader-italic.woff2") format("woff2-variations"), url("/assets/fonts/newsreader-italic.woff2") format("woff2");
}

/* IdeationMax — design tokens */
:root {
  --fog: #eceee9;        /* page background */
  --paper: #f7f8f4;      /* raised surfaces */
  --ink: #172420;        /* primary text, dark band */
  --ink-2: #44524c;      /* secondary text */
  --line: #cdd2c8;       /* hairlines */
  --moss: #1f322b;       /* dark band surface */
  --moss-2: #2b4239;     /* dark band raised */
  --brass: #b07a22;      /* brand accent (fills, rules) */
  --brass-text: #865a12; /* accent as text on light */
  --brass-light: #e0ad4f;/* accent on dark */
  --on-dark: #e9ece6;
  --on-dark-2: #a9b5ae;

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

  /* modular scale, ratio 1.25 from 17px */
  --s-1: 0.85rem;
  --s0: 1.0625rem;
  --s1: 1.33rem;
  --s2: 1.66rem;
  --s3: 2.07rem;
  --s4: clamp(2.2rem, 4vw, 2.6rem);
  --s5: clamp(2.6rem, 6.4vw, 4.9rem);

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
}

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

body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--s0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
cite { font-style: italic; }

:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--on-dark); padding: 10px 14px; border-radius: var(--radius);
}
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--fog) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.wordmark {
  font-weight: 800; font-size: 1.3rem; letter-spacing: -0.03em; text-decoration: none; color: var(--ink);
}
.wordmark span { color: var(--brass); }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--ink-2);
  padding: 8px 12px; border-radius: var(--radius);
}
.site-nav a:hover { color: var(--ink); background: rgba(23, 36, 32, .06); }
.site-nav a.active { color: var(--ink); }
.site-nav .nav-cta { margin-left: 8px; background: var(--ink); color: var(--on-dark); }
.site-nav .nav-cta:hover { background: var(--moss-2); color: #fff; }

.nav-toggle {
  display: none; font: inherit; font-weight: 600; font-size: .95rem;
  background: none; border: 1px solid var(--line); color: var(--ink);
  padding: 8px 14px; border-radius: var(--radius); cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 4px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .site-nav .nav-cta { margin: 12px 0 0; text-align: center; border-radius: var(--radius); border: 0; }
}

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius);
  font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap;
  border: 1.5px solid transparent; transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--ink); color: var(--on-dark); }
.btn-primary:hover { background: var(--moss-2); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--on-dark); }
.btn-brass { background: var(--brass-light); color: var(--ink); }
.btn-brass:hover { background: #ecbf68; }
.btn-ghost-light { border-color: rgba(233, 236, 230, .45); color: var(--on-dark); }
.btn-ghost-light:hover { border-color: var(--on-dark); background: rgba(255,255,255,.06); }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 10vw, 120px) 0 0; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px); align-items: end;
}
.hero h1 {
  font-size: var(--s5); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02;
  max-width: 13ch; text-wrap: balance;
}
.lede {
  margin-top: 28px; font-size: var(--s1); line-height: 1.45; color: var(--ink-2); max-width: 38ch;
}
.hero .actions { margin-top: 36px; }

.hero-facts { border-top: 2px solid var(--ink); }
.hero-facts > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.hero-facts dt { font-size: .92rem; color: var(--ink-2); }
.hero-facts dd { font-weight: 600; text-align: right; }

.clients {
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
  margin-top: clamp(56px, 8vw, 96px); padding-top: 24px; padding-bottom: 24px;
  border-top: 1px solid var(--line);
}
.clients-label { font-size: .92rem; color: var(--ink-2); }
.client-list { display: flex; flex-wrap: wrap; gap: 12px 40px; }
.client-list li { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; color: var(--ink); opacity: .78; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; align-items: start; }
  .clients { gap: 12px; }
  .client-list { gap: 8px 24px; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px;
  align-items: end; margin-bottom: clamp(36px, 5vw, 56px);
}
.section-head h2 { font-size: var(--s4); letter-spacing: -0.03em; }
.section-head p { color: var(--ink-2); max-width: 46ch; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; } }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-size: .88rem; font-weight: 500; padding: 5px 11px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink);
}
.tags-dark li { background: transparent; border-color: rgba(233,236,230,.22); color: var(--on-dark); }

/* ---------- About ---------- */
.about { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(40px, 7vw, 104px); }

.profile { position: sticky; top: 100px; align-self: start; }
.monogram {
  width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--brass-light); font-weight: 800; font-size: 1.9rem; letter-spacing: -0.04em;
}
.profile-name { margin-top: 22px; font-size: var(--s2); letter-spacing: -0.025em; }
.profile-role { margin-top: 4px; color: var(--ink-2); }
.profile-meta { margin: 18px 0; display: grid; gap: 4px; font-size: .95rem; }
.text-link {
  font-weight: 600; color: var(--brass-text); text-decoration: underline;
  text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.text-link:hover { color: var(--ink); }
.credentials { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.credentials h3, .expertise h3 { font-size: 1rem; font-weight: 600; margin-bottom: 12px; }
.credentials ul { display: grid; gap: 8px; font-size: .93rem; color: var(--ink-2); }

.bio { font-family: var(--serif); font-size: 1.2rem; line-height: 1.68; max-width: 64ch; }
.bio p + p { margin-top: 1.1em; }
.bio-lead { font-size: clamp(1.45rem, 2.4vw, 1.8rem); line-height: 1.4; letter-spacing: -0.01em; }
.expertise { margin-top: 48px; font-family: var(--sans); }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .profile { position: static; }
}

/* ---------- PolyDial (dark band) ---------- */
.polydial { background: var(--moss); color: var(--on-dark); }
.pd-head { max-width: 760px; }
.pd-kicker { color: var(--brass-light); font-weight: 600; margin-bottom: 16px; }
.pd-head h2 { font-size: clamp(2.2rem, 4.8vw, 3.5rem); letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance; }
.pd-sub { margin-top: 20px; font-size: var(--s1); line-height: 1.45; color: var(--on-dark-2); max-width: 44ch; }
.pd-head .actions { margin-top: 32px; }

.pd-grid {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px); margin-top: clamp(56px, 7vw, 88px); align-items: start;
}
.pd-story h3 { font-size: 1.15rem; margin: 0 0 10px; color: #fff; }
.pd-story p { color: var(--on-dark-2); max-width: 60ch; }
.pd-story p + h3 { margin-top: 32px; }
.pd-story .tags { margin-top: 16px; }

/* the call panel: the one animated moment on the page */
.call {
  margin: 0; position: sticky; top: 100px;
  background: var(--moss-2); border: 1px solid rgba(233,236,230,.12); border-radius: 14px;
  padding: 24px 26px 22px;
}
.call-top { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--on-dark-2); }
.call-dot { width: 9px; height: 9px; border-radius: 50%; background: #5fd08a; box-shadow: 0 0 0 4px rgba(95,208,138,.18); }
.call-time { margin-left: auto; font-variant-numeric: tabular-nums; }
.call-lang { margin-top: 36px; font-size: .95rem; font-weight: 600; color: var(--brass-light); min-height: 1.5em; }
.call-greeting {
  margin-top: 8px; font-size: clamp(1.6rem, 2.8vw, 2.1rem); font-weight: 600; line-height: 1.2;
  letter-spacing: -0.02em; color: #fff; min-height: 2.5em;
  transition: opacity .35s ease, transform .35s ease;
}
.call-greeting.out { opacity: 0; transform: translateY(6px); }
.call-wave { display: flex; align-items: center; gap: 4px; height: 44px; margin: 28px 0 22px; }
.call-wave span {
  flex: 1; height: 20%; border-radius: 2px; background: var(--brass-light); opacity: .85;
  animation: wave 1.2s ease-in-out infinite;
}
.call-wave span:nth-child(3n) { animation-delay: -.3s; }
.call-wave span:nth-child(3n+1) { animation-delay: -.7s; }
.call-wave span:nth-child(4n) { animation-delay: -.5s; animation-duration: 1s; }
.call-wave span:nth-child(5n) { animation-delay: -.9s; animation-duration: 1.4s; }
@keyframes wave { 0%, 100% { height: 18%; } 50% { height: 100%; } }
.call figcaption { font-size: .9rem; color: var(--on-dark-2); border-top: 1px solid rgba(233,236,230,.12); padding-top: 14px; }

@media (prefers-reduced-motion: reduce) {
  .call-wave span { animation: none; height: 40%; }
  .call-wave span:nth-child(2n) { height: 70%; }
  .call-greeting { transition: none; }
}

.pd-facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(56px, 7vw, 88px); border-top: 1px solid rgba(233,236,230,.18);
}
.pd-facts > div { padding: 22px 24px 0 0; }
.pd-facts > div + div { padding-left: 24px; border-left: 1px solid rgba(233,236,230,.18); }
.pd-facts dt { font-weight: 700; font-size: 1.15rem; color: #fff; }
.pd-facts dd { margin-top: 6px; color: var(--on-dark-2); font-size: .95rem; }

.pd-quote {
  margin: clamp(56px, 7vw, 88px) 0 0; padding-left: 28px; border-left: 3px solid var(--brass-light);
  max-width: 820px;
}
.pd-quote p { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.4; color: #fff; }

@media (max-width: 900px) {
  .pd-grid { grid-template-columns: 1fr; }
  .call { position: static; order: -1; }
  .pd-facts { grid-template-columns: 1fr 1fr; }
  .pd-facts > div { padding: 22px 16px 22px 0; border-bottom: 1px solid rgba(233,236,230,.18); }
  .pd-facts > div + div { padding-left: 0; border-left: 0; }
  .pd-facts > div:nth-child(2n) { padding-left: 16px; border-left: 1px solid rgba(233,236,230,.18); }
}

/* ---------- Experience timeline ---------- */
.timeline { display: grid; gap: 0; }
.era { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; border-top: 2px solid var(--ink); padding-top: 24px; }
.era + .era { margin-top: 56px; }
.era-years { font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.era-body > h3 { font-size: var(--s2); letter-spacing: -0.025em; }
.era-body > h3 span { display: block; margin-top: 6px; font-size: 1rem; font-weight: 500; letter-spacing: 0; color: var(--ink-2); }

.roles { margin-top: 24px; position: relative; }
.roles li {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 8px 40px;
  padding: 22px 0; border-top: 1px solid var(--line);
}
.role-head strong { display: block; font-size: 1.1rem; }
.role-head span { display: block; margin-top: 2px; font-size: .93rem; color: var(--ink-2); }
.roles p { color: var(--ink-2); }
.earlier { margin-top: 12px; font-size: var(--s1); line-height: 1.45; color: var(--ink-2); max-width: 46ch; }

@media (max-width: 860px) {
  .era { grid-template-columns: 1fr; gap: 10px; }
  .roles li { grid-template-columns: 1fr; }
}

/* ---------- Projects ---------- */
.projects { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.featured {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px;
  padding: clamp(28px, 4vw, 44px); border: 2px solid var(--ink); border-radius: 10px; background: var(--fog);
}
.featured-flag { font-weight: 600; color: var(--brass-text); font-size: .95rem; }
.featured h3 { margin-top: 10px; font-size: var(--s3); letter-spacing: -0.03em; }
.featured p:not(.featured-flag) { margin-top: 12px; color: var(--ink-2); max-width: 58ch; }
@media (max-width: 760px) { .featured { flex-direction: column; align-items: flex-start; } }

.project-list { margin-top: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.project-list li { padding: 28px 0; border-top: 1px solid var(--line); }
.project-list h3 { font-size: 1.3rem; letter-spacing: -0.02em; }
.project-list p { margin-top: 8px; color: var(--ink-2); }
.project-list .stack { margin-top: 14px; font-size: .9rem; font-weight: 600; color: var(--ink); }
@media (max-width: 760px) { .project-list { grid-template-columns: 1fr; } }

/* ---------- Publications ---------- */
.book { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.book-cover {
  aspect-ratio: 2 / 3; border-radius: 4px 10px 10px 4px; padding: 22px 20px;
  background: var(--ink); color: var(--on-dark);
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: inset 6px 0 0 rgba(0,0,0,.25), 0 18px 40px -18px rgba(23,36,32,.55);
}
.book-year { font-size: .85rem; color: var(--brass-light); font-weight: 600; }
.book-title { font-family: var(--serif); font-size: 1.55rem; line-height: 1.15; }
.book-status { font-size: .95rem; font-weight: 600; color: var(--brass-text); }
.book-body h3 { margin-top: 8px; font-size: var(--s3); letter-spacing: -0.03em; }
.book-body h3 cite { font-style: normal; }
.book-sub { margin-top: 10px; font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--ink-2); }
.book-role { margin-top: 22px; }
.book-body > p:not(.book-status):not(.book-sub):not(.book-role) { margin-top: 12px; color: var(--ink-2); max-width: 68ch; }
.book-body .tags { margin-top: 22px; }

.research { margin-top: clamp(48px, 6vw, 72px); padding-top: 24px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px 64px; }
.research h3 { font-size: 1.3rem; letter-spacing: -0.02em; }
.research p { color: var(--ink-2); }

@media (max-width: 760px) {
  .book { grid-template-columns: 1fr; }
  .book-cover { width: 160px; }
  .research { grid-template-columns: 1fr; }
}

/* ---------- Contact ---------- */
.contact { background: var(--ink); color: var(--on-dark); padding: clamp(80px, 11vw, 140px) 0; }
.contact h2 { font-size: var(--s5); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; max-width: 16ch; text-wrap: balance; }
.contact p { margin-top: 24px; font-size: var(--s1); line-height: 1.45; color: var(--on-dark-2); max-width: 44ch; }
.contact .actions { margin-top: 36px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-dark-2); border-top: 1px solid rgba(233,236,230,.12); }
.footer-inner { display: flex; align-items: center; gap: 24px 40px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 28px; font-size: .92rem; }
.site-footer .wordmark { color: #fff; font-size: 1.1rem; }
.site-footer .wordmark span { color: var(--brass-light); }
.site-footer ul { display: flex; gap: 20px; margin-left: auto; }
.site-footer ul a { color: var(--on-dark); text-decoration: none; }
.site-footer ul a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 640px) { .site-footer ul { margin-left: 0; } }
