:root {
  --bg: #FFFFFF;
  --surface: #F8F7F5;
  --text-primary: #1A1A1A;
  --text-secondary: #555555;
  --text-tertiary: #888888;
  --accent: #2d2d2d;
  --accent-hover: #000000;
  --border: #E0E0E0;
  --font-heading: 'Merriweather', 'Georgia', serif;
  --font-body: 'Tinos', 'Times New Roman', Times, serif;
  --max-width: 900px;
  --nav-height: 60px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
a:hover { color: var(--accent-hover); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--text-primary);
}

/* ── Navigation ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
}

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

.site-name {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none !important;
}
.site-name:hover { color: var(--accent); }

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

.nav-links a {
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Page layout ── */
.page-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

/* ── About page ── */
.about-layout {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.about-photo {
  flex-shrink: 0;
  width: 240px;
}

.about-photo img {
  width: 100%;
  height: 310px;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 50% / 45%;
  border: 3px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.about-bio { flex: 1; }
.about-bio p { margin-bottom: 1rem; font-size: 1.05rem; }

@media (max-width: 600px) {
  .about-layout {
    flex-direction: column;
  }
  .about-photo {
    width: 100%;
  }
  .about-photo img {
    height: 220px;
    border-radius: 0;
  }
}

/* ── Research page ── */
.section-heading {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
}

.papers-list {
  margin-bottom: 3rem;
}

.paper {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.6rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--border);
}
.paper:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }

.paper-num {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  flex-shrink: 0;
  width: 3em;
  padding-top: 0.1em;
  font-family: var(--font-heading);
}

.paper-body { flex: 1; }

.paper-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: var(--text-primary);
}

.paper-venue {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.1rem;
}

.paper-coauthors {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.1rem;
}

.paper-abstract {
  margin-top: 0.4rem;
}

.paper-abstract summary {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.paper-abstract summary::-webkit-details-marker { display: none; }
.paper-abstract summary:hover { color: var(--accent-hover); }

.paper-abstract p {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Footer ── */
.site-footer {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
}
.site-footer p {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin: 0;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .nav-container {
    height: auto;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .site-name { font-size: 1.15rem; }
  .nav-links { gap: 1rem; }
  .page-content { padding-top: 2.5rem; }
}
