:root {
  color-scheme: light;
  --bg: #f8f7f3;
  --paper: #ffffff;
  --ink: #1c2430;
  --muted: #627083;
  --line: #d9ded8;
  --blue: #0f4d75;
  --blue-dark: #0a3550;
  --green: #426a5a;
  --red: #8e3b46;
  --gold: #aa7a28;
  --shadow: 0 18px 50px rgba(28, 36, 48, 0.1);
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: inherit;
}

button,
a.button {
  font: inherit;
}

.section-wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(20px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid rgba(217, 222, 216, 0.9);
  background: rgba(248, 247, 243, 0.92);
  backdrop-filter: blur(18px);
}

.site-title {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--blue-dark);
  font-weight: 800;
  text-decoration: none;
}

.site-title span:first-child {
  font-size: 18px;
}

.site-title span:last-child {
  color: var(--muted);
  font-size: 14px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  padding: 8px 10px;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
  background: #eaf0f3;
  color: var(--blue-dark);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  min-height: 40px;
  width: 44px;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--blue-dark);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
  min-height: calc(100vh - 150px);
  padding: clamp(48px, 8vw, 92px) 0 52px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  color: var(--blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 8vw, 86px);
  font-weight: 700;
  line-height: 0.98;
}

body[data-page="cv"] .intro h1 {
  font-size: clamp(42px, 6.8vw, 74px);
}

body[data-page="cv"] .intro {
  min-height: 0;
  padding-bottom: 26px;
}

body[data-page="cv"] .cv-section {
  padding-top: 28px;
  padding-bottom: 34px;
}

body[data-page="cv"] .insights-section {
  padding-top: 24px;
}

h2 {
  margin-bottom: 0;
  color: var(--blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
}

h3 {
  margin-bottom: 10px;
  color: var(--blue-dark);
  font-size: 17px;
  line-height: 1.25;
}

.intro-lede {
  max-width: 780px;
  color: #334154;
  font-size: clamp(19px, 2.2vw, 26px);
  line-height: 1.45;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 800;
  padding: 0 16px;
  text-decoration: none;
}

.button:hover {
  border-color: #b7c5ce;
  background: #eef4f6;
}

.button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.button.primary:hover {
  background: var(--blue-dark);
}

.portrait-block {
  margin: 0;
}

.portrait-block img {
  aspect-ratio: 4 / 5;
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow);
  object-fit: cover;
  object-position: center top;
}

.quick-links {
  border-block: 1px solid var(--line);
  background: #eef1ec;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-grid a {
  display: grid;
  gap: 4px;
  min-height: 112px;
  padding: 24px;
  border-right: 1px solid var(--line);
  color: var(--blue-dark);
  font-weight: 800;
  text-decoration: none;
}

.quick-grid a:first-child {
  border-left: 1px solid var(--line);
}

.quick-grid a span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading {
  margin-bottom: 28px;
}

.split-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.insights-section,
.research-section,
.cv-section {
  padding: 74px 0;
}

.insight-list,
.teaching-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.insight-card,
.teaching-card,
.paper-card,
.cv-grid section,
.cv-download {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.insight-card,
.teaching-card {
  display: grid;
  min-height: 164px;
  padding: 22px;
  text-decoration: none;
}

.insight-card {
  align-content: start;
  gap: 8px;
  min-height: 136px;
}

.insight-card span,
.teaching-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.insight-card strong,
.teaching-card strong {
  color: var(--blue-dark);
  font-size: 18px;
  line-height: 1.3;
}

.teaching-card strong {
  align-self: end;
}

.research-section {
  border-top: 1px solid var(--line);
}

.research-list {
  display: grid;
  gap: 12px;
}

.research-block + .research-block {
  margin-top: 44px;
}

.research-block h3 {
  margin-bottom: 14px;
  font-size: 22px;
}

.paper-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 20px 22px;
}

.paper-title {
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.28;
}

.paper-title a {
  text-decoration-color: rgba(15, 77, 117, 0.35);
  text-underline-offset: 3px;
}

.paper-details {
  margin: 7px 0 0;
  color: #3d4b5e;
}

.journal-name {
  font-style: italic;
}

.paper-links {
  display: flex;
  align-items: start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 180px;
}

.paper-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
  text-decoration: none;
}

.paper-card[data-kind="working"] {
  border-left: 4px solid var(--green);
}

.paper-card[data-kind="published"] {
  border-left: 4px solid var(--blue);
}

.teaching-section {
  padding: 74px 0;
  border-block: 1px solid var(--line);
  background: #eef1ec;
}

.teaching-card {
  min-height: 190px;
}

.teaching-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.teaching-links a {
  border-bottom: 1px solid rgba(15, 77, 117, 0.35);
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.cv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.cv-grid section,
.cv-download {
  padding: 22px;
}

.cv-grid ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
  color: #39475a;
}

.contact-section {
  padding-bottom: 74px;
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 22px;
}

.contact-card address {
  color: #39475a;
  font-style: normal;
}

.contact-card a {
  color: var(--blue-dark);
  font-weight: 800;
  text-decoration-color: rgba(15, 77, 117, 0.35);
  text-underline-offset: 3px;
}

.cv-download {
  display: flex;
  grid-column: span 3;
  align-items: center;
  gap: 10px;
}

.cv-download h3 {
  margin: 0 auto 0 0;
}

.site-footer {
  padding: 38px 0;
  background: var(--blue-dark);
  color: #e8eef2;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
}

.site-footer h2 {
  color: #ffffff;
  font-size: 26px;
}

.site-footer p {
  margin-bottom: 0;
  color: #b8c8d4;
}

.site-footer address {
  color: #dce7ed;
  font-style: normal;
}

.site-footer a {
  color: #ffffff;
}

@media (max-width: 920px) {
  .intro,
  .quick-grid,
  .insight-list,
  .teaching-list,
  .cv-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .intro {
    min-height: 0;
  }

  .portrait-block {
    max-width: 420px;
  }

  .quick-grid a,
  .quick-grid a:first-child {
    border-inline: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .paper-card {
    grid-template-columns: 1fr;
  }

  .paper-links {
    justify-content: flex-start;
    min-width: 0;
  }

  .cv-download {
    grid-column: auto;
    align-items: stretch;
    flex-direction: column;
  }

}

@media (max-width: 700px) {
  .site-header {
    align-items: start;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    right: 20px;
    left: 20px;
    display: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
    padding: 8px;
  }

  .site-nav.open {
    display: grid;
  }

  .site-nav a {
    padding: 11px 12px;
  }

  .section-wrap {
    width: min(var(--max), calc(100% - 28px));
  }

  .intro {
    gap: 28px;
    padding-top: 38px;
  }

  .portrait-block {
    max-width: 260px;
  }

  .portrait-block img {
    aspect-ratio: 1 / 1;
  }

  .split-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .insights-section,
  .research-section,
  .teaching-section,
  .cv-section {
    padding: 52px 0;
  }
}
