@font-face { font-family: Inter; src: url('assets/inter.woff2') format('woff2'); font-style: normal; font-weight: 400 800; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url('assets/bricolage.woff2') format('woff2'); font-style: normal; font-weight: 500 800; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #f8f4eb;
  --ink: #152a2b;
  --green: #22675c;
  --gold: #f4bd57;
  --dark: #102728;
  --dark-text: #f9f2e4;
  --nav-height: 67px;
  --progress: 0%;
  font-family: Inter, 'Segoe UI', sans-serif;
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
body:has(dialog[open]) { overflow: hidden; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
button:not(:disabled) { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #a95410; outline-offset: 4px; }
.chapter-dark :focus-visible, .future-chapter :focus-visible { outline-color: var(--gold); }
.skip-link { position: fixed; z-index: 9; inset: .5rem auto auto .5rem; padding: .65rem 1rem; border-radius: .5rem; background: var(--gold); transform: translateY(-180%); }
.skip-link:focus { transform: none; }

.topbar { position: sticky; z-index: 5; top: 0; background: #f8f4ebf5; border-bottom: 1px solid #233e3526; backdrop-filter: blur(12px); }
.topbar::after { content: ''; position: absolute; height: 2px; bottom: -1px; left: 0; width: var(--progress); background: #338474; transition: width .32s ease; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: .9rem; min-height: var(--nav-height); width: min(94%, 1660px); margin-inline: auto; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-family: 'Bricolage Grotesque', Inter, sans-serif; font-weight: 800; font-size: 1.12rem; white-space: nowrap; }
.brand img { width: 37px; height: 37px; border-radius: 9px; object-fit: cover; }
.brand > span > span { color: #866004; }
.chapter-nav, .controls { display: flex; align-items: center; gap: .26rem; }
.chapter-link { padding: .5em .7em; border-radius: 999px; color: #3c504c; text-decoration: none; font-size: .86rem; font-weight: 670; white-space: nowrap; }
.chapter-link:hover, .chapter-link[aria-current] { color: #204439; background: #e1e8db; }
.controls { flex-shrink: 0; }
.controls button { display: grid; place-items: center; width: 37px; height: 36px; border: 1px solid #263e3a30; border-radius: .52rem; background: #fff9; font-size: 1.13rem; }
.controls button:hover:not(:disabled) { background: #eadfc8; }
.controls button:disabled { opacity: .35; }
#section-number { margin-right: .4rem; color: #445851; font: 700 .77rem/1 Inter, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.screen-icon { width: 15px; height: 15px; background: linear-gradient(currentColor,currentColor) left top / 5px 2px no-repeat, linear-gradient(currentColor,currentColor) left top / 2px 5px no-repeat, linear-gradient(currentColor,currentColor) right top / 5px 2px no-repeat, linear-gradient(currentColor,currentColor) right top / 2px 5px no-repeat, linear-gradient(currentColor,currentColor) left bottom / 5px 2px no-repeat, linear-gradient(currentColor,currentColor) left bottom / 2px 5px no-repeat, linear-gradient(currentColor,currentColor) right bottom / 5px 2px no-repeat, linear-gradient(currentColor,currentColor) right bottom / 2px 5px no-repeat; }

.chapter { position: relative; display: grid; align-items: center; min-height: calc(100svh - var(--nav-height) - 1px); scroll-margin-top: calc(var(--nav-height) + 1px); padding-block: clamp(2.5rem, 5vh, 5.25rem); isolation: isolate; }
.wrap { width: min(88%, 1500px); margin-inline: auto; }
.hero-grid, .split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: clamp(2rem, 6vw, 7.5rem); }
.eyebrow { display: flex; align-items: center; gap: .65rem; margin-bottom: .85rem; font-size: clamp(.79rem, 1.15vw, 1.07rem); line-height: 1.3; font-weight: 760; letter-spacing: .10em; text-transform: uppercase; color: var(--green); }
.eyebrow > span { width: .65rem; height: .65rem; flex: 0 0 auto; border-radius: 50%; background: #b86a20; }
h1, h2, h3 { font-family: 'Bricolage Grotesque', Inter, 'Segoe UI', sans-serif; font-optical-sizing: auto; font-weight: 800; }
h1 { font-size: clamp(3.7rem, min(8.25vw, 15vh), 10.4rem); letter-spacing: -.047em; word-spacing: .035em; line-height: .87; white-space: nowrap; }
h2 { font-size: clamp(3.3rem, min(7.15vw, 11vh), 8.15rem); letter-spacing: -.045em; word-spacing: .025em; line-height: .92; }
h3 { font-size: clamp(1.55rem, 2.65vw, 3rem); letter-spacing: -.025em; line-height: 1.05; }
em { color: var(--green); font-style: normal; }
h1 em > span { color: #a45c18; }
.lead { max-width: 32ch; margin-top: clamp(1.2rem, 3.1vh, 2.4rem); font-size: clamp(1.22rem, 2.2vw, 2.4rem); line-height: 1.4; letter-spacing: -.028em; }

.hero { background: radial-gradient(ellipse at 82% 44%, #eee0bf, transparent 57%), var(--paper); }
.hero-identity { margin-top: clamp(1.45rem, 4vh, 3.1rem); }
.hero-identity strong { display: block; font-size: clamp(1.4rem, 2.55vw, 2.95rem); letter-spacing: -.045em; line-height: 1.1; }
.hero-identity p { margin-top: .63rem; color: #425650; font-size: clamp(.97rem, 1.35vw, 1.45rem); line-height: 1.4; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; margin-top: clamp(1.24rem, 3.4vh, 2.65rem); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .85rem; width: max-content; max-width: 100%; padding: .78em 1.15em; border: 1px solid transparent; border-radius: .56rem; text-decoration: none; font-size: clamp(.93rem, 1.23vw, 1.29rem); font-weight: 750; transition: background .18s, transform .18s; }
.button:hover { transform: translateY(-2px); }
.button.primary { color: #fff6e4; background: #1a4c43; }
.button.primary:hover { background: #276757; }
.button.quiet { border-color: #233e3547; background: #fff5; }
.button.quiet:hover { background: #fffc; }
.hero-art { position: relative; justify-self: center; width: min(100%, 65vh, 660px); padding: .56rem; }
.hero-art::before { content: ''; position: absolute; inset: -.7rem -.65rem .65rem .65rem; z-index: -1; border: 1px solid #a8844680; border-radius: 43% 43% 14px 14px; }
.portrait { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 42% 42% 13px 13px; background: #103c3c; box-shadow: 0 1.5rem 3rem #3a37222b; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }

.chapter-dark { color: var(--dark-text); background: radial-gradient(ellipse at 88% 60%, #1d4844, transparent 68%), var(--dark); }
.chapter-dark .eyebrow, .chapter-dark em { color: var(--gold); }
.chapter-dark .eyebrow > span, .future-chapter .eyebrow > span { background: var(--gold); }
.chapter-dark .lead { color: #dce8de; }
.chapter-dark .lead strong { color: #fff7e8; }
.scene { position: relative; border-radius: 1rem; box-shadow: 0 1.1rem 2.5rem #112b2832; }
.scene img { width: 100%; aspect-ratio: 3 / 2; height: auto; object-fit: cover; border-radius: inherit; }
.interest-list, .future-goals { display: flex; flex-wrap: wrap; gap: .55rem; padding: 0; margin: clamp(1.12rem, 3vh, 2.25rem) 0 0; list-style: none; }
.interest-list li, .future-goals li { border: 1px solid #fff3c76b; border-radius: 999px; padding: .57em .81em; font-weight: 650; font-size: clamp(.84rem, 1.1vw, 1.23rem); }

.gallery-chapter { background: #edf0e5; }
.gallery-heading { margin-bottom: clamp(1rem, 2.5vh, 1.8rem); }
.gallery .project-tabs { display: flex; flex-wrap: wrap; gap: .46rem; margin-bottom: clamp(.95rem, 2.3vh, 1.65rem); }
.project-tabs button { border: 1px solid #2a524637; border-radius: 999px; padding: .5em 1em; font-size: clamp(.85rem, 1.22vw, 1.2rem); line-height: 1.3; font-weight: 730; background: #f9fbf5; }
.project-tabs button:hover { border-color: #397e6b; }
.project-tabs button[aria-selected='true'] { background: #1e5d51; color: #fffaf0; border-color: #1e5d51; }
.project-panel { display: grid; grid-template-columns: minmax(0, .67fr) minmax(0, 1.33fr); gap: clamp(1.4rem, 5vw, 5.5rem); align-items: center; }
.project-info h3 { font-size: clamp(2.4rem, 4.9vw, 5.2rem); }
.project-info > p:not(.project-type), .support-note p { margin-top: .6rem; max-width: 31ch; color: #344b44; font-size: clamp(1.1rem, 1.78vw, 1.95rem); line-height: 1.42; text-wrap: pretty; }
.project-type { margin-bottom: .42rem; color: #285f54; font-size: clamp(.81rem, 1.05vw, 1.04rem); font-weight: 750; }
.text-link { display: inline-flex; gap: .5em; align-items: center; margin-top: .92rem; color: #164d40; font-weight: 800; font-size: clamp(.94rem, 1.33vw, 1.35rem); text-underline-offset: .25em; }
.browser-card { width: min(100%, 47vw, calc(64vh * 16 / 9), 1050px); justify-self: start; overflow: hidden; border: 1px solid #244b4355; border-radius: .85rem; background: #162e2e; box-shadow: 0 1rem 2.5rem #23473a2d; }
.browser-top { display: flex; gap: .31rem; align-items: center; min-height: 32px; padding: .38rem .63rem; color: #e3eeea; font-size: clamp(.67rem, .95vw, .91rem); font-weight: 600; }
.browser-top i { width: .45rem; height: .45rem; border-radius: 50%; background: #f3af60; }
.browser-top i:nth-child(2) { background: #f8d78f; }
.browser-top i:nth-child(3) { background: #6aa48f; }
.browser-top span { margin-left: .4rem; }
.preview-open { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 0; background: #143c37; }
.preview-open:focus-visible { outline-offset: -5px; outline-color: #ffd887; }
.preview-open img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 35%; }
.zoom-label { position: absolute; inset: auto .55rem .55rem auto; display: inline-flex; align-items: center; gap: .32rem; padding: .48em .65em; border-radius: .36rem; background: #14272bf2; color: white; font-size: .81rem; font-weight: 700; }
.preview-open:hover .zoom-label { background: #f6c76d; color: #1b342e; }

.route-chapter { color: var(--ink); background: radial-gradient(ellipse at 85% 5%, #f0dfb5, transparent 55%), #f6ecd9; }
.route { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.9rem, 2vw, 2rem); list-style: none; padding: 0; margin: clamp(2rem, 6vh, 5.5rem) 0 0; }
.route::before { content: ''; z-index: -1; position: absolute; inset: 27px 1rem auto; border-top: 1px dashed #9e783b; }
.route li { padding: clamp(1rem, 2.3vw, 2.6rem); border: 1px solid #7b623b39; border-radius: 1rem; background: #fff8e9; }
.route li > span { display: grid; place-items: center; width: 2.45em; height: 2.45em; margin-bottom: .7rem; border-radius: 50%; color: #644218; background: #f3d495; font-weight: 800; font-variant-numeric: tabular-nums; }
.route p { margin-top: .65rem; color: #394a43; font-size: clamp(1.04rem, 1.65vw, 1.85rem); line-height: 1.42; text-wrap: pretty; }
.support-chapter { background: #ecede4; }
.support-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.support-note { margin-top: 1.3rem; border-left: 3px solid #50907b; padding-left: .95rem; }
.support-note h3 { font-size: clamp(1.28rem, 2.17vw, 2.1rem); }
.support-note p { margin-top: .32rem; }

.future-chapter { min-height: calc(100svh - var(--nav-height) - 1px); overflow: hidden; color: #fff4df; background: #182929; }
.future-art { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 63% 52%; }
.future-chapter::after { content: ''; z-index: -1; position: absolute; inset: 0; background: linear-gradient(90deg, #0c1b1bed 0%, #0c1b1bda 39%, #0c1b1b32 100%), linear-gradient(0deg, #10232296, transparent 48%); }
.future-chapter em, .future-chapter .eyebrow { color: #ffd380; }
.future-chapter h2 { font-size: clamp(3.7rem, min(10vw, 14vh), 10rem); }
.future-chapter .lead { max-width: 36ch; }
.button.inverse { margin-top: clamp(1.1rem, 3vh, 2rem); border-color: #ffedbd9c; background: #122a26bd; }
.button.inverse:hover { background: #325748; }

#preview { width: min(94vw, 1220px); max-height: 94svh; padding: 0; background: #102728; color: var(--dark-text); border: 1px solid #dbecdb56; border-radius: .85rem; box-shadow: 0 2rem 6rem #071311b8; }
#preview[open] { animation: dialog-in .24s ease both; }
#preview::backdrop { background: #0b1615d9; backdrop-filter: blur(6px); }
.dialog-bar, .dialog-bottom { display: flex; align-items: center; justify-content: space-between; gap: .65rem; padding: .55rem .95rem; }
#preview-title { font-size: clamp(1.35rem, 3.2vw, 2.25rem); letter-spacing: -.025em; line-height: 1.15; }
#preview button { flex-shrink: 0; width: 43px; height: 43px; border: 1px solid #f6eed98c; border-radius: .55rem; background: #fff1; color: #fff4df; }
#preview button:hover { background: #fff3; }
#preview-close { font-size: 1.65rem; }
#preview button:focus-visible { outline-color: var(--gold); }
#preview-image { width: 100%; height: min(68svh, 53vw, 690px); object-fit: contain; background: #0a1b1a; }
#preview-caption { line-height: 1.35; font-size: clamp(.84rem, 1.25vw, 1.14rem); }
#preview-navigation { display: flex; flex-shrink: 0; align-items: center; gap: .55rem; }
#preview-navigation button { width: 34px; height: 34px; }
#preview-count { font-size: .83rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

.chapter.is-visible .reveal { animation: chapter-in .56s cubic-bezier(.22,.73,.24,1) both; }
.chapter.is-visible .reveal + .reveal { animation-delay: .09s; }
.gallery .project-panel:not([hidden]) { animation: panel-in .24s ease both; }
@keyframes chapter-in { from { opacity: .4; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes panel-in { from { opacity: .68; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dialog-in { from { opacity: .65; transform: scale(.98); } to { opacity: 1; transform: scale(1); } }

@media (min-width: 741px) and (max-height: 820px) {
  .gallery-chapter { padding-block: 1.65rem; }
  .gallery-chapter h2 { font-size: clamp(3rem, 9.1vh, 5.75rem); }
  .browser-card { width: min(100%, 47vw, calc((100svh - 269px) * 16 / 9)); }
}

@media (max-width: 990px) {
  .topbar-inner { gap: .52rem; }
  .brand > span { display: none; }
  .chapter-link { padding-inline: .51em; }
  .hero-grid, .split { gap: 2rem; }
}

@media (max-width: 740px) {
  :root { --nav-height: 57px; }
  .topbar-inner { width: 96%; gap: .35rem; }
  .brand img { width: 31px; height: 31px; }
  .chapter-nav { overflow-x: auto; scrollbar-width: thin; }
  .chapter-link { font-size: .75rem; }
  .controls button { width: 29px; height: 33px; }
  #section-number { display: none; }
  .chapter { padding-block: 2.5rem; }
  .wrap { width: 89%; }
  .hero-grid, .split, .project-panel, .route { grid-template-columns: minmax(0, 1fr); gap: 1.45rem; }
  h1 { font-size: clamp(2.6rem, 14.2vw, 6.3rem); }
  h2 { font-size: clamp(3rem, 12vw, 5.3rem); }
  .hero-art { width: min(83%, 420px); justify-self: start; }
  .browser-card { width: 100%; }
  .scene { max-width: 595px; }
  .support-grid .scene { order: 1; }
  .route::before { display: none; }
  .route { margin-top: 1.65rem; }
  .route li { padding: 1.15rem; }
  .future-chapter::after { background: linear-gradient(90deg, #0c1b1bec, #0c1b1ba0 100%); }
  #preview-image { height: min(63svh, 86vw); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
