/* michael-dunn.org — Classic Faculty / EB Garamond + Karla
   Type scale is deliberately generous. Edit the variables below to retune the whole site. */

:root {
  --serif: 'EB Garamond', Garamond, 'Times New Roman', Georgia, serif;
  --sans: 'Karla', 'Helvetica Neue', Arial, sans-serif;
  --ink: #1f1f1d;
  --ink-soft: #4a463e;
  --ink-mute: #7d7563;
  --paper: #fbfaf7;
  --paper-2: #f2efe7;
  --rule: #d9d4c7;
  --accent: #7a2e1c;
  --accent-dark: #4d1c10;
  --measure: 40rem;
  --gutter: clamp(1.25rem, 5vw, 7.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.125rem;          /* 18px */
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 3vw, 2rem); }
h3 { font-size: 1.5rem; }
p { margin: 0; }
p + p { margin-top: 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
strong { font-weight: 700; }
em { font-style: italic; }
img { max-width: 100%; height: auto; display: block; }
.lede { font-family: var(--serif); font-size: clamp(1.4rem, 2.2vw, 1.6rem); line-height: 1.45; color: #2a2823; }
.muted { color: var(--ink-mute); }
.small { font-size: 0.95rem; }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2.5rem; margin-bottom: 0.75rem; }
.prose h3 { margin-top: 2rem; margin-bottom: 0.5rem; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0.75em 0; }
.prose li + li { margin-top: 0.35em; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.5rem 1rem; }
.skip:focus { left: 1rem; z-index: 10; }

/* Header */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  padding: 1.5rem var(--gutter); border-bottom: 1px solid var(--rule);
}
.brand { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; font-size: 0.95rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.nav a { color: var(--ink); padding: 0.4rem 0; }
.nav a[aria-current="page"] { color: var(--accent); border-bottom: 2px solid var(--accent); }
.nav a:hover { text-decoration: none; color: var(--accent); }

/* Layout */
.section { padding: 3.5rem var(--gutter); }
.section + .section { padding-top: 0; }
.section-title { padding-bottom: 0.75rem; border-bottom: 1px solid var(--rule); margin-bottom: 1.5rem; }
.hero { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 3rem; align-items: start; padding: 4.5rem var(--gutter) 3.5rem; }
.hero .stack { display: flex; flex-direction: column; gap: 1.5rem; }
.hero .lede { max-width: 46rem; }
.hero .prose { max-width: 46rem; }
.portrait { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #e6e1d5; }
.portrait-placeholder { width: 100%; aspect-ratio: 4 / 5; background: #e6e1d5; border: 1px dashed #b8b09f; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1rem; color: var(--ink-mute); font-size: 0.95rem; }
.aside { display: flex; flex-direction: column; gap: 1.25rem; font-size: 1rem; line-height: 1.55; color: var(--ink-soft); }
.aside .links { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.btn { display: inline-flex; align-items: center; min-height: 3rem; padding: 0 1.5rem; background: var(--accent); color: #fff; font-weight: 700; font-size: 1rem; }
.btn:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.ghost:hover { background: var(--accent); color: #fff; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.card { display: flex; flex-direction: column; gap: 0.6rem; }
.card h3 { font-size: 1.5rem; }
.card .meta { font-size: 0.95rem; color: var(--ink-mute); }
.card p { color: var(--ink-soft); }

/* Page header */
.page-head { padding: 3.5rem var(--gutter) 2rem; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 1rem; }
.page-head .lede { max-width: 46rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr); gap: 3rem; align-items: start; }
.sidebar { position: sticky; top: 1.5rem; font-size: 1rem; line-height: 1.6; color: var(--ink-soft); display: flex; flex-direction: column; gap: 1rem; border-left: 1px solid var(--rule); padding-left: 1.5rem; }
.sidebar h3 { font-size: 1.15rem; font-family: var(--sans); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li + li { margin-top: 0.4rem; }

/* Publications */
.pub-controls { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.pub-controls button { font: inherit; font-size: 0.95rem; font-weight: 700; min-height: 2.75rem; padding: 0 1rem; background: transparent; border: 1px solid var(--rule); color: var(--ink-soft); cursor: pointer; }
.pub-controls button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pub-year { margin-top: 2rem; margin-bottom: 0.5rem; font-family: var(--serif); font-size: 1.5rem; }
.pub-list { list-style: none; margin: 0; padding: 0; max-width: 56rem; }
.pub-list li { padding: 0.9rem 0; border-bottom: 1px solid var(--rule); line-height: 1.5; }
.pub-list .pub-title { font-family: var(--serif); font-size: 1.25rem; }
.pub-list .pub-venue { color: var(--ink-soft); }
.pub-list .pub-links { font-size: 0.95rem; margin-top: 0.25rem; }
.pub-list .tag { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-mute); margin-left: 0.5rem; }

/* Courses */
.course { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1.5rem; padding: 1.25rem 0; border-top: 1px solid var(--rule); }
.course .code { font-weight: 700; color: var(--ink-mute); }
.course h3 { font-size: 1.4rem; margin-bottom: 0.35rem; }

/* CV embed */
.cv-frame { width: 100%; height: 80vh; border: 1px solid var(--rule); background: #fff; }

/* Footer */
.site-footer { margin-top: 3rem; padding: 1.75rem var(--gutter); border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; font-size: 0.95rem; color: var(--ink-mute); }
.site-footer a { color: var(--ink-mute); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; }
  .hero .aside { order: 2; }
  .hero .stack { order: 1; }
  .hero .portrait, .hero .portrait-placeholder { max-width: 260px; }
  .cards { grid-template-columns: 1fr; gap: 2rem; }
  .two-col { grid-template-columns: 1fr; }
  .sidebar { position: static; border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 1.5rem; }
  .course { grid-template-columns: 1fr; gap: 0.25rem; }
}
@media (max-width: 600px) {
  body { font-size: 1.0625rem; }
  .site-header { padding: 1.25rem var(--gutter); }
  .nav { gap: 0.25rem 1.1rem; font-size: 0.85rem; }
  .hero { padding-top: 2.5rem; }
  .section { padding: 2.5rem var(--gutter); }
}
@media print {
  .site-header, .site-footer, .actions, .pub-controls { display: none; }
  body { background: #fff; color: #000; }
}
