:root {
    --bg: #f7f7f5;
    --surface: #ffffff;
    --surface-alt: #eeefed;
    --text: #222426;
    --muted: #62666a;
    --border: #d9dcdd;
    --accent: #525b63;
    --accent-strong: #39434c;
    --font-body: "Manrope", system-ui, sans-serif;
    --font-heading: "Fraunces", Georgia, serif;
    --max-width: 1120px;
}
[data-theme="dark"] {
    --bg: #1c1e20;
    --surface: #25282a;
    --surface-alt: #303437;
    --text: #eeefed;
    --muted: #bdc2c4;
    --border: #484e51;
    --accent: #c0c8cc;
    --accent-strong: #d0d8dc;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--bg); }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.7; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--text); color: var(--bg); padding: .6rem 1rem; z-index: 20; }
.skip-link:focus { top: 1rem; }
.site-shell { width: min(var(--max-width), calc(100% - 3rem)); margin: 0 auto; }
.site-header { display: flex; align-items: center; gap: 2rem; padding: 1.7rem 0; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; margin-right: auto; }
.brand-mark { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border: 1px solid var(--accent); color: var(--accent-strong); font-family: var(--font-heading); font-weight: 600; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.35; }
.brand-name { font-weight: 800; font-size: .95rem; }
.brand-role { color: var(--muted); font-size: .72rem; margin-top: .15rem; }
.site-nav, .header-actions { display: flex; align-items: center; gap: 1.3rem; }
.nav-link { color: var(--muted); text-decoration: none; font-size: .83rem; font-weight: 700; padding: .4rem 0; border-bottom: 1px solid transparent; }
.nav-link:hover, .nav-link.is-active { color: var(--text); border-color: var(--accent); }
.resume-link { color: var(--accent-strong); font-size: .83rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.theme-toggle { border: 1px solid var(--border); background: transparent; color: var(--text); width: 2.25rem; height: 2.25rem; font: inherit; cursor: pointer; }
.site-main { display: flex; flex-direction: column; gap: 4.5rem; padding: 4.5rem 0 5rem; }
.hero { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(250px, .75fr); gap: 5rem; align-items: end; padding: 1rem 0 4.5rem; border-bottom: 1px solid var(--border); }
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.2; letter-spacing: -.025em; margin: 0; }
.hero-copy h1 { font-size: clamp(3.2rem, 6vw, 5.5rem); font-weight: 600; }
.hero-headline { margin: 1.2rem 0 0; max-width: 38rem; font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.5; font-weight: 600; }
.hero-intro { margin: 1rem 0 0; max-width: 43rem; color: var(--muted); }
.eyebrow, .project-kicker { margin: 0 0 .8rem; color: var(--accent-strong); font-size: .7rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.hero-panel { border-left: 1px solid var(--border); padding-left: 1.8rem; }
.hero-panel h2 { font-size: 1.3rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: .75rem 1.1rem; border: 1px solid var(--text); font-size: .83rem; font-weight: 800; text-decoration: none; }
.button-primary { background: var(--text); color: var(--bg); }
.button-secondary { color: var(--text); }
.button:hover { opacity: .8; }
.quick-links { display: flex; gap: 1.2rem; list-style: none; padding: 0; margin: 1.4rem 0 0; }
.quick-links a, .text-link, .footer-links a, .contact-card a { color: var(--accent-strong); font-weight: 700; }
.quick-links a, .text-link { font-size: .83rem; }
.text-link { display: inline-block; margin-top: 1rem; }
.section-block { display: flex; flex-direction: column; gap: 1.2rem; }
.section-heading { max-width: 42rem; margin-bottom: .5rem; }
.section-heading h2, .panel h2 { font-size: clamp(1.6rem, 2.6vw, 2.15rem); }
.section-heading p:not(.eyebrow), .page-header p:not(.eyebrow) { color: var(--muted); margin: .65rem 0 0; }
.page-header { padding-bottom: 2.5rem; border-bottom: 1px solid var(--border); }
.page-header h1 { font-size: clamp(2.5rem, 5vw, 4rem); max-width: 20ch; font-weight: 600; }
.page-header p:not(.eyebrow) { max-width: 42rem; }
.project-grid, .skills-grid, .contact-grid, .experience-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.project-grid-featured { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.project-card, .skill-card, .contact-card, .experience-layout > .panel { background: var(--surface); padding: 1.8rem; min-width: 0; }
.project-card h2, .project-card h3, .skill-card h2, .skill-card h3, .contact-card h2 { font-size: 1.4rem; overflow-wrap: anywhere; }
.project-card p:not(.project-kicker), .skill-card p, .contact-card p:not(.project-kicker), .timeline-item p { color: var(--muted); margin: .8rem 0 0; }
.stack-list { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: 1.2rem; }
.chip { color: var(--muted); font-size: .73rem; font-weight: 700; }
.detail-list { margin: 1rem 0 0; padding-left: 1.15rem; color: var(--muted); font-size: .9rem; }
.detail-list li + li { margin-top: .55rem; }
.card-topline, .item-header { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.card-topline .text-link { margin-top: 0; }
.section-block.panel { padding: 2.25rem; background: var(--surface); border: 1px solid var(--border); }
.section-block.panel > p { margin: 0; max-width: 72ch; }
.section-block.panel > .eyebrow { margin-bottom: -.6rem; }
figure { margin: 1rem 0; }
figcaption { color: var(--muted); font-size: .78rem; margin-top: .6rem; }
.timeline-item { margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.timeline-item h3 { font-size: 1.15rem; }
.timeline-item .item-org { color: var(--text); font-weight: 700; }
.muted { color: var(--muted); font-size: .85rem; }
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0 3rem; display: flex; justify-content: space-between; gap: 2rem; }
.footer-title { font-weight: 800; margin: 0; }
.footer-text { color: var(--muted); font-size: .82rem; max-width: 34rem; margin: .35rem 0 0; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 1rem; font-size: .8rem; }
@media (max-width: 900px) {
    .site-header { flex-wrap: wrap; gap: 1rem; }
    .site-nav { order: 3; width: 100%; flex-wrap: wrap; gap: 1.2rem; }
    .hero { gap: 2.5rem; }
    .project-grid-featured { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 650px) {
    .site-shell { width: calc(100% - 2rem); }
    .site-header { padding: 1.1rem 0; }
    .brand-role { font-size: .68rem; }
    .header-actions { gap: .8rem; }
    .site-nav { gap: .6rem 1.1rem; }
    .site-main { padding: 3rem 0; gap: 3rem; }
    .hero { grid-template-columns: 1fr; gap: 2.5rem; padding: 0 0 3rem; }
    .hero-panel { padding-left: 1.2rem; }
    .project-grid, .project-grid-featured, .skills-grid, .contact-grid, .experience-layout { grid-template-columns: 1fr; }
    .project-card, .skill-card, .contact-card, .experience-layout > .panel, .section-block.panel { padding: 1.4rem; }
    .site-footer { flex-direction: column; }
    .footer-links { justify-content: flex-start; }
    .item-header { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

/* A portfolio-led editorial layout: generous type, strong imagery, and a quiet grid. */
:root { --font-heading: "Manrope", system-ui, sans-serif; --max-width: 1240px; }
.site-header { padding: 1.35rem 0; }
.brand-mark { border: 0; width: auto; height: auto; font-family: var(--font-body); font-weight: 800; font-size: 1.05rem; letter-spacing: -.06em; color: var(--text); }
.brand-role { display: none; }
.brand-name { font-size: .82rem; }
.site-main { padding-top: 5.5rem; }
.hero { grid-template-columns: minmax(0, 1.65fr) minmax(240px, .55fr); align-items: end; gap: 4rem; padding-bottom: 5rem; }
.hero-copy h1 { font-size: clamp(4.5rem, 10vw, 9rem); line-height: .91; letter-spacing: -.075em; font-weight: 800; max-width: 8ch; }
.hero-copy > .eyebrow { margin-bottom: 2rem; }
.hero-copy > .eyebrow span { color: var(--muted); }
.hero-headline { margin-top: 2rem; font-size: clamp(1.2rem, 2vw, 1.6rem); line-height: 1.4; letter-spacing: -.03em; }
.hero-intro { max-width: 38rem; font-size: .95rem; }
.hero-panel { padding-left: 1.5rem; }
.hero-panel h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; }
.hero-panel .detail-list { list-style: none; padding: 0; font-size: .8rem; }
.hero-panel .detail-list li { padding: .7rem 0; border-bottom: 1px solid var(--border); margin: 0; }
.section-heading h2, .panel h2 { letter-spacing: -.055em; font-weight: 800; }
.project-grid-featured { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.5rem; background: none; border: 0; }
.project-grid-featured .project-card { padding: 0; background: transparent; }
.featured-image { display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-alt); margin-bottom: 1.3rem; }
.featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.featured-image:hover img { transform: scale(1.025); }
.featured-image-type { display: flex; align-items: flex-end; padding: 1.5rem; background: #292c2d; color: #f1f1ed; font-size: clamp(1.8rem, 3vw, 3.3rem); line-height: .95; font-weight: 800; letter-spacing: -.07em; }
.featured-index { display: block; font-size: .62rem; letter-spacing: .12em; font-weight: 700; margin-top: 1.5rem; color: #bfc2c0; }
.project-grid-featured .project-kicker { font-size: .65rem; }
.project-grid-featured h3 { font-size: 1.25rem; letter-spacing: -.04em; }
.project-grid-featured .project-card p:not(.project-kicker) { font-size: .85rem; }
@media (max-width: 900px) { .project-grid-featured { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 650px) { .site-main { padding-top: 3.5rem; } .hero { grid-template-columns: 1fr; gap: 2.5rem; padding-bottom: 3rem; } .hero-copy h1 { font-size: clamp(4rem, 16vw, 6.5rem); } .hero-copy > .eyebrow { margin-bottom: 1.5rem; } .project-grid-featured { grid-template-columns: 1fr; gap: 2.5rem; } }

@media (max-width: 650px) {
    .contact-card h2 { font-size: clamp(1rem, 4vw, 1.25rem); letter-spacing: -.02em; }
}

/* Research sections read as an editorial page, with the figures given the space. */
#research.section-block.panel, #nau-capstone.section-block.panel {
    background: transparent;
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    padding: 2.25rem 0 0;
    gap: 1rem;
}
#research figure, #nau-capstone figure { margin: .5rem 0; }
#research img, #nau-capstone img { border-radius: 0 !important; }
#research .text-link, #nau-capstone .text-link { margin-top: 0; }
#research figcaption, #nau-capstone figcaption { max-width: 65ch; line-height: 1.55; }
@media (max-width: 650px) {
    #research.section-block.panel, #nau-capstone.section-block.panel { padding-top: 1.5rem; }
    #research figure, #nau-capstone figure { margin: .35rem 0; }
}

@media (min-width: 651px) {
    .project-grid > .project-card-detailed:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Status badges: simulation vs in-development vs planned */
.status-badge { display: inline-block; padding: .1rem .5rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-alt); color: var(--accent-strong); font-size: .65rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; line-height: 1.6; white-space: nowrap; }
.status-simulated .status-badge, .status-badge.status-simulated { border-color: var(--accent); }
.status-planned .status-badge, .status-badge.status-planned { border-style: dashed; background: transparent; color: var(--muted); }
.status-line { display: flex; flex-wrap: wrap; gap: .4rem; }
.status-list { margin: 1.2rem 0 0; display: grid; gap: .8rem; }
.status-row { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr); gap: .8rem; align-items: baseline; }
.status-row dt, .status-row dd { margin: 0; }
.status-row dd { color: var(--muted); font-size: .9rem; }
.credits { font-size: .85rem; }
.card-image { display: block; margin: 1rem 0 .4rem; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-alt); border-radius: 12px; }
.card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-panel .detail-list li .status-badge { margin-right: .35rem; }
@media (max-width: 650px) { .status-row { grid-template-columns: 1fr; gap: .25rem; } }

/* Home: lead demo, secondary demos, compact cards */
.hero-panel .direction-text { margin: .8rem 0 0; color: var(--muted); font-size: .95rem; }
.media-figure { margin: 0; }
.media-figure img, .media-figure video { display: block; width: 100%; height: auto; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 12px; }
.media-figure figcaption { margin-top: .55rem; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.lead-demo { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; padding: 1rem 0 3rem; }
.lead-copy { min-width: 0; }
.lead-copy h3 { font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -.045em; line-height: 1.05; margin: 0; }
.lead-copy p:not(.project-kicker) { color: var(--muted); margin: .9rem 0 0; }
.lead-tagline { font-size: 1.05rem; }
.secondary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; padding-top: 2.5rem; border-top: 1px solid var(--border); }
.secondary-demo { min-width: 0; }
.secondary-demo .media-figure { margin-bottom: 1.1rem; }
.secondary-demo h3, .compact-body h3 { font-size: 1.35rem; letter-spacing: -.04em; margin: 0; }
.secondary-demo p:not(.project-kicker), .compact-body p:not(.project-kicker) { color: var(--muted); margin: .7rem 0 0; font-size: .95rem; }
.compact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; align-items: start; }
.compact-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; background: var(--surface); border: 1px solid var(--border); padding: 1.4rem; min-width: 0; }
.compact-image { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-alt); border-radius: 10px; }
.compact-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.compact-body { min-width: 0; }
.scope { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: .7rem; }
.scope summary { cursor: pointer; font-size: .8rem; font-weight: 700; color: var(--accent-strong); }
.scope summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.scope .limits, .scope .credits { font-size: .85rem; }
.limits { font-style: italic; }
.project-card-detailed .media-figure { margin: 1rem 0 .6rem; }
@media (max-width: 900px) { .lead-demo { grid-template-columns: 1fr; gap: 1.5rem; } .secondary-grid, .compact-grid { grid-template-columns: 1fr; } }
.media-placeholder { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; margin-bottom: 1.1rem; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 12px; color: var(--muted); font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; text-align: center; padding: 1rem; }
.feature-figure { margin: 1.5rem 0; max-width: 960px; }
.feature-figure img { display: block; width: 100%; height: auto; border-radius: 12px; }
