/* Styles for the writing pages. You do not need to edit this file. */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("newsreader.woff2") format("woff2");
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("schibsted-grotesk.woff2") format("woff2");
}

:root {
  --paper: #FAFBF9;
  --mist: #E6ECE7;
  --ink: #10231C;
  --ink-soft: #46574F;
  --green: #0E4D3A;
  --green-bright: #17734E;
  --amber: #F2B824;
  --rule: rgba(16, 35, 28, 0.16);
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--amber); color: var(--ink); }

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

/* Header */
.top { border-bottom: 1px solid var(--rule); background: var(--paper); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.mark { font-weight: 700; letter-spacing: -0.01em; text-decoration: none; display: inline-flex; align-items: center; gap: 0.6rem; white-space: nowrap; }
.mark-logo { width: 1.75rem; height: 1.75rem; flex: none; display: block; }
.top nav ul { list-style: none; padding: 0; display: flex; align-items: center; gap: clamp(0.9rem, 2.4vw, 2rem); font-size: 0.95rem; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; }
.top nav .nav-cta { background: var(--green); color: #fff; padding: 0.5rem 0.95rem; border-radius: 4px; font-weight: 600; white-space: nowrap; display: inline-block; }
.top nav .nav-cta:hover { background: var(--ink); text-decoration: none; }
@media (max-width: 480px) { .mark { font-size: 0.98rem; } .top nav li:not(:last-child) { display: none; } }
@media (max-width: 360px) { .mark { font-size: 0.92rem; gap: 0.45rem; } .top nav .nav-cta { padding: 0.45rem 0.7rem; font-size: 0.9rem; } }

/* Article */
.article { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(3rem, 7vw, 5rem); }
.article-inner { max-width: 40rem; margin-inline: auto; padding-inline: var(--gutter); }
.back { font-size: 0.95rem; color: var(--ink-soft); }
.article h1 {
  margin-top: 1.5rem;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem); line-height: 1.05; letter-spacing: -0.02em;
}
.byline { margin-top: 1.1rem; color: var(--ink-soft); font-size: 0.95rem; }
.body { margin-top: 2.5rem; font-family: var(--serif); font-size: 1.22rem; line-height: 1.62; }
.body > * + * { margin-top: 1.15em; }
.body h2 { font-family: var(--sans); font-size: 1.15rem; font-weight: 700; line-height: 1.3; margin-top: 2.2em; }
.body blockquote { border-left: 3px solid var(--green-bright); padding-left: 1.1rem; color: var(--ink-soft); }
.body ul, .body ol { padding-left: 1.3rem; }
.body li + li { margin-top: 0.45em; }
.body .drawing { width: min(720px, calc(100vw - 2rem)); margin-left: 50%; transform: translateX(-50%); margin-top: 1.8em; margin-bottom: 0.6em; }
.body .drawing a { display: block; }
.body .drawing img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 8px; background: #fff; }

.linkedin-note { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: 0.95rem; }

.next { margin-top: 3rem; background: var(--mist); border-radius: 8px; padding: 1.5rem 1.6rem 1.6rem; }
.next h2 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; line-height: 1.15; }
.next p { margin-top: 0.6rem; }
.next .mail { display: inline-block; margin-top: 0.8rem; font-family: var(--serif); font-size: 1.3rem; text-decoration-color: var(--green-bright); overflow-wrap: anywhere; }

/* Writing list */
.list-intro { margin-top: 1rem; color: var(--ink-soft); font-size: 1.1rem; max-width: 34em; }
.posts { list-style: none; padding: 0; margin-top: 2.5rem; }
.posts li { padding-block: 1.5rem; border-top: 1px solid var(--rule); }
.posts li:last-child { border-bottom: 1px solid var(--rule); }
.posts a { text-decoration: none; }
.posts a:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
.posts h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 3vw, 1.9rem); line-height: 1.15; letter-spacing: -0.01em; }
.posts .when { margin-top: 0.35rem; color: var(--ink-soft); font-size: 0.92rem; }
.posts .summary { margin-top: 0.5rem; max-width: 36em; }

footer { background: var(--ink); color: #9FB0A7; font-size: 0.85rem; padding-block: 1.75rem 2.5rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 0.4rem 2rem; justify-content: space-between; }
