/* The portfolio is the primary experience; the existing 3D world is opt-in. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 105px; }
body.portfolio-mode { height: auto; min-height: 100svh; overflow-x: clip; overflow-y: auto; overscroll-behavior: auto; }
body.portfolio-mode > :is(.topbar, #world, #boostEffect, .hero, .world-coordinate, .scene-hint, .speedo, .map-widget, .proximity-prompt, .mobile-controls, .load-error, .world-home, .world-tip, .world-reward) { display: none; }
body.portfolio-mode .classic-site { position: relative; inset: auto; overflow: visible; min-height: 100svh; }
body.lightbox-open { overflow: hidden; }
.classic-site { --accent: #b9a4ff; --line: rgba(211, 208, 233, .15); background: #0d0d16; color: #f3f1fa; }
.skip-link { position: fixed; z-index: 80; top: -80px; left: 18px; padding: 12px 18px; border-radius: 8px; background: #d9ccff; color: #161021; }
.skip-link:focus { top: 12px; }
.portfolio-header { position: sticky; z-index: 20; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 88px; padding: 15px max(32px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid var(--line); background: rgba(13, 13, 22, .95); backdrop-filter: blur(18px); }
.portfolio-brand { display: flex; align-items: center; gap: 13px; flex-shrink: 0; font: 600 13px/1.45 var(--sans); text-decoration: none; }
.portfolio-brand small { display: block; margin-top: 2px; color: #a3a1b4; font-size: 11px; font-weight: 400; }
.brand-monogram { display: grid; place-content: center; position: relative; width: 43px; height: 43px; border: 1px solid #716584; border-radius: 12px; color: #f5edff; font: 800 15px var(--display); letter-spacing: -.06em; }
.brand-monogram > span { position: absolute; right: 4px; bottom: 3px; color: #c1abff; }
.portfolio-nav { display: flex; align-items: center; gap: 23px; }
.portfolio-nav a { display: flex; align-items: center; min-height: 44px; color: #b8b4c8; font-size: 13px; text-decoration: none; transition: color .2s; }
.portfolio-nav a:hover, .portfolio-nav a[aria-current] { color: #fff; }
.portfolio-nav a[aria-current] { text-decoration: underline; text-underline-offset: 7px; text-decoration-color: #b9a4ff; }
.portfolio-nav button, .portfolio-menu { min-height: 44px; padding: 10px 15px; border: 1px solid #51475f; border-radius: 7px; background: transparent; color: #d8c9f4; font-size: 12px; cursor: pointer; }
.portfolio-nav button:hover { border-color: #b9a4ff; background: #b9a4ff0d; }
.portfolio-nav button span { margin-left: 12px; }
.portfolio-menu { display: none; }
.portfolio-hero, .classic-section, .portfolio-status { width: min(1180px, calc(100% - 80px)); margin-inline: auto; }
.portfolio-hero { display: grid; grid-template-columns: 1.06fr 1fr; align-items: center; gap: 60px; padding-block: clamp(52px, 7vw, 100px) 80px; }
.portfolio-kicker { display: flex; align-items: center; gap: 9px; margin: 0 0 25px; color: #b7b2c7; font: 11px/1.7 var(--mono); }
.portfolio-kicker > span { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #b9a4ff; }
.portfolio-intro h1 { margin: 0; color: #f5f1fc; font: 700 clamp(46px, 5.65vw, 78px)/1.04 var(--display); letter-spacing: -.065em; }
.portfolio-intro h1 span { color: #b9a4ff; }
.portfolio-summary { max-width: 470px; margin: 25px 0 28px; color: #b8b4c7; font-size: 16px; line-height: 1.85; }
.portfolio-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.primary-link, .text-link { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; gap: 22px; font-size: 13px; text-decoration: none; }
.primary-link { padding: 13px 21px; border: 1px solid #c5b0ff; border-radius: 7px; background: #c5b0ff; color: #20142e; font-weight: 700; transition: background .2s; }
.primary-link:hover { background: #d9ccff; }
.text-link { color: #d7cfe8; border-bottom: 1px solid #554965; }
.portfolio-facts { display: flex; flex-wrap: wrap; gap: 8px 17px; margin-top: 35px; color: #918aa5; font: 10px/1.7 var(--mono); }
.portfolio-facts span + span::before { content: '/'; margin-right: 17px; color: #665976; }
.latest-project { min-width: 0; display: block; overflow: hidden; border: 1px solid #444051; border-radius: 12px; background: #191622; color: inherit; text-decoration: none; transition: border-color .2s, transform .2s; }
.latest-project:hover { border-color: #b9a4ff; transform: translateY(-4px); }
.latest-project-top { display: flex; justify-content: space-between; gap: 15px; padding: 17px 20px; color: #b8afcd; font: 10px/1.5 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.latest-project > img { display: block; width: 100%; height: auto; aspect-ratio: 800 / 534; object-fit: contain; background: #0e111c; }
.latest-project-bottom { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 22px; }
.latest-project-bottom div > span { color: #a59bb8; font: 9px/1.7 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.latest-project-bottom h2 { margin: 7px 0 5px; color: #eee8fc; font: 600 27px var(--display); letter-spacing: -.04em; }
.latest-project-bottom p { margin: 0; color: #b3a9c4; font-size: 12px; line-height: 1.7; }
.portfolio-status { margin-bottom: 25px; padding: 16px; border: 1px solid #6c5a89; border-radius: 8px; background: #22182f; color: #e1d4f9; }
.classic-section { padding: 74px 0; border-top: 1px solid var(--line); border-bottom: 0; scroll-margin-top: 12px; }
:is(.classic-section, .view-inner) .section-heading { padding-bottom: 25px; margin-bottom: 28px; }
:is(.classic-section, .view-inner) .section-heading::after { height: 1px; background: var(--line); }
:is(.classic-section, .view-inner) .section-heading h2 { font: 600 clamp(34px, 4.6vw, 58px)/1.06 var(--display); letter-spacing: -.055em; background: none; color: #f3effc; }
:is(.classic-section, .view-inner) .section-heading .eyebrow { font-size: 10px; text-shadow: none; margin-bottom: 14px; }
:is(.classic-section, .view-inner) .section-meta { font-size: 10px; line-height: 1.8; }
:is(.classic-section, .view-inner) .lead { max-width: 780px; font-size: 15px; line-height: 1.85; color: #bdb7cd; }
:is(.classic-section, .view-inner) .tag { font-size: 10px; line-height: 1.8; }
:is(.classic-section, .view-inner) :is(.timeline-row p, .project-card p, .skill-card p, .principle-grid p, .education-card p:not(.tag), .coursework p:last-child, .note-card p:last-child) { font-size: 14px; line-height: 1.8; color: #b7b1c8; }
:is(.classic-section, .view-inner) .timeline-row { padding-block: 24px; }
:is(.classic-section, .view-inner) .timeline-row time { font-size: 11px; line-height: 1.8; }
:is(.classic-section, .view-inner) .timeline-row h3 { margin-bottom: 8px; font-size: 20px; }
:is(.classic-section, .view-inner) .subheading { margin-top: 40px; font-size: 27px; font-weight: 600; }
:is(.classic-section, .view-inner) .button-link { min-height: 44px; align-items: center; padding: 11px 16px; border-radius: 6px; font-size: 10px; line-height: 1.5; }
:is(.classic-section, .view-inner) .featured-copy > p:not(.tag), :is(.classic-section, .view-inner) .role-note { font-size: 14px; line-height: 1.85; }
:is(.classic-section, .view-inner) .featured-copy h3 { font-size: clamp(30px, 3.6vw, 47px); line-height: 1.1; }
:is(.classic-section, .view-inner) .featured-media img { animation: none; }
:is(.classic-section, .view-inner) .process-strip article { padding: 20px; }
:is(.classic-section, .view-inner) .process-strip h4 { font-size: 18px; line-height: 1.4; }
:is(.classic-section, .view-inner) .process-strip p { font-size: 13px; line-height: 1.8; }
:is(.classic-section, .view-inner) :is(.process-strip span, .principle-grid span) { font-size: 10px; line-height: 1.8; }
:is(.classic-section, .view-inner) :is(.project-gallery figcaption, .sketch-gallery figcaption) { font-size: 12px; line-height: 1.7; }
:is(.classic-section, .view-inner) .project-gallery figure:nth-child(n + 3) { display: block; }
:is(.classic-section, .view-inner) .contrib-list span { font-size: 14px; }
:is(.classic-section, .view-inner) .contrib-list b { font-size: 10px; }
:is(.classic-section, .view-inner) .project-card { padding: 25px; }
:is(.classic-section, .view-inner) .project-card h4 { font-size: 24px; line-height: 1.25; }
:is(.classic-section, .view-inner) .metric { font-size: 18px; line-height: 1.5; }
:is(.classic-section, .view-inner) .skill-card { padding: 26px; }
:is(.classic-section, .view-inner) .skill-card h3 { font-size: 23px; line-height: 1.3; }
:is(.classic-section, .view-inner) .method-list span, :is(.classic-section, .view-inner) .pair-list span { font-size: 10px; line-height: 1.7; }
:is(.classic-section, .view-inner) .learn-list li { font-size: 14px; line-height: 1.8; }
:is(.classic-section, .view-inner) .learn-sub { font-size: 10px !important; line-height: 1.8 !important; }
:is(.classic-section, .view-inner) .education-stats span { font-size: 10px; }
:is(.classic-section, .view-inner) .education-stats strong { font-size: 27px; }
:is(.classic-section, .view-inner) .education-stats div + div strong { font-size: 14px; line-height: 1.6; }
:is(.classic-section, .view-inner) .section-footer { font-size: 9px; line-height: 1.8; }
:is(.classic-section, .view-inner) .contact-intro { font-size: 16px; line-height: 1.8; }
:is(.classic-section, .view-inner) .contact-links p { font-size: 10px; line-height: 1.8; }
.lightbox-close { min-height: 44px; min-width: 80px; font-size: 11px; }
.classic-footer { display: flex; align-items: center; justify-content: space-between; gap: 25px; width: min(1180px, calc(100% - 80px)); margin-inline: auto; padding: 28px 0 40px; border-top: 1px solid var(--line); color: #a49bb9; font: 11px/1.8 var(--sans); text-transform: none; }
.classic-footer a { text-decoration: none; }
.classic-footer a:first-child { color: #dfd5f0; font-weight: 600; }
.classic-footer a span { display: block; color: #8e849f; font-size: 10px; font-weight: 400; }
.classic-footer p { margin: 0; }
.content-loading, .noscript-message { width: min(1180px, calc(100% - 40px)); margin: 30px auto; color: #b9aedc; }

/* Project evidence stays readable in the page and the optional world overlay. */
.project-jump { display: flex; flex-wrap: wrap; gap: 10px; margin: 32px 0; padding: 0; list-style: none; }
.project-jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border: 1px solid #4d415e; border-radius: 6px; color: #d7cbe7; font-size: 12px; text-decoration: none; }
.project-jump a:hover { border-color: #c1a5ed; }
[data-project-id] { scroll-margin-top: 12px; }
.content-view [data-project-id] { scroll-margin-top: calc(var(--header-height) + 16px); }
.case-study { --accent: #77cfc9; padding: 32px; border: 1px solid #3a3e49; border-radius: 14px; background: linear-gradient(140deg, #19212b, #13111f 75%); scroll-margin-top: 12px; }
.case-head { display: grid; grid-template-columns: 1fr .95fr; align-items: center; gap: 36px; }
.case-label { display: flex; flex-wrap: wrap; gap: 8px 15px; align-items: center; color: #85d5d2; font: 10px/1.8 var(--mono); text-transform: uppercase; letter-spacing: .07em; }
.project-state { padding: 2px 7px; border: 1px solid #50736e; border-radius: 4px; color: #abe0d4; font-size: 9px; }
.case-head h3 { margin: 18px 0 13px; color: #f2f6fa; font: 600 clamp(36px, 4.4vw, 56px)/1.02 var(--display); letter-spacing: -.055em; }
.case-subtitle { margin: 0 0 17px; color: #d7e9e9; font: 500 20px/1.45 var(--display); }
.case-description { margin: 0 0 22px; color: #b7c2cd; font-size: 14px; line-height: 1.85; }
.case-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 22px; }
.case-meta span { padding: 4px 8px; border: 1px solid #3f4859; border-radius: 4px; color: #adb6ca; font: 9px/1.7 var(--mono); }
.case-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 17px; }
.case-links a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 8px; border-bottom: 1px solid #5e898b; color: #a1e4df; font: 12px/1.5 var(--sans); text-decoration: none; }
.case-links a:hover { color: #efffff; }
.case-media { margin: 0; min-width: 0; }
.case-media video { display: block; width: 100%; height: auto; aspect-ratio: 16/10; border: 1px solid #3c465a; border-radius: 8px; background: #0d1020; object-fit: contain; }
.case-media figcaption { margin-top: 12px; color: #9cabc0; font-size: 12px; line-height: 1.7; }
.case-role { display: grid; grid-template-columns: 130px 1fr; gap: 12px; margin: 25px 0 0; padding: 16px 18px; border-left: 2px solid #77cfc9; border-radius: 0 7px 7px 0; background: #77cfc909; color: #bdcbd9; font-size: 14px; line-height: 1.8; }
.case-role b { color: #a3e0dc; font: 10px/1.8 var(--mono); text-transform: uppercase; letter-spacing: .06em; padding-top: 4px; }
.case-team { margin: 25px 0 0; padding-top: 20px; border-top: 1px solid #ffffff15; color: #9ba5b9; font-size: 11px; line-height: 1.9; }
.case-team b { color: #cbd4e0; font-weight: 500; }
.case-process { margin-top: 24px; border-top: 1px solid #ffffff20; }
.case-process > summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0 0; color: #d7e8ee; font: 500 16px/1.6 var(--display); cursor: pointer; list-style: none; }
.case-process > summary::-webkit-details-marker { display: none; }
.case-process > summary::after { content: '+'; font: 400 26px var(--sans); color: #85d5d2; }
.case-process[open] > summary::after { content: '−'; }
.case-process > summary:focus-visible, summary:focus-visible { outline: 2px solid #b9a4ff; outline-offset: 5px; border-radius: 3px; }
.case-process-body { padding-top: 25px; }
.case-process-body > p { color: #b1bdcf; font-size: 14px; line-height: 1.85; }
.case-process-body h4 { margin: 32px 0 14px; color: #e1e7f4; font: 600 23px/1.3 var(--display); letter-spacing: -.03em; }
.case-process-body h5 { margin: 8px 0; color: #e0edf2; font: 600 16px/1.5 var(--display); }
.case-process-body .process-strip { margin: 20px 0; }
.case-process-body .process-strip article { min-height: 0; border-radius: 8px; padding: 17px; background: #ffffff04; }
.case-process-body .process-strip span { font: 10px/1.8 var(--mono); color: #83d2cf; }
.case-process-body .process-strip p { font-size: 13px; line-height: 1.8; color: #a8b6cc; }
.case-study .process-strip h4 { margin: 9px 0 7px; color: #e0edf2; font: 600 16px/1.45 var(--display); }
.case-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.case-gallery figure { margin: 0; min-width: 0; }
.case-gallery .zoomable { padding: 0; aspect-ratio: 1.6; overflow: hidden; border: 1px solid #3c465a; border-radius: 6px; background: #0d1020; transform: none; box-shadow: none; }
.case-gallery .zoomable img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: normal; }
.case-gallery figcaption { margin-top: 10px; color: #9eabc1; font-size: 12px; line-height: 1.75; }
.case-gallery--sketch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.case-gallery--sketch .zoomable { background: #f6f2ea; padding: 12px; }
.decision-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.decision-grid article { padding: 20px; border: 1px solid #ffffff15; border-radius: 8px; background: #ffffff03; }
.decision-grid p { margin: 8px 0 0; color: #acbad0; font-size: 13px; line-height: 1.85; }
.decision-grid span { color: #83d2cf; font: 10px/1.7 var(--mono); text-transform: uppercase; }
.case-takeaway { margin: 25px 0 15px; padding: 19px 22px; border-left: 2px solid #76cec8; border-radius: 0 7px 7px 0; background: #77cfc90a; color: #d1e4e8; font-size: 15px; line-height: 1.8; }
.case-limits { margin-top: 20px; color: #97a4bb; font-size: 12px; line-height: 1.85; }
.project-divider { margin: 72px 0 30px; padding-top: 30px; border-top: 1px solid var(--line); color: #bbadd0; font: 10px/1.8 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.classic-section .project-jump { position: sticky; z-index: 5; top: 88px; margin-inline: -12px; padding: 10px 12px; background: rgba(13, 13, 22, .92); backdrop-filter: blur(14px); }
.project-jump a[aria-current] { border-color: #c1a5ed; background: #b9a4ff14; color: #fff; }

/* Story: each design step sits beside the screenshots that show it. */
.story { --story-accent: var(--accent-soft); display: grid; gap: clamp(48px, 6vw, 80px); margin: 48px 0 40px; padding: 0; list-style: none; }
.case-study .story { --story-accent: #85d5d2; }
.story-step { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); align-items: center; gap: clamp(28px, 4vw, 56px); }
.story-step:nth-child(even) .story-copy { order: 2; }
.story-copy > span { display: inline-block; padding-bottom: 6px; border-bottom: 1px solid color-mix(in srgb, var(--story-accent) 50%, transparent); color: var(--story-accent); font: 10px/1.8 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.story-copy h4 { margin: 16px 0 12px; color: #f0eef8; font: 600 clamp(22px, 2.4vw, 28px)/1.25 var(--display); letter-spacing: -.035em; }
.story-copy p { margin: 0 0 12px; color: #b5b3c6; font-size: 14px; line-height: 1.85; }
.story-media { display: grid; gap: 16px; min-width: 0; }
.story-media--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.story-media--stack .story-figure--narrow { width: 62%; justify-self: end; }
.story-media figure { margin: 0; min-width: 0; }
.story-media .zoomable { padding: 0; overflow: hidden; border: 1px solid #3c4152; border-radius: 10px; background: #0d1020; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); transform: none; transition: border-color .25s, transform .25s; }
.story-media .zoomable:hover { border-color: var(--story-accent); transform: translateY(-3px); }
.story-media .zoomable img { display: block; width: 100%; height: auto; }
.story-media .zoomable--paper { padding: 12px; background: #f6f2ea; }
.story-media figcaption { margin-top: 10px; color: #9ea4b8; font-size: 12px; line-height: 1.7; }
.case-process-body .decision-grid { margin-top: 0; }

@media (max-width: 1080px) {
  .portfolio-header { gap: 18px; padding-inline: 30px; }
  .portfolio-brand { font-size: 12px; gap: 10px; }
  .portfolio-brand small { font-size: 10px; }
  .portfolio-nav { gap: 15px; }
  .portfolio-nav a { font-size: 12px; }
  .portfolio-nav button { padding: 10px; font-size: 11px; }
  .portfolio-hero { gap: 30px; }
  .portfolio-summary { font-size: 15px; }
  .case-head { gap: 25px; }
  .case-study { padding: 26px; }
}
@media (max-width: 850px) {
  .portfolio-header { min-height: 76px; padding-inline: 24px; }
  .portfolio-menu { display: flex; align-items: center; gap: 15px; }
  .portfolio-menu span { font-size: 18px; line-height: 1; }
  .portfolio-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 12px 24px 24px; border-bottom: 1px solid #443b54; background: #12101d; box-shadow: 0 18px 25px #0005; }
  .portfolio-nav.open { display: flex; }
  .portfolio-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  .portfolio-nav button { align-self: flex-start; margin-top: 16px; font-size: 13px; }
  .portfolio-hero, .classic-section, .portfolio-status, .classic-footer { width: calc(100% - 48px); }
  .portfolio-hero { grid-template-columns: 1fr; gap: 38px; padding-block: 48px; }
  .portfolio-intro { max-width: 650px; }
  .portfolio-intro h1 { font-size: clamp(50px, 9.5vw, 76px); }
  .portfolio-summary { max-width: 560px; font-size: 16px; }
  .latest-project { max-width: 650px; }
  .classic-section { padding-block: 55px; }
  .case-head { grid-template-columns: 1fr; gap: 26px; }
  .case-head h3 { font-size: 46px; }
  .case-description { max-width: 620px; }
  .case-gallery { grid-template-columns: 1fr 1fr; }
  .case-gallery figure:last-child:nth-child(odd) { grid-column: 1 / -1; max-width: 70%; }
  .classic-footer { flex-wrap: wrap; }
  .classic-section .project-jump { top: 76px; }
  .story-step { grid-template-columns: 1fr; gap: 20px; }
  .story-step:nth-child(even) .story-copy { order: 0; }
  .story-copy { max-width: 640px; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 90px; }
  .portfolio-header { min-height: 72px; padding: 12px 18px; gap: 12px; }
  .portfolio-brand { font-size: 11px; }
  .portfolio-brand small { font-size: 9px; }
  .brand-monogram { width: 35px; height: 35px; font-size: 19px; border-radius: 9px; }
  .portfolio-menu { padding: 8px 11px; font-size: 12px; gap: 10px; }
  .portfolio-nav { padding-inline: 18px; }
  .portfolio-hero, .classic-section, .portfolio-status, .classic-footer { width: calc(100% - 36px); }
  .portfolio-hero { gap: 32px; padding-block: 35px 42px; }
  .portfolio-kicker { margin-bottom: 20px; font-size: 10px; }
  .portfolio-intro h1 { font-size: clamp(41px, 11vw, 65px); letter-spacing: -.06em; }
  .portfolio-summary { margin-top: 20px; font-size: 15px; line-height: 1.8; }
  .portfolio-actions { gap: 12px 17px; }
  .primary-link, .text-link { font-size: 12px; gap: 15px; }
  .primary-link { padding-inline: 15px; }
  .portfolio-facts { margin-top: 23px; gap: 5px 12px; font-size: 9px; }
  .portfolio-facts span + span::before { margin-right: 12px; }
  .latest-project-top { padding: 13px 15px; font-size: 9px; }
  .latest-project-bottom { padding: 18px 15px; }
  .latest-project-bottom div > span { font-size: 8px; }
  .latest-project-bottom h2 { font-size: 26px; }
  .latest-project-bottom p { font-size: 11px; }
  .classic-section { padding-block: 40px; scroll-margin-top: 12px; }
  :is(.classic-section, .view-inner) .section-heading h2 { font-size: 37px; }
  :is(.classic-section, .view-inner) .section-heading .eyebrow { margin-bottom: 10px; }
  :is(.classic-section, .view-inner) .lead { font-size: 14px; }
  :is(.classic-section, .view-inner) .timeline-row { margin-inline: 0; padding: 20px 0; }
  :is(.classic-section, .view-inner) .timeline-row:hover { transform: none; }
  :is(.classic-section, .view-inner) .reflection { margin-inline: 0; font-size: 18px; }
  :is(.classic-section, .view-inner) :is(.skill-card, .project-card, .education-card) { padding: 20px; }
  :is(.classic-section, .view-inner) .philosophy { margin-inline: 0; font-size: 27px; }
  :is(.classic-section, .view-inner) .principle-grid { grid-template-columns: 1fr; }
  :is(.classic-section, .view-inner) .project-gallery img { aspect-ratio: auto; }
  :is(.classic-section, .view-inner) .contact-email { font-size: clamp(24px, 6.9vw, 38px); line-height: 1.2; letter-spacing: -.04em; }
  :is(.classic-section, .view-inner) .contact-intro { font-size: 14px; }
  .classic-footer { flex-direction: column; align-items: flex-start; gap: 15px; padding-bottom: max(28px, env(safe-area-inset-bottom)); }
  .project-jump { gap: 7px; margin-block: 23px; }
  .content-view .project-jump { position: static; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .classic-section .project-jump { top: 72px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .project-jump a { flex: 0 0 auto; }
  .story { gap: 44px; margin-top: 32px; }
  .story-media--pair { grid-template-columns: 1fr; }
  .story-media--stack .story-figure--narrow { width: 100%; }
  .project-jump a { font-size: 11px; padding-inline: 12px; }
  .case-study { padding: 20px 16px; border-radius: 10px; scroll-margin-top: 12px; }
  .case-label { font-size: 9px; }
  .case-head h3 { margin-top: 15px; font-size: 40px; }
  .case-subtitle { font-size: 19px; }
  .case-description { font-size: 14px; }
  .case-meta span { font-size: 8px; }
  .case-role { grid-template-columns: 1fr; gap: 5px; padding: 14px; }
  .case-team { font-size: 11px; }
  .case-process > summary { font-size: 14px; }
  .case-process-body h4 { font-size: 22px; }
  .case-gallery, .case-gallery--sketch, .decision-grid { grid-template-columns: 1fr; }
  .case-gallery figure:last-child:nth-child(odd) { grid-column: auto; max-width: none; }
  .case-process-body .process-strip { grid-template-columns: 1fr; }
  .case-takeaway { padding: 15px; font-size: 14px; }
  .project-divider { margin-top: 40px; }
}
@media (hover: none) {
  .classic-site :is(.project-card, .skill-card, .principle-grid article, .project-gallery figure, .process-strip article, .contrib-list li):hover { transform: none; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .latest-project:hover { transform: none; }
}

/* ===================================================================
   v3: 3D home screen, consistent media, case-study components.
   =================================================================== */

/* Boot: a deep link opens the non-3D view before the scripts run. */
body.portfolio-mode .intro { display: none; }
body.portfolio-mode .classic-site { display: block; }

/* ---------- Media: every image keeps its own aspect ratio ---------- */
.story-media .zoomable,
.story-media .zoomable:hover,
.story-media .zoomable:focus-visible { aspect-ratio: auto; display: block; padding: 0; transform: none; }
.story-media .zoomable:hover { transform: translateY(-3px); }
.story-media .zoomable img { width: 100%; height: auto; mix-blend-mode: normal; }
.story-media .zoomable--paper { padding: clamp(10px, 1.6vw, 18px); background: #f6f2ea; }
.story-media .zoomable--paper img { mix-blend-mode: multiply; }
.story-media figcaption b { color: var(--story-accent); font-weight: 600; }
.story-media--stack { align-content: start; }
.story-media--pair { align-items: start; }
.lightbox img { padding: 0; background: #0d1020; }
.lightbox.is-paper img { padding: 18px; background: #f6f2ea; }
.case-media video { aspect-ratio: auto; max-height: 70vh; }

/* ---------- Case studies: one structure, two accents ---------- */
.case-study { --case: #77cfc9; --case-soft: #a3e0dc; }
.case-study + .case-study { margin-top: clamp(40px, 6vw, 72px); }
.case-study--harmony { --case: #ee6aa7; --case-soft: #f7a8cb; background: linear-gradient(140deg, #2a1830, #13111f 75%); border-color: #4a3448; }
.case-study--harmony .story { --story-accent: #f7a8cb; }
.case-study--harmony .case-label { color: var(--case-soft); }
.case-study--harmony .project-state { border-color: #7a4a63; color: #f6c4da; }
.case-study--harmony .case-links a { border-color: #8d5c74; color: #f7b9d4; }
.case-study--harmony .case-takeaway { border-color: var(--case); background: #ee6aa70d; color: #f1dbe6; }
.case-study--harmony .case-process > summary::after { color: var(--case-soft); }
.case-study--toast { --case: #e8b04a; --case-soft: #f3cf86; background: linear-gradient(140deg, #2b2214, #13111f 75%); border-color: #4d4130; }
.case-study--toast .story { --story-accent: #f3cf86; }
.case-study--toast .case-label { color: var(--case-soft); }
.case-study--toast .project-state { border-color: #7a6440; color: #f6dfae; }
.case-study--toast .case-links a { border-color: #8d7450; color: #f5d699; }
.case-study--toast .case-takeaway { border-color: var(--case); background: #e8b04a0d; color: #f1e6d2; }
.case-study--toast .case-process > summary::after { color: var(--case-soft); }
.case-head h3 { margin-top: 14px; }
.case-description b, .lead b { color: #fff; font-weight: 600; }

.project-jump a span { margin-right: 8px; color: #c1a5ed; font: 11px var(--mono); }

.contrib-block { margin: 28px 0 0; padding: 22px; border: 1px solid color-mix(in srgb, var(--case) 35%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--case) 6%, transparent); }
.contrib-block h4 { margin: 0 0 14px; color: var(--case-soft); font: 500 11px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.contrib-block .contrib-list { margin: 0; gap: 10px; counter-reset: none; }
.contrib-block .contrib-list li { grid-template-columns: 150px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 16px; background: rgba(10, 8, 20, .45); }
.contrib-block .contrib-list li:hover { transform: none; border-color: color-mix(in srgb, var(--case) 60%, transparent); }
.contrib-block .contrib-list b { color: var(--case-soft); font-size: 10px; }
.contrib-block .contrib-list span { color: #ddd7ea; font-size: 14px; line-height: 1.7; }
.contrib-block .contrib-list strong { color: #fff; font-weight: 600; }
.contrib-block .contrib-list a { color: var(--case-soft); font-size: 12px; white-space: nowrap; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--case) 50%, transparent); }
.contrib-block .contrib-list a:hover { color: #fff; }
.practised { margin: 16px 0 0; color: #bdb6cf; font-size: 13px; line-height: 1.8; }
.practised b { margin-right: 10px; color: var(--case-soft); font: 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.case-team { margin-top: 16px; padding-top: 0; border-top: 0; }

.finding-list { display: grid; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.finding-list li { padding: 10px 12px; border-radius: 8px; background: rgba(255, 255, 255, .04); color: #c9c4d8; font-size: 13px; line-height: 1.65; }
.finding-list b { color: #fff; font-weight: 600; }

.iteration-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.iteration-list li { display: flex; gap: 12px; padding: 16px; border: 1px solid #ffffff15; border-radius: 8px; background: #ffffff04; }
.iteration-list li > span { flex: 0 0 auto; color: var(--case-soft); font: 10px/1.9 var(--mono); text-transform: uppercase; }
.iteration-list h5 { margin: 0 0 4px; color: #eef2f6; font: 600 15px/1.4 var(--display); }
.iteration-list p { margin: 0; color: #aab6c8; font-size: 13px; line-height: 1.7; }

/* ---------- Tables (comparison, growth, method matrix) ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-table, .growth-table, .method-matrix table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.6; }
.compare-table caption { padding-bottom: 12px; color: #b2adc3; font: 11px var(--mono); text-align: left; text-transform: uppercase; letter-spacing: .06em; }
:is(.compare-table, .growth-table, .method-matrix table) :is(th, td) { padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, .1); text-align: left; vertical-align: top; }
:is(.compare-table, .growth-table, .method-matrix table) thead th { color: #a9a3bd; font: 500 10px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
:is(.compare-table, .growth-table, .method-matrix table) tbody th { color: #f0ecf8; font-weight: 600; }
.compare-table td { color: #c2bdd2; }
.compare-table tr.chosen { background: color-mix(in srgb, var(--case) 12%, transparent); }
.compare-table tr.chosen th { color: var(--case-soft); }
.rate { display: inline-block; padding: 2px 9px; border-radius: 999px; font: 500 10px/1.7 var(--mono); font-style: normal; text-transform: uppercase; letter-spacing: .05em; }
.rate--1 { background: #ffffff10; color: #a39db5; }
.rate--2 { background: #e8c35a22; color: #ecd28a; }
.rate--3 { background: #4fc9bd26; color: #8fe3da; }

.growth { margin-top: clamp(48px, 7vw, 80px); padding: clamp(22px, 3vw, 32px); border: 1px solid #44395a; border-radius: 14px; background: linear-gradient(120deg, #2a1830 0%, #191626 48%, #16242a 100%); }
.growth h3 { margin: 10px 0 10px; color: #f5f1fc; font: 600 clamp(24px, 3vw, 34px)/1.2 var(--display); letter-spacing: -.035em; }
.growth > p:not(.tag) { max-width: 760px; margin: 0 0 20px; color: #cfc8e0; font-size: 15px; line-height: 1.8; }
.growth-table { min-width: 760px; }
.growth-table thead th span { margin-right: 6px; color: #fff; }
.growth-table thead th:nth-child(2) { color: #f7a8cb; }
.growth-table thead th:nth-child(3) { color: #a3e0dc; }
.growth-table thead th:nth-child(4) { color: #f3cf86; }
.growth-table tbody th { width: 18%; color: #c9b8ff !important; font: 500 11px/1.7 var(--mono) !important; text-transform: uppercase; letter-spacing: .06em; }
.growth-table td { width: 27%; color: #d6d1e4; }
.growth-table b { color: #fff; }

.subheading span { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 10px; border: 1px solid var(--accent); border-radius: 8px; color: var(--accent-soft); font: 500 12px var(--mono); vertical-align: 4px; }
.subheading small { display: block; margin-top: 6px; color: #9e98b2; font: 400 13px var(--sans); letter-spacing: 0; }
.subheading:has(small) span { vertical-align: 2px; }

/* ---------- Skills & learning ---------- */
.learn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.learn-card { display: flex; flex-direction: column; padding: 22px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; background: linear-gradient(150deg, rgba(30, 24, 46, .8), rgba(14, 11, 24, .88)); }
.learn-card h4 { margin: 10px 0 4px; color: #fff; font: 600 20px/1.3 var(--display); letter-spacing: -.03em; }
.learn-source { margin: 0 0 12px; color: var(--accent-soft); font: 10px/1.7 var(--mono); letter-spacing: .04em; }
.learn-source cite { font-style: italic; }
.learn-card > p:not(.tag):not(.learn-source):not(.changed) { margin: 0 0 14px; color: #bcb5cf; font-size: 14px; line-height: 1.75; }
.applied { display: grid; gap: 8px; margin: 0 0 14px; }
.applied div { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: baseline; }
.applied dt { display: grid; place-items: center; height: 22px; border-radius: 6px; font: 500 10px var(--mono); }
.applied div:nth-child(1) dt { background: #ee6aa726; color: #f7a8cb; }
.applied div:nth-child(2) dt { background: #77cfc926; color: #a3e0dc; }
.applied dd { margin: 0; color: #d9d3e8; font-size: 13px; line-height: 1.65; }
.changed { margin: auto 0 0; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .1); color: #c6bfd8; font-size: 13px; line-height: 1.7; }
.changed b { color: #fff; font-weight: 600; }
.learn-card .pair-list { margin: 0 0 14px; }

.method-matrix { border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; background: rgba(20, 16, 34, .7); }
.method-matrix table { min-width: 420px; }
.method-matrix tr:last-child :is(th, td) { border-bottom: 0; }
.method-matrix td:nth-child(2) { color: #9e98b2; font: 11px var(--mono); text-transform: uppercase; }
.method-matrix td:nth-child(n + 3), .method-matrix th:nth-child(n + 3) { width: 64px; text-align: center; }
.method-matrix abbr { text-decoration: none; }
.method-matrix i { display: inline-block; width: 20px; height: 20px; overflow: hidden; border-radius: 50%; color: transparent; font-size: 0; vertical-align: middle; }
.method-matrix i.yes { background: var(--accent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 50%, transparent); }
.method-matrix i.yes::after { content: "✓"; display: block; color: #0d0a18; font: 700 12px/20px var(--sans); text-align: center; }
.method-matrix i.no { border: 1px dashed rgba(255, 255, 255, .25); }

/* ---------- Philosophy ---------- */
.seen-in { margin-top: 12px !important; padding-top: 10px; border-top: 1px dashed rgba(255, 255, 255, .14); color: #d2cce2 !important; font-size: 12px !important; }
.seen-in b { margin-right: 6px; color: var(--accent-soft); font: 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.approach-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.approach-steps li { position: relative; padding: 18px 16px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; background: rgba(20, 16, 34, .7); }
.approach-steps span { color: var(--accent); font: 500 11px var(--mono); }
.approach-steps h4 { margin: 8px 0 6px; color: #fff; font: 600 17px var(--display); }
.approach-steps p { margin: 0; color: #b9b2cc; font-size: 13px; line-height: 1.65; }
.tool-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tool-col { padding: 20px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(20, 16, 34, .7); }
.tool-col h4 { margin: 0 0 12px; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.tool-col--keep h4 { color: #8fe3da; }
.tool-col--drop h4 { color: #f2a07a; }
.tool-col ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tool-col li { display: grid; gap: 2px; padding-left: 22px; position: relative; }
.tool-col li::before { position: absolute; left: 0; top: 1px; font: 700 13px var(--sans); }
.tool-col--keep li::before { content: "+"; color: #8fe3da; }
.tool-col--drop li::before { content: "−"; color: #f2a07a; }
.tool-col b { color: #fff; font-size: 14px; font-weight: 600; }
.tool-col li span { color: #b9b2cc; font-size: 13px; line-height: 1.65; }
.note-card a { color: var(--accent-soft); }

/* ---------- About: portfolio log ---------- */
.lead--small { margin-bottom: 16px; font-size: 14px !important; }
.log-list { display: grid; gap: 0; margin: 0 0 36px; padding: 0; list-style: none; border-left: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); }
.log-list li { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 12px 0 12px 20px; position: relative; }
.log-list li::before { content: ""; position: absolute; left: -7px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.log-list li.upcoming::before { background: #0d0d16; border: 2px dashed var(--accent); box-shadow: none; }
.log-list time { color: var(--accent-soft); font: 11px/1.9 var(--mono); text-transform: uppercase; }
.log-list b { display: block; color: #fff; font: 600 16px var(--display); }
.log-list span { color: #bdb6cf; font-size: 14px; line-height: 1.7; }

/* ---------- Non-3D home: contents list ---------- */
.portfolio-toc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin: 34px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); list-style: none; }
.portfolio-toc a { display: grid; grid-template-columns: 26px 1fr; column-gap: 8px; padding: 6px 0; color: #ddd6ee; text-decoration: none; }
.portfolio-toc a span { grid-row: span 2; color: #b9a4ff; font: 11px/1.9 var(--mono); }
.portfolio-toc a b { font-size: 14px; font-weight: 600; }
.portfolio-toc a small { color: #958ea9; font-size: 12px; line-height: 1.5; }
.portfolio-toc a:hover b { color: #fff; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #b9a4ff; }
.portfolio-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.portfolio-quick > span { width: 100%; margin-bottom: 4px; color: #958ea9; font: 10px/1.7 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.portfolio-quick a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1px solid #51475f; border-radius: 999px; color: #ddd6ee; font-size: 12px; text-decoration: none; transition: border-color .2s, color .2s; }
.portfolio-quick a:first-of-type { border-color: #c5b0ff; background: #c5b0ff; color: #20142e; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.portfolio-quick a:hover { border-color: #b9a4ff; color: #fff; }
.portfolio-quick a:first-of-type:hover { background: #d9ccff; color: #20142e; }
.classic-footer p a { color: #cbbcf2; }

/* ---------- 3D world home screen ---------- */
.hero { top: calc(var(--header-height) + clamp(24px, 6vh, 64px)); width: min(500px, 40vw); }
.hero h1 { margin: 20px 0 18px; font-size: clamp(64px, 8.6vw, 132px); }
.hero-steps { display: grid; gap: 7px; margin: 20px 0 0; padding: 0; list-style: none; animation: fadeUp .9s .95s both; }
.hero-steps li { display: flex; align-items: center; gap: 10px; color: #e6defa; font-size: 13px; }
.hero-steps li > span { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 auto; border: 1px solid rgba(255, 255, 255, .35); border-radius: 50%; color: #fff; font: 10px var(--mono); }
.hero-steps em { font-style: normal; }
.hero-steps kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin: 0 1px; padding: 0 4px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 5px; background: rgba(255, 255, 255, .08); color: #fff; font: 10px var(--mono); }
.only-touch { display: none; }
@media (pointer: coarse) { .only-keys { display: none; } .only-touch { display: inline; } }
.hero-links { margin-top: 22px; animation-delay: 1.1s; }
.hero-links button { padding: 8px 14px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; background: rgba(255, 255, 255, .05); color: #e1e4eb; cursor: pointer; font: inherit; backdrop-filter: blur(6px); transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.hero-links button:hover { transform: translateY(-2px) scale(1.03); border-color: var(--pink); color: #fff; }
body.is-driving .hero { opacity: .1; pointer-events: none; }
body.is-driving .hero-links { pointer-events: none; }
.world-coordinate { top: auto; bottom: 92px; }
.world-progress { position: absolute; z-index: 4; right: 28px; top: calc(var(--header-height) + 18px); padding: 7px 12px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; background: rgba(14, 7, 32, .72); color: #d9ccff; font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; backdrop-filter: blur(6px); }
.world-progress span { color: #fff; font-weight: 500; }
.world-progress.complete { border-color: #8fe3da; color: #8fe3da; }
.map-marker.visited { background: color-mix(in srgb, var(--accent) 45%, #190d33); }

/* ---------- World: preview card, tips, back to start, reward ---------- */
.proximity-prompt { border-color: color-mix(in srgb, var(--accent) 60%, rgba(255, 255, 255, .2)); }
.prompt-preview { display: block; max-width: 300px; margin-top: 5px; color: #a99fc4; font-size: 11px; line-height: 1.45; }
.prompt-preview:empty { display: none; }
.proximity-prompt.is-far { animation: none; }
.proximity-prompt.is-far .open-near { border: 1px solid rgba(255, 255, 255, .28); background: transparent; color: #d9ccff; cursor: default; }
.proximity-prompt.is-far .open-near:hover { transform: none; box-shadow: none; }

.world-tip { position: absolute; z-index: 6; top: calc(var(--header-height) + 18px); left: 50%; max-width: min(460px, calc(100vw - 32px)); padding: 10px 16px; transform: translate(-50%, -8px); border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; background: rgba(16, 8, 36, .88); color: #e9e2ff; font-size: 13px; line-height: 1.45; text-align: center; opacity: 0; pointer-events: none; backdrop-filter: blur(10px); transition: opacity .3s ease, transform .3s ease; }
.world-tip.visible { opacity: 1; transform: translate(-50%, 0); }
.world-tip:empty { display: none; }
.world-tip b { color: #fff; }
.world-tip kbd { display: inline-block; min-width: 22px; margin: 0 2px; padding: 1px 6px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 5px; background: rgba(255, 255, 255, .08); color: #fff; font: 11px var(--mono); }

.world-home { position: absolute; z-index: 4; right: 28px; top: calc(var(--header-height) + 58px); min-height: 34px; padding: 7px 14px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; background: rgba(14, 7, 32, .78); color: #e9e2ff; cursor: pointer; font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; backdrop-filter: blur(6px); transition: border-color .2s ease, background .2s ease; }
.world-home:hover, .world-home:focus-visible { border-color: #b9a4ff; background: rgba(185, 164, 255, .18); }

.world-reward { position: absolute; z-index: 7; top: 50%; left: 50%; width: min(420px, calc(100vw - 32px)); padding: 24px; transform: translate(-50%, -50%); border: 1px solid #8fe3da; border-radius: 18px; background: rgba(16, 8, 36, .94); box-shadow: 0 24px 70px rgba(0, 0, 0, .5), 0 0 40px rgba(143, 227, 218, .18); color: #d6cdee; text-align: center; animation: rewardIn .5s cubic-bezier(.2, 1.3, .4, 1) both; }
.world-reward-kicker { margin: 0; color: #8fe3da; font: 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.world-reward h2 { margin: 8px 0 8px; color: #fff; font: 700 28px var(--display); letter-spacing: -.04em; }
.world-reward > p:not(.world-reward-kicker) { margin: 0 0 18px; font-size: 14px; line-height: 1.6; }
.world-reward-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.world-reward-links :is(a, button) { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; background: transparent; color: #e9e2ff; cursor: pointer; font: 12px var(--sans); text-decoration: none; }
.world-reward-links a:first-child { border-color: #c5b0ff; background: #c5b0ff; color: #20142e; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.world-reward-links :is(a, button):hover { border-color: #b9a4ff; }
.world-reward-close { margin-top: 14px; padding: 6px 10px; border: 0; background: none; color: #a99fc4; cursor: pointer; font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; }
@keyframes rewardIn { from { opacity: 0; transform: translate(-50%, -46%) scale(.92); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* The fixed controls list steps aside once the visitor starts driving; tips take over. */
.scene-hint { transition: opacity .6s ease; }
body.has-driven .scene-hint { opacity: 0; }
.nav { gap: clamp(10px, 1.3vw, 20px); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .approach-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .iteration-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .hero { width: min(520px, 62vw); }
  .contrib-block .contrib-list li { grid-template-columns: 1fr; gap: 6px; }
  .contrib-block .contrib-list a { justify-self: start; }
  .tool-table { grid-template-columns: 1fr; }
  .world-coordinate { bottom: 128px; }
}
@media (max-width: 600px) {
  .hero { top: calc(var(--header-height) + 18px); left: 16px; width: calc(100vw - 32px); }
  .hero h1 { margin: 12px 0 10px; font-size: clamp(50px, 15vw, 72px); }
  .hero p { max-width: 330px; font-size: 13px; }
  .hero-steps { margin-top: 12px; gap: 5px; }
  .hero-steps li { font-size: 12px; }
  .hero-links { gap: 8px; margin-top: 14px; font-size: 11px; }
  .hero-links a, .hero-links button { padding: 8px 12px; }
  body.is-driving .hero { opacity: 0; }
  .world-coordinate { display: none; }
  .world-progress { right: 10px; top: calc(var(--header-height) + 10px); font-size: 9px; }
  .world-home { right: 10px; top: calc(var(--header-height) + 42px); min-height: 30px; padding: 6px 11px; font-size: 9px; }
  .world-tip { top: calc(var(--header-height) + 76px); border-radius: 14px; font-size: 12px; }
  .prompt-preview { max-width: 220px; font-size: 10px; }
  .world-reward { padding: 20px 16px; }
  .world-reward h2 { font-size: 24px; }
  .portfolio-toc { grid-template-columns: 1fr; }
  .approach-steps, .iteration-list { grid-template-columns: 1fr; }
  .log-list li { grid-template-columns: 1fr; gap: 2px; }
  .contrib-block { padding: 16px; }
  .growth { padding: 18px 14px; }
  .learn-card { padding: 18px; }
  :is(.compare-table, .growth-table, .method-matrix table) :is(th, td) { padding: 10px; font-size: 13px; }
  .subheading span { width: 26px; height: 26px; }
}
@media (max-height: 560px) and (pointer: coarse) {
  .hero p, .hero-steps { display: none; }
  .hero h1 { font-size: 44px; }
}
/* A soft shade behind the welcome text keeps it readable over the moving scene. */
.hero::before { content: ""; position: absolute; z-index: -1; inset: -12% -30% -14% -40%; background: radial-gradient(closest-side, rgba(10, 6, 22, .82), rgba(10, 6, 22, .55) 55%, transparent); pointer-events: none; }
.speedo-fill { box-shadow: none; }
@media (max-width: 600px) {
  .hero::before { inset: -60px -16px -24px; background: linear-gradient(180deg, rgba(10, 6, 22, .9), rgba(10, 6, 22, .7) 70%, transparent); }
}
/* Section overlay in the world: opaque enough that the scene never competes with the text. */
.content-view { background: radial-gradient(60vmax 50vmax at 85% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%), rgba(10, 6, 22, .985); }
.project-jump a { white-space: nowrap; }
