/* Base reset and visual variables */
:root {
    --bg-color: #0b0d10;
    --panel-color: rgba(255, 255, 255, 0.06);
    --text-primary: #f6f7f9;
    --text-secondary: #b6bdc8;
    --text-muted: #7f8794;
    --border-color: rgba(255, 255, 255, 0.12);
    --shadow-color: rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background:
        radial-gradient(circle at 15% 5%, rgba(95, 122, 255, 0.20), transparent 28rem),
        radial-gradient(circle at 85% 18%, rgba(255, 152, 118, 0.16), transparent 30rem),
        linear-gradient(180deg, #11151b 0%, var(--bg-color) 42%, #07080a 100%);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

.header {
    padding: clamp(58px, 10vw, 118px) 20px clamp(34px, 6vw, 72px);
    text-align: center;
}

.header-content {
    width: min(860px, 100%);
    margin: 0 auto;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.42em;
}

.header-content h1 {
    margin: 0;
    font-size: clamp(2.35rem, 8vw, 6.8rem);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.08em;
}

.intro {
    margin: 24px auto 0;
    max-width: 620px;
    color: var(--text-secondary);
    font-size: clamp(1rem, 2.1vw, 1.22rem);
    line-height: 1.85;
    letter-spacing: 0.08em;
}

.gallery-container {
    width: min(1500px, 100%);
    margin: 0 auto;
    padding: 0 clamp(14px, 3vw, 34px) clamp(56px, 8vw, 108px);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: clamp(12px, 1.7vw, 24px);
}

.gallery-card {
    position: relative;
    grid-column: span 3;
    min-height: 310px;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: clamp(18px, 2vw, 28px);
    background: var(--panel-color);
    box-shadow: 0 22px 70px var(--shadow-color);
    isolation: isolate;
}

.gallery-card--wide {
    grid-column: span 6;
}

.gallery-card--tall {
    grid-row: span 2;
    min-height: 646px;
}

.gallery-card--square {
    min-height: 420px;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
    filter: saturate(0.96) contrast(1.04) brightness(0.88);
    transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 500ms ease;
}

.gallery-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.72));
    opacity: 0.92;
    z-index: 1;
    pointer-events: none;
}

.gallery-card figcaption {
    position: absolute;
    left: clamp(16px, 2vw, 24px);
    right: clamp(16px, 2vw, 24px);
    bottom: clamp(16px, 2vw, 24px);
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.gallery-card span {
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
}

.gallery-card strong {
    color: #fff;
    font-size: clamp(1.05rem, 1.5vw, 1.55rem);
    font-weight: 650;
    letter-spacing: 0.08em;
    text-align: right;
}

.gallery-card:hover img {
    transform: scale(1.075);
    filter: saturate(1.08) contrast(1.08) brightness(1.02);
}

.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 78px;
    padding: 24px 16px 30px;
    border-top: 1px solid var(--border-color);
    background: rgba(5, 6, 8, 0.78);
}

.icp-link {
    color: rgba(255, 255, 255, 0.58);
    font-size: 14px;
    line-height: 1.8;
    text-decoration: none;
    transition: color 180ms ease;
}

.icp-link:hover,
.icp-link:focus-visible {
    color: #fff;
    outline: none;
}

@media (max-width: 1180px) {
    .gallery-card,
    .gallery-card--wide,
    .gallery-card--square {
        grid-column: span 6;
        min-height: 340px;
    }

    .gallery-card--tall {
        grid-column: span 6;
        min-height: 560px;
    }
}

@media (max-width: 720px) {
    .header {
        padding-top: 50px;
    }

    .eyebrow {
        letter-spacing: 0.28em;
    }

    .header-content h1 {
        letter-spacing: -0.05em;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .gallery-card,
    .gallery-card--wide,
    .gallery-card--tall,
    .gallery-card--square {
        grid-column: span 1;
        grid-row: auto;
        min-height: clamp(300px, 112vw, 520px);
        border-radius: 20px;
    }

    .gallery-card figcaption {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .gallery-card strong {
        text-align: left;
    }
}

@media (max-width: 430px) {
    .gallery-container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .intro {
        letter-spacing: 0.03em;
    }

    .gallery-card,
    .gallery-card--wide,
    .gallery-card--tall,
    .gallery-card--square {
        min-height: 78vw;
    }
}
