:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-muted: #eef3f7;
  --text: #18212f;
  --muted: #5f6b7a;
  --accent: #0f6f78;
  --accent-dark: #0a4f56;
  --border: #dbe3ea;
  --shadow: 0 18px 45px rgba(24, 33, 47, 0.08);
  --radius: 8px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

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

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

p,
h1,
h2,
h3 {
  margin-top: 0;
}

p {
  color: var(--muted);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 248, 251, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
}

.brand {
  color: var(--text);
  font-weight: 750;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand:hover,
.brand:focus-visible {
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-links a {
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
  padding: 8px 13px;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
  background: var(--surface-muted);
  color: var(--accent-dark);
  text-decoration: none;
}

.page-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px 80px;
}

.narrow-page {
  max-width: 920px;
}

.page-intro {
  margin-bottom: 32px;
}

.page-intro h1,
.hero-copy h1 {
  color: var(--text);
  font-size: clamp(2.35rem, 6vw, 4.8rem);
  line-height: 1.02;
  margin-bottom: 18px;
}

.page-intro p {
  max-width: 760px;
  font-size: 1.08rem;
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.content-section {
  margin-top: 56px;
}

.content-section h2 {
  font-size: 1.55rem;
  margin-bottom: 20px;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item,
.project-card,
.contact-card,
.publication-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.timeline-item {
  padding: 22px;
}

.timeline-date,
.contact-label {
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.timeline-item h3 {
  font-size: 1.05rem;
  line-height: 1.35;
  margin-bottom: 6px;
}

.timeline-item p:last-child,
.project-card p:last-child,
.contact-card p:last-child {
  margin-bottom: 0;
}

.project-grid,
.contact-grid {
  display: grid;
  gap: 18px;
}

.project-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-card,
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: space-between;
  padding: 26px;
}

.project-card h2,
.contact-card h2 {
  font-size: 1.22rem;
  line-height: 1.35;
  margin-bottom: 12px;
}

.project-card h2 a,
.contact-card h2 a {
  color: var(--text);
}

.project-card h2 a:hover,
.project-card h2 a:focus-visible,
.contact-card h2 a:hover,
.contact-card h2 a:focus-visible {
  color: var(--accent-dark);
}

.skill-list {
  background: var(--surface-muted);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 650;
  padding: 12px 14px;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.link-row a {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 8px 12px;
}

.link-row a:hover,
.link-row a:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  text-decoration: none;
}

@media (max-width: 760px) {
  .site-nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .nav-links a {
    padding: 7px 10px;
  }

  .page-shell {
    padding: 42px 18px 60px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }
}
