/* ==========================================
   VARIABLES & RESET
   ========================================== */

:root {
    --bg-dark: #1E1E1E;
    --accent: #B23EFF;
    --text-primary: #EDEDED;
    --text-secondary: #AAAAAA;
    --border: rgba(255, 255, 255, 0.05);
    --glow: rgba(178, 62, 255, 0.5);
    
    --font-heading: 'Space Grotesk', 'Montserrat', 'Orbitron', sans-serif;
    --font-body: 'Inter', 'Manrope', sans-serif;
    
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    letter-spacing: 0.5px;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: rgba(178, 62, 255, 0.8);
}

/* ==========================================
   LAYOUT
   ========================================== */

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

main {
    margin-top: 60px;
    padding-bottom: 40px;
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.navbar-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    font-family: var(--font-heading);
    color: var(--accent);
    transition: var(--transition);
}

.logo:hover {
    text-shadow: 0 0 20px rgba(178, 62, 255, 0.5);
}

/* Desktop Navigation */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

/* Mobile Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 0.375rem;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background-color: var(--text-secondary);
    transition: var(--transition);
    border-radius: 2px;
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero {
    padding: 120px 0 80px;
    text-align: center;
}

.hero-title {
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.cta-button {
    display: inline-block;
    padding: 12px 32px;
    min-height: 44px;
    min-width: 44px;
    background-color: var(--accent);
    color: var(--bg-dark);
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
    border: 2px solid var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.cta-button:hover {
    box-shadow: 0 0 30px rgba(178, 62, 255, 0.6);
    transform: translateY(-2px);
}

/* ==========================================
   SECTIONS GRID
   ========================================== */

.sections-grid {
    padding: 60px 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.section-card {
    position: relative;
    padding: 2rem;
    border-radius: 8px;
    background: rgba(178, 62, 255, 0.1);
    border: 1px solid var(--border);
    transition: var(--transition);
    overflow: hidden;
    cursor: pointer;
}

.section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(178, 62, 255, 0.05);
    transition: var(--transition);
}

.section-card:hover {
    border-color: rgba(178, 62, 255, 0.3);
    background: rgba(178, 62, 255, 0.15);
}

.section-card:hover::before {
    left: 100%;
}

.card-content {
    position: relative;
    z-index: 1;
}

.section-card h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.section-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.arrow {
    color: var(--accent);
    display: inline-block;
    transition: var(--transition);
    font-weight: 600;
}

.section-card:hover .arrow {
    transform: translateX(4px);
}

/* Section-specific gradients */
.games-card {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
}

.books-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(34, 211, 238, 0.1) 100%);
}

.music-card {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(239, 68, 68, 0.1) 100%);
}

.art-card {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
}

/* ==========================================
   PAGE SECTIONS
   ========================================== */

.page-header {
    padding: 80px 0 40px;
}

.page-title {
    font-size: 3.5rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.projects-section {
    padding: 60px 0;
}

.section-title {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 2rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* ==========================================
   PROJECT CARDS
   ========================================== */

.project-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    background: var(--bg-dark);
}

.project-card:hover {
    border-color: rgba(178, 62, 255, 0.3);
    background: rgba(178, 62, 255, 0.05);
}

.card-image {
    width: 100%;
    height: 180px;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
    overflow: hidden;
}

.card-image.tall {
    height: 240px;
    aspect-ratio: 7 / 6;
}

.card-image.square {
    height: 200px;
    aspect-ratio: 1;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.project-card:hover .card-image {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(236, 72, 153, 0.3));
}

.games-card .card-image {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2));
}

.books-card .card-image {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(34, 211, 238, 0.2));
}

.music-card .card-image {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(239, 68, 68, 0.2));
}

.card-body {
    padding: 1.5rem;
}

.card-body h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.card-body p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.card-eyebrow {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-dev {
    background: rgba(234, 179, 8, 0.2);
    color: #fbbf24;
}

.status-release {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.status-completed {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.status-writing {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    color: var(--accent);
    font-weight: 600;
    transition: var(--transition);
    padding: 4px;
}

.card-link:hover {
    transform: translateX(4px);
}

.card-link.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ==========================================
   GALLERY
   ========================================== */

.gallery-section {
    padding: 60px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.gallery-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.gallery-item:hover {
    border-color: rgba(178, 62, 255, 0.3);
    box-shadow: 0 0 20px rgba(178, 62, 255, 0.2);
}

.gallery-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.gallery-image {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.gallery-item:hover .gallery-image {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(16, 185, 129, 0.3));
}

/* ==========================================
   LIGHTBOX
   ========================================== */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.open {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    position: relative;
    max-width: 800px;
    width: 90%;
    animation: fadeIn 0.3s ease-out;
}

.lightbox-image {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(16, 185, 129, 0.3));
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

#currentImage {
    transition: opacity 0.3s ease;
}

.lightbox-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    background: none;
    border: none;
    color: var(--accent);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    user-select: none;
}

.lightbox-btn:hover {
    color: rgba(178, 62, 255, 0.8);
    transform: scale(1.2);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.5rem;
    user-select: none;
}

.lightbox-close:hover {
    color: var(--accent);
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    background-color: var(--bg-dark);
    border-top: 1px solid var(--border);
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ==========================================
   PLACEHOLDER SECTION
   ========================================== */

.recent-projects {
    padding: 60px 0;
}

.projects-placeholder {
    background: rgba(178, 62, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state {
    color: var(--text-secondary);
    text-align: center;
    padding: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.empty-state.compact {
    padding: 16px 20px;
    text-align: left;
    background: transparent;
}

/* ==========================================
   ANIMATIONS
   ========================================== */

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

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

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 10px rgba(178, 62, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(178, 62, 255, 0.5);
    }
    100% {
        box-shadow: 0 0 10px rgba(178, 62, 255, 0.3);
    }
}

/* Initial states for animation triggers */
.fade-in,
.slide-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Visible state when animated */
.fade-in.visible,
.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for fade-in */
.fade-in-delay-1 {
    animation-delay: 0.2s;
}

.fade-in-delay-2 {
    animation-delay: 0.4s;
}

/* Slide up animations with delays */
.slide-up:nth-child(1) { transition-delay: 0.1s; }
.slide-up:nth-child(2) { transition-delay: 0.2s; }
.slide-up:nth-child(3) { transition-delay: 0.3s; }
.slide-up:nth-child(4) { transition-delay: 0.4s; }

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: rgba(30, 30, 30, 0.95);
        padding: 1rem;
        gap: 0.5rem;
        border-bottom: 1px solid var(--border);
    }

    .nav-menu.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .lightbox-content {
        flex-direction: column;
        gap: 1rem;
    }

    .lightbox-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }

    .prev-btn {
        left: -3rem;
    }

    .next-btn {
        right: -3rem;
    }

    .lightbox-close {
        top: -35px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.25rem; }

    .hero {
        padding: 80px 0 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-card {
        padding: 1.5rem;
    }

    .section-card h2 {
        font-size: 1.25rem;
    }
}

/* ==========================================
   RELEASE DETAIL PAGE
   ========================================== */

.release-detail {
    padding: 60px 0;
}

.release-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: flex-start;
    margin-bottom: 4rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 4rem;
}

.release-cover {
    position: relative;
}

.release-cover img {
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(178, 62, 255, 0.2);
    aspect-ratio: 1;
    object-fit: contain;
}

.release-info h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
}

.release-type {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.release-year {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0.5rem 0 1.5rem 0;
}

.release-description {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 90%;
}

.release-platforms {
    margin-top: 2rem;
}

.release-platforms h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.platforms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.platform-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: rgba(178, 62, 255, 0.1);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.platform-link:hover {
    background-color: rgba(178, 62, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(178, 62, 255, 0.2);
}

.tracklist-section {
    margin: 3rem 0;
}

.tracklist-section h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.tracks-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.track-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(10px);
}

.track-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.track-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(178, 62, 255, 0.1);
}

.track-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    background: rgba(178, 62, 255, 0.2);
    border-radius: 50%;
    font-weight: 600;
    color: var(--accent);
    margin-right: 1.5rem;
}

.track-info h4 {
    margin: 0;
    font-size: 1.1rem;
}

.section-footer {
    padding: 3rem 0;
    text-align: center;
}

@media (max-width: 768px) {
    .release-header {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .release-cover img {
        max-width: 100%;
    }
    
    .release-info h1 {
        font-size: 1.8rem;
    }
    
    .release-description {
        max-width: 100%;
    }
    
    .platforms-list {
        flex-direction: column;
    }
    
    .platform-link {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .release-detail {
        padding: 40px 0;
    }
    
    .release-header {
        padding-bottom: 2rem;
    }
    
    .release-info h1 {
        font-size: 1.5rem;
    }
}

/* ==========================================
   SCROLLBAR
   ========================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
    background: rgba(178, 62, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(178, 62, 255, 0.5);
}
