:root {
    --bg-main: #FFF8F0;
    --bg-soft: #F5E6D3;
    --bg-card: #FFFBF5;
    --accent: #D4A574;
    --accent-hover: #C4955F;
    --text-dark: #3D2B1F;
    --text-body: #5C4A3D;
    --text-light: #8B6F5E;
    --border: #E8D8C8;
    --white: #FFFDFB;
    --shadow: rgba(61, 43, 31, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lora', Georgia, serif;
    background-color: var(--bg-main);
    color: var(--text-body);
    line-height: 1.7;
    min-height: 100vh;
}

.lang-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 2px;
    background: rgba(255, 248, 240, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 6px;
    padding: 2px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px var(--shadow);
}

.lang-btn {
    background: none;
    border: none;
    padding: 4px 10px;
    font-family: 'Lora', Georgia, serif;
    font-size: 11px;
    color: var(--text-light);
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.lang-btn:hover {
    color: var(--text-dark);
}

.lang-btn.active {
    background: var(--accent);
    color: var(--white);
}

.hero-photo-section {
    width: 100%;
    display: flex;
    justify-content: center;
    background: #1a1410;
    padding: 0;
}

.hero-photo {
    width: 100%;
    max-width: 600px;
    max-height: 100vh;
    object-fit: contain;
    object-position: center;
    filter: grayscale(100%);
    display: block;
}

@media (max-width: 640px) {
    .hero-photo {
        max-width: 100%;
    }
}

.hero-text {
    text-align: center;
    padding: 60px 24px 48px;
    background: var(--bg-main);
}

.name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 300;
    color: var(--text-dark);
    letter-spacing: 3px;
    margin-bottom: 12px;
}

.dates {
    font-size: 18px;
    color: var(--text-light);
    letter-spacing: 3px;
    font-weight: 400;
    margin-bottom: 32px;
}

.divider {
    width: 60px;
    height: 1px;
    background: var(--accent);
    margin: 0 auto 32px;
}

.description {
    max-width: 560px;
    font-size: 17px;
    line-height: 1.9;
    color: var(--text-body);
    font-style: italic;
    margin: 0 auto;
}

.gallery-link-wrap {
    text-align: center;
    padding: 0 24px 48px;
}

.gallery-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    font-family: 'Lora', Georgia, serif;
    font-size: 14px;
    color: var(--text-light);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 24px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.gallery-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.memories-section {
    padding: 0 24px 40px;
}

.memories-header {
    text-align: center;
    margin-bottom: 40px;
}

.memories-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 300;
    color: var(--text-dark);
    letter-spacing: 1px;
}

.memories-container {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.memory-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px var(--shadow);
}

.memory-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-body);
    margin-bottom: 16px;
    font-style: italic;
}

.memory-author {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--accent);
    text-align: right;
}

.memory-date {
    font-size: 13px;
    color: var(--text-light);
    text-align: right;
    margin-top: 4px;
}

.visitor-card {
    border-left: 3px solid var(--accent);
}

#visitor-memories-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.memory-form-section {
    padding: 20px 24px 60px;
}

.memory-form-container {
    max-width: 520px;
    margin: 0 auto;
}

.memory-form-heading {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 24px;
    font-weight: 300;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 24px;
}

.memory-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.memory-input,
.memory-textarea {
    width: 100%;
    padding: 14px 18px;
    font-family: 'Lora', Georgia, serif;
    font-size: 15px;
    color: var(--text-body);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.3s ease;
    resize: vertical;
}

.memory-input::placeholder,
.memory-textarea::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.memory-input:focus,
.memory-textarea:focus {
    border-color: var(--accent);
}

.memory-submit-btn {
    align-self: center;
    padding: 12px 40px;
    font-family: 'Lora', Georgia, serif;
    font-size: 15px;
    color: var(--white);
    background: var(--accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    letter-spacing: 0.5px;
}

.memory-submit-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.memory-form-thanks {
    text-align: center;
    font-size: 15px;
    color: var(--accent);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.memory-form-thanks.visible {
    opacity: 1;
}

.page-header {
    text-align: center;
    padding: 120px 24px 60px;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(212, 165, 116, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.page-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 300;
    color: var(--text-dark);
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.page-subtitle {
    font-size: 16px;
    color: var(--text-light);
    font-style: italic;
}

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 90;
    background: rgba(255, 248, 240, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
}

.top-nav-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 56px;
    gap: 32px;
}

.top-nav-home {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-dark);
    text-decoration: none;
    white-space: nowrap;
}

.top-nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.top-nav-links a {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.top-nav-links a:hover,
.top-nav-links a.active {
    color: var(--accent);
}

.bio-section {
    padding: 0 24px 40px;
}

.bio-inner {
    max-width: 640px;
    margin: 0 auto;
}

.bio-text {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-body);
    text-align: left;
    white-space: pre-line;
}

.footer {
    text-align: center;
    padding: 32px 24px;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 14px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
    .nav-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .nav-grid-two {
        grid-template-columns: 1fr;
    }

    .nav-card {
        padding: 24px 20px;
    }

    .memory-card {
        padding: 24px 20px;
    }

    .photo-frame {
        width: 200px;
        height: 270px;
    }

    .lang-switcher {
        top: 12px;
        right: 12px;
    }

    .lang-btn {
        padding: 3px 8px;
        font-size: 10px;
    }

    .top-nav-inner {
        gap: 16px;
    }

    .top-nav-links {
        gap: 14px;
    }

    .top-nav-links a {
        font-size: 13px;
    }

    .top-nav-home {
        font-size: 16px;
    }
}
