@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Crimson+Pro:ital,wght@0,400;0,600;1,400&display=swap');

:root {
    --magitek-purple: #5a3a8a;
    --esper-blue: #2d5aa0;
    --empire-red: #8b1a1a;
    --crystal-gold: #d4af37;
    --ancient-stone: #2a2a3a;
    --mist-gray: #9ca3af;
    --parchment: #f4efe3;
    --shadow-deep: rgba(42, 42, 58, 0.95);
}

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

body {
    font-family: 'Crimson Pro', Georgia, serif;
    background: linear-gradient(135deg, var(--ancient-stone) 0%, #1a1a2e 50%, var(--magitek-purple) 100%);
    color: var(--parchment);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(90, 58, 138, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(45, 90, 160, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.layout-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 1rem;
    position: relative;
    z-index: 1;
}

.content {
    width: 100%;
    max-width: 820px;
    animation: fadeInUp 0.8s ease-out;
}

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

.text-container {
    border: 3px solid var(--crystal-gold);
    padding: 2.5rem;
    background: linear-gradient(to bottom, var(--shadow-deep), rgba(26, 26, 46, 0.92));
    box-shadow: 
        0 0 40px rgba(212, 175, 55, 0.3),
        inset 0 0 60px rgba(90, 58, 138, 0.2),
        0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    backdrop-filter: blur(10px);
}

.text-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--crystal-gold), var(--esper-blue), var(--magitek-purple), var(--crystal-gold));
    border-radius: inherit;
    z-index: -1;
    opacity: 0.6;
    filter: blur(8px);
}

h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--crystal-gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 
        0 0 20px rgba(212, 175, 55, 0.8),
        0 0 40px rgba(212, 175, 55, 0.4),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        text-shadow: 
            0 0 20px rgba(212, 175, 55, 0.8),
            0 0 40px rgba(212, 175, 55, 0.4),
            2px 2px 4px rgba(0, 0, 0, 0.8);
    }
    50% {
        text-shadow: 
            0 0 30px rgba(212, 175, 55, 1),
            0 0 60px rgba(212, 175, 55, 0.6),
            2px 2px 4px rgba(0, 0, 0, 0.8);
    }
}

h1 i {
    color: var(--esper-blue);
    filter: drop-shadow(0 0 10px rgba(45, 90, 160, 0.8));
}

p {
    margin-bottom: 1.2rem;
    line-height: 1.7;
    color: var(--parchment);
    font-size: 1.05rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.bio {
    color: var(--parchment);
    font-weight: 400;
}

a {
    color: var(--crystal-gold);
    text-decoration: underline;
    text-decoration-color: rgba(212, 175, 55, 0.4);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: all 0.3s ease;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

a:hover {
    text-decoration: underline;
    text-decoration-color: var(--crystal-gold);
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

.links {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.links a {
    color: var(--crystal-gold);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6));
}

.links a:hover {
    color: #ffd700;
    transform: scale(1.15) translateY(-2px);
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 1));
    text-decoration: none;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: flex-start;
    justify-content: center;
    background: rgba(26, 26, 46, 0.85);
    padding: 1.5rem 1rem;
    overflow-y: auto;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    width: min(520px, 100%);
    max-height: calc(100vh - 3rem);
    background: linear-gradient(to bottom, var(--shadow-deep), rgba(26, 26, 46, 0.95));
    color: var(--parchment);
    border: 3px solid var(--crystal-gold);
    padding: 2rem;
    overflow-y: auto;
    box-shadow: 
        0 0 40px rgba(212, 175, 55, 0.4),
        inset 0 0 40px rgba(90, 58, 138, 0.2);
}

.modal-content h2 {
    margin-bottom: 1rem;
    font-family: 'Cinzel', serif;
    color: var(--crystal-gold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
}

.modal-content p {
    margin-bottom: 1rem;
    color: var(--parchment);
    line-height: 1.6;
}

.theme-reasoning {
    font-style: italic;
    color: var(--parchment);
    border-left: 4px solid var(--esper-blue);
    background: rgba(45, 90, 160, 0.15);
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    box-shadow: inset 0 0 20px rgba(45, 90, 160, 0.1);
}

.modal-note {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border: 2px solid var(--magitek-purple);
    background: rgba(90, 58, 138, 0.2);
    color: var(--parchment);
    font-size: 0.95rem;
    box-shadow: inset 0 0 20px rgba(90, 58, 138, 0.15);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--ancient-stone);
    border: 2px solid var(--crystal-gold);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--crystal-gold);
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.modal-close:hover {
    background: var(--magitek-purple);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
}

@media (max-width: 768px) {
    .layout-container {
        padding: 1.5rem 1rem;
    }

    .text-container {
        padding: 1.75rem;
    }

    h1 {
        font-size: 2rem;
    }

    .theme-adjacent {
        flex-direction: column;
    }
}