/* Catalogue: warm paper, one grotesk, hairline rules, one accent.
   This file is run through Hugo as a template (see head.html) so it can name the cherry by
   its content-hashed address. Keep literal double braces out of it. */
@font-face { font-family: "Schibsted Grotesk"; font-weight: 400 800; font-display: swap; src: url("/fonts/schibsted-grotesk-latin.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2"); }

:root {
  --ink: #141413;
  --paper: #faf9f5;
  --accent: #c8102e;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --page: 1100px;
  --gutter: 48px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.5; }
a { color: inherit; text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
.accent { color: var(--accent); }
/* The full stop of a headline, drawn as a cherry. The "." stays in the text for readers
   and copy-paste; the image sits on the baseline where the dot would be. */
.cherry { display: inline-block; margin-left: 0.03em; width: 0.4em; height: 0.5em; overflow: hidden; color: transparent; background: url("/images/cherry.49a8bed9c0df61896a859e33da33088ff06d69d15f1f705381f357526516f290.svg") left bottom / contain no-repeat; }

.wrap, .site-nav, .site-footer-inner { max-width: var(--page); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
main { padding-bottom: 64px; }

/* Header and footer */
.site-nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 24px; padding-top: 32px; font-size: 15px; font-weight: 500; }
.site-name, .site-menu a { text-decoration: none; }
.site-menu { display: flex; flex-wrap: wrap; gap: 22px; list-style: none; }
.site-footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 28px; padding-bottom: 40px; font-size: 14px; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; }

/* Type */
.display { font-size: clamp(44px, 8.2vw, 84px); line-height: 0.95; letter-spacing: -0.035em; font-weight: 700; margin: 72px 0 26px; }
.lede { font-size: 19px; line-height: 1.45; max-width: 34em; }
.label { font-size: 14px; font-weight: 600; margin: 58px 0 10px; }
h1.page-title { font-size: clamp(36px, 6vw, 56px); line-height: 1; letter-spacing: -0.03em; font-weight: 700; margin: 64px 0 22px; }

/* Numbered rows */
.rows { border-top: 3px solid var(--ink); list-style: none; }
.row { display: grid; grid-template-columns: 60px 1.1fr 2fr 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--ink); align-items: baseline; }
.rows-3 .row { grid-template-columns: 60px 1.3fr 2.4fr; }
/* Same four columns as the home register, with a wider right column for a full sentence. */
.rows-wide-meta .row { grid-template-columns: 60px 1.1fr 1.5fr 1.5fr; }
.row-n { font-size: 14px; font-variant-numeric: tabular-nums; }
.row-title { font-size: 27px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.row-title a { text-decoration: none; }
.rows-3 .row-title { font-size: 23px; }
.row-small { display: block; font-size: 14px; font-weight: 400; letter-spacing: 0; margin-top: 6px; }
.row-desc { font-size: 16px; line-height: 1.45; }
.row-meta { font-size: 14px; line-height: 1.5; text-align: right; }

/* Columns (skills) */
.cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; border-top: 3px solid var(--ink); padding-top: 16px; }
.cols h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.cols p { font-size: 15px; line-height: 1.55; }

/* Facts: label and value pairs on a product page */
.facts { border-top: 3px solid var(--ink); margin-top: 40px; }
.facts > div { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--ink); }
.facts dt { font-size: 14px; font-weight: 600; }
.facts dd { font-size: 16px; }
.facts table { border-collapse: collapse; }
.facts td { padding: 0 24px 4px 0; }
.facts + .prose { margin-top: 32px; }

/* Prose: about, legal, blog posts */
.prose { max-width: 40em; font-size: 18px; line-height: 1.6; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 24px; letter-spacing: -0.015em; line-height: 1.2; margin-top: 2em; }
.prose h3 { font-size: 19px; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.35em; }
.prose blockquote { border-left: 3px solid var(--ink); padding-left: 1em; }
.prose code { font-family: var(--mono); font-size: 0.88em; }
.prose pre { border: 1px solid var(--ink); padding: 14px 16px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.prose pre code { font-size: inherit; }
.prose table { border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { text-align: left; padding: 8px 16px 8px 0; border-bottom: 1px solid var(--ink); vertical-align: top; }
.prose hr { border: 0; border-top: 1px solid var(--ink); }

/* Blog list */
.post-list { border-top: 3px solid var(--ink); list-style: none; }
.post-list li { display: grid; grid-template-columns: 140px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--ink); align-items: baseline; }
.post-list h2 { font-size: 23px; letter-spacing: -0.02em; line-height: 1.2; }
.post-list h2 a { text-decoration: none; }
.post-list p { font-size: 16px; margin-top: 6px; }
.post-meta { font-size: 14px; }


@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .row, .rows-3 .row, .rows-wide-meta .row { grid-template-columns: 36px 1fr; gap: 6px 12px; }
  .row-desc, .row-meta { grid-column: 2; text-align: left; }
  .cols { grid-template-columns: 1fr 1fr; }
  .facts > div, .post-list li { grid-template-columns: 1fr; gap: 4px; }
}

/* Blog post header */
article .page-title { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.05; }
.post-meta + .prose { margin-top: 28px; }
