:root { color-scheme: dark; --paper: #0f1715; --ink: #ECFFFB; --muted: rgb(236 255 251 / .7); --accent: #C2B290; --rule: rgb(236 255 251 / .14); --gutter: clamp(1.25rem, 4vw, 3rem); }
:root[data-theme="light"] { color-scheme: light; --paper: #f5f1e8; --ink: #1a1612; --muted: #645b4e; --accent: #7a5f28; --rule: #ddd5c0; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.8 'iA Writer Duo S', monospace; overflow-wrap: break-word; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: 'iA Writer Duo S', monospace; font-weight: 400; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.75rem, 1.32rem + 2.1vw, 2.6rem); line-height: 1.14; letter-spacing: -.01em; }
h2 { font-size: .87rem; line-height: 1.6; font-weight: 400; color: var(--accent); }
h3 { font-size: 1rem; line-height: 1.6; }
p + p { margin-top: 1rem; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
a:focus, button:focus, summary:focus { outline: none; }
a:focus-visible, button:focus-visible, summary:focus-visible, [role="tabpanel"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.frame { width: 100%; max-width: 72rem; padding-inline: var(--gutter); margin-inline: auto; }
.reading-column { max-width: 44rem; }
.skip-link { position: absolute; top: 0; left: var(--gutter); z-index: 20; padding: .5rem; background: var(--paper); transform: translateY(-120%); }
.skip-link:focus-visible { transform: translateY(0); }
.site-header { position: sticky; top: 0; z-index: 10; background: var(--paper); }
.site-navigation { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; min-height: 88px; gap: 1.5rem; font-size: 20px; line-height: 1.6; }
.site-navigation a, .site-navigation button { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
.site-brand { min-width: 0 !important; font-weight: 400; }
.desktop-nav { display: flex; flex-wrap: wrap; max-width: 100%; align-items: center; gap: 4px; margin-right: -14px; }
.desktop-nav > a, .desktop-nav > button { padding-inline: 14px; }
[data-theme-icon] { width: 18px; height: 18px; display: block; flex-shrink: 0; }
[data-theme-toggle] { justify-content: center; }
[data-theme-toggle] svg { stroke: currentColor; fill: none; stroke-width: 1.5; }
.site-navigation a[aria-current="page"] span { text-decoration: underline; text-underline-offset: .35em; text-decoration-thickness: 1px; }
.site-navigation a:hover span, .site-navigation button:hover span { text-decoration: underline; text-underline-offset: .35em; }
.mobile-nav { position: absolute; top: 100%; left: 0; width: 100%; padding: .75rem var(--gutter) 1.5rem; background: var(--paper); }
.mobile-nav a, .mobile-nav button { display: flex; width: 100%; min-height: 48px; }
#mobile-menu-button { display: none; min-width: 44px; justify-content: flex-end; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(22rem, 26rem); align-items: start; gap: 3rem; padding-block: 3rem 4rem; }
.hero h1 { max-width: 22ch; font-size: clamp(2.25rem, 3.34vw, 3rem); }
.intro { font-size: clamp(.9rem, .84rem + .3vw, 1.05rem); line-height: 1.75; margin-top: 1.5rem; max-width: 52ch; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.5rem; margin-top: 1.5rem; }
.actions a { display: inline-flex; align-items: center; min-height: 44px; }
.primary-link { font-weight: 400; }
.career-evidence { color: var(--muted); font-size: 1rem; margin-top: 1.75rem; line-height: 1.45; }
.portrait { display: block; width: 100%; max-width: 26rem; height: auto; object-fit: contain; border-radius: .5rem; }
.selected-work { padding-block: 2rem 0; }
.selected-work h2 { margin-bottom: 1.5rem; }
.work-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); column-gap: 3rem; padding-block: 1.25rem; align-items: baseline; }
.work-row::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--rule); transform-origin: left; }
.work-row h3 a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .3em; }
.work-row h3 a:hover { text-decoration: underline; }
.work-row p { color: var(--muted); max-width: 55ch; }
.profile-section { padding-block: 4rem 1rem; scroll-margin-top: 2rem; }
.profile-readings { margin-top: 1.5rem; }
.reading-switch { display: flex; gap: 1.5rem; margin-bottom: 1rem; }
.reading-switch button { min-height: 44px; min-width: 44px; color: var(--muted); }
.reading-switch button[aria-selected="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: .35em; text-decoration-thickness: 1px; }
.profile-reading h3 { margin-bottom: .75rem; }
.profile-readings.enhanced .profile-reading h3 { display: none; }
.profile-reading + .profile-reading { margin-top: 2rem; }
.profile-readings.enhanced .profile-reading { margin-top: 0; }
.profile-more { margin-top: 1.25rem; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.profile-more summary { display: inline-flex; align-items: center; gap: 1rem; min-height: 44px; color: var(--accent); }
.profile-more > p { margin-top: .75rem; }
.disclosure-marker::before { content: '+'; }
details[open] > summary .disclosure-marker::before { content: '−'; }
.page-intro { padding-block: 3rem 2.5rem; }
.cv-intro { max-width: 48rem; }
.cv-record { max-width: 52rem; }
.cv-section { border-top: 1px solid var(--rule); }
.cv-section-summary { display: flex; justify-content: space-between; align-items: center; min-height: 76px; gap: 1rem; }
.cv-section-summary h2 { font-size: 1rem; }
.cv-section-marker::before { content: '+'; font-size: 1.5rem; color: var(--accent); }
.cv-section[open] > summary .cv-section-marker::before { content: '−'; }
.cv-section-body { padding-block: .5rem 2rem; scroll-margin-top: 1rem; }
.cv-role + .cv-role, .cv-entry + .cv-entry { margin-top: 1.75rem; }
.cv-project { border-top: 1px solid var(--rule); }
.cv-project:last-child { border-bottom: 1px solid var(--rule); }
.cv-project-summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 56px; padding-block: .5rem; }
.cv-project-summary .disclosure-marker { color: var(--accent); font-size: 1.15rem; flex: none; }
.cv-project-body { padding-block: .25rem 1.5rem; }
.role-header { display: grid; grid-template-columns: 8rem 1fr; column-gap: 1.5rem; align-items: baseline; font-family: 'iA Writer Duo S', monospace; font-size: 1rem; }
.cv-role-date { color: var(--muted); font-size: 1rem; font-variant-numeric: tabular-nums; }
.cv-role-title { display: block; font-weight: 700; }
.cv-role-org { display: block; color: var(--muted); font-size: 1rem; margin-top: .25rem; }
.role-details { padding-left: 9.5rem; margin-top: .75rem; }
.role-details ul, .prof-list { list-style: disc; padding-left: 1.1rem; }
.role-details li + li, .prof-list li + li { margin-top: .4rem; }
.proficiency { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.prof-head { font-size: 1rem; margin-bottom: .75rem; }
.proficiency > div:last-child { grid-column: 1 / -1; }
.cv-entry-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1.5rem; }
.cv-entry-title { font-weight: 700; }
.cv-entry-meta { color: var(--muted); }
.cv-entry-note { margin-top: .5rem; }
.cv-entry[id] { scroll-margin-top: 1.5rem; }
.print-contact { display: none; }
.contact-list { margin: 0; }
.contact-list > div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1.5rem; padding-block: 1.25rem; border-top: 1px solid var(--rule); }
.contact-list dt { color: var(--muted); }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }
.contact-actions { margin-block: 2rem 1rem; }
.site-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 1.25rem 2rem; padding-block: 2.5rem 2rem; margin-top: 0; position: relative; font-size: 1rem; }
.site-footer::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid var(--rule); }
.site-footer p span { color: var(--muted); }
.scope-section { margin-top: 3rem; padding-top: 1rem; container: scope / inline-size; }
.scope-intro { margin-top: 1rem; color: var(--muted); }
.scope-map { position: relative; height: clamp(30rem, 60vh, 37.5rem); margin-top: 1.5rem; isolation: isolate; container-type: size; }
.scope-fallback, .scope-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }
.scope-fallback { opacity: .7; }
.scope-map[data-renderer="webgl"] .scope-fallback { visibility: hidden; }
.scope-static-rings, .scope-static-connectors { fill: none; stroke: var(--accent); stroke-width: 1; opacity: .35; }
.scope-ring-outer { r: min(38cqw, 43cqh); }
.scope-ring-inner { r: min(23.56cqw, 26.66cqh); }
.scope-evidence { list-style: none; margin: 0; padding: 0; }
.scope-domain { position: absolute; width: 19ch; max-width: 36%; text-align: center; transform: translate(-50%, -50%); line-height: 1.45; }
.scope-domain:nth-child(1) { left: 25%; top: 28%; }
.scope-domain:nth-child(2) { left: 75%; top: 28%; }
.scope-domain:nth-child(3) { left: 25%; top: 73%; }
.scope-domain:nth-child(4) { left: 75%; top: 73%; }
.scope-domain h3 { font-size: 20px; margin-bottom: .5rem; }
.scope-domain h3 { width: fit-content; margin-inline: auto; background: var(--paper); padding: .15rem .4rem; }
.scope-domain a { display: flex; align-items: center; justify-content: center; width: fit-content; max-width: 100%; margin: .2rem auto; font-size: 16px; line-height: 1.5; min-height: 44px; }
.scope-domain a span { background: var(--paper); padding: .15rem .4rem; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.scope-bridge { position: absolute; left: 50%; top: 50%; width: 24ch; max-width: 30%; transform: translate(-50%, -50%); text-align: center; }
.scope-bridge h3 { width: fit-content; margin: 0 auto .5rem; padding-inline: .4rem; background: var(--paper); }
.scope-bridge a { display: flex; align-items: center; gap: .5rem; min-height: 44px; width: fit-content; max-width: 100%; margin-inline: auto; font-size: 16px; line-height: 1.5; background: var(--paper); padding-inline: .35rem; text-align: left; }
.scope-bridge a::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.scope-bridge a:nth-of-type(2)::before { background: #769e87; }
.scope-bridge a:nth-of-type(3)::before { background: #b9a36d; }
.scope-bridge a:nth-of-type(4)::before { background: #7796b5; }
.scope-bridge a:nth-of-type(5)::before { background: #b78c7b; }
@media (max-width: 1023px) {
  .scope-map { height: auto; container-type: normal; }
  .scope-fallback { display: none; }
  .scope-evidence { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
  .scope-domain { position: static; transform: none; width: auto; max-width: none; text-align: left; }
  .scope-domain a { margin-inline: 0; padding-inline: 0; }
  .scope-domain h3 { padding-inline: 0; margin-inline: 0; }
  .scope-domain a span { padding-inline: 0; }
  .scope-bridge { position: static; transform: none; width: auto; max-width: none; text-align: left; grid-column: 1 / -1; }
  .scope-bridge h3, .scope-bridge a { margin-inline: 0; padding-inline: 0; }
}
@media (max-width: 599px) { .scope-evidence { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }
@container scope (max-width: 54rem) {
  .scope-map { height: auto; container-type: normal; }
  .scope-fallback, .scope-canvas { display: none; }
  .scope-evidence { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
  .scope-domain, .scope-bridge { position: static; transform: none; width: auto; max-width: none; text-align: left; }
  .scope-domain h3, .scope-domain a, .scope-bridge h3, .scope-bridge a { margin-inline: 0; padding-inline: 0; justify-content: flex-start; }
  .scope-bridge { grid-column: 1 / -1; }
}
@container scope (max-width: 31.25rem) { .scope-evidence { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }
.cv-section-body[id], .cv-entry[id], #profile { scroll-margin-top: 10rem; }
@keyframes heading-entry { from { transform: translateY(4px); } to { transform: none; } }
@keyframes rule-entry { from { transform: scaleX(.4); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: no-preference) {
  h1 { animation: heading-entry 240ms cubic-bezier(.22,1,.36,1) both; }
  @view-transition { navigation: auto; }
  @supports (animation-timeline: view()) {
    .scroll-reveal { animation: heading-entry linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
    .scroll-reveal-rule::before { animation: rule-entry linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
  }
  .rule-reveal-once::before { animation: rule-entry 240ms cubic-bezier(.22,1,.36,1); }
}
.site-header { view-transition-name: masthead; }
.site-footer { view-transition-name: colophon; }
::view-transition-group(masthead), ::view-transition-group(colophon) { animation-duration: 0s; }
::view-transition-old(root) { animation-duration: 180ms; }
::view-transition-new(root) { animation-duration: 240ms; }
::view-transition { pointer-events: none; }
.theme-wipe .site-header, .theme-wipe .site-footer { view-transition-name: none; }
.theme-wipe::view-transition-old(root), .theme-wipe::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.theme-wipe::view-transition-new(root) { z-index: 1; }
@media (max-width: 1023px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .portrait { width: min(100%, 26rem); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .scroll-reveal { opacity: 1 !important; transform: none !important; }
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { display: inline-flex; align-items: flex-start; min-height: 44px; }
@media (max-width: 767px) {
  .site-navigation { min-height: 80px; flex-wrap: wrap; gap: 0; }
  .site-brand { margin-right: auto; }
  .desktop-nav { width: 100%; gap: 1.5rem; flex-wrap: wrap; padding-bottom: 1rem; }
  .site-header.enhanced .desktop-nav { display: none; }
  .site-header.enhanced #mobile-menu-button { display: inline-flex; }
  .site-header.enhanced .site-navigation { flex-wrap: nowrap; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-block: 1.75rem 2rem; gap: 2rem; }
  .hero h1 { max-width: 22ch; font-size: clamp(1.75rem, .55rem + 6vw, 2rem); }
  .hero h1 { letter-spacing: 0; }
  .portrait { width: min(100%, 26rem); }
  .intro { margin-top: 1.25rem; }
  .work-row { grid-template-columns: minmax(0, 1fr); gap: .5rem; padding-block: 1.25rem; }
  .profile-section { padding-top: 3rem; }
  .page-intro { padding-block: 1.75rem 2rem; }
  .role-header { grid-template-columns: 1fr; gap: .4rem; }
  .cv-role-date br { display: none; }
  .role-details { padding-left: 0; }
  .proficiency { grid-template-columns: 1fr; gap: 1.5rem; }
  .contact-list > div { grid-template-columns: 1fr; gap: .25rem; }
  .site-footer { grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 1rem; padding-top: 2rem; }
}
@media print {
  :root, :root[data-theme="dark"], :root[data-theme="light"] { color-scheme: light; --paper: #fff; --ink: #000; --muted: #333; --accent: #000; --rule: #bbb; }
  body { background: white; color: black; font-size: 10pt; }
  .site-header, .site-footer, .skip-link, .actions, .portrait, .cv-section-marker, .disclosure-marker, .scope-section { display: none !important; }
  .frame { max-width: none; padding: 0; }
  h1 { font-size: 26pt; }
  .page-intro { padding: 0 0 1rem; }
  .intro { font-size: 10pt; margin-top: .75rem; }
  .print-contact { display: block; margin-top: .5rem; }
  details::details-content { display: block !important; content-visibility: visible !important; }
  details > .cv-section-body, details > p { display: block !important; }
  .cv-section-summary { min-height: 0; padding-block: .5rem; }
  .cv-section-summary h2 { font-size: 16pt; }
  .cv-section-body { padding-block: .5rem 1rem; }
  details > .cv-project-body { display: block !important; }
  .cv-project-summary { min-height: 0; padding-block: .25rem; }
  .cv-project, .cv-project:last-child { border: 0; }
  .cv-role, .cv-entry { break-inside: avoid; }
  .cv-role + .cv-role, .cv-entry + .cv-entry { margin-top: 1rem; }
  .role-header { font-size: 10pt; }
  .cv-role-date, .cv-role-org { font-size: 9pt; }
  .role-details { margin-top: .4rem; }
  a { color: black; }
}
