:root {
  --text: #16181b;
  --muted: #6b6f76;
  --rule: #e4e4e6;
  --bg: #fcfcfb;
  --max-width: 720px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 24px;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* Header / nav */

header.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 56px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}

header.site-header .name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

nav.site-nav {
  display: flex;
  gap: 20px;
  font-size: 0.95rem;
}

nav.site-nav a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

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

/* Intro / profile block */

.profile {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-bottom: 48px;
}

.profile img {
  width: 148px;
  height: 148px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.profile .intro h1 {
  margin: 0 0 6px;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.profile .intro .role {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 500;
}

.profile .intro p {
  margin: 0;
  font-size: 1rem;
}

/* Section structure */

section {
  margin-bottom: 44px;
}

section h2 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

/* Publications */

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

ul.publications li {
  margin-bottom: 18px;
  padding-left: 0;
}

ul.publications .pub-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

ul.publications .pub-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

ul.publications a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 2px;
}

ul.publications a:hover {
  text-decoration-color: var(--text);
}

/* CV page */

.cv-entry {
  margin-bottom: 20px;
}

.cv-entry .cv-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cv-entry .cv-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.cv-entry .cv-date {
  color: var(--muted);
  font-size: 0.95rem;
  white-space: nowrap;
}

.cv-entry .cv-sub {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 2px;
}

ul.plain {
  margin: 0;
  padding-left: 1.1em;
}

ul.plain li {
  margin-bottom: 8px;
}

ul.plain.tight li {
  margin-bottom: 4px;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 2px;
}

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

/* Contact / footer */

.contact {
  color: var(--muted);
  font-size: 0.95rem;
}

.contact a {
  color: var(--muted);
}

footer.site-footer {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
    padding: 0 20px;
  }

  .page {
    padding: 36px 0 56px;
  }

  header.site-header {
    margin-bottom: 40px;
  }

  .profile {
    margin-bottom: 40px;
  }

  .profile .intro h1 {
    font-size: 1.75rem;
  }

  .profile .intro .role {
    font-size: 0.95rem;
  }

  section {
    margin-bottom: 36px;
  }

  ul.publications .pub-title {
    font-size: 1rem;
  }

  .cv-entry .cv-title {
    font-size: 1rem;
  }

  footer.site-footer {
    margin-top: 48px;
  }
}

@media (max-width: 480px) {
  .profile {
    flex-direction: column;
  }

  .profile img {
    width: 88px;
    height: 88px;
  }

  header.site-header .name {
    font-size: 1rem;
  }

  nav.site-nav {
    gap: 16px;
  }
}
