/* ============================================
   DESIGN TOKENS
   Change these values to re-theme the entire site
   ============================================ */
:root {
  --bg: #EEF0EA;
  --paper: #F8F7F2;
  --ink: #1E2A38;
  --ink-soft: #4A5568;
  --accent: #8C5A2B;      /* bronze — used for labels, numbers, links */
  --accent-green: #4C6B57; /* muted botanical green — research/data */
  --line: #D7D2C4;
  --line-strong: #B9B2A0;

  --font-display: "Source Serif 4", Georgia, serif;
  --font-body: "Inter", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --nav-width: 220px;
  --max-width: 860px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

/* ============================================
   LAYOUT SHELL
   ============================================ */
.shell {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar nav --- */
.sidenav {
  width: var(--nav-width);
  flex-shrink: 0;
  padding: 2.5rem 1.75rem;
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidenav__name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 0.15rem 0;
}

.sidenav__role {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 0 0 2.25rem 0;
}

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

.sidenav__list li { margin-bottom: 0.35rem; }

.sidenav__list a {
  display: block;
  color: var(--ink-soft);
  font-size: 0.88rem;
  padding: 0.4rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  margin-left: -0.75rem;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.sidenav__list a:hover,
.sidenav__list a[aria-current="page"] {
  color: var(--ink);
  border-left-color: var(--accent);
  text-decoration: none;
}

.sidenav__tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--line-strong);
  margin-top: 2.5rem;
  letter-spacing: 0.04em;
}

/* --- Mobile top bar (hidden on desktop) --- */
.topbar {
  display: none;
}

/* --- Main content --- */
main {
  flex: 1;
  min-width: 0;
  padding: 3.5rem 3rem 5rem;
}

.page {
  max-width: var(--max-width);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem 0;
}

h1 {
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 1.1;
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
  font-weight: 600;
}

h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 0.35rem 0;
  font-weight: 600;
}

p { margin: 0 0 1rem 0; color: var(--ink); }

.lede {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 60ch;
}

.section {
  margin-top: 3.5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.section:first-of-type { margin-top: 3rem; }

/* ============================================
   SIGNATURE ELEMENT: specimen tag numbering
   Used across publications / research / students
   ============================================ */
.tag-number {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 0.1rem 0.4rem;
  display: inline-block;
  margin-bottom: 0.6rem;
}

/* ============================================
   HERO (landing page)
   ============================================ */
.hero {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.hero__portrait {
  width: 148px;
  height: 148px;
  border-radius: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--line-strong);
}

@media (max-width: 640px) {
  .hero { flex-direction: column; }
}

/* ============================================
   TIMELINE (education / work history)
   ============================================ */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line);
}

.timeline li {
  position: relative;
  padding: 0 0 1.75rem 1.75rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.3rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--accent);
}

.timeline__year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  display: block;
  margin-bottom: 0.15rem;
}

/* ============================================
   CARDS (publications, research, students)
   ============================================ */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.1rem;
}

.card__meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

.card--award {
  border-left: 3px solid var(--accent-green);
}

.pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(76, 107, 87, 0.12);
  color: var(--accent-green);
  margin-right: 0.4rem;
}

/* ============================================
   STUDENT LIST
   ============================================ */
.student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
}

.student-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.25rem 1.4rem;
  background: var(--paper);
}

.student-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}

/* ============================================
   GALLERY
   ============================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.gallery-item {
  aspect-ratio: 4 / 3;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-align: center;
  padding: 0.5rem;
  position: relative;
}

.gallery-item span {
  position: absolute;
  bottom: 0.5rem;
  left: 0.6rem;
  right: 0.6rem;
  font-size: 0.7rem;
  color: var(--ink-soft);
  text-align: left;
}

/* ============================================
   RESPONSIVE: collapse sidebar to top bar
   ============================================ */
@media (max-width: 780px) {
  .shell { flex-direction: column; }

  .sidenav { display: none; }

  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 10;
  }

  .topbar__name {
    font-family: var(--font-display);
    font-weight: 600;
  }

  .topbar__toggle {
    background: none;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    color: var(--ink);
  }

  .topbar__menu {
    display: none;
    flex-direction: column;
    padding: 1rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
  }

  .topbar__menu.open { display: flex; }

  .topbar__menu a {
    padding: 0.55rem 0;
    color: var(--ink-soft);
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
  }

  main { padding: 2rem 1.25rem 3.5rem; }

  h1 { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
