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

/* DARK THEME (default) */
[data-theme="dark"] {
    --bg: #121212;
    --text: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #a0a0a0;
    --border: #333333;
    --surface: #1e1e1e;
}

/* LIGHT THEME */
[data-theme="light"] {
    --bg: #fafafa;
    --text: #1a1a1a;
    --text-secondary: #333333;
    --text-muted: #666666;
    --border: #cccccc;
    --surface: #ffffff;
}

html, body {
    height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Cormorant Garamond', Georgia, serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 18px;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

body.font-small { font-size: 16px; }
body.font-medium { font-size: 18px; }
body.font-large { font-size: 22px; }
body.font-xlarge { font-size: 26px; }

.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.container {
    text-align: center;
    max-width: 700px;
    width: 100%;
}

/* HEADER */
.header {
    margin-bottom: 4rem;
    animation: fadeIn 1s ease;
}

.title {
    font-size: 3.5em;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--text);
    margin-bottom: 1rem;
}

.tagline {
    font-size: 1.1em;
    font-weight: 300;
    font-style: italic;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

/* PORTALS */
.portals {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-bottom: 2rem;
}

.portal-link {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 2rem 1.5rem;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: all 0.5s ease;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.portal-link:nth-child(1) { animation-delay: 0.2s; }
.portal-link:nth-child(2) { animation-delay: 0.4s; }
.portal-link:nth-child(3) { animation-delay: 0.6s; }

.portal-link:hover {
    border-color: var(--text-muted);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.portal-title {
    font-size: 1.5em;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

.portal-description {
    font-size: 1em;
    font-weight: 300;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.portal-url {
    font-size: 0.85em;
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* CONTROLS */
.controls {
    position: fixed;
    bottom: 6rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1000;
}

.control-btn {
    width: 3rem;
    height: 3rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

/* FOOTER */
.footer {
    padding: 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-link {
    font-size: 0.9em;
    font-weight: 300;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: 0.03em;
}

.footer-link:hover {
    color: var(--text);
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-title {
    font-size: 0.9em;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.footer-text {
    font-size: 0.95em;
    font-weight: 300;
    line-height: 1.9;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.footer-text:last-of-type {
    margin-bottom: 2rem;
}

.footer-credit {
    font-size: 0.9em;
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.footer-link-inline {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.footer-link-inline:hover {
    color: var(--text);
    border-bottom-color: var(--text-muted);
}

/* PAGE STATE */
.page-state {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    animation: fadeIn 0.8s ease;
    max-width: 700px;
    text-align: left;
    padding: 2rem 1rem;
    margin: 2rem auto;
}

.page-state.active {
    display: flex;
}

.page-title {
    font-size: 1.1em;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--text);
    margin-bottom: 0.5rem;
    text-align: center;
    width: 100%;
}

.page-text {
    font-size: 1em;
    font-weight: 300;
    line-height: 1.9;
    color: var(--text-secondary);
}

.page-text p {
    margin-bottom: 1.25rem;
}

.page-text h3 {
    font-size: 1.1em;
    font-weight: 400;
    color: var(--text);
    margin-top: 2rem;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.page-text h4 {
    font-size: 1em;
    font-weight: 400;
    color: var(--text);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    letter-spacing: 0.03em;
}

.page-text em {
    color: var(--text);
    font-style: italic;
}

.page-text strong {
    color: var(--text);
    font-weight: 400;
}

.page-text ul {
    margin-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.page-text li {
    margin-bottom: 0.5rem;
}

.page-close {
    font-size: 0.9em;
    font-weight: 300;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
    margin-top: 1rem;
    letter-spacing: 0.1em;
    text-align: center;
    width: 100%;
}

.page-close:hover {
    color: var(--text);
}

/* ANIMATIONS */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Mobile */
@media (max-width: 600px) {
    .title {
        font-size: 2.5em;
    }
    
    .portals {
        gap: 2rem;
    }
    
    .portal-link {
        padding: 1.5rem 1rem;
    }
    
    .controls {
        bottom: 5rem;
        right: 1rem;
    }
    
    .control-btn {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .footer {
        padding: 1.5rem 1rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .page-state {
        padding: 1.5rem 1rem;
    }
}

