/* --- Header hidden (single-page site) --- */
.site-header,
.site-nav,
.nav-toggle {
  display: none !important;
}

/* --- Variables --- */
:root {
  --color-text: #1a1a1a;
  --color-text-muted: #555;
  --color-bg: #ffffff;
  --color-bg-alt: #f7f7f5;
  --color-border: #e0e0dc;
  --color-accent: #003262;
  --color-accent-hover: #004080;
  --font-sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --max-width: 720px;
  --max-width-wide: 860px;
  --spacing: 1.5rem;
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
}

.container-wide { max-width: var(--max-width-wide); }

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.site-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--color-text);
  text-decoration: none;
}

.site-title:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem 1.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.2s;
}

/* --- Main Content --- */
.site-main {
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.page-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 1.5rem;
  line-height: 1.25;
}

.site-main h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--color-border);
}

.site-main h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--color-text);
}

.site-main p { margin: 0 0 1rem; }

.site-main ul, .site-main ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

.site-main li { margin-bottom: 0.4rem; }

.site-main li p { margin: 0; }

/* --- Home --- */
.hero {
  margin-bottom: 2rem;
}

.hero-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.hero-photo {
  width: 180px;
  min-width: 180px;
  height: auto;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--color-border);
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  line-height: 1.2;
}

.hero-title {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin: 0 0 0.15rem;
}

.hero-affiliation {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin: 0 0 1.25rem;
}

.hero-bio {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.7;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.quick-links-top {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.quick-links a {
  font-weight: 500;
  font-size: 0.95rem;
}

.quick-links a.active {
  color: var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 0.1rem;
}

/* --- Research --- */
.research-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.research-section h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  margin: 0 0 1.5rem;
  border: none;
  padding: 0;
}

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

.research-item {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.research-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.research-item a {
  font-weight: 600;
  font-family: var(--font-serif);
}

.research-meta {
  display: block;
  margin-top: 0.35rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* --- CV Page --- */
.cv-pdf-toolbar {
  margin-bottom: 1rem;
}

.cv-pdf-download {
  display: inline-block;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg-alt);
  text-decoration: none;
}

.cv-pdf-download:hover {
  text-decoration: none;
  border-color: var(--color-accent);
}

.cv-pdf-frame {
  display: block;
  width: 100%;
  height: 85vh;
  min-height: 600px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg-alt);
}

.cv-pdf-fallback {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.cv-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--color-border);
}

.cv-header h2 {
  border: none;
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
}

.cv-header p {
  margin: 0;
  color: var(--color-text-muted);
}

.cv-section { margin-bottom: 1.75rem; }

.cv-section h2 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0;
}

.cv-item {
  margin-bottom: 0.75rem;
}

.cv-item-title {
  font-weight: 600;
  margin: 0;
}

.cv-item-detail {
  margin: 0.15rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.cv-list-compact li {
  margin-bottom: 0.25rem;
}

/* --- Contact --- */
.contact-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.contact-card p:last-child { margin-bottom: 0; }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
  background: var(--color-bg-alt);
}

.site-footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  html { font-size: 16px; }

  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem var(--spacing);
  }

  .site-nav.is-open { display: block; }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav li { border-bottom: 1px solid var(--color-border); }
  .site-nav li:last-child { border-bottom: none; }

  .site-nav a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: none;
  }

  .header-inner { position: relative; }

  .hero-name { font-size: 1.85rem; }

  .hero-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-photo {
    width: 160px;
    min-width: 160px;
  }

  .quick-links {
    justify-content: center;
  }

  .page-title { font-size: 1.65rem; }
}

@media print {
  .site-header, .site-footer, .nav-toggle { display: none; }
  .site-main { padding: 0; max-width: 100%; }
  a { color: var(--color-text); text-decoration: none; }
}
