/* Day-Lachner Lab: public site
   Palette
     paper  #F1F0EA  page background (cool off-white)
     ink    #172B28  body text (green-charcoal)
     pine   #1E4A42  headings, primary actions
     sage   #61776E  secondary text
     rule   #D3D5CB  hairlines
     wash   #E3E7DE  quiet surfaces
   Type
     Newsreader (serif): headings, lede, publication titles
     Public Sans: navigation, body copy, metadata
*/

:root {
  --paper: #f1f0ea;
  --ink: #172b28;
  --pine: #1e4a42;
  --sage: #61776e;
  --rule: #d3d5cb;
  --wash: #e3e7de;
  --white: #fbfbf8;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --s1: 0.5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2.5rem; --s5: 4rem; --s6: 6.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pine); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--pine); outline-offset: 3px; border-radius: 2px; }
p { margin: 0 0 var(--s2); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--pine); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.75rem); line-height: 1.02; font-weight: 300; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.15rem); line-height: 1.15; }
h3 { font-size: 1.35rem; line-height: 1.25; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--pine); color: var(--white); padding: var(--s1) var(--s2); z-index: 10; }
.skip:focus { left: var(--s2); top: var(--s2); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: var(--s3); }
.wordmark { font-family: var(--serif); font-size: 1.4rem; color: var(--pine); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.nav-desktop { display: flex; gap: clamp(1rem, 2.4vw, 2rem); }
.nav-desktop a, .nav-mobile nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.nav-desktop a:hover, .nav-desktop a[aria-current="page"] { color: var(--pine); text-decoration: underline; text-underline-offset: 0.45em; }
.nav-mobile { display: none; position: relative; }
.nav-mobile summary { list-style: none; cursor: pointer; font-size: 0.95rem; padding: var(--s1) 0; color: var(--pine); }
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile[open] nav {
  position: absolute; right: 0; top: 100%; display: flex; flex-direction: column; gap: var(--s2);
  background: var(--white); border: 1px solid var(--rule); padding: var(--s3); min-width: 220px; border-radius: 6px;
}
@media (max-width: 760px) { .nav-desktop { display: none; } .nav-mobile { display: block; } }

/* Hero */
.hero { padding: var(--s6) 0 var(--s5); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s4); align-items: center; }
.hero h1 { max-width: 13ch; }
.lede { font-family: var(--serif); font-size: clamp(1.2rem, 1.8vw, 1.45rem); line-height: 1.5; color: var(--ink); max-width: 38em; margin-top: var(--s3); font-weight: 400; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s4); }
.button {
  display: inline-block; background: var(--pine); color: var(--white); text-decoration: none;
  padding: 0.8rem 1.35rem; border-radius: 3px; font-weight: 500; font-size: 0.95rem;
}
.button:hover { background: var(--ink); }
.link-quiet { color: var(--ink); font-size: 0.95rem; }
.hero-figure { margin: 0; }

.trajectory { width: 100%; height: auto; overflow: visible; }
.traj-axes line { stroke: var(--rule); stroke-width: 1; }
.traj-field path { fill: none; stroke: var(--sage); stroke-width: 1.2; opacity: 0.45; }
.traj-rapid { fill: none; stroke: var(--pine); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 640; stroke-dashoffset: 0; }
.traj-dot { fill: var(--paper); stroke: var(--pine); stroke-width: 2; }
@media (prefers-reduced-motion: no-preference) {
  .traj-rapid { stroke-dashoffset: 640; animation: draw 2.4s 0.4s cubic-bezier(.6,.05,.3,1) forwards; }
  .traj-dot { opacity: 0; animation: appear 0.4s 1.3s forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes appear { to { opacity: 1; } }
}
@media (max-width: 860px) {
  .hero { padding: var(--s5) 0 var(--s4); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { max-width: 440px; }
}

/* Sections: heading column + content column */
.band { padding: var(--s5) 0; border-top: 1px solid var(--rule); }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s3) var(--s4); align-items: start; }
.section-head { position: sticky; top: 96px; }
.section-intro, .section-intro p { color: var(--sage); max-width: 30em; margin-top: var(--s2); }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .section-head { position: static; }
}

.about { background: var(--wash); border-top: 0; }
.about-text p { font-family: var(--serif); font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.35; color: var(--pine); max-width: 28em; font-weight: 300; }

/* Research areas */
.areas { border-top: 1px solid var(--rule); }
.area { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--rule); }
.area h3 a { color: var(--pine); text-decoration: none; }
.area h3 a:hover { text-decoration: underline; }
.area p { margin: 0; color: var(--ink); }
@media (max-width: 600px) { .area { grid-template-columns: 1fr; gap: var(--s1); } }

.research-detail { padding: var(--s4) 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 96px; }
.research-detail:first-child { padding-top: 0; }
.research-detail:last-child { border-bottom: 0; }
.research-image { margin: var(--s3) 0; border-radius: 4px; }
.prose { max-width: 40em; }

/* People */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s4) var(--s3); }
.people-grid-compact { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.person-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; background: var(--wash); margin-bottom: var(--s2); }
.person-initials { display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 3rem; color: var(--sage); font-weight: 300; }
.person-name { font-size: 1.3rem; }
.person-name .cred { font-family: var(--sans); font-size: 0.85rem; color: var(--sage); letter-spacing: 0; }
.person-role { color: var(--sage); font-size: 0.95rem; margin: 0.25rem 0 var(--s1); }
.person-bio { font-size: 0.95rem; }
.person-links { display: flex; gap: var(--s2); font-size: 0.92rem; margin: 0; }
@media (max-width: 600px) {
  .people-grid, .people-grid-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3) var(--s2); }
  .person-initials { font-size: 2.2rem; }
  .person-name { font-size: 1.1rem; }
}

.alumni { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.alumni li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s1) var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--rule); }
.alumni-role { color: var(--sage); }

/* Publications */
.pubs { list-style: none; margin: 0; padding: 0; }
.pub { padding: var(--s3) 0; border-bottom: 1px solid var(--rule); }
.pub:first-child { padding-top: 0; }
.pub-title { font-family: var(--serif); font-size: 1.22rem; line-height: 1.35; margin-bottom: var(--s1); }
.pub-title a { color: var(--pine); text-decoration: none; }
.pub-title a:hover { text-decoration: underline; }
.pub-authors { font-size: 0.92rem; color: var(--ink); margin-bottom: 0.25rem; }
.pub-meta { font-size: 0.92rem; color: var(--sage); margin: 0; display: flex; flex-wrap: wrap; gap: 0 var(--s2); }
.pub-meta cite { font-style: italic; }
.year-group { padding: var(--s4) 0; border-bottom: 1px solid var(--rule); }
.year-group:first-child { padding-top: 0; }
.year { font-size: clamp(2rem, 4vw, 3rem); font-weight: 300; color: var(--sage); position: sticky; top: 96px; }
@media (max-width: 860px) { .year { position: static; } }

/* News */
.news-list { border-top: 1px solid var(--rule); }
.news-item { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--rule); }
.news-date { color: var(--sage); font-size: 0.92rem; margin: 0; padding-top: 0.3rem; }
.news-title { font-size: 1.3rem; }
.news-list-full .news-title { font-size: 1.5rem; }
.news-title a { color: var(--pine); text-decoration: none; }
.news-title a:hover { text-decoration: underline; }
.news-summary { margin: var(--s1) 0 0; }
@media (max-width: 600px) { .news-item { grid-template-columns: 1fr; gap: 0.25rem; } }
.news-detail { padding: var(--s5) 0 var(--s6); }
.news-detail h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); margin-bottom: var(--s2); }
.news-image { margin: var(--s3) 0; border-radius: 4px; }
.crumb { font-size: 0.92rem; margin-bottom: var(--s3); }

/* Page heads, join, contact */
.page-head { padding: var(--s5) 0 var(--s4); }
.page-head h1 { font-size: clamp(2.5rem, 5.5vw, 4rem); }
.lede-block p { font-family: var(--serif); font-size: clamp(1.2rem, 1.8vw, 1.45rem); line-height: 1.5; max-width: 34em; }
.join-band { background: var(--pine); color: var(--white); border-top: 0; }
.join-band h2 { color: var(--white); }
.join-band p { max-width: 36em; }
.join-band .button { background: var(--white); color: var(--pine); }
.join-band .button:hover { background: var(--wash); }
.join-band :focus-visible { outline-color: var(--white); }
.contact { margin: 0; display: grid; gap: var(--s3); }
.contact dt { font-size: 0.85rem; color: var(--sage); }
.contact dd { margin: 0; font-family: var(--serif); font-size: 1.25rem; }
.more { margin-top: var(--s3); font-size: 0.95rem; }
.empty { color: var(--sage); font-style: italic; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: var(--s5) 0 var(--s3); font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: var(--s4); }
.footer-grid nav { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-grid nav a { color: var(--ink); text-decoration: none; }
.footer-grid nav a:hover { text-decoration: underline; }
.wordmark-footer { margin-bottom: var(--s1); }
address { font-style: normal; color: var(--sage); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); margin-top: var(--s4); color: var(--sage); }
.footer-base p { margin: 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: var(--s3); } }

@media print {
  .site-header, .site-footer, .hero-figure, .hero-actions { display: none; }
  body { background: #fff; }
}
