:root {
    --bg-dark: #07070a;
    --text-primary: #f0f0f5;
    --text-secondary: #9ea1b2;
    --accent: #5e6ad2;
    --accent-glow: rgba(94, 106, 210, 0.5);
    --glass-bg: rgba(15, 15, 20, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

::selection {
    background: var(--accent);
    color: #fff;
}

/* 3D Canvas Background */
#canvas3d {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    /* Changed from -1 so it doesn't fall behind the html tag */
    pointer-events: none;
    /* Let user scroll the page instead of zooming the 3D */
    outline: none;
    will-change: transform, opacity, visibility;
    transform: translateZ(0);
}

#smooth-wrapper {
    position: relative;
    z-index: 10;
    pointer-events: none;
    /* Let scroll events pass to window */
}

#smooth-content>* {
    pointer-events: auto;
    /* Re-enable pointer events for actual content */
}

/* Navigation Overlay */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(7, 7, 10, 0.8) 0%, transparent 100%);
    backdrop-filter: blur(8px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    height: 35px;
}

.logo-text {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

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

.menu-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    transition: color 0.3s ease;
    position: relative;
}

.menu-links a:hover {
    color: var(--text-primary);
}

.menu-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--accent-glow);
}

.menu-links a:hover::after {
    width: 100%;
}

/* Glass Card Reusable Component */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.02);
}

/* Typography & Effects */
.glow-text {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #a5a5b5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.1));
    margin-bottom: 1rem;
}

.glow-text-small {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 2px;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

/* Section Layouts */
.panel-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8vw;
}

.panel-section.right-align {
    justify-content: flex-end;
}



/* Hero Section */
.hero-content {
    flex: 1;
}

.hero-card {
    max-width: 480px;
}

.hero-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

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

.btn-group {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn.primary {
    background: var(--text-primary);
    color: var(--bg-dark);
}

.btn.primary:hover {
    background: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn.secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* About Section */
.about-card {
    max-width: 450px;
}

.about-card p {
    color: var(--text-secondary);
}

/* Projects Section */
.portfolio-section {
    padding: 8rem 8vw;
    background: linear-gradient(to top, var(--bg-dark) 50%, transparent 100%);
    position: relative;
    z-index: 10;
}

.portfolio-header {
    text-align: center;
    margin-bottom: 4rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

.project-card {
    display: block;
    text-decoration: none;
    color: inherit;
    group: hover;
    border-radius: 16px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-img-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #111;
    border: 1px solid var(--glass-border);
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #0a0a0f, #151520);
    color: var(--text-secondary);
    font-weight: 600;
}

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

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(94, 106, 210, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.overlay span {
    color: #fff;
    font-weight: 800;
    font-size: 1.2rem;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.project-card:hover .overlay {
    opacity: 1;
}

.project-card:hover .overlay span {
    transform: translateY(0);
}

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

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
}

.project-info p {
    color: var(--text-secondary);
}

/* Contact Section */
.contact-section {
    padding: 6rem 8vw 2rem;
    background: var(--bg-dark);
    position: relative;
    z-index: 10;
}

.contact-card.center {
    max-width: 800px;
    margin: 0 auto 6rem;
    text-align: center;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.c-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.c-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.c-link:hover .c-icon {
    background: rgba(94, 106, 210, 0.1);
    border-color: rgba(94, 106, 210, 0.5);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-5px);
}

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

/* Animations */
.gsap-reveal {
    opacity: 0;
    transform: translateY(30px);
}

/* Responsive */
@media (max-width: 900px) {
    .panel-section {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 0 5vw;
        gap: 2rem;
    }

    .panel-section.right-align {
        justify-content: center;
    }

    .hero-content {
        flex: none;
        margin-top: 5rem;
    }

    .btn-group {
        justify-content: center;
        flex-direction: column;
        gap: 1rem;
    }

    .glass-nav {
        padding: 1rem 5vw;
    }

    .menu-links {
        display: none;
    }

    .glass-card {
        padding: 2rem 1.5rem;
    }

    .glow-text {
        font-size: 2.8rem;
    }

    .glow-text-small {
        font-size: 2rem;
    }

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

    .portfolio-section,
    .contact-section {
        padding: 4rem 5vw 2rem;
    }

    .contact-links {
        gap: 1.5rem;
    }
}