/* --- 1. THEME VARIABLES --- */
:root {
    /* Dark Mode (Default) */
    --bg-body: #0a0a0a;
    --bg-nav: rgba(10, 10, 10, 0.85);
    --bg-menu: #0a0a0a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --border-color: rgba(255, 255, 255, 0.1);
    --primary-gradient: linear-gradient(90deg, #7928CA, #FF0080);
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] {
    /* Light Mode */
    --bg-body: #f8f9fa;
    --bg-nav: rgba(255, 255, 255, 0.95);
    --bg-menu: #ffffff;
    --bg-card: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #555555;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* --- 2. GLOBAL STYLES --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; transition: 0.3s ease; scroll-behavior: smooth; }
body { background-color: var(--bg-body); color: var(--text-main); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

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

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(121, 40, 202, 0.3);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(121, 40, 202, 0.5); }

/* --- 3. NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 9999;
}

.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; z-index: 10001; }

.nav-links { display: flex; gap: 2rem; }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: #FF0080; }

.nav-actions { display: flex; align-items: center; gap: 15px; z-index: 10001; }

.theme-toggle, .hamburger {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
}
.hamburger { display: none; }

/* --- 4. SECTIONS (UPDATED FOR VIDEO) --- */
section { padding: 6rem 0; border-bottom: 1px solid var(--border-color); }

header#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    border-bottom: 1px solid var(--border-color);
    position: relative; /* Crucial for absolute positioning of video/overlay */
    overflow: hidden; /* Hide video overflow */
}

/* NEW: Background Video Container Styling */
.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1; /* Below content and overlay */
    /* Adjust video brightness/color to match dark theme */
    filter: brightness(0.7) grayscale(20%); 
}

#background-video {
    position: absolute; 
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%); /* Centering trick */
    object-fit: cover;
}

/* NEW: Video Overlay for contrast and visual design */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Darkening layer, blending with the theme's background color */
    background: rgba(10, 10, 10, 0.6); 
    z-index: 2; /* Between video and content */
}

/* Ensure the main content is on top */
header#hero .container {
    position: relative;
    z-index: 3;
}


header#hero h1 { font-size: 4rem; line-height: 1.1; margin-bottom: 1.5rem; }

.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 3rem; }

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

.card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.card:hover { transform: translateY(-7px); border-color: #FF0080; }

.skill-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin: 0.2rem;
    color: var(--text-muted);
}

.timeline-item {
    border-left: 2px solid #FF0080;
    padding-left: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}
.timeline-item::before {
    content: '';
    width: 12px;
    height: 12px;
    background: #FF0080;
    border-radius: 50%;
    position: absolute;
    left: -7px;
    top: 5px;
}

footer { padding: 4rem 0; text-align: center; margin-top: 0; border: none; }

/* --- 5. TYPEWRITER CURSOR --- */
#cursor {
    display: inline-block;
    color: #FF0080;
    font-weight: 700;
    margin-left: 5px;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

/* --- 6. PROFILE & MISC STYLES --- */
.profile-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.btn-small {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-radius: 5px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    transition: 0.3s;
}

.btn-small:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
}

/* Footer Social Icon Styling */
.footer-icon {
    font-size: 1.5rem; 
    color: var(--text-muted); 
    transition: 0.3s;
}

.footer-icon:hover {
    color: #FF0080;
}

/* --- 7. RESPONSIVE --- */
@media (max-width: 1060px) {
    header#hero h1 { font-size: 2.8rem; }
    #typewriter, #cursor { font-size: 2rem; }
    
    .hamburger { display: flex; }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-menu);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10000;
    }
    .nav-links.active { left: 0; }
    .nav-links a { font-size: 1.5rem; }
}
/* --- 7. FORM AND UTILITY STYLING --- */
        
        /* Form Label and Input */
        .form-label {
            display: block;
            font-size: 0.9rem;
            font-weight: 500;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
        }

        .form-input {
            width: 100%;
            padding: 0.8rem 1rem;
            background-color: rgba(255, 255, 255, 0.05); /* Slightly visible background in dark mode */
            border: 1px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-main);
            transition: border-color 0.3s, box-shadow 0.3s;
        }

        .form-input:focus {
            border-color: #7928CA; /* Primary Purple focus */
            box-shadow: 0 0 0 2px rgba(121, 40, 202, 0.5);
            outline: none;
        }

        /* Full-width button style (for form submission) */
        .btn-full {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Loading spinner styling */
        .loading-spinner {
            margin-left: 10px;
        }

        /* Success Message Styling (Inline style is used in HTML for simplicity, but here are the general colors) */
        .success-bg {
            background-color: #38c17233; /* Light Green background */
            color: #38c172; /* Darker green text */
            border: 1px solid #38c172;
        }
        
        /* Utility class to hide elements */
        .hidden {
            display: none !important;
        }
