:root { --bg: #000; --fg: #fff; --muted: #9a9a9a; --gutter: max(16px, 5vw); }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.45 "Helvetica Neue", Helvetica, Arial, sans-serif; }
a { color: inherit; text-decoration: none; border: 0; transition: color .15s; }
a:hover { color: var(--muted); }
a.plain { border: 0; }
p { margin: 0; }
.muted { color: var(--muted); }

/* ---------- masthead: identical on every page ---------- */
.masthead { padding: 40px var(--gutter) 0; }
.masthead h1 { font-size: clamp(32px, 6vw, 72px); font-weight: 700; letter-spacing: -.02em; line-height: 1; margin: 0 0 20px; }
.masthead nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 16px; }
.masthead nav a { border: 0; color: #fff; }
.masthead nav a:hover { color: #fff; opacity: .6; }
.masthead nav a[aria-current="page"] { border-bottom: 1px solid currentColor; }

/* ---------- home: full photo ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  background-color: #000;
  background-image: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0) 35%), var(--hero);
  background-size: cover; background-position: center 30%; background-repeat: no-repeat;
}
@media (max-width: 1024px) {
  .hero { background-image: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0) 35%), var(--hero-sm); background-position: 55% 30%; }
}
.hero .masthead { text-shadow: 0 1px 12px rgba(0,0,0,.4); }
.hero .credit { position: absolute; right: var(--gutter); bottom: 16px; font-size: 11px; opacity: .75; text-shadow: 0 1px 6px rgba(0,0,0,.6); }

/* ---------- inner pages: same photo, 90% black, fixed behind ---------- */
body.inner::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(rgba(0,0,0,.9), rgba(0,0,0,.9)), var(--hero) center 30% / cover no-repeat, #000;
}
@media (max-width: 1024px) {
  body.inner::before { background: linear-gradient(rgba(0,0,0,.9), rgba(0,0,0,.9)), var(--hero-sm) 55% 30% / cover no-repeat, #000; }
}
body.inner { background: transparent; }
body.inner main { max-width: 760px; padding: 56px var(--gutter) 80px; }

/* ---------- CV ---------- */
section { margin-bottom: 40px; }
h2 { font-size: 14px; font-weight: 700; margin: 0 0 16px; }
h3 { font-size: 14px; font-weight: 400; margin: 0; }
.yr { margin-bottom: 16px; }
.sub { display: block; color: var(--muted); padding-left: 1.5em; }

/* ---------- blog ---------- */
.crumb { margin: 0 0 24px; }
.post article h2 { font-size: 22px; line-height: 1.25; margin: 0 0 6px; }
.post .meta { color: var(--muted); margin: 0 0 24px; }
.post .body { font-size: 16px; line-height: 1.6; }
.post .body p { margin: 0 0 1em; }
.post .body blockquote { margin: 1.2em 0; padding-left: 1em; border-left: 2px solid var(--fg); }
.post img, .post video { max-width: 100%; height: auto; display: block; margin: 1.2em 0; }
.post .embed { position: relative; aspect-ratio: 16 / 9; margin: 1.2em 0; }
.post .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.post .readon { margin-top: 24px; font-weight: 700; }

/* ---------- print (CV → PDF): plain black on white ---------- */
@media print {
  :root { --bg: #fff; --fg: #000; --muted: #555; }
  body, body.inner { background: #fff; color: #000; font-size: 10pt; }
  body.inner::before, .masthead nav { display: none; }
  .masthead { padding: 0; }
  .masthead h1 { font-size: 18pt; color: #000; margin-bottom: 18pt; }
  body.inner main { padding: 0; max-width: none; }
  .yr { break-inside: avoid; }
}
