/* --- CSS VARIABLES & RESET --- */
:root {
    --primary: #2563eb;
    /* Modern Blue */
    --secondary: #0f172a;
    /* Dark Slate */
    --accent: #f59e0b;
    /* Amber/Orange */
    --bg-body: #f8fafc;
    --text-main: #334155;
    --text-light: #64748b;
    --card-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.7);
    --transition: all 0.3s ease;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@media (prefers-color-scheme: dark) {
    .glass {
        background: rgba(30, 41, 59, 0.6) !important;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --primary: #3b82f6;
        --secondary: #f1f5f9;
        --bg-body: #0f172a;
        --text-main: #e2e8f0;
        --text-light: #94a3b8;
        --card-bg: #1e293b;
        --nav-bg: rgba(15, 23, 42, 0.8);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    background-attachment: fixed;
}

@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    }
}

.nav-logo-img {
    height: 30px;
    /* Match text height roughly */
    width: auto;
    filter: grayscale(100%);
    /* Optional: keep it subtle until hover */
    opacity: 0.7;
    /* Slightly greyed out/faded */
    transition: var(--transition);
}

.nav-links .nav-logo-link:hover .nav-logo-img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- NAVIGATION --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
}

nav {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    /* Vertically center all items including button */
}

.nav-links a {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links .btn {
    color: white !important;
    /* Force white text on button */
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    margin: 5px;
    transition: all 0.3s ease;
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    position: relative;
    overflow: hidden;
    /* Gradient handled by body, but distinct hero vibe is cool too */
}

#neuro-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}



.crossing-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    line-height: 0.8;
    /* Overlap */
    font-size: 5rem;
    font-weight: 900;
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
}

/* Subtle X Background */
.crossing-title::before {
    content: 'X';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15rem;
    color: rgba(37, 99, 235, 0.03);
    /* Very faint primary */
    z-index: -1;
    font-family: sans-serif;
}

.text-neuro {
    color: var(--primary);
    position: relative;
    /* Gradient Text */
    background: linear-gradient(to right, var(--primary), #60a5fa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    z-index: 2;
    opacity: 0.9;
    /* Simple alpha blend for overlap visibility */
}

.text-cs {
    color: var(--accent);
    margin-left: 2rem;
    /* Indent slightly for dynamic feel */
    margin-top: -0.3em;
    /* FORCE OVERLAP */
    background: linear-gradient(to right, #f59e0b, #fbbf24);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    z-index: 1;
    opacity: 0.9;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-main);
    /* Darker text for better contrast */
    max-width: 600px;
    margin-bottom: 2rem;
    z-index: 10;
    position: relative;
    /* Tighter fit & Less Blur */
    width: fit-content;
    /* Shrink to fit text */
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;

    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    /* Reduced blur */
    -webkit-backdrop-filter: blur(4px);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

@media (prefers-color-scheme: dark) {
    .hero p {
        background: rgba(15, 23, 42, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.05);
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
        /* Dark mode glow */
    }
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}

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

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 3rem;
    position: relative;
}

/* --- ABOUT & STATS --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-img {
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    aspect-ratio: 1/1;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- SKILLS --- */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(128, 128, 128, 0.2);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-tag i {
    color: var(--primary);
}

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

.project-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    border: 1px solid rgba(128, 128, 128, 0.1);
    display: flex;
    flex-direction: column;
}

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

.project-img {
    height: 200px;
    background-color: #cbd5e1;
    /* Placeholder grey */
    background-size: cover;
    background-position: center;
}

.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-content h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.project-content p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.project-link {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- CONTACT --- */
.contact-container {
    text-align: center;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    font-size: 1.5rem;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 2rem;
    background: var(--secondary);
    color: var(--text-light);
    font-size: 0.9rem;
}

/* --- MOBILE --- */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0px;
        height: 100vh;
        top: 0vh;
        background: var(--card-bg);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        padding-top: 5rem;
        z-index: 999;
    }

    .nav-links.nav-active {
        transform: translateX(0%);
    }

    .burger {
        display: block;
        z-index: 1001;
    }

    /* Burger Animation */
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .toggle .line2 {
        opacity: 0;
    }

    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .crossing-title {
        font-size: 2.5rem;
    }

    .text-cs {
        margin-left: 1rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }
}