:root {
  color-scheme: light;
  --background: #e4e7ec;
  --surface: #fff;
  --raised: #fff;
  --text: #252a31;
  --secondary: #526070;
  --action: #343b45;
  --on-action: #fff;
  --separator: #cbd1da;
  --focus: #0066cc;
  --profile-start: #dce2eb;
  --profile-end: #aebaca;
  --profile-ink: #384657;
  --caption: #f9fafc;
  --nav-glass: rgb(255 255 255 / 94%);
  --shadow: 0 10px 28px rgb(31 41 56 / 12%);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --content-width: 70rem;
  font: 100%/1.588 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  -webkit-text-size-adjust: 100%;
}

/* The same tokens apply to an explicit choice and the no-JavaScript fallback. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #111214;
  --surface: #202226;
  --raised: #2c323b;
  --text: #f1f2f4;
  --secondary: #b9bec7;
  --action: #d9dde4;
  --on-action: #181b20;
  --separator: #3a3d45;
  --focus: #64b5ff;
  --profile-start: #565e6c;
  --profile-end: #22262e;
  --profile-ink: #e3e8f0;
  --caption: #2c323b;
  --nav-glass: rgb(32 34 38 / 94%);
  --shadow: 0 10px 28px rgb(0 0 0 / 24%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #111214;
    --surface: #202226;
    --raised: #2c323b;
    --text: #f1f2f4;
    --secondary: #b9bec7;
    --action: #d9dde4;
    --on-action: #181b20;
    --separator: #3a3d45;
    --focus: #64b5ff;
    --profile-start: #565e6c;
    --profile-end: #22262e;
    --profile-ink: #e3e8f0;
    --caption: #2c323b;
    --nav-glass: rgb(32 34 38 / 94%);
    --shadow: 0 10px 28px rgb(0 0 0 / 24%);
  }
}

* { box-sizing: border-box; }
body { margin: 0; padding: 2rem 0 1.5rem; background: var(--background); color: var(--text); overflow-wrap: anywhere; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 600; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
img { display: block; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 5px; }
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
section[id], main[id] { scroll-margin-top: 2rem; }
.container { width: min(var(--content-width), calc(100% - 3rem)); margin-inline: auto; }
.skip-link { position: fixed; top: 1rem; left: 1rem; z-index: 30; padding: .75rem 1.25rem; border-radius: 1rem; background: var(--action); color: var(--on-action); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.stack { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.stack-wide { gap: 2rem; }
.card { border-radius: 1.75rem; background: var(--surface); box-shadow: var(--shadow); }
.muted, .body-copy { color: var(--secondary); }
.body-copy { font-size: 1.0625rem; line-height: 1.588; }
.small { font-size: .9375rem; line-height: 1.533; }
.eyebrow { font-size: .8125rem; line-height: 1.538; font-weight: 500; color: var(--secondary); }
.section { padding-top: 4rem; }
.section-title { font-size: 2.5rem; line-height: 1.15; letter-spacing: -.0375em; margin-bottom: 2rem; }
.card-title { font-size: 1.5rem; line-height: 1.25; letter-spacing: -.0167em; }
.actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: .75rem; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: .5rem; min-height: 3rem; max-width: 100%; padding: .75rem 1.5rem; border: 0; border-radius: 999px; font-size: 1rem; font-weight: 500; line-height: 1.375; text-align: center; cursor: pointer; transition: transform 160ms var(--ease-out); }
.button-primary { color: var(--on-action); background: var(--action); }
.button-quiet { color: var(--text); background: transparent; }
.button:disabled { cursor: not-allowed; opacity: .62; }
.button:active:not(:disabled):not(:focus-visible) { transform: scale(.97); }
.availability { font-size: .8125rem; line-height: 1.5; color: var(--secondary); }
.icon { width: 20px; height: 20px; flex: 0 0 20px; }
.icon-dark { display: none; }
:root[data-theme="dark"] .icon-light { display: none; }
:root[data-theme="dark"] .icon-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-light { display: none; }
  :root:not([data-theme="light"]) .icon-dark { display: block; }
}

.site-header { position: relative; z-index: 10; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; justify-content: space-between; min-height: 4.5rem; padding: .75rem 1.5rem; border-radius: 1.5rem; background: var(--surface); box-shadow: var(--shadow); }
@supports (backdrop-filter: blur(20px)) {
  .site-header { background: var(--nav-glass); backdrop-filter: blur(20px); }
}
.brand { display: flex; align-items: center; min-height: 2.75rem; font-size: 1.125rem; font-weight: 600; line-height: 1.333; letter-spacing: -.0167em; }
.desktop-nav, .nav-links, .preferences { display: flex; flex-wrap: wrap; align-items: center; min-width: 0; }
.desktop-nav, .nav-links { gap: 1.5rem; }
.preferences { gap: .5rem; }
.nav-links a { display: flex; align-items: center; min-height: 2.75rem; font-size: .875rem; font-weight: 500; }
.preference { position: relative; }
.preference > summary { list-style: none; display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: .75rem 1.5rem; border-radius: 999px; font-size: 1rem; font-weight: 500; line-height: 1.375; cursor: pointer; }
.theme-preference > summary { min-width: 8.75rem; }
summary::-webkit-details-marker { display: none; }
.preference[open] > summary { background: var(--background); }
.preference-panel { position: absolute; top: calc(100% + .75rem); right: 0; min-width: 12rem; padding: 1rem; border: 1px solid var(--separator); border-radius: 1.25rem; background: var(--surface); box-shadow: var(--shadow); }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend, .preference-heading { margin-bottom: .5rem; font-size: .875rem; font-weight: 600; }
.theme-option, .language-option { display: flex; align-items: center; gap: .75rem; min-height: 2.75rem; padding: .625rem .75rem; border-radius: .75rem; cursor: pointer; font-size: .9375rem; }
.theme-option input { width: 1.125rem; height: 1.125rem; margin: 0; accent-color: var(--action); }
.language-option[aria-current="page"] { background: var(--background); font-weight: 600; }
.mobile-menu, .theme-preference, .theme-settings { display: none; }
.js .theme-preference { display: block; }
.js .theme-settings { display: block; }
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover, .brand:hover { text-decoration: underline; text-underline-offset: .3em; }
  .button-quiet:hover:not(:disabled), summary:hover, .theme-option:hover, .language-option:hover { background: var(--background); }
  .button-primary:hover:not(:disabled) { opacity: .9; }
}

.hero { display: grid; grid-template-columns: minmax(0, 616fr) minmax(0, 440fr); gap: 4rem; align-items: center; padding: 3.5rem 0 2.5rem; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; min-width: 0; }
.location { font-size: .875rem; line-height: 1.571; color: var(--secondary); }
.hero h1 { font-size: clamp(3.5rem, 5.56vw, 5rem); line-height: 1.025; letter-spacing: -.03em; }
.hero-focus { font-size: 1.5rem; font-weight: 600; line-height: 1.333; }
.hero-intro { max-width: 31.25rem; font-size: 1.125rem; line-height: 1.556; color: var(--secondary); }
.hero-copy .availability { margin-top: -.75rem; }
.identity { display: flex; flex-direction: column; justify-content: space-between; gap: 1rem; min-height: 28.75rem; padding: 1.5rem; border: 1px solid var(--separator); background: linear-gradient(116deg, var(--profile-start) 8.333%, var(--profile-end) 91.667%); }
.monogram { display: grid; place-items: center; flex: 1; min-height: 18.375rem; font-size: 8rem; font-weight: 500; line-height: 1.156; letter-spacing: -.03em; color: var(--profile-ink); }
.identity-caption { padding: 1rem; border-radius: 1.125rem; background: var(--caption); box-shadow: var(--shadow); }
.identity-caption p { font-size: .75rem; line-height: 1.5; margin-bottom: .25rem; }
.identity-caption strong { display: block; font-size: 1.1875rem; line-height: 1.263; font-weight: 500; }
.role-preview { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 2rem; }
.role-preview .stack { gap: .625rem; }
.role-preview-title { font-size: 1.875rem; line-height: 1.2; font-weight: 500; }
.role-preview .employer { font-size: .875rem; line-height: 1.571; color: var(--secondary); }
.round-link { display: grid; place-items: center; width: 3rem; height: 3rem; padding: .875rem; flex: 0 0 3rem; border-radius: 50%; background: var(--separator); }
.expertise-grid { display: grid; grid-template-columns: minmax(0, 448fr) minmax(0, 624fr); align-items: start; gap: 3rem; }
.expertise-secondary { gap: 1.5rem; }
.expertise-secondary .card { padding: 1.5rem; }
.automation-card { padding: 2.5rem; background: var(--raised); }
.automation-card h3 { font-size: 2rem; line-height: 1.125; letter-spacing: -.01875em; }
.current-role { display: grid; grid-template-columns: minmax(0, 288fr) minmax(0, 720fr); align-items: start; gap: 3rem; padding: 2rem; }
.contribution-intro { color: var(--secondary); font-size: 1.25rem; line-height: 1.45; }
.earlier-role { padding: 2rem; margin-top: 2rem; }
.earlier-role .body-copy { max-width: 50rem; }
.projects-heading > p { margin-bottom: .75rem; }
.projects-heading .section-title { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.08; letter-spacing: -.045em; }
.project-rail { position: relative; display: flex; gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: .375rem; padding: .375rem .375rem 1.5rem; margin: -.375rem -.375rem 0; overscroll-behavior-inline: contain; scrollbar-width: thin; scrollbar-color: var(--secondary) transparent; }
.project-card { display: flex; flex-direction: column; border: 1px solid var(--separator); border-color: light-dark(rgb(66 80 101 / 18%), rgb(255 255 255 / 8%)); border-radius: 2rem; }
.project-slide { flex: 0 0 82%; scroll-snap-align: start; min-width: 0; }
.project-rail[data-count="1"] .project-slide { flex-basis: 100%; }
.project-rail::after { content: ""; flex: 0 0 calc(18% - 1.5rem); }
.project-rail[data-count="0"]::after, .project-rail[data-count="1"]::after { display: none; }
.project-poster { display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; min-height: 15rem; padding: 1.5rem 1.75rem; border-radius: calc(2rem - 1px) calc(2rem - 1px) 0 0; background: linear-gradient(145deg, var(--profile-start), var(--profile-end)); color: var(--profile-ink); font-size: .875rem; line-height: 1.5; }
.project-poster-portfolio { background: linear-gradient(145deg, light-dark(#dce2eb, #515b6a), light-dark(#adb9c9, #262d37)); color: light-dark(#354255, #e3e8f0); }
.project-poster-qa { background: linear-gradient(145deg, light-dark(#dce6e5, #344744), light-dark(#b3c8c4, #202e2c)); color: light-dark(#304f49, #d3e6e1); }
.project-poster-kit { background: linear-gradient(145deg, light-dark(#e6e0d7, #48423b), light-dark(#c9bdab, #2e2923)); color: light-dark(#554735, #eee2d2); }
.project-mark { align-self: center; font-size: 6rem; line-height: 1; font-weight: 600; letter-spacing: -.075em; overflow-wrap: anywhere; }
.project-copy { flex: 1; min-height: 14.5rem; padding: 1.75rem 2rem 1.5rem; gap: .75rem; align-items: flex-start; }
.project-copy h3 { font-size: 2rem; line-height: 1.125; letter-spacing: -.035em; }
.project-description { font-size: 1.125rem; line-height: 1.5; }
.project-copy .body-copy { max-width: 44rem; }
.project-copy > .project-link, .project-outline { margin-top: auto; padding-top: .75rem; }
.project-link { display: inline-flex; gap: .625rem; align-items: center; min-height: 2.75rem; padding-block: .25rem; font-size: 1rem; font-weight: 500; cursor: pointer; list-style: none; }
.outline-symbol::after { content: "+"; }
.project-outline[open] .outline-symbol::after { content: "−"; }
.project-outline > .body-copy { margin-top: .75rem; }
@media (hover: hover) and (pointer: fine) {
  .project-link:hover { text-decoration: underline; text-underline-offset: .25em; }
  .project-arrow:hover:not(:disabled) { background: var(--action); color: var(--on-action); }
}
.project-controls { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.project-controls [data-project-status] { font-variant-numeric: tabular-nums; }
.project-arrows { display: flex; gap: .5rem; flex-shrink: 0; }
.project-arrow { width: 3rem; height: 3rem; padding: 0; background: var(--separator); color: var(--text); font-size: 1.5rem; }
.project-empty { flex: 0 0 100%; min-width: 0; }
.about-grid { display: grid; grid-template-columns: minmax(0, 560fr) minmax(0, 480fr); gap: 5rem; align-items: start; }
.about-card, .education-card { padding: 2rem; }
.about-card { gap: 1.5rem; }
.about-title { font-size: 2.25rem; line-height: 1.167; letter-spacing: -.0417em; }
.education-label { font-size: 1rem; line-height: 1.375; font-weight: 500; }
.contact-card { padding: 2.5rem; gap: 1.5rem; }
.contact-card h2 { font-size: 2.5rem; line-height: 1.15; letter-spacing: -.0375em; }
.contact-intro { max-width: 42.5rem; font-size: 1.5rem; line-height: 1.417; letter-spacing: -.0083em; color: var(--secondary); }
.contact-card .actions { gap: 1rem; }
.contact-form { width: min(100%, 42.5rem); display: grid; justify-items: start; gap: 1.25rem; padding-top: 2rem; border-top: 1px solid var(--separator); scroll-margin-top: 2rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; width: 100%; }
.form-grid label { display: grid; gap: .5rem; font-size: .9375rem; font-weight: 500; }
.form-grid input, .form-grid textarea { width: 100%; min-width: 0; min-height: 3rem; padding: .75rem 1rem; border: 1px solid var(--secondary); border-radius: .875rem; color: var(--text); background: var(--surface); font: inherit; font-size: 1rem; font-weight: 400; }
.form-grid textarea { resize: vertical; min-height: 9rem; }
.message-field { grid-column: 1 / -1; }
.site-footer { padding: 2rem 0; color: var(--secondary); font-size: .9375rem; line-height: 1.533; }

@media (max-width: 74.99rem) {
  .desktop-nav { display: none; }
  .mobile-menu { display: block; }
  .mobile-menu > summary { list-style: none; display: flex; align-items: center; justify-content: center; min-height: 2.75rem; min-width: 3.5rem; border-radius: .75rem; font-size: .875rem; cursor: pointer; }
  .menu-close-label { display: none; }
  .mobile-menu[open] .menu-open-label { display: none; }
  .mobile-menu[open] .menu-close-label { display: inline; }
  .mobile-panel { position: absolute; top: calc(100% + .75rem); left: 0; right: 0; max-height: calc(100dvh - 8rem); overflow-y: auto; overscroll-behavior: contain; padding: 1.5rem; border: 1px solid var(--separator); border-radius: 1.5rem; background: var(--surface); box-shadow: var(--shadow); }
  .mobile-panel nav { display: grid; gap: .25rem; margin-bottom: 1rem; }
  .mobile-panel nav a { display: flex; align-items: center; min-height: 2.75rem; padding: .5rem .75rem; border-radius: .75rem; }
  .mobile-panel .theme-settings { margin-bottom: 1.25rem; }
  .mobile-panel .language-options { display: flex; flex-wrap: wrap; gap: .5rem; }
  .mobile-panel .preference-heading { display: flex; align-items: center; gap: .5rem; }
  .mobile-panel fieldset { display: flex; flex-wrap: wrap; gap: .25rem; }
  .mobile-panel legend { float: left; width: 100%; }
}

@media (max-width: 61.99rem) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .identity { width: 100%; min-height: 20rem; }
  .monogram { min-height: 9.625rem; font-size: 6rem; line-height: 1.208; }
  .hero-copy { max-width: 40rem; }
  .expertise-grid, .current-role, .about-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .current-role { gap: 2rem; }
  .identity-caption strong { font-size: 1.0625rem; line-height: 1.412; }
}

@media (max-width: 39.99rem) {
  body { padding-top: 1rem; }
  .site-header { width: calc(100% - 2rem); padding-inline: 1rem; }
  .brand { font-size: .9375rem; font-weight: 500; line-height: 1.6; }
  .hero { padding: 2.5rem 0 2rem; }
  .hero h1 { font-size: clamp(2.875rem, 14.36vw, 3.5rem); line-height: 1.036; }
  .hero-focus { font-size: 1.25rem; line-height: 1.4; }
  .hero .actions { flex-direction: column; }
  .section { padding-top: 3rem; }
  .section-title { font-size: 2rem; line-height: 1.188; letter-spacing: -.025em; margin-bottom: 1.5rem; }
  .role-preview, .current-role, .earlier-role, .about-card, .education-card, .contact-card, .automation-card { padding: 1.5rem; }
  .role-preview-title { font-size: 1.4375rem; line-height: 1.261; overflow-wrap: anywhere; }
  .role-preview .employer { overflow-wrap: anywhere; }
  .current-role .contribution-intro { font-size: 1.0625rem; line-height: 1.588; }
  .earlier-role { margin-top: 1.5rem; }
  .about-title { font-size: 1.875rem; line-height: 1.2; letter-spacing: -.0267em; }
  .contact-card h2 { font-size: 2rem; line-height: 1.188; letter-spacing: -.025em; }
  .contact-intro { font-size: 1.25rem; line-height: 1.45; }
  .contact-card .actions { flex-direction: column; }
  .contact-card .button { width: 100%; }
  .project-slide { flex-basis: 90%; }
  .project-rail::after { flex-basis: calc(10% - 1.5rem); }
  .project-copy { padding: 1.5rem; }
  .project-copy h3 { font-size: 1.75rem; }
  .project-poster { min-height: 13rem; padding: 1.25rem; }
  .project-mark { font-size: 5rem; }
  .project-description { font-size: 1rem; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
  .button:active:not(:disabled):not(:focus-visible) { transform: none; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .site-header { background: var(--surface); backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .card, .site-header, .round-link { outline: 1px solid var(--secondary); }
  :focus-visible { outline-width: 3px; }
}
@media (forced-colors: active) {
  .icon { forced-color-adjust: none; }
  .button, .round-link, .identity-caption { border: 1px solid ButtonText; }
}
