:root {
    --ink: #eaf1f5;
    --muted: #a6bbcc;
    --faint: #98afc1;
    --line: rgba(160, 190, 207, 0.22);
    --surface: rgba(22, 32, 49, 0.72);
    --surface-strong: #162136;
    --page: #0b1020;
    --page-deep: #080c18;
    --cyan: #80dfcd;
    --green: #86efac;
    --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 7rem; }
section[id] { scroll-margin-top: 1rem; }
body { overflow-wrap: break-word; margin: 0; color: var(--ink); background: var(--page); font-family: var(--font-sans); line-height: 1.6; }
body::before, body::after { content: none; }
::selection { color: var(--page-deep); background: var(--cyan); }
.home-site { background-image: radial-gradient(ellipse at 85% 8%, rgba(73, 146, 160, .12), transparent 35%); }
img { display: block; max-width: 100%; height: auto; }
.container { width: min(1120px, calc(100% - 3rem)); margin: 0 auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
.skip-link { position: absolute; left: 1rem; top: -5rem; padding: .7rem 1rem; color: var(--page); background: var(--cyan); z-index: 10; }
.skip-link:focus { top: 1rem; }

.site-header { border-bottom: 1px solid var(--line); background: rgba(8, 12, 24, .72); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 5; }
.nav-wrap { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--cyan); border-radius: 2px; color: var(--cyan); font: 700 .68rem var(--font-mono); }
nav a { padding-block: .6rem; }
nav { display: flex; align-items: center; gap: 1.4rem; color: var(--muted); font-size: .9rem; }
nav a, .text-link, .project-meta a { transition: color .2s ease; }
.text-link { text-decoration: underline; text-underline-offset: .3em; }
nav a:hover, .text-link:hover, .project-meta a:hover { color: var(--cyan); }
.nav-button { border: 1px solid var(--line); border-radius: 999px; padding: .42rem .85rem; color: var(--ink); }
.nav-button:hover { border-color: var(--cyan); }

.hero { min-height: 520px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); align-items: center; gap: clamp(3rem, 8vw, 8rem); padding-top: 5rem; padding-bottom: 5rem; }
.eyebrow { margin: 0 0 1.15rem; color: var(--cyan); font: 600 .72rem var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin: 0 .55rem .08rem 0; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(134, 239, 172, .12); }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 780px; margin-bottom: 1.5rem; font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.02; letter-spacing: -.065em; }
h1 em { color: var(--cyan); font-style: normal; }
.hero-lede { max-width: 650px; color: var(--muted); font-size: 1.15rem; line-height: 1.75; }
.hero-actions, .contact-links { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; gap: .7rem; border-radius: 4px; padding: .72rem 1rem; font-weight: 600; font-size: .9rem; transition: border-color .2s ease, background .2s ease; }
.button:hover { text-decoration: underline; }
.button.primary { color: #07111c; background: var(--cyan); }
.button.primary:hover { background: #b4e8ff; }
.button.secondary { border: 1px solid var(--line); color: var(--ink); }
.button.secondary:hover { border-color: var(--cyan); background: rgba(125, 211, 252, .08); }
.hero-note { border-left: 1px solid var(--cyan); padding: 1.5rem 0 1.5rem 1.5rem; }
.note-label { color: var(--faint); font: 600 .68rem var(--font-mono); letter-spacing: .15em; }
.hero-note h2 { margin-bottom: .6rem; font-size: 1.45rem; letter-spacing: -.02em; }
.hero-note p:not(.note-label) { color: var(--muted); font-size: .96rem; }
.note-footer { display: flex; flex-direction: column; gap: .25rem; margin-top: 2.5rem; color: var(--faint); font: .72rem var(--font-mono); }

.section { padding: 6rem 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 2rem; }
.section-heading .eyebrow { margin-bottom: .45rem; }
h2 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 3.15rem); line-height: 1.05; letter-spacing: -.05em; }
.text-link { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.portfolio-callout { max-width: 680px; padding: 1rem 0; }
.portfolio-callout p { margin-bottom: 1.4rem; color: var(--muted); font-size: 1.05rem; }
.portfolio-page { padding-top: 3.5rem; padding-bottom: 5rem; }
.portfolio-heading { max-width: 760px; padding-bottom: 2rem; }
.portfolio-heading .back-link { display: inline-block; margin-bottom: 2.5rem; color: var(--muted); }
.portfolio-heading h1 { margin-bottom: 1rem; }
.portfolio-intro { color: var(--muted); font-size: 1.08rem; }
.portfolio-category { padding: 2.5rem 0; scroll-margin-top: 5rem; }
.portfolio-category + .portfolio-category { border-top: 1px solid var(--line); }
.portfolio-category .project-card { min-height: 235px; }
.portfolio-category .project-meta a { color: var(--cyan); }
.portfolio-contact { padding: 3rem 0; border-top: 1px solid var(--line); }
.portfolio-contact p { color: var(--muted); }
.portfolio-contact a { color: var(--cyan); }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.project-card { display: flex; min-width: 0; min-height: 250px; flex-direction: column; padding: 1.35rem; border: 1px solid var(--line); border-radius: 6px; background: linear-gradient(145deg, #152233, #101827); transition: border-color .2s ease, box-shadow .2s ease; }
.project-card:hover, .project-card:focus-within { border-color: var(--cyan); box-shadow: 0 12px 36px #050a1433; }
.project-card h3 a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: .22em; }
.project-card h3 a:hover { color: var(--cyan); }
.project-meta a { display: inline-flex; align-items: center; min-height: 44px; }
.project-card.featured { min-height: 250px; }
.project-top { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; align-items: center; margin-bottom: 2.2rem; }
.project-number { color: var(--faint); font: .75rem var(--font-mono); }
.tag { padding: .25rem .55rem; border: 1px solid rgba(125, 211, 252, .25); border-radius: 99px; color: var(--cyan); font: .67rem var(--font-mono); }
.project-card h3 { margin-bottom: .65rem; font-size: 1.3rem; letter-spacing: -.025em; }
.project-card p { margin-bottom: 1.5rem; color: var(--muted); font-size: .93rem; }
.project-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: end; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--faint); font: .7rem var(--font-mono); }
.project-meta a { color: var(--cyan); white-space: nowrap; }

.about-section { padding: 6rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(20, 30, 50, .32); }
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 5rem; }
.about-copy { max-width: 620px; color: var(--muted); font-size: 1.08rem; }
.about-copy p { margin-bottom: 1.2rem; }
.skill-list { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.8rem; }
.skill-list span { padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); font: .72rem var(--font-mono); }
.contact-section { padding: 7rem 0 8rem; }
.contact-section h2 { max-width: 650px; margin-bottom: 1rem; }
.contact-section > p:not(.eyebrow) { max-width: 540px; color: var(--muted); font-size: 1.05rem; }
.site-footer { border-top: 1px solid var(--line); color: var(--faint); font: .72rem var(--font-mono); }
.footer-wrap { display: flex; justify-content: space-between; gap: 1rem; padding: 1.5rem 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--cyan); }

/* Homepage: project evidence and academic context, without client-side dependencies. */
.home-site .hero { grid-template-columns: minmax(0, 1.3fr) minmax(300px, .9fr); gap: 4rem; padding-top: 5.5rem; padding-bottom: 4.5rem; }
.home-site h1 { font-size: clamp(2.6rem, 5.2vw, 4.65rem); line-height: 1.04; letter-spacing: -.055em; }
.hero-copy .eyebrow { max-width: 30rem; line-height: 1.8; }
.hero-copy h1 em { background: linear-gradient(110deg, #b9f2e4, #80c8df); background-clip: text; -webkit-background-clip: text; color: transparent; }
.home-site h2 { font-size: clamp(1.9rem, 3.3vw, 2.8rem); line-height: 1.15; }
.hero-detail { max-width: 590px; color: var(--muted); font-size: .96rem; }
.engineering-note { position: relative; padding: 1.5rem; border: 1px solid var(--line); border-top: 2px solid var(--cyan); border-radius: 3px; background: linear-gradient(150deg, #162736, #0e1627); box-shadow: 16px 16px 0 -1px var(--page), 16px 16px 0 0 var(--line); }
.system-map { margin: -1rem -1.5rem 1.5rem; }
.system-map img { width: 100%; }
.system-map figcaption { padding: .6rem 1.5rem; border-block: 1px solid var(--line); color: var(--muted); font: .65rem/1.7 var(--font-mono); }
.system-flow { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 90px; margin-bottom: 1.5rem; padding: 1rem; border: 1px solid var(--line); background-color: #0c1523; background-image: radial-gradient(#98afc126 1px, transparent 1px); background-size: 12px 12px; font: .7rem/1.5 var(--font-mono); }
.system-flow span { padding: .4rem .5rem; border: 1px solid #80dfcd55; background: #152635; text-align: center; }
.system-flow i { color: var(--cyan); font-style: normal; }
.note-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.note-top .note-label { font-size: .62rem; }
.note-symbol { color: var(--cyan); font: .75rem var(--font-mono); white-space: nowrap; }
.engineering-note h2 { font-size: 1.45rem; letter-spacing: -.025em; line-height: 1.3; }
.profile-facts { margin: 1.5rem 0 2rem; }
.profile-facts div { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.profile-facts dt { color: var(--faint); font: .68rem var(--font-mono); margin-bottom: .4rem; }
.profile-facts dd { margin: 0; font-size: .9rem; }
.engineering-note .text-link { font-size: .8rem; color: var(--cyan); }
.focus-strip { display: grid; grid-template-columns: repeat(3, 1fr); padding: 1.2rem 0; border-block: 1px solid var(--line); color: var(--muted); font: .75rem var(--font-mono); gap: 1rem; }
.focus-strip b { color: var(--cyan); font-weight: 400; margin-right: .7rem; }
.focus-strip a { display: flex; align-items: center; min-height: 44px; padding: .5rem .75rem; }
.focus-strip a + a { border-left: 1px solid var(--line); }
.focus-strip a > span { margin-left: auto; color: var(--cyan); }
.focus-strip a:hover { color: var(--ink); background: #80dfcd0a; }
.section-intro { max-width: 650px; margin-bottom: 2rem; color: var(--muted); font-size: 1.03rem; }
.home-site .project-card { padding: 1.75rem; }
.home-site .project-card h3 { font-size: 1.45rem; line-height: 1.35; }
.home-site .project-grid { gap: 1.5rem; }
.home-site .project-top { margin-bottom: 1.6rem; flex-wrap: wrap; gap: .75rem; }
.home-site .project-card .project-evidence { padding: .85rem 1rem; border-left: 2px solid var(--cyan); background: #80dfcd06; font-size: .85rem; }
.project-evidence strong { display: block; margin-bottom: .3rem; color: var(--ink); font-weight: 500; }
.work-note { display: flex; justify-content: space-between; align-items: center; gap: 2rem; margin-top: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.work-note p { max-width: 720px; margin: 0; color: var(--muted); font-size: .9rem; }
.education-section { padding: 5rem 0; border-block: 1px solid var(--line); background: #10192a; }
.education-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; margin-top: 3rem; }
.degree-summary h3 { max-width: 400px; font-size: 1.4rem; line-height: 1.4; letter-spacing: -.02em; }
.degree-summary p:not(.degree-status) { color: var(--muted); }
.degree-status { color: var(--cyan); font: .75rem var(--font-mono); }
.coursework h3 { font-size: 1rem; font-weight: 600; }
.course-list { padding-left: 1.2rem; color: var(--muted); font-size: .93rem; }
.course-list li { padding: .3rem 0; }
.course-list li::marker { color: var(--cyan); }
.course-note { margin-top: 1.5rem; color: var(--muted); font-size: .83rem; }
.approach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3rem; }
.approach-grid article { border-top: 2px solid var(--cyan); padding: 1.5rem 1.25rem .5rem; background: linear-gradient(180deg, #15263580, transparent); }
.approach-grid .project-number { color: var(--cyan); }
.approach-grid h3 { margin: 1rem 0 .7rem; font-size: 1.1rem; }
.approach-grid p { color: var(--muted); font-size: .93rem; }
.home-site .contact-section { padding: 5rem 0; background: #10192a; border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; }
.contact-grid p:not(.eyebrow) { color: var(--muted); }

@media (max-width: 960px) {
    .home-site .hero { gap: 2rem; }
    .education-grid, .contact-grid { gap: 2.5rem; }
    .home-site .footer-wrap { flex-wrap: wrap; }
}

@media (max-width: 760px) {
    html { scroll-padding-top: 12rem; }
    .container { width: min(100% - 2rem, 1120px); }
    .nav-wrap { min-height: 64px; }
    nav { gap: .8rem; font-size: .78rem; }
    .home-site .nav-wrap { flex-wrap: wrap; justify-content: center; gap: .8rem; padding-block: .9rem; }
    .home-site nav { flex-wrap: wrap; justify-content: center; gap: .7rem 1rem; }
    .home-site nav a { min-height: 44px; display: inline-flex; align-items: center; }
    .home-site .hero { grid-template-columns: 1fr; padding-top: 3rem; padding-bottom: 3rem; }
    .home-site .hero-copy, .home-site .engineering-note { min-width: 0; }
    .focus-strip { grid-template-columns: 1fr; gap: .3rem; }
    .focus-strip a + a { border-left: 0; border-top: 1px solid var(--line); }
    .engineering-note { box-shadow: none; }
    .system-flow { padding: .75rem .5rem; font-size: .65rem; }
    .system-flow span { padding: .35rem; }
    .text-link { white-space: normal; }
    .education-grid, .approach-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
    .education-section { padding: 4rem 0; }
    .work-note { align-items: start; flex-direction: column; gap: 1rem; }
    .home-site .project-card { padding: 1.25rem; }
    .home-site .project-meta { font-size: .72rem; }
    .portfolio-site .nav-wrap { flex-wrap: wrap; padding-block: .75rem; gap: .75rem; }
    .portfolio-site nav a { min-height: 44px; display: inline-flex; align-items: center; }
    .portfolio-site nav a:not(.nav-button) { display: inline-flex; }
    .portfolio-site nav { flex-wrap: wrap; justify-content: flex-end; gap: .55rem; }
    .hero { min-height: auto; grid-template-columns: 1fr; gap: 3rem; padding-top: 5rem; padding-bottom: 4rem; }
    .hero-lede { font-size: 1rem; }
    .section, .about-section { padding: 4.5rem 0; }
    .section-heading { align-items: start; flex-direction: column; gap: 1rem; }
    .project-grid, .about-grid { grid-template-columns: 1fr; gap: 1rem; }
    .about-grid { gap: 2rem; }
    .project-card, .project-card.featured { min-height: 0; }
    .footer-wrap { align-items: start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
