/* ---------- Tokens ---------- */
:root {
  --bg: #fdfcf9;
  --text: #1f1d1a;
  --muted: #6b665e;
  --rule: #e4e0d8;
  --accent: #7a2e1f;          /* deep oxblood — change to taste */
  --accent-hover: #a33d29;
  --measure: 40rem;
  --serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171614;
    --text: #e8e4dc;
    --muted: #a09a90;
    --rule: #34312c;
    --accent: #e0937f;
    --accent-hover: #f0b3a3;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3.5rem 1.25rem 4rem;
}

a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--accent-hover); }

h1, h2, h3 { font-weight: 500; line-height: 1.25; }
h1 { font-size: 2.1rem; margin: 0 0 0.25rem; letter-spacing: -0.01em; }
h2 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 2.75rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
}
h3 { font-size: 1.1rem; margin: 1.5rem 0 0.25rem; }

p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* ---------- Header & nav ---------- */
.site-header { margin-bottom: 2.5rem; }
.site-name { font-size: 1.35rem; text-decoration: none; color: var(--text); }
.site-name:hover { color: var(--accent); }

nav ul {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.4rem;
  font-size: 0.95rem;
}
nav a { color: var(--muted); text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent); }
nav a[aria-current="page"] { border-bottom: 1px solid currentColor; }

/* ---------- Home ---------- */
.intro {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1.75rem;
  align-items: start;
}
.portrait {
  width: 9rem;
  aspect-ratio: 4 / 5;
  height: auto;
  object-fit: cover;
  object-position: 50% 20%;   /* keep the face in frame when cropping */
  border-radius: 2px;
  background: var(--rule);
  display: block;
}
.title-line { color: var(--muted); font-style: italic; margin-bottom: 1.25rem; }

.contact { list-style: none; padding: 0; margin: 1.25rem 0 0; font-size: 0.95rem; display: flex; flex-wrap: wrap; gap: 0.3rem 1.25rem; }

@media (max-width: 34rem) {
  .intro { grid-template-columns: 1fr; }
  .portrait { width: 7.5rem; }
  h1 { font-size: 1.8rem; }
}

/* ---------- Lists of entries ---------- */
.entries { list-style: none; padding: 0; margin: 0; }
.entries > li { margin-bottom: 1.35rem; }
.entry-title { font-weight: 500; }
.entry-meta { color: var(--muted); font-size: 0.95rem; }
.entry-links { font-size: 0.85rem; margin-top: 0.15rem; }
.entry-links a { margin-right: 0.9rem; font-variant: small-caps; letter-spacing: 0.03em; }

.news { list-style: none; padding: 0; margin: 0; }
.news li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; margin-bottom: 0.6rem; }
.news time { color: var(--muted); font-size: 0.9rem; padding-top: 0.1rem; }

/* CV-style rows: year on the left */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; margin-bottom: 0.75rem; }
.timeline .when { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 34rem) {
  .timeline li, .news li { grid-template-columns: 1fr; gap: 0; }
}

.button {
  display: inline-block;
  padding: 0.45rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 2px;
  text-decoration: none;
  font-size: 0.95rem;
}
.button:hover { background: var(--accent); color: var(--bg); }

/* ---------- Footer ---------- */
footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
}

@media print {
  nav, footer { display: none; }
  body { background: #fff; color: #000; }
}
