/* Schibsted Grotesk, self-hosted. Files go in fonts/ (SIL Open Font License). */
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/schibsted-grotesk-v7-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/schibsted-grotesk-v7-latin-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/schibsted-grotesk-v7-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/schibsted-grotesk-v7-latin-700.woff2') format('woff2');
}

:root {
  --accent: #2F5D50;
  --accent-hover: #1E3F36;
  --ink: #15201C;
  --ink-soft: #2E3A35;
  --ink-muted: #45524C;
  --bg: #EEF0EE;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Schibsted Grotesk', system-ui, sans-serif;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

.page {
  min-height: 100vh;
  box-sizing: border-box;
  padding: 40px 32px 112px;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 96px;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 16px;
}
.site-header .mark { font-weight: 500; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-header nav a { color: var(--ink); }

.intro {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 900px;
}
.intro h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 48px;
}
.columns > div { display: flex; flex-direction: column; gap: 14px; }
.columns h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.columns p {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.columns > div > a { font-size: 17px; }
.links { display: flex; flex-direction: column; gap: 8px; font-size: 17px; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  font-size: 15px;
  color: var(--ink-muted);
}

.site-header .mark { color: var(--ink); text-decoration: none; }
.site-header nav a[aria-current="page"] { text-decoration-thickness: 2px; }

/* ---------- Notes index ---------- */

.page-title {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 900px;
}
.page-title h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.page-title p {
  margin: 0;
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.note-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}
.note-list li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 32px;
  padding: 24px 0;
  border-bottom: 1px solid #C9CFCB;
}
.note-list time {
  font-size: 15px;
  color: var(--ink-muted);
  padding-top: 4px;
  font-variant-numeric: tabular-nums;
}
.note-list a { font-size: 22px; font-weight: 500; }
.note-list p {
  grid-column: 2;
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 640px;
}
@media (max-width: 600px) {
  .note-list li { grid-template-columns: 1fr; }
  .note-list p { grid-column: 1; }
}

/* ---------- Single note ---------- */

.note {
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.note-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 28px;
}
.note-header h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.note-meta {
  margin: 0;
  font-size: 15px;
  color: var(--ink-muted);
}
.note-body {
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.note-body > * { margin: 0 0 1.1em; }
.note-body > :last-child { margin-bottom: 0; }
.note-body h2 {
  margin-top: 2em;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--ink);
}
.note-body h3 {
  margin-top: 1.6em;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}
.note-body blockquote {
  margin-left: 0;
  padding-left: 20px;
  border-left: 3px solid var(--accent);
  font-style: italic;
}
.note-body ul, .note-body ol { padding-left: 1.3em; }
.note-body li + li { margin-top: 0.35em; }
.note-body code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: #E1E5E2;
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
.note-body pre {
  overflow-x: auto;
  background: #E1E5E2;
  padding: 16px 20px;
  border-radius: 4px;
  font-size: 15px;
  line-height: 1.5;
}
.note-body pre code { background: none; padding: 0; font-size: inherit; }
.note-body figure { margin-left: 0; margin-right: 0; }
.note-body figcaption { font-size: 15px; color: var(--ink-muted); margin-top: 8px; }
.note-body hr { border: 0; border-top: 1px solid #C9CFCB; margin: 2em 0; }
.footnotes { font-size: 15px; line-height: 1.55; color: var(--ink-muted); }
.footnotes ol { padding-left: 1.3em; margin: 0; }
sup a { text-decoration: none; }

.site-footer a { color: inherit; }

/* ---------- Publications ---------- */

.pub-year {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pub-year h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 820px;
}
.pub-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 0;
  border-bottom: 1px solid #C9CFCB;
}
.pub-title { font-size: 20px; font-weight: 500; line-height: 1.35; }
.pub-authors, .pub-venue {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.pub-authors strong { font-weight: 500; color: var(--ink); }
.pub-venue { font-style: italic; }
.pubs { gap: 56px; }
