:root {
  color-scheme: light;
  --page: #fff;
  --surface: #fff;
  --surface-soft: #f6f6f6;
  --ink: #171717;
  --ink-soft: #333;
  --muted: #666;
  --line: #e3e3e3;
  --accent: #171717;
  --accent-hover: #383838;
  --accent-soft: #f5f5f5;
  --accent-border: #d1d1d1;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --type-body: 18px;
  --type-reading: 16px;
  --type-ui: 14px;
  --type-label: 12px;
  --type-display: clamp(46px, 5.6vw, 66px);
  --type-lead: 23px;
  --type-section-title: 19px;
  --type-card-title: 17px;
  --type-sample-title: 18px;
  --type-contact-title: 23px;
  --type-print: 11px;
  --leading-body: 1.65;
  --leading-reading: 1.7;
  --leading-display: 1.12;
  --leading-heading: 1.4;
  --leading-lead: 1.5;
}
:root[data-theme="ocean"] { --page: #f7faff; --surface: #fff; --surface-soft: #edf4ff; --ink: #16253d; --ink-soft: #263d5d; --muted: #52657e; --line: #dce6f4; --accent: #1d4ed8; --accent-hover: #1e40af; --accent-soft: #eff6ff; --accent-border: #bfdbfe; }
:root[data-theme="forest"] { --page: #f7fbf8; --surface: #fff; --surface-soft: #edf7f0; --ink: #173128; --ink-soft: #28483a; --muted: #52675c; --line: #dce9df; --accent: #147d64; --accent-hover: #116952; --accent-soft: #ecfdf5; --accent-border: #a7f3d0; }
:root[data-theme="amber"] { --page: #fffcf6; --surface: #fff; --surface-soft: #fff7e8; --ink: #332516; --ink-soft: #4a3824; --muted: #71604b; --line: #eee2cd; --accent: #b45309; --accent-hover: #92400e; --accent-soft: #fffbeb; --accent-border: #fde68a; }
:root[data-theme="violet"] { --page: #faf8ff; --surface: #fff; --surface-soft: #f3efff; --ink: #281b45; --ink-soft: #40315f; --muted: #675b7a; --line: #e4dcf1; --accent: #6d28d9; --accent-hover: #5b21b6; --accent-soft: #f5f3ff; --accent-border: #ddd6fe; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; font: var(--type-body)/var(--leading-body) var(--font); color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
p { color: var(--muted); }
[hidden] { display: none !important; }
.container, .header-inner { width: min(1040px, calc(100% - 80px)); margin-inline: auto; }
.header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: var(--surface); backdrop-filter: blur(14px); }
.header-inner { height: 76px; display: flex; align-items: center; gap: 36px; }
.brand-wrap { position: relative; flex-shrink: 0; }
.brand { display: block; width: 42px; height: 42px; padding: 0; border: 1px solid var(--accent); border-radius: 50%; background: var(--surface); overflow: hidden; cursor: pointer; list-style: none; }
.brand::-webkit-details-marker { display: none; }
.brand::marker { content: ''; }
.brand img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.brand:hover { outline: 2px solid var(--accent-border); outline-offset: 2px; }
.portrait-popover { position: absolute; top: calc(100% + 12px); left: 0; z-index: 12; width: min(520px, calc(100vw - 32px)); padding: 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: 0 12px 36px #0002; }
.portrait-popover > img { display: block; width: 100%; height: auto; margin: 0 auto 12px; border: 1px solid var(--line); border-radius: 3px; }
.portrait-popover > p { font-size: var(--type-reading); font-weight: 600; color: var(--ink); text-align: center; }
.portrait-popover > span { display: block; margin-top: 3px; font-size: var(--type-label); letter-spacing: .6px; color: var(--muted); text-align: center; }
.header nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.header nav a { font-size: var(--type-ui); color: var(--muted); padding-block: 8px; }
.header nav a:hover, .header nav a[aria-current] { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 7px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-resume { display: flex; align-items: center; gap: 8px; font-size: var(--type-ui); border: 1px solid var(--line); border-radius: 5px; padding: 7px 13px; }
.header-resume:hover { border-color: var(--accent); background: var(--accent-soft); }
.theme-picker { position: relative; flex-shrink: 0; }
.theme-toggle { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--accent-border); border-radius: 50%; cursor: pointer; list-style: none; background: var(--surface); }
.theme-toggle::-webkit-details-marker { display: none; }
.theme-toggle::marker { content: ''; }
.theme-toggle:hover { background: var(--accent-soft); }
.theme-dot, .theme-swatch { display: block; width: 17px; height: 17px; border: 1px solid #0002; border-radius: 50%; background: var(--accent); }
.theme-palette { position: absolute; top: calc(100% + 12px); right: 0; z-index: 13; width: 230px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: 0 12px 36px #0002; }
.theme-palette > p { padding: 2px 5px 8px; color: var(--muted); font-size: var(--type-label); font-weight: 600; }
.theme-option { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 9px; border: 1px solid transparent; border-radius: 5px; background: var(--surface); color: var(--ink); text-align: left; font-size: var(--type-ui); }
.theme-option:hover, .theme-option[aria-pressed="true"] { border-color: var(--accent-border); background: var(--accent-soft); }
.theme-swatch { width: 15px; height: 15px; flex-shrink: 0; }
.theme-option[data-theme-choice="mono"] .theme-swatch { background: #171717; }
.theme-option[data-theme-choice="ocean"] .theme-swatch { background: #1d4ed8; }
.theme-option[data-theme-choice="forest"] .theme-swatch { background: #147d64; }
.theme-option[data-theme-choice="amber"] .theme-swatch { background: #b45309; }
.theme-option[data-theme-choice="violet"] .theme-swatch { background: #6d28d9; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 255px; gap: 80px; padding: 67px 0 65px; }
.last-updated { margin-bottom: 14px; font-size: var(--type-label); }
.last-updated::before { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 8px 1px 0; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.last-updated time { color: var(--ink); }
h1 { font-size: var(--type-display); font-weight: 650; letter-spacing: -3.5px; line-height: var(--leading-display); margin-top: 17px; }
.eyebrow { font-size: var(--type-label); letter-spacing: 1.4px; font-weight: 600; color: var(--muted); }
h1 > span { color: var(--accent); }
.lead { font-size: var(--type-lead); line-height: var(--leading-lead); color: var(--ink-soft); letter-spacing: -.6px; margin-top: 20px; }
.summary { max-width: 620px; font-size: var(--type-reading); line-height: var(--leading-reading); margin-top: 18px; }
.summary > span { display: block; }
.intro-actions { display: flex; gap: 11px; flex-wrap: wrap; margin-top: 25px; }
.button { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; font-size: var(--type-ui); padding: 10px 17px; border-radius: 5px; border: 1px solid var(--line); font-weight: 500; }
.link-icon { width: 14px; height: 14px; display: inline-block; flex: 0 0 auto; vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.brand-icon { fill: currentColor; stroke: none; }
.linkedin-icon { stroke: none; }
.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.secondary:hover { background: var(--accent-soft); border-color: var(--accent-border); }
.profile-facts { align-self: center; border-left: 1px solid var(--line); padding-left: 30px; }
.portrait-frame { width: 174px; height: 174px; margin: 0 auto 24px; padding: 6px; border: 1px solid var(--accent); border-radius: 50%; background: var(--surface); }
.portrait-crop { width: 100%; height: 100%; overflow: hidden; border-radius: 50%; }
.portrait { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; filter: none; transform: scale(1.12); transform-origin: 50% 10%; }
.profile-facts dl > div + div { margin-top: 17px; }
.profile-facts dt { font-size: var(--type-label); letter-spacing: .9px; color: var(--muted); margin-bottom: 3px; }
.profile-facts dd { font-size: var(--type-ui); color: var(--ink-soft); }
.profile-links { display: flex; gap: 22px; margin-top: 24px; font-size: var(--type-ui); }
.profile-links .link-icon, .footer .link-icon, .samples .link-icon, .contact-email .link-icon { margin-right: 5px; }
.profile-links a:hover, .footer a:hover, .contact-email:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.section-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 45px; padding: 43px 0; border-top: 1px solid var(--line); }
.section-number { font-size: var(--type-label); color: var(--accent); font-variant-numeric: tabular-nums; }
.section-label h2 { font-size: var(--type-section-title); letter-spacing: -.5px; line-height: var(--leading-heading); font-weight: 600; margin-top: 7px; }
.section-label p { font-size: var(--type-ui); line-height: var(--leading-reading); margin-top: 9px; color: var(--muted); }
.job + .job { border-top: 1px solid var(--line); padding-top: 25px; margin-top: 25px; }
.job-heading { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.job-heading h3 { font-size: var(--type-card-title); font-weight: 600; letter-spacing: -.35px; line-height: var(--leading-heading); }
.date { font-size: var(--type-label); color: var(--muted); margin-left: auto; white-space: nowrap; }
.current-label { border: 1px solid var(--accent-border); background: var(--accent-soft); border-radius: 20px; padding: 1px 8px; font-size: var(--type-label); color: var(--accent); }
.job .job-role { font-size: var(--type-ui); color: var(--ink-soft); margin: 5px 0 12px; }
.job > p:not(.job-role):not(.job-note) { font-size: var(--type-reading); line-height: var(--leading-reading); }
.job ul, .project-details ul { margin: 10px 0 0; padding-left: 17px; font-size: var(--type-reading); line-height: var(--leading-reading); color: var(--muted); }
.job li, .project-details li { padding-left: 4px; margin-top: 5px; }
.job li::marker, .project-details li::marker { color: var(--accent); }
.job .job-note { font-size: var(--type-label); margin-top: 11px; color: var(--muted); }
.work-list { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; align-self: start; background: var(--surface); }
.project + .project { border-top: 1px solid var(--line); }
.project summary { padding: 20px 23px; display: flex; align-items: center; gap: 25px; cursor: pointer; list-style: none; transition: background .15s ease; }
.project summary::-webkit-details-marker { display: none; }
.project summary:hover { background: var(--surface-soft); }
.project summary:focus-visible { outline-offset: -4px; }
.project-text { flex: 1; min-width: 0; }
.project-text > * { display: block; }
.project-company { font-size: var(--type-label); font-weight: 500; letter-spacing: .9px; color: var(--muted); }
.project-title { font-size: var(--type-card-title); letter-spacing: -.3px; font-weight: 600; margin: 4px 0 2px; }
.project-description { color: var(--muted); font-size: var(--type-reading); line-height: var(--leading-reading); }
.expand-icon { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; color: var(--accent); transition: background .15s ease, border-color .15s ease; }
.expand-icon svg { display: block; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; }
.expand-icon svg path { transition: opacity .15s ease; }
.project[open] .expand-icon svg path:last-child { opacity: 0; }
.project summary:hover .expand-icon { background: var(--surface); border-color: var(--accent); }
.project[open] summary { background: var(--surface-soft); }
.project-details { padding: 0 23px 23px; background: var(--surface-soft); }
.project-overview { padding-top: 17px; border-top: 1px solid var(--line); font-size: var(--type-reading); line-height: var(--leading-reading); }
.project-details h4 { margin-top: 14px; font-size: var(--type-ui); font-weight: 600; }
.project-details ul { font-size: var(--type-reading); margin-top: 8px; }
.technologies { font-size: var(--type-ui); line-height: var(--leading-reading); margin-top: 17px; color: var(--muted); }
.technologies strong { display: block; color: var(--ink-soft); font-weight: 500; margin-bottom: 4px; }
.samples { grid-column: 2; margin-top: 34px; }
.samples-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.samples h3 { font-size: var(--type-sample-title); font-weight: 600; letter-spacing: -.4px; margin-top: 5px; }
.samples > p { font-size: var(--type-reading); line-height: var(--leading-reading); margin-top: 5px; }
.samples > p a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent-border); text-underline-offset: 4px; }
.coming-note { display: inline-block; border: 1px solid var(--accent-border); border-radius: 20px; padding: 3px 10px; color: var(--accent); background: var(--accent-soft); font-size: var(--type-label); letter-spacing: .5px; white-space: nowrap; }
.sample-list { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); }
.sample-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 20px; flex-wrap: wrap; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: var(--type-reading); }
.sample-list strong { font-weight: 600; }
.sample-list span { font-size: var(--type-ui); color: var(--muted); }
.expertise-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
.expertise-grid h3, .education-grid h3 { font-size: var(--type-ui); font-weight: 600; letter-spacing: -.2px; }
.expertise-grid p { font-size: var(--type-reading); line-height: var(--leading-reading); margin-top: 6px; }
.education-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.education-grid p { font-size: var(--type-reading); margin-top: 5px; }
.contact { border-top: 1px solid var(--line); padding: 36px 0; display: flex; justify-content: space-between; gap: 35px; align-items: center; }
.contact h2 { font-size: var(--type-contact-title); font-weight: 550; letter-spacing: -.7px; margin-top: 9px; line-height: var(--leading-heading); }
.contact > div > p:not(.eyebrow) { font-size: var(--type-reading); margin-top: 7px; }
.contact-actions { text-align: right; min-width: 250px; }
.contact-email { font-size: var(--type-reading); display: block; text-decoration: underline; text-decoration-color: var(--accent-border); text-underline-offset: 6px; }
#copy-email { font-size: var(--type-ui); margin-top: 6px; border: 0; background: transparent; padding: 10px 0 10px 12px; color: var(--muted); }
#copy-email:hover { color: var(--accent); }
#copy-status { font-size: var(--type-ui); max-width: 280px; }
#copy-status:not(:empty) { margin-top: 5px; }
.footer { padding-top: 12px; padding-bottom: 17px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 25px; font-size: var(--type-ui); color: var(--muted); }
.footer > div { display: flex; gap: 24px; }
.footer a { display: inline-block; padding-block: 8px; }
.back-to-top { position: fixed; right: max(20px, calc((100vw - 1040px) / 2)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 9; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--accent); box-shadow: 0 3px 14px #0002; }
.back-to-top:hover { border-color: var(--accent); background: var(--accent-soft); }
.back-to-top svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 10px; left: 10px; padding: 10px 15px; background: var(--surface); color: var(--accent); border: 1px solid var(--accent); z-index: 20; }
@media (max-width: 960px) {
  :root { --type-display: 55px; --type-lead: 21px; --type-contact-title: 21px; }
  .container, .header-inner { width: calc(100% - 60px); }
  .intro { grid-template-columns: minmax(0, 1fr) 225px; gap: 40px; padding-block: 50px; }
  .profile-facts { padding-left: 25px; }
  h1 { font-size: var(--type-display); }
  .lead { font-size: var(--type-lead); }
  .summary { font-size: var(--type-reading); }
  .section-row { grid-template-columns: 170px minmax(0, 1fr); gap: 30px; }
  .date { width: 100%; margin-left: 0; order: 2; }
  .job-heading { gap: 5px 10px; }
  .contact { align-items: flex-start; }
  .contact h2 { font-size: var(--type-contact-title); }
}
@media (max-width: 700px) {
  :root { --type-body: 16px; --type-reading: 16px; --type-display: clamp(44px, 10vw, 61px); --type-lead: 20px; --type-section-title: 20px; --type-card-title: 16px; --type-contact-title: 23px; }
  html { scroll-padding-top: 105px; }
  .container, .header-inner { width: calc(100% - 40px); }
  .header-inner { height: auto; min-height: 64px; flex-wrap: wrap; gap: 0; padding-top: 15px; }
  .brand { width: 38px; height: 38px; }
  .portrait-popover { width: min(520px, calc(100vw - 32px)); }
  .portrait-popover > img { width: 180px; height: 180px; }
  .header-actions { order: 2; margin-left: auto; gap: 7px; }
  .header-resume { font-size: var(--type-label); padding: 6px 11px; gap: 7px; }
  .header nav { width: 100%; order: 3; justify-content: space-between; gap: 16px; margin-top: 7px; }
  .header nav a { font-size: var(--type-label); padding: 10px 0; }
  .intro { grid-template-columns: 1fr; gap: 30px; padding: 38px 0 35px; }
  .eyebrow { letter-spacing: 1.1px; }
  h1 { font-size: var(--type-display); letter-spacing: -2.5px; margin-top: 13px; }
  .lead { font-size: var(--type-lead); margin-top: 17px; }
  .summary { margin-top: 15px; font-size: var(--type-reading); }
  .intro-actions { margin-top: 23px; }
  .button { font-size: var(--type-ui); padding: 9px 13px; gap: 7px; }
  .profile-facts { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .portrait-frame { margin-bottom: 23px; }
  .profile-facts dl { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 20px; }
  .profile-facts dl > div + div { margin: 0; }
  .profile-facts dl > div:last-child { grid-column: 1 / -1; }
  .profile-facts dd { font-size: var(--type-ui); }
  .profile-links { margin-top: 16px; font-size: var(--type-ui); }
  .section-row { grid-template-columns: 1fr; gap: 22px; padding-block: 30px; }
  .section-label { display: flex; align-items: baseline; gap: 11px; flex-wrap: wrap; }
  .section-label h2 { font-size: var(--type-section-title); margin: 0; }
  .section-label p { display: none; }
  .job-heading h3 { font-size: var(--type-card-title); }
  .job > p:not(.job-role):not(.job-note), .job ul { font-size: var(--type-reading); }
  .job .job-role { font-size: var(--type-ui); }
  .job + .job { margin-top: 22px; padding-top: 22px; }
  .project summary { padding: 17px; gap: 16px; }
  .project-title { font-size: var(--type-card-title); }
  .project-description { font-size: var(--type-ui); }
  .project-details { padding: 0 17px 20px; }
  .project-overview { font-size: var(--type-reading); }
  .project-details ul { font-size: var(--type-ui); }
  .samples { grid-column: 1; margin-top: 28px; }
  .sample-list li { display: block; }
  .sample-list span { display: block; }
  .expertise-grid { gap: 23px; }
  .expertise-grid h3, .education-grid h3 { font-size: var(--type-ui); }
  .expertise-grid p, .education-grid p { font-size: var(--type-ui); }
  .education-grid { grid-template-columns: 1fr; gap: 20px; }
  .contact { display: block; padding-block: 30px; }
  .contact h2 { font-size: var(--type-contact-title); }
  .contact-actions { text-align: left; margin-top: 23px; min-width: 0; }
  .contact-email { font-size: var(--type-reading); }
  #copy-email { padding-left: 0; }
  .footer { flex-wrap: wrap; gap: 0 10px; padding-block: 12px; }
  .footer > div { gap: 15px; }
}
@media (max-width: 360px) {
  .container, .header-inner { width: calc(100% - 32px); }
  .expertise-grid { grid-template-columns: 1fr; }
  .footer { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  :root { --type-display: 38px; --type-lead: 18px; }
  body { font-size: var(--type-print); }
  .header, .intro-actions, .profile-links, #copy-email, .footer, .expand-icon, .back-to-top { display: none; }
  .container { width: 100%; }
  .intro { padding: 0 0 25px; gap: 40px; grid-template-columns: 1fr 220px; }
  h1 { font-size: var(--type-display); }
  .lead { font-size: var(--type-lead); }
  .section-row { padding-block: 20px; grid-template-columns: 150px 1fr; gap: 20px; }
  .job, .project, .education-grid > div { break-inside: avoid; }
  details::details-content { content-visibility: visible; }
  .project summary, .project-details { background: white !important; }
  .contact { padding: 20px 0; }
}
