/* ===== Variables ===== */
:root {
  --color-primary: #18453B;
  --color-accent: #18453B;
  --color-text: #2d2d2d;
  --color-text-light: #555;
  --color-bg: #fff;
  --color-bg-alt: #f8f9fa;
  --color-border: #e0e0e0;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 960px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

body {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

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

img { max-width: 100%; height: auto; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header / Nav ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--color-primary);
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  flex-wrap: wrap;
}

.site-name {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.site-name:hover { text-decoration: none; opacity: 0.9; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 6px;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  text-decoration: none;
}

.nav-cv {
  border: 1px solid rgba(255,255,255,0.5) !important;
}

/* Hamburger toggle */
.nav-toggle { display: none; }
.nav-toggle-label { display: none; cursor: pointer; }
.nav-toggle-label span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: transform 0.3s;
}

@media (max-width: 768px) {
  .nav-toggle-label { display: block; }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 12px 0;
    gap: 0;
    background: var(--color-primary);
  }

  .nav-toggle:checked ~ .nav-links { display: flex; }

  .site-header nav {
    flex-wrap: wrap;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .nav-links a {
    padding: 10px 0;
    font-size: 1rem;
  }
}

/* ===== Sections ===== */
.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section:first-of-type,
.page-section:first-of-type {
  margin-top: 60px;
}

h2 {
  font-size: 1.6rem;
  color: var(--color-primary);
  margin-bottom: 32px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-border);
}

/* ===== About ===== */
.about-grid {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.about-photo {
  flex-shrink: 0;
}

.about-photo img {
  width: 200px;
  height: 200px;
  border-radius: 8px;
  object-fit: cover;
  border: 3px solid var(--color-border);
}

.about-text h1 {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.role {
  font-size: 1.15rem;
  color: var(--color-text-light);
  margin-bottom: 2px;
}

.org {
  font-size: 1.05rem;
  color: var(--color-text-light);
  margin-bottom: 16px;
}

.bio {
  line-height: 1.7;
}

.bio p { margin-bottom: 12px; }

.bio a {
  font-weight: 600;
}

@media (max-width: 640px) {
  .about-grid {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
  }
}

/* ===== Publications ===== */
.pub-entry {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--color-border);
}

.pub-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.pub-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 4px;
}

.pub-title a {
  color: var(--color-text);
}
.pub-title a:hover {
  color: var(--color-accent);
}

.pub-subtitle {
  font-size: 1rem;
  color: var(--color-text-light);
  font-style: italic;
  margin-bottom: 4px;
}

.pub-authors {
  font-size: 1rem;
  color: var(--color-text-light);
  margin-bottom: 4px;
}

.pub-venue {
  font-size: 1rem;
  margin-bottom: 8px;
}

.pub-venue em, .pub-venue strong {
  /* Venue styling inherited from markdownify */
}

.pub-abstract {
  margin: 10px 0;
}

.pub-abstract summary {
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent);
  user-select: none;
}
.pub-abstract summary:hover {
  text-decoration: underline;
}

.pub-abstract p {
  margin-top: 8px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-light);
  padding-left: 12px;
  border-left: 2px solid var(--color-border);
}

.pub-links {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.pub-link {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 4px 14px;
  border: 1px solid var(--color-accent);
  border-radius: 4px;
  color: var(--color-accent);
  transition: background 0.2s, color 0.2s;
}
.pub-link:hover {
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
}

/* ===== Teaching ===== */
.teaching-content h3 {
  font-size: 1.15rem;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.teaching-content h4 {
  font-size: 1rem;
  color: var(--color-text);
  margin-top: 16px;
  margin-bottom: 6px;
}

.teaching-content p {
  margin-bottom: 4px;
}

.teaching-content a {
  font-weight: 600;
}

/* ===== Contact ===== */
.contact-info p {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.7);
  padding: 24px 0;
  text-align: center;
  font-size: 0.85rem;
}
