/* ------------------------------------------------------------------
   Casey M. Pennington: site styles
   Colors are defined once here. Change a value to restyle the site.
   ------------------------------------------------------------------ */
:root {
  --paper: #F6F0E4;        /* cream page background */
  --paper-deep: #EEE4D1;   /* tinted bands and cards */
  --card: #FBF7EF;         /* card surface */
  --ink: #2B2420;          /* main text */
  --ink-soft: #5E5249;     /* secondary text */
  --rule: #DCCDB4;         /* hairlines */
  --accent: #9B4426;       /* terracotta: links, headings accents */
  --accent-deep: #7A331B;  /* terracotta hover */
  --bright: #E8A33D;       /* marigold: decorative highlights only */
  --bright-soft: #F6DDAE;  /* pale marigold fills */

  --serif-display: "Fraunces", Georgia, "Times New Roman", serif;
  --serif-text: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-text);
  font-size: 1.125rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); text-decoration-color: var(--bright); text-decoration-thickness: 2px; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--bright); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--serif-display);
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
  font-variation-settings: "opsz" 72;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3rem); margin: 0 0 0.4em; }
h2 { font-size: clamp(1.55rem, 3vw, 2rem); margin: 0 0 0.6em; }
h3 { font-size: 1.25rem; margin: 0 0 0.4em; font-weight: 600; font-variation-settings: "opsz" 24; }

p { margin: 0 0 1em; }
em { font-style: italic; }
strong { font-weight: 600; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--ink-soft); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 10;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap;
}
.wordmark { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.wordmark:hover { color: var(--ink); }
.wordmark-name { font-family: var(--serif-display); font-size: 1.4rem; font-weight: 600; line-height: 1.2; }
.wordmark-sub { font-family: var(--sans); font-size: 0.78rem; color: var(--ink-soft); letter-spacing: 0.02em; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-nav a {
  font-family: var(--sans); font-size: 0.92rem; font-weight: 500;
  color: var(--ink); text-decoration: none; padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--accent); border-bottom-color: var(--bright); }
.site-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--bright); }

/* ---------- Shared bits ---------- */
.eyebrow, .callout-label, .card-kind, .lead-level, .related-label, .label {
  font-family: var(--sans); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 0.8em;
}
.eyebrow::before {
  content: ""; display: inline-block; width: 28px; height: 3px; border-radius: 2px;
  background: var(--bright); vertical-align: middle; margin-right: 10px; position: relative; top: -2px;
}

.btn {
  display: inline-block; font-family: var(--sans); font-size: 0.95rem; font-weight: 600;
  padding: 11px 20px; border-radius: 999px; text-decoration: none;
  border: 1.5px solid var(--ink); color: var(--ink); background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #FFF9F0; }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #FFF9F0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6em; }

.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-tint { background: var(--paper-deep); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 1.4em; }
.section-head h2 { margin: 0; }
.more { font-family: var(--sans); font-size: 0.92rem; font-weight: 500; text-decoration: none; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(40px, 6vw, 72px); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.lede { font-size: clamp(1.25rem, 2.2vw, 1.45rem); line-height: 1.5; color: var(--ink); font-family: var(--serif-display); font-variation-settings: "opsz" 24; }
.hero-text > p:not(.lede):not(.eyebrow):not(.actions) { color: var(--ink-soft); max-width: 38em; }

.hero-portrait { position: relative; justify-self: center; width: 100%; max-width: 340px; }
.hero-portrait::before {
  content: ""; position: absolute; inset: 18px -18px -18px 18px;
  border: 2px solid var(--bright); border-radius: 180px 180px var(--radius) var(--radius);
}
.portrait {
  position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 180px 180px var(--radius) var(--radius);
  background: var(--paper-deep);
}
.portrait-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--accent);
}
.portrait-placeholder span {
  font-family: var(--serif-display); font-size: 5rem; color: #FFF6E8; font-weight: 500; letter-spacing: 0.02em;
}

/* ---------- Stats ---------- */
.stats { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--card); }
.stats-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 28px 20px 26px; border-left: 1px solid var(--rule); display: flex; flex-direction: column; gap: 6px; }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-num {
  font-family: var(--serif-display); font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1; color: var(--accent);
  font-weight: 500; display: inline-block; align-self: flex-start;
  background: linear-gradient(transparent 68%, var(--bright-soft) 68%);
  padding: 0 4px; margin-left: -4px;
}
.stat-label { font-family: var(--sans); font-size: 0.86rem; color: var(--ink-soft); line-height: 1.4; }

/* ---------- Research strands (home) ---------- */
.strands { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }
.strand { border-top: 2px solid var(--ink); padding-top: 18px; }
.strand p { color: var(--ink-soft); font-size: 1.05rem; }
.strand-num { font-family: var(--sans); font-size: 0.8rem; font-weight: 600; color: var(--accent); display: inline-block; margin-bottom: 10px; }
.strand-num::after { content: ""; display: inline-block; width: 18px; height: 3px; background: var(--bright); border-radius: 2px; margin-left: 8px; vertical-align: middle; position: relative; top: -2px; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 26px 24px 20px; display: flex; flex-direction: column;
  box-shadow: 0 1px 0 rgba(43, 36, 32, 0.04);
}
.card:first-child { border-top: 4px solid var(--bright); }
.card h3 { font-size: 1.18rem; line-height: 1.3; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); text-decoration: underline; text-decoration-color: var(--bright); }
.card-venue { font-size: 0.98rem; color: var(--accent); margin-bottom: 0.6em; }
.card p:last-child { color: var(--ink-soft); font-size: 1rem; margin-bottom: 0; }

/* ---------- News ---------- */
.news { list-style: none; margin: 0; padding: 0; }
.news li { display: grid; grid-template-columns: 8.5em 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--rule); font-size: 1.02rem; }
.news li:last-child { border-bottom: 1px solid var(--rule); }
.news-date { font-family: var(--sans); font-size: 0.84rem; font-weight: 600; color: var(--accent); padding-top: 3px; }

/* ---------- Interior pages ---------- */
.page-head { padding: clamp(40px, 6vw, 80px) 0 clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--rule); margin-bottom: clamp(32px, 5vw, 56px); }
.page-head h1 { max-width: 18em; }
.page-intro { font-size: clamp(1.15rem, 2vw, 1.3rem); color: var(--ink-soft); max-width: 40em; margin: 0; font-family: var(--serif-display); font-variation-settings: "opsz" 24; line-height: 1.5; }
.page-body { padding-bottom: clamp(56px, 8vw, 96px); }
.prose { max-width: 42em; }
.section-block { margin-top: clamp(44px, 6vw, 72px); }
.section-block.first { margin-top: 0; }

/* Research strands (research page) */
.research-strand { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 24px; margin-top: clamp(40px, 5vw, 60px); padding-top: 28px; border-top: 1px solid var(--rule); }
.strand-label .strand-num { font-size: 1rem; }
.strand-body { max-width: 44em; }
.related { list-style: none; margin: 0; padding: 0; font-size: 1rem; }
.related li { padding: 4px 0 4px 18px; position: relative; }
.related li::before { content: ""; position: absolute; left: 0; top: 0.85em; width: 8px; height: 8px; border-radius: 50%; background: var(--bright); }

.callout {
  background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--bright);
  border-radius: var(--radius); padding: 22px 24px; margin-top: 1.4em;
}
.callout h3 { font-size: 1.15rem; line-height: 1.35; }
.callout p:last-child { margin-bottom: 0; }

.tags { list-style: none; margin: 0 0 1.2em; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li {
  font-family: var(--sans); font-size: 0.88rem; padding: 7px 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--rule);
}

/* Publications */
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.jump a {
  font-family: var(--sans); font-size: 0.88rem; font-weight: 500; text-decoration: none;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--rule); background: var(--card); color: var(--ink);
}
.jump a:hover { border-color: var(--bright); color: var(--accent); }
.pub-group { margin-bottom: clamp(40px, 5vw, 60px); scroll-margin-top: 24px; }
.pub-group h2 { padding-bottom: 10px; border-bottom: 2px solid var(--ink); margin-top: 1.4em; }
.pub-group h2:first-child { margin-top: 0; }
.cites { list-style: none; margin: 0; padding: 0; max-width: 50em; }
.cite { padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 1.04rem; }
.cite strong, .talk-meta strong { white-space: nowrap; }
.cite strong { color: var(--ink); background: linear-gradient(transparent 70%, var(--bright-soft) 70%); }
.cite-title { color: var(--ink); }
.cite-link { font-family: var(--sans); font-size: 0.84rem; font-weight: 600; margin-left: 6px; text-decoration: none; white-space: nowrap; }

.year-block { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 16px; border-bottom: 1px solid var(--rule); padding: 14px 0; }
.year { font-family: var(--serif-display); font-size: 1.5rem; color: var(--accent); margin: 0; line-height: 1.3; }
.talks { list-style: none; margin: 0; padding: 0; }
.talks li { padding: 8px 0 12px; display: flex; flex-direction: column; gap: 2px; }
.pub-group > .talks li { border-bottom: 1px solid var(--rule); padding: 14px 0; }
.talk-type { font-family: var(--sans); font-size: 0.74rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--accent); }
.talk-title { font-size: 1.06rem; }
.talk-meta { font-size: 0.95rem; color: var(--ink-soft); }

/* Teaching */
.split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.aside-card { background: var(--card); border: 1px solid var(--rule); border-top: 4px solid var(--bright); border-radius: var(--radius); padding: 22px 24px; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 10px 0; border-top: 1px solid var(--rule); font-size: 1rem; }
.plain li:first-child { border-top: 0; padding-top: 0; }
.aside-year { font-family: var(--sans); font-size: 0.8rem; font-weight: 600; color: var(--accent); display: block; }

.course-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.course { display: grid; grid-template-columns: 5.2em minmax(0, 1fr); gap: 14px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 20px; }
.course h3 { font-size: 1.08rem; line-height: 1.35; margin-bottom: 4px; }
.course-code { font-family: var(--sans); font-weight: 600; font-size: 0.86rem; color: var(--accent); margin: 3px 0 0; }
.course-meta { font-family: var(--sans); font-size: 0.82rem; color: var(--ink-soft); margin: 0; }

.quotes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
blockquote { margin: 0; }
.quotes blockquote { background: var(--bright-soft); border-radius: var(--radius); padding: 26px 26px 20px; }
.quotes blockquote p { font-family: var(--serif-display); font-size: 1.25rem; line-height: 1.45; font-variation-settings: "opsz" 24; }
.quotes blockquote footer { font-family: var(--sans); font-size: 0.8rem; color: var(--ink-soft); }

.bullets { padding-left: 1.2em; max-width: 46em; }
.bullets li { margin-bottom: 0.6em; }
.bullets li::marker { color: var(--bright); }
.bullets.compact li { margin-bottom: 0.2em; font-size: 1rem; }

/* Service */
.lead-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lead-card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px 22px 18px; display: flex; flex-direction: column; }
.lead-card h3 { margin-bottom: 0.3em; }
.lead-card p { font-size: 1rem; }
.lead-years { font-family: var(--sans); font-size: 0.82rem; color: var(--ink-soft); margin-top: auto; margin-bottom: 0; }
.lead-level { margin-bottom: 0.6em; }

.feature { margin-top: clamp(44px, 6vw, 72px); background: var(--accent); color: #FFF6E8; border-radius: calc(var(--radius) + 6px); padding: clamp(28px, 5vw, 56px); position: relative; overflow: hidden; }
.feature::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 18px solid var(--bright); opacity: 0.9; }
.feature-text { max-width: 44em; position: relative; z-index: 1; }
.feature h2 { color: #FFF6E8; }
.feature .callout-label { color: var(--bright-soft); }
.feature a { color: #FFF6E8; text-decoration-color: var(--bright); }
.feature a:hover { color: #fff; }
.pull { border-left: 4px solid var(--bright); padding-left: 18px; margin: 1.2em 0; }
.pull p { font-family: var(--serif-display); font-size: 1.35rem; line-height: 1.4; font-variation-settings: "opsz" 36; }

.service-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px clamp(28px, 5vw, 56px); }
.service-group h3 { padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.service-list { list-style: none; margin: 0 0 1.4em; padding: 0; }
.service-list li { padding: 10px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; font-size: 1rem; }
.svc-role { font-family: var(--sans); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); grid-column: 1; }
.svc-body { grid-column: 1; }
.svc-years { grid-column: 2; grid-row: 1 / span 2; font-family: var(--sans); font-size: 0.82rem; color: var(--ink-soft); white-space: nowrap; align-self: start; padding-top: 2px; }

/* CV */
.cv { margin-top: 36px; }
.cv-row { display: grid; grid-template-columns: 14em minmax(0, 1fr); gap: 24px; padding: 28px 0; border-top: 1px solid var(--rule); }
.cv-row h2 { font-size: 1.35rem; margin: 0; }
.cv-list { list-style: none; margin: 0; padding: 0; }
.cv-list li { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 16px; padding-bottom: 14px; font-size: 1.02rem; }
.cv-year { font-family: var(--sans); font-size: 0.86rem; font-weight: 600; color: var(--accent); padding-top: 3px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #E9DFCE; padding: 56px 0 24px; font-size: 1rem; }
.site-footer a { color: #FFF6E8; text-decoration-color: var(--bright); }
.site-footer a:hover { color: var(--bright); }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1.3fr 1fr; gap: 32px; }
.footer-name { font-family: var(--serif-display); font-size: 1.3rem; color: #FFF6E8; margin-bottom: 0.3em; }
.site-footer .label { color: var(--bright); }
.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 4px; }
.footer-base { margin-top: 40px; padding-top: 18px; border-top: 1px solid rgba(233, 223, 206, 0.2); font-family: var(--sans); font-size: 0.82rem; color: #BFB3A2; }
.footer-base p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .cards, .lead-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 1.06rem; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .site-nav ul { gap: 2px 18px; }
  .hero-inner { grid-template-columns: 1fr; }
  h1 { font-size: min(7.6vw, 3rem); }
  .hero-portrait { order: -1; max-width: 150px; justify-self: center; left: -4px; }
  .hero-portrait::before { inset: 8px -8px -8px 8px; }
  .portrait-placeholder span { font-size: 2.8rem; }
  .strands, .cards, .lead-grid, .two-col, .split, .course-list, .quotes, .service-groups, .footer-inner { grid-template-columns: 1fr; }
  .research-strand { grid-template-columns: 1fr; gap: 6px; }
  .news li { grid-template-columns: 1fr; gap: 2px; }
  .year-block { grid-template-columns: 1fr; gap: 4px; }
  .cv-row { grid-template-columns: 1fr; gap: 12px; }
  .cv-list li { grid-template-columns: 5.5em minmax(0, 1fr); gap: 10px; }
  .course { grid-template-columns: 1fr; gap: 4px; }
  .feature::after { width: 140px; height: 140px; right: -50px; top: -50px; border-width: 12px; }
}

@media (max-width: 420px) {
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .stat { padding: 20px 12px 18px; }
  .stat:nth-child(odd) { padding-left: 0; }
}

@media print {
  .site-header nav, .actions, .jump, .skip-link { display: none; }
  body { background: #fff; }
  .site-footer { background: #fff; color: #000; }
}
