:root {
  --bg:           #f0e8d0;
  --text:         #1a0f00;
  --muted:        #5a4a2e;
  --accent:       #005aff;
  --accent-hover: #0040cc;
  --border:       #c8b898;
  --code-bg:      #e4d9c0;
  --nav-bg:       #1a0f00;
  --nav-text:     #e8dfcc;
  --max-w:        1000px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.05rem;
  line-height: 1.8;
  margin: 0 auto;
  max-width: var(--max-w);
  padding: 0 1.5rem;
}

/* ── Navbar ─────────────────────────────────── */
.site-nav {
  background: var(--nav-bg);
  margin: 0 -1.5rem;
  padding: 0 1.5rem;
  border-bottom: 3px solid var(--accent);
}

.site-nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.65rem 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-brand {
  font-weight: bold;
  font-size: 1rem;
  color: var(--nav-text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-brand:hover { color: var(--accent); text-decoration: none; }

.nav-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--nav-text);
  opacity: 0.7;
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:hover { color: var(--accent); opacity: 1; text-decoration: none; }

/* ── Layout ──────────────────────────────────── */
main, #quarto-content { padding: 2.5rem 0 5rem; }

h1 { margin-top: 2rem; }

/* ── Typography ──────────────────────────────── */
h1 {
  font-size: 2.4rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.3rem;
  margin: 2rem 0 0.4rem;
  line-height: 1.3;
}

h3 { font-size: 1.1rem; margin: 1.5rem 0 0.3rem; }
h4 { font-size: 1rem;   margin: 1.2rem 0 0.25rem; }

p { margin: 0 0 1rem; }

a             { color: var(--accent); text-decoration: none; }
a:hover       { color: var(--accent-hover); text-decoration: underline; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  color: var(--muted);
  font-style: italic;
}

/* ── Code ────────────────────────────────────── */
code {
  font-family: ui-monospace, 'Cascadia Code', 'Courier New', monospace;
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.5;
}

pre code { background: none; padding: 0; }

/* ── Blog listing ────────────────────────────── */
.quarto-listing { margin-top: 0.5rem; }

.quarto-listing .list-group { padding: 0; list-style: none; }

.quarto-listing .list-group-item {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 0;
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
}

.quarto-listing .list-group-item:first-child { border-top: 1px solid var(--border); }

.quarto-listing .listing-date {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
  min-width: 6.5rem;
}

.quarto-listing .listing-title { flex: 1; }
.quarto-listing .listing-title a { color: var(--text); }
.quarto-listing .listing-title a:hover { color: var(--accent); text-decoration: none; }

/* ── CV page ─────────────────────────────────── */
body.cv-page h2 {
  font-size: 0.7rem;
  font-family: Georgia, serif;
  font-variant: small-caps;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.3rem;
  margin: 2.5rem 0 1.1rem;
}

body.cv-page h2:first-of-type { margin-top: 1rem; }

body.cv-page strong { color: var(--text); }

body.cv-page em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.95rem;
}

body.cv-page ul {
  margin: 0.4rem 0 0.75rem 1.2rem;
  padding: 0;
}

body.cv-page ul li { margin-bottom: 0.25rem; }

body.cv-page p {
  margin-bottom: 0.3rem;
  line-height: 1.6;
}

/* ── Details / summary (CV collapsibles) ─────── */
details { margin-bottom: 0.75rem; padding-left: 0.5rem; }

summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.85em;
  list-style: none;
}

summary::-webkit-details-marker { display: none; }
summary::before { content: "▸ show more"; }
details[open] summary::before { content: "▾ show less"; }

details[open] {
  border-left: 2px solid var(--border);
  padding-left: 0.75rem;
  margin-top: 0.25rem;
}

/* ── Footer ──────────────────────────────────── */
#quarto-footer, .nav-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  color: var(--muted);
  font-size: 0.82rem;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 640px) {
  body  { font-size: 1rem; padding: 0 1rem; }
  h1    { font-size: 1.75rem; }
  .site-nav { margin: 0 -1rem; padding: 0 1rem; }
  .quarto-listing .list-group-item { flex-direction: column; gap: 0.1rem; }
  .quarto-listing .listing-date    { min-width: unset; }
}
