/* anthonybald.com — single stylesheet, no build step */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #1b2533;
  --ink-2: #4a5566;
  --ink-3: #6b7482;
  --rule: #e4e1da;
  --accent: #1f4e8c;       /* navy link */
  --serif: "Source Serif 4", "Palatino", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max: 1040px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
em { font-style: italic; }
.muted { color: var(--ink-3); }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: 24px; padding-right: 24px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.site-name { font: 600 19px/1 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.site-header ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.site-header nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }

/* Headings */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
h1 { font-size: clamp(34px, 5vw, 46px); line-height: 1.1; margin: 0 0 12px; }
h2 { font-size: 24px; line-height: 1.25; margin: 0 0 20px; }

/* Home intro */
.intro { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.portrait { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; border-radius: 6px; background: var(--rule); }
.eyebrow { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.role { font: 400 20px/1.45 var(--serif); color: var(--ink-2); margin: 0 0 24px; }
.role a { color: inherit; }
.intro-text > p:not(.eyebrow) { max-width: 62ch; }
.link-row { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.link-row a {
  display: inline-block; padding: 7px 14px; border: 1px solid var(--rule); border-radius: 999px;
  background: var(--surface); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500;
}
.link-row a:hover { border-color: var(--accent); color: var(--accent); }

/* Sections */
.section { padding: 8px 0 40px; }
.wrap.section { border-top: 1px solid var(--rule); padding-top: 48px; padding-bottom: 72px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.section-head h2 { margin: 0; }
.more { font-size: 15px; font-weight: 500; }

/* Papers */
.subhead { font: 600 13px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin: 28px 0 0; }
.paper-list { display: grid; gap: 0; }
.paper { padding: 22px 0; border-bottom: 1px solid var(--rule); }
.paper:last-child { border-bottom: 0; }
.paper-title { font-size: 20px; line-height: 1.35; margin: 0 0 6px; max-width: 48ch; }
.paper-title a { color: var(--ink); text-decoration-color: var(--rule); }
.paper-title a:hover { color: var(--accent); text-decoration-color: currentColor; }
.paper-authors, .paper-venue { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.paper-venue strong { font-weight: 600; color: var(--ink); }
.paper-links { margin: 8px 0 0; font-size: 14.5px; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; }
.media-label { color: var(--ink-3); margin-right: -8px; }
.abstract { margin-top: 10px; }
.abstract summary {
  cursor: pointer; font-size: 14.5px; font-weight: 500; color: var(--ink-2);
  list-style: none; display: inline-flex; align-items: center; gap: 6px;
}
.abstract summary::-webkit-details-marker { display: none; }
.abstract summary::before { content: "+"; display: inline-block; width: 1em; text-align: center; color: var(--accent); font-weight: 600; }
.abstract[open] summary::before { content: "−"; }
.abstract p { margin: 10px 0 4px; max-width: 72ch; color: var(--ink-2); font-size: 15.5px; line-height: 1.7; }

/* Interior pages */
.page { padding-top: 56px; padding-bottom: 72px; }
.page-head { margin-bottom: 20px; }
.lede { font: 400 20px/1.5 var(--serif); color: var(--ink-2); margin: 0; }
.page-links { display: flex; gap: 20px; margin: 0 0 36px; font-weight: 500; font-size: 15px; }
.page .section h2 { padding-top: 28px; border-top: 1px solid var(--rule); margin-bottom: 4px; }

.course-list { list-style: none; padding: 0; margin: 12px 0 0; }
.course-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.course { font-weight: 500; }
.term { color: var(--ink-3); white-space: nowrap; font-size: 15px; }
.note { color: var(--ink-2); font-size: 15.5px; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); background: var(--surface); font-size: 14.5px; color: var(--ink-2); }
.footer-inner { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 32px; }
.site-footer strong { color: var(--ink); font-weight: 600; }

/* Mobile */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding-left: 18px; padding-right: 18px; }
  .page { padding-top: 40px; padding-bottom: 56px; }
  .header-inner { height: 60px; }
  .site-header ul { gap: 18px; }
  .intro { grid-template-columns: 1fr; gap: 28px; padding-top: 32px; padding-bottom: 40px; }
  .portrait { width: 160px; border-radius: 50%; aspect-ratio: 1; }
  .role { font-size: 18px; }
  .paper-title { font-size: 18px; }
  .course-list li { flex-direction: column; gap: 2px; }
}

@media print {
  .site-header nav, .link-row, .site-footer { display: none; }
  .abstract > p { display: block; }
}
