:root {
  color-scheme: light;
  --paper: #f7f6f2;
  --ink: #202320;
  --secondary: #525951;
  --accent: #355f4c;
  --rule: #d9dbd4;
  --measure: 840px;
  --sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
.intro-summary a, .prose a, .experience-entry a, .project-entry a { display: inline-block; padding-block: 3px; margin-block: -3px; }
.linked-term { white-space: nowrap; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { color: var(--ink); font-weight: 600; line-height: 1.22; letter-spacing: -.025em; }
h1 { max-width: 18ch; font-size: clamp(2.45rem, 5vw, 3.2rem); }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.13rem; }
p, li, dd { max-width: 72ch; }
.container { width: min(var(--measure), calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: absolute; top: 8px; left: 8px; z-index: 2; transform: translateY(-150%); background: var(--paper); padding: 8px 12px; }
.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--rule); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px 32px; }
.site-name { color: var(--ink); font-size: 1rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.site-header nav, .site-footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.site-header nav a, .site-footer nav a { color: var(--secondary); font-size: 1rem; text-decoration: none; }
.site-header nav a:hover, .site-footer nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.site-header nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .35em; }

main { min-height: 65vh; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 176px; align-items: center; gap: 48px; padding: 78px 0 28px; }
.intro-degree { margin-top: 12px; color: var(--secondary); font-size: 1.15rem; }
.intro-copy { max-width: 68ch; }
.intro-summary { margin-top: 22px; }
.home-portrait { width: 176px; margin: 0; }
.home-portrait img { width: 100%; height: auto; }
.text-links { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 26px 0 0; padding: 0; list-style: none; }
.text-links a, .contact-links a, .section-link a, .site-header nav a, .site-footer nav a { display: inline-flex; min-height: 44px; align-items: center; }
.text-links a { font-weight: 600; }
.content-section { margin-top: 56px; }
.content-section > h2 { margin-bottom: 24px; }
.summary-entry { padding: 20px 0 22px; border-top: 1px solid var(--rule); }
.entry-heading h2, .entry-heading h3 { margin-bottom: 5px; }
.entry-heading p { color: var(--secondary); font-size: .94rem; line-height: 1.55; }
.summary-entry > p:last-child { margin-top: 12px; }
.section-link { margin-top: 14px; }
.page-content { padding-top: 66px; padding-bottom: 92px; }
.page-content > h1 { margin-bottom: 34px; }
.about-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); align-items: start; gap: 38px; }
.portrait { width: 100%; }
.portrait img { width: 100%; height: auto; }
.prose p + p { margin-top: 18px; }
.details-section { max-width: 68ch; margin-top: 52px; }
.details-section h2 { margin-bottom: 14px; }
.details-section h3 { margin-bottom: 8px; }
.details-section p + p { margin-top: 4px; }
.experience-entry { padding: 28px 0 32px; border-top: 1px solid var(--rule); }
.experience-entry .entry-heading { margin-bottom: 20px; }
.experience-entry .company-context { margin: -5px 0 18px; max-width: 72ch; }
.experience-entry ul { margin: 0; padding-left: 24px; }
.experience-entry li { padding-left: 4px; }
.experience-entry li + li { margin-top: 12px; }
.skills-section { max-width: 72ch; }
.skills-list { margin: 0; }
.skills-list > div { padding: 17px 0; border-top: 1px solid var(--rule); }
.skills-list dt { font-weight: 600; }
.skills-list dd { margin: 4px 0 0; color: var(--secondary); }
.project-entry { max-width: 72ch; padding: 25px 0 30px; border-top: 1px solid var(--rule); }
.project-entry h2 { margin-bottom: 5px; }
.project-tools { margin-bottom: 14px; color: var(--secondary); font-size: 1rem; }
.project-entry > p + p { margin-top: 14px; }
.contact-intro { max-width: 58ch; }
.contact-links { display: grid; justify-items: start; gap: 9px; margin: 28px 0 0; padding: 0; list-style: none; }
.location { margin-top: 25px; color: var(--secondary); }
.site-footer { border-top: 1px solid var(--rule); }
.footer-inner { min-height: 76px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; color: var(--secondary); font-size: 1rem; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .container { width: min(var(--measure), calc(100% - 36px)); }
  .header-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding: 14px 0; }
  .site-header nav, .site-footer nav { gap: 6px 18px; }
  .site-header nav a, .site-footer nav a { font-size: .94rem; }
  .intro { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 28px; padding-top: 58px; }
  .home-portrait { width: min(176px, 62%); }
  .content-section { margin-top: 42px; }
  .page-content { padding-top: 46px; padding-bottom: 64px; }
  .about-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .portrait { width: min(260px, 78%); }
  .experience-entry { padding-block: 22px 26px; }
  .experience-entry .entry-heading { margin-bottom: 15px; }
  .footer-inner { padding-block: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
