/* --- Esoteric Homepage Styles --- */
:root {
    --bg-color: #120c18;
    --text-color: #e0d8f0;
    --primary-glow: rgba(200, 162, 200, 0.7); /* Lilac Glow */
    --secondary-glow: rgba(0, 188, 212, 0.6);
    --card-bg: rgba(26, 18, 36, 0.85);
    --border-color: rgba(200, 162, 200, 0.3);
}

body {
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at top right, rgba(200, 162, 200, 0.1), transparent 40%),
                      radial-gradient(circle at bottom left, rgba(0, 188, 212, 0.1), transparent 40%);
    color: var(--text-color);
    font-family: 'Arimo', 'Noto Sans Symbols', sans-serif; /* Matched font */
    margin: 0;
    overflow-x: hidden;
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.glyph {
    position: absolute;
    color: var(--primary-glow);
    font-size: 20px;
    opacity: 0;
    animation: floatUp 15s infinite linear;
    user-select: none;
}

/* --- Keyframe Animation for Floating Glyphs --- */
@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10%, 90% {
        opacity: 0.2;
    }
    100% {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}

/* Staggering animations for different glyphs */
.glyph:nth-child(1) { left: 5%; animation-delay: -2s; }
.glyph:nth-child(2) { left: 15%; animation-delay: -5s; font-size: 24px; }
.glyph:nth-child(3) { left: 25%; animation-delay: 0s; }
.glyph:nth-child(4) { left: 35%; animation-delay: -10s; font-size: 18px; }
.glyph:nth-child(5) { left: 45%; animation-delay: -1s; }
.glyph:nth-child(6) { left: 55%; animation-delay: -7s; font-size: 22px; }
.glyph:nth-child(7) { left: 65%; animation-delay: -3s; }
.glyph:nth-child(8) { left: 75%; animation-delay: -12s; font-size: 20px; }
.glyph:nth-child(9) { left: 85%; animation-delay: -4s; }
.glyph:nth-child(10) { left: 95%; animation-delay: -8s; font-size: 25px; }
.glyph:nth-child(11) { left: 10%; animation-delay: -11s; color: var(--secondary-glow); }
.glyph:nth-child(12) { left: 50%; animation-delay: -6s; color: var(--secondary-glow); }
.glyph:nth-child(13) { left: 80%; animation-delay: -9s; color: var(--secondary-glow); }
.glyph:nth-child(14) { left: 20%; animation-delay: -13s; color: var(--secondary-glow); }
.glyph:nth-child(15) { left: 70%; animation-delay: -15s; color: var(--secondary-glow); }


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.main-header {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.seal-container {
    margin-bottom: 1.5rem;
}

.seal-image {
    border-radius: 50%;
    border: 2px solid var(--border-color);
    box-shadow: 0 0 15px var(--primary-glow);
    animation: pulse 4s infinite ease-in-out;
    transition: transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 15px var(--primary-glow); }
    50% { box-shadow: 0 0 30px var(--primary-glow), 0 0 10px var(--secondary-glow); }
}

.seal-image:hover {
    transform: rotate(360deg);
    animation-play-state: paused;
    box-shadow: 0 0 30px var(--primary-glow), 0 0 50px var(--secondary-glow);
}


.main-header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 2px;
    text-shadow: 0 0 8px var(--primary-glow), 0 0 2px #fff;
}

.main-header .subtitle {
    font-size: 1.2rem;
    color: #bca0dc;
    margin: 0.5rem 0 0 0;
    font-family: 'Arimo', monospace;
    font-style: italic;
}

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

.portal-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.portal-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.portal-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(200, 162, 200, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.portal-card:hover:before {
    animation: glowing-border 2s infinite linear;
}

@keyframes glowing-border {
    0% { border-color: var(--primary-glow); }
    50% { border-color: var(--secondary-glow); }
    100% { border-color: var(--primary-glow); }
}

.portal-icon {
    font-size: 2.5rem;
    color: #c8a2c8;
    text-shadow: 0 0 10px var(--primary-glow);
    min-width: 60px;
    text-align: center;
}

.portal-content h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: #e0d8f0;
    font-weight: 700;
}

.portal-content p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #bca0dc;
}
