:root {
    --bg: #f7f7f5;
    --card: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-title: #1a2a3a;
    --divider: #e0e0e0;
    --accent: #87a5b7;
    --accent-dark: #5d7a8c;
    --shadow: 0 4px 24px rgba(26, 42, 58, 0.08);
    --shadow-hover: 0 8px 40px rgba(26, 42, 58, 0.14);
    --transition: 0.6s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Noto Serif SC", "Source Han Serif CN", "SimSun", "宋体", Georgia, serif;
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.9;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html[data-lang="en"] body {
    font-family: "Georgia", "Times New Roman", "Noto Serif SC", serif;
}

/* ===== Language Switch ===== */
.lang-switch {
    position: absolute;
    top: 24px;
    right: 32px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--divider);
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 3px;
    cursor: pointer;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    font-family: inherit;
}

.lang-btn:hover {
    color: var(--accent-dark);
    border-color: var(--accent);
}

.lang-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.lang-sep {
    color: var(--divider);
    font-size: 0.8rem;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    text-align: center;
    padding: 80px 24px 56px;
    background: linear-gradient(180deg, #f0f3f5 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--divider);
}

.hero-title {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    color: var(--text-title);
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--accent-dark);
    letter-spacing: 0.15em;
    margin-bottom: 8px;
}

.hero-location {
    font-size: 0.95rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}

/* ===== Section Divider ===== */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 48px 0 24px;
}

.divider-line {
    flex: 0 1 80px;
    height: 1px;
    background: var(--divider);
}

.divider-dot {
    margin: 0 16px;
    color: var(--accent);
    font-size: 0.85rem;
}

.section-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--text-title);
    letter-spacing: 0.15em;
    margin-bottom: 32px;
}

/* ===== Biography ===== */
.biography {
    padding: 24px 0 16px;
}

.bio-content {
    max-width: 720px;
    margin: 0 auto;
    background: var(--card);
    padding: 48px 40px;
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.bio-paragraph {
    margin-bottom: 24px;
    text-indent: 2em;
    color: var(--text-primary);
    font-size: 1.02rem;
    line-height: 2;
}

.bio-closing {
    margin-top: 36px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--accent-dark);
    letter-spacing: 0.2em;
    padding-top: 24px;
    border-top: 1px solid var(--divider);
}

/* ===== Gallery / Carousel ===== */
.gallery-section {
    padding: 32px 0;
}

.carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.carousel-viewport {
    overflow: hidden;
    border-radius: 4px;
    background: var(--card);
    box-shadow: var(--shadow);
}

.carousel-track {
    display: flex;
    list-style: none;
    transition: transform var(--transition);
}

.carousel-slide {
    flex: 0 0 100%;
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.carousel-slide:hover img {
    transform: scale(1.05);
    filter: brightness(1.02);
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: linear-gradient(transparent, rgba(26, 42, 58, 0.75));
    color: #fff;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.carousel-slide:hover .slide-caption {
    opacity: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--divider);
    color: var(--text-title);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.carousel-btn:hover {
    background: #fff;
    box-shadow: var(--shadow);
}

.carousel-btn.prev {
    left: -22px;
}

.carousel-btn.next {
    right: -22px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    background: transparent;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.carousel-dots button.active {
    background: var(--accent);
    transform: scale(1.2);
}

/* ===== Lightbox ===== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 18, 26, 0.92);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 40px;
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    color: #fff;
    font-size: 2.5rem;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.3s ease;
}

.lightbox-close:hover {
    transform: scale(1.1);
}

.lightbox-caption {
    color: rgba(255, 255, 255, 0.8);
    margin-top: 16px;
    font-size: 1rem;
    letter-spacing: 0.08em;
}

/* ===== Footer ===== */
.memorial-footer {
    text-align: center;
    padding: 56px 24px 40px;
    border-top: 1px solid var(--divider);
    margin-top: 40px;
    background: linear-gradient(0deg, #eef1f3 0%, var(--bg) 100%);
}

.footer-text {
    font-size: 1.05rem;
    color: var(--text-title);
    letter-spacing: 0.2em;
    margin-bottom: 8px;
}

.footer-signature {
    font-size: 0.95rem;
    color: var(--accent-dark);
    letter-spacing: 0.15em;
    margin-bottom: 16px;
}

.footer-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.15em;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .carousel-btn.prev { left: 8px; }
    .carousel-btn.next { right: 8px; }
}

@media (max-width: 768px) {
    .hero { padding: 72px 20px 40px; }
    .hero-title { font-size: 2.2rem; letter-spacing: 0.15em; }
    .hero-subtitle { font-size: 1rem; }

    .lang-switch {
        top: 16px;
        right: 16px;
    }
    .lang-btn {
        font-size: 0.78rem;
        padding: 3px 8px;
    }

    .bio-content {
        padding: 32px 24px;
    }

    .section-title { font-size: 1.3rem; }

    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .carousel-btn.prev { left: 4px; }
    .carousel-btn.next { right: 4px; }

    .container { padding: 0 16px; }

    .carousel-slide { aspect-ratio: 1 / 1; }

    .lightbox { padding: 20px; }
    .lightbox-img { max-height: 70vh; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.8rem; }
    .bio-paragraph { font-size: 0.95rem; }
}
