/* 
   v2-styles.css
   Modern, Professional Portfolio Styling
   Features: CSS Variables, Dark/Light mode support, Glassmorphism 2.0
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

html,
body {
    overflow-x: hidden;
    width: 100%;
}

:root {
    /* Base Colors - Default (Dark) */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-glass: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-primary: #6366f1;
    /* Indigo */
    --accent-secondary: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.3);

    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --nav-height: 80px;
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.8);
    --border-color: rgba(0, 0, 0, 0.05);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --accent-primary: #4f46e5;
    --accent-secondary: #4338ca;
    --accent-glow: rgba(79, 70, 229, 0.15);

    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.theme-transitioning * {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease !important;
}

/* --- Layout Containers --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    box-sizing: border-box;
    width: 100%;
}

section {
    padding: 100px 0;
}

/* --- Navigation --- */
nav {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    text-decoration: none;
    z-index: 1001;
}

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

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-icon {
    display: none;
    /* Hide icons on desktop by default */
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background-color: var(--accent-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

#theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#theme-toggle:hover {
    background-color: var(--border-color);
    border-color: var(--accent-primary);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--nav-height);
    background-image: url('professional_hero_bg_1772658399265.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.4), var(--bg-primary));
}

[data-theme="light"] .hero::after {
    background: linear-gradient(to bottom, rgba(248, 250, 252, 0.2), var(--bg-primary));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--accent-glow);
    color: var(--accent-primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--accent-primary);
}

h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -2px;
}

.hero p {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 650px;
}

.cta-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1.1rem 2.2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary i {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.btn-primary:hover i {
    transform: translateX(4px);
}

.btn-secondary {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    background-color: var(--bg-glass);
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--accent-glow);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: -1;
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    transform: translateY(-3px);
}

.btn-secondary:hover::before {
    width: 300px;
    height: 300px;
}

/* --- Section Headers --- */
.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.section-header p {
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* --- Cards --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
}

.card:hover {
    transform: translateY(-12px);
    border-color: var(--accent-primary);
    box-shadow: var(--card-shadow), 0 0 20px var(--accent-glow);
}

.card-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card:hover .card-img {
    transform: scale(1.05);
}

.card-body {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-icon {
    width: 50px;
    height: 50px;
    background-color: var(--accent-glow);
    color: var(--accent-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    background-color: var(--accent-primary);
    color: white;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 2rem;
}

/* --- Skills Section --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.skill-category h3 {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--accent-primary);
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-tag {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.skill-tag:hover {
    border-color: var(--accent-primary);
    background-color: var(--accent-glow);
    transform: scale(1.05);
}

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

/* --- Mobile Specific (V3: Native App Feel) --- */
@media (max-width: 991px) {

    /* Hide top nav visuals but keep the element alive for its children */
    nav {
        background: transparent !important;
        border: none;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        pointer-events: none;
        /* Let clicks pass through the top invisible bar */
    }

    .logo {
        display: none;
    }

    /* Create Bottom Navigation Bar */
    .nav-links {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 75px;
        background-color: var(--bg-glass);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-color);
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        padding: 0 1rem;
        gap: 1.5rem;
        z-index: 1000;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        /* Smooth scroll on iOS */
        pointer-events: auto;
        /* Re-enable pointer events for the nav-links */
    }

    /* Hide scrollbar for bottom nav */
    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .nav-links a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        font-size: 0.7rem;
        font-weight: 600;
        color: var(--text-muted);
    }

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

    .nav-links a::after {
        display: none;
        /* No underlines on mobile bottom nav */
    }

    .nav-icon {
        display: block;
        font-size: 1.25rem;
    }

    .nav-links span {
        display: block;
    }

    /* Move theme toggle to top right since nav is at bottom */
    #theme-toggle {
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 1001;
        background-color: var(--bg-glass);
        backdrop-filter: blur(10px);
        pointer-events: auto;
        /* Re-enable pointer events for the button */
    }

    .menu-toggle {
        display: none;
        /* Removed entirely in V3 */
    }

    .scroll-to-top {
        bottom: 90px;
        /* Push above bottom nav */
    }
}

@media (max-width: 768px) {
    section {
        padding: 50px 0;
        /* Reduced vertical padding */
    }

    .container {
        padding: 0 1rem;
        /* Tighter horizontal padding */
    }

    .section-header {
        margin-bottom: 3rem;
    }

    .section-header h2 {
        font-size: 2.2rem;
        /* Scaled down header */
    }

    .section-header p {
        font-size: 0.95rem;
        /* Scaled down description */
    }

    /* Proportional Card Shrinking */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        /* Tighter gap */
    }

    .card {
        border-radius: 16px;
        /* slightly smaller radius */
    }

    .card-body {
        padding: 1.25rem;
        /* Tighter internal padding */
    }

    .card-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-bottom: 1rem;
        border-radius: 10px;
    }

    .card h3 {
        font-size: 1.25rem;
        /* Scaled down card titles */
        margin-bottom: 0.5rem;
    }

    .card p {
        font-size: 0.85rem;
        /* Scaled down card text */
        margin-bottom: 1rem;
    }

    .card-img {
        height: 160px;
        /* Shorter image */
    }

    .cta-group {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 0.9rem 1.5rem;
        /* Smaller button pad */
        font-size: 0.9rem;
    }

    h1 {
        font-size: 2.5rem;
        /* Scale down hero main text */
        margin-bottom: 1.25rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    /* Education & Certifications Specific Tweaks */
    #education .card-body p,
    #certifications .card-body p {
        line-height: 1.4;
    }
}