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

:root {
    --bg-base: #f7f4ef;
    --bg-alt: #ede6dc;
    --bg-hero: #2e2a25;
    --accent: #b97745;
    --accent-dark: #8a4f23;
    --text-main: #2b2520;
    --text-muted: #5c544d;
    --border-soft: rgba(43, 37, 32, 0.15);
    --shadow: 0 20px 45px rgba(38, 32, 27, 0.15);
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-base);
    color: var(--text-main);
    line-height: 1.7;
}

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

.container {
    width: min(1100px, 90vw);
    margin: 0 auto;
}

.header {
    position: sticky;
    top: 0;
    background: rgba(247, 244, 239, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft);
    z-index: 10;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
}

.brand {
    display: flex;
    flex-direction: column;
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.3rem;
}

.brand-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-dark);
}

.brand-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.15rem;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.2rem;
    color: var(--text-muted);
    padding: 0.4rem 0.6rem;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-dark);
    border-color: var(--accent);
}

.hero {
    background: var(--bg-hero);
    color: #f6f1ea;
    padding: 4rem 0 5rem;
}

.hero-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    align-items: center;
}

.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 4vw, 3.8rem);
    margin-bottom: 1.5rem;
}

.hero-label {
    text-transform: uppercase;
    letter-spacing: 0.4rem;
    font-size: 0.85rem;
    color: rgba(246, 241, 234, 0.7);
}

.hero-lead {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: rgba(246, 241, 234, 0.85);
}

.hero-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.meta-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.3rem;
    color: rgba(246, 241, 234, 0.5);
}

.meta-value {
    font-size: 1rem;
    font-weight: 600;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--accent);
    color: #fff;
    padding: 0.9rem 1.6rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.25);
}

.portrait-frame {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.portrait-placeholder {
    border: 1px dashed rgba(255, 255, 255, 0.4);
    height: 320px;
    display: grid;
    place-items: center;
    text-align: center;
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.2rem;
    color: rgba(255, 255, 255, 0.8);
}

.portrait-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

.portrait-caption {
    font-size: 0.95rem;
    color: rgba(246, 241, 234, 0.7);
    margin-top: 1rem;
}

.section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-soft);
}

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

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 3vw, 2.8rem);
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--accent-dark);
}

.life-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.life-story {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-soft);
}

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

.fact-panel {
    background: #fff9f3;
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid rgba(185, 119, 69, 0.3);
}

.fact-panel h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 1.5rem;
}

.facts-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.facts-list span {
    font-weight: 600;
    color: var(--accent-dark);
    margin-right: 0.6rem;
}

.timeline {
    display: grid;
    gap: 1.5rem;
}

.timeline-event {
    display: grid;
    grid-template-columns: 140px auto;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 1rem;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow);
}

.timeline-year {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--accent-dark);
}

.timeline-content h3 {
    margin-bottom: 0.5rem;
}

.service-grid,
.legacy-grid,
.documents-grid,
.gallery-grid,
.sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.service-card,
.legacy-card,
.document-card,
.source-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 1.2rem;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow);
}

.service-card h3,
.legacy-card h3,
.document-card h3,
.source-card h3 {
    font-family: 'Playfair Display', serif;
    color: var(--accent-dark);
    margin-bottom: 0.8rem;
}

.service-card ul {
    padding-left: 1.1rem;
    line-height: 1.6;
}

.documents-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.document-link {
    display: inline-block;
    margin-top: 1rem;
    text-decoration: none;
    color: var(--accent-dark);
    font-weight: 600;
}

.document-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.8rem;
}

.gallery-card {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow);
}

.gallery-placeholder {
    background: linear-gradient(135deg, rgba(185, 119, 69, 0.15), rgba(46, 42, 37, 0.1));
    padding: 3rem;
    display: grid;
    place-items: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--accent-dark);
}

.gallery-card figcaption {
    padding: 1rem 1.5rem 1.5rem;
    color: var(--text-muted);
}

.sources-grid {
    gap: 1.5rem;
}

.footer {
    background: #201c18;
    color: rgba(255, 255, 255, 0.85);
    padding: 2.5rem 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.footer-note {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-link {
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.2rem;
}

/* Анимации и интерактив */
.timeline-event,
.fact-panel,
.service-card,
.legacy-card,
.document-card,
.gallery-card,
.source-card {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Адаптивность */
@media (max-width: 720px) {
    .header-inner {
        flex-direction: column;
        gap: 0.8rem;
    }

    .nav-list {
        justify-content: center;
    }

    .timeline-event {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

