/* 1. IMPORTS & VARIABLES */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;700&display=swap');

/* * {
    border: 1px solid red;
} */

/* --- LIGHT MODE OVERRIDES (COMPLETE) --- */
body.light-mode {
    --bg-color: #f5f5f5;       /* Pure White */
    --card-bg: #f4f4f4;        /* Light Grey */
    --text-color: #1a1a1a;     /* Almost Black */
    --accent-color: #0056b3;   /* Darker Blue */
}

/* 1. Header & Footer Fixes */
body.light-mode header {
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e5e5e5;
}

body.light-mode footer {
    background-color: #f0f0f0; /* Light Gray Footer */
    border-top: 1px solid #d1d1d1;
    color: #333;
}

body.light-mode #hero h1 {
    /* TIGHT SHOOTING STAR (Light Mode) */
    background: linear-gradient(to right, #000000 45%, #999999 49%, #999999 51%, #000000 55%);
    
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode #hero p {
    color: #555; /* Darker grey text so it's readable on white */
}

/* 3. Skill Pills Fix */
body.light-mode .skill-category li {
    background: #e0e0e0; /* Light gray pill */
    color: #000;         /* Black text */
    border: 1px solid #ccc;
}

/* 4. Project Card Details */
body.light-mode .project-card .tech-stack {
    color: #444; /* Darker text for readability */
}

body.light-mode .copyright {
    color: #666;
}

/* Style the Toggle Button */
.theme-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    margin: 0;
    display: flex;
    transition: transform 0.3s ease;
    color: var(--text-color);
}

@media (hover: hover) {
    .theme-btn:hover {
        transform: rotate(45deg) scale(1.1);
    }
}

/* Optional: Add a subtle 'active' click effect for mobile users instead */
.theme-btn:active {
    transform: scale(0.9); /* slight press down effect */
}

:root {
    --bg-color: #0a0a0a;       /* Deep Black */
    --card-bg: #1c1c1c;        /* Dark Grey */
    --text-color: #f0f0f0;     /* Off-White */
    --accent-color: #00d4ff;   /* Neon Cyan */
    --font-main: 'Space Grotesk', sans-serif;
}

/* 2. GLOBAL RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px; /* Prevents sticky header from covering anchor targets */
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* 3. HEADER & NAV */
header {
    background-color: rgba(10, 10, 10, 0.95);
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--accent-color);
    letter-spacing: -1px;
}

.desktop-nav ul {
    display: flex;
    gap: 20px;
}

.desktop-nav a {
    font-weight: 700;
    transition: color 0.3s;
}

.desktop-nav a:hover {
    color: var(--accent-color);
}

/* 1. Make the Right Side a Flex Row */
.header-right {
    display: flex;
    align-items: center; /* This forces the Nav text and Button to share a center line */
    gap: 20px; /* Consistent spacing between Nav, Button, and Hamburger */
}

/* 2. Ensure Nav list items are also centered */
.desktop-nav ul {
    display: flex;
    align-items: center; /* Ensures text inside nav aligns with button */
    gap: 20px;
    margin: 0; /* Remove default margin that pushes things down */
}



/* Hamburger Icon (Hidden on Desktop) */
.mobile-menu-icon {
    display: none;
}

/* 4. HERO SECTION */
#hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

#hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    
    /* TIGHT SHOOTING STAR (Dark Mode) */
    /* Huge white sections, tiny grey stripe in middle */
    background: linear-gradient(to right, #ffffff 45%, #666666 49%, #666666 51%, #ffffff 55%);
    
    /* 300% width gives us huge safety margins so it doesn't "Jump" */
    background-size: 300% auto;
    
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    
    /* 6s Loop: Fast zip, long rest */
    animation: text-wave 6s linear infinite;
}

#hero p {
    font-size: 1.2rem;
    color: #ccc;
    max-width: 600px;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--accent-color);
    color: #000;
    font-weight: 700;
    border-radius: 4px;
    margin-top: 2rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.3);
}

/* 5. SECTIONS GENERAL */
section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    border-left: 5px solid var(--accent-color);
    padding-left: 1rem;
}

/* 6. SKILLS */
/* UPDATED SKILL GRID */
.skill-grid {
    display: grid;
    /* This magic line says: "Create columns that are at least 300px wide, 
       but share the available space equally." */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 2rem;
    align-items: start; /* Prevents cards from stretching vertically to match height */
}

.skill-category h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.skill-category ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-category li {
    background: #222;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    border: 1px solid transparent;
    transition: border-color 0.3s;
}

.skill-category li:hover {
    border-color: var(--accent-color);
}

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

.project-card {
    background-color: var(--card-bg);
    border: 1px solid #333;
    padding: 2rem;
    border-radius: 12px;
    transition: transform 0.3s, border-color 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.project-card .tech-stack {
    font-size: 0.9rem;
    color: #aaa;
    margin: 1rem 0;
}

.project-card .links a {
    color: var(--accent-color);
    margin-right: 15px;
    font-weight: bold;
    font-size: 0.9rem;
}

.coming-soon {
    color: #e03333;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

#about p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* 8. FOOTER */
footer {
    text-align: center;
    padding: 4rem 2rem;
    background-color: #050505;
    border-top: 1px solid #222;
}

.email-link {
    display: inline-block;
    margin: 1rem 0;
    font-size: 1.5rem;
    color: var(--accent-color);
    text-decoration: underline;
}

.copyright {
    margin-top: 2rem;
    color: #555;
    font-size: 0.8rem;
}

/* 9. MOBILE RESPONSIVENESS (The Landscaping) */
@media (max-width: 768px) {
    
    /* Show Hamburger */
    .mobile-menu-icon {
        display: block;
        font-size: 2rem;
        cursor: pointer;
        color: var(--text-color);
    }

    /* Hide Desktop Nav by Default */
    .desktop-nav {
        display: none; 
    }

    /* Active State (When JS clicks) */
    .desktop-nav.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 0;
        background-color: var(--bg-color);
        width: 100%; /* Full width on mobile */
        padding: 2rem;
        border-bottom: 2px solid var(--accent-color);
        text-align: center;
    }

    /* Adjust Typography */
    #hero h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        text-align: center;
        border-left: none;
        border-bottom: 3px solid var(--accent-color);
        display: inline-block;
    }

    /* Stack Sections */
    .skill-grid {
        flex-direction: column;
        gap: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* --- CONTACT FORM STYLES --- */
.footer-content {
    max-width: 600px; /* Keep the form narrow and readable */
    margin: 0 auto;
    text-align: center;
}

.contact-form {
    margin-top: 2rem;
    text-align: left; /* Labels should align left */
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

input, textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--card-bg); /* Matches the card style */
    border: 1px solid #333;
    border-radius: 8px;
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-color); /* Glows blue when typing */
}

/* Light Mode Overrides for Form */
body.light-mode input, 
body.light-mode textarea {
    background-color: #ffffff;
    border: 1px solid #ccc;
    color: #000;
}

/* --- ANIMATIONS --- */
/* CONTINUOUS WAVE ANIMATION */
@keyframes text-wave {
    0% {
        background-position: 100% 50%; /* Start: Star hidden on Left */
    }
    20% {
        background-position: 0% 50%;   /* Zip: Star flies to Right */
    }
    100% {
        background-position: 0% 50%;   /* Rest: Stay hidden on Right */
    }
}

