:root {
  --accent: #1d426a;
  --accent-dark: #0f2743;
  --accent-soft: #e2ebf4;
  --bg: #edf3f9;
  --surface: #ffffff;
  --surface-alt: #f7fafd;
  --text: #162535;
  --muted: #41586e;
  --border: #cad8e6;
  --shadow-sm: 0 8px 22px rgba(15, 33, 54, 0.08);
  --shadow-md: 0 18px 40px rgba(15, 33, 54, 0.18);
  --radius-lg: 1.05rem;
  --radius-md: 0.75rem;
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

html { scroll-padding-top: 5.5rem; }

body {
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(27, 61, 95, 0.13), transparent 38%),
    linear-gradient(#f3f7fb, var(--bg));
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.15em;
}

a:hover,
a:focus-visible {
  color: var(--accent-dark);
}

a:visited { color: #2d4a74; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(25, 62, 97, 0.3);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 0.7rem;
  top: -3rem;
  z-index: 50;
  background: #fff;
  color: var(--accent-dark);
  border: 1px solid var(--accent);
  border-radius: 0.45rem;
  padding: 0.48rem 0.72rem;
  text-decoration: none;
}

.skip-link:focus { top: 0.65rem; }

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(10, 24, 44, 0.93);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #24384f;
}

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

.brand {
  text-decoration: none;
  color: #f4f8fc;
  font-weight: 760;
  letter-spacing: 0.01em;
}

.menu-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 0.58rem;
  background: rgba(255, 255, 255, 0.08);
  color: #f4f8fc;
  padding: 0.4rem 0.7rem;
}

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

.site-nav a {
  text-decoration: none;
  color: #f4f8fc;
  font-weight: 560;
  font-size: 0.95rem;
  padding: 0.4rem 0.68rem;
  border-radius: 999px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.site-nav a[aria-current="page"] {
  background: #f2f6fb;
  color: #10253e;
}

main { padding: 2.2rem 0 3rem; }

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  border: 0;
  border-radius: 1.2rem;
  background: linear-gradient(120deg, #0d223c 10%, #17395f 45%, #255684 100%);
  box-shadow: var(--shadow-md);
  color: #f4f8fc;
  padding: 2rem;
}

.hero-media {
  justify-self: end;
  width: 100%;
  max-width: 320px;
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-md);
  border: 0;
  box-shadow: 0 20px 38px rgba(8, 15, 29, 0.36);
  background: #d8e3f0;
}

.hero h1 {
  margin: 0;
  line-height: 1.2;
  font-size: clamp(2rem, 4vw, 2.9rem);
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 650;
  color: #d2e4f5;
}

.lead {
  font-size: 1.04rem;
  margin: 0.7rem 0 0.4rem;
  color: #ebf3fa;
}

.subtitle {
  margin: 0.2rem 0;
  color: var(--muted);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.62rem;
  margin-top: 1rem;
}

.button-link {
  display: inline-block;
  background: #fff;
  color: #17395f;
  text-decoration: none;
  border-radius: 0.58rem;
  padding: 0.55rem 0.9rem;
  font-weight: 630;
  border: 1px solid transparent;
}

.button-link:visited { color: #17395f; }

.button-link.secondary {
  background: #fff;
  color: #17395f;
  border-color: #bed0e2;
}

.hero .button-link.secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.section {
  margin-top: 1.2rem;
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
}

.section h1,
.section h2,
.section h3 {
  margin-top: 0;
  color: var(--accent-dark);
  line-height: 1.3;
}

.section-intro {
  color: var(--muted);
  margin-top: -0.2rem;
}

.anchor-target:target,
.pub-item:target,
section[id]:target {
  box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.18);
  scroll-margin-top: 6rem;
}

.theme-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.7rem;
}

.cards,
.highlights,
.featured-grid,
.timeline-grid,
.publication-grid,
.info-grid,
.contact-grid {
  display: grid;
  gap: 0.9rem;
}

.cards,
.highlights,
.featured-grid,
.info-grid,
.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.timeline-grid,
.publication-grid { grid-template-columns: 1fr; }

.card {
  border: 1px solid #d3dfeb;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.card h3 { margin: 0 0 0.45rem; }
.card p { margin: 0 0 0.45rem; }
.card p:last-child { margin-bottom: 0; }

.contact-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: 1.25rem;
  align-items: start;
}

.contact-profile {
  position: sticky;
  top: 6rem;
  display: grid;
  gap: 0.8rem;
}

.contact-profile img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #f0f4f8;
  box-shadow: var(--shadow-sm);
}

.contact-profile .badge {
  display: block;
  text-align: center;
  line-height: 1.4;
}

.contact-content h1 { margin-bottom: 0.2rem; }
.contact-info { margin-top: 1rem; }

.badge {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: 1px solid #c4d6e8;
  border-radius: 999px;
  padding: 0.14rem 0.55rem;
}

.list-clean {
  margin: 0.3rem 0 0;
  padding-left: 1.1rem;
}

.list-clean li { margin-bottom: 0.45rem; }

.pub-list {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
}

.pub-item {
  margin-bottom: 1rem;
  padding: 0.52rem 0.35rem 0.7rem;
  border-bottom: 1px solid var(--border);
}

.pub-citation { margin: 0; }

.pub-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.4rem;
  font-size: 0.95rem;
}

.pub-actions span {
  color: var(--muted);
  font-weight: 620;
}

.pub-note,
.muted-note {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.cv-download {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

label {
  display: block;
  font-weight: 620;
  margin-top: 0.65rem;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  padding: 0.56rem;
  font: inherit;
}

footer {
  border-top: 1px solid #c4d3e1;
  background: #e8f0f7;
  color: #30485f;
  padding: 1rem 0 1.4rem;
}

@media (max-width: 900px) {
  .hero,
  .cards,
  .highlights,
  .featured-grid,
  .info-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-media {
    justify-self: start;
    max-width: 220px;
  }

  .hero-media img { min-height: 250px; }

  .contact-layout { grid-template-columns: 1fr; }

  .contact-profile {
    position: static;
    max-width: 220px;
  }
}

@media (max-width: 760px) {
  .menu-toggle { display: inline-block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; }
  .header-inner { flex-wrap: wrap; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding-top: 0.4rem;
  }
  .site-nav a {
    border-radius: 0.55rem;
    padding: 0.55rem 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
