:root {
    --bg-color: #0a0a0a;
    --text-color: #e0e0e0;
    --primary-neon: #00f3ff;
    /* Cyan */
    --secondary-neon: #bc13fe;
    /* Purple */
    --accent-gold: #ffd700;
    /* Gold for Intiperum/Essence */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Outfit', sans-serif;
}

[data-theme="light"] {
    --bg-color: #f0f0f0;
    --text-color: #1a1a1a;
    --primary-neon: #008b94;
    --secondary-neon: #7a00a8;
    --glass-bg: rgba(0, 0, 0, 0.05);
    --glass-border: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h1 {
    font-size: 3.5rem;
    text-shadow: 0 0 10px var(--primary-neon), 0 0 20px var(--primary-neon);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
}

/* Apple-style Layout */
.nav-links {
    display: flex;
    flex-grow: 1;
    justify-content: space-between;
    align-items: center;
    margin-left: 3rem;
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
}

.nav-left {
    gap: 2rem;
}

.nav-right {
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s, text-shadow 0.3s;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--primary-neon);
    text-shadow: 0 0 8px var(--primary-neon);
}

/* Buttons - Apple Style */
.btn {
    padding: 12px 28px;
    border: 2px solid var(--primary-neon);
    background: transparent;
    color: var(--primary-neon);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    border-radius: 25px;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
    white-space: nowrap;
}

.btn:hover {
    background: var(--primary-neon);
    color: #000;
    box-shadow: 0 4px 20px rgba(0, 243, 255, 0.4);
    transform: translateY(-2px);
}

.btn-gold {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.btn-gold:hover,
.btn.active {
    background: var(--accent-gold);
    color: #000;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
    border-color: var(--accent-gold);
    transform: translateY(-2px);
}

/* Minimalist Nav Icons */
.nav-icon-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s, transform 0.3s;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.nav-icon-btn:hover {
    color: var(--primary-neon);
    transform: scale(1.1);
    text-shadow: 0 0 10px var(--primary-neon);
}

/* Sections */
section {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 0;
}

.hero {
    text-align: center;
}

.hero p {
    font-size: 1.2rem;
    margin-top: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Cards (Characters/Works) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-neon);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
    padding: 3rem 0 1rem 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.footer-section h3 {
    color: var(--primary-neon);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #ccc;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-neon);
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-gold);
    border-radius: 50%;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s;
    text-decoration: none;
}

.social-icons a:hover {
    background: var(--accent-gold);
    color: #000;
    box-shadow: 0 0 10px var(--accent-gold);
    transform: translateY(-3px);
}

.social-icons a i {
    color: inherit;
}

/* X icon SVG styling */
.social-icons a .x-icon {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
}

/* When hovering, make it black */
.social-icons a:hover .x-icon {
    filter: brightness(0);
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    color: #888;
}

/* Utility */
.hidden {
    display: none;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        padding: 1rem 1.5rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(15px);
        padding: 2rem;
        border-bottom: 1px solid var(--glass-border);
        gap: 1.5rem;
        text-align: center;
        margin-left: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-left {
        flex-direction: column;
        width: 100%;
        gap: 1.5rem;
    }

    .nav-right {
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
        margin-top: 1rem;
        border-top: 1px solid var(--glass-border);
        padding-top: 1.5rem;
        width: 100%;
    }

    h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 1rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }

    /* Home Page Mobile Polish */
    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .hero .btn {
        display: inline-block;
        width: auto;
        min-width: 180px;
        margin: 0.5rem;
        text-align: center;
    }

    .hero>div[style*="display: flex"] {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Works Page Mobile Polish */
    .filter-btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }

    /* General Card Adjustments */
    .card {
        padding: 1.5rem;
    }

    .card h3 {
        font-size: 1.3rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    nav {
        padding: 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .logo img {
        height: 30px;
    }
}

/* Book Cover Specifics */
.card[data-category="book"] img {
    height: auto;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.book-3d {
    transform: perspective(1000px) rotateY(-10deg);
    transition: transform 0.3s ease;
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 5px 15px 15px 5px;
    /* Spine effect */
    display: block;
    margin: 0 auto;
}

.book-3d:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
    box-shadow: 0 0 20px var(--primary-neon);
}