/* ---------------------------------------------
   Tokens — Manuscript / Walnut, warm
--------------------------------------------- */
:root {
  --paper: #F7F6F3;
  --ink: #3B2A20;
  --accent: #6B3A20;
  --accent-soft: #EFE3D5;
  --muted: #8A7867;
  --rule: #E3D8C9;
  --serif: 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, 'Times New Roman', serif;
  --wrap: 720px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
}

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

a { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Manuscript margin rule — a persistent left-edge line, like ruled paper */
.margin-rule {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 5px;
  background: var(--accent);
  z-index: 50;
  pointer-events: none;
}

/* ---------------------------------------------
   Header / masthead
--------------------------------------------- */
.site-header { padding: 1.75rem 0 0; }
.site-header .wrap { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0.75rem; }

.site-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

nav { display: flex; gap: 1.5rem; }
nav a {
  font-family: var(--serif);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
nav a:hover { color: var(--ink); }
nav a.current { color: var(--ink); border-bottom-color: var(--accent); }

.double-rule { margin-top: 1.1rem; }
.double-rule span { display: block; height: 1px; background: var(--ink); }
.double-rule span:first-child { margin-bottom: 3px; }

/* ---------------------------------------------
   Hero (home page only)
--------------------------------------------- */
.hero { padding: 3rem 0 0.5rem; }
.hero-top { display: flex; align-items: center; justify-content: flex-start; gap: 4rem; flex-wrap: wrap; }
.hero-photo { width: 150px; height: 175px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }.eyebrow { font-style: italic; color: var(--muted); font-size: 0.95rem; margin: 0 0 0.4rem; }
h1.name { font-family: var(--serif); font-weight: 600; font-size: 2rem; margin: 0 0 0.3rem; line-height: 1.15; }
.role { font-style: italic; color: var(--muted); font-size: 1.1rem; margin: 0; }

/* ---------------------------------------------
   Page header (non-home)
--------------------------------------------- */
.page-header { padding: 2.75rem 0 0.25rem; }
.page-header h1 { font-family: var(--serif); font-weight: 600; font-size: 2rem; margin: 0 0 0.5rem; font-style: italic; }
.page-header p.lede { color: var(--muted); max-width: 60ch; margin: 0; }

/* ---------------------------------------------
   Main content
--------------------------------------------- */
main { padding-bottom: 5rem; }
section { margin-top: 2.75rem; }
section > h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-style: italic;
  font-size: 1.3rem;
  margin: 0 0 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
section:first-of-type > h2 { border-top: none; padding-top: 0; }

.bio { font-size: 1.0625rem; line-height: 1.75; text-align: justify; margin: 0 0 1.1rem; }
.bio.dropcap::first-letter {
  font-size: 3.3em;
  float: left;
  line-height: 0.78;
  padding: 0.03em 0.09em 0 0;
  color: var(--accent);
  font-weight: 700;
}

.note {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.65rem 0.9rem;
  margin: 0 0 1.5rem;
  max-width: 60ch;
  border-left: 3px solid var(--accent);
}

/* ---------------------------------------------
   Numbered paper entries
--------------------------------------------- */
.paper-list { padding: 0; margin: 0; list-style: none; }
.paper { position: relative; padding: 1rem 0; border-top: 1px solid var(--rule); }
.paper:first-child { border-top: none; padding-top: 0; }
.paper h3 { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; margin: 0 0 0.3rem; }
.paper .meta { font-style: italic; color: var(--muted); font-size: 0.9rem; margin: 0 0 0.5rem; }
.paper p.abstract { text-align: justify; font-size: 0.95rem; margin: 0 0 0.5rem; }
.paper .links a { font-size: 0.85rem; margin-right: 1.25rem; text-decoration: none; border-bottom: 1px solid var(--accent); }

/* ---------------------------------------------
   TOC-style leader rows (CV + Contact)
--------------------------------------------- */
.leader-row { display: flex; align-items: baseline; gap: 0.5rem; }
.contact-list { list-style: none; margin: 0; padding: 0; max-width: 480px; }
.contact-list li.leader-row { padding: 0.75rem 0; border-top: 1px solid var(--rule); }
.contact-list li.leader-row:first-child { border-top: none; padding-top: 0; }
.leader-row .label { white-space: nowrap; font-weight: 600; font-size: 0.98rem; }
.leader-row .leader { flex: 1; border-bottom: 1px dotted var(--muted); margin-bottom: 0.3rem; min-width: 1rem; }
.leader-row .value { white-space: nowrap; color: var(--muted); font-size: 0.95rem; }
.leader-row .value a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent); }

.cv-item { padding: 0.9rem 0; border-top: 1px solid var(--rule); }
.cv-item:first-child { border-top: none; padding-top: 0; }
.cv-item .leader-row .label { font-size: 1.0625rem; }
.cv-detail { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.9rem; font-style: italic; }

.skills-list { margin: 0; padding: 0; list-style: none; }
.skills-list li { padding: 0.6rem 0; border-top: 1px solid var(--rule); font-size: 0.95rem; }
.skills-list li:first-child { border-top: none; }
.skills-list b { font-weight: 600; }

/* ---------------------------------------------
   Buttons
--------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.6rem 1.15rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background-color 120ms ease, color 120ms ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }

/* ---------------------------------------------
   Footer
--------------------------------------------- */
.site-footer { border-top: 1px solid var(--rule); padding: 1.75rem 0; color: var(--muted); font-size: 0.85rem; font-style: italic; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }

/* ---------------------------------------------
   Responsive
--------------------------------------------- */
@media (max-width: 640px) {
  h1.name { font-size: 2.1rem; }
  nav { gap: 1.1rem; }
  .wrap { padding: 0 1.5rem 0 2rem; }
  .hero-photo { width: 92px; height: 120px; margin-top: 1.5rem; }
  .hero-top { flex-direction: column; align-items: flex-start; }
}
