/* =============================================
   GLOBAL RESET & VARIABLES
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --accent: #7c4dff;
  --accent-mid: #9c6ffd;
  --accent-light: #f0eaff;
  --accent-dark: #5a32cc;
  --text: #1e1a2e;
  --text-muted: #6b5f82;
  --bg: #fdf8f4;
  --bg-card: #fffcf9;
  --border: #e8e0f0;
  --nav-height: 60px;
  --max-width: 780px;
  --font: 'Inter', system-ui, sans-serif;
}

/* =============================================
   BASE
   ============================================= */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =============================================
   NAV
   ============================================= */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 248, 244, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

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

.nav-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.nav-name:hover {
  text-decoration: none;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  text-decoration: none;
}

/* mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: 0.2s;
}

/* =============================================
   MAIN CONTENT
   ============================================= */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  width: 100%;
}

/* =============================================
   HOME — HERO
   ============================================= */
.hero {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.hero-photo {
  flex-shrink: 0;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-light);
  border: 3px solid var(--accent-mid);
  /* placeholder color until photo is added */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--accent);
  overflow: hidden;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-text h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.4rem;
  color: var(--accent-dark);
}

.hero-text .title {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.hero-text p {
  color: var(--text);
  max-width: 540px;
  margin-bottom: 1.5rem;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--accent-mid);
  color: var(--accent);
  background: var(--accent-light);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.link-pill:hover {
  border-color: var(--accent-dark);
  color: var(--accent-dark);
  background: #e4d8ff;
  text-decoration: none;
}

.link-pill svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* =============================================
   HOME — AFFILIATIONS
   ============================================= */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.affil-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.affil-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
}

.affil-list li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* =============================================
   RESEARCH PAGE
   ============================================= */
.page-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  color: var(--accent-dark);
}

.page-header p {
  color: var(--text-muted);
  max-width: 560px;
}

/* research areas */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.areas-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 3rem;
}

.area-card {
  background: var(--accent-light);
  border: 1px solid var(--accent-mid);
  border-radius: 10px;
  padding: 1.25rem;
}

.area-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--accent);
}

.area-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* publications */
.pub-section {
  margin-bottom: 2.5rem;
}

.pub-year {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--accent-light);
}

.pub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.pub-item {
  font-size: 0.92rem;
  line-height: 1.65;
  padding-left: 1rem;
  border-left: 3px solid var(--accent-mid);
}

.pub-item em {
  color: var(--text-muted);
  font-style: italic;
}

.pub-item .pub-venue {
  color: var(--text-muted);
}

/* working papers */
.working-papers .pub-year {
  color: var(--text-muted);
  border-bottom-color: var(--border);
}

/* =============================================
   OTHER PAGE
   ============================================= */
.other-section {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.other-section:last-child {
  border-bottom: none;
}

.other-section h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--accent-dark);
}

.other-section p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  max-width: 560px;
}

.resource-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.resource-list li a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  font-size: 0.95rem;
}

.resource-list li a svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.resource-list .desc {
  display: block;
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* diagram image */
.diagram-wrap {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  max-width: 700px;
}

.diagram-wrap img {
  width: 100%;
  display: block;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--accent-light);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 600px) {
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li a {
    display: block;
    padding: 0.65rem 1.5rem;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    flex-direction: column;
    gap: 1.5rem;
  }

  .hero-photo {
    width: 120px;
    height: 120px;
    font-size: 1.8rem;
  }

  .hero-text h1 {
    font-size: 1.6rem;
  }

  .areas-grid,
  .areas-stack {
    grid-template-columns: 1fr;
  }
}
