:root {
    color-scheme: dark;
    font-family: system-ui, sans-serif;
    background: #141a15;
    color: #f4f2e6;
    --muted: #bac4b6;
    --accent: #c2d99d;
    --line: #39453a;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.shell { width: min(100% - 3rem, 88rem); margin-inline: auto; }
.topbar { border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 4rem; }
.wordmark { font-size: 1.35rem; font-weight: 800; letter-spacing: -.045em; text-decoration: none; }
.wordmark span, .portal:hover { color: var(--accent); }
.portal { color: var(--muted); text-decoration: none; }

.hero {
    position: relative;
    isolation: isolate;
    display: grid;
    align-items: end;
    min-height: clamp(24rem, 49vw, 44rem);
    overflow: hidden;
    background: #384337;
    border-bottom: 1px solid var(--line);
}

.hero-image, .hero::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-image { z-index: -2; object-fit: cover; object-position: 50% 53%; }
.hero::after {
    content: "";
    z-index: -1;
    background: linear-gradient(0deg, #101810f5, #10181046 52%, transparent 75%);
}

.hero-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    padding-block: clamp(2rem, 5vw, 4.5rem);
}
.hero h1 {
    font-family: Georgia, serif;
    font-size: clamp(3.25rem, 8.4vw, 8rem);
    font-weight: 400;
    letter-spacing: -.065em;
    line-height: .94;
    margin: 0;
}
.hero p { font-size: clamp(1rem, 1.6vw, 1.35rem); color: #e0e6d6; margin: 1rem 0 0; }
.hero-link {
    flex: none;
    padding: .7rem .8rem;
    border: 1px solid #b7c1b28c;
    border-radius: .25rem;
    text-decoration: none;
}
.hero-link:hover { background: #394b3b; }

.gallery { padding-block: clamp(2rem, 4vw, 3.75rem) 4rem; }
.gallery h2 {
    margin: 0 0 1.4rem;
    font-family: Georgia, serif;
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 3.25rem);
    letter-spacing: -.04em;
}
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem 1.25rem; }
.gallery figure { margin: 0; min-width: 0; }
.gallery figure a { display: block; border: 1px solid var(--line); border-radius: .3rem; cursor: zoom-in; }
.gallery figure a:hover { border-color: var(--accent); }
.gallery figure img { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: .25rem; }
.gallery figcaption { color: var(--muted); padding-top: .65rem; }

.viewer {
    background: #182019;
    color: inherit;
    width: min(95vw, 90rem);
    max-width: none;
    max-height: 94dvh;
    padding: .75rem;
    border: 1px solid var(--line);
    border-radius: .4rem;
}
.viewer::backdrop { background: #070b08ec; }
.viewer-toolbar, .viewer-navigation { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.viewer-caption { margin: 0; }
.viewer-image { width: 100%; max-height: calc(94dvh - 8rem); object-fit: contain; margin-block: .75rem; }
.viewer button {
    color: inherit;
    background: #263329;
    border: 1px solid #566b54;
    border-radius: .2rem;
    padding: .55rem .75rem;
    cursor: pointer;
}
.viewer button:hover { background: #364a38; }

@media (max-width: 58rem) {
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 35rem) {
    .shell { width: calc(100% - 2rem); }
    .hero { min-height: 24rem; }
    .hero h1 { max-width: 7ch; }
    .gallery-grid { grid-template-columns: 1fr; gap: 1.35rem; }
}
