/* ============================================================
   Colors — light (default) + dark
   ============================================================ */
:root {
  --bg: #f4f2ec;
  --fg: #1d1c18;
  --rule: #1d1c18;
  --placeholder-fill: rgba(0, 0, 0, 0.06);
  --placeholder-text: rgba(0, 0, 0, 0.45);
}
:root.dark {
  --bg: #17171a;
  --fg: #e6e3da;
  --rule: #e6e3da;
  --placeholder-fill: rgba(255, 255, 255, 0.08);
  --placeholder-text: rgba(255, 255, 255, 0.5);
}

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'EB Garamond', Georgia, serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  transition: background-color 200ms, color 200ms;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; }
section { scroll-margin-top: 80px; }

/* ============================================================
   Top nav
   ============================================================ */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  padding: 18px 40px;
  border-bottom: 1px solid var(--rule);
  font-size: 17px;
}
nav a {
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.9;
}
nav a:hover { opacity: 1; }
#theme-toggle {
  appearance: none;
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  padding: 0;
  transition: opacity 120ms;
}
#theme-toggle:hover { opacity: 1; }

/* ============================================================
   Layout
   ============================================================ */
main {
  max-width: 920px;
  margin: 0 auto;
  padding: 60px 80px 80px;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 36px;
}
.hero-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
}
.hero h1 {
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.contact {
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 18px;
}
.contact .email { display: block; }
.contact .links { display: block; margin-top: 4px; }
.contact .links a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.contact .links a:hover { opacity: 0.7; }
.contact .sep {
  opacity: 0.4;
  margin: 0 6px;
}
.intro {
  font-size: 17px;
  line-height: 1.65;
  opacity: 0.9;
  margin: 0;
}

/* ============================================================
   Divider
   ============================================================ */
hr {
  border: none;
  border-top: 1px solid var(--rule);
  opacity: 0.25;
  margin: 28px 0;
}

/* ============================================================
   Publications
   ============================================================ */
.pub-heading {
  font-size: 22px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.2px;
  margin: 0 0 2px;
}
.pub-note {
  font-size: 13px;
  opacity: 0.55;
  font-style: italic;
  margin: 0 0 22px;
  line-height: 1.2;
}
.pub {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 28px;
}
.pub-fig {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
}
.pub-title { font-weight: 500; font-size: 17px; line-height: 1.4; }
.pub-authors { font-size: 15px; opacity: 0.7; font-style: italic; line-height: 1.35; }
.pub-authors .me { font-weight: 600; opacity: 1; color: var(--fg); }
.pub-venue { font-size: 15px; opacity: 0.7; line-height: 1.35; }

/* ============================================================
   Placeholder (shown until you add real images)
   Remove this block once everything has a real <img> src.
   ============================================================ */
.placeholder {
  background:
    repeating-linear-gradient(45deg,
      var(--placeholder-fill) 0 6px,
      transparent 6px 12px);
  border: 1px solid currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--placeholder-text);
  letter-spacing: 0.05em;
}

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 720px) {
  nav { padding: 14px 22px; gap: 18px; }
  main { padding: 32px 24px 44px; }
  .hero { display: block; grid-template-columns: none; }
  .hero-photo {
    width: 220px;
    aspect-ratio: 3 / 4;
    margin-bottom: 22px;
  }
  .hero h1 { font-size: 32px; }
  .pub {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .pub-fig {
    max-width: 260px;
  }
}
