/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;800&family=Space+Grotesk:wght@500;700&display=swap');

/* --- Custom Variables for High-Energy Light Mode (Default) --- */
:root {
    --text-dark: #0f172a;
    --text-muted: #334155;
    
    --accent-electric: #6366f1;
    --accent-hotpink: #f43f5e;
    --accent-cyan: #06b6d4;
    --accent-lime: #10b981;
    
    --bg-hero: linear-gradient(135deg, #def67caf 6%, #b9da7dbf 50%, #def67caf 100%);
    --bg-about: linear-gradient(135deg, #def67caf 0%, #a0dbeffb 100%);
    --bg-skills: linear-gradient(180deg, #a9dcedce 0%, #def67caf 100%);
    --bg-projects: linear-gradient(180deg, #def67caf 0%, #99f0f3 100%);
    --bg-contact: linear-gradient(180deg, #99f0f3 0%, #ffedd5 100%);
    
    --card-surface: #e1e4fe;
    --border-color: rgba(0, 0, 0, 0.08);
    --input-bg: #fffdfa;
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Poppins', sans-serif;
}

/* --- Dark Theme Variable Overrides --- */
body.dark-theme {
    --text-dark: #f8fafc;
    --text-muted: #cbd5e1;
    
    --bg-hero: linear-gradient(135deg, #d900ff 0%, #27cb27 50%, #f4e586 100%);
    --bg-about: linear-gradient(135deg, #09090b 0%, #111827 100%);
    --bg-skills: linear-gradient(180deg, #111827 0%, #022c22 100%);
    --bg-projects: linear-gradient(180deg, #022c22 0%, #2e1065 100%);
    --bg-contact: linear-gradient(180deg, #2e1065 0%, #431407 100%);
    
    --card-surface: #1e1b4b;
    --border-color: rgba(255, 255, 255, 0.15);
    --input-bg: #0f172a;
}

/* --- Global Resets --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    color: var(--text-dark);
    font-family: var(--font-body);
    overflow-x: hidden;
    background-color: var(--card-surface);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    padding: 110px 10%;
}

/* --- Typography & Gradients --- */
h1, h2, h3 {
    font-family: var(--font-heading);
}

.neon-text-magenta {
    background: linear-gradient(to right, #f43f5e, #d946ef);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.neon-text-cyan {
    background: linear-gradient(to right, #6366f1, #06b6d4);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.neon-text-lime {
    background: linear-gradient(to right, #10b981, #06b6d4);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title {
    font-size: 3.2rem;
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: -1px;
    font-weight: 800;
}

/* --- Header & Navbar --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 3px solid var(--accent-electric);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.08);
}

body.dark-theme header {
    background: rgba(15, 23, 42, 0.85);
    border-bottom: 3px solid var(--accent-cyan);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--text-dark);
}

.logo span {
    background: linear-gradient(to right, #06b6d4, #6366f1);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 30px;
    font-weight: 700;
    transition: 0.3s;
}

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

/* --- Theme Toggle Button --- */
.theme-btn {
    background: transparent;
    border: 2px solid var(--accent-electric);
    color: var(--accent-electric);
    padding: 8px 14px;
    font-size: 1.1rem;
    border-radius: 50%;
    cursor: pointer;
    margin-left: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

body.dark-theme .theme-btn {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.theme-btn:hover {
    transform: scale(1.15) rotate(15deg);
}

/* --- Hero Section --- */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Rich neon dark radial gradients back behind the content instead of the pastel light theme canvas */
    background: radial-gradient(circle at 80% 20%, rgba(255, 0, 127, 0.12), transparent 45%),
                radial-gradient(circle at 20% 80%, rgba(0, 240, 255, 0.12), transparent 45%),
               var(--card-surface);
    padding-top: 100px;
}

.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 24px;
    color: var(--text-white) !important; /* Forces text out of the dark slate color back to neon bright white */
}

.hero-content h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-gray) !important; /* Switches subtitle to clean muted gray */
    margin-bottom: 35px;
}

.social-icons {
    margin-bottom: 45px;
    display: flex;
    justify-content: center;
    gap: 28px;
}

.social-icons a {
    font-size: 2rem;
    color: var(--text-white) !important; /* Turns social icons white so they don't stay hidden in dark mode */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
}

.social-icons a:hover {
    transform: translateY(-6px);
    color: #7c3aed;             /* Elegant violet lift on hover */
}
.social-icons a:nth-child(1):hover { color: #fff; text-shadow: 0 0 15px #fff; transform: translateY(-5px); } 
.social-icons a:nth-child(2):hover { color: #0077b5; text-shadow: 0 0 15px #0077b5; transform: translateY(-5px); } 
.social-icons a:nth-child(3):hover { color: #fcb045; text-shadow: 0 0 15px #fcb045; transform: translateY(-5px); } 
.social-icons a:nth-child(4):hover { color: var(--neon-magenta); text-shadow: 0 0 15px var(--neon-magenta); transform: translateY(-5px); }

/* --- Gorgeous Gradient Pill Button Upgrade --- */
.btn {
    display: inline-block;
    padding: 16px 45px;
    /* The vibrant purple-to-pink linear transition from your screenshot */
    background: linear-gradient(135deg, #6366f1 0%, #d946ef 100%);
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 50px;        /* Perfect rounded pill shape */
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;               /* Removed the harsh border line */
    /* Soft, wide ambient blur drop shadow */
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.4); 
    transition: all 0.4s ease;
}

.btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px rgba(217, 70, 239, 0.55);
}

/* --- About Section (Fixed Background and Text) --- */
#about {
    background: var(--bg-about);
}

#about .container {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    border: 2px solid var(--border-color);
    padding: 60px 8%;
}

body.dark-theme #about .container {
    background: rgba(30, 27, 75, 0.6);
}

#about p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-muted); /* Dynamically changes colors based on theme */
}

/* --- Skills Section --- */
#skills {
    background: var(--bg-skills);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 35px;
    margin-bottom: 50px; /* Add this line to push the tech badges down */
}

.skill-card {
    background-color: var(--card-surface);
    border: 2px solid var(--border-color);
    padding: 65px 40px; /* Deep internal padding to maximize card height and layout space */
    border-radius: 32px; /* Larger, softer corners for a premium feel */
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skill-card i, 
.skill-card img,
.skill-card svg {
    font-size: 4rem;      /* Gives FontAwesome icons huge, beautiful proportions */
    height: 65px;         /* Uniform sizing constraint for image/SVG assets */
    margin-bottom: 28px;  /* Clean separation gap below the asset */
    display: inline-block;
    transition: transform 0.3s ease;
}

.skill-card h3 {
    color: var(--text-dark);
    font-size: 1.75rem;   /* Crisp, structural title sizing */
    margin-bottom: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.skill-card p {
    color: var(--text-muted);
    font-size: 1.1rem;    /* Highly legible body text scale */
    line-height: 1.7;     /* Prevents text lines from feeling cramped */
}
.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-cyan); /* Restores the signature colored stroke wrapper */
    box-shadow: 0 25px 50px rgba(6, 182, 212, 0.15); /* Soft matching ambient glow */
}
body.dark-theme .skill-card:hover {
    border-color: var(--accent-lime);
    box-shadow: 0 25px 50px rgba(16, 185, 129, 0.2);
}
.tech-badges {
    display: flex;
    flex-wrap: wrap;       /* CRITICAL: Allows badges to drop to the next line instead of colliding */
    justify-content: center; /* Centers the badges nicely across the row */
    gap: 16px 20px;        /* Adds explicit row and column spacing between badges */
    width: 100%;
    margin-top: 25px;
}

/* --- Individual Badge Styling Updates --- */
.tech-badges span {
    display: inline-block;
    background: var(--card-surface);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    white-space: nowrap;   /* Prevents single languages (like Git/GitHub) from breaking into two lines */
    transition: all 0.3s ease;
}

/* Optional high-energy hover effect to match your theme */
.tech-badges span:hover {
    transform: translateY(-3px);
    border-color: var(--accent-cyan);
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.15);
}

/* --- Projects Section --- */
/* --- Projects Section --- */
#projects {
    background: var(--bg-projects);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 45px;
}

.project-card {
    background-color: var(--card-surface);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.project-img {
    height: 240px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Vibrant Fallback Gradients that make the big text pop */
.bg-backend {
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
}

.bg-datascience {
    background: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
}

.featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.2);
    z-index: 2;
}

.img-placeholder-text {
    font-weight: 800;
    font-size: 1.8rem;
    color: #ffffff !important;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 3;
}

.project-info {
    padding: 35px;
}

.project-info h3 {
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 1.5rem;
}

.project-info p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 25px; /* FIXED: Prevents description from colliding with tags */
}

/* Clean layout configuration for tags */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tags span {
    background: var(--input-bg);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    padding: 6px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
}
/* --- Contact Section --- */
#contact {
    background: var(--bg-contact);
}

.contact-form-container {
    background: var(--card-surface);
    border: 2px solid var(--border-color);
    max-width: 650px;
    margin: 0 auto;
    padding: 50px;
    border-radius: 32px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-dark);
    font-weight: 800;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 16px;
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    color: var(--text-dark);
    border-radius: 16px;
    font-family: var(--font-body);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 45px;
    background: #0f172a;
    color: #cbd5e1;
}

.submit-btn {
    width: 100%;    /* Forces the button to stretch to the full width of the form */
    display: block;  /* Ensures it behaves correctly as a full-width block element */
    padding: 16px;
    background: linear-gradient(135deg, #f43f5e 0%, #ed64a6 100%);
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 12px 24px rgba(244, 63, 94, 0.3);
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(244, 63, 94, 0.45);
}
