/* ==========================================================================
   Lily Poursoltan — Academic Website
   Design system: warm ivory canvas, one deep-navy accent.
   Fonts: Source Serif 4 (headings) / Inter (body)
   ========================================================================== */

:root {
  /* Color */
  --bg:            #FBFAF7;  /* warm ivory — page + nav */
  --bg-alt:        #F4F1EA;  /* warm sand — focus band + callouts */
  --surface:       #FFFFFF;  /* cards on ivory */
  --text:          #1C1B19;  /* warm near-black */
  --text-soft:     #6B6558;  /* venues, dates, captions, author lists */
  --accent:        #1F3A5F;  /* links, name, markers, nav active */
  --accent-hover:  #2C5282;  /* brighter navy on hover */
  --line:          #E5E0D6;  /* hairlines, borders, photo frame */

  /* Type */
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Layout */
  --content: 1000px;   /* matches the hero width for a consistent page edge */
  --reading: 70ch;     /* comfortable line length for running prose */
  --nav-h: 62px;

  /* Shadows */
  --shadow-photo: 0 6px 24px rgba(28, 27, 25, 0.10);
  --shadow-card:  0 8px 28px rgba(28, 27, 25, 0.08);
  --shadow-nav:   0 1px 12px rgba(28, 27, 25, 0.06);
}

/* --- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; }
p { margin: 0 0 1em; }
img { max-width: 100%; display: block; }

/* --- Links ------------------------------------------------------------- */
a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed rgba(31, 58, 95, 0.40);
  transition: color 0.18s ease, border-color 0.18s ease;
}
a:hover {
  color: var(--accent-hover);
  border-bottom: 1px solid var(--accent-hover);
}
a.plain, a.plain:hover { border-bottom: none; }

/* --- Layout helpers ---------------------------------------------------- */
.wrap { max-width: var(--content); margin: 0 auto; padding: 0 24px; }
.section { padding: 66px 0; }
.section + .section { padding-top: 0; }

.band {                       /* full-bleed warm-sand band */
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 60px 0;
  margin: 20px 0;
}

/* --- Section headings + marker motif ----------------------------------- */
.section-head { font-size: 26px; margin-bottom: 6px; letter-spacing: -0.01em; }
.section-head::after {
  content: "";
  display: block;
  width: 32px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 12px;
}
.section-intro { color: var(--text-soft); margin: 14px 0 26px; max-width: var(--reading); }

/* Sub-section headings inside the Research section */
.sub-head {
  font-size: 26px;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.research-block { padding-top: 56px; }
.research-block.first { padding-top: 0; }
.research-block .section-intro { margin-top: 8px; }

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}
.nav.scrolled { box-shadow: var(--shadow-nav); }
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  color: var(--text);
  border-bottom: none;
}
.nav-logo:hover { color: var(--accent); border-bottom: none; }
.nav-links { display: flex; gap: 26px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-soft);
  border-bottom: 2px solid transparent;
  padding-bottom: 3px;
}
.nav-links a:hover { color: var(--accent); border-bottom: 2px solid transparent; }
.nav-links a.active { color: var(--accent); border-bottom: 2px solid var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}
.nav-toggle svg { display: block; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { padding: 74px 0 44px; }
.hero-wrap { max-width: 1000px; }   /* hero breaks out wider than the 760px body column */
.hero-grid {
  display: grid;
  grid-template-columns: 300px 1fr;   /* photo left, text right */
  gap: 54px;
  align-items: start;
}
.hero-name { font-size: 46px; letter-spacing: -0.02em; margin-bottom: 10px; }
.hero-credential {
  color: var(--text-soft);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 22px;
  line-height: 1.5;
}
.hero-text { padding-top: 4px; }
.hero-lead { font-size: 18px; line-height: 1.62; margin-bottom: 18px; text-align: left; text-wrap: pretty; }
.hero-lead:last-child { margin-bottom: 0; }
.hero-lead strong { font-weight: 600; }

.linkrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; }
.linkrow a { font-weight: 500; }
.linkrow .sep { color: var(--line); margin: 0 12px; border: none; }
.linkrow.secondary { margin-top: 12px; }
.linkrow.secondary a { font-size: 15px; color: var(--text-soft); border-bottom-color: rgba(107, 101, 88, 0.4); }
.linkrow.secondary a:hover { color: var(--accent-hover); border-bottom-color: var(--accent-hover); }

/* Link rows sit under the photo in the left column */
.hero-photo-wrap .linkrow { margin-top: 18px; }

/* Pill buttons under the photo */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
}
.btn-row.secondary { margin-top: 8px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 13px;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.pill:hover {
  color: var(--accent-hover);
  border-color: var(--accent);
  background: #fff;
}
.pill svg { flex-shrink: 0; }
.pill.sm { font-size: 13px; padding: 5px 11px; color: var(--text-soft); }
.pill.sm:hover { color: var(--accent); border-color: var(--accent); }

/* "On the job market" inline pill in the intro */
.jm-pill-wrap { margin: 22px 0 0; }
.jm-pill {
  display: inline-block;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  background: var(--bg-alt);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 8px 16px;
}

.hero-photo {
  width: 300px;
  border-radius: 4px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-photo);
}

/* ==========================================================================
   RESEARCH FOCUS BAND
   ========================================================================== */
.focus-statement { font-size: 18px; line-height: 1.65; margin-bottom: 30px; max-width: var(--reading); }
.focus-statement strong { font-weight: 600; }
.pillars {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.pillar {
  flex: 1 1 0;
  min-width: 180px;
  text-align: center;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
}
.pillar span { display: block; font-family: var(--sans); font-size: 14px; font-weight: 400; color: var(--text-soft); margin-top: 6px; }

/* ==========================================================================
   PAPERS
   ========================================================================== */
/* Job Market Paper card */
.jmp-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  padding: 30px 32px;
}
.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.jmp-title { font-size: 21px; line-height: 1.3; margin-bottom: 14px; }
.jmp-abstract { font-size: 16.5px; margin-bottom: 16px; }
.paper-status { color: var(--text-soft); font-style: italic; font-size: 15px; margin-bottom: 18px; }
.paper-status em { font-style: italic; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 7px;
  border-bottom: none;
  transition: background 0.18s ease;
}
.btn:hover { background: var(--accent-hover); color: #fff; border-bottom: none; }
.btn-secondary { margin-left: 14px; font-size: 15px; }

/* Collapsible JMP card (click title to reveal abstract) */
.jmp-card2 {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.jmp-card2 summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px;
  cursor: pointer;
  list-style: none;
  transition: background 0.15s ease;
}
.jmp-card2 summary::-webkit-details-marker { display: none; }
.jmp-card2 summary:hover { background: var(--bg-alt); }
.jmp2-title {
  font-size: 20px;
  line-height: 1.32;
  margin-bottom: 8px;
  color: var(--text);
}
.jmp2-authors { font-size: 15px; color: var(--text-soft); margin: 0 0 12px; }
.jmp2-authors .me { color: var(--text); font-weight: 600; }

.badge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 6px;
  padding: 5px 11px;
}
.tag-badge.status { color: var(--accent); border: 1px solid var(--accent); background: rgba(31, 58, 95, 0.04); }
.tag-badge.award  { color: #8a6d1a; border: 1px solid #E7C65A; background: #FBF3D3; }

.chevron {
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 2px;
  transition: transform 0.2s ease;
}
.jmp-card2[open] .chevron { transform: rotate(180deg); }

.jmp2-body { padding: 0 26px 26px; }
.jmp2-abstract {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: justify;
  text-wrap: pretty;
}
.jmp2-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.jmp2-actions .btn-secondary { margin-left: 0; }

/* Paper lists (working papers + collaborative + publications) */
.paper-list { list-style: none; margin: 0; padding: 0; }
.paper-list > li { padding: 20px 0; border-bottom: 1px solid var(--line); }
.paper-list > li:last-child { border-bottom: none; }
.paper-list .title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}
a.title-link { color: var(--text); border-bottom: none; }
a.title-link:hover { color: var(--accent-hover); border-bottom: none; }
.paper-list .abstract { font-size: 15.5px; color: var(--text); margin: 8px 0 6px; }
.authors { font-size: 15px; color: var(--text-soft); margin: 6px 0 4px; }
.authors .me { color: var(--text); font-weight: 600; }
.meta { font-size: 15px; color: var(--text-soft); }
.meta .venue { font-style: italic; font-weight: 600; color: var(--accent); }
.meta .status-prefix { font-style: italic; font-weight: 400; color: var(--text-soft); }
.meta .badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--accent);
  background: rgba(31, 58, 95, 0.07);
  border-radius: 4px;
  padding: 1px 8px;
  margin-left: 6px;
  vertical-align: 1px;
}
.paper-links { font-size: 14px; margin-top: 6px; }
.paper-links a { font-weight: 500; }
.morelink { display: inline-block; margin-top: 22px; font-weight: 500; }

/* ==========================================================================
   JOB MARKET INFO callout
   ========================================================================== */
.jobmarket {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px 28px;
  display: flex;
  gap: 16px;
  align-items: baseline;
}
.jobmarket .tag {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.jobmarket p { margin: 0; font-size: 16.5px; }

/* ==========================================================================
   TEACHING
   ========================================================================== */
.subhead {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 24px 0 10px;
}
.teach-list { list-style: none; margin: 0; padding: 0; }
.teach-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.teach-list li:last-child { border-bottom: none; }
.teach-list .course { font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--text); }
.teach-list .detail { color: var(--text-soft); font-size: 15px; }
.subhead-lg { font-size: 15px; letter-spacing: 0.6px; }
.eval-pill {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(31, 58, 95, 0.07);
  border-radius: 4px;
  padding: 1px 8px;
  margin-left: 4px;
}

/* Two-column list for awards/service */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 40px; }
.cols .subhead { grid-column: 1 / -1; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { padding: 7px 0; font-size: 15.5px; border-bottom: 1px solid var(--line); }
.mini-list li:last-child { border-bottom: none; }
.mini-list .year { color: var(--text-soft); font-size: 14px; }

/* ==========================================================================
   BEYOND RESEARCH
   ========================================================================== */
.beyond-feature { margin: 8px auto 26px; max-width: 460px; }
.beyond-feature img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-photo);
}
.beyond-text { font-size: 17px; line-height: 1.7; margin-bottom: 26px; }
.beyond-pair {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.beyond-pair figure { margin: 0; width: 48%; }
.beyond-pair img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-photo);
}

/* ==========================================================================
   BIO + FOOTER
   ========================================================================== */
.bio p { font-size: 16.5px; max-width: var(--reading); }
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: 40px 0;
  margin-top: 30px;
}
.footer .fine { color: var(--text-soft); font-size: 14px; margin: 0; text-align: center; }

/* ==========================================================================
   SCROLL REVEAL (header-only, restrained)
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity 0.18s ease-out, transform 0.18s ease-out; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-photo-wrap { display: flex; flex-direction: column; align-items: center; }
  .hero-photo { width: 240px; }
  .hero-name { font-size: 38px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-nav);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 11px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-links a.active { border-bottom: 1px solid var(--line); }
  .nav-links li:last-child a { border-bottom: none; }
  .section { padding: 48px 0; }
  .band { padding: 44px 0; }
  .cols { grid-template-columns: 1fr; }
  .pillars { flex-direction: column; gap: 16px; text-align: left; }
  .pillar { text-align: left; }
  .jmp-card { padding: 24px 22px; }
  .btn-secondary { margin-left: 0; margin-top: 10px; display: inline-block; }
  .jobmarket { flex-direction: column; gap: 8px; }
  .beyond-pair { grid-template-columns: 1fr; }
  .beyond-feature img { height: 260px; }
  .beyond-pair img { height: 240px; }
}

/* ==========================================================================
   PRINT
   ========================================================================== */
@media print {
  .nav, .nav-toggle, .footer .linkrow { display: none; }
  body { font-size: 11pt; color: #000; background: #fff; }
  a { color: #000; border-bottom: none; }
  .band, .jmp-card, .jobmarket { background: #fff !important; box-shadow: none; }
  .reveal { opacity: 1; transform: none; }
  .section { padding: 16px 0; }
}
