:root {
  color-scheme: light;
  --bg: #fff; --ink: #171717; --copy: #414141; --muted: #656565; --line: #e4e4e4;
  --soft: #f5f5f5; --button: #202020; --on-button: white; --hover: #ededed;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #171717; --ink: #f3f3f3; --copy: #d3d3d3; --muted: #adadad; --line: #393939;
  --soft: #252525; --button: #eee; --on-button: #171717; --hover: #303030;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    color-scheme: dark;
    --bg: #171717; --ink: #f3f3f3; --copy: #d3d3d3; --muted: #adadad; --line: #393939;
    --soft: #252525; --button: #eee; --on-button: #171717; --hover: #303030;
  }
}
*, *::before, *::after {box-sizing:border-box}
html {scroll-padding-top:1.75rem}
body {margin:0; background:var(--bg); color:var(--ink); font:400 1rem/1.6 var(--font); -webkit-font-smoothing:antialiased}
a {color:inherit;text-decoration-thickness:1px;text-underline-offset:.2em}
a:hover {text-decoration:underline}
a:focus-visible, button:focus-visible, summary:focus-visible {outline:2px solid currentColor;outline-offset:4px}
button {font:inherit;color:inherit;cursor:pointer}
[hidden] {display:none!important}
h1,h2,h3,p,dl,dd,figure,ul,blockquote {margin:0}
h1,h2,h3 {text-wrap:balance}
h1 {font-size:clamp(3.1rem,6.6vw,5.75rem);letter-spacing:-.075em;line-height:1.04;font-weight:600}
h2 {font-size:clamp(1.6rem,3vw,2.1rem);letter-spacing:-.055em;font-weight:600;line-height:1.2}
h3 {font-weight:600;letter-spacing:-.035em;font-size:1.2rem;line-height:1.4}
svg {display:block}
.icon {width:1.1rem;height:1.1rem;flex:none;stroke:currentColor;fill:none;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.wrap {width:min(calc(100% - 5rem),65rem);margin-inline:auto}
.skip {position:absolute;top:-6rem;left:1rem;background:var(--bg);padding:.5rem 1rem;z-index:5}
.skip:focus {top:.6rem}
header {border-bottom:1px solid var(--line)}
.bar {height:4.7rem;display:flex;align-items:center;justify-content:space-between;gap:1.4rem}
.brand {display:inline-flex;align-items:center;gap:.65rem;color:var(--ink);font-size:1.3rem;font-weight:620;letter-spacing:-.055em;text-decoration:none}
.brand:hover {text-decoration:none}
.brand img {width:2.1rem;height:2.1rem}
:root[data-theme=dark] .brand img {filter:invert(1)}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]) .brand img{filter:invert(1)}}
nav,.nav-links {display:flex;align-items:center;gap:.2rem}
nav a,.appearance {display:inline-flex;align-items:center;justify-content:center;min-height:2.55rem;border-radius:3rem;text-decoration:none;color:var(--muted)}
nav a {font-size:.92rem;font-weight:500;line-height:1;padding:.55rem 1rem}
nav [aria-current=page] {background:var(--soft);color:var(--ink)}
nav a:hover,.appearance:hover {background:var(--hover);color:var(--ink);text-decoration:none}
.appearance {width:2.6rem;padding:0;border:0;background:transparent;margin-left:.65rem}
.appearance .icon {width:1.2rem;height:1.2rem}
.appearance .sun {display:none}
:root[data-theme=dark] .appearance .sun {display:block}
:root[data-theme=dark] .appearance .moon {display:none}
@media(prefers-color-scheme:dark){
  :root:not([data-theme=light]) .appearance .sun {display:block}
  :root:not([data-theme=light]) .appearance .moon {display:none}
}
.hero {display:grid;grid-template-columns:minmax(0,1fr) clamp(13rem,24vw,18rem);gap:clamp(2rem,4vw,4.25rem);align-items:center;padding:clamp(3.6rem,6.9vw,6.4rem) 0}
.location {display:inline-flex;align-items:center;gap:.4rem;font-size:.88rem;color:var(--muted);margin:0 0 1.25rem}
.location .icon {width:.98rem;height:.98rem}
.tagline {font-size:clamp(1.3rem,2.4vw,1.8rem);letter-spacing:-.045em;line-height:1.35;margin-top:.85rem}
.intro {color:var(--copy);font-size:1.07rem;line-height:1.65;max-width:36rem;margin-top:1.05rem}
.intro a {text-decoration-color:var(--muted)}
.portrait {width:100%;aspect-ratio:1/1.06;background:#e1e1df;border-radius:1.25rem;overflow:hidden}
.portrait img {width:100%;height:100%;display:block;object-fit:cover;object-position:50% 32%;filter:grayscale(1)}
.actions {display:flex;align-items:center;flex-wrap:wrap;gap:.7rem;margin-top:1.65rem}
.pill {display:inline-flex;align-items:center;justify-content:center;gap:.58rem;min-height:2.75rem;border-radius:2rem;padding:.64rem 1.15rem;border:1px solid var(--line);font-size:.91rem;line-height:1.3;font-weight:550;text-decoration:none;background:var(--bg)}
.pill:hover {background:var(--soft);text-decoration:none}
.primary {background:var(--button);border-color:var(--button);color:var(--on-button)}
.primary:hover {background:var(--ink)}
.statbar {display:grid;grid-template-columns:repeat(4,1fr);padding:1.85rem 0 1.9rem;border-block:1px solid var(--line)}
.statbar div {padding-left:clamp(1rem,3.8vw,3rem);border-left:1px solid var(--line);display:flex;flex-direction:column-reverse;justify-content:end;align-items:flex-start}
.statbar div:first-child {border-left:0;padding-left:0}
.statbar dd {font-size:clamp(1.85rem,3.4vw,2.65rem);font-weight:550;letter-spacing:-.065em;line-height:1.1}
.statbar dt {color:var(--muted);font-size:.89rem;margin-top:.33rem}
.section {padding:3.35rem 0;border-bottom:1px solid var(--line)}
.section-head {display:flex;align-items:baseline;justify-content:space-between;gap:1.5rem;margin-bottom:1.3rem}
.textlink {font-size:.92rem;color:var(--copy);text-underline-offset:.25em}
.project-rows,.minor-list,.cv-list,.entry-list {padding:0;list-style:none}
.project-rows li+li,.entry-list>li+li {border-top:1px solid var(--line)}
.project-row {display:grid;grid-template-columns:3rem 1fr auto;align-items:center;gap:1rem;padding:1.1rem .15rem;text-decoration:none;border-radius:.3rem}
.project-row:hover {text-decoration:none}.project-row:hover strong,.entry-list a:hover strong {text-decoration:underline}
.emblem {display:flex;align-items:center;justify-content:center;width:2.9rem;height:2.9rem;background:var(--soft);border:1px solid var(--line);border-radius:.85rem;color:var(--ink)}
.emblem .icon {width:1.48rem;height:1.48rem;stroke-width:1.45}
.row-copy {display:flex;flex-direction:column;gap:.08rem}
.row-copy strong {font-size:1.13rem;letter-spacing:-.035em;font-weight:600}
.row-copy small {font-size:.95rem;line-height:1.5;color:var(--muted)}
.row-type,.meta {font-size:.85rem;color:var(--muted)}
.detail-section {display:grid;grid-template-columns:minmax(10rem,1fr) minmax(0,2fr);gap:2.5rem}
.prose {color:var(--copy);line-height:1.75;max-width:45rem}
.prose p+p {margin-top:1em}
details {border-top:1px solid var(--line)}
.details-list details:first-child {border-top:0}
summary {min-height:3.35rem;display:flex;align-items:center;justify-content:space-between;color:var(--ink);gap:1rem;cursor:pointer;list-style:none;font-weight:550}
summary::-webkit-details-marker {display:none}
summary::after {content:"+";font:400 1.25rem/1 var(--font);color:var(--muted);padding-right:.2rem}
details[open] summary::after {content:"−"}
details>div {padding:0 0 1.15rem}
.detail-links {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem 1rem}
dl.simple {display:grid;grid-template-columns:1fr auto;gap:.5rem 1rem}
dl.simple dd {font-variant-numeric:tabular-nums}
.poem {font-style:italic}.poem cite {font-size:.88rem;display:block;margin-top:.5rem}
.contact {padding-bottom:3.55rem;border-bottom:0}
.contact .actions {margin-top:1rem}
footer {border-top:1px solid var(--line);color:var(--muted);font-size:.88rem}
.footer-row {display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:5rem}
.footer-row div {display:flex;gap:1.25rem}
.footer-row a {text-decoration:none}.footer-row a:hover {text-decoration:underline}
.page-intro {padding:4rem 0 2.4rem}.page-intro h1 {font-size:clamp(3rem,5.8vw,4.75rem)}
.page-intro .intro {max-width:42rem}
.entry-list article {padding:1.65rem 0}
.entry-list h3 {font-size:1.48rem;margin:.2rem 0 .45rem}
.entry-list h3 a {text-decoration:none}.entry-list h3 a:hover {text-decoration:underline}
.project-meta {display:flex;gap:.6rem;align-items:center;font-size:.83rem;color:var(--muted)}
.project-meta span+span::before {content:"/";margin-right:.6rem;color:var(--muted)}
.cv-list>li {padding:1.5rem 0;border-bottom:1px solid var(--line)}
.cv-list>li:first-child {padding-top:0}.cv-list>li:last-child {border:0;padding-bottom:0}
.cv-list h3 {margin:.3rem 0 .4rem}.cv-list .role {font-weight:550;color:var(--copy)}
.notes {padding-left:1.15rem;color:var(--copy);margin-top:.7rem}
.notes li+li {margin-top:.4rem}
.timeline {border-left:2px solid var(--line);padding-left:1rem;margin:1.1rem 0}
.timeline p {display:flex;align-items:baseline;flex-wrap:wrap;gap:.25rem .75rem;margin:.3rem 0;font-size:.94rem}
.skillset dt {font-weight:600;margin-top:1.15rem}.skillset dt:first-child {margin:0}
.quicklinks {display:flex;flex-wrap:wrap;gap:.45rem 1.15rem;margin:1.25rem 0 0;font-size:.93rem}
.terror {max-width:46rem;text-align:center;padding:4.5rem 0}
.terror img {width:100%;height:auto;border-radius:1rem}.terror h1 {font-size:2.25rem;margin:2rem 0 1rem}
.terror .actions {justify-content:center}
@media(max-width:770px) {
  .wrap {width:calc(100% - 3rem)}
  .hero {grid-template-columns:minmax(0,1fr) minmax(9rem,27%);gap:1.5rem;padding:3.2rem 0}
  .detail-section {grid-template-columns:1fr;gap:1.15rem}
  .section {padding:2.6rem 0}
}
@media(max-width:580px) {
  .wrap {width:calc(100% - 2.5rem)}
  .bar {height:4.15rem;gap:.3rem}
  .brand {font-size:1.1rem;gap:.4rem}.brand img {width:1.8rem;height:1.8rem}
  nav a {padding:.52rem .55rem;font-size:.87rem;min-height:2.65rem}
  nav,.nav-links {gap:0}.appearance {width:2rem;margin-left:.15rem}
  .hero {grid-template-columns:1fr auto;gap:0 1.1rem;align-items:center;padding:2.85rem 0 2.3rem}
  .hero-copy {display:contents}
  .identity {grid-column:1;grid-row:1}
  .location {font-size:.79rem;margin-bottom:.6rem;gap:.25rem}
  .hero h1 {font-size:clamp(2.5rem,9vw,3.5rem);letter-spacing:-.07em}
  .portrait {grid-column:2;grid-row:1;width:clamp(4.5rem,18.5vw,7.2rem);aspect-ratio:1;border-radius:1rem}
  .hero-more {grid-column:1/-1}
  .tagline {font-size:1.4rem;margin-top:1.35rem}
  .intro {font-size:1rem;margin-top:.6rem}
  .actions {margin-top:1.2rem}
  .statbar {grid-template-columns:1fr 1fr;gap:1.2rem 0;padding:1.3rem 0}
  .statbar div {padding-left:1.15rem}
  .statbar div:nth-child(odd) {padding-left:0;border-left:0}
  .statbar dt {font-size:.84rem;margin-top:.18rem}
  .section-head {gap:.6rem;margin-bottom:.85rem}
  .project-row {grid-template-columns:2.65rem 1fr;gap:.75rem}.row-type {display:none}
  .emblem {width:2.55rem;height:2.55rem}.row-copy small {font-size:.91rem}
  .section {padding:2.2rem 0}.page-intro {padding:2.6rem 0 1.75rem}
  .footer-row {font-size:.81rem}.footer-row div {gap:.85rem}
  .detail-links {grid-template-columns:1fr}
}
@media(max-width:365px){.brand span{display:none}.appearance{margin-left:0}.wrap{width:calc(100% - 2rem)}}
.entry-list article:first-child {margin:0}
.entry-list li:first-child article {padding-top:0}
.simple {overflow-wrap:anywhere}
#profile .simple {grid-template-columns:minmax(5rem,.75fr) minmax(0,1.4fr)}
.terror {margin-inline:auto}
@media(min-width:1050px){.hero .intro {max-width:33.5rem}}
@media print {
  header,footer,.quicklinks,.appearance,.actions,.skip {display:none!important}
  :root {color-scheme:light;--bg:white;--ink:black;--copy:black;--muted:#444;--line:#ccc}
  .wrap {width:100%}.section,.page-intro {padding:1rem 0}.cv-list>li,.skillset dt {break-after:avoid}
}
