:root {
  color-scheme: dark;
  --ink: #081018;
  --panel: #101d26;
  --panel-2: #172833;
  --text: #f4f7f8;
  --muted: #9eb3bf;
  --line: rgba(231, 241, 245, .16);
  --amber: #f3a712;
  --ice: #91d5ed;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--ink); overflow-x: hidden; }
body { margin: 0; min-width: 0; background: var(--ink); color: var(--text); overflow-x: hidden; }
a { color: inherit; }
button, input, select { font: inherit; }
button, input, select, a { outline-offset: 4px; }
:focus-visible { outline: 3px solid var(--ice); }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 20; padding: .75rem 1rem; background: var(--amber); color: var(--ink); }
.skip-link:focus { top: 1rem; }
.photo-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.25rem clamp(1rem, 5vw, 5rem); border-bottom: 1px solid var(--line); }
.photo-brand { text-decoration: none; font-weight: 850; letter-spacing: .12em; }
.photo-brand span { margin-left: .75rem; color: var(--muted); font-size: .72rem; letter-spacing: .08em; }
.photo-header nav a { color: var(--ice); text-decoration: none; font-size: .88rem; }
#photo-content { width: min(1440px, 100%); margin: 0 auto; padding: clamp(1.25rem, 4vw, 4rem); }
.photo-hero { max-width: 70rem; padding: clamp(2.5rem, 8vw, 7rem) 0 3rem; }
.photo-kicker { margin: 0 0 1rem; color: var(--amber); font-size: .78rem; font-weight: 800; letter-spacing: .18em; }
.photo-hero h1 { margin: 0; font-size: clamp(2.6rem, 8vw, 7.5rem); line-height: .96; letter-spacing: -.045em; overflow-wrap: anywhere; }
.photo-intro { max-width: 48rem; margin: 1.5rem 0 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.7; }
.photo-tools { display: flex; gap: .75rem; margin: 0 0 1.5rem; }
.photo-tools input, .photo-tools select { min-width: 0; border: 1px solid var(--line); border-radius: .25rem; background: var(--panel); color: var(--text); padding: .9rem 1rem; }
.photo-tools input { flex: 1; }
.photo-section-title { margin: 2.25rem 0 1rem; font-size: clamp(1.35rem, 3vw, 2rem); letter-spacing: -.02em; }
.album-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.album-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: .35rem; background: var(--panel); text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
.album-card:hover { transform: translateY(-3px); border-color: var(--ice); }
.album-cover { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--panel-2); }
.album-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.album-empty-cover { display: grid; height: 100%; place-items: center; color: var(--muted); }
.album-card-content { display: grid; gap: .45rem; padding: 1rem; overflow-wrap: anywhere; }
.album-card-content small { color: var(--amber); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.album-card-content strong { font-size: 1.2rem; line-height: 1.25; }
.album-card-content span { color: var(--muted); font-size: .82rem; }
.photo-back { display: inline-block; margin-top: 1rem; color: var(--ice); text-decoration: none; }
.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.photo-card { position: relative; display: block; min-width: 0; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line); border-radius: .25rem; background: var(--panel); }
.photo-card img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .25s ease; }
.photo-card:hover img { transform: scale(1.025); }
.photo-card span { position: absolute; inset: auto 0 0; padding: 2.5rem .8rem .7rem; color: white; background: linear-gradient(transparent, rgba(0,0,0,.85)); font-size: .78rem; overflow-wrap: anywhere; }
.load-more { display: block; margin: 1.5rem auto; padding: .8rem 1.2rem; border: 1px solid var(--ice); background: transparent; color: var(--text); cursor: pointer; }
.photo-empty, .photo-status, .photo-error { grid-column: 1 / -1; color: var(--muted); }
.photo-error { padding: 4rem 0; }
.photo-error button { padding: .8rem 1rem; }
.photo-lightbox { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; overflow: hidden; background: rgba(2, 7, 11, .08); color: white; }
.photo-lightbox::backdrop { background: rgba(2, 7, 11, .76); backdrop-filter: blur(8px); }
.photo-lightbox[open] { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.photo-lightbox figure { display: grid; place-items: center; min-width: 0; max-height: 100dvh; margin: 0; padding: 4.5rem 2rem 2rem; pointer-events: none; }
.photo-lightbox figure img { max-width: min(92vw, 1400px); max-height: calc(100dvh - 9rem); width: auto; height: auto; object-fit: contain; border-radius: .5rem; box-shadow: 0 1.5rem 5rem rgba(0,0,0,.5); cursor: zoom-out; pointer-events: auto; will-change: transform, opacity; }
.photo-lightbox figcaption { max-width: min(76vw, 70rem); margin-top: .85rem; color: rgba(255,255,255,.76); text-align: center; overflow-wrap: anywhere; pointer-events: auto; }
.photo-lightbox button, .photo-lightbox a { z-index: 2; border: 0; color: white; cursor: pointer; }
.lightbox-toolbar { position: fixed; top: 1rem; right: 1rem; display: flex; align-items: center; gap: .6rem; z-index: 3; }
.lightbox-download { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1rem; border: 1px solid rgba(255,255,255,.2) !important; border-radius: 999px; background: rgba(10,17,22,.74); text-decoration: none; backdrop-filter: blur(10px); }
.lightbox-download:hover { background: rgba(255,255,255,.16); }
.lightbox-close { width: 3rem; height: 3rem; border-radius: 999px; background: rgba(10,17,22,.74); font-size: 2rem; line-height: 1; backdrop-filter: blur(10px); }
.lightbox-close:hover { background: rgba(255,255,255,.16); }
.lightbox-step { width: 3.5rem; height: 5rem; border-radius: .35rem; background: rgba(10,17,22,.52); font-size: 2.5rem; backdrop-filter: blur(8px); }
.lightbox-step:hover { background: rgba(255,255,255,.14); }
.lightbox-step[hidden] { display: none; }
.photo-lightbox.is-presented .lightbox-chrome { animation: lightbox-chrome-in .2s ease-out both; }
@keyframes lightbox-chrome-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

@media (max-width: 1050px) {
  .album-grid, .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .photo-header { align-items: flex-start; }
  .photo-brand span { display: block; margin: .35rem 0 0; }
  .photo-tools { flex-direction: column; }
  .album-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-lightbox[open] { grid-template-columns: 1fr; }
  .photo-lightbox figure { padding: 4rem .75rem 5rem; }
  .lightbox-step { position: fixed; bottom: 1rem; }
  .lightbox-previous { left: 1rem; }
  .lightbox-next { right: 1rem; }
}

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