*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg: #f5f7fa;
    --surface: #ffffff;
    --surface-alt: #f8fafc;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 18px 40px rgba(15, 23, 42, 0.14);
    --radius: 18px;
    --radius-sm: 12px;
    --max-width: 1200px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -3rem;
    z-index: 1000;
    background: #111827;
    color: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
}

.wrapper {
    min-height: 100vh;
}

.header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-content {
    width: min(100% - 2rem, var(--max-width));
    margin: 0 auto;
    padding: 2rem 0 3rem;
}

.gallery-intro {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem 0 0.5rem;
}

.gallery-intro h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
}

.gallery-intro p {
    margin: 0 auto;
    max-width: 42rem;
    font-size: 1rem;
    color: var(--muted);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.gallery-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition:
            transform 0.25s ease,
            box-shadow 0.25s ease,
            border-color 0.25s ease;
}

.gallery-card:hover,
.gallery-card:focus-within {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: #d1d5db;
}

.gallery-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
}

.gallery-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--surface-alt);
}

.gallery-caption {
    padding: 1rem 1rem 1.1rem;
}

.gallery-caption h2 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    line-height: 1.2;
}

.gallery-caption p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--muted);
}

.gallery-link:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: -3px;
    border-radius: var(--radius);
}

.footer {
    margin-top: 2rem;
    background: #0f172a;
    color: #ffffff;
    padding: 2.5rem 1rem;
}

.contain {
    width: min(100%, 1200px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.footer .col,
.footer .social {
    width: auto;
    padding: 0;
}

.footer .col h1,
.footer .social h1 {
    margin: 0 0 1rem;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.footer .col ul,
.footer .social ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer .col ul li,
.footer .social ul li {
    margin: 0 0 0.6rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #e5e7eb;
}

.footer .col a {
    color: #e5e7eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer .col a:hover,
.footer .col a:focus-visible {
    color: #ffffff;
}

.footer .social ul {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer .social ul li {
    margin: 0;
}

.footer .social img {
    width: 32px;
    height: 32px;
    display: block;
}

.clearfix {
    display: none;
}

@media (max-width: 700px) {
    .main-content {
        width: min(100% - 1rem, var(--max-width));
        padding: 1.5rem 0 2.5rem;
    }

    .gallery-grid {
        gap: 1rem;
    }

    .gallery-caption {
        padding: 0.9rem;
    }

    .footer {
        padding: 2rem 1rem;
    }

    .contain {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }
}

@media (max-width: 520px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .contain {
        grid-template-columns: 1fr;
    }

    .gallery-intro {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}