/* Compact academic page — Stanford colors + UT web fonts
   Colors: https://identity.stanford.edu/design-elements/color/
   Fonts: Charis SIL + Libre Franklin */

:root {
  --cardinal: #8c1515;
  --cardinal-dark: #820000;
  --white: #ffffff;
  --black: #2e2d29;
  --cool-grey: #53565a;
  --palo-alto: #175e54;
  --fog: #dad7cb;
  --fog-light: #f4f4f4;
  --digital-red: #b1040e;
  --digital-blue: #006cb8;
  --digital-blue-dark: #00548f;

  --ink: var(--black);
  --muted: #6d6c69;
  --line: #d5d5d4;
  --accent: var(--cardinal);
  --link: var(--digital-blue);
  --link-hover: var(--digital-blue-dark);
  --max: 960px;
  --header-h: 48px;

  --font-display: "Charis SIL", Georgia, "Times New Roman", serif;
  --font-body: "Libre Franklin", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  background: var(--white);
}

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

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dotted var(--cool-grey);
}

a:hover {
  color: var(--ink);
  background-color: #f6d8ce;
  border-bottom-color: var(--ink);
}

h1, h2, h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--black);
}

h2 {
  font-size: 1.15rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--line);
}

h3 {
  font-size: 0.98rem;
  font-weight: 400;
  font-style: italic;
  color: var(--cool-grey);
  margin-bottom: 0.75rem;
}

h4 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--accent);
}

ul {
  margin: 0;
  padding-left: 1.1rem;
}

li + li {
  margin-top: 0.25rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--line);
  overflow: visible;
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--black);
  border-bottom: none;
}

.nav-brand:hover {
  background: transparent;
  color: var(--accent);
  border-bottom: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem 0.85rem;
}

.site-nav a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cool-grey);
  border-bottom: none;
}

.site-nav a:hover {
  color: var(--accent);
  background: transparent;
  border-bottom: none;
}

.nav-dropdown {
  position: relative;
}

/* Keep hover active while moving from the button into the menu */
.nav-dropdown::after {
  content: "";
  position: absolute;
  left: 0;
  top: 100%;
  width: 14rem;
  height: 0.75rem;
}

.nav-dropdown-toggle {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cool-grey);
  background: transparent;
  border: none;
  padding: 0.4rem 0;
  cursor: pointer;
}

.nav-dropdown-toggle::after {
  content: " ▾";
  font-size: 0.7rem;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.is-open .nav-dropdown-toggle {
  color: var(--accent);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 13.5rem;
  padding: 0.35rem 0;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(46, 45, 41, 0.08);
  z-index: 200;
  pointer-events: auto;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--cool-grey);
  white-space: nowrap;
  pointer-events: auto;
}

.nav-dropdown-menu a:hover {
  color: var(--accent);
  background: var(--fog-light, #f4f4f4);
}

.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 2px;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--black);
  margin: 4px 0;
}

/* About / top */
.hero {
  padding: 1.25rem 1rem 0.75rem;
}

.hero-atmosphere {
  display: none;
}

.hero-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 200px;
  gap: 1.25rem;
  align-items: start;
}

.hero-name {
  font-size: 1.15rem;
  margin-bottom: 0.55rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--line);
}

.hero-titles {
  display: none;
}

.hero-bio {
  margin: 0 0 0.65rem;
}

.hero-bio p {
  margin: 0 0 0.7rem;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

.hero-bio p:last-child {
  margin-bottom: 0;
}

.hero-topics {
  margin: 0 0 0.65rem;
  color: var(--cool-grey);
  font-size: 0.9rem;
  line-height: 1.4;
}

.hero-actions {
  margin: 0;
  font-size: 0.92rem;
}

.hero-portrait {
  margin: 1.35rem 0 0;
  order: -1;
  width: 180px;
}

.hero-portrait img {
  width: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  border-bottom: none;
  filter: none;
}

.hero-contact {
  font-size: 0.92rem;
  line-height: 1.5;
}

.hero-contact .headings,
.hero-contact h4 {
  margin: 0 0 0.35rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--black);
  letter-spacing: 0;
  text-transform: none;
}

.hero-contact .subhead,
.hero-contact h4 + h4,
.hero-contact .headings + .headings {
  margin-top: 0.9rem;
}

.hero-contact p {
  margin: 0;
  color: var(--ink);
}

/* Sections */
.section {
  padding: 1rem 1rem 0.35rem;
}

.section-alt {
  background: transparent;
  border: none;
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-inner.narrow {
  max-width: var(--max);
}

.section-lead {
  margin-bottom: 0.65rem;
}

.section-intro {
  color: var(--muted);
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
}

.split {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 1rem 1.5rem;
  align-items: start;
  margin-bottom: 0.85rem;
}

.focus-list {
  margin: 0;
  color: var(--ink);
}

.focus-list li + li {
  margin-top: 0.3rem;
}

.topic-links {
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
}

.fact {
  margin-top: 0.75rem;
  padding: 0.55rem 0.7rem;
  background: var(--fog-light);
  /* border-left: 2px solid var(--palo-alto); */
}

.fact-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--palo-alto);
  margin-bottom: 0.25rem;
}

.fact p {
  margin: 0;
  font-size: 0.92rem;
}

.fact-list {
  margin: 0.4rem 0 0;
  padding-left: 1.15rem;
  font-size: 0.92rem;
}

.fact-list li + li {
  margin-top: 0.2rem;
}

.why-box {
  padding: 0.85rem 0.9rem;
  background: var(--white);
  /* border: 1px solid var(--line); */
  /* border-top: 3px solid var(--accent); */
  box-shadow: 0 6px 16px rgba(46, 45, 41, 0.08);
}

.why-box p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink);
}

.methods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.5rem;
  padding-top: 0.25rem;
}

.methods-grid ul,
.teaching-split ul {
  color: var(--ink);
  padding-left: 1rem;
  font-size: 0.92rem;
}

.subhead {
  margin-top: 0.85rem;
}

/* Publications */
.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pub-list li {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 0.55rem;
  padding: 0.55rem 0;
  border-top: 1px dotted var(--line);
  margin-top: 0;
}

.pub-list li:last-child {
  border-bottom: 1px dotted var(--line);
}

.pub-year {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  padding-top: 0.05rem;
}

.pub-title {
  margin: 0 0 0.15rem;
  font-weight: 600;
  color: var(--black);
  line-height: 1.35;
  font-size: 0.95rem;
}

.pub-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.pub-meta a {
  font-weight: 600;
  white-space: nowrap;
}

/* Media */
.media-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.media-list li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0.7rem;
  align-items: start;
  padding: 0.55rem 0;
  border-top: 1px dotted var(--line);
  margin-top: 0;
}

.media-list li:last-child {
  border-bottom: 1px dotted var(--line);
}

.media-logo {
  display: block;
  border-bottom: none;
  line-height: 0;
}

.media-logo:hover {
  background: transparent;
  border-bottom: none;
  opacity: 0.85;
}

.media-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 3px;
  background: var(--white);
}

.media-title {
  display: inline;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px dotted var(--cool-grey);
  line-height: 1.35;
}

a.media-title:hover {
  color: var(--ink);
  background-color: #f6d8ce;
  border-bottom: 1px dotted var(--ink);
}

.media-meta {
  margin: 0.15rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* Education */
.edu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.edu-list li {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 0.55rem;
  padding: 0.4rem 0;
  border-top: 1px dotted var(--line);
  align-items: baseline;
  margin-top: 0;
}

.edu-list li:last-child {
  border-bottom: 1px dotted var(--line);
}

.edu-degree {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

.edu-detail {
  color: var(--ink);
  font-size: 0.92rem;
}

.teaching-split {
  margin-bottom: 0;
}

.teaching-fact {
  margin-top: 0;
}

/* Contact */
.contact-section {
  padding-bottom: 1.25rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  margin-top: 0.35rem;
}

.contact-grid p {
  margin: 0;
  font-size: 0.92rem;
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.link-list li + li {
  margin-top: 0.3rem;
}

.site-footer {
  text-align: center;
  padding: 0.85rem 1rem 1.25rem;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.site-footer p {
  margin: 0;
}

.site-footer .footer-credit {
  margin-top: 0.25rem;
  font-size: 11px;
  color: var(--muted);
}

.site-footer .footer-credit a {
  color: var(--muted);
  border-bottom: 1px dotted var(--line);
}

.site-footer .footer-credit a:hover {
  color: var(--accent);
  background: transparent;
}

/* Motion off by default for simple look */
.reveal,
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: none;
}

.hero-name,
.hero-portrait {
  animation: none;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 140px 1fr;
  }

  .hero-contact {
    grid-column: 1 / -1;
  }

  .split,
  .methods-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1rem 0.75rem;
    background: var(--white);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a:last-child {
    border-bottom: none;
  }

  .nav-dropdown {
    border-bottom: 1px solid var(--line);
  }

  .nav-dropdown::after {
    display: none;
  }

  .nav-dropdown-toggle {
    width: 100%;
    text-align: left;
    padding: 0.45rem 0;
  }

  .nav-dropdown-menu {
    position: static;
    display: none;
    border: none;
    box-shadow: none;
    padding: 0 0 0.35rem 0.85rem;
    min-width: 0;
  }

  .nav-dropdown.is-open .nav-dropdown-menu {
    display: block;
  }

  .nav-dropdown:hover .nav-dropdown-menu {
    display: none;
  }

  .nav-dropdown.is-open:hover .nav-dropdown-menu {
    display: block;
  }

  .nav-dropdown-menu a {
    padding: 0.35rem 0;
    border-bottom: none;
  }
}

@media (max-width: 600px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-portrait {
    width: min(180px, 50%);
  }

  .pub-list li,
  .edu-list li {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
