:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #1e3a8a;
  --accent-light: #1e40af;
  --accent-soft: #e2e8f4;
  --border: rgba(15, 23, 42, 0.08);
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.07);
  --radius: 12px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-serif: "Martel", Georgia, serif;
  --max-width: 1080px;
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
}

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

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

a:hover {
  color: var(--accent-light);
}

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--text);
}

.nav-logo:hover {
  color: var(--accent);
}

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

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

.nav-links a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* Hero */

.hero {
  padding: 4rem 1.5rem 3.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-layout {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 720px) {
  .hero-layout {
    grid-template-columns: auto 1fr;
    gap: 3rem;
  }
}

.hero-photo {
  justify-self: center;
}

.hero-photo img {
  display: block;
  width: min(240px, 70vw);
  height: min(240px, 70vw);
  object-fit: cover;
  border-radius: 50%;
  box-shadow: var(--shadow);
  border: 3px solid var(--accent-soft);
}

.hero-title {
  margin: 0 0 1.25rem;
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 4.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero-surname {
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.hero-lead {
  max-width: 36rem;
  margin: 0 0 1.75rem;
  font-size: 1.15rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn-icon {
  flex-shrink: 0;
}

.btn-outline {
  color: var(--accent);
  border: 1.5px solid var(--accent);
  background: var(--surface);
}

.btn-outline:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

/* Sections */

.section {
  padding: 4rem 0;
}

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

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

.section-title {
  margin: 0 0 2.5rem;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* About */

.about-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
}

.about-text {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.about-aside {
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.aside-label {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.aside-label:not(:first-child) {
  margin-top: 1.5rem;
}

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

.tag-list li {
  padding: 0.25rem 0;
  font-size: 0.95rem;
}

.tag-list--wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
}

.tag-list--wrap li {
  padding: 0.2rem 0.65rem;
  font-size: 0.85rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
}

.muted {
  color: var(--text-muted);
  font-weight: 400;
}

/* Timeline */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: grid;
  gap: 0.5rem 2rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}

.timeline-item:first-child {
  padding-top: 0;
}

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

@media (min-width: 640px) {
  .timeline-item {
    grid-template-columns: 11rem 1fr;
    align-items: start;
  }
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.timeline-meta time {
  font-weight: 600;
  color: var(--text);
}

.timeline-body h3 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.timeline-org {
  margin: 0 0 0.35rem;
  font-weight: 500;
}

.timeline-org a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.timeline-org a:hover {
  color: var(--accent-light);
}

.timeline-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Cards */

.cards {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card {
  padding: 1.5rem 1.75rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section--alt .card {
  border: 1px solid var(--border);
  box-shadow: none;
}

.card-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

.card-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.card-org {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
}

.card-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.cards--compact {
  margin-top: 2rem;
}

.card--compact {
  padding: 1.25rem 1.5rem;
}

/* Publication */

.publication {
  padding: 1.75rem;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
}

.section--alt .publication {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  box-shadow: none;
}

.publication-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
}

.publication-title a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.publication-title a:hover {
  color: var(--accent-light);
}

.publication-authors {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Honors */

.honors-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.honors-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.honors-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.honors-list li:first-child {
  padding-top: 0;
}

.honors-name {
  font-weight: 500;
}

.honors-name a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.honors-name a:hover {
  color: var(--accent);
}

.honors-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: right;
}

/* Contact */

.contact-block {
  text-align: center;
}

.contact-lead {
  margin: -1.5rem 0 1.5rem;
  color: var(--text-muted);
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 1.05rem;
}

.contact-list a {
  font-weight: 500;
}

/* Footer */

.site-footer {
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0;
}

/* Mobile nav */

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links li {
    border-bottom: 1px solid var(--border);
  }

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