/* 1. Design tokens and foundations */
:root {
  --background: #f8f9f5;
  --surface: #ffffff;
  --ink: #172e27;
  --muted: #56625a;
  --green: #173e35;
  --accent: #6f8c45;
  --lime: #d9e9b8;
  --line: #d9e0d6;
  --soft: #edf1e8;
  --width: 1160px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 108px; }
body { margin: 0; background: var(--background); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a, button { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button, a { touch-action: manipulation; }
a:focus-visible, button:focus-visible { outline: 3px solid #527927; outline-offset: 6px; border-radius: 3px; }
main:focus { outline: none; }
::selection { background: var(--lime); color: var(--green); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 600; line-height: 1.12; letter-spacing: -0.045em; }
h2 { font-size: clamp(2rem, 3.2vw, 2.75rem); }
h3 { font-size: 1.7rem; }
svg { display: block; }
.container { width: min(var(--width), calc(100% - 80px)); margin-inline: auto; }
.section { padding-block: 100px; }
.eyebrow { text-transform: uppercase; font-size: .69rem; letter-spacing: .16em; font-weight: 650; }
.section-number { color: var(--muted); margin-bottom: 19px; }
.accent { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 16px; z-index: 20; transform: translateY(-180%); padding: 10px 18px; background: var(--green); color: white; }
.skip-link:focus { transform: translateY(0); }

/* 2. Header and responsive navigation (usable without JavaScript) */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--background); border-bottom: 1px solid var(--line); transition: box-shadow .25s ease; }
.site-header.is-scrolled { box-shadow: 0 4px 20px #173e3509; }
.header-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; font-size: .95rem; font-weight: 500; letter-spacing: -.025em; white-space: nowrap; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; flex-shrink: 0; transition: transform .25s ease; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.wordmark:hover .brand-mark { transform: translateY(-1px); }
.navigation { display: flex; align-items: center; gap: 24px; font-size: .8rem; margin-left: auto; }
.navigation a { position: relative; min-height: 44px; display: inline-flex; align-items: center; transition: color .18s; }
.navigation a:not(.nav-contact)::after { content: ""; position: absolute; bottom: 5px; left: 0; right: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.navigation a[aria-current="location"]::after, .navigation a:not(.nav-contact):hover::after { transform: scaleX(1); }
.navigation .nav-contact[aria-current="location"] { background: var(--soft); border-color: var(--accent); }
.navigation a:hover { color: #5b762e; }
.navigation .nav-contact { border: 1px solid #aebcac; border-radius: 6px; padding: 8px 16px; gap: 23px; }
.header-controls { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.language-switch { display: flex; align-items: center; font-size: .71rem; letter-spacing: .04em; }
.language-switch a { display: grid; place-items: center; min-width: 36px; min-height: 44px; color: var(--muted); border-radius: 4px; }
.language-switch > span { color: #9aa592; }
.language-switch a[aria-current="page"] { color: var(--green); font-weight: 750; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }
.language-switch a:hover { background: var(--soft); color: var(--green); }
.menu-toggle[hidden] { display: none; }
.menu-toggle { display: none; border: 1px solid var(--line); background: transparent; border-radius: 5px; width: 44px; min-height: 44px; padding: 10px; cursor: pointer; color: var(--ink); justify-content: center; }
.menu-toggle { align-items: center; gap: 10px; }
.menu-icon { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.menu-icon path { transition: transform .2s ease; }
.menu-line-one { transform-origin: 12px 8px; }
.menu-line-two { transform-origin: 12px 16px; }
.menu-toggle[aria-expanded="true"] .menu-line-one { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-line-two { transform: translateY(-4px) rotate(-45deg); }

/* 3. Introduction and custom healthcare/data illustration */
.hero { padding-block: 74px 72px; display: grid; grid-template-columns: 1.18fr 1fr; align-items: center; gap: 70px; }
.hero .eyebrow { display: flex; align-items: center; gap: 9px; letter-spacing: .11em; }
.small-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; flex-shrink: 0; }
h1 { font-size: clamp(3.5rem, 5.6vw, 5.1rem); line-height: 1.02; margin-block: 25px 20px; letter-spacing: -.06em; }
.hero-tagline { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.25rem, 1.8vw, 1.52rem); letter-spacing: -.02em; }
.hero-description { color: var(--muted); max-width: 450px; font-size: .95rem; margin-top: 18px; }
.hero-actions { display: flex; align-items: center; gap: 27px; margin-top: 28px; }
.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: space-between; gap: 26px; padding: 12px 22px; border-radius: 5px; font-size: .8rem; font-weight: 600; transition: background .18s, transform .18s; }
.button-primary { background: var(--green); color: white; }
.button-primary:hover { background: #2e5648; transform: translateY(-2px); }
.button-primary:active { transform: translateY(0) scale(.98); }
.text-link { display: inline-flex; align-items: center; gap: 20px; min-height: 44px; font-size: .8rem; font-weight: 650; }
.text-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.hero-location { margin-top: 30px; display: flex; gap: 7px; align-items: center; font-size: .72rem; color: var(--muted); }
.hero-location svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.perspective { border: 1px solid var(--line); background: #eef2e9; border-radius: 14px; overflow: hidden; box-shadow: 0 12px 40px #173e3505; }
.perspective-top { display: flex; align-items: center; justify-content: space-between; padding: 19px 24px; font-size: .58rem; letter-spacing: .16em; border-bottom: 1px solid var(--line); }
.perspective-art { width: 100%; height: auto; transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transition: transform .3s ease; }
.perspective.is-revealed .connection-trace { animation: trace-connection 1.4s ease-out both; }
@keyframes trace-connection { from { stroke-dasharray: 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1; stroke-dashoffset: 0; } }
.perspective-bottom { padding: 20px 25px 24px; display: flex; justify-content: space-between; align-items: end; border-top: 1px solid var(--line); }
.perspective-bottom p { font-size: 1.3rem; font-weight: 550; line-height: 1.4; letter-spacing: -.035em; }
.perspective-bottom p span { color: #587447; }
.focus-strip { background: var(--soft); border-block: 1px solid var(--line); }
.focus-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; max-width: 970px; font-size: .78rem; letter-spacing: .01em; }
.focus-inner > [aria-hidden] { color: #75826d; font-size: 1.1rem; }

/* 4. Work: a featured project and a smaller science study */
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 35px; margin-bottom: 40px; }
.section-heading > p { font-size: .88rem; color: var(--muted); }
.repository-link { gap: 9px; flex-shrink: 0; color: var(--muted); }
.social-icon { width: 18px; height: 18px; flex: 0 0 18px; fill: currentColor; }
.social-link-label { display: inline-flex; align-items: center; gap: 11px; }
.featured-project { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.project-art { position: relative; background: var(--green); color: #f4f6ec; min-height: 460px; overflow: hidden; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; }
.project-art-top, .project-art-bottom { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.project-art-top { font-size: .55rem; letter-spacing: .16em; color: #cad7c7; }
.project-art-bottom { font-size: .67rem; color: #cad7c7; }
.game-wordmark { font-size: clamp(3.5rem, 6.3vw, 6rem); line-height: .91; letter-spacing: -.075em; font-weight: 650; padding: 0 8px 20px; position: relative; z-index: 1; }
.game-wordmark > span { color: var(--lime); }
.game-motif { position: absolute; bottom: 53px; right: 25px; width: 145px; height: 170px; transform: rotate(12deg); opacity: .9; }
.paper { position: absolute; right: 0; top: 0; width: 98px; height: 132px; background: #dce9bd; border-radius: 4px; padding: 21px 16px; transform: rotate(-23deg); }
.paper i { display: block; margin-bottom: 9px; height: 3px; background: #6b8c56; width: 100%; }
.paper i:nth-child(2) { width: 75%; }
.paper-check { color: var(--green); width: 30px; height: 30px; margin: 9px 0 0; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pill { position: absolute; left: -4px; top: 77px; width: 36px; height: 80px; background: #7a9d69; border-radius: 24px; transform: rotate(10deg); z-index: 1; border: 1px solid #abc594; }
.pill::after { position: absolute; content: ""; top: 50%; left: 0; width: 100%; height: 1px; background: #bdd29c; }
.project-content { padding: 38px 40px; }
.project-content > .eyebrow { color: var(--muted); margin-bottom: 10px; font-size: .62rem; }
.project-content > h3 { font-size: 2.2rem; margin-bottom: 17px; }
.project-content > p:not(.eyebrow), .project-details { font-size: .85rem; color: var(--muted); line-height: 1.65; }
.project-details { margin: 23px 0; }
.project-details > div + div { margin-top: 13px; }
.project-details dt { color: var(--ink); font-size: .71rem; font-weight: 650; margin-bottom: 3px; }
.project-details dd { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.tags li { background: var(--soft); border: 1px solid #e0e6da; border-radius: 4px; font-size: .65rem; padding: 3px 9px; color: #46573f; }
.project-link { margin-top: 18px; border-bottom: 1px solid #829275; }
.science-project { margin-top: 24px; display: grid; grid-template-columns: 280px 1fr 20px; gap: 35px; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; padding: 25px; background: var(--surface); }
.observation-figure { width: 100%; max-width: 280px; margin: 0; }
.observation-window { position: relative; background: var(--green); border-radius: 6px; overflow: hidden; }
.observation-window img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.observation-figure figcaption { color: var(--muted); font-size: .59rem; margin-top: 10px; line-height: 1.6; text-align: center; }
.animation-toggle { position: absolute; right: 10px; bottom: 10px; min-height: 44px; padding: 8px 12px; border: 1px solid #a5b19c; border-radius: 5px; color: var(--ink); background: var(--background); display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: .68rem; font-weight: 600; }
.animation-toggle[hidden] { display: none; }
.animation-toggle:hover { background: var(--lime); }
.animation-toggle svg { width: 16px; height: 16px; flex: 0 0 16px; fill: currentColor; }
.animation-toggle .pause-icon, .animation-toggle.is-playing .play-icon { display: none; }
.animation-toggle.is-playing .pause-icon { display: block; }
.science-copy > .eyebrow { color: var(--muted); font-size: .61rem; margin-bottom: 8px; }
.science-copy > p:not(.eyebrow) { margin-top: 12px; max-width: 650px; color: var(--muted); font-size: .83rem; }
.science-copy > .observation-note { font-size: .75rem; }
.science-copy .tags { margin-top: 15px; }
.project-number { align-self: start; color: #76856f; font-family: monospace; font-size: .72rem; }
.upcoming-projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.coming-soon-card { display: flex; flex-direction: column; min-height: 245px; border: 1px dashed #bdcbb6; border-radius: 10px; background: var(--surface); overflow: hidden; }
.empty-project-space { flex: 1; min-height: 172px; }
.coming-soon-card p { padding: 19px 25px; border-top: 1px solid #edf0e8; color: var(--muted); font-size: .72rem; letter-spacing: .07em; }
.featured-project, .science-project { transition: border-color .25s ease, box-shadow .25s ease; }
.featured-project:focus-within { border-color: #829d65; box-shadow: 0 6px 24px #173e350a; }

/* 5. Background, skills and trajectory */
.about-section { background: var(--green); color: #f1f5e9; padding-block: 85px; }
.about-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.about-section .section-number { color: #b7c8ae; }
.about-layout h2 { line-height: 1.22; font-size: clamp(2rem, 3vw, 2.55rem); }
.about-copy p { color: #d0dccb; font-size: .9rem; }
.about-copy .lead { color: white; font-size: 1.25rem; letter-spacing: -.025em; margin-bottom: 20px; }
.about-copy > p + p { margin-top: 17px; }
.about-note { margin-top: 27px; padding-top: 22px; border-top: 1px solid #486152; }
.about-note p { color: var(--lime); font-size: .78rem; }
.skills-list { margin: 0; }
.skills-list > div { display: grid; grid-template-columns: 300px 1fr; align-items: baseline; gap: 24px; padding: 24px 0; border-top: 1px solid var(--line); }
.skills-list > div:last-child { border-bottom: 1px solid var(--line); }
.skills-list dt { font-size: .91rem; font-weight: 600; }
.skills-list dt span { color: #73816c; font-family: monospace; font-size: .65rem; font-weight: 400; margin-right: 30px; }
.skills-list dd { display: flex; flex-wrap: wrap; align-items: center; gap: 0; margin: 0; color: var(--muted); font-size: .85rem; }
.skills-list dd > span::before { content: "/"; color: #9ba692; padding: 0 17px; }
.journey-section { background: var(--soft); border-block: 1px solid var(--line); padding-block: 80px; }
.journey-layout { display: grid; grid-template-columns: .88fr 1.12fr; gap: 90px; }
.journey-intro > p:last-child { max-width: 300px; margin-top: 24px; color: var(--muted); font-size: .9rem; }
.timeline { list-style: none; margin: 2px 0 0; padding: 0 0 0 25px; }
.timeline > li { position: relative; border-left: 1px solid #b8c7ad; padding: 0 0 33px 32px; }
.timeline > li:last-child { padding-bottom: 0; border-color: transparent; }
.timeline > li::before { content: ""; position: absolute; top: 6px; left: -5px; width: 9px; height: 9px; background: #759057; border-radius: 50%; outline: 5px solid var(--soft); }
.timeline-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 18px; font-size: .62rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin-bottom: 10px; }
.timeline h3 { font-size: 1.06rem; letter-spacing: -.02em; }
.timeline p { font-size: .8rem; color: var(--muted); margin-top: 8px; }

/* 6. Contact and footer */
.contact-section { padding-block: 95px 90px; }
.contact-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 90px; }
.contact-layout h2 { font-size: clamp(2rem, 3.4vw, 2.85rem); }
.contact-layout > div > p { margin-top: 24px; color: var(--muted); font-size: .9rem; }
.contact-links { padding-top: 2px; }
.contact-links > a { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 59px; border-bottom: 1px solid var(--line); font-size: .85rem; transition: color .18s; }
.contact-links > a:hover { color: #5b762e; }
.contact-links > .email-link { padding-bottom: 21px; }
.contact-label { display: block; text-transform: uppercase; letter-spacing: .15em; font-size: .59rem; color: var(--muted); margin-bottom: 9px; }
.email-address { font-size: clamp(.9rem, 1.6vw, 1.13rem); letter-spacing: -.02em; overflow-wrap: anywhere; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: .66rem; color: var(--muted); }
.footer-inner a { display: inline-flex; gap: 20px; min-height: 44px; align-items: center; }
.footer-inner a:hover { text-decoration: underline; text-underline-offset: 4px; }
.back-top-icon { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Motion is opt-in through JavaScript; content starts fully visible. */
[data-reveal] { transition: opacity .55s ease, translate .55s cubic-bezier(.22,.61,.36,1), border-color .25s ease, box-shadow .25s ease; }
.reveal-pending { opacity: 0; translate: 0 14px; }
.reveal-pending:focus-within { opacity: 1; translate: 0; }
@media (hover: hover) and (pointer: fine) {
  .featured-project:hover, .science-project:hover { border-color: #a2b396; box-shadow: 0 7px 28px #173e3508; }
  .skills-list > div { transition: background .2s ease; }
  .skills-list > div:hover { background: #edf1e86b; }
  .contact-links > a { transition: color .2s ease, padding .2s ease; }
  .contact-links > a:hover { padding-left: 6px; }
}

/* 7. Small screens */
@media (min-width: 1440px) { .hero { padding-block: 90px; } }
@media (max-width: 1050px) {
  .container { width: calc(100% - 56px); }
  .navigation { gap: 18px; }
  .hero { gap: 35px; padding-block: 60px; }
  h1 { font-size: 4rem; }
  .perspective-bottom p { font-size: 1.15rem; }
  .project-content { padding: 30px; }
  .game-motif { right: 10px; transform: rotate(12deg) scale(.8); transform-origin: bottom right; }
  .about-layout, .journey-layout, .contact-layout { gap: 45px; }
  .skills-list > div { grid-template-columns: 240px 1fr; }
  .skills-list dt span { margin-right: 20px; }
}
@media (max-width: 960px) {
  .header-inner { min-height: 76px; flex-wrap: wrap; column-gap: 12px; row-gap: 0; }
  .header-controls { margin-left: auto; }
  .wordmark { font-size: .85rem; }
  .brand-mark { width: 36px; height: 36px; }
  .menu-toggle:not([hidden]) { display: inline-flex; align-items: center; }
  .navigation { order: 3; flex-basis: 100%; flex-wrap: wrap; gap: 3px 23px; padding: 4px 0 15px; margin-left: 0; }
  .navigation .nav-contact { border: 0; padding: 0; gap: 8px; }
  .navigation.is-collapsed { display: none; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 94px; }
  .container { width: calc(100% - 40px); }
  .hero { grid-template-columns: 1fr; gap: 45px; padding-block: 47px 50px; }
  .hero .eyebrow { font-size: .61rem; letter-spacing: .095em; }
  h1 { font-size: clamp(2.85rem, 13vw, 4.5rem); margin-top: 24px; }
  .hero-tagline { font-size: 1.3rem; }
  .hero-description { font-size: .92rem; }
  .hero-actions { margin-top: 26px; gap: 23px; }
  .hero-location { margin-top: 25px; }
  .perspective { max-width: 430px; width: 100%; margin-inline: auto; transform: none; }
  .perspective-art { max-height: 260px; }
  .perspective-top { padding: 14px 20px; }
  .perspective-bottom { padding: 17px 22px; }
  .perspective-bottom p { font-size: 1.2rem; }
  .focus-inner { min-height: 72px; gap: 12px; text-align: center; font-size: .62rem; line-height: 1.5; }
  .focus-inner > span:not([aria-hidden]) { max-width: 90px; }
  .section { padding-block: 65px; }
  .section-heading { align-items: start; flex-direction: column; gap: 18px; margin-bottom: 29px; }
  .section-heading > p { font-size: .85rem; }
  .desktop-break { display: none; }
  .featured-project { grid-template-columns: 1fr; }
  .project-art { min-height: 330px; padding: 24px; }
  .game-wordmark { font-size: 4rem; padding-left: 0; padding-bottom: 10px; }
  .game-motif { bottom: 46px; right: 18px; transform: rotate(12deg) scale(.62); }
  .project-content { padding: 27px 25px 29px; }
  .science-project { grid-template-columns: 1fr; gap: 23px; padding: 25px; position: relative; }
  .observation-figure { margin-inline: auto; }
  .project-number { display: none; }
  .upcoming-projects { grid-template-columns: 1fr; gap: 20px; }
  .coming-soon-card { min-height: 215px; }
  .empty-project-space { min-height: 145px; }
  .about-section, .journey-section { padding-block: 60px; }
  .about-layout, .journey-layout, .contact-layout { grid-template-columns: 1fr; gap: 32px; }
  .about-copy .lead { font-size: 1.13rem; }
  .skills-list > div { grid-template-columns: 1fr; gap: 12px; padding-block: 22px; }
  .skills-list dd { padding-left: 36px; font-size: .8rem; row-gap: 5px; }
  .skills-list dd > span::before { padding-inline: 12px; }
  .skills-list dt span { margin-right: 18px; }
  .journey-intro > p:last-child { max-width: 100%; margin-top: 20px; }
  .timeline { padding-left: 5px; margin-top: 6px; }
  .timeline > li { padding-left: 23px; }
  .timeline-meta { font-size: .58rem; }
  .contact-section { padding-block: 65px; }
  .contact-layout h2 { font-size: 2.1rem; }
  .contact-layout > div > p { margin-top: 20px; }
  .email-address { font-size: 1rem; }
  .footer-inner { padding-block: 23px; flex-wrap: wrap; gap: 9px 22px; }
}
@media (max-width: 360px) {
  .wordmark { font-size: .75rem; gap: 8px; }
  .brand-surname { display: none; }
  .brand-mark { width: 32px; height: 32px; }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 8px; }
  .hero-actions a { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal-pending { opacity: 1; translate: none; }
  .perspective-art { transform: none; }
}
@media print {
  .reveal-pending { opacity: 1; translate: none; }
  .site-header { position: static; }
}

/* Data-first introduction and dedicated domain experience */
.data-perspective { min-width: 0; padding: 28px; color: var(--lime); background: var(--green); border-radius: 14px; }
.data-perspective > .eyebrow { font-size: .65rem; }
.data-field { margin: 22px 0; }
.data-field svg { width: 100%; height: auto; }
.data-process { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding-top: 20px; border-top: 1px solid #547165; font-size: .52rem; letter-spacing: .09em; }
#skills { padding-bottom: 65px; }
#projects { padding-top: 65px; border-top: 1px solid var(--line); }
.domain-project-link { margin-top: 25px; }
.health-section { padding-block: 90px; background: var(--soft); }
.health-intro { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 70px; margin-bottom: 42px; }
.health-intro > div > p:not(.eyebrow) { color: var(--muted); font-size: .92rem; margin-top: 22px; max-width: 570px; }
.health-intro .perspective { max-width: 370px; justify-self: end; width: 100%; }
.health-intro .perspective-bottom p { font-size: 1.1rem; }
@media (max-width: 960px) { .health-intro { gap: 35px; } }
@media (max-width: 640px) {
 .health-intro { grid-template-columns: 1fr; }
 .health-intro .perspective { justify-self: start; max-width: 100%; }
 .health-section { padding-block: 60px; }
 .data-perspective { padding: 22px; }
 .domain-project-link { align-items: flex-start; }
}

/* Quiet, illustrative chart gallery; stable geometry during transitions. */
.chart-stage { position: relative; aspect-ratio: 440 / 280; margin: 22px 0 12px; isolation: isolate; }
.chart-slide { position: absolute; inset: 0; opacity: 0; transform: translateY(8px) scale(.985); transition: opacity .8s ease, transform 1.1s cubic-bezier(.22,1,.36,1); pointer-events: none; }
.chart-slide.is-active { opacity: 1; transform: none; }
.chart-slide svg { width: 100%; height: 100%; overflow: visible; }
.chart-caption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: #c1d2ac; font-size: .69rem; letter-spacing: .04em; }
.chart-counter { font-variant-numeric: tabular-nums; font-size: .57rem; opacity: .75; }
.chart-toolbar { display: flex; align-items: center; justify-content: space-between; margin: 4px -10px 5px; }
.chart-toolbar[hidden] { display: none; }
.chart-pagination { display: flex; }
.chart-dot, .chart-playback { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border: 0; background: transparent; color: var(--lime); cursor: pointer; border-radius: 5px; }
.chart-dot span { width: 5px; height: 5px; border-radius: 4px; background: currentColor; opacity: .35; transition: width .5s ease, opacity .5s ease; }
.chart-dot[aria-pressed="true"] span { width: 20px; opacity: 1; }
.chart-dot:hover span { opacity: 1; }
.chart-playback svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.4; fill: none; }
.chart-play-icon { display: none; }
.chart-playback.is-paused .chart-play-icon { display: block; }
.chart-playback.is-paused .chart-pause-icon { display: none; }
.data-perspective button:focus-visible { outline-color: var(--lime); outline-offset: -4px; }
.chart-slide.is-active .chart-bar { transform-origin: center 230px; animation: chart-rise 1.3s cubic-bezier(.22,1,.36,1) both; animation-delay: calc(var(--i) * 65ms); }
.chart-slide.is-active .chart-cell { animation: chart-cell-in 1.2s ease both; animation-delay: calc(var(--i) * 55ms); }
@keyframes chart-rise { from { transform: scaleY(.1); } to { transform: scaleY(1); } }
@keyframes chart-cell-in { from { transform: translateY(5px); filter: opacity(.1); } to { transform: none; filter: opacity(1); } }
@media (prefers-reduced-motion: reduce) { .chart-slide { transform: none; } }
@media print { .chart-toolbar { display: none; } .chart-slide { display: none; } .chart-slide.is-active { display: block; } }

.chart-playback[hidden] { display: none; }

/* English companion title preserves the original project name. */
.game-english-name { display: block; margin-top: 18px; font-size: .75rem; line-height: 1.4; font-weight: 400; letter-spacing: .08em; color: var(--lime); }
.project-english-name { display: block; margin-top: 8px; font-size: .75rem; line-height: 1.4; font-weight: 400; letter-spacing: .02em; color: var(--muted); }

/* Drag/swipe chart area; native vertical scrolling and pinch zoom remain available. */
.chart-stage { touch-action: pan-y pinch-zoom; cursor: grab; user-select: none; -webkit-user-select: none; }
.chart-stage.is-dragging { cursor: grabbing; }
.chart-slide.is-active { transform: translateX(var(--chart-drag, 0px)); }
.chart-stage.is-dragging .chart-slide.is-active { transition: opacity .8s ease; }
@media (prefers-reduced-motion: reduce) { .chart-slide.is-active { transform: none; } }
