:root {
    color-scheme: light;
    --bg: #f8f9fb;
    --surface: #fff;
    --surface-soft: #f0f3f8;
    --ink: #152238;
    --muted: #58657a;
    --subtle: #65718a;
    --accent: #2558bd;
    --accent-soft: #eaf0fd;
    --line: #dfe4ed;
    --hero-panel: #172840;
    --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
    --font-heading: 'Manrope', system-ui, -apple-system, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}
body.dark-mode {
    color-scheme: dark;
    --bg: #0e1726;
    --surface: #142136;
    --surface-soft: #1b2b43;
    --ink: #eaf0fa;
    --muted: #afbdd1;
    --subtle: #9cabc2;
    --accent: #8ab2ff;
    --accent-soft: #233959;
    --line: #2a3b54;
    --hero-panel: #182a44;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.25; }
a { color: inherit; text-decoration: none; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; }
button, summary { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: progress; opacity: .65; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
::selection { background: var(--accent); color: var(--surface); }
.icon { width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; }
.skip-link { position: fixed; z-index: 10; top: -100px; left: 20px; padding: 10px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.skip-link:focus { top: 16px; }
.site-shell { max-width: 1200px; margin: 0 auto; padding: 0 48px; }
.site-header { min-height: 110px; display: flex; align-items: center; gap: 32px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand-mark { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; font: 800 18px var(--font-heading); letter-spacing: -1px; border-radius: 9px; background: var(--ink); color: var(--bg); }
.brand-mark > span { color: #83aaff; }
.brand-name { font: 700 14px/1.5 var(--font-heading); }
.brand-name > span { display: block; font: 400 11px/1.6 var(--font-body); color: var(--muted); }
.site-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; font-size: 13px; color: var(--muted); font-weight: 500; }
.site-nav a:hover { color: var(--accent); }
.theme-toggle { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); padding: 9px 12px; border-radius: 6px; font-size: 12px; font-weight: 500; }
.theme-toggle .icon { width: 15px; height: 15px; }
.theme-toggle:hover { border-color: var(--accent); }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 60px; align-items: center; padding: 74px 0 72px; }
.eyebrow { font: 500 10px/1.5 var(--font-mono); text-transform: uppercase; letter-spacing: 1.8px; color: var(--muted); }
.hero-eyebrow { display: flex; align-items: center; gap: 12px; color: var(--accent); letter-spacing: 1.35px; }
.accent-line { width: 28px; height: 2px; background: currentColor; flex: 0 0 auto; }
.hero h1 { font-size: clamp(52px, 6.5vw, 80px); font-weight: 800; letter-spacing: -4px; margin-top: 21px; line-height: 1.05; }
.hero h1 > span { color: var(--accent); }
.hero-headline { font-family: var(--font-heading); font-size: 27px; font-weight: 500; letter-spacing: -.8px; line-height: 1.4; margin-top: 18px; }
.hero-description { max-width: 515px; color: var(--muted); font-size: 15px; line-height: 1.9; margin-top: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 29px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; padding: 12px 18px; border: 1px solid transparent; border-radius: 6px; font-size: 13px; line-height: 1.5; font-weight: 600; }
.button .icon { width: 17px; height: 17px; }
.button-primary { background: var(--ink); color: var(--bg); }
.button-primary:hover { background: var(--accent); color: var(--surface); }
.button-secondary { border-color: var(--line); background: var(--surface); }
.button-secondary:hover { border-color: var(--accent); color: var(--accent); }
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 28px; color: var(--muted); font-size: 11px; }
.hero-links > span, .hero-links a { display: inline-flex; gap: 5px; align-items: center; }
.hero-links .icon { width: 13px; height: 13px; }
.hero-links a:hover { color: var(--accent); }
.focus-panel { background: var(--hero-panel); color: #f5f7fd; border-radius: 12px; padding: 28px; position: relative; overflow: hidden; }
.focus-panel::after { content: ''; position: absolute; right: -40px; bottom: -65px; width: 220px; height: 220px; border: 1px solid #ffffff0b; border-radius: 50%; pointer-events: none; }
.focus-panel-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid #ffffff1f; }
.focus-panel .eyebrow { color: #b3c1d8; font-size: 9px; letter-spacing: 1.3px; }
.panel-dot { width: 6px; height: 6px; background: #89b2fb; border-radius: 50%; }
.focus-item { display: flex; gap: 16px; align-items: flex-start; padding-top: 25px; }
.focus-icon { width: 35px; height: 35px; display: grid; place-items: center; flex: 0 0 auto; background: #ffffff09; border: 1px solid #ffffff18; border-radius: 7px; color: #91b7ff; }
.focus-icon .icon { width: 19px; height: 19px; }
.focus-item h2 { font: 600 13px/1.6 var(--font-heading); }
.focus-item p { margin-top: 3px; font-size: 11px; line-height: 1.8; color: #b8c5da; }
.focus-panel-footer { margin-top: 25px; padding-top: 20px; border-top: 1px solid #ffffff1f; }
.focus-panel-footer p { font-size: 11px; line-height: 1.8; margin-top: 7px; color: #d0daeb; }
.about-section { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 45px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 34px 0; }
.about-section h2 { margin-top: 10px; font-size: 24px; letter-spacing: -.7px; line-height: 1.4; font-weight: 600; }
.about-section > p { font-size: 13px; line-height: 1.95; color: var(--muted); }
.portfolio-section { margin-top: 78px; }
.section-heading { display: flex; justify-content: space-between; gap: 32px; align-items: end; margin-bottom: 28px; }
.section-number { color: var(--accent); margin-right: 9px; letter-spacing: .5px; }
.section-heading h2 { font-size: 31px; letter-spacing: -1px; margin-top: 9px; font-weight: 700; }
.section-heading > p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.project-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 26px; min-width: 0; }
.project-card:hover { border-color: var(--subtle); }
.project-card--featured { grid-column: 1 / -1; background: var(--surface-soft); padding: 28px 30px; }
.project-topline { display: flex; align-items: center; gap: 11px; margin-bottom: 23px; }
.project-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 7px; background: var(--accent-soft); color: var(--accent); }
.project-icon .icon { width: 18px; height: 18px; }
.project-topline .eyebrow { font-size: 9px; letter-spacing: 1.05px; }
.project-index { margin-left: auto; font: 400 11px var(--font-mono); color: var(--subtle); }
.project-body h3 { font-size: 19px; letter-spacing: -.5px; line-height: 1.45; font-weight: 700; }
.project-context { color: var(--accent); margin-top: 5px; font-size: 11px; line-height: 1.6; }
.project-body ul { padding-left: 17px; margin: 17px 0 22px; color: var(--muted); font-size: 12px; line-height: 1.85; }
.project-body li + li { margin-top: 8px; }
.project-body li::marker { color: var(--subtle); }
.project-card--featured .project-body { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); column-gap: 36px; }
.project-card--featured .project-body h3 { grid-column: 1; font-size: 24px; max-width: 300px; }
.project-card--featured .project-context { grid-column: 1; align-self: start; }
.project-card--featured .project-body ul { grid-column: 2; grid-row: 1 / 3; margin-top: 0; }
.project-stack { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); color: var(--subtle); font: 400 10px/1.7 var(--font-mono); }
.experience-list { border-top: 1px solid var(--line); }
.experience-item { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 44px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.experience-date { font: 400 10px/1.6 var(--font-mono); color: var(--subtle); }
.experience-meta h3 { font-size: 17px; margin-top: 9px; letter-spacing: -.35px; }
.experience-company { color: var(--muted); font-size: 12px; margin-top: 7px; }
.experience-description ul { margin: 0; padding-left: 17px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.experience-description li + li { margin-top: 8px; }
.experience-description strong { color: var(--ink); font-weight: 500; }
.education-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.education-card { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 25px; }
.education-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 23px; }
.school-mark { display: inline-grid; place-items: center; height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--accent); font: 700 11px var(--font-heading); letter-spacing: 1px; }
.education-date { font: 400 10px var(--font-mono); color: var(--subtle); }
.education-school { color: var(--muted); font-size: 11px; margin-bottom: 7px; }
.education-card h3 { max-width: 350px; font-size: 19px; line-height: 1.5; letter-spacing: -.4px; }
.education-emphasis { font-size: 12px; line-height: 1.8; color: var(--muted); margin-top: 14px; }
.skills-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.skill-card { padding: 22px 20px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); min-width: 0; }
.skill-icon { color: var(--accent); display: block; margin-bottom: 16px; }
.skill-card h3 { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.skill-card ul { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 11px; line-height: 1.9; }
.skill-card li + li { margin-top: 5px; }
.demo-section { margin-top: 78px; background: #13243b; border-radius: 12px; padding: 38px; color: #edf3fc; }
.demo-heading { display: flex; justify-content: space-between; gap: 25px; align-items: start; }
.demo-heading .eyebrow { color: #aabbd6; }
.demo-heading .section-number { color: #91b7ff; }
.demo-heading h2 { font-size: 30px; margin-top: 13px; letter-spacing: -.7px; line-height: 1.4; }
.demo-badge { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 7px 10px; border: 1px solid #ffffff25; border-radius: 5px; color: #bdcee9; font: 400 9px var(--font-mono); }
.demo-badge .icon { width: 13px; height: 13px; }
.demo-description { max-width: 710px; font-size: 12px; line-height: 1.9; color: #b7c6dc; margin-top: 18px; }
.demo-form { display: grid; grid-template-columns: minmax(0, 1fr) 190px auto; gap: 14px; align-items: end; margin-top: 28px; }
.form-field { min-width: 0; }
.form-field label { display: block; font-size: 11px; font-weight: 500; color: #c6d4e9; margin-bottom: 8px; }
.form-field input, .form-field select { width: 100%; padding: 12px; height: 46px; border: 1px solid #40516b; border-radius: 5px; background: #1c304c; color: #f3f6fd; font-size: 12px; color-scheme: dark; }
.form-field input::placeholder { color: #a8b9d0; opacity: 1; }
.demo-form .button { background: #a5c7ff; color: #122139; height: 46px; font-size: 12px; }
.demo-form .button:hover { background: #c0d7ff; }
.demo-hint { font-size: 10px; color: #aabbd2; margin-top: 10px; }
.demo-output { margin-top: 24px; border: 1px solid #344760; background: #0d1b2e; border-radius: 7px; overflow: hidden; }
.output-header { display: flex; gap: 8px; align-items: center; color: #aabbd2; font: 400 9px var(--font-mono); padding: 11px 16px; border-bottom: 1px solid #26374f; }
.output-dot { width: 5px; height: 5px; border-radius: 50%; background: #a5c7ff; }
#demo-summary { padding: 16px; margin: 0; min-height: 64px; color: #c2d6f5; font: 400 11px/1.9 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.code-window { margin-top: 16px; border: 1px solid #344760; border-radius: 7px; }
.code-window summary { display: flex; align-items: center; justify-content: space-between; list-style: none; gap: 16px; padding: 14px 16px; font-size: 11px; color: #c2d0e6; }
.code-window summary::-webkit-details-marker { display: none; }
.code-window summary > span:first-child { display: flex; align-items: center; gap: 8px; }
.code-window summary .icon { width: 16px; height: 16px; }
.code-language { display: flex; align-items: center; gap: 18px; font: 400 9px var(--font-mono); color: #aabbd2; }
.disclosure-plus { font-size: 18px; line-height: 1; }
.code-window[open] .disclosure-plus { transform: rotate(45deg); }
.code-content { border-top: 1px solid #344760; padding: 20px; overflow-x: auto; max-height: 440px; font: 400 11px/1.8 var(--font-mono); color: #c8d6ec; }
.code-content pre { margin: 0; }
.code-content code { font: inherit; }
.demo-section :focus-visible { outline-color: #a5c7ff; }
.contact-section { display: flex; gap: 32px; align-items: center; justify-content: space-between; margin: 75px 0 55px; }
.contact-section h2 { font-size: 32px; letter-spacing: -1px; margin-top: 10px; }
.contact-section p:last-child { font-size: 12px; color: var(--muted); margin-top: 9px; }
.contact-link { display: inline-flex; gap: 12px; align-items: center; color: var(--accent); font-size: 15px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.contact-link:hover { border-color: var(--accent); }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding: 24px 0 30px; font-size: 10px; color: var(--subtle); }
.site-footer a { display: inline-flex; gap: 5px; align-items: center; }
.site-footer .icon { width: 12px; height: 12px; }
.site-footer a:hover { color: var(--accent); }
@media (max-width: 1050px) {
    .site-shell { padding: 0 32px; }
    .hero { grid-template-columns: minmax(0, 1fr) 300px; gap: 30px; }
    .hero h1 { font-size: 64px; letter-spacing: -3px; }
    .hero-headline { font-size: 24px; }
    .focus-panel { padding: 24px; }
    .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .experience-item { grid-template-columns: 250px minmax(0, 1fr); gap: 25px; }
}
@media (max-width: 800px) {
    .site-shell { padding: 0 26px; }
    .site-header { min-height: 95px; gap: 20px; flex-wrap: wrap; padding: 20px 0; }
    .site-nav { gap: 20px; }
    .brand-name { display: none; }
    .hero { grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 48px 0; }
    .hero h1 { font-size: 68px; }
    .hero-headline { font-size: 28px; }
    .hero-description { max-width: 600px; }
    .focus-panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
    .focus-panel-heading { grid-column: 1 / -1; padding-bottom: 13px; }
    .focus-item { flex-direction: column; gap: 10px; padding-top: 0; }
    .focus-item p br { display: none; }
    .focus-panel-footer { grid-column: 1 / -1; margin-top: 0; padding-top: 14px; display: flex; gap: 20px; align-items: center; }
    .focus-panel-footer p { margin: 0; }
    .focus-panel-footer p br { display: none; }
    .about-section { grid-template-columns: 200px minmax(0, 1fr); gap: 25px; }
    .section-heading { align-items: start; flex-direction: column; gap: 12px; }
    .section-heading > p br { display: none; }
    .project-card--featured .project-body { display: block; }
    .project-card--featured .project-body ul { margin-top: 17px; }
    .experience-item { grid-template-columns: 210px minmax(0, 1fr); gap: 25px; }
    .demo-section { padding: 28px; }
    .demo-heading { flex-direction: column; gap: 17px; }
    .demo-form { grid-template-columns: minmax(0, 1fr) 170px; }
    .demo-form .button { grid-column: 1 / -1; justify-self: start; }
    .contact-section { flex-direction: column; align-items: start; gap: 22px; }
}
@media (max-width: 560px) {
    .site-shell { padding: 0 20px; }
    .site-header { gap: 14px; min-height: 115px; }
    .brand-name { display: block; }
    .brand-mark { width: 38px; height: 38px; font-size: 16px; }
    .brand { gap: 10px; }
    .brand-name { font-size: 12px; }
    .brand-name > span { font-size: 10px; }
    .theme-toggle { margin-left: auto; padding: 8px; }
    #theme-label { display: none; }
    .site-nav { width: 100%; order: 3; margin-left: 0; gap: 25px; font-size: 12px; padding-top: 5px; }
    .hero { padding: 42px 0 35px; gap: 32px; }
    .hero-eyebrow { font-size: 8px; letter-spacing: .8px; gap: 8px; }
    .accent-line { width: 18px; }
    .hero h1 { font-size: clamp(45px, 13vw, 65px); letter-spacing: -2.8px; margin-top: 20px; }
    .hero-headline { font-size: 23px; letter-spacing: -.5px; margin-top: 16px; }
    .hero-description { font-size: 13px; line-height: 1.85; margin-top: 17px; }
    .hero-actions { gap: 10px; margin-top: 24px; }
    .button { padding: 11px 13px; font-size: 12px; }
    .hero-links { gap: 13px; font-size: 10px; margin-top: 23px; }
    .hero-links > span { width: 100%; }
    .focus-panel { padding: 22px; grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .focus-panel-heading, .focus-panel-footer { grid-column: auto; }
    .focus-item { flex-direction: row; gap: 14px; }
    .focus-item h2 { font-size: 13px; }
    .focus-panel-footer { display: block; }
    .focus-panel-footer p { margin-top: 8px; }
    .about-section { display: block; padding: 28px 0; }
    .about-section h2 { font-size: 23px; }
    .about-section h2 br { display: none; }
    .about-section > p { margin-top: 17px; font-size: 12px; }
    .portfolio-section { margin-top: 49px; }
    .section-heading { margin-bottom: 23px; gap: 10px; }
    .section-heading h2 { font-size: 26px; letter-spacing: -.65px; }
    .eyebrow { font-size: 9px; letter-spacing: 1.3px; }
    .projects-grid, .education-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .project-card, .project-card--featured { padding: 22px; grid-column: auto; }
    .project-card--featured .project-body h3 { font-size: 21px; }
    .project-topline { gap: 9px; margin-bottom: 18px; }
    .project-topline .eyebrow { font-size: 8px; letter-spacing: .65px; }
    .project-body h3 { font-size: 19px; }
    .experience-item { display: block; padding: 25px 0; }
    .experience-description { margin-top: 18px; }
    .skills-grid { gap: 12px; }
    .skill-card { padding: 18px 14px; }
    .skill-card h3 { font-size: 12px; line-height: 1.6; }
    .skill-card ul { font-size: 10px; overflow-wrap: anywhere; }
    .demo-section { margin-top: 48px; padding: 25px 20px; }
    .demo-heading h2 { font-size: 24px; letter-spacing: -.5px; }
    .demo-form { grid-template-columns: minmax(0, 1fr); gap: 15px; }
    .demo-form .button { width: 100%; grid-column: auto; }
    .demo-description { font-size: 11px; }
    .code-window summary { padding: 13px 12px; font-size: 10px; }
    .code-language { font-size: 0; gap: 0; }
    .code-content { padding: 13px; font-size: 10px; }
    .contact-section { margin: 48px 0 35px; }
    .contact-section h2 { font-size: 28px; }
    .contact-link { font-size: 12px; gap: 7px; overflow-wrap: anywhere; }
    .contact-link .icon { width: 16px; height: 16px; }
    .site-footer { flex-wrap: wrap; gap: 14px; font-size: 9px; padding-top: 20px; }
    .site-footer > span { order: 3; width: 100%; }
    .site-footer > a { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
    :root, body.dark-mode { --bg: #fff; --surface: #fff; --surface-soft: #fff; --ink: #111; --muted: #333; --subtle: #444; --line: #ccc; --accent: #111; --accent-soft: #fff; color-scheme: light; }
    body { font-size: 10pt; }
    .site-shell { padding: 0; max-width: none; }
    .site-header, .skip-link, .focus-panel, .hero-actions, .hero-links, .demo-section, .site-footer a { display: none; }
    .hero { display: block; padding: 0 0 20px; }
    .hero h1 { font-size: 36pt; }
    .hero-headline { font-size: 17pt; }
    .hero-description { max-width: none; }
    .portfolio-section { margin-top: 26px; }
    .section-heading h2 { font-size: 20pt; }
    .project-card, .education-card, .skill-card, .experience-item { break-inside: avoid; }
    .project-card { padding: 16px; }
    .contact-section { margin-top: 26px; }
}
