:root {
    --bg-color: #000005; 
    --primary-glow: #ff9a24; 
    --secondary-glow: #4f46e5;
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
}
html { scroll-behavior: smooth; }
body {
    /* Reverted to the beautiful custom fonts, now served by Bunny Fonts */
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    overscroll-behavior-y: none;
}
h1, h2, h3 { 
    font-family: 'Space Grotesk', sans-serif;
}
.logo {
    font-family: 'Space Grotesk', sans-serif;
}

#webgl-canvas-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
#scroll-content { position: relative; z-index: 10; isolation: isolate; }
.scroll-section { min-height: 110vh; padding: 10vh 2rem; display: flex; align-items: center; }
#preloader { position: fixed; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; background-color: var(--bg-color); z-index: 9999; transition: opacity 0.8s ease; }
#preloader .loader-text { font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; letter-spacing: 0.2em; color: var(--primary-glow); }

/* Section Alignment */
#hero-section { justify-content: center; text-align: center; height: 100vh; min-height: unset; }
#about-section { justify-content: flex-start; }
#skills-section { justify-content: flex-end; }
#projects-section { justify-content: center; flex-direction: column; }
#experience-section { justify-content: flex-start; }
#education-section { justify-content: flex-end; }
#certifications-section { justify-content: flex-start; }
#contact-section { justify-content: center; text-align: center; }

.content-box { max-width: 550px; background: rgba(0, 0, 5, 0.6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid rgba(255, 154, 36, 0.2); padding: 2.5rem; border-radius: 1.5rem; box-shadow: 0 10px 50px rgba(0, 0, 0, 0.4); opacity: 0; }
.project-card { background: rgba(10, 10, 25, 0.9); border: 1px solid rgba(255, 154, 36, 0.3); border-radius: 1rem; padding: 1.5rem; cursor: pointer; transition: transform 0.3s ease, background 0.3s ease; }
.project-card:hover { transform: translateY(-10px); background: rgba(20, 20, 40, 0.95); }

#header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 1.5rem 2rem; background: linear-gradient(to bottom, rgba(0, 0, 5, 0.7), transparent); transition: top 0.3s ease-in-out; }
#header nav .logo { z-index: 1001; }
#header nav .desktop-nav a { position: relative; color: var(--text-secondary); transition: color 0.3s ease; font-size: 1.1rem; margin-left: 2.5rem; }
#header nav .desktop-nav a:hover { color: var(--text-primary); }
#header nav .desktop-nav a.active { color: var(--text-primary); }
#header nav .desktop-nav a.active::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: -8px; width: 6px; height: 6px; background-color: var(--primary-glow); border-radius: 50%; box-shadow: 0 0 12px var(--primary-glow), 0 0 20px var(--primary-glow); }

/* Modal Styles */
.modal-backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 5, 0.8); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); z-index: 200; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease; }
.modal-backdrop.active { opacity: 1; visibility: visible; }

#experience-modal .modal-content { animation: slideInFromLeft 0.5s ease-out; }
#experience-modal.closing .modal-content { animation: slideOutToRight 0.5s ease-out; }

#certifications-modal .modal-content { animation: slideInFromRight 0.5s ease-out; }
#certifications-modal.closing .modal-content { animation: slideOutToLeft 0.5s ease-out; }

#project-modal .modal-content { animation: none; }

.modal-content { background: var(--bg-color); width: 90%; max-width: 1000px; max-height: 90vh; border-radius: 1rem; border: 1px solid rgba(255, 154, 36, 0.2); padding: 3rem; overflow-y: auto; position: relative; transform: scale(0.95); transition: transform 0.4s ease; }
#contact-modal .modal-content { max-width: 600px; }
.modal-backdrop.active .modal-content { transform: scale(1); }
.modal-close-btn { position: absolute; top: 1.5rem; right: 1.5rem; background: rgba(255,255,255,0.1); border: none; color: white; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.5rem; display: flex; justify-content: center; align-items: center; transition: background 0.3s ease; }
.modal-close-btn:hover { background: rgba(255,255,255,0.2); }

/* Contact Form Input Styles */
.contact-input { width: 100%; background-color: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 154, 36, 0.3); color: var(--text-primary); padding: 0.75rem 1rem; border-radius: 0.5rem; font-size: 1rem; transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.contact-input:focus { outline: none; border-color: var(--primary-glow); box-shadow: 0 0 15px rgba(255, 154, 36, 0.3); }

/* New Button Styles */
#resume-btn, .project-link-btn { display: inline-block; font-weight: 600; padding: 0.75rem 1.5rem; border-radius: 999px; transition: all 0.3s ease; text-decoration: none; }
#resume-btn { background-color: transparent; border: 2px solid var(--primary-glow); color: var(--primary-glow); }
#resume-btn:hover { background-color: var(--primary-glow); color: var(--bg-color); box-shadow: 0 0 20px var(--primary-glow); }
.project-link-btn { font-size: 1rem; text-align: center; min-width: 150px; }
.project-link-btn.primary { background-color: var(--primary-glow); color: var(--bg-color); }
.project-link-btn.primary:hover { filter: brightness(1.2); transform: translateY(-2px); }
.project-link-btn.secondary { background-color: transparent; border: 1px solid var(--text-secondary); color: var(--text-secondary); }
.project-link-btn.secondary:hover { background-color: rgba(255,255,255,0.1); color: var(--text-primary); border-color: var(--text-primary); }

/* === MOBILE RESPONSIVE STYLES === */
.hamburger-btn { display: none; } /* Hide on desktop */
.mobile-nav-menu { display: none; } /* Hide on desktop */

/* Experience Section Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes borderGlow {
    0% {
        box-shadow: inset 0 0 10px rgba(255, 154, 36, 0);
    }
    50% {
        box-shadow: inset 0 0 20px rgba(255, 154, 36, 0.3);
    }
    100% {
        box-shadow: inset 0 0 10px rgba(255, 154, 36, 0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutToRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

@keyframes slideOutToLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100px);
    }
}

#experience-container > div {
    animation: slideInLeft 0.8s ease-out forwards;
}

#experience-container > div h3 {
    animation: slideInLeft 0.8s ease-out 0.2s both;
    color: var(--primary-glow);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

#experience-container > div > p {
    animation: slideInLeft 0.8s ease-out 0.4s both;
    margin: 0.25rem 0;
    transition: color 0.3s ease;
}

/* Experience Cards */
.experience-card {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.experience-card::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 0;
    width: 12px;
    height: 12px;
    background-color: var(--primary-glow);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--primary-glow), 0 0 25px rgba(255, 154, 36, 0.5);
    animation: borderGlow 3s ease-in-out infinite;
}

.experience-card h3 {
    transition: all 0.3s ease;
}

.experience-card:hover {
    transform: translateX(10px);
}

.experience-card:hover h3 {
    color: #fff;
    text-shadow: 0 0 15px var(--primary-glow);
}

/* Certifications Section Animations */
#certifications-container > div {
    animation: slideInLeft 0.8s ease-out forwards;
}

#certifications-container > div h3 {
    animation: slideInLeft 0.8s ease-out 0.2s both;
    color: var(--primary-glow);
}

#certifications-container > div > p {
    animation: slideInLeft 0.8s ease-out 0.4s both;
}

/* Certification Cards */
.certification-card {
    background: rgba(15, 15, 35, 0.8);
    border-left: 3px solid var(--primary-glow);
    padding: 1.5rem;
    padding-left: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
}

.certification-card::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 1.5rem;
    width: 12px;
    height: 12px;
    background-color: var(--primary-glow);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--primary-glow), 0 0 25px rgba(255, 154, 36, 0.5);
    animation: borderGlow 3s ease-in-out infinite;
}

.certification-card h3 {
    transition: all 0.3s ease;
}

.certification-card:hover {
    background: rgba(25, 25, 50, 0.95);
    transform: translateX(10px);
    box-shadow: 0 0 20px rgba(255, 154, 36, 0.2);
}

.certification-card:hover h3 {
    color: #fff;
    text-shadow: 0 0 15px var(--primary-glow);
}

@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .hamburger-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 24px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
    }
    .hamburger-btn span {
        width: 30px;
        height: 3px;
        background-color: var(--text-primary);
        border-radius: 10px;
        transition: all 0.3s linear;
        position: relative;
        transform-origin: 1px;
    }
    .hamburger-btn.open span:nth-child(1) { transform: rotate(45deg); }
    .hamburger-btn.open span:nth-child(2) { opacity: 0; transform: translateX(20px); }
    .hamburger-btn.open span:nth-child(3) { transform: rotate(-45deg); }

    .mobile-nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 5, 0.95);
        -webkit-backdrop-filter: blur(15px);
        backdrop-filter: blur(15px);
        z-index: 1000;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: opacity 0.3s ease-in-out;
        opacity: 0;
        visibility: hidden;
    }
    .mobile-nav-menu.open {
        opacity: 1;
        visibility: visible;
    }
    .mobile-nav-link {
        font-family: 'Space Grotesk', sans-serif;
        font-size: 2.5rem;
        color: var(--text-primary);
        margin: 1.5rem 0;
        text-decoration: none;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    .mobile-nav-menu.open .mobile-nav-link {
        opacity: 1;
        transform: translateY(0);
    }
    /* Add staggered delay for links appearing */
    .mobile-nav-menu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
    .mobile-nav-menu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.2s; }
    .mobile-nav-menu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.3s; }
    .mobile-nav-menu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.4s; }

    /* Adjust typography and layout for mobile */
    #hero-section h1 { font-size: 2.5rem; line-height: 1.1; }
    #hero-section p { font-size: 1rem; }
    .scroll-section { padding: 10vh 1rem; }
    .content-box, #projects-section .max-w-6xl { padding: 1.5rem; }
    h2 { font-size: 2.2rem !important; }
    #modal-project-title { font-size: 2rem !important; }
    #modal-project-links { flex-direction: column; }
}
