:root {
  color-scheme: light dark;
  --bg: #f7f5ef;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --text: #1d2628;
  --muted: #5b686b;
  --line: rgba(29, 38, 40, 0.14);
  --accent: #146c64;
  --accent-strong: #0e4f49;
  --accent-text: #ffffff;
  --accent-soft: rgba(20, 108, 100, 0.12);
  --gold: #ad7c25;
  --shadow: 0 22px 70px rgba(44, 55, 56, 0.14);
  --max-width: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111719;
    --surface: #151d20;
    --surface-strong: #1b2528;
    --text: #edf1ef;
    --muted: #a9b7b6;
    --line: rgba(237, 241, 239, 0.13);
    --accent: #62c6b8;
    --accent-strong: #8de2d6;
    --accent-text: #071312;
    --accent-soft: rgba(98, 198, 184, 0.13);
    --gold: #e0bd70;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, var(--accent-soft), transparent 34rem),
    linear-gradient(180deg, var(--surface) 0, var(--bg) 34rem);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  letter-spacing: 0;
  overflow-x: hidden;
}

body.is-loading [data-profile],
body.is-loading [data-profile-list] {
  opacity: 0.22;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  text-underline-offset: 0.22em;
}

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-150%);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: calc(var(--max-width) + 4rem);
  margin: 0 auto;
  padding: 1.15rem 2rem;
  backdrop-filter: blur(18px);
}

.brand,
.site-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.75rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--accent-strong);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.site-nav {
  gap: 1rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.site-nav a {
  text-decoration: none;
}

.section {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5.5rem 2rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 21rem);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: center;
  min-height: calc(88vh - 4rem);
  padding-top: 3rem;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.85rem;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  max-width: 9ch;
  font-size: clamp(4rem, 13vw, 8.75rem);
}

h2 {
  max-width: 14ch;
  font-size: clamp(2rem, 5vw, 4.8rem);
}

h3 {
  font-size: 1.15rem;
}

.hero-text {
  max-width: 44rem;
  margin: 1.8rem 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  overflow-wrap: break-word;
}

.hero-actions,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}

.button-link {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  padding: 0.58rem 0.95rem;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.button-link.primary {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-text);
}

.portrait {
  margin: 0;
}

.portrait img {
  aspect-ratio: 1;
  width: min(100%, 21rem);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  box-shadow: var(--shadow);
  object-fit: cover;
  object-position: center;
}

.intro-grid,
.split-section,
.contact-section {
  display: grid;
  grid-template-columns: minmax(14rem, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(2rem, 6vw, 5rem);
  border-top: 1px solid var(--line);
}

.intro-grid p,
.contact-section p {
  margin-top: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.section-heading {
  margin-bottom: 2rem;
}

.section-heading h2 {
  max-width: 17ch;
}

.sticky-heading {
  align-self: start;
  position: sticky;
  top: 6rem;
}

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

.card,
.timeline-item,
.publication {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  padding: 1.15rem;
}

.card p,
.timeline-item p,
.publication p {
  margin: 0.65rem 0 0;
  color: var(--muted);
}

.meta {
  display: block;
  margin-top: 0.45rem;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 800;
}

.timeline,
.publication-list {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
}

.timeline-item .date {
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.publication {
  display: grid;
  gap: 0.8rem;
}

.publication-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.publication-top a {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  padding: 0.45rem 0.72rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.contact-section {
  align-items: start;
  padding-bottom: 7rem;
}

@media (max-width: 860px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-wrap: wrap;
    padding-inline: 1rem;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.7rem;
  }

  .section {
    padding: 4rem 1rem;
  }

  .hero,
  .intro-grid,
  .split-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-copy {
    min-width: 0;
    max-width: calc(100vw - 2rem);
  }

  .hero-text {
    max-width: min(100%, 20rem);
  }

  .portrait {
    order: -1;
  }

  .portrait img {
    width: min(15rem, 100%);
  }

  .sticky-heading {
    position: static;
  }

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

@media (max-width: 560px) {
  .site-header {
    gap: 0.9rem;
  }

  .brand span:last-child {
    display: none;
  }

  .site-nav {
    flex: 1 1 17rem;
    font-size: 0.86rem;
    line-height: 1.2;
  }

  h1 {
    font-size: clamp(3.35rem, 18vw, 4.5rem);
  }

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

  .timeline-item .date {
    white-space: normal;
  }
}
