@font-face { font-family: Sora; font-style: normal; font-weight: 400 700; font-display: swap; src: url('../assets/fonts/sora-latin.woff2') format('woff2'); }
@font-face { font-family: Manrope; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../assets/fonts/manrope-latin.woff2') format('woff2'); }

:root {
  --background: #091827;
  --surface: #142a40;
  --text: #d1deed;
  --heading: #f2f7ff;
  --muted: #afc2d8;
  --accent: #80c5ff;
  --accent-hover: #b6ddff;
  --warm: #ffc36b;
  --line: #34506d;
  --active: #173958;
  --ink: #102237;
  --project-accent: #59adff;
  --project-tint: #143451;
  --display: Sora, 'Segoe UI', sans-serif;
  --body: Manrope, 'Segoe UI', sans-serif;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height, 0px) + 2rem); }
body { margin: 0; background: var(--background); color: var(--text); font: 1rem/1.75 var(--body); -webkit-font-smoothing: antialiased; overflow-wrap: anywhere; }
a { color: var(--accent); text-underline-offset: .25em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; border-radius: 3px; }
button { font: inherit; }
img, svg { max-width: 100%; height: auto; }
.icon { display: block; flex: 0 0 auto; width: 20px; height: 20px; }
h1, h2, h3 { color: var(--heading); font-family: var(--display); font-weight: 500; line-height: 1.16; letter-spacing: -.045em; text-wrap: balance; }
h1 { font-size: clamp(2.75rem, 5.2vw, 4.75rem); margin: 0 0 1.75rem; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.9rem, 3vw, 2.7rem); }
h3 { font-size: 1.4rem; }
p { max-width: 66ch; }
::selection { background: #59adff; color: #091827; }
.skip-link { position: fixed; z-index: 30; top: -10rem; left: 1rem; padding: .75rem 1.25rem; color: #fff; background: var(--ink); border-radius: 6px; }
.skip-link:focus { top: .5rem; }
.print-identity { display: none; }

/* The navigation occupies one quiet horizontal band; fallback menus remain in flow. */
.site-header { position: relative; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; min-height: 90px; padding: 1rem max(var(--gutter), calc((100% - 1200px) / 2)); background: #091827ef; border-bottom: 1px solid #ffffff0c; }
.js .site-header { position: sticky; top: 0; backdrop-filter: blur(16px); }
.identity { min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: .8rem; min-width: 0; color: var(--heading); font-weight: 750; font-size: .96rem; text-decoration: none; }
.brand span { overflow-wrap: anywhere; }
.brand img { flex-shrink: 0; width: 38px; height: 38px; }
.site-menu { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; min-width: 0; gap: clamp(1rem, 3vw, 3rem); }
.main-nav { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; padding: .3rem; background: transparent; border: 0; border-radius: 30px; }
.main-nav a { position: relative; display: flex; justify-content: center; min-height: 44px; align-items: center; padding: .5rem 1rem; color: var(--muted); font-weight: 600; font-size: .85rem; text-decoration: none; border-radius: 25px; }
.main-nav a:hover { color: var(--heading); background: #1b3e5b; }
.main-nav a[aria-current] { color: var(--heading); background: #173c5e; box-shadow: inset 0 0 0 1px #397aad55; }
.main-nav a[aria-current] span { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .3em; }
.main-nav a[aria-current]::after { content: none; }
.menu-toggle { flex-shrink: 0; align-items: center; gap: .5rem; padding: .5rem .8rem; min-height: 44px; color: var(--heading); background: var(--surface); border: 1px solid #527595; border-radius: 8px; cursor: pointer; }
.page-shell { max-width: 1320px; margin: auto; min-height: 65vh; padding: 4rem var(--gutter) 6rem; }
.page-shell.home { max-width: none; padding: 0; }
.section-inner, .home-intro, .footer-inner { max-width: 1320px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* A broad name masthead and an unframed sculpture create one continuous dark stage. */
/* The hero is one large, explorable object beside a personal introduction. */
.home-intro { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); align-items: center; gap: 2rem; padding-top: 2.5rem; padding-bottom: 2rem; position: relative; }
.intro-copy { min-width: 0; position: relative; z-index: 1; }
.prose.intro-copy h1 { margin: 0 0 1.7rem; font-size: clamp(4rem, 6.7vw, 6.3rem); font-weight: 600; line-height: 1.02; letter-spacing: -.065em; max-width: none; }
.intro-copy h1 span { display: block; }
.intro-body { min-width: 0; }
.prose.intro-copy .intro-specialties { max-width: 29ch; margin: 0 0 1.4rem; color: var(--heading); font-size: clamp(1.2rem, 1.9vw, 1.55rem); font-weight: 450; line-height: 1.5; letter-spacing: -.015em; }
.intro-body > p { max-width: 43ch; font-size: .95rem; color: var(--muted); }
.intro-body > p:last-child { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; margin-bottom: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: .8rem 1.5rem; border: 1px solid #ffe0a7; border-radius: 8px; color: #142235; background: linear-gradient(120deg, #ffdda0, #ffbc5c); box-shadow: inset 0 1px 0 #fff9, 0 6px 25px #e99c3220; font-size: .88rem; font-weight: 750; text-decoration: none; transition: background .25s ease, box-shadow .25s ease, transform .25s ease; }
.button:hover { color: #142235; background: #ffe4b8; box-shadow: 0 8px 32px #ffc36b45; transform: translateY(-2px); }
.hero-visual { position: relative; isolation: isolate; min-width: 0; color: var(--heading); }
.hero-visual::before { content: ''; position: absolute; z-index: -1; inset: -5% -4% 15%; background: radial-gradient(ellipse at 55% 45%, #247ddf45, #256aae15 48%, transparent 72%); pointer-events: none; }
.scene-stage { position: relative; perspective: 1000px; }
.scene-art { display: grid; place-items: center; min-width: 0; transform: rotateX(var(--scene-x, 0deg)) rotateY(var(--scene-y, 0deg)); transition: transform .6s cubic-bezier(.18,.65,.3,1); }
.scene-art > svg { display: block; width: 100%; max-width: 100%; height: auto; overflow: visible; }
.scene-caption { position: relative; max-width: 500px; margin: .5rem auto 0; padding: 0 .5rem; }
.scene-overview { display: flex; align-items: center; min-height: 52px; margin: 0; font-weight: 600; font-size: .85rem; }
.scene-controls { display: flex; flex-wrap: wrap; gap: .3rem; padding: .35rem; background: #10273de8; border: 1px solid #48769b; border-radius: 12px; box-shadow: 0 10px 35px #0004; }
.scene-controls button { position: relative; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; border: 1px solid transparent; border-radius: 7px; padding: .65rem .5rem; min-height: 48px; background: transparent; color: var(--muted); cursor: pointer; font-size: .82rem; font-weight: 650; transition: background .3s ease, color .3s ease, box-shadow .3s ease; }
.scene-controls button[aria-pressed='true'] { color: #f2f7ff; border-color: #69b6f8; background: #164b7b; box-shadow: inset 0 1px 0 #a8daff40, 0 2px 8px #0002; }
.scene-controls button:hover:not([aria-pressed='true']) { color: var(--heading); background: #1a3b57; }
.scene-detail { min-height: 90px; padding: 1rem .5rem 0; }
.scene-detail p { color: var(--muted); font-size: .82rem; margin: 0; }
.scene-detail a { display: inline-flex; gap: .6rem; align-items: center; min-height: 36px; color: var(--heading); font-size: .85rem; font-weight: 600; text-decoration: none; }
.scene-detail a:hover { text-decoration: underline; }
.scene-detail .icon { width: 15px; height: 15px; }
.scene-layer { transition: transform .9s cubic-bezier(.2,.7,.2,1), opacity .6s ease; transform-box: fill-box; transform-origin: center; }
.hero-visual[data-scene='network'] .scene-layer--network { transform: translateY(-34px); }
.hero-visual[data-scene='network'] .scene-layer--software { transform: translateY(-50px); opacity: .25; }
.hero-visual[data-scene='software'] .scene-layer--software { transform: translateY(-44px); }
.hero-visual[data-scene='software'] .scene-layer--network { opacity: .28; }
.hero-visual[data-scene='network'] .scene-layer--compute, .hero-visual[data-scene='software'] .scene-layer--compute { opacity: .6; }
.intro-background { grid-column: 1 / -1; padding: 1.5rem 2rem; border: 1px solid #47769b; border-left: 4px solid var(--warm); border-radius: 10px; background: var(--surface); }
.intro-background dl { display: grid; grid-template-columns: 1.2fr 1.15fr 1fr; gap: 1.5rem; margin: 0; }
.intro-background dl > div { min-width: 0; padding-left: 1.5rem; border-left: 1px solid #47769b; }
.intro-background dl > div:first-child { padding-left: 0; border-left: 0; }
.intro-background dt { font-size: .85rem; color: var(--muted); margin-bottom: .25rem; }
.intro-background dl > div:first-child dt { color: var(--warm); font-weight: 700; }
.intro-background dd { margin: 0; }
.intro-background dd a { display: inline-flex; gap: .65rem; align-items: center; min-height: 44px; color: var(--heading); font-size: clamp(1rem, 1.4vw, 1.13rem); font-weight: 650; text-decoration: none; }
.intro-background dd a:hover { text-decoration: underline; }
.intro-background .icon { width: 16px; height: 16px; color: var(--accent); }

/* Navy reading surfaces use blue structure and amber emphasis. */
.dark-section, .site-footer { background: transparent; color: var(--text); color-scheme: dark; }
.home-projects { margin: 1rem 0 0; position: relative; }
.home-projects > .section-inner, .home-experience { padding-top: 3.5rem; padding-bottom: 4rem; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; margin-bottom: 2.5rem; }
.section-heading h2 { margin: 0; font-size: clamp(2.5rem, 5vw, 4.3rem); max-width: 16ch; }
.section-heading p { margin: 1rem 0 0; color: var(--muted); font-size: .95rem; }
.section-heading > a { display: inline-flex; flex-shrink: 0; align-items: center; gap: .8rem; min-height: 44px; font-size: .85rem; font-weight: 650; }
.section-heading > a .icon { width: 17px; height: 17px; }
.featured-projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; align-items: stretch; }
[data-visual$='project-aws.svg'] { --project-tint: #293443; }
[data-visual$='project-resume.svg'], [data-visual$='project-network.svg'] { --project-tint: #133552; }
[data-visual$='project-security.svg'] { --project-tint: #243548; }
.project-card { min-width: 0; display: flex; flex-direction: column; position: relative; }
.card-art { position: relative; display: grid; place-items: center; aspect-ratio: 600 / 370; overflow: hidden; isolation: isolate; background: var(--project-tint); border: 1px solid #6fb8ee2b; border-radius: 20px 20px 4px 4px; }
.card-art::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 10%, #378ee84a, transparent 68%), repeating-linear-gradient(135deg, transparent 0 60px, #8acaff08 60px 61px); z-index: -1; }
.card-art::after { content: ''; position: absolute; width: 70%; height: 12%; bottom: 12%; border-radius: 50%; background: #0008; filter: blur(25px); z-index: -1; }
.card-art img { display: block; width: 100%; height: 100%; object-fit: contain; padding: .5rem; transition: transform .75s cubic-bezier(.2,.7,.2,1), filter .5s ease; }
.card-content { display: flex; flex: 1; flex-direction: column; padding: 1.7rem 0 .4rem; min-width: 0; }
.card-meta { display: flex; align-items: center; gap: .65rem; color: var(--muted); font-size: .79rem; }
.project-icon { display: grid; place-items: center; width: 26px; height: 26px; color: var(--accent); }
.project-icon .icon { width: 20px; }
.project-title { margin: .8rem 0 1.2rem; font-size: clamp(1.75rem, 2.8vw, 2.6rem); }
.project-title a { color: var(--heading); text-decoration: none; }
.project-title a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.card-content > p { margin: 0 0 1.5rem; font-size: .97rem; line-height: 1.8; color: var(--muted); }
.card-bottom { display: flex; flex-wrap: wrap; gap: .3rem 1rem; justify-content: space-between; align-items: center; margin-top: auto; padding-top: .7rem; border-top: 1px solid #ffffff20; font-size: .75rem; }
.card-bottom > span { color: var(--muted); }
.card-bottom > a { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; font-size: .82rem; font-weight: 650; text-decoration: none; }
.card-bottom > a:hover { text-decoration: underline; }
.card-bottom .icon { width: 16px; height: 16px; }
.project-card--featured { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 2rem; align-items: center; padding: 2.5rem; border: 1px solid #4f95c966; border-radius: 22px; background: radial-gradient(ellipse at 95% 0, #2885e330, transparent 65%), #123452; overflow: hidden; isolation: isolate; }
.project-card--featured .card-content { grid-column: 1; grid-row: 1; padding: 1rem 0; }
.project-card--featured .card-art { grid-column: 2; grid-row: 1; background: transparent; border: 0; overflow: visible; border-radius: 0; }
.project-card--featured .card-art::before { display: none; }
.project-card--featured .card-art img { padding: 0; transform: scale(1.08); }
.project-card--featured .project-title { font-size: clamp(2.2rem, 3.6vw, 3.2rem); }
.project-card--summary { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.project-card--summary .card-content { padding: 0; }
.project-card--summary .project-title { font-size: clamp(1.65rem, 2.2vw, 2rem); }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3.5rem 2.5rem; }
.project-grid > .project-card--featured { padding: 2.5rem; border-bottom: 1px solid #4f95c966; }
.collection .project-grid { display: block; }
.collection .project-card { display: grid; grid-template-columns: minmax(130px, 180px) minmax(0, 1fr); gap: 2rem; align-items: center; padding: 1.75rem 0; border-top: 1px solid var(--line); }
.collection .card-art { aspect-ratio: 3 / 2; border: 0; border-radius: 0; background: transparent; }
.collection .card-art::before, .collection .card-art::after { display: none; }
.collection .card-art img { padding: 0; }
.collection .card-content { padding: 0; }
.collection .project-title { margin: .5rem 0 .8rem; font-size: clamp(1.5rem, 2.5vw, 2rem); }
.collection .card-content > p { margin-bottom: .6rem; max-width: 68ch; }
.collection .card-bottom { justify-content: flex-start; gap: .5rem 1.5rem; border: 0; padding: 0; }

/* The homepage puts the experience introduction beside a quieter role list. */
.home-experience { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 4rem; align-items: start; }
.home-experience > .section-heading { display: block; position: sticky; top: calc(var(--header-height, 0px) + 3rem); }
.home-experience .section-heading > a { margin-top: 1.5rem; }
.home-experience .experience-entry { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; padding: 0 0 3.5rem 2.5rem; border: 0; border-left: 1px solid #3975a8; }
.home-experience .experience-entry:last-child { padding-bottom: 1rem; }
.home-experience .experience-entry::before { content: ''; position: absolute; top: .35rem; left: -.3rem; width: .55rem; height: .55rem; border-radius: 50%; background: #ffc36b; box-shadow: 0 0 0 5px #493623, 0 0 20px #ed9b3755; }
.home-experience .experience-entry:first-child { padding-top: 0; border-top: 0; }
.home-experience .experience-copy { padding-left: 0; }
.home-experience .role-symbol { display: none; }
.home-experience .experience-date span { max-width: none; }
.home-experience .experience-date p { margin: 0 0 .2rem; }

.experience-list { position: relative; }
.experience-entry { position: relative; display: grid; grid-template-columns: minmax(160px, .45fr) 1fr; gap: 3rem; padding: 2.5rem 0; border-top: 1px solid var(--line); }
.page-heading + .experience-list > .experience-entry:first-child { padding-top: 0; border-top: 0; }
.experience-date p { color: var(--warm); font-weight: 700; font-size: .85rem; margin: .2rem 0 .75rem; }
.experience-date span { display: block; max-width: 23ch; color: var(--muted); font-size: .92rem; }
.experience-copy { position: relative; padding-left: 4rem; }
.role-symbol { display: grid; place-items: center; position: absolute; left: 0; top: .2rem; width: 44px; height: 44px; border-radius: 12px; color: var(--accent); background: var(--active); border: 1px solid #4c84b0; }
.experience-title { margin: 0 0 1rem; font-size: 1.65rem; }
.experience-title a { color: var(--heading); text-decoration: none; }
.experience-title a:hover { text-decoration: underline; }
.experience-copy p { font-size: 1rem; margin: 0 0 .8rem; color: var(--muted); }
.detail-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .85rem; font-weight: 650; }

.page-heading { position: relative; padding: 1rem 0 2.75rem; margin: 0 0 2.5rem; border-bottom: 1px solid #ffffff20; }
.page-emblem { display: none; }
.page-heading.prose h1 { font-size: clamp(2rem, 7vw, 6rem); margin-bottom: 1.3rem; }
.page-heading.prose > p { max-width: 52ch; margin: 0; }
.project-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2.25rem; }
.js .project-toolbar[hidden] { display: flex !important; visibility: hidden; }
.collection .page-heading { padding-bottom: 1.5rem; margin-bottom: 1.5rem; }
.collection .project-toolbar { margin-bottom: 1.25rem; }
.project-filters { display: flex; gap: .3rem; padding: .3rem; border: 1px solid #507697; border-radius: 10px; background: var(--surface); }
.project-filters button { min-height: 44px; padding: .5rem 1.1rem; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: .88rem; font-weight: 650; cursor: pointer; }
.project-filters button:hover { background: #173958; color: var(--heading); }
.project-filters button[aria-pressed='true'] { background: var(--warm); color: #132334; }
.project-count { margin: 0; font-size: .85rem; color: var(--muted); }
.related-link { margin-top: 3rem; color: var(--muted); font-size: .95rem; }
.section-note { margin-top: 2rem; padding: 2.5rem; background: #173958; border-radius: 16px; }
.section-note h2 { margin-top: 0; }
.section-note p { color: var(--muted); }

/* Case studies retain comfortable line lengths and accessible section navigation. */
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: .65rem; margin-bottom: 2.5rem; font-size: .78rem; color: var(--muted); }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted); }
.breadcrumbs [aria-current] { color: var(--heading); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.article-layout > .prose { grid-column: 1; grid-row: 1; }
.article-layout > .contents { grid-column: 2; grid-row: 1; }
.article-layout--wide { display: block; }
.prose { min-width: 0; font-size: 1.0625rem; }
.prose > p:first-of-type { font-size: 1.18rem; line-height: 1.75; color: var(--muted); margin: 0 0 2rem; }
.prose p { margin: 1.3rem 0; }
.article-layout .prose > p, .article-layout .prose > ul, .article-layout .prose > ol { max-width: 66ch; }
.article-layout .prose h1 { font-size: clamp(2rem, 4.4vw, 3.75rem); }
.prose > h2 { font-size: clamp(1.65rem, 2.3vw, 2.1rem); margin: 3rem 0 1.2rem; padding-top: .5rem; border-top: 0; }
.prose h3 { margin: 1.8rem 0 .8rem; }
.prose li { margin: .8rem 0; }
.prose strong { color: var(--heading); font-weight: 750; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 2rem 0; padding: .1rem 1.3rem; color: var(--muted); }
.prose pre { overflow: auto; background: var(--ink); color: #e4edfb; padding: 1.2rem; border-radius: 10px; font-size: .85rem; }
.prose code { overflow-wrap: anywhere; background: #17334c; font-size: .87em; border-radius: 3px; padding: .1em .3em; }
.prose table code { overflow-wrap: normal; }
.prose pre code { padding: 0; background: none; font-size: inherit; }
.evidence-note { max-width: 66ch; margin: 1.75rem 0 2.5rem; padding: .2rem 1.25rem; border-left: 3px solid var(--accent); background: var(--ink); font-size: .94rem; }
.architecture { margin: 2rem 0; }
.architecture-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; list-style: none; }
.prose .architecture-flow { padding: 0; }
.architecture-flow li { position: relative; padding: 1rem; margin: 0; border: 1px solid var(--line); border-top: 3px solid var(--accent); background: var(--surface); border-radius: 5px; font-size: .9rem; }
.architecture-flow li + li::before { content: '→'; position: absolute; left: -1.1rem; top: 1rem; color: var(--accent); }
.architecture-flow strong, .architecture-flow span, .architecture-flow small { display: block; }
.architecture-flow span { margin: .6rem 0; }
.architecture-flow small { color: var(--warm); font-size: .78rem; }
.architecture figcaption, .evidence-figure figcaption { color: var(--muted); font-size: .84rem; line-height: 1.65; margin-top: .85rem; max-width: 75ch; }
.evidence-figure { margin: 2rem 0; }
.evidence-figure img { display: block; height: auto; border: 1px solid var(--line); border-radius: 5px; }
.evidence-scroll { max-width: 100%; overflow-x: auto; scrollbar-color: var(--accent) var(--surface); }
.evidence-scroll img { max-width: none; }
.evidence-hint { display: none; }
@media screen and (max-width: 760px) {
  .evidence-hint { display: inline; }
}
@media (max-width: 650px) {
  .table-scroll table { min-width: 38rem; }
  .prose .table-hint { display: block; margin: -1rem 0 1.75rem; color: var(--muted); font-size: .8rem; }
  .architecture-flow { grid-template-columns: 1fr; gap: 1.5rem; }
  .architecture-flow li + li::before { content: '↓'; left: 1rem; top: -1.65rem; }
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; line-height: 1.75; margin: 1.75rem 0; }
.table-scroll { max-width: 100%; overflow-x: auto; margin: 1.75rem 0; scrollbar-color: var(--accent) var(--surface); }
.table-scroll table { margin: 0; }
.table-scroll:focus-visible, .evidence-scroll:focus-visible, .prose pre:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.table-hint { display: none; }
.narrative-list dl { display: grid; grid-template-columns: minmax(0, .65fr) repeat(2, minmax(0, 1fr)); margin: 1.75rem 0; }
.narrative-list--pairs dl { grid-template-columns: minmax(0, .65fr) minmax(0, 2fr); }
.narrative-list dt, .narrative-list dd { min-width: 0; margin: 0; padding: 1.1rem .8rem; border-top: 1px solid var(--line); }
.narrative-list dt { font-weight: 750; color: var(--heading); }
.narrative-list dd > p { margin: 0; }
.narrative-list dd strong:first-child { display: block; margin-bottom: .35rem; }
@media screen and (max-width: 760px) {
  .narrative-list dl { display: block; }
  .narrative-list dt { margin-top: 1.5rem; padding: 1rem 0 .25rem; }
  .narrative-list dd { border: 0; padding: .65rem 0; }
}
@media screen {
  .narrative-list { container-type: inline-size; }
  .narrative-list--pairs dl { grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr); max-width: 58rem; }
  @container (max-width: 41em) {
    .narrative-list dl { display: block; }
    .narrative-list dt { margin-top: 1.5rem; padding: 1rem 0 .25rem; }
    .narrative-list dd { border: 0; padding: .65rem 0; }
  }
}
.prose th, .prose td { text-align: left; vertical-align: top; padding: 1rem .8rem; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 750; color: var(--heading); background: #193c5b; overflow-wrap: normal; }
.prose tbody tr:nth-child(even) { background: #10263b; }
.page-context { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; font-size: .78rem; }
.page-context span { padding: .25rem .75rem; border-radius: 4px; color: #b5e0ff; background: #164065; border: 1px solid #559dd2; }
.page-context span + span { color: var(--muted); background: transparent; border-color: #4d7192; }
.contents { position: sticky; top: calc(var(--header-height, 0px) + 2rem); max-height: calc(100dvh - var(--header-height, 0px) - 4rem); overflow-y: auto; padding-left: 1.2rem; border-left: 1px solid var(--line); font-size: .8rem; }
.contents summary { color: var(--heading); font-weight: 750; padding: .5rem 0; cursor: pointer; }
.contents nav { margin-top: .6rem; }
.contents a { display: block; padding: .65rem .6rem; color: var(--muted); text-decoration: none; line-height: 1.55; }
.contents a:hover { color: var(--accent); text-decoration: underline; }
.contents a[aria-current='location'] { background: #173958; color: #c3e6ff; border-radius: 5px; box-shadow: -3px 0 0 #59adff; }
.credential-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; margin: 1.5rem 0; }
.credential { position: relative; padding: 2rem; border: 1px solid #846331; border-left: 4px solid #ffc36b; border-radius: 10px; background: #2d2d2b; color: var(--text); }
.credential:nth-child(2) { background: #173550; border-color: #406f97; border-left-color: #59adff; }
.credential h3 { color: #fff; font-size: 1.4rem; margin: 0 0 1.5rem; }
.credential p { margin: 0; color: #c7d8e8; font-size: .9rem; }
.education-entry { position: relative; padding: .3rem 0 .3rem 1.5rem; border-left: 3px solid #4e9bd8; margin: 1.5rem 0 2rem; }
.education-entry h3 { margin: 0 0 .8rem; }
.education-entry p { margin: .8rem 0; }
.case-visual { margin: 2.5rem 0 3rem; border: 1px solid #69a8d844; border-radius: 20px 20px 6px 6px; overflow: hidden; background: radial-gradient(ellipse at 70% 5%, #378ee845, transparent 70%), var(--project-tint); }
.case-visual img { display: block; width: 100%; height: clamp(250px, 32vw, 440px); padding: 1.5rem; object-fit: contain; }
.case-visual figcaption { padding: 1rem 1.5rem; background: #10283e; color: #b9cfe2; font-size: .8rem; line-height: 1.6; }
.component-list ul { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 0; list-style: none; }
.component-list li { margin: 0; padding: 1.3rem; background: #152f47; border-radius: 10px; font-size: .97rem; }
.component-list li strong { display: block; margin-bottom: .5rem; }
.workflow-steps ol { list-style: none; counter-reset: workflow; padding: 0; }
.workflow-steps li { position: relative; counter-increment: workflow; margin: 0; padding: .35rem 0 1.8rem 3.5rem; }
.workflow-steps li:not(:last-child)::after { content: ''; position: absolute; top: 2.7rem; bottom: .4rem; left: 17px; border-left: 1px solid #477294; }
.workflow-steps li::before { content: counter(workflow); position: absolute; top: .2rem; left: 0; width: 36px; height: 36px; display: grid; place-items: center; color: #132334; background: var(--warm); border-radius: 50%; font-size: .9rem; font-weight: 750; }
.workflow-steps li strong { display: block; margin-bottom: .3rem; }
.back-to-top { position: fixed; z-index: 15; right: 1.5rem; bottom: 1.25rem; display: inline-flex; align-items: center; gap: .6rem; min-height: 46px; padding: .7rem 1rem; border-radius: 30px; color: #fff; background: #102b44; border: 1px solid #5994c3; box-shadow: 0 5px 20px #071c3022; font-size: .8rem; text-decoration: none; }
.back-to-top:hover { background: #1b456a; }
.back-to-top.back-to-top--in-footer { position: static; margin-left: auto; }
.site-footer { overflow: hidden; position: relative; background: radial-gradient(ellipse at 80% 100%, #246fbd33, transparent 65%), #102b47; border-top: 1px solid #376f9e; }
.footer-inner { display: grid; grid-template-columns: 1fr; align-items: start; gap: 1.25rem; padding-top: 1.75rem; padding-bottom: 1.5rem; }
.footer-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 2rem; }
.footer-heading h2 { font-size: 1.4rem; line-height: 1.2; margin: 0; }
.contact-email { display: inline-flex; align-items: center; gap: .75rem; max-width: 100%; min-height: 44px; padding: .4rem 0; font-size: clamp(1rem, 2vw, 1.4rem); color: var(--warm); text-decoration: none; }
.contact-email:hover { text-decoration: underline; }
.contact-email span { min-width: 0; }
.contact-email .icon { width: 20px; height: 20px; }
.footer-bottom { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.footer-brand { font-size: .85rem; font-weight: 750; color: #fff; text-decoration: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: .8rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.error-page { padding: 3rem 0; }

@media (hover: hover) and (pointer: fine) {
  .card-art:hover img, .project-card:focus-within .card-art img { transform: translateY(-9px) scale(1.055); filter: brightness(1.08); }
  .project-card--featured .card-art:hover img, .project-card--featured:focus-within .card-art img { transform: translateY(-9px) scale(1.14); }
  .main-nav a, .header-contact a { transition: color .2s ease, background .2s ease; }
}
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
  .home-intro h1 { animation: name-arrive .8s cubic-bezier(.2,.7,.2,1) both; }
  .scene-stage { animation: scene-arrive 1.35s cubic-bezier(.16,.75,.2,1) both; }
  .scene-trace { stroke-dasharray: 1; stroke-dashoffset: 0; animation: circuit-arrive 1.7s .2s ease both; }
  .scene-detail:not([hidden]) { animation: detail-arrive .35s ease both; }
  @keyframes name-arrive { from { opacity: .2; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
  @keyframes scene-arrive { from { opacity: 0; transform: translateY(35px) rotate(-4deg) scale(.9); } to { opacity: 1; transform: none; } }
  @keyframes circuit-arrive { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  @keyframes detail-arrive { from { opacity: .3; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 1200px) {
  .home-intro { gap: 1.75rem 2.5rem; }
  .home-experience { gap: 3rem; }
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .article-layout > .contents { grid-column: 1; grid-row: 1; position: static; }
  .article-layout > .prose { grid-column: 1; grid-row: 2; }
  .contents { max-height: none; overflow: visible; padding: .7rem 1rem; border: 1px solid #477392; border-radius: 8px; background: #10283e; }
  .contents nav { display: flex; flex-wrap: wrap; gap: .2rem 1rem; }
  .contents a { padding: .5rem; }
  .js .contents details:not([data-ready]) > nav { display: none; }
}
@media (max-width: 960px) {
  .site-header { display: block; min-height: 80px; padding: 1rem var(--gutter); }
  .js .site-header { max-height: 100dvh; overflow-y: auto; }
  .identity { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
  .identity .brand { flex: 1 1 min-content; max-width: max-content; }
  .identity .brand span { min-width: 0; overflow-wrap: break-word; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .js .menu-toggle[hidden] { display: inline-flex !important; visibility: hidden; }
  .js .site-menu:not([data-ready]) { display: none; }
  .site-menu { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1rem 0 .25rem; }
  .main-nav { flex: 1; justify-content: space-between; }
  .main-nav a { padding: .6rem .9rem; }
  .page-shell { padding-top: 3rem; }
  .home-intro { padding-top: 2.5rem; gap: 1.5rem 2rem; }
  .prose.intro-copy h1 { font-size: clamp(3.5rem, 7.8vw, 6rem); }
  .scene-caption { padding: 0; }
  .scene-detail { min-height: 100px; }
  .intro-background { padding: 1.25rem; }
  .intro-background dl { gap: 1rem; }
  .intro-background dl > div { padding-left: 1rem; }
  .home-experience { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .home-experience > .section-heading { position: static; }
  .home-experience .experience-entry:first-child { padding-top: 0; border-top: 0; }
}
@media (max-width: 760px) {
  .collection .project-card { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .collection .card-art { display: none; }
  .home-intro { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .prose.intro-copy h1 { font-size: clamp(3.6rem, 13vw, 6rem); max-width: none; }
  .intro-body { padding-bottom: 0; }
  .intro-body > p { max-width: 56ch; }
  .prose.intro-copy .intro-specialties { max-width: 38ch; font-size: 1.25rem; }
  .hero-visual { width: 100%; max-width: 590px; justify-self: center; }
  .scene-stage { width: min(88%, 360px); margin-inline: auto; }
  .scene-art > svg { width: 100%; max-width: 100%; margin: 0; }
  .scene-caption { padding: 0 .5rem; }
  .scene-detail { min-height: 82px; }
  .intro-background dl { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .intro-background dl > div { padding: 1rem 0 0; border-left: 0; border-top: 1px solid #47769b; }
  .intro-background dl > div:first-child { padding-top: 0; border-top: 0; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
  .project-grid, .featured-projects { grid-template-columns: minmax(0, 1fr); }
  .project-card--featured { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; padding: 1.5rem; }
  .project-grid > .project-card--featured { padding: 1.5rem; }
  .project-card--featured .card-art { grid-column: 1; grid-row: 1; }
  .project-card--featured .card-content { grid-column: 1; grid-row: 2; }
  .card-art { aspect-ratio: 600 / 340; }
  .featured-projects { gap: 2.5rem; }
  .experience-entry { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding: 2rem 0; }
  .experience-date span { max-width: none; }
  .experience-date p { margin-bottom: .3rem; }
  .home-projects { margin: 1rem 0 0; }
  .home-projects > .section-inner, .home-experience { padding-top: 2.5rem; padding-bottom: 3rem; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .contact-email { justify-self: start; }
}
@media (max-width: 480px) {
  .brand { font-size: .84rem; gap: .6rem; }
  .brand img { width: 32px; height: 32px; }
  .menu-toggle { font-size: .8rem; }
  .site-menu { align-items: stretch; flex-direction: column; }
  .main-nav { display: flex; flex-wrap: wrap; gap: .3rem; border-radius: 10px; }
  .main-nav a { flex: 1 1 max-content; min-width: calc(50% - .15rem); justify-content: flex-start; border-radius: 6px; }
  .home-intro { padding-top: 1.5rem; padding-bottom: 1rem; gap: 1.25rem; }
  .prose.intro-copy h1 { font-size: clamp(3rem, 15vw, 4.5rem); max-width: none; }
  .intro-body > p { font-size: .96rem; }
  .intro-body > p:last-child { gap: .6rem; }
  .button { padding: .65rem 1.2rem; font-size: .84rem; }
  .scene-art > svg { max-height: none; }
  .scene-caption { padding: 0; }
  .scene-detail { min-height: 90px; }
  .project-title { font-size: 1.65rem; }
  .project-card--featured .project-title { font-size: 2rem; }
  .home-experience .experience-entry { padding-left: 1.5rem; }
  .card-art img { padding: .8rem; }
  .card-content > p { font-size: .95rem; }
  .experience-copy { padding-left: 0; }
  .role-symbol { display: none; }
  .experience-title { font-size: 1.5rem; }
  .project-toolbar { gap: .7rem; }
  .project-filters { flex-wrap: wrap; width: 100%; gap: .25rem; }
  .project-filters button { flex: 1 1 auto; padding: .5rem; font-size: .82rem; }
  .project-count { margin-left: auto; }
  .prose h1 { font-size: clamp(2.2rem, 9vw, 3rem); overflow-wrap: anywhere; }
  .prose { font-size: 1rem; }
  .prose > p:first-of-type { font-size: 1.1rem; }
  .prose h2 { font-size: 1.75rem; }
  .prose table { font-size: .9rem; }
  .prose th, .prose td { padding: .8rem; min-width: 120px; }
  .breadcrumbs { font-size: .73rem; gap: .4rem; margin-bottom: 1.5rem; }
  .credential-grid, .component-list ul { grid-template-columns: 1fr; }
  .credential { padding: 1.5rem; }
  .section-note { padding: 1.5rem; }
  .case-visual img { height: auto; aspect-ratio: 600 / 340; padding: .5rem; }
  .case-visual figcaption { padding: 1rem; }
  .back-to-top { right: .8rem; bottom: .8rem; padding: .7rem; }
  .back-to-top span { display: none; }
  .footer-heading { flex-direction: column; align-items: flex-start; gap: .15rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card-art img, .card-art:hover img, .project-card:focus-within .card-art img, .scene-layer, .scene-art, .button:hover { transform: none !important; }
}
@media (max-height: 480px) {
  .js .site-header { position: relative; }
}
@media print {
  :root, .dark-section, .site-footer { --background: #fff; --surface: #fff; --text: #000; --heading: #000; --muted: #333; --accent: #183b68; --line: #bbb; color-scheme: light; }
  body { background: #fff; color: #000; font-size: 11pt; line-height: 1.4; }
  .prose { font-size: 11pt; line-height: 1.4; }
  .prose p { margin: .65em 0; orphans: 3; widows: 3; break-inside: avoid; }
  .prose > p:first-of-type { font-size: 11.5pt; line-height: 1.5; margin-bottom: 1rem; }
  .prose pre { white-space: pre-wrap; overflow-wrap: anywhere; overflow: visible; font-size: 9pt; padding: .75rem; break-inside: avoid; }
  .prose table { font-size: 9.5pt; line-height: 1.45; }
  .prose th, .prose td { padding: .5rem; overflow-wrap: normal; }
  .prose tr { break-inside: avoid; }
  .narrative-list dt, .narrative-list dd { padding: .6rem .45rem; font-size: 10pt; break-inside: avoid; }
  .prose li { margin: .5em 0; orphans: 3; widows: 3; break-inside: avoid; }
  .dark-section, .page-context span, .page-context span + span, .prose th, .prose tbody tr:nth-child(even), .prose pre, .prose code { background: #fff; color: #000; }
  .evidence-note, .architecture-flow li { background: #fff; color: #000; }
  .evidence-note { margin: 1rem 0; }
  .architecture-flow small { color: #333; }
  .evidence-figure, .architecture { break-inside: avoid; }
  .evidence-scroll { overflow: visible; }
  .evidence-scroll img { max-width: 100%; }
  .evidence-hint { display: none; }
  .table-scroll { overflow: visible; margin: 1rem 0; }
  .table-scroll table { min-width: 0; }
  .prose .table-hint { display: none; }
  .workflow-steps li::before { background: #fff; color: #000; border: 1px solid #777; }
  .site-header, .site-footer, .contents, .skip-link, .project-toolbar, .breadcrumbs, .button, .back-to-top, .hero-visual, .page-emblem, .role-symbol { display: none; }
  .print-identity { display: grid; gap: .15rem; padding-bottom: .75rem; margin-bottom: 1rem; border-bottom: 1px solid #bbb; font-size: 10pt; }
  .page-shell, .home-intro, .home-projects > .section-inner, .home-experience { padding: 0; max-width: none; }
  .page-heading, .collection .page-heading { padding: 0 0 1rem; margin: 0 0 1rem; }
  .article-layout, .home-intro, .home-experience, .project-grid, .featured-projects { display: block; }
  .home-intro { padding-bottom: 1rem; }
  .home-experience > .section-heading { position: static; }
  .home-projects { margin: 0; border: 0; }
  .experience-entry { padding: 1rem 0; }
  .home-experience .experience-entry { border: 0; padding: 0 0 1rem; }
  .home-experience .experience-entry::before { display: none; }
  .intro-copy h1 span { display: inline; }
  .intro-background { border: 0; padding: 0; margin-top: 1rem; background: none; }
  .intro-background dl { display: flex; flex-wrap: wrap; gap: 1rem 2rem; }
  .intro-background dl > div { border: 0; padding: 0; }
  .intro-background dt, .intro-background dl > div:first-child dt { color: #333; }
  .intro-background dd a { min-height: 0; color: #000; font-size: 11pt; }
  .intro-background .icon { display: none; }
  .project-card, .project-card--featured, .credential, .credential:nth-child(2), .experience-entry, .section-note, .component-list li { display: block; background: #fff; break-inside: avoid; box-shadow: none; color: #000; }
  .credential h3, .credential p, .experience-date p { color: #000; }
  .credential-grid { margin: .75rem 0; gap: 1rem; }
  .credential { padding: .65rem 1rem; }
  .prose .credential h3, .prose .education-entry h3 { margin: 0 0 .5rem; }
  .education-entry { margin: .75rem 0; padding: 0 0 0 1rem; }
  .section-note { margin-top: 1rem; padding: 1rem; }
  .card-content { padding: 1rem 0; }
  .project-card--featured { padding: 1rem; }
  .card-content > p, .experience-copy p, .intro-body > p, .section-heading p { font-size: 11pt; line-height: 1.4; }
  .project-title, .project-card--featured .project-title, .project-card--summary .project-title, .collection .project-title, .experience-title { font-size: 16pt; margin: .5rem 0; }
  .card-art, .project-card--featured .card-art, .case-visual { display: none; }
  h1, .prose.intro-copy h1, .page-heading.prose h1, .article-layout .prose h1 { font-size: 28pt; max-width: none; letter-spacing: -.025em; }
  h2, h3 { break-after: avoid; }
  .section-heading h2, .prose > h2 { font-size: 18pt; margin: 1rem 0 .5rem; padding: 0; }
  .prose h3 { font-size: 13pt; margin: 1rem 0 .5rem; }
  a { color: inherit; }
  .experience-copy { padding-left: 0; }
  .detail-link, .card-bottom > a, .section-heading > a { min-height: 0; }
  * { animation: none !important; transition: none !important; }
}
