:root {
  color-scheme: light dark;
  --paper: #f7f5ef;
  --ink: #242d29;
  --muted: #59645e;
  --accent: #285543;
  --line: #d9ded3;
  --surface: #ecefe7;
  --image-bg: #e2e7dd;
  --warm: #81502e;
  --serif: Charter, 'Bitstream Charter', 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #161d1a; --ink: #edf0e8; --muted: #adb9af; --accent: #abd0b8; --line: #35433a; --surface: #202c24; --image-bg: #29362d; --warm: #e1b18a; }
}
* { box-sizing: border-box; }
html { scroll-padding-top: 2rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .25em; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
figcaption { color: var(--muted); font-size: .74rem; line-height: 1.5; margin-top: .8rem; }
p { margin: 0 0 1.1rem; }
h1, h2, h3 { line-height: 1.14; font-weight: 500; margin: 0 0 1.25rem; }
h1, .feature-deck, .home-background h2 { font-family: var(--serif); letter-spacing: -.045em; }
h1 { font-size: clamp(2.7rem, 5.4vw, 4.8rem); }
h2 { font-size: 1.65rem; letter-spacing: -.025em; }
h3 { font-size: 1.3rem; letter-spacing: -.02em; }
.wrap { max-width: 1192px; margin-inline: auto; padding-inline: 36px; }
.site-header { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; border-bottom: 1px solid var(--line); }
.identity { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; font-size: 1rem; font-weight: 600; white-space: nowrap; }
.monogram { width: 42px; height: 42px; border: 1px solid var(--line); display: grid; place-content: center; font: bold 24px var(--serif); color: var(--accent); border-radius: 50%; padding-bottom: 5px; }
.site-header nav { display: flex; gap: 2rem; font-size: .88rem; }
.site-header nav a { color: var(--muted); text-decoration: none; padding-block: 12px; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--ink); }
.site-header nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .65em; }
.skip-link { position: absolute; top: -100px; left: 20px; background: var(--paper); padding: 10px; z-index: 2; }
.skip-link:focus { top: 8px; }
.eyebrow { font-size: .73rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.3rem; }
.intro { padding: 48px 0 42px; max-width: 890px; }
.intro h1 { margin-bottom: 1.3rem; }
.intro-lead { max-width: 700px; font-size: 1.16rem; line-height: 1.75; color: var(--muted); }
.intro-links { display: flex; flex-wrap: wrap; align-items: center; gap: 1.7rem; margin-top: 1.4rem; font-size: .91rem; }
.button { display: inline-flex; align-items: center; gap: 1.7rem; background: var(--accent); color: var(--paper); text-decoration: none; padding: .7rem 1.15rem; border-radius: 4px; font-weight: 600; }
.text-link { font-weight: 500; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-block: 16px; border-top: 1px solid var(--line); }
.section-heading h2 { margin: 0; font-size: 1.4rem; }
.section-heading > a, .section-note { font-size: .81rem; color: var(--muted); }
.feature { display: grid; grid-template-columns: .85fr 1.4fr; gap: 32px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 26px 28px; }
.feature + .feature { margin-top: 20px; }
.feature-copy h3 { font-weight: 600; margin-bottom: 16px; }
.feature-copy .eyebrow { font-size: .62rem; }
.feature-deck { font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.12; }
.feature-copy > p:not(.eyebrow):not(.feature-deck) { font-size: .89rem; }
.feature-image { min-width: 0; }
.feature-image img { box-shadow: 0 12px 26px #0002; border-radius: 5px; }
.feature-image figcaption { text-align: right; }
.project-meta { color: var(--muted); font-size: .75rem; }
.project-links { display: flex; gap: 1.4rem; flex-wrap: wrap; font-size: .83rem; margin-top: 1.5rem; }
.project-links a { font-weight: 600; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; margin-top: 24px; }
.project-image { display: flex; justify-content: center; align-items: center; height: 215px; background: var(--image-bg); padding: 16px; margin-bottom: 22px; border-radius: 4px; }
.project-image img { max-height: 100%; width: auto; object-fit: contain; box-shadow: 0 6px 12px #0002; }
.card-heading { display: flex; gap: .7rem; align-items: baseline; flex-wrap: wrap; margin-bottom: 10px; }
.card-heading h3 { margin: 0; font-size: 1.12rem; font-weight: 600; }
.card-heading a { color: var(--ink); text-decoration: none; }
.project-card p { color: var(--muted); font-size: .89rem; line-height: 1.65; }
.status { color: var(--warm); font-size: .67rem; white-space: nowrap; }
.section-tail { margin: 20px 0 38px; font-size: .89rem; }
.home-background { display: grid; grid-template-columns: 1fr 2fr; gap: 35px; padding-block: 28px 32px; border-top: 1px solid var(--line); }
.home-background .eyebrow { padding-top: 9px; }
.home-background h2 { font-size: 2.5rem; }
.home-background p:not(.eyebrow) { color: var(--muted); }
.home-background a { font-size: .9rem; }
.writing-link { color: inherit; display: grid; grid-template-columns: 130px 1fr 20px; gap: 30px; padding-block: 20px; text-decoration: none; }
.writing-link:hover h3 { text-decoration: underline; text-underline-offset: .2em; }
.writing-link h3 { margin: 0 0 10px; font-family: var(--serif); font-size: 1.65rem; }
.writing-link p { margin: 0; color: var(--muted); font-size: .92rem; }
.writing-link time { color: var(--muted); font-size: .78rem; padding-top: 5px; }
.writing-link:hover { text-decoration: none; }
.site-footer { margin-top: 42px; padding-block: 24px 30px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: start; gap: 2rem; }
.footer-name { color: var(--ink); text-decoration: none; font-size: .86rem; font-weight: 600; }
.site-footer p { font-size: .74rem; color: var(--muted); margin-top: 5px; }
.site-footer nav { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: .75rem; padding-top: 3px; }
.site-footer nav a { color: var(--muted); }
.page-intro { padding: 44px 0 36px; max-width: 810px; }
.page-lead { color: var(--muted); font-size: 1.15rem; max-width: 720px; margin-top: 1.3rem; }
.project-detail { display: grid; grid-template-columns: 1fr 1.15fr; align-items: center; gap: 40px; padding-block: 30px; border-bottom: 1px solid var(--line); }
.project-detail h3 { font-family: var(--serif); font-size: 2.6rem; }
.project-detail p:not(.eyebrow):not(.project-meta) { color: var(--muted); font-size: .95rem; }
.project-detail figure img { box-shadow: 0 10px 30px #0002; border-radius: 4px; }
.compact-image { display: flex; justify-content: center; }
.tools-section { margin-top: 40px; }
.tool-row { display: grid; grid-template-columns: 1fr 2.2fr; gap: 30px; padding-block: 20px; border-bottom: 1px solid var(--line); }
.tool-row h3 { font-size: 1.2rem; padding-top: 3px; }
.tool-row h3 a { text-decoration: none; }
.tool-row h3 span { font-size: .85rem; }
.tool-row p { font-size: .95rem; color: var(--muted); margin-bottom: .5rem; }
.about-section { display: grid; grid-template-columns: minmax(190px, .75fr) minmax(0, 2.25fr); gap: 36px; padding-block: 26px; border-top: 1px solid var(--line); }
.about-section h2 { font-size: 1.4rem; line-height: 1.35; }
.prose { max-width: 760px; }
.prose > :last-child { margin-bottom: 0; }
.prose p { color: var(--muted); }
.personal-section { margin-block: 22px 34px; background: var(--surface); padding: 24px; display: grid; grid-template-columns: 1fr 1.5fr; gap: 32px; align-items: center; border-radius: 5px; }
.personal-section img { width: 100%; height: auto; border-radius: 3px; }
.personal-section h2 { font-family: var(--serif); font-size: 2.35rem; }
.personal-section p:not(.eyebrow) { color: var(--muted); font-size: .95rem; }
.contact-section h3 { font-size: 1.1rem; margin-top: 2rem; }
.research-note { margin-top: 36px; max-width: 720px; padding-top: 24px; border-top: 1px solid var(--line); }
.research-note h2 { font-family: var(--serif); font-size: 2rem; }
.research-note > p:not(.eyebrow) { color: var(--muted); }
.article { max-width: 820px; padding-top: 44px; }
.article h1 { font-size: clamp(2.5rem, 5vw, 3.7rem); margin-bottom: 2rem; }
.article h2 { margin-top: 2.8rem; font-size: 1.6rem; }
.article h1 ~ p, .article li { color: var(--muted); }
.article li { margin-bottom: .4rem; }
code { overflow-wrap: anywhere; font-size: .88em; }
pre { overflow-x: auto; padding: 1rem; background: var(--surface); }
@media (max-width: 950px) {
  .feature { gap: 24px; padding: 26px; }
  .project-grid { gap: 20px; }
  .project-image { height: 170px; padding: 12px; }
  .project-detail { gap: 30px; }
  .site-footer { flex-direction: column; gap: 1rem; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 22px; }
  .site-header { padding-top: 16px; padding-bottom: 15px; flex-direction: column; align-items: start; gap: 16px; }
  .site-header nav { gap: 28px; font-size: .82rem; width: 100%; }
  .site-header nav a { padding-block: 4px; }
  .identity { font-size: .95rem; }
  .monogram { width: 34px; height: 34px; font-size: 23px; }
  .intro, .page-intro { padding-block: 30px; }
  h1 { font-size: clamp(2.65rem, 8vw, 3.8rem); }
  .intro h1 br { display: none; }
  .intro-lead, .page-lead { font-size: 1.04rem; }
  .intro-links { gap: 1.25rem; }
  .eyebrow { font-size: .65rem; }
  .section-heading { flex-wrap: wrap; gap: 8px; }
  .section-heading h2 { font-size: 1.25rem; }
  .section-note { font-size: .73rem; }
  .feature { grid-template-columns: 1fr; padding: 24px 20px; }
  .feature-deck { font-size: 2.35rem; }
  .feature-image { margin-top: 12px; }
  .feature-image figcaption { text-align: left; }
  .project-grid { grid-template-columns: 1fr; gap: 30px; }
  .project-image { height: auto; min-height: 180px; padding: 22px; }
  .project-image img { max-height: 260px; }
  .project-card p { font-size: .94rem; }
  .home-background, .about-section { grid-template-columns: 1fr; gap: 10px; }
  .home-background .eyebrow { margin-bottom: 1rem; }
  .home-background h2 { font-size: 2.2rem; }
  .writing-link { grid-template-columns: 1fr 18px; gap: 12px; }
  .writing-link time { grid-column: 1 / -1; }
  .writing-link h3 { font-size: 1.5rem; }
  .project-detail { grid-template-columns: 1fr; gap: 24px; padding-block: 26px; }
  .project-detail h3 { font-size: 2.2rem; }
  .tool-row { grid-template-columns: 1fr; gap: 0; }
  .tool-row h3 { margin-bottom: .7rem; }
  .personal-section { grid-template-columns: 1fr; padding: 22px; gap: 25px; }
  .personal-section figure { max-width: 370px; }
  .personal-section h2 { font-size: 2rem; }
  .site-footer { margin-top: 32px; }
  .site-footer nav { gap: 1rem; }
  .article { padding-top: 30px; }
}
@media (prefers-reduced-motion: no-preference) {
  a { transition: color .15s ease; }
}
@media print {
  :root { --paper: white; --ink: black; --muted: #333; --accent: #222; --line: #ccc; }
  .site-header nav, .site-footer nav, .skip-link { display: none; }
  .wrap { max-width: none; }
  .feature, .project-detail, .about-section { break-inside: avoid; }
}

/* Professional work and public software share the same quiet visual language. */
.engineering-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding-top: 8px; }
.engineering-intro p { color: var(--muted); font-size: .96rem; }
.engineering-questions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding: 14px 0 2px; }
.engineering-questions > div { border-left: 2px solid var(--line); padding-left: 18px; }
.engineering-questions h3 { font-family: var(--serif); font-size: 1.42rem; margin-bottom: .65rem; }
.engineering-questions p { color: var(--muted); font-size: .88rem; line-height: 1.65; }
.engineering-work .section-tail { margin-bottom: 28px; }
@media (max-width: 700px) {
  .engineering-intro, .engineering-questions { grid-template-columns: 1fr; gap: 0; }
  .engineering-questions > div { margin-bottom: 12px; }
  .engineering-questions h3 { font-size: 1.35rem; }
}
