:root {
    --bg: #0c0f0d;
    --bg-soft: #121711;
    --panel: rgba(255, 255, 255, 0.072);
    --panel-strong: rgba(255, 255, 255, 0.11);
    --text: #f4f0e8;
    --muted: #bbb4a7;
    --line: rgba(244, 240, 232, 0.16);
    --accent: #d9a85f;
    --accent-soft: rgba(217, 168, 95, 0.18);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius-lg: 34px;
    --radius-md: 22px;
    --radius-sm: 14px;
    --max: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(217, 168, 95, 0.14), transparent 34rem),
        radial-gradient(circle at 80% 12%, rgba(255, 255, 255, 0.08), transparent 28rem),
        linear-gradient(135deg, #0a0d0c 0%, #12160f 52%, #060706 100%);
    line-height: 1.65;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.28;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 62px 62px;
    mask-image: linear-gradient(to bottom, black, transparent 82%);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

.skip-link {
    position: fixed;
    left: 1rem;
    top: 1rem;
    transform: translateY(-150%);
    background: var(--text);
    color: var(--bg);
    padding: 0.75rem 1rem;
    border-radius: 999px;
    z-index: 100;
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.section-shell {
    width: min(var(--max), calc(100% - 40px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    width: min(var(--max), calc(100% - 40px));
    margin: 0 auto;
    padding: 18px 0;
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.86rem;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent-soft), rgba(255,255,255,0.06));
    color: var(--accent);
    font-weight: 900;
    letter-spacing: 0.08em;
    box-shadow: var(--shadow);
}

.brand-copy {
    display: grid;
    gap: 0;
}

.brand-copy strong {
    font-size: 0.98rem;
    letter-spacing: 0.02em;
}

.brand-copy span {
    color: var(--muted);
    font-size: 0.82rem;
}

.nav-links {
    display: flex;
    gap: 0.7rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    padding: 0.58rem 0.86rem;
    border: 1px solid transparent;
    border-radius: 999px;
    transition: 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--text);
    border-color: var(--line);
    background: rgba(255,255,255,0.06);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.68fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
    min-height: calc(100vh - 90px);
    padding: clamp(3rem, 8vw, 7rem) 0;
}

.overline {
    margin: 0 0 1rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 800;
    font-size: 0.78rem;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 0.98;
    letter-spacing: -0.055em;
}

h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(4.2rem, 11vw, 10.6rem);
    max-width: 900px;
}

h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.45rem, 6vw, 5.3rem);
}

h3 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.72rem, 3vw, 2.6rem);
}

.hero-subtitle {
    margin: 1.6rem 0 0;
    color: var(--text);
    font-size: clamp(1.25rem, 2.8vw, 2.1rem);
    line-height: 1.23;
    max-width: 760px;
}

.hero-lead {
    margin: 1.5rem 0 0;
    max-width: 760px;
    color: var(--muted);
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 2rem;
}

.primary-action,
.secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 1.2rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 850;
    transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.primary-action {
    background: var(--accent);
    color: #17110a;
}

.secondary-action {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(255,255,255,0.05);
}

.primary-action:hover,
.secondary-action:hover {
    transform: translateY(-2px);
}

.hero-card {
    position: relative;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(255,255,255,0.10), rgba(255,255,255,0.035));
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 20% 0%, rgba(217, 168, 95, 0.22), transparent 16rem);
}

.hero-photo {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #1b1d18;
    max-height: 500px;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4 / 5;
    filter: saturate(0.95) contrast(1.04);
}

.hero-metrics {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    overflow: hidden;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--line);
}

.hero-metrics div {
    padding: 1rem;
    background: rgba(12, 15, 13, 0.74);
}

.hero-metrics strong {
    display: block;
    color: var(--text);
    font-size: 1.7rem;
    line-height: 1;
}

.hero-metrics span {
    color: var(--muted);
    font-size: 0.82rem;
}

.story,
.archive {
    padding: clamp(3.5rem, 8vw, 7rem) 0;
}

.section-heading {
    max-width: 900px;
    margin-bottom: 2rem;
}

.section-heading p:not(.overline) {
    color: var(--muted);
    font-size: 1.04rem;
}

.story-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

.timeline-card {
    position: sticky;
    top: 96px;
    padding: 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.055);
    box-shadow: var(--shadow);
}

.timeline-card span {
    display: inline-flex;
    margin-top: 1rem;
    color: var(--accent);
    font-weight: 900;
    font-size: 1.05rem;
}

.timeline-card span:first-child {
    margin-top: 0;
}

.timeline-card p {
    margin: 0.28rem 0 0;
    color: var(--muted);
    font-size: 0.94rem;
}

.story-text {
    display: grid;
    gap: 1rem;
}

.story-chapter {
    padding: clamp(1.2rem, 3vw, 2rem);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.055);
}

.story-chapter h3 {
    margin-bottom: 1rem;
}

.story-chapter p {
    margin: 0;
    color: #ddd7cd;
    font-size: 1.02rem;
}

.story-chapter p + p {
    margin-top: 1rem;
}

.archive-heading {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.4rem;
    align-items: end;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-end;
}

.filter-button {
    display: grid;
    grid-template-columns: auto auto;
    gap: 0.75rem;
    align-items: center;
    min-height: 50px;
    padding: 0 0.95rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255,255,255,0.05);
    text-decoration: none;
    transition: 0.2s ease;
}

.filter-button strong {
    display: grid;
    place-items: center;
    min-width: 32px;
    height: 32px;
    border-radius: 999px;
    color: var(--text);
    background: rgba(255,255,255,0.09);
    font-size: 0.86rem;
}

.filter-button.is-active,
.filter-button:hover,
.filter-button:focus {
    color: #17110a;
    background: var(--accent);
    border-color: transparent;
}

.filter-button.is-active strong,
.filter-button:hover strong,
.filter-button:focus strong {
    color: #17110a;
    background: rgba(0,0,0,0.08);
}

.gallery-panel {
    display: none;
}

.gallery-panel.is-active {
    display: block;
}

.panel-intro {
    display: grid;
    gap: 0.4rem;
    margin: 1.5rem 0 1.1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--line);
}

.panel-intro p {
    margin: 0;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.74rem;
    font-weight: 900;
}

.panel-intro h3 {
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.panel-intro span {
    color: var(--muted);
    max-width: 760px;
}

.masonry-grid {
    column-count: 3;
    column-gap: 18px;
}

.archive-tile {
    display: inline-block;
    width: 100%;
    margin: 0 0 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255,255,255,0.06);
    box-shadow: 0 18px 54px rgba(0,0,0,0.18);
    break-inside: avoid;
    transform: translateZ(0);
}

.archive-tile a {
    display: block;
    overflow: hidden;
    background: rgba(255,255,255,0.035);
}

.archive-tile img {
    width: 100%;
    height: auto;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.archive-tile:hover img {
    transform: scale(1.025);
    filter: contrast(1.03) saturate(1.03);
}

.archive-tile figcaption {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    padding: 0.85rem 0.95rem 1rem;
}

.archive-tile figcaption strong {
    color: var(--text);
    font-size: 0.94rem;
    line-height: 1.3;
}

.archive-tile figcaption span {
    color: var(--accent);
    white-space: nowrap;
    font-size: 0.86rem;
    font-weight: 900;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 5vw;
    background: rgba(0, 0, 0, 0.86);
    backdrop-filter: blur(14px);
}

.lightbox[hidden] {
    display: none;
}

.lightbox-inner {
    display: grid;
    justify-items: center;
    gap: 1rem;
    max-width: min(1180px, 100%);
    max-height: 100%;
}

.lightbox img {
    max-height: 78vh;
    width: auto;
    border-radius: 18px;
    box-shadow: 0 26px 90px rgba(0,0,0,0.7);
    background: #161616;
}

.lightbox p {
    margin: 0;
    color: var(--text);
    text-align: center;
    font-weight: 800;
}

.lightbox a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 850;
}

.lightbox-close {
    position: fixed;
    top: 18px;
    right: 18px;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 999px;
    color: var(--text);
    background: rgba(255,255,255,0.08);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.site-footer {
    padding: 2rem 0 3rem;
    color: var(--muted);
    font-size: 0.95rem;
}

@media (max-width: 1050px) {
    .hero,
    .story-layout,
    .archive-heading {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
        padding-top: 4rem;
    }

    .hero-card {
        max-width: 680px;
    }

    .timeline-card {
        position: static;
    }

    .filter-buttons {
        justify-content: flex-start;
    }

    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 660px) {
    .section-shell,
    .site-header {
        width: min(100% - 28px, var(--max));
    }

    .site-header {
        align-items: flex-start;
    }

    .nav-links {
        display: none;
    }

    h1 {
        font-size: clamp(3.5rem, 19vw, 5.2rem);
    }

    .hero-subtitle {
        font-size: 1.18rem;
    }

    .hero-actions,
    .filter-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .primary-action,
    .secondary-action,
    .filter-button {
        width: 100%;
    }

    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .masonry-grid {
        column-count: 1;
    }

    .story-chapter {
        border-radius: 18px;
    }

    .archive-tile {
        border-radius: 18px;
    }

    .lightbox {
        padding: 64px 14px 24px;
    }

    .lightbox img {
        max-height: 70vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}
