/* style.css */

/* Define CSS Variables for a cinematic, dark theme with vibrant accents */
:root {
    /* Dark Theme Colors (Cinematic) */
    --background-main: #0a0a0a; /* Very dark, almost black background */
    --background-secondary: #121212; /* Slightly lighter dark for alternating sections */
    --background-footer: #050505; /* Deepest black for footer */
    --card-background: #1c1c1c; /* Dark card background */
    --text-light: #e0e0e0; /* Light gray text for general content */
    --text-muted: #a0a0a0; /* Muted gray text for descriptions */
    --text-heading: #ffffff; /* Pure white for main headings */
    --primary-accent: #00e676; /* Vibrant green (similar to neon/emerald) */
    --primary-accent-darker: #00c853; /* Darker green for hover */
    --secondary-accent: #00b0ff; /* Electric blue for secondary highlights/glows */
    --border-color: #333333; /* Dark gray for subtle borders */
    --glow-color-primary: rgba(0, 230, 118, 0.6); /* Green glow */
    --glow-color-secondary: rgba(0, 176, 255, 0.6); /* Blue glow */

    /* Light Theme Colors (for toggle, maintaining a clean look) */
    --light-background-main: #f0f2f5;
    --light-background-secondary: #ffffff;
    --light-background-footer: #e0e0e0;
    --light-card-background: #ffffff;
    --light-text-dark: #333333;
    --light-text-muted: #666666;
    --light-text-heading: #1a1a1a;
    --light-primary-accent: #10B981;
    --light-primary-accent-darker: #059669;
    --light-secondary-accent: #3b82f6;
    --light-border-color: #e0e0e0;
    --light-glow-color-primary: rgba(16, 185, 129, 0.3);
    --light-glow-color-secondary: rgba(59, 130, 246, 0.3);
}

/* Base styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-main);
    color: var(--text-light);
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
    scroll-behavior: smooth;
}

/* Light mode styles */
body.light-mode {
    background-color: var(--light-background-main);
    color: var(--light-text-dark);
    --background-main: var(--light-background-main);
    --background-secondary: var(--light-background-secondary);
    --background-footer: var(--light-background-footer);
    --card-background: var(--light-card-background);
    --text-light: var(--light-text-dark);
    --text-muted: var(--light-text-muted);
    --text-heading: var(--light-text-heading);
    --primary-accent: var(--light-primary-accent);
    --primary-accent-darker: var(--light-primary-accent-darker);
    --secondary-accent: var(--light-secondary-accent);
    --border-color: var(--light-border-color);
    --glow-color-primary: var(--light-glow-color-primary);
    --glow-color-secondary: var(--light-glow-color-secondary);
}

/* Font styles */
.font-montserrat {
    font-family: 'Montserrat', sans-serif;
}

/* General Layout */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Navigation Bar */
#navbar {
    background-color: rgba(18, 18, 18, 0.6); /* Slightly transparent dark */
    backdrop-filter: blur(10px); /* Stronger frosted glass effect */
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Very subtle border */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
#navbar.scrolled {
    background-color: rgba(0, 0, 0, 0.8); /* Darker on scroll */
    border-bottom-color: var(--border-color);
}
body.light-mode #navbar {
    background-color: rgba(255, 255, 255, 0.6);
    border-bottom-color: var(--light-border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
body.light-mode #navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
}

.nav-link {
    color: var(--text-light);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-accent);
    background-color: rgba(0, 230, 118, 0.1); /* Subtle green background on hover */
}

/* Mobile Navigation Specific Styles */
#mobile-menu-overlay {
    transition: transform 0.3s ease-out, opacity 0.3s ease, visibility 0s 0.3s; /* Added opacity and visibility for smoother transition */
    transform: translateX(100%); /* Start off-screen */
    opacity: 0; /* Start hidden */
    visibility: hidden; /* Hide completely */
}

#mobile-menu-overlay.open {
    transform: translateX(0); /* Slide in */
    opacity: 1; /* Fade in */
    visibility: visible; /* Show */
    transition: transform 0.3s ease-out, opacity 0.3s ease, visibility 0s 0s; /* No delay on showing */
}

.mobile-nav-link {
    color: var(--text-heading);
    font-size: 1.8rem;
    padding: 1rem 0;
    width: 100%;
    text-align: center;
}

.mobile-nav-link:hover {
    color: var(--primary-accent);
    background-color: transparent; /* Override hover background for mobile */
}


.nav-logo {
    text-shadow: 0 0 5px var(--primary-accent); /* Subtle glow on logo */
}

.theme-toggle-btn {
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.3); /* Subtle glow for toggle */
}
.theme-toggle-btn:hover {
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.5);
}
body.light-mode .theme-toggle-btn {
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}
body.light-mode .theme-toggle-btn:hover {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}


/* Hero Section */
.hero-section {
    background-color: var(--background-main);
    padding-top: 8rem;
    padding-bottom: 8rem;
    border-bottom-left-radius: 3rem;
    border-bottom-right-radius: 3rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5); /* Deeper shadow */
}

.cinematic-grid-bg {
    background-image: url('https://www.transparenttextures.com/patterns/dark-geometric.png'); /* Base pattern */
    /* You could layer multiple backgrounds or use SVG for more control */
    /* background-image: radial-gradient(circle at center, rgba(0,230,118,0.05) 0%, transparent 70%), url('https://www.transparenttextures.com/patterns/dark-geometric.png'); */
}

.profile-image {
    border-color: var(--primary-accent);
    /* Enhanced multi-layer glow for profile image */
    box-shadow:
        0 0 0 5px rgba(0, 230, 118, 0.2),
        0 0 20px 5px var(--glow-color-primary),
        0 0 40px 10px rgba(0, 230, 118, 0.2); /* Added a wider, softer layer */
}

.profile-image:hover {
    box-shadow:
        0 0 0 5px rgba(0, 230, 118, 0.4),
        0 0 30px 10px var(--glow-color-primary),
        0 0 60px 20px rgba(0, 230, 118, 0.4); /* More intense on hover */
}

/* Keyframe animation for subtle text glow pulse */
@keyframes subtle-text-glow-pulse {
    0% { text-shadow: 0 0 10px var(--glow-color-primary), 0 0 20px rgba(0, 230, 118, 0.3); }
    50% { text-shadow: 0 0 15px var(--glow-color-primary), 0 0 30px rgba(0, 230, 118, 0.5); }
    100% { text-shadow: 0 0 10px var(--glow-color-primary), 0 0 20px rgba(0, 230, 118, 0.3); }
}

.cinematic-text-glow {
    animation: subtle-text-glow-pulse 4s infinite alternate ease-in-out; /* Applied animation */
}
.cinematic-subtext-glow {
    text-shadow: 0 0 5px var(--glow-color-secondary);
}

/* Section Titles */
.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
    margin-bottom: 24px;
    color: var(--primary-accent);
    font-family: 'Montserrat', sans-serif;
    /* Enhanced glow for titles with pulse animation */
    animation: subtle-text-glow-pulse 4s infinite alternate ease-in-out; /* Reusing text glow animation */
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60%;
    height: 3px;
    background-color: var(--primary-accent);
    border-radius: 9999px;
    box-shadow: 0 0 5px var(--glow-color-primary), 0 0 15px rgba(0, 230, 118, 0.3); /* Enhanced glow for underline */
}

/* Cards (General Cinematic Style) */
.card {
    background-color: var(--card-background);
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.4); /* Deeper shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative; /* For potential pseudo-element effects */
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px); /* More pronounced lift */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 230, 118, 0.3); /* Added glow on hover */
}

.cinematic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    background: linear-gradient(45deg, rgba(0, 230, 118, 0.05), rgba(0, 176, 255, 0.05)); /* Subtle inner glow */
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.cinematic-card:hover::before {
    opacity: 1;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-accent);
    color: var(--background-main); /* Text color for primary button */
    font-weight: 700;
    padding: 1rem 3rem; /* Larger buttons */
    border-radius: 9999px;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 15px var(--glow-color-primary), 0 0 30px rgba(0, 230, 118, 0.2); /* Stronger glow */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase; /* Cinematic feel */
    letter-spacing: 0.05em;
}

.btn-primary:hover {
    background-color: var(--primary-accent-darker);
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 0 25px var(--glow-color-primary), 0 0 40px rgba(0, 230, 118, 0.3), 0 0 60px rgba(0, 230, 118, 0.1); /* More intense glow */
}

.btn-secondary {
    background-color: var(--card-background);
    color: var(--text-light);
    font-weight: 600;
    padding: 0.8rem 2.2rem;
    border-radius: 9999px;
    transition: background-color 0.3s ease, transform 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.btn-secondary:hover {
    background-color: var(--primary-accent);
    color: var(--background-main);
    transform: translateY(-3px);
    border-color: var(--primary-accent);
    box-shadow: 0 0 15px var(--glow-color-primary);
}

.cinematic-button-secondary-glow {
    box-shadow: 0 0 8px rgba(0, 176, 255, 0.3); /* Subtle blue glow for secondary buttons */
}
.cinematic-button-secondary-glow:hover {
    box-shadow: 0 0 20px rgba(0, 176, 255, 0.6), 0 0 35px rgba(0, 176, 255, 0.3); /* Enhanced blue glow */
}

/* Text Gradient */
.text-gradient {
    background-image: linear-gradient(to right, var(--primary-accent), var(--secondary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Advanced Animations */
@keyframes pulse-bg {
    0% { opacity: 0.05; transform: scale(1); }
    50% { opacity: 0.15; transform: scale(1.02); }
    100% { opacity: 0.05; transform: scale(1); }
}

.animate-pulse-bg {
    animation: pulse-bg 15s infinite ease-in-out; /* Slower, more subtle pulse */
}

/* Original fade-in-up for hero elements */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; /* Smoother easing with blur */
}

/* Delay for hero elements */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

/* Section reveal animation (controlled by JS) */
.section-hidden {
    opacity: 0;
    transform: translateY(80px); /* More pronounced slide up */
    transition: opacity 1.2s cubic-bezier(0.19, 1, 0.22, 1), transform 1.2s cubic-bezier(0.19, 1, 0.22, 1); /* Smoother and longer transition */
}

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

/* Staggered animation for elements within revealed sections */
/* This class will be added by JS and combined with animate-fade-in-up */
.stagger-animate {
    opacity: 0; /* Hidden by default for staggered animation */
    transform: translateY(20px); /* Slight initial offset */
    filter: blur(3px); /* Initial blur for a softer entrance */
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Animation delay will be set by JavaScript */
}

.section-visible .stagger-animate {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}


/* Journey Cards */
.journey-card {
    background-color: var(--card-background);
    padding: 1.8rem;
    border-radius: 0.75rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--border-color);
}

.journey-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 176, 255, 0.2); /* Added blue glow */
}

.cinematic-journey-card {
    position: relative;
    overflow: hidden;
}
.cinematic-journey-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0.75rem;
    background: linear-gradient(45deg, rgba(0, 230, 118, 0.03), rgba(0, 176, 255, 0.03));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.cinematic-journey-card:hover::before {
    opacity: 1;
}
.cinematic-icon-glow {
    text-shadow: 0 0 10px var(--glow-color-primary), 0 0 20px rgba(0, 230, 118, 0.3); /* Enhanced icon glow */
}


/* Skill Cards */
.skill-card {
    background-color: var(--card-background);
    padding: 1.8rem;
    border-radius: 0.75rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex; /* Flexbox for internal layout */
    flex-direction: column; /* Stack content vertically */
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 230, 118, 0.2); /* Added green glow */
}

.cinematic-skill-card {
    position: relative;
    overflow: hidden;
}
.cinematic-skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0.75rem;
    background: linear-gradient(45deg, rgba(0, 230, 118, 0.03), rgba(0, 176, 255, 0.03));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.cinematic-skill-card:hover::before {
    opacity: 1;
}

/* Project Cards */
.project-card {
    background-color: var(--card-background);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    display: flex; /* Changed to flex for better layout control */
    flex-direction: column; /* Stack content vertically */
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 230, 118, 0.2); /* Added green glow */
}

.cinematic-project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0.75rem;
    background: linear-gradient(45deg, rgba(0, 230, 118, 0.05), rgba(0, 176, 255, 0.05));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.cinematic-project-card:hover::before {
    opacity: 1;
}

.project-card img {
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05); /* Subtle border for images */
}

.cinematic-image-border:hover {
    box-shadow: 0 0 15px 5px var(--glow-color-primary), 0 0 30px 10px rgba(0, 230, 118, 0.3); /* Enhanced glow on image hover */
}

.tag {
    background-color: var(--border-color);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.25rem 0.6rem;
    border-radius: 0.3rem; /* Slightly less rounded tags */
    transition: background-color 0.3s ease, color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.project-card:hover .tag {
    background-color: var(--primary-accent);
    color: var(--background-main);
}

.cinematic-tag {
    border: 1px solid rgba(0, 176, 255, 0.1); /* Subtle blue border for tags */
}
.project-card:hover .cinematic-tag {
    border-color: var(--primary-accent);
}

/* Achievement Item */
.achievement-item {
    background-color: var(--card-background);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--border-color);
}

.achievement-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 176, 255, 0.2); /* Added blue glow */
}

.cinematic-achievement-item {
    position: relative;
    overflow: hidden;
}
.cinematic-achievement-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0.75rem;
    background: linear-gradient(45deg, rgba(0, 230, 118, 0.03), rgba(0, 176, 255, 0.03));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.cinematic-achievement-item:hover::before {
    opacity: 1;
}

.cinematic-badge-glow {
    filter: drop-shadow(0 0 8px rgba(0, 176, 255, 0.4)); /* Blue glow for badges */
    transition: filter 0.3s ease;
}
.cinematic-badge-glow:hover {
    filter: drop-shadow(0 0 20px rgba(0, 176, 255, 0.8));
}

/* Footer */
.cinematic-footer-glow {
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.4); /* Shadow from bottom */
}

/* Particle Canvas */
#particle-canvas {
    pointer-events: none;
    opacity: 0.2; /* Even more subtle */
    filter: blur(0.5px); /* Slightly blur particles for depth */
}

/* Project Modal Styles (New) */
#project-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Darker overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

#project-modal-overlay.open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s 0s;
}

.project-modal-content {
    background-color: var(--card-background);
    border-radius: 1rem;
    padding: 2.5rem;
    width: 90%;
    max-width: 800px;
    max-height: 90vh; /* Limit height for scrollability */
    overflow-y: auto; /* Enable scrolling for long content */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    position: relative;
    transform: translateY(20px); /* Initial offset for animation */
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#project-modal-overlay.open .project-modal-content {
    transform: translateY(0);
    opacity: 1;
}

.project-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.project-modal-close:hover {
    color: var(--primary-accent);
}

.project-modal-image {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.project-modal-title {
    color: var(--text-heading);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
}

.project-modal-description {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.project-modal-tags .tag {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
}

.project-modal-links {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.project-modal-links .btn-secondary {
    padding: 0.7rem 1.8rem;
    font-size: 0.9rem;
}

/* Confetti effect styles (New) */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1001; /* Above modal */
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--primary-accent);
    opacity: 0;
    animation: confetti-fall 3s forwards ease-out;
    border-radius: 50%;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100px) rotateZ(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotateZ(720deg);
        opacity: 0;
    }
}
