:root { --bg: #fff; --fg: #222; --accent: #007acc; --lightbox-backdrop: rgb(255 255 255 / 90%); --lightbox-shadow: 0 0 10px 0 rgb(0 0 0 / 10%); --surface-elevated: #f3f3f3; } @media (prefers-color-scheme: dark) { :root { --bg: #111; --fg: #eee; --accent: #46c; --lightbox-backdrop: rgb(0 0 0 / 90%); --surface-elevated: #222; } } /* Explicit theme toggle overrides (win over media query when set) */ html { &[data-theme='dark'] { --bg: #111; --fg: #eee; --accent: #46c; --lightbox-backdrop: rgb(0 0 0 / 90%); --surface-elevated: #222; } &[data-theme='light'] { --bg: #fff; --fg: #222; --accent: #007acc; --lightbox-backdrop: rgb(255 255 255 / 90%); --lightbox-shadow: 0 0 10px 0 rgb(0 0 0 / 10%); --surface-elevated: #f3f3f3; } } body { margin: 0; font-family: sans-serif; background-color: var(--bg); color: var(--fg); } /* Lightbox (structure may be created by script.js; ensures styles apply to injected content) */ .lightbox { align-items: stretch; background: var(--surface-elevated); border: none; border-radius: 8px; box-shadow: var(--lightbox-shadow); display: flex; flex-direction: column; gap: 0.5rem; justify-content: center; max-width: 90vw; padding: 0.5rem 1rem; opacity: 0; transition: opacity 0.3s; } .lightbox::backdrop { background: var(--lightbox-backdrop); } .lightbox[open] { opacity: 1; } .lightbox header { display: flex; justify-content: flex-end; padding: 0.25rem 0.25rem 0 0; } .lightbox .lb-close { background: none; border: none; font-size: 2rem; color: var(--fg); cursor: pointer; } .lightbox .lb-content { flex: 1; display: flex; justify-content: center; align-items: center; } .lightbox .lb-content img, .lightbox .lb-content video { max-width: 90vw; max-height: 80vh; border-radius: 8px; } .lightbox .lb-caption { color: var(--fg); margin-top: 0.5rem; text-align: center; max-width: 90vw; } .lightbox-open { overflow: hidden; } .gallery-grid { column-count: 1; column-gap: 1rem; padding: 1rem; } @media (width >= 768px) { .gallery-grid { column-count: 2; } } @media (width >= 1024px) { .gallery-grid { column-count: 3; } }