/* Public portfolio extensions; the original dark Home styling remains the base. */
:root {
    --page-bg: #0f172a;
    --page-text: #f8fafc;
    --page-muted: #cbd5e1;
    --page-border: #334155;
    --page-surface: #1e293b;
    --page-accent: #38bdf8;
    --header-bg: rgba(15, 23, 42, .9);
    background: var(--page-bg);
}
html:has(.theme-light), .theme-light {
    --page-bg: #f5f3ee;
    --page-text: #1f2933;
    --page-muted: #5f6872;
    --page-border: #e3e0d9;
    --page-surface: #faf9f6;
    --page-accent: #036b96;
    --header-bg: rgba(245, 243, 238, .92);
}
.public-page { color: var(--page-text); }
.theme-light { background: var(--page-bg); }
.public-page .site-header { background: var(--header-bg); border-color: var(--page-border); }
.public-page .navbar { gap: 24px; flex-wrap: wrap; }
.public-page .nav-right { gap: 20px; }
.public-page .nav-links { align-items: center; flex-wrap: wrap; gap: 8px 22px; }
.public-page .nav-links a { padding: 8px 0; }
.public-page .logo, .theme-light .hero-title, .theme-light .section-title { color: var(--page-text); }
.public-page .nav-links a, .theme-light .section-text, .theme-light .footer-content p,
.theme-light .footer-links a { color: var(--page-muted); }
.public-page .nav-links a:hover, .public-page .nav-links [aria-current="page"] { color: var(--page-accent); }
.public-page .nav-links [aria-current="page"] { text-decoration: underline; text-underline-offset: 8px; }
.public-page .language-switcher { border-left: 1px solid var(--page-border); padding-left: 14px; }
.language-btn { list-style: none; display: grid; place-items: center; min-height: 44px; min-width: 44px; }
.language-btn::-webkit-details-marker { display: none; }
.language-switcher[open] .language-dropdown { display: block; }
.public-page .language-dropdown { background: var(--page-surface); border-color: var(--page-border); top: calc(100% + 8px); }
.public-page .language-option { background: transparent; color: var(--page-text); min-height: 44px; }
.public-page .language-option:hover, .public-page .language-option[aria-pressed="true"] { background: var(--page-bg); color: var(--page-accent); }
.theme-light .hero-subtitle, .theme-light .text-link, .theme-light .about-name-native { color: var(--page-accent); }
.theme-light .text-link:hover { text-decoration: underline; }
.theme-light .about-name-english { color: var(--page-text); text-shadow: none; }
.theme-light .about-photo { border: 1px solid var(--page-border); box-shadow: 0 12px 30px #1f293312; }
.theme-light .btn-outline { color: var(--page-text); border-color: #899098; }
.theme-light .btn-outline:hover { background: var(--page-surface); }
.theme-light .site-footer { border-color: var(--page-border); }
.public-page :focus-visible { outline: 2px solid var(--page-accent); outline-offset: 5px; }
.public-page .skip-link { position: fixed; top: 8px; left: 16px; padding: 12px; background: var(--page-bg); color: var(--page-text); z-index: 1001; transform: translateY(-160%); }
.public-page .skip-link:focus { transform: translateY(0); }
.public-page main { min-height: 65vh; }
.public-page .hero-title { font-size: clamp(2.4rem, 6vw, 3.5rem); }
.page-intro { padding-bottom: 44px; }
.about-hero-section { padding-top: 0; padding-bottom: 64px; }
.about-text .section-text + .section-text { margin-top: 20px; }
.editorial-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; border-top: 1px solid var(--page-border); padding: 36px 0; }
.editorial-row h2 { font-size: 1.25rem; font-weight: 650; }
.editorial-row .text-link { margin-top: 16px; }
.curated-panel { padding: 32px; border: 1px solid var(--page-border); border-radius: 16px; background: var(--page-surface); }
.gallery-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: start; }
.gallery-item { min-width: 0; }
.gallery-item a { display: block; overflow: hidden; border-radius: 16px; background: var(--page-border); }
.gallery-item img { display: block; width: 100%; height: auto; transition: transform 300ms ease; }
.gallery-item a:hover img { transform: scale(1.015); }
.gallery-item figcaption { padding-top: 18px; }
.gallery-item h3 { font-size: 1.15rem; }
.gallery-item p { margin-top: 4px; color: var(--page-muted); font-size: .95rem; }
.gallery-item:nth-child(2) { margin-top: 64px; }
.not-found-page .hero-title { max-width: 19ch; }
.public-page .project-grid { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
@media (max-width: 900px) {
    .public-page .navbar { gap: 10px; }
    .public-page .nav-right { width: 100%; justify-content: space-between; flex-wrap: nowrap; }
    .public-page .nav-links { gap: 4px 20px; }
}
@media (max-width: 600px) {
    .public-page .site-header { position: relative; }
    .public-page .nav-right { align-items: flex-start; gap: 10px; }
    .public-page .nav-links { display: grid; grid-template-columns: repeat(3, auto); gap: 2px 14px; font-size: .9rem; }
    .public-page .nav-links a { min-height: 44px; display: flex; align-items: center; }
    .public-page .language-switcher { padding-left: 6px; }
    .public-page .section { padding: 44px 0; }
    .public-page .about-hero-section { padding-top: 0; }
    .about-hero { flex-direction: column; align-items: flex-start; gap: 24px; }
    .about-photo { width: 200px; height: 200px; }
    .editorial-row { grid-template-columns: 1fr; gap: 16px; padding: 28px 0; }
    .curated-panel { padding: 24px; }
    .gallery-grid { grid-template-columns: 1fr; gap: 32px; }
    .gallery-item:nth-child(2) { margin-top: 0; }
    .landing-title { font-size: clamp(2rem, 8vw, 3.5rem); }
    .landing { min-height: 70svh; height: auto; padding: 80px 0; }
}
/* Both document snapshots remain visible throughout this crossfade. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 420ms; animation-timing-function: ease; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    @view-transition { navigation: none; }
    ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}
