/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #0f0f0f;
    --bg-light: #151515;
    --bg-card: #1a1a1a;
    --text: #e8e8e8;
    --text-dim: #999;
    --text-muted: #666;
    --gold: #c9a962;
    --gold-dim: rgba(201, 169, 98, 0.3);
    --gold-glow: rgba(201, 169, 98, 0.15);
    --border: rgba(255, 255, 255, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 300;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--gold);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button {
    font-family: inherit;
    cursor: pointer;
    background: none;
    border: none;
    color: inherit;
}

h1,
h2,
h3,
h4 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    line-height: 1.3;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.2rem 2rem;
    background: linear-gradient(to bottom, rgba(15, 15, 15, 0.98), rgba(15, 15, 15, 0.9) 60%, transparent);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text);
    text-decoration: none;
}

.main-nav {
    display: flex;
    gap: 2.5rem;
}

.main-nav a {
    font-size: 0.9rem;
    color: var(--text-dim);
    transition: color 0.2s;
    letter-spacing: 0.02em;
    text-decoration: none;
}

.main-nav a:hover {
    color: var(--gold);
}

.lang-btn {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 0.5rem 1rem;
    border: 1px solid var(--text-muted);
    color: var(--text-dim);
    transition: all 0.2s;
}

.lang-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* Opening / Hero */
.opening {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
}

.opening-photo {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.opening-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    opacity: 0.4;
    filter: grayscale(30%);
}

.opening-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            var(--bg) 0%,
            transparent 30%,
            transparent 60%,
            var(--bg) 100%);
}

.opening-text {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 700px;
}

.opening-text .dates {
    font-size: 1rem;
    color: var(--gold);
    letter-spacing: 0.4em;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.opening-text h1 {
    font-size: clamp(2.5rem, 7vw, 4rem);
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.opening-text .epitaph {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    color: var(--gold);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.opening-text .quote {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.2rem;
    color: var(--text-dim);
}

/* Intro Section */
.intro-section {
    padding: 5rem 2rem;
    background: var(--bg);
}

.intro-lead {
    font-size: 1.4rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.intro-section p {
    margin-bottom: 1.2rem;
    color: var(--text-dim);
}

.intro-section strong {
    color: var(--gold);
    font-weight: 600;
}

/* Content Sections */
.content-section {
    padding: 5rem 2rem;
}

.content-section.alt-bg {
    background: var(--bg-light);
}

.content-section h2 {
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gold-dim);
}

.content-section h3 {
    font-size: 1.5rem;
    color: var(--text);
    margin: 2.5rem 0 1rem;
}

.content-section h4 {
    font-size: 1.2rem;
    color: var(--gold);
    margin: 2rem 0 0.8rem;
}

.content-section p {
    margin-bottom: 1.2rem;
    color: var(--text-dim);
}

.content-section strong {
    color: var(--text);
    font-weight: 600;
}

.content-section em {
    font-style: italic;
    color: var(--text);
}

/* Tables */
.timeline-table,
.repertoire-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.timeline-table th,
.repertoire-table th {
    text-align: left;
    padding: 1rem;
    background: var(--bg-card);
    color: var(--gold);
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--gold-dim);
}

.timeline-table td,
.repertoire-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
    vertical-align: top;
}

.timeline-table td:first-child {
    color: var(--gold);
    font-weight: 600;
    white-space: nowrap;
    width: 100px;
}

.repertoire-table td:first-child {
    color: var(--text);
    font-weight: 400;
    width: 160px;
}

/* Pillar Sections */
.pillar-section {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--bg-card);
    border-left: 3px solid var(--gold);
}

.pillar-section h3 {
    margin-top: 0;
    color: var(--gold);
}

/* Analysis List */
.analysis-list {
    list-style: none;
    margin: 1.5rem 0;
}

.analysis-list li {
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--bg-card);
    border-left: 3px solid var(--gold-dim);
}

.analysis-list li strong {
    color: var(--gold);
}

/* Case Studies */
.case-study {
    margin: 2.5rem 0;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.case-study h3 {
    margin-top: 0;
    color: var(--gold);
    font-size: 1.3rem;
}

/* Albums */
.albums {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-top: 3rem;
}

.album {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 2rem;
    align-items: start;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--border);
}

.album:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.album-cover {
    aspect-ratio: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-content h3 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
    color: var(--text);
}

.album-content h3 span {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 1rem;
    margin-left: 0.75rem;
}

.album-note {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.tracklist {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.3rem 2rem;
}

.tracklist li {
    font-size: 0.9rem;
    color: var(--text-dim);
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.tracklist li::before {
    content: "▶";
    font-size: 0.6rem;
    color: var(--gold-dim);
    transition: color 0.2s;
}

.tracklist li:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.tracklist li:hover::before {
    color: var(--gold);
}

.tracklist li.playing {
    color: var(--gold);
    background: var(--gold-glow);
}

.tracklist li.playing::before {
    color: var(--gold);
}

/* Conclusion */
.conclusion-section {
    padding: 5rem 2rem;
    background: linear-gradient(to bottom, var(--bg-light), var(--bg));
}

.conclusion-section h2 {
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 2rem;
    text-align: center;
}

.conclusion-section p {
    margin-bottom: 1.5rem;
    color: var(--text-dim);
    font-size: 1.05rem;
}

.final-quote {
    margin: 3rem 0 0;
    padding: 2rem;
    background: var(--gold-glow);
    border-left: 4px solid var(--gold);
    text-align: center;
}

.final-quote p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text);
    margin: 0;
    line-height: 1.7;
}

/* Footer */
.site-footer {
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
}

.footer-dates {
    font-size: 0.95rem;
    color: var(--text-dim);
}

/* Player */
.player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(15, 15, 15, 0.98), rgba(25, 25, 25, 0.95));
    backdrop-filter: blur(20px);
    padding: 1rem 2rem;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    z-index: 200;
    border-top: 1px solid var(--gold-dim);
}

.player.active {
    transform: translateY(0);
}

.player-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.player-info {
    flex: 0 0 220px;
    min-width: 0;
}

.player-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.player-controls button {
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
    color: var(--text-dim);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-controls button:hover {
    color: var(--gold);
}

.play-btn {
    width: 52px !important;
    height: 52px !important;
    border: 2px solid var(--gold) !important;
    border-radius: 50%;
    font-size: 1rem !important;
    color: var(--gold) !important;
    background: var(--gold-glow);
}

.play-btn:hover {
    background: rgba(201, 169, 98, 0.25) !important;
    transform: scale(1.05);
}

.player-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-progress span {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
    min-width: 40px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dim), var(--gold));
    width: 0;
    transition: width 0.1s linear;
}

/* Responsive */
@media (max-width: 768px) {
    .site-header {
        padding: 1rem;
    }

    .main-nav {
        display: none;
    }

    .opening-text h1 {
        font-size: 2.2rem;
    }

    .content-section,
    .intro-section,
    .conclusion-section {
        padding: 3rem 1.5rem;
    }

    .timeline-table,
    .repertoire-table {
        font-size: 0.85rem;
    }

    .timeline-table th,
    .timeline-table td,
    .repertoire-table th,
    .repertoire-table td {
        padding: 0.75rem 0.5rem;
    }

    .album {
        grid-template-columns: 120px 1fr;
        gap: 1.5rem;
    }

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

    .player-inner {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .player-info {
        flex: 1;
        min-width: 0;
    }

    .player-progress {
        order: 3;
        width: 100%;
    }
}

/* Language Toggling */
html[lang="ru"] .lang-en {
    display: none !important;
}

html[lang="en"] .lang-ru {
    display: none !important;
}

/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    border: 1px solid var(--accent-gold);
    padding: 5px;
    background: rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 3/4;
}

.gallery-item.wide {
    grid-column: span 2;
}

.gallery-item.wide img {
    aspect-ratio: 16/9;
}

.gallery-caption {
    position: absolute;
    bottom: 5px;
    left: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--accent-gold);
    padding: 0.5rem;
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
}

@media (max-width: 768px) {
    .gallery-item.wide {
        grid-column: span 1;
    }
}