/* Design System */
:root {
    --bg-color: #050505;
    --accent-primary: #7000ff;
    --accent-secondary: #00f2ff;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

/* Splash Screen */
.splash-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-color);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.splash-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-content h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.splash-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: #222;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Global Elements */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: 0.4s;
}

nav.scrolled {
    padding: 1rem 0;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.7;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--accent-secondary);
}

/* Hero Section */
.hero {
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: min(600px, 80vw);
    height: min(600px, 80vw);
    background: radial-gradient(circle, rgba(112, 0, 255, 0.15) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: min(500px, 70vw);
    height: min(500px, 70vw);
    background: radial-gradient(circle, rgba(0, 242, 255, 0.1) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    width: 100%;
}

.hero-tagline {
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--accent-secondary);
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: clamp(1rem, 4vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 2.5rem;
}

.cta-group {
    display: flex;
    gap: 1.5rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), #9d50bb);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(112, 0, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(112, 0, 255, 0.5);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: white;
}

.btn-outline:hover {
    background: var(--glass-bg);
    border-color: white;
}

/* Portfolio Grid */
.section {
    padding: 100px 0;
}

.section-title {
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-title .underline {
    width: 60px;
    height: 4px;
    background: var(--accent-secondary);
    border-radius: 2px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 4rem;
}

.project-card {
    text-decoration: none;
    display: block;
    transition: 0.4s;
}

.project-image-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 350px;
    border: 1px solid var(--glass-border);
    margin-bottom: 1.5rem;
    background: #111;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

.project-card:hover .project-image-container {
    border-color: var(--accent-secondary);
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.1);
}

.project-info {
    padding: 0 0.5rem;
}

.project-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--accent-secondary);
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
    letter-spacing: 1px;
}

.project-title {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    color: white;
}

.project-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
}

/* Hide old overlay stuff */
.project-overlay {
    display: none;
}

.project-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--accent-secondary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.skill-category h3 {
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

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

.skill-tag {
    padding: 0.8rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.3s;
}

.skill-tag:hover {
    background: rgba(112, 0, 255, 0.1);
    border-color: var(--accent-primary);
    transform: translateY(-5px);
}

/* Contact Form */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1.2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-family: inherit;
    outline: none;
    transition: 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent-secondary);
    background: rgba(255,255,255,0.05);
}

/* Music Button */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-music {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}

.btn-music:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: scale(1.1);
}

.btn-music.playing {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    animation: pulse 2s infinite;
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 242, 255, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 242, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 242, 255, 0); }
}

/* Responsive Overhaul */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
    }

    .container {
        padding: 0 1.5rem;
    }

    .section {
        padding: var(--section-padding);
    }

    /* Mobile Menu Implementation */
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: 0.5s cubic-bezier(0.77, 0.2, 0.05, 1);
        z-index: 1000;
        border-left: 1px solid var(--glass-border);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
        font-weight: 600;
    }

    .hero {
        text-align: center;
    }

    .hero-content {
        margin: 0 auto;
    }

    .hero h1 {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .hero p {
        margin: 0 auto 2.5rem;
    }

    .cta-group {
        justify-content: center;
    }

    .skills-container, .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .project-image-container {
        height: 300px;
    }

    .section-title {
        text-align: center;
    }

    .section-title .underline {
        margin: 0 auto;
    }
    
    .splash-content h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.8rem;
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .project-image-container {
        height: 220px;
    }

    .splash-content h1 {
        font-size: 2.8rem;
    }

    .about-content p {
        font-size: 1.1rem !important;
    }
}

/* Utility for preventing scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
