/* Reset & Variables */
:root {
    --bg-primary: #0a0a0c;
    --bg-secondary: #121215;
    --gold-primary: #d4af37;
    --gold-secondary: #b8972e;
    --gold-light: #f7e7c4;
    --gold-dark: #8c6e1c;
    --gold-glow: rgba(212, 175, 55, 0.15);
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;
    --border-color: rgba(212, 175, 55, 0.15);
    --font-serif: 'Noto Serif SC', 'Playfair Display', Georgia, "Times New Roman", serif;
    --font-sans: 'Noto Sans SC', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    background-image: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.04) 0%, transparent 50%);
    color: var(--text-primary);
    font-family: var(--font-serif);
    line-height: 2.0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    padding: 4rem 1.5rem;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--gold-dark);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold-primary);
}

/* Container */
.memorial-container {
    max-width: 760px;
    margin: 0 auto;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 50px rgba(212, 175, 55, 0.02);
    border-radius: 8px;
    padding: 4rem 3.5rem;
    position: relative;
}

.memorial-container::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px solid rgba(212, 175, 55, 0.05);
    pointer-events: none;
    border-radius: 6px;
}

/* Header */
.memorial-header {
    text-align: center;
    margin-bottom: 3rem;
}

.mourn-badge {
    display: inline-block;
    border: 1px solid var(--border-color);
    background: rgba(212, 175, 55, 0.05);
    color: var(--gold-light);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.3rem 1.2rem;
    border-radius: 50px;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    font-family: var(--font-sans);
}

.memorial-title {
    font-size: 2.8rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.memorial-subtitle {
    font-size: 1.1rem;
    color: var(--gold-primary);
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* Portrait */
.portrait-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.gold-frame {
    position: relative;
    padding: 10px;
    background: linear-gradient(135deg, #18181c, #0c0c0e);
    border: 1px solid var(--border-color);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    transition: var(--transition-smooth);
    max-width: 280px;
}

.gold-frame::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    pointer-events: none;
}

.portrait-img {
    display: block;
    width: 100%;
    height: auto;
    filter: grayscale(20%) contrast(102%);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

.gold-frame:hover {
    border-color: var(--gold-primary);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 25px rgba(212, 175, 55, 0.05);
}

.gold-frame:hover .portrait-img {
    filter: grayscale(0%) contrast(100%);
}

/* Official Titles */
.titles-section {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    font-family: var(--font-sans);
    letter-spacing: 0.05em;
}

.titles-section p {
    margin-bottom: 0.5rem;
}

/* Gold Divider */
.gold-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color) 20%, var(--gold-primary) 50%, var(--border-color) 80%, transparent);
    margin: 0 auto 3rem;
}

/* Biography Text */
.biography-content {
    font-size: 1.15rem;
    color: var(--text-primary);
    text-align: justify;
}

.biography-content p {
    text-indent: 2.3em;
    margin-bottom: 2.2rem;
    letter-spacing: 0.02em;
}

/* Last paragraph spacing */
.biography-content p:last-child {
    margin-bottom: 0;
}

/* Highlight important terms in original text (optional but elegant) */
.biography-content b, 
.biography-content strong {
    color: var(--gold-light);
    font-weight: 600;
}

/* Footer */
.memorial-footer {
    text-align: center;
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.memorial-footer p {
    font-size: 0.95rem;
    color: var(--gold-primary);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-weight: 500;
}

/* Responsiveness */
@media (max-width: 768px) {
    body {
        padding: 2rem 1rem;
    }
    
    .memorial-container {
        padding: 3rem 1.8rem;
    }
    
    .memorial-title {
        font-size: 2.2rem;
    }
    
    .biography-content {
        font-size: 1.05rem;
        line-height: 1.9;
    }
    
    .biography-content p {
        text-indent: 2.1em;
        margin-bottom: 1.8rem;
    }
    
    .titles-section {
        font-size: 0.95rem;
    }
}
