/* PortfolioStudio 8.18 — a quiet cover, adaptive identity and continuous scenes. */
:root {
  --font-ui: 'Portfolio Sans', system-ui, sans-serif;
  --paper: #ffffff; --surface: #ffffff; --surface-soft: #f5f5f5;
  --ink: #000000; --muted: #535353; --line: #dedede;
  --accent: #d4f17d; --accent-ink: #18200b; --inverse: #ffffff;
  --focus: #4d6905; --radius: 20px; --shadow: 0 16px 44px #18200b08;
  color-scheme: light;
}
:root[data-color-mode='dark'] {
  --paper: #000000; --surface: #000000; --surface-soft: #171717;
  --ink: #ffffff; --muted: #bdbdbd; --line: #343434;
  --inverse: #000000; --focus: #d4f17d; --shadow: 0 16px 44px #00000020;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; scroll-padding-top: 7rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-ui); font-size: 16px; line-height: 1.6; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
svg { display: block; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 700; overflow-wrap: anywhere; }
h1, h2 { letter-spacing: -.04em; }
h2 { font-size: clamp(1.65rem, 2.5vw, 2.2rem); line-height: 1.3; margin-bottom: 1.3rem; }
h3 { font-size: 1.1rem; line-height: 1.5; }
p { overflow-wrap: anywhere; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
::selection { color: var(--accent-ink); background: var(--accent); }
.site-wrap { width: min(100%, 1440px); margin-inline: auto; padding-inline: clamp(20px, 3.5vw, 60px); }
.portfolio-shell { --content-top: 108px; --content-bottom: max(80px, calc(70px + env(safe-area-inset-bottom))); position: relative; height: 100vh; height: 100dvh; min-height: 460px; display: grid; grid-template-rows: minmax(0, 1fr); }
.portfolio-shell > main { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.skip-link { position: fixed; top: 10px; left: 16px; z-index: 100; padding: 12px 18px; color: var(--inverse); background: var(--ink); border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.main-header { position: absolute; inset: 0 0 auto; z-index: 40; background: var(--paper); border-bottom: 1px solid var(--line); }
.main-header > .site-wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 80px; }
.logo { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 44px; font-size: .9rem; font-weight: 700; letter-spacing: -.025em; }
.logo > span:last-child { max-width: 19ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-brand-logo { flex: none; width: 64px; height: 40px; object-fit: contain; }
.brand-logo { filter: brightness(0); }
:root[data-color-mode='dark'] .brand-logo { filter: brightness(0) invert(1); }
:root[data-portfolio-view='home'] #ps-pwa-root, :root[data-portfolio-view='home'] .pwa-ui, :root[data-portfolio-view='home'] [data-pwa-root] { display: none !important; }
.nav-links, .nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-links { gap: 3px; margin-left: auto; }
.nav-links:empty { display: none; }
.section-link { display: flex; justify-content: center; align-items: center; min-height: 44px; padding: 9px 14px; font-size: .84rem; line-height: 1.4; border: 1px solid transparent; border-radius: 30px; text-align: center; transition: background-color .2s; }
.section-link:hover { background: var(--surface-soft); }
.section-link[aria-current='page'] { background: var(--ink); color: var(--inverse); }
.language-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 24px; padding: 3px; }
.language-switch button { border: 0; background: transparent; font-size: .75rem; font-weight: 700; border-radius: 18px; min-height: 36px; min-width: 34px; }
.language-switch button[aria-pressed='true'] { color: var(--inverse); background: var(--ink); }
.color-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 24px; background: transparent; border: 1px solid var(--line); min-height: 44px; padding: 7px 12px; font-size: .8rem; }
.color-toggle > span:first-child { font-size: 1.15rem; line-height: 1; }
.color-toggle:hover, .nav-tool:hover { background: var(--surface-soft); }
.nav-tool { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; min-height: 44px; padding: 8px; border: 0; background: transparent; font-size: .75rem; border-radius: 8px; }
.presentation-stage { position: relative; isolation: isolate; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); flex: 1; min-width: 0; min-height: 0; overflow: hidden; }
.portfolio-slide { grid-area: 1 / 1; width: 100%; height: 100%; min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; background: var(--paper); }
.portfolio-slide[data-slide-state='active'] { z-index: 2; }
.portfolio-slide:focus-visible { outline-offset: -4px; }
.portfolio-slide[data-slide-state='leaving'] { z-index: 1; pointer-events: none; }
.presentation-stage[data-transitioning] > .portfolio-slide { will-change: transform, opacity, filter; overflow: hidden; }
.hero { padding: 0; scrollbar-gutter: auto; }
.cover-gate { position: relative; display: grid; place-items: center; height: auto; min-height: 100%; min-height: max(460px, 100%); min-width: 0; padding: clamp(96px, 12vh, 120px) clamp(24px, 5vw, 80px) clamp(44px, 8vh, 100px); color: var(--ink); background: var(--paper); isolation: isolate; overflow: hidden; }
.home-language-tools { position: absolute; top: max(20px, env(safe-area-inset-top)); right: max(24px, env(safe-area-inset-right)); z-index: 3; }
.home-language-tools .language-switch { background: var(--paper); box-shadow: 0 4px 18px #00000008; }
.home-language-tools .language-switch button { min-width: 44px; min-height: 44px; }
.gate-artwork { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.gate-artwork > svg, .gate-artwork > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover-identity { position: relative; z-index: 1; width: min(100%, 720px); padding: 24px; min-width: 0; text-align: center; background: var(--paper); box-shadow: 0 0 32px 24px var(--paper); }
.hero .cover-name { font-size: clamp(2.2rem, 5.6vw, 5.5rem); font-weight: 700; line-height: 1.14; letter-spacing: -.055em; max-width: 18ch; margin: 0 auto; overflow-wrap: anywhere; text-wrap: balance; }
.cover-role { color: var(--ink); font-size: clamp(.9rem, 1.3vw, 1.15rem); line-height: 1.75; max-width: 48ch; margin: 24px auto 0; text-wrap: balance; }
.localized-content { white-space: pre-line; overflow-wrap: anywhere; }
.hero-actions { display: flex; align-items: center; justify-content: center; margin-top: 36px; }
.hero-actions .button { min-width: 158px; }
.button { display: inline-flex; gap: 14px; align-items: center; justify-content: center; min-height: 48px; padding: 12px 20px; font-size: .875rem; font-weight: 700; border: 1px solid transparent; border-radius: 30px; line-height: 1.5; text-align: center; transition: transform .2s ease, background-color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-dark { color: var(--inverse); background: var(--ink); }
.button-outline { border-color: var(--line); color: var(--ink); background: transparent; }
.button-outline:hover { background: var(--surface-soft); }
.button-accent { color: var(--accent-ink); background: var(--accent); }
.site-footer { position: absolute; inset: auto 0 0; z-index: 35; background: var(--paper); color: var(--muted); font-size: .65rem; }
.site-footer .site-wrap { display: flex; align-items: center; gap: 16px; justify-content: space-between; min-height: 42px; border-top: 1px solid var(--line); padding-block: 4px; }
.site-footer a { color: var(--ink); min-height: 32px; display: inline-flex; align-items: center; gap: 10px; }
.explore-panel { padding: var(--content-top) clamp(22px, 7vw, 120px) var(--content-bottom); }
.detail-slide { padding-top: var(--content-top); padding-bottom: var(--content-bottom); }
.explore-panel > section > .site-wrap { width: 100%; max-width: 1120px; padding: 0; }
.explore-panel h2 { margin-bottom: 28px; }
.about-intro { display: flex; justify-content: space-between; align-items: center; gap: 28px; margin-bottom: 34px; }
.about-intro > div { min-width: 0; flex: 1; }
.about-intro .about-heading { margin-bottom: 8px; }
.about-location { color: var(--muted); font-size: .875rem; }
.about-contact-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; margin: 18px 0 0; }
.about-contact-details > div { min-width: 0; }
.about-contact-details dt { color: var(--muted); font-size: .7rem; line-height: 1.4; }
.about-contact-details dd { margin: 3px 0 0; font-size: .875rem; overflow-wrap: anywhere; }
.about-contact-details a { display: inline-flex; align-items: center; max-width: 100%; min-height: 32px; font-size: inherit; text-decoration: underline; text-underline-offset: 4px; }
.about-contact-details .contact-email { display: block; line-height: 1.6; padding-block: 5px; }
.profile-avatar { width: 144px; height: 144px; flex: none; object-fit: cover; border-radius: 50%; }
.profile-avatar.is-brand-avatar { padding: 20px; object-fit: contain; border-radius: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .7rem; font-weight: 700; }
.profile-panels { display: grid; gap: 30px; }
.profile-block { min-width: 0; }
.profile-block + .profile-block { border-top: 1px solid var(--line); padding-top: 26px; }
.about-text { font-size: 1.05rem; line-height: 1.9; }
.profile-block-title { font-size: .875rem; margin-bottom: 18px; }
.profile-timeline, .career-items { display: grid; gap: 28px; }
.profile-entry, .resume-entry { border-left: 2px solid var(--line); padding-left: 22px; }
.profile-entry-head, .resume-entry-head { display: flex; gap: 12px 24px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.profile-entry-head > span, .resume-period { color: var(--muted); font-size: .75rem; }
.profile-entry p, .resume-entry p { margin-bottom: 6px; }
.profile-entry-head strong { font-size: .95rem; }
.profile-details, .resume-details { color: var(--muted); font-size: .9rem; line-height: 1.8; }
.resume-entry h3 { margin-bottom: 4px; }
.resume-role { font-size: .9rem; }
.resume-entry-head { margin-bottom: 10px; }
.skill-pills, .tags { display: flex; gap: 8px; flex-wrap: wrap; }
.skill, .tag, .profile-tag { display: inline-flex; padding: 6px 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 24px; font-size: .75rem; }
.profile-list { padding-left: 20px; display: grid; gap: 8px; font-size: .9rem; }
.testimonial-grid { display: grid; gap: 16px; }
.testimonial-card { margin: 0; padding: 22px; border-radius: 12px; background: var(--surface-soft); }
.testimonial-card p { margin-bottom: 16px; }
.testimonial-card footer { display: grid; font-size: .85rem; }
.testimonial-card small { color: var(--muted); }
.filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.filter-button { background: transparent; border: 1px solid var(--line); border-radius: 30px; padding: 9px 14px; min-height: 44px; font-size: .75rem; }
.filter-button.active { color: var(--inverse); background: var(--ink); border-color: var(--ink); }
.project-search { min-width: 160px; flex: 1; padding: 10px 14px; min-height: 44px; border: 1px solid var(--line); border-radius: 30px; background: var(--surface); color: var(--ink); font-size: .8rem; }
.project-search::placeholder, .contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--muted); opacity: 1; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
.project-card { min-width: 0; }
.project-cover-link { display: block; border-radius: 14px; overflow: hidden; }
.project-cover, .detail-cover { position: relative; isolation: isolate; overflow: hidden; background: var(--surface-soft); border: 1px solid var(--line); }
.project-cover { aspect-ratio: 4/3; border-radius: 14px; }
.cover-img { width: 100%; height: 100%; object-fit: cover; }
.project-cover .cover-img { transition: transform .4s ease; }
.project-cover-link:hover .cover-img { transform: scale(1.03); }
.art { display: grid; place-items: center; width: 100%; height: 100%; min-height: inherit; background-image: linear-gradient(135deg, transparent 48%, var(--line) 49%, var(--line) 50%, transparent 51%); background-size: 32px 32px; }
.art-symbol { font-size: clamp(3rem, 7vw, 6rem); font-weight: 700; letter-spacing: -.07em; color: var(--ink); }
.project-number { position: absolute; top: 14px; left: 16px; font-size: .7rem; color: #151714; background: #ffffffeb; border-radius: 20px; padding: 5px 9px; }
.cover-arrow { position: absolute; right: 14px; bottom: 14px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #151714; background: #ffffffeb; }
.demo-label, .featured-label { position: absolute; right: 14px; top: 14px; font-size: .65rem; background: #ffffffeb; color: #151714; border-radius: 20px; padding: 5px 9px; }
.demo-label + .featured-label { top: 46px; }
.project-meta { display: flex; justify-content: space-between; gap: 12px; margin: 17px 0 8px; color: var(--muted); font-size: .7rem; }
.project-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.project-card p { color: var(--muted); font-size: .85rem; line-height: 1.8; margin-bottom: 16px; }
.ps-attachments-count { display: block; color: var(--muted); font-size: .7rem; margin-top: 12px; }
.project-details-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .75rem; text-decoration: underline; text-underline-offset: 5px; }
.project-details-link:hover { text-decoration: underline; }
.empty-state { padding: 28px 0; color: var(--muted); font-size: .9rem; grid-column: 1/-1; }
.demo-notice { color: var(--muted); font-size: .75rem; margin: 26px 0 0; }
.contact-grid { display: grid; gap: 30px; }
.contact-intro { color: var(--muted); font-size: .9rem; max-width: 52ch; }
.contact-email, .contact-phone { display: block; overflow-wrap: anywhere; font-size: clamp(1rem, 2vw, 1.3rem); }
.contact-details { display: grid; gap: 18px; margin: 28px 0; }
.contact-details dt { font-size: .75rem; color: var(--muted); margin-bottom: 3px; }
.contact-details dd { margin: 0; }
.contact-details a { width: fit-content; min-height: 40px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.social-links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: .8rem; }
.social-links a { padding: 8px 0; }
.contact-form { border-top: 1px solid var(--line); padding-top: 28px; }
.contact-form h3 { margin-bottom: 20px; font-size: .95rem; }
.contact-form label { display: grid; gap: 8px; font-size: .75rem; margin-bottom: 16px; }
.contact-form input, .contact-form textarea { width: 100%; min-width: 0; padding: 12px 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 1rem; }
.contact-form textarea { min-height: 130px; resize: vertical; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hidden-input { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.form-feedback { min-height: 24px; margin-top: 16px; font-size: .875rem; }
.detail-page { padding-block: 0 20px; }
.detail-page > .site-wrap { max-width: 1160px; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .8rem; margin-bottom: 32px; }
.detail-eyebrow { color: var(--muted); font-size: .75rem; margin-bottom: 16px; }
.detail-page h1 { font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1.25; max-width: 24ch; margin-bottom: 24px; }
.detail-lead { max-width: 65ch; color: var(--muted); font-size: 1.1rem; }
.ps-project-meta { color: var(--muted); font-size: .875rem; margin-bottom: 28px; }
.detail-cover { margin-top: 28px; aspect-ratio: 16/9; border-radius: var(--radius); }
.detail-grid { display: grid; grid-template-columns: minmax(160px, .6fr) minmax(0, 1.4fr); gap: 40px; padding-block: 42px; border-bottom: 1px solid var(--line); }
.detail-grid h2 { font-size: 1.2rem; }
.detail-copy { min-width: 0; }
.detail-copy p { font-size: .95rem; line-height: 1.9; }
.ps-detail-point { margin-top: 24px; }
.ps-detail-point > strong { font-size: .85rem; }
.ps-detail-point p { margin: 8px 0 0; color: var(--muted); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.ps-project-files { padding-top: 40px; }
.detail-gallery, .evidence-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.detail-gallery img, .evidence-grid img { width: 100%; height: auto; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); }
.evidence-grid figure { margin: 0; }
.evidence-grid figcaption, .ps-file-note { color: var(--muted); font-size: .85rem; margin-block: 14px; }
.cv-files { display: grid; gap: 26px; }
.cv-files > .document-preview-card { margin: 0; }
.document-previews, .standalone-grid { display: grid; gap: 30px; margin-top: 30px; }
.document-preview-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 24px; }
.inline-file-heading { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px; }
.inline-file-heading > div { min-width: 0; }
.inline-file-heading h3 { margin: 8px 0 0; overflow-wrap: anywhere; }
.file-kicker { font-size: .65rem; letter-spacing: .12em; color: var(--muted); }
.inline-file-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-file-actions .button { font-size: .75rem; min-height: 44px; padding: 10px 14px; }
.inline-pdf iframe { display: block; width: 100%; height: min(65vh, 720px); min-height: 280px; border: 1px solid var(--line); background: var(--surface-soft); border-radius: 10px; }
.viewer-note { color: var(--muted); font-size: .75rem; margin-top: 12px; }
.slide-deck { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.slide-viewport { aspect-ratio: 16/9; display: grid; place-items: center; background: #fff; }
.slide-image { width: 100%; height: 100%; object-fit: contain; max-height: 650px; }
.slide-controls { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; }
.slide-controls button { min-width: 42px; min-height: 44px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 12px; }
.slide-progress { font-size: .75rem; }
.slide-timeline { height: 3px; background: var(--line); }
.slide-timeline > div { height: 100%; background: var(--ink); }
.slide-unavailable { padding: 22px; background: var(--surface-soft); border-radius: 12px; font-size: .85rem; }
.slide-unavailable p { margin-top: 12px; color: var(--muted); }
.pdf-reader { width: min(1100px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); }
.pdf-reader::backdrop { background: #000a; }
.pdf-reader-bar { display: flex; align-items: center; gap: 20px; justify-content: space-between; padding-bottom: 14px; }
.pdf-reader-bar strong { overflow-wrap: anywhere; }
.pdf-reader-bar .button { flex-shrink: 0; }
.pdf-reader iframe { display: block; width: 100%; height: calc(100dvh - 150px); min-height: 200px; background: #fff; border: 0; }
.next-project { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; margin-top: 50px; padding-top: 32px; border-top: 1px solid var(--line); }
.next-project > div > a { display: inline-block; font-size: 1.4rem; margin-top: 8px; }
.muted { color: var(--muted); }
.error-page, .loading-screen { max-width: 760px; margin: 10vh auto; padding: 30px; }
.error-page h1 { margin-top: 24px; }
.error-page p { color: var(--muted); }
.loading-screen { text-align: center; }
.load-dots { letter-spacing: 6px; }
@media (max-width: 1320px) {
  .main-header > .site-wrap { flex-wrap: wrap; gap: 8px 16px; padding-block: 10px 7px; }
  .nav-right { margin-left: auto; }
  .nav-links { order: 3; margin-left: 0; width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px; }
  .nav-links:empty { display: none; }
  .nav-links a { min-width: 0; padding-inline: 8px; }
  .portfolio-shell { --content-top: 158px; }
  .project-grid { gap: 28px 18px; }
}
@media (max-width: 800px) {
  .logo { font-size: .875rem; gap: 8px; }
  .logo > span:last-child { max-width: 18ch; }
  .header-brand-logo { width: 52px; height: 34px; }
  .cover-identity { width: min(100%, 570px); padding: 22px; }
  .explore-panel { padding-inline: 28px; }
  .explore-panel h2 { font-size: 1.7rem; margin-bottom: 24px; }
  .footer-note { display: none; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}
@media (max-width: 680px) {
  .main-header > .site-wrap { align-items: flex-start; }
  .main-header .logo { max-width: 100%; flex-basis: 100%; }
  .nav-right { width: 100%; margin-left: 0; flex-wrap: wrap; justify-content: space-between; }
  .portfolio-shell { --content-top: 206px; }
  .about-intro { align-items: flex-start; }
  .about-contact-details { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
@media (max-width: 540px) {
  .site-wrap { padding-inline: 16px; }
  .main-header > .site-wrap { gap: 8px; padding-block: 8px 5px; }
  .logo { max-width: 100%; }
  .logo > span:last-child { max-width: 14ch; }
  .nav-right { gap: 4px; }
  .language-switch { padding: 2px; }
  .language-switch button { min-width: 30px; min-height: 36px; font-size: .7rem; }
  .color-toggle { min-width: 38px; padding-inline: 8px; }
  .color-toggle > span:last-child { display: none; }
  .nav-tool { padding-inline: 4px; font-size: .65rem; }
  .section-link { font-size: .75rem; padding: 7px 4px; border-radius: 12px; }
  .nav-links { gap: 3px; }
  .cover-gate { padding: 100px 20px 44px; }
  .home-language-tools { top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); }
  .cover-identity { padding: 22px 6px; }
  .hero .cover-name { font-size: clamp(2rem, 10vw, 3.25rem); }
  .cover-role { font-size: .9rem; margin-top: 20px; }
  .hero-actions { margin-top: 30px; }
  .hero-actions .button { min-height: 48px; padding: 12px 20px; font-size: .85rem; }
  .explore-panel { padding-inline: 18px; }
  .profile-avatar { width: 88px; height: 88px; }
  .profile-avatar.is-brand-avatar { padding: 8px; }
  .about-intro { gap: 18px; }
  .project-grid { grid-template-columns: minmax(0, 1fr); }
  .project-cover { aspect-ratio: 16/11; }
  .filter-row { gap: 6px; }
  .project-search { flex-basis: 100%; }
  .field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .inline-file-actions { width: 100%; }
  .inline-file-actions .button { flex: 1; }
  .detail-gallery, .evidence-grid { grid-template-columns: minmax(0, 1fr); }
  .document-preview-card { padding: 18px; }
  .detail-page h1 { font-size: 2rem; }
  .detail-lead { font-size: 1rem; }
  .pdf-reader { width: calc(100% - 16px); max-height: calc(100dvh - 16px); padding: 12px; }
  .pdf-reader-bar .button { font-size: .75rem; padding: 9px 12px; }
  .site-footer .site-wrap { padding-bottom: max(4px, env(safe-area-inset-bottom)); }
}
@media (max-width: 350px) {
  .header-brand-logo { width: 42px; height: 30px; }
  .logo > span:last-child { max-width: 24ch; }
  .logo { max-width: none; min-height: 44px; }
  .nav-links a { font-size: .7rem; padding-inline: 2px; }
  .hero-actions .button { padding-inline: 12px; }
}
@media (max-height: 600px) {
  .portfolio-shell { min-height: 460px; }
  .cover-gate { min-height: 460px; }
  .hero-actions .button { min-height: 44px; padding-block: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .button:hover, .project-cover-link:hover .cover-img { transform: none; }
}
@media print {
  :root, :root[data-color-mode='dark'] { --paper: #fff !important; --surface: #fff !important; --surface-soft: #f3f3f3 !important; --ink: #000 !important; --muted: #333 !important; --line: #bbb !important; --inverse: #fff !important; color-scheme: light; }
  body { font-size: 10pt; }
  .main-header, .skip-link, .home-language-tools, .gate-artwork, .hero-actions, .site-footer, .pdf-reader, .filter-row, .contact-form, .next-project, #ps-pwa-root, .pwa-ui, [data-pwa-root], .cover-arrow, .inline-file-actions, .slide-controls { display: none !important; }
  [data-slide][hidden] { display: block !important; }
  .portfolio-shell, .portfolio-shell > main, .presentation-stage { display: block; height: auto; min-height: 0; overflow: visible; }
  .hero, .cover-gate, .cover-identity { display: block; padding: 12px 0; min-height: 0; height: auto; text-align: left; }
  .cover-gate { color: #000; background: #fff; }
  .cover-role, .hero .cover-name { margin-inline: 0; color: #000; }
  .site-wrap { width: 100%; max-width: none; padding-inline: 0; }
  .hero .cover-name { font-size: 22pt; max-width: none; }
  .cover-role { font-size: 11pt; }
  .portfolio-slide { display: block; position: static; height: auto; min-height: 0; max-height: none; overflow: visible; transform: none !important; }
  .explore-panel { border-top: 1px solid #bbb; padding: 24px 0; }
  .profile-block, .resume-entry, .project-card, .document-preview-card { break-inside: avoid; }
  .detail-page { padding: 0; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-cover { max-height: 190px; }
  .inline-pdf iframe { display: none; }
  .inline-file-heading { margin-bottom: 10px; }
  .slide-image[hidden] { display: none !important; }
  .portfolio-slide, .detail-page { animation: none; }
  [data-detail-slot], [data-detail-slot][hidden] { display: none !important; }
  :root[data-portfolio-view='detail'] .portfolio-slide { display: none !important; }
  :root[data-portfolio-view='detail'] [data-detail-slot][data-slide-state='active'] { display: block !important; padding: 0; }
  .brand-logo { filter: brightness(0) !important; }
  .portfolio-shell { --content-top: 0px; --content-bottom: 0px; }
  body { color: #000; }
}

/* v8.20: Creator-selected Home tone never leaks into portfolio sections. */
.hero.home-stage { background: var(--home-bg, var(--paper)); }
.hero .cover-gate { background: var(--home-bg, var(--paper)); color: var(--home-ink, var(--ink)); }
.hero .cover-identity { background: var(--home-bg, var(--paper)); box-shadow: 0 0 32px 24px var(--home-bg, var(--paper)); }
.hero .cover-role { color: var(--home-ink, var(--ink)); }
.hero .about-me-button { background: var(--home-ink, var(--ink)); color: var(--home-bg, var(--paper)); }
.hero .home-language-tools .language-switch { background: var(--home-bg, var(--paper)); border-color: var(--home-ink, var(--ink)); color: var(--home-ink, var(--ink)); }
.hero .home-language-tools .language-switch button[aria-pressed='true'] { background: var(--home-ink, var(--ink)); color: var(--home-bg, var(--paper)); }
@media print { .hero.home-stage { background: #fff !important; color: #000 !important; } }

/* Preserve artwork while letting the selected tone remain visible. */
.hero .gate-artwork { opacity:.68; }
