:root {
  color-scheme: dark;
  --bg: #101010;
  --white: #f1f0ed;
  --muted: #aaa9a6;
  --line: #333332;
  --soft: #191919;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; background: var(--bg); color: var(--white); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
::selection { background: var(--white); color: var(--bg); }
:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }
a:hover { color: #c2c2bf; }
.wrap { width: calc(100% - clamp(48px, 8vw, 160px)); max-width: 1680px; margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: 12px; z-index: 9; background: white; color: black; padding: 12px; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.site-header { min-height: 88px; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 24px; border-bottom: 1px solid var(--line); }
.wordmark { justify-self: start; font-size: 25px; font-weight: 600; letter-spacing: -1px; }
.wordmark-dot { color: var(--muted); }
nav { display: flex; gap: 32px; font-size: 14px; }
nav a { position: relative; padding: 12px 0; }
nav a::after { content: ""; position: absolute; bottom: 6px; left: 0; right: 0; height: 1px; background: var(--white); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
nav a:hover::after, nav a[aria-current="location"]::after { transform: scaleX(1); }
.header-cv { justify-self: end; border: 1px solid #626260; border-radius: 6px; padding: 10px 16px; font-size: 13px; white-space: nowrap; }
.header-cv span { margin-left: 16px; }
.header-cv:hover { background: var(--white); color: var(--bg); }
.hero { padding-block: 64px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(0,1fr); gap: 64px; align-items: center; }
.hero-copy .eyebrow { font-size: 12px; line-height: 1.5; color: var(--muted); margin: 0 0 20px; }
.hero h1 { font-size: clamp(38px,4.7vw,60px); line-height: 1.08; font-weight: 500; letter-spacing: -.04em; margin: 0; }
.hero-role { font-size: 19px; line-height: 1.4; letter-spacing: -.01em; margin: 22px 0 16px; }
.secondary { color: var(--muted); font-size: 15px; line-height: 1.65; margin: 0; max-width: 68ch; }
.secondary + .secondary { margin-top: 16px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; margin-top: 28px; }
.primary-link, .text-link { display: inline-flex; align-items: center; justify-content: center; gap: 20px; font-size: 14px; min-height: 44px; }
.primary-link { padding: 10px 18px; background: var(--white); color: var(--bg); border: 1px solid var(--white); border-radius: 6px; transition: background .2s, box-shadow .2s; }
.primary-link:hover { background: #ddd; color: var(--bg); box-shadow: 0 0 24px #ffffff12; }
.text-link { padding: 10px 0; border-bottom: 1px solid #626260; }
.portrait-stage { width: 100%; max-width: 480px; justify-self: end; }
.portrait { width: 100%; aspect-ratio: 4/5; margin: 0; overflow: hidden; border-radius: 48% 48% 14% 14%; background: #222; border: 1px solid #484847; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; filter: grayscale(1); transform: scale(1.015); transition: transform .5s ease; }
.portrait:hover img { transform: scale(1.045); }
.section { padding-top: 72px; }
.section-label { display: flex; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.section-label > span:first-child { color: var(--white); }
.section-heading { display: grid; gap: 16px; margin: 24px 0 32px; }
h2 { font-size: 38px; line-height: 1.15; letter-spacing: -.03em; font-weight: 500; margin: 0; }
.small-count { font-size: 12px; font-weight: 400; letter-spacing: 0; display: inline-block; vertical-align: middle; margin-left: 12px; color: var(--muted); }
.section-heading > p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; }
.project-tools { display: flex; align-items: center; gap: 24px; }
#expand-projects:disabled { color: #777; cursor: default; }
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
#project-filters { display: flex; gap: 8px; flex-wrap: wrap; }
#project-filters button { padding: 7px 16px; border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 24px; font-size: 13px; transition: background .2s, color .2s; }
#project-filters button[aria-pressed="true"] { background: var(--white); color: var(--bg); border-color: var(--white); }
#project-filters button:hover { border-color: #929290; }
#project-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.project-list { border-top: 1px solid #575755; }
.project { border-bottom: 1px solid var(--line); }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.project summary { display: grid; grid-template-columns: 36px minmax(0,1fr) 144px 24px; align-items: center; gap: 20px; padding: 26px 0; position: relative; transition: background .2s; }
.project summary:hover, .project[open] summary { background: var(--soft); }
.project-number { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; align-self: start; padding-top: 5px; }
.project-name { font-size: 22px; letter-spacing: -.02em; line-height: 1.25; }
.project-subtitle { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; letter-spacing: 0; margin-top: 6px; }
.project-type { color: var(--muted); font-size: 12px; line-height: 1.5; }
.project-toggle { position: relative; width: 24px; height: 24px; }
.project-toggle::before, .project-toggle::after { content: ""; position: absolute; background: var(--white); left: 4px; right: 4px; top: 11px; height: 1px; }
.project-toggle::after { transform: rotate(90deg); transition: transform .2s; }
.project[open] .project-toggle::after { transform: rotate(0); }
.project-detail { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 36px; padding: 24px 44px 32px 56px; background: var(--soft); }
.project[open] .project-detail { animation: none; }
.project-intro { margin: 0; font-size: 15px; line-height: 1.65; }
.project-detail h3 { font-size: 14px; line-height: 1.5; font-weight: 500; margin: 0 0 12px; }
.project-detail > div > p { font-size: 14px; line-height: 1.65; color: var(--muted); margin: 0 0 16px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; margin: 20px 0 0; }
.tags li { font-size: 11px; border: 1px solid #414140; padding: 5px 9px; color: #bcbcb9; }
.list-hint { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 16px 0 0; }
.about { padding-bottom: 72px; }
.about-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.5fr); gap: 64px; margin-top: 28px; }
.about-copy > p { font-size: 15px; color: #bcbcb9; line-height: 1.65; margin: 0 0 16px; }
.languages { margin-top: 24px; }
.languages .eyebrow { color: var(--muted); font-size: 12px; }
.languages p { font-size: 12px; line-height: 1.7; margin: 8px 0 0; }
.languages p span { color: var(--muted); }
.background-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 48px; margin-top: 28px; }
.column-heading { font-size: 16px; line-height: 1.5; font-weight: 500; margin: 0; padding-bottom: 16px; border-bottom: 1px solid #575755; }
.timeline, .education-row { border-bottom: 1px solid var(--line); }
.timeline summary { display: grid; grid-template-columns: minmax(0,1fr) 116px 12px; gap: 12px; align-items: start; padding: 22px 0; font-size: 14px; line-height: 1.4; }
.education-row { display: grid; grid-template-columns: minmax(0,1fr) 96px; gap: 16px; padding: 22px 0; font-size: 14px; line-height: 1.4; }
.timeline small, .education-row small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 6px; }
time { color: var(--muted); font-size: 11px; line-height: 1.5; text-align: right; font-variant-numeric: tabular-nums; padding-top: 2px; white-space: nowrap; }
.mini-plus { font-size: 16px; line-height: 1; text-align: right; }
.timeline[open] .mini-plus { transform: rotate(45deg); }
.timeline > p { font-size: 14px; color: var(--muted); line-height: 1.65; margin: 0 0 16px; }
.timeline > p:last-child { margin-bottom: 24px; }
.credentials { margin-top: 48px; }
.credentials ul { list-style: none; padding: 24px 0 0; margin: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 48px; }
.credentials li { font-size: 13px; line-height: 1.55; color: var(--muted); }
.contact-section { border-block: 1px solid var(--line); padding-block: 44px; background: #151515; }
.contact-heading { display: grid; gap: 16px; max-width: 580px; }
.contact-bottom { display: flex; align-items: center; flex-wrap: wrap; gap: 28px; }
.contact-heading { margin: 24px 0 28px; }
.contact-heading p { font-size: 14px; line-height: 1.65; color: var(--muted); margin: 0; }
.email-link { justify-self: start; font-size: 16px; border-bottom: 1px solid #666664; padding-bottom: 4px; overflow-wrap: anywhere; }
.socials { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; font-size: 13px; }
.socials a { white-space: nowrap; }
.site-footer { padding-block: 24px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 11px; line-height: 1.5; flex-wrap: wrap; }
@keyframes detail-in { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 1000px) {
  .wrap { width: calc(100% - 64px); }
  .hero { padding-block: 48px; }
  .hero-grid { gap: 40px; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); }
  .hero h1 { font-size: 44px; }
  .hero-role { font-size: 18px; }
  .project summary { grid-template-columns: 28px minmax(0,1fr) 120px 24px; gap: 16px; }
  .project-detail { padding-left: 44px; gap: 28px; }
  .about-grid { gap: 40px; }
  .background-grid { gap: 32px; }
  .timeline summary { grid-template-columns: minmax(0,1fr) 12px; }
  .timeline time { grid-column: 1; grid-row: 2; text-align: left; padding: 0; }
  .timeline .mini-plus { grid-column: 2; grid-row: 1; }
  .education-row { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .education-row time { text-align: left; padding: 0; }
  .contact-heading, .contact-bottom { gap: 32px; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 40px); }
  .site-header { min-height: 76px; grid-template-columns: auto 1fr; gap: 16px; }
  nav { justify-self: end; }
  .header-cv { display: none; }
  nav { font-size: 13px; gap: 20px; }
  .hero { padding-block: 36px; }
  .hero-grid { grid-template-columns: minmax(0,1fr); gap: 32px; }
  .hero h1 { font-size: clamp(32px,9vw,44px); }
  .hero-role { margin-top: 18px; }
  .secondary { font-size: 14px; }
  .hero-actions { gap: 20px; margin-top: 24px; }
  .portrait-stage { width: min(100%,320px); justify-self: center; }
  .portrait { aspect-ratio: 1; }
  .section { padding-top: 48px; }

  .section-heading { display: block; margin: 24px 0; }
  h2 { font-size: 32px; }
  .section-heading > p { margin-top: 12px; }
  .section-heading > p br { display: none; }
  .project-tools { gap: 16px; }
  #expand-projects { font-size: 12px; }
  #project-filters { gap: 5px; }
  #project-filters button { padding: 7px 12px; font-size: 12px; }
  .filter-bar { gap: 12px; }
  .project summary { grid-template-columns: 24px minmax(0,1fr) 20px; gap: 12px; padding: 22px 0; }
  .project-name { font-size: 19px; }
  .project-type { display: none; }
  .project-toggle { width: 20px; }
  .project-detail { grid-template-columns: minmax(0,1fr); gap: 24px; padding: 16px 16px 28px 36px; }
  .about-grid { grid-template-columns: minmax(0,1fr); gap: 24px; margin-top: 24px; }
  .about-copy > p { font-size: 14px; }
  .background-grid { grid-template-columns: minmax(0,1fr); gap: 36px; margin-top: 36px; }
  .credentials { margin-top: 36px; }
  .credentials ul { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .about { padding-bottom: 48px; }
  .contact-section { padding-block: 32px; }
  .contact-heading, .contact-bottom { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .socials { gap: 12px 20px; }
  .site-footer > span:nth-child(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .portrait:hover img { transform: scale(1.015); }
}

.reading-progress { position: fixed; inset: 0 0 auto; height: 2px; background: var(--white); transform: scaleX(0); transform-origin: left; z-index: 10; pointer-events: none; }
.section-heading > p { max-width: 560px; }
#expand-projects { border: 0; background: transparent; color: var(--white); padding: 10px 0; font-size: 13px; }
#expand-projects:hover { color: var(--muted); }
.project-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 20px; font-size: 13px; }
.project-links a { padding-bottom: 4px; border-bottom: 1px solid #666; }
.capabilities { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-top: 36px; align-items: start; }
.capability { border: 1px solid var(--line); border-radius: 8px; background: #151515; transition: border-color .2s; }
.capability:hover, .capability[open] { border-color: #777; }
.capability summary { display: flex; justify-content: space-between; gap: 16px; padding: 22px; font-size: 14px; }
.capability summary > span:last-child { transition: transform .2s; }
.capability[open] summary > span:last-child { transform: rotate(45deg); }
.capability p { margin: 0; padding: 0 22px 16px; font-size: 13px; color: var(--muted); }
.capability a { display: inline-block; margin: 0 22px 22px; font-size: 12px; border-bottom: 1px solid #666; }
@media (max-width: 760px) {
 .capabilities { grid-template-columns: minmax(0,1fr); gap: 12px; }
 .project-tools { width: 100%; justify-content: space-between; }
 .contact-heading { gap: 16px; }
 .contact-bottom { gap: 24px; }
}

.icon { display: inline-block; width: 1em; height: 1em; flex: 0 0 auto; vertical-align: -.12em; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
#expand-projects { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.socials a, .project-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
@media (min-width: 1400px) {
 body { font-size: 17px; }
 .hero { padding-block: 80px; }
 .hero-grid { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: clamp(64px,6vw,112px); }
 .hero h1 { font-size: clamp(60px,4.4vw,80px); }
 .hero-role { font-size: 23px; }
 .secondary { font-size: 18px; line-height: 1.7; }
 .portrait-stage { max-width: 520px; }
 nav, .primary-link, .text-link { font-size: 16px; }
 .header-cv { font-size: 15px; }
 h2 { font-size: 44px; }
 .project-name { font-size: 26px; }
 .project-subtitle, .project-type, .section-label { font-size: 14px; }
 .project-intro { font-size: 18px; }
 .project-detail > div > p, .timeline > p { font-size: 16px; }
 .timeline summary, .education-row { font-size: 17px; }
 .timeline small, .education-row small, .credentials li { font-size: 15px; }
}
@media (pointer: coarse) {
 nav a, .socials a, #project-filters button { min-height: 44px; display: inline-flex; align-items: center; }
}

:root { --ease: cubic-bezier(.22,1,.36,1); }
a, button { transition: color 220ms ease, background-color 220ms ease, border-color 220ms ease, box-shadow 300ms ease; }
nav a::after { transition: transform 350ms var(--ease); }
.project-toggle::after, .mini-plus { transition: transform 350ms var(--ease); }
.portrait img { transition: transform 800ms var(--ease); }
.project summary { transition: background-color 250ms ease; }
.project, .timeline { overflow-anchor: none; }
@media (prefers-reduced-motion: reduce) {
 *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Contact uses the full section width, with one consistent edge per column. */
.contact-section > .wrap { display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: 48px; row-gap: 28px; align-items: end; }
.contact-section .section-label { grid-column: 1 / -1; }
.contact-heading { margin: 0; gap: 16px; }
.contact-bottom { flex-direction: column; align-items: flex-end; gap: 12px; }
.contact-bottom .socials { justify-content: flex-end; }
@media (max-width: 760px) {
 .contact-section > .wrap { grid-template-columns: minmax(0,1fr); row-gap: 24px; }
 .contact-bottom { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px 24px; }
 .contact-bottom .socials { justify-content: flex-start; }
}
