/* ------------------------------------------------------------------
   nederberga.nl — a still forest floor
   Walden style reference: achromatic, hairline strokes, photography-led
------------------------------------------------------------------ */

:root {
  --charcoal-ink: #3f3f3f;
  --paper-white: #f1ebdf;   /* warm paper — the canvas, off pure white */
  --pure-white: #ffffff;    /* reserved for text set on photography */
  --stone-veil: #d6cfc0;
  --sumi-black: #030302;
  --ash: #6b6a64;
  --pebble: #b0aca3;

  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --gutter: 24px;
  --section-gap: 60px;
  --maxw: 1360px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: var(--paper-white); scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper-white);
  color: var(--charcoal-ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
  color: var(--charcoal-ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease, opacity .15s ease;
}
a:hover { border-bottom-color: var(--charcoal-ink); }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  padding: 12px var(--gutter);
  background: var(--paper-white);
  border-bottom: 1px solid var(--stone-veil);
}
.nav__mark {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .08em;
  border-bottom: none;
  flex-shrink: 0;
}
.nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.nav__links a { font-size: 15px; }
.nav__links a[aria-current="page"] { border-bottom-color: var(--charcoal-ink); }

/* offset for the sticky nav when jumping to a section */
:target,
[id] { scroll-margin-top: 72px; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  width: 100%;
  height: 78vh;
  min-height: 440px;
  max-height: 820px;
  overflow: hidden;
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 40px;
  text-align: center;
  color: var(--pure-white);
  padding: 0 var(--gutter);
  text-shadow: 0 1px 24px rgba(3, 3, 2, .45);
}
.hero__caption h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: .12em;
}
.hero__caption p {
  margin: 8px 0 0;
  font-size: 13px;
  opacity: .85;
}

/* ---------- layout primitives ---------- */

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

.section { margin-top: var(--section-gap); }
.section:last-child { margin-bottom: var(--section-gap); }

.label {
  font-size: 17px;
  font-weight: 400;
  margin: 0 0 20px;
  padding: 0;
}
.label--edge { padding-left: var(--gutter); }
.label a { border-bottom: none; }
.label a:hover { border-bottom: 1px solid var(--charcoal-ink); }

.seeall {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  color: var(--ash);
}
.seeall:hover { border-bottom-color: var(--ash); }

/* ---------- gallery (topic pages) ---------- */

.page-head { margin-top: 40px; }

.gallery {
  margin-top: var(--section-gap);
  margin-bottom: var(--section-gap);
  column-count: 2;
  column-gap: 6px;
  padding: 0 6px;
}
.gallery figure {
  margin: 0 0 6px;
  break-inside: avoid;
}
.gallery img { width: 100%; height: auto; }

@media (min-width: 1200px) { .gallery { column-count: 3; } }
@media (max-width: 640px)  { .gallery { column-count: 1; } }

.lede {
  max-width: 60ch;
  font-size: 17px;
  line-height: 1.6;
}
.lede p { margin: 0 0 1em; }
.lede p:last-child { margin-bottom: 0; }

.prose { max-width: 62ch; }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }

.muted { color: var(--ash); }
.mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: .02em; }

/* ---------- full-bleed image band ---------- */

.band { margin-top: var(--section-gap); }
.band__img { width: 100%; }
.band__img img {
  width: 100%;
  max-height: 82vh;
  object-fit: cover;
}
.band__cap {
  margin-top: 12px;
  padding: 0 var(--gutter);
  font-size: 13px;
  color: var(--ash);
}
.band__cap b {
  color: var(--charcoal-ink);
  font-weight: 400;
}

/* ---------- two-up: image + text ---------- */

.split {
  margin-top: var(--section-gap);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}
.split__img { min-height: 100%; }
.split__img img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.split__body {
  padding: 40px var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.split--textfirst .split__body { order: -1; }

/* ---------- tile grid ---------- */

.grid {
  margin-top: var(--section-gap);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 var(--gutter);
}
.tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tile figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ash);
}

/* ---------- code page ---------- */

.projects {
  margin-top: var(--section-gap);
  border-top: 1px solid var(--stone-veil);
}
.project {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 24px var(--gutter);
  border-bottom: 1px solid var(--stone-veil);
}
.project__name {
  font-family: var(--font-mono);
  font-size: 15px;
  margin: 0;
  font-weight: 400;
}
.project__name a { border-bottom: 1px solid var(--stone-veil); }
.project__meta {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--pebble);
}
.project__body p { margin: 0 0 12px; max-width: 64ch; }
.project__body ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.project__body li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ash);
}
.project__shot { margin-top: 16px; }
.project__shot img { border: 1px solid var(--stone-veil); }

/* ---------- footer ---------- */

.footer {
  margin-top: var(--section-gap);
  border-top: 1px solid var(--stone-veil);
  padding: 40px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: baseline;
}
.footer a, .footer span { font-size: 13px; }
.footer .legal {
  width: 100%;
  margin-top: 16px;
  font-size: 11px;
  color: var(--ash);
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  :root { --section-gap: 40px; }
  .hero { height: 68vh; }
  .split { grid-template-columns: 1fr; }
  .split--textfirst .split__body { order: 0; }
  .split__img img { min-height: 260px; }
  .grid { grid-template-columns: 1fr; }
  .project { grid-template-columns: 1fr; gap: 12px; }
  .nav__links { gap: 14px; }
}

@media (prefers-color-scheme: dark) {
  /* Walden is a light system by intent — we keep the warm paper canvas,
     just a shade deeper so it reads calmly at night. */
  :root { --paper-white: #ece5d7; }
}
