/* --- GLOBAL STYLES --- */
:root {
    --bg-color: #243136;
    --primary-color: #1e1e1e;
    --accent-color: #00ff83;
    --text-color: #e0e0e0;
    --nav-height: 70px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
}

h1, h2, h3 {
    color: #ffffff;
    font-family: "cursive", sans-serif;
    font-weight: bold;
}
}

section {
    padding: 100px 10%;
    /* Add padding-top to account for fixed nav */
    padding-top: calc(var(--nav-height) + 60px); 
    background-color: var(--bg-color);
    position: relative; /* Needed for scroll spy */
}

section:nth-child(even) {
    background-color: var(--primary-color);
}

/* --- NAVIGATION --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10%;
    height: var(--nav-height);
    position: fixed;
    width: 80%;
    top: 0;
    left: 0;
    z-index: 1000;
    background: rgba(18, 18, 18, 0.7);
    backdrop-filter: blur(10px);
}

.nav-logo img {
    height: 100px;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active { /* Style for active link */
    color: var(--accent-color);
}

/* Highlight underline for active link */
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 1rem;
    width: calc(100% - 2rem);
    height: 2px;
    background-color: var(--accent-color);
}

.hamburger {
    display: none; /* Hidden on desktop */
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- HERO SECTION --- */
header#home {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.webgl {
    position: absolute;
    top: 0;
    left: 0;
    outline: none;
    z-index: 1;
}

.hero-content {
    z-index: 2;
    position: relative;
}

.hero-content h1 {
    font-size: 5rem;
    margin: 0;
    letter-spacing: 4px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-top: 10px;
}


/* --- ABOUT SECTION --- */
.about-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.profile-pic {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
}


/* --- PROJECTS SECTION --- */
#projects h2 { text-align: center; margin-bottom: 50px; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.project-card { background: var(--primary-color); border: 1px solid #333; border-radius: 8px; transition: transform 0.3s, box-shadow 0.3s; overflow: hidden; }
.project-card:hover { transform: translateY(-10px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.project-card img { width: 100%; height: auto; display: block; }
.project-card h3, .project-card p, .project-card a { padding: 0 1.5rem; }
.project-card h3 { margin-top: 1.5rem; color: var(--accent-color); }
.project-card a { color: var(--accent-color); text-decoration: none; font-weight: bold; display: inline-block; padding-bottom: 1.5rem; }


/* --- CONTACT & FOOTER --- */
#contact { text-align: center; }
.cta-button { display: inline-block; padding: 12px 24px; background: var(--accent-color); color: #121212; text-decoration: none; border-radius: 5px; font-weight: bold; margin-top: 1rem; transition: background-color 0.3s; }
.cta-button:hover { background-color: #fff; }
footer { text-align: center; padding: 2rem 10%; background: var(--primary-color); }
.social-links { margin-bottom: 1rem; }
.social-links a { font-size: 1.5rem; color: var(--text-color); margin: 0 1rem; transition: color 0.3s; }
.social-links a:hover { color: var(--accent-color); }


/* --- INTERACTIVE FEATURES --- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--accent-color);
    color: var(--bg-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Fade-in Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- RESPONSIVENESS (for Mobile) --- */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        right: -100%; /* Start off-screen */
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background: var(--primary-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease-in-out;
    }

    .nav-links.active {
        right: 0; /* Slide in */
    }

    .hamburger {
        display: block;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }
}
