/* =========================================================
   Alyson East — personal site
   One stylesheet drives every page. Edit tokens below to
   restyle the whole site at once.
   ========================================================= */

:root {
  /* Earth tones. Source swatches: #DDCBB7 sand, #7B4B36 bark,
     #264025 deep forest, #82896E lichen, #AD6B4B terracotta. */
  --paper:      #f7f2ea;  /* warm sand-paper background, tint of #DDCBB7 */
  --paper-deep: #ece1d2;  /* slightly recessed panels, photo placeholders */
  --surface:    #fffdf9;  /* raised surfaces, photos          */
  --ink:        #264025;  /* deep forest green                */
  --ink-soft:   #545a49;  /* secondary text                   */
  --ink-faint:  #6b7059;  /* captions, dates (lichen, darkened for contrast) */
  --line:       #ddd0bd;  /* hairline dividers                */
  --accent:     #7b4b36;  /* bark brown: links, interaction   */
  --accent-deep:#5c3626;  /* hover / active                   */
  --accent-warm:#ad6b4b;  /* terracotta: decorative marks only, not text */
  --lichen:     #82896e;  /* muted sage, decorative           */

  --measure: 68ch;        /* prose line length                */
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1060px;
}

/* ---------- reset-ish ---------- */
*, *::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: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

img { max-width: 100%; display: block; }
a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color .15s ease;
}
a:hover { color: var(--accent-deep); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--measure); }

section { padding: 64px 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); line-height: 1.15; }
h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem);
  margin: 0 0 1.4rem;
  letter-spacing: -0.01em;
}
h3 { font-size: 1.2rem; margin: 0 0 .4rem; }
p { margin: 0 0 1.1rem; max-width: var(--measure); }
.lead { font-size: 1.12rem; color: var(--ink-soft); }

/* ---------- nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap;
}
.brand {
  font-family: var(--serif); font-size: 1.15rem; font-weight: 600;
  color: var(--ink); text-decoration: none; letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.nav-links { display: flex; gap: 22px; flex-wrap: wrap; }
.nav-links a {
  font-size: .82rem; letter-spacing: .04em; color: var(--ink-soft);
  text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid transparent;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding-top: 72px; padding-bottom: 56px; }
.hero-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 1.4rem + 3.4vw, 3.6rem);
  margin: 0 0 .5rem; letter-spacing: -0.02em;
}
.role {
  font-family: var(--sans); font-size: 1.05rem; color: var(--accent);
  font-weight: 500; margin: 0 0 1.6rem;
}
.hero-photo {
  border-radius: 3px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  width: 100%;
  background: var(--paper-deep);
  box-shadow: 0 1px 0 var(--line);
}
.hero-reveal { opacity: 0; transform: translateY(10px); animation: rise .7s ease forwards; }
.hero-reveal.d1 { animation-delay: .05s; }
.hero-reveal.d2 { animation-delay: .16s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .hero-reveal { opacity: 1; transform: none; }
}

/* ---------- link row ---------- */
.links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 4px; list-style: none; padding: 0; }
.links a { font-size: .9rem; }

/* ---------- highlights ---------- */
.highlights { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.highlights li {
  padding: 14px 0 14px 22px; position: relative; border-bottom: 1px solid var(--line);
}
.highlights li:last-child { border-bottom: 0; }
.highlights li::before {
  content: ""; position: absolute; left: 0; top: 24px;
  width: 7px; height: 7px; background: var(--accent-warm); border-radius: 50%;
}

/* ---------- research ---------- */
.research-lede { margin-bottom: 40px; }
.area { display: grid; grid-template-columns: 200px 1fr; gap: 28px; margin-bottom: 40px; align-items: start; }
.area:last-child { margin-bottom: 0; }
.area img { border-radius: 3px; aspect-ratio: 5 / 4; object-fit: cover; background: var(--paper-deep); }
.area .body { max-width: var(--measure); }
.area h3 { margin-bottom: .5rem; }
.area p { margin-bottom: 0; }

.more-research { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 28px; }
.more-research h3 { font-family: var(--sans); font-size: .95rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 1rem; }
.more-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 40px; }
.more-list dt { font-family: var(--serif); font-size: 1.02rem; margin-bottom: 2px; }
.more-list dd { margin: 0 0 0 0; color: var(--ink-soft); font-size: .95rem; }
.more-list > div { max-width: 40ch; }

/* ---------- publications ---------- */
.pub-list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.pub-list li { padding: 16px 0; border-bottom: 1px solid var(--line); max-width: 82ch; }
.pub-list li:last-child { border-bottom: 0; }
.pub-authors { }
.pub-authors .me { font-weight: 600; }
.pub-title { font-family: var(--serif); font-size: 1.08rem; }
.pub-venue { color: var(--ink-soft); font-style: italic; }
.pub-meta { font-size: .82rem; color: var(--ink-faint); }
.year-head {
  font-family: var(--sans); font-weight: 600; font-size: .8rem;
  letter-spacing: .06em; color: var(--ink-faint);
  margin: 34px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--ink);
}
.year-head:first-of-type { margin-top: 0; }

/* ---------- teaching ---------- */
.course { padding: 20px 0; border-bottom: 1px solid var(--line); }
.course:last-child { border-bottom: 0; }
.course h3 { margin-bottom: .2rem; }
.course .where { font-size: .85rem; color: var(--ink-faint); margin-bottom: .5rem; }
.course p { margin-bottom: 0; }

/* ---------- news ---------- */
.news-year { font-family: var(--serif); font-size: 1.9rem; margin: 48px 0 4px; }
.news-year:first-child { margin-top: 0; }
.news-month {
  font-family: var(--sans); font-weight: 600; font-size: .78rem;
  letter-spacing: .08em; color: var(--accent); text-transform: uppercase;
  margin: 26px 0 8px;
}
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { padding: 12px 0; border-bottom: 1px solid var(--line); max-width: 80ch; }
.news-list li:last-child { border-bottom: 0; }

/* ---------- contact / footer ---------- */
.contact p { max-width: var(--measure); }
.contact .lines { font-size: .98rem; line-height: 1.9; }
footer {
  border-top: 1px solid var(--line); padding: 32px 0 48px;
  color: var(--ink-faint); font-size: .82rem;
}
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- utilities ---------- */
.section-link { font-size: .85rem; margin-top: 22px; display: inline-block; }
.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-photo { max-width: 300px; }
  .area { grid-template-columns: 1fr; gap: 14px; }
  .area img { max-width: 320px; }
  .more-list { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  section { padding: 48px 0; }
  .nav-links { gap: 16px; }
  footer .wrap { flex-direction: column; }
}

/* ---------- research text blocks (no-image variant) ---------- */
.rblock { margin-bottom: 32px; max-width: var(--measure); }
.rblock:last-of-type { margin-bottom: 0; }
.rblock h3 { margin-bottom: .35rem; }
.rblock p { margin-bottom: 0; }
.photo-credit { font-size: .78rem; color: var(--ink-faint); margin-top: 6px; }

/* ---------- single-column hero ---------- */
.hero-inner { max-width: 820px; }
.hero-inner .role { max-width: 46ch; }
.hero-inner p:not(.role) { max-width: var(--measure); }

/* =========================================================
   Project detail pages, metrics, teaching, gallery
   ========================================================= */

/* back link */
.backlink { font-size: .85rem; display: inline-block; margin-bottom: 20px; }

/* project sub-hero */
.subhero { padding-top: 56px; padding-bottom: 8px; }
.subhero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2rem, 1.3rem + 2.4vw, 3rem);
  letter-spacing: -0.02em; margin: 0 0 .6rem;
}
.subhero .role { max-width: 60ch; margin-bottom: 0; }
.subhero-img {
  width: 100%; aspect-ratio: 21 / 9; object-fit: cover;
  border-radius: 3px; margin-top: 28px; background: var(--paper-deep);
}

/* prose wrapper */
.prose { max-width: var(--measure); }
.prose p { max-width: var(--measure); }

/* metrics strip: live badges + manual stats */
.metrics {
  display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-end;
  padding: 26px 0 30px; margin: 4px 0 8px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.metric { display: flex; flex-direction: column; gap: 10px; min-width: 88px; }
.metric-badge { min-height: 64px; display: flex; align-items: center; }
.metric-num {
  font-family: var(--serif); font-size: 2.4rem; line-height: 1;
  color: var(--ink); font-weight: 500;
}
.metric-label { font-size: .8rem; color: var(--ink-faint); max-width: 20ch; line-height: 1.35; }
.metrics-note { font-size: .78rem; color: var(--ink-faint); margin-top: 4px; }

/* inline publication list on project pages */
.pub-inline { list-style: none; margin: 0; padding: 0; }
.pub-inline li { padding: 12px 0; border-bottom: 1px solid var(--line); max-width: 82ch; }
.pub-inline li:last-child { border-bottom: 0; }

/* collaborators / facts aside */
.facts { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.facts li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; gap: 16px; }
.facts li:last-child { border-bottom: 0; }
.facts dt, .facts .k { font-weight: 600; min-width: 150px; color: var(--ink); }
.facts .v { color: var(--ink-soft); }

/* gallery */
.gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px;
}
.gallery img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 3px;
  background: var(--paper-deep);
}
.gallery-empty { color: var(--ink-faint); font-size: .9rem; max-width: var(--measure); }
@media (max-width: 640px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* teaching: role line under course title */
.course .role-line { font-size: .82rem; color: var(--ink-faint); margin-bottom: .5rem; }
.te-institution {
  font-family: var(--sans); font-weight: 600; font-size: .82rem;
  letter-spacing: .06em; color: var(--ink-faint);
  margin: 40px 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--ink);
}
.te-institution:first-of-type { margin-top: 8px; }

/* mentorship blocks */
.mentor { padding: 16px 0; border-bottom: 1px solid var(--line); max-width: var(--measure); }
.mentor:last-child { border-bottom: 0; }
.mentor h3 { font-family: var(--serif); font-size: 1.1rem; margin-bottom: .1rem; }
.mentor .role-line { font-size: .82rem; color: var(--ink-faint); margin-bottom: .5rem; }
.mentor p { margin-bottom: 0; }

/* research overview: link on flagship blocks */
.rblock .readmore { display: inline-block; margin-top: .6rem; font-size: .9rem; }
