/* Holtmere site. Brand v3 tokens (kit/tokens/tokens.json); day by default, night with prefers-color-scheme or the toggle. */
@font-face { font-family: "Schibsted Grotesk"; src: url("/fonts/schibsted.woff") format("woff"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono.woff") format("woff"); font-weight: 500; font-display: swap; }

:root {
  --bg: #F3EFE6; --surface: #E8E1D3; --text: #191714; --muted: #6F6A61; --accent: #4E6B3A; --accent-soft: #8FB07A;
  --line: #D8D0BF; --bad: #C2603A; --hero: url("/img/hero-day.jpg");
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif; --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --r-sm: 12px; --r-md: 24px; --r-lg: 36px; --wrap: 1080px; --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="day"]) {
    --bg: #191714; --surface: #2A2723; --text: #F3EFE6; --muted: #B9B2A5; --accent: #8FB07A; --accent-soft: #4E6B3A;
    --line: #3A352E; --bad: #D9805E; --hero: url("/img/hero-night.jpg"); color-scheme: dark;
  }
  :root:not([data-theme="day"]) .mark-day { display: none; }
  :root:not([data-theme="day"]) .mark-night { display: inline; }
  :root:not([data-theme="day"]) .only-day { display: none; }
  :root:not([data-theme="day"]) .only-night { display: block; }
}
:root[data-theme="night"] {
  --bg: #191714; --surface: #2A2723; --text: #F3EFE6; --muted: #B9B2A5; --accent: #8FB07A; --accent-soft: #4E6B3A;
  --line: #3A352E; --bad: #D9805E; --hero: url("/img/hero-night.jpg"); color-scheme: dark;
}
.mark-night, .only-night { display: none; }
:root[data-theme="night"] .mark-day, :root[data-theme="night"] .only-day { display: none; }
:root[data-theme="night"] .mark-night { display: inline; }
:root[data-theme="night"] .only-night { display: block; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--sans); }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 16px; top: 16px; background: var(--bg); padding: 8px 12px; z-index: 9; }

/* header */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.brand img { width: 40px; height: 40px; }
nav.main { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; font-weight: 500; font-size: 16px; }
@media (max-width: 680px) {
  .top .wrap { gap: 8px 16px; padding-top: 10px; padding-bottom: 6px; }
  .theme { margin-left: auto; order: 2; }
  nav.main { order: 3; width: 100%; margin-left: 0; gap: 18px; overflow-x: auto; }
}
nav.main a { text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
nav.main a[aria-current="page"] { border-color: var(--accent); }
.theme { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 6px 12px;
  font: 500 14px var(--sans); cursor: pointer; }

/* type */
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 0.4em; }
h1 { font-weight: 800; font-size: clamp(40px, 7vw, 76px); }
h2 { font-weight: 800; font-size: clamp(28px, 4vw, 40px); margin-top: 1.6em; }
h3 { font-weight: 700; font-size: 21px; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(19px, 2.2vw, 23px); line-height: 1.5; max-width: 40em; }
.muted { color: var(--muted); }
.kicker { display: inline-block; font-weight: 700; font-size: 14px; letter-spacing: 0.02em; background: var(--surface);
  border-radius: 999px; padding: 4px 14px; margin-bottom: 16px; }
mark, .hl { background: none; color: var(--accent); }
code, .mono { font-family: var(--mono); font-size: 0.92em; }

/* hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--hero) center / cover no-repeat; opacity: 0.55; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 30%, transparent 85%); }
.hero .wrap { position: relative; z-index: 1; padding-top: clamp(56px, 10vw, 120px); padding-bottom: clamp(56px, 9vw, 110px);
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.hero .portrait { width: clamp(140px, 22vw, 240px); border-radius: 50%; border: 4px solid var(--bg); }
.hero .nee { font-size: 15px; color: var(--muted); margin-top: -8px; }
@media (max-width: 680px) { .hero .wrap { grid-template-columns: 1fr; } .hero .portrait { order: -1; } .hero::after { background: linear-gradient(180deg, transparent, var(--bg) 60%); } }

/* sections and cards */
main section { padding: 8px 0 24px; }
main > .wrap > section:first-child { padding-top: clamp(32px, 6vw, 64px); }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 24px 0; }
.card { background: var(--surface); border-radius: var(--r-md); padding: 24px; text-decoration: none; display: block; }
a.card:hover { outline: 2px solid var(--accent); color: inherit; }
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 28px 0; }
.stat { border-top: 3px solid var(--accent); padding-top: 12px; }
.stat b { display: block; font-size: clamp(26px, 3vw, 34px); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 15px; }
.cta { display: inline-block; background: var(--text); color: var(--bg); padding: 12px 22px; border-radius: 999px;
  text-decoration: none; font-weight: 700; margin: 8px 12px 8px 0; }
.cta:hover { background: var(--accent); color: var(--bg); }
.cta.ghost { background: none; color: var(--text); border: 2px solid var(--text); }

/* CV */
.cv-role { display: grid; grid-template-columns: 170px 1fr; gap: 8px 32px; padding: 22px 0; border-top: 1px solid var(--line); }
.cv-role .when { color: var(--muted); font-weight: 500; font-size: 15px; }
.cv-role h3 { margin: 0; }
.cv-role .title { font-weight: 500; margin: 2px 0 8px; }
.cv-role ul { margin: 0; padding-left: 20px; } .cv-role li { margin-bottom: 6px; }
.cv-role .sub { margin-top: 14px; }
@media (max-width: 680px) { .cv-role { grid-template-columns: 1fr; } }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 12px 0; }
.tags li { background: var(--surface); border-radius: 999px; padding: 4px 14px; font-size: 15px; }

/* workbench diagram */
.diagram { background: var(--surface); border-radius: var(--r-lg); padding: clamp(16px, 3vw, 32px); margin: 24px 0; overflow-x: auto; }
.diagram svg { display: block; min-width: 680px; width: 100%; height: auto; }
.diagram text { font-family: var(--sans); fill: var(--text); }
.diagram .box { fill: var(--bg); stroke: var(--line); stroke-width: 2; }
.diagram .core { fill: var(--text); } .diagram .core-t { fill: var(--bg); font-weight: 800; }
.diagram .sub { fill: var(--muted); font-size: 13px; }
.diagram .link { stroke: var(--muted); stroke-width: 2; fill: none; }
.diagram .human { fill: none; stroke: var(--accent); stroke-width: 3; }
.lessons li { margin-bottom: 12px; }

/* posts */
.posts { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin: 28px 0; }
.post { background: var(--surface); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; }
.post img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.post .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post .meta { color: var(--muted); font-size: 14px; }
.post p { font-size: 16px; margin: 0; }
.post a.more { margin-top: auto; font-weight: 700; }

/* trees */
.map { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 9; background: var(--hero) center / cover; margin: 24px 0; }
.map .tree { position: absolute; transform: translate(-50%, -50%); width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg); }
.map .tree span { position: absolute; left: 34px; top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 13px;
  font-weight: 700; background: var(--bg); padding: 2px 8px; border-radius: 999px; }
.map .empty { position: absolute; inset: auto 20px 20px 20px; background: var(--bg); border-radius: var(--r-md); padding: 16px 20px; max-width: 28em; }

/* footer */
footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 28px 0 40px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
footer img { width: 36px; height: 36px; }

@media print {
  .top, footer, .theme, .hero::before, .hero::after, .no-print { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
}
