:root {
    --bg: #f7f3ef;
    --bg-strong: #efe5dd;
    --card: rgba(255, 255, 255, 0.78);
    --card-solid: #fffaf6;
    --text: #2b1d1a;
    --muted: #6f5b55;
    --accent: #c94d3f;
    --accent-dark: #8f2f28;
    --accent-soft: #f4d7d2;
    --border: rgba(120, 70, 60, 0.15);
    --shadow: 0 18px 40px rgba(62, 28, 18, 0.12);
    --radius: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top, #fff 0%, var(--bg) 42%, #efe1d8 100%);
}

img, iframe, audio {
    max-width: 100%;
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

header,
footer {
    width: 100%;
    color: #fff;
    text-align: center;
    padding: 1.25rem 1rem;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    box-shadow: 0 8px 24px rgba(146, 53, 44, 0.2);
}

header h1 {
    font-size: clamp(1.8rem, 2.8vw, 3rem);
    letter-spacing: 0.03em;
}

nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(44, 20, 16, 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0.65rem 1rem;
}

nav ul li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.05rem;
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

nav ul li a:hover,
nav ul li a:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
    outline: none;
}

main {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 1.5rem;
}

.content {
    width: min(1180px, 100%);
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: stretch;
}

section,
article,
aside {
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    padding: 1.2rem;
    backdrop-filter: blur(6px);
}

section,
article {
    flex: 1 1 360px;
}

aside {
    flex: 1 1 260px;
}

h2,
h3 {
    margin-bottom: 0.8rem;
    line-height: 1.2;
}

p {
    line-height: 1.65;
    color: var(--text);
    margin-bottom: 0.85rem;
}

mark {
    background: linear-gradient(120deg, var(--accent-soft), #fff2ef);
    color: inherit;
    padding: 0.08rem 0.24rem;
    border-radius: 0.35rem;
}

details {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--accent-dark);
    list-style: none;
    margin-bottom: 0.75rem;
}

summary::-webkit-details-marker {
    display: none;
}

figure {
    margin: 0;
}

figure img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 18px;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    box-shadow: 0 12px 30px rgba(62, 28, 18, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

figcaption {
    margin-top: 0.7rem;
    font-size: 0.95rem;
    color: var(--muted);
    text-align: center;
}

.content > section > figure + figure,
.content > article > figure + figure,
.content > aside > figure + figure {
    margin-top: 1rem;
}

/* Gallery pages */
.gallery-grid,
.video-grid,
.audio-grid {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.gallery-grid figure,
.video-grid .video-card,
.audio-grid .audio-card {
    flex: 1 1 300px;
}

.gallery-grid figure img {
    aspect-ratio: 1 / 1;
}

.video-card {
    padding: 0;
    overflow: hidden;
}

.video-card iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    border-radius: 0;
}

.video-card figcaption {
    margin: 0;
    padding: 1rem 1rem 1.15rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(251,244,240,0.98));
    text-align: left;
}

.audio-grid {
    align-items: stretch;
}

.audio-card {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(248,239,234,0.95));
}

.audio-card .track-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.audio-card h2 {
    margin-bottom: 0;
    font-size: 1.2rem;
}

.audio-card p {
    margin-bottom: 0;
    color: var(--muted);
}

.audio-card audio {
    width: 100%;
    margin-top: auto;
    border-radius: 16px;
}

footer {
    margin-top: 1rem;
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    main {
        padding: 1rem;
    }

    .content {
        gap: 1rem;
    }

    section,
    article,
    aside {
        flex-basis: 100%;
    }
}

@media (max-width: 560px) {
    nav ul {
        gap: 0.35rem;
    }

    nav ul li a {
        width: 100%;
        padding-inline: 1rem;
    }

    main {
        padding: 0.85rem;
    }

    section,
    article,
    aside {
        padding: 1rem;
        border-radius: 20px;
    }

    header,
    footer {
        padding: 1rem;
    }
}
