:root {
  color-scheme: light dark;
  --paper: #f7f7f5;
  --ink: #1d2525;
  --muted: #5f6867;
  --line: #d8ddda;
  --accent: #17766f;
  --accent-wash: #dfeeea;
  --max-width: 72rem;
  --reading-width: 47rem;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4.5rem;
  --space-6: 7rem;
}

@font-face {
  font-family: "Playfair Display";
  src: url("fonts/PlayfairDisplay-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("fonts/PlayfairDisplay-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171a1a;
    --ink: #edf0ee;
    --muted: #afb9b6;
    --line: #35403d;
    --accent: #78c9bf;
    --accent-wash: #213b38;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 65%, transparent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Playfair Display", Arial, sans-serif; letter-spacing: -0.035em; line-height: 1.08; }
.wrap { width: min(calc(100% - 2.5rem), var(--max-width)); margin-inline: auto; }

.site-header { border-bottom: 1px solid var(--line); }
.site-header__inner { width: min(calc(100% - 2.5rem), var(--max-width)); min-height: 5.4rem; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark { display: grid; color: var(--ink); text-decoration: none; line-height: 1.18; }
.wordmark span { font-weight: 680; letter-spacing: -0.025em; }
.wordmark small { color: var(--muted); font-size: 0.76rem; margin-top: 0.2rem; }
nav { display: flex; margin-left: clamp(1.5rem, 5vw, 5rem); gap: clamp(0.7rem, 2vw, 1.4rem); font-size: 0.87rem; }
nav a { color: var(--muted); text-decoration: none; }
.contact-links--header { margin: 0 0 0 auto; gap: 0.35rem 0.9rem; }
.contact-links--header .contact-link { font-size: 0.78rem; font-weight: 600; }

.intro { padding-top: clamp(5rem, 13vw, 10rem); padding-bottom: clamp(4rem, 11vw, 8rem); }
.intro__layout { display: grid; grid-template-columns: minmax(0, var(--reading-width)) clamp(7rem, 13vw, 10rem); align-items: start; justify-content: space-between; gap: clamp(1.25rem, 3vw, 3rem); }
.eyebrow { margin-bottom: var(--space-2); color: var(--accent); font-size: 0.75rem; font-weight: 720; letter-spacing: 0.09em; line-height: 1.3; text-transform: uppercase; }
.intro h1 { max-width: var(--reading-width); margin-bottom: var(--space-3); font-size: clamp(2.8rem, 7vw, 5.5rem); font-weight: 680; }
.intro__copy { max-width: var(--reading-width); font-size: clamp(1.08rem, 2vw, 1.3rem); }
.intro__copy p { margin-bottom: var(--space-3); }
.profile-photo { aspect-ratio: 1; margin: clamp(2rem, 5vw, 3.25rem) 0 0; }
.profile-photo img { display: block; width: 100%; height: 100%; border-radius: 0.3rem; object-fit: cover; object-position: center; }
.contact-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin-top: var(--space-3); }
.contact-link { color: var(--accent); font-size: 0.92rem; font-weight: 650; }
span.contact-link { color: var(--muted); cursor: not-allowed; text-decoration: line-through; text-decoration-color: var(--line); }

.section { padding-block: var(--space-6); border-top: 1px solid var(--line); }
.section-heading { margin-bottom: clamp(2.6rem, 7vw, 5rem); }
.section-heading h2, .details h2, .contact h2 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 670; }
.ai-note { padding-block: clamp(2.8rem, 7vw, 5rem); }
.ai-note h2 { margin: 0; font-size: clamp(1.8rem, 3.5vw, 2.7rem); font-weight: 670; }
.ai-note__copy { max-width: var(--reading-width); padding-top: var(--space-3); color: var(--muted); font-size: 0.97rem; }
.ai-note__copy p:last-child { margin-bottom: 0; }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline__item { display: grid; grid-template-columns: minmax(9rem, 0.7fr) minmax(0, 2.1fr); gap: clamp(1.5rem, 5vw, 5rem); padding: 0 0 clamp(2.8rem, 6vw, 4.5rem); position: relative; }
.timeline__item::before { content: ""; position: absolute; top: 0.65rem; left: calc(minmax(9rem, 0.7fr) + 1rem); display: none; }
.timeline__date { color: var(--muted); font-size: 0.88rem; font-variant-numeric: tabular-nums; padding-top: 0.15rem; }
.timeline__content h3 { margin-bottom: var(--space-2); font-size: clamp(1.25rem, 2.5vw, 1.55rem); font-weight: 650; }
.timeline__content h3 span { color: var(--muted); font-weight: 470; }
.timeline__content p { max-width: 43rem; margin-bottom: var(--space-2); }
.inline-link { color: var(--accent); font-size: 0.9rem; font-weight: 650; }
.reference-links { display: flex; flex-wrap: wrap; gap: 0.6rem 1.25rem; }

.areas__list { border-top: 1px solid var(--line); }
.areas article { padding: 1.55rem 0 1.65rem; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(13rem, 0.8fr) minmax(0, 1.5fr); gap: var(--space-3); }
.areas h3 { margin-bottom: 0; font-size: 1.05rem; font-weight: 680; }
.areas p { max-width: 40rem; margin-bottom: 0; color: var(--muted); }

.details { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3rem, 9vw, 9rem); border-top: 0; padding-top: 0; }
.details__block { border-top: 1px solid var(--line); padding-top: var(--space-4); }
.technology-list { margin: var(--space-4) 0 0; }
.technology-list div { padding: 0.95rem 0; border-bottom: 1px solid var(--line); }
.technology-list dt { margin-bottom: 0.25rem; font-size: 0.9rem; font-weight: 680; }
.technology-list dd { margin: 0; color: var(--muted); font-size: 0.94rem; }
.education-list { margin-top: var(--space-4); }
.education-list article + article { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.education-list h3 { margin-bottom: 0.5rem; font-size: 1rem; font-weight: 680; }
.education-list p { margin-bottom: 0; color: var(--muted); font-size: 0.94rem; }
.education-list span { white-space: nowrap; }

.contact { padding-top: var(--space-6); padding-bottom: var(--space-5); border-top: 1px solid var(--line); }
.contact > p:not(.eyebrow) { max-width: 38rem; margin-top: var(--space-3); font-size: 1.1rem; }
.contact > .contact__location { margin-top: var(--space-2); color: var(--muted); font-size: 0.95rem; }
.legal { max-width: min(calc(100% - 2.5rem), 48rem); padding-top: clamp(4rem, 10vw, 8rem); padding-bottom: var(--space-6); }
.legal > h1 { margin-bottom: var(--space-5); font-size: clamp(2.8rem, 7vw, 5.5rem); font-weight: 680; }
.legal section { padding-block: var(--space-4); border-top: 1px solid var(--line); }
.legal h2 { margin-bottom: var(--space-3); font-size: 1.4rem; font-weight: 670; }
.legal h3 { margin: var(--space-4) 0 var(--space-2); font-family: inherit; font-size: 1rem; font-weight: 700; letter-spacing: 0; }
.legal p, .legal address { max-width: 44rem; }
.legal address { font-style: normal; }
.site-footer { display: flex; justify-content: space-between; gap: var(--space-2); padding-block: var(--space-3); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; }
.footer-links { display: flex; gap: 1rem; }

@media (max-width: 640px) {
  .wrap, .site-header__inner { width: min(calc(100% - 2rem), var(--max-width)); }
  .site-header__inner { min-height: 5rem; align-items: flex-start; padding-top: 1rem; }
  .contact-links--header { display: none; }
  nav { margin-left: auto; padding-top: 0.25rem; gap: 0.7rem; font-size: 0.8rem; }
  .intro__layout { grid-template-columns: minmax(0, 1fr) 6rem; gap: var(--space-2); }
  .timeline__item, .areas article { grid-template-columns: 1fr; gap: 0.55rem; }
  .profile-photo { margin-top: 2.05rem; }
  .timeline__item { padding-bottom: 2.7rem; }
  .details { grid-template-columns: 1fr; gap: var(--space-5); }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; } }
