:root {
  --bg: #f5f3ef;
  --paper: #ffffff;
  --ink: #1e2b26;
  --muted: #5e6d66;
  --rule: #d6ddd6;
  --accent: #2b5a4a;
  --accent-light: #3d7a64;
  --blue: #3a6b8c;
  --gold: #b8924a;
  --orange: #c97d4a;
  --gradient: linear-gradient(135deg, var(--accent), var(--blue));
  --gradient-warm: linear-gradient(135deg, var(--gold), var(--orange));
  --card-shadow: 0 2px 16px rgba(0,0,0,0.05);
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141c18;
    --paper: #1d2822;
    --ink: #d6dfd6;
    --muted: #7a8a7e;
    --rule: #2a3a30;
    --accent: #4a9a7a;
    --accent-light: #5cb890;
    --blue: #5a8aaa;
    --gold: #d4aa5a;
    --orange: #d88a5a;
    --card-shadow: 0 2px 16px rgba(0,0,0,0.3);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; scroll-behavior: smooth; }
body {
  font-family: "Crimson Text", "Georgia", "Times New Roman", serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
  font-size: 1.1rem;
}
h1, h2, h3, h4 {
  font-family: "Crimson Text", "Georgia", serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
a { color: var(--accent-light); text-underline-offset: 0.15em; transition: color 0.3s ease; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--accent); color: #fff;
  padding: 0.5rem 1rem; z-index: 100; text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

/* ── nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245,243,239,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
@media (prefers-color-scheme: dark) {
  nav { background: rgba(20,28,24,0.85); }
}
nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}
.nav-logo {
  font-family: "Crimson Text", "Georgia", serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--accent);
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  transition: color 0.3s ease;
}
.nav-links a:hover { color: var(--accent); }

/* ── hero ── */
.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0.06;
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.hero-name {
  font-size: clamp(3.5rem, 10vw, 6rem);
  font-weight: 700;
  margin: 0;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeUp 0.8s ease both;
}
.hero-title {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--muted);
  margin-top: 0.75rem;
  max-width: 44ch;
  line-height: 1.6;
  animation: fadeUp 0.8s ease 0.15s both;
}
.hero-location {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 0.4rem;
  font-style: italic;
  animation: fadeUp 0.8s ease 0.3s both;
}
.hero-cta {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.8s ease 0.45s both;
}
.hero-cta a {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-cta .btn-primary {
  background: var(--gradient);
  color: #fff;
}
.hero-cta .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(43,90,74,0.3);
}
.hero-cta .btn-outline {
  border: 1.5px solid var(--accent);
  color: var(--accent);
}
.hero-cta .btn-outline:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

/* ── sections ── */
.container {
  max-width: 78ch;
  margin: 0 auto;
  padding: 0 1.5rem;
}
section {
  padding: 5rem 0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
section.revealed {
  opacity: 1;
  transform: translateY(0);
}
.section-title {
  font-size: 1.8rem;
  margin: 0 0 0.25rem;
  color: var(--accent);
}
.section-subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 2rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-style: italic;
}

/* ── alternating left/right ── */
section:nth-child(odd) .container {
  text-align: left;
  margin-left: 0;
  margin-right: auto;
}
section:nth-child(even) .container {
  text-align: right;
  margin-left: auto;
  margin-right: 0;
}

/* ── about ── */
.about-text {
  font-size: 1.1rem;
  line-height: 1.8;
}
.about-text p { margin: 0 0 1rem; }

/* ── education / conferences / publications ── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.timeline-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
section:nth-child(even) .timeline-item {
  flex-direction: row-reverse;
}
.timeline-year {
  min-width: 5rem;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  padding-top: 0.1rem;
}
.timeline-content h3 {
  margin: 0 0 0.15rem;
  font-size: 1.05rem;
}
.timeline-content p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.timeline-content .detail {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.25rem;
  font-style: italic;
}

/* ── current roles ── */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.role-card {
  background: var(--paper);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border-left: 3px solid var(--accent);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.role-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
}
.role-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}
.role-card .role-place {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

/* ── specialties ── */
.specialties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.specialty-card {
  background: var(--paper);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.specialty-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
}
.specialty-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  font-family: inherit;
}
.specialty-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── approach ── */
.approach-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.approach-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--paper);
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease;
}
.approach-list li:hover {
  transform: translateX(4px);
}
.approach-num {
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  min-width: 1.8rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

/* ── contact / redirect cards ── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.contact-card {
  background: var(--paper);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
}
.contact-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--accent);
}
.contact-card p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.contact-card a {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border-radius: 40px;
  background: var(--gradient);
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.contact-card a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(43,90,74,0.25);
}
.contact-card .contact-detail {
  font-size: 0.85rem;
  color: var(--ink);
  margin: 0.25rem 0;
}
.contact-card .contact-detail a {
  display: inline;
  padding: 0;
  background: none;
  color: var(--accent-light);
  font-weight: 400;
  font-size: inherit;
  border-radius: 0;
}

/* ── footer ── */
footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--muted);
}
footer .attribution {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.25rem;
}
footer .attribution a { color: var(--muted); }

/* ── animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  section { opacity: 1; transform: none; }
}
