html {
    scroll-behavior: smooth;
}
/* =========================================
   VARIABLES
   ========================================= */
:root {
    --text-main: #a6accd;
    --text-heading: #ffffff;
    --accent-purple: #a277ff;
    --accent-green: #4ade80;
    --glass-bg: rgba(26, 23, 38, 0.45); 
    --glass-border: rgba(255, 255, 255, 0.125);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1); 
    --glass-blur: blur(8px) saturate(180%); 
}

body.light-mode {
    --text-main: #4a4a5e;
    --text-heading: #111118;
    --accent-purple: #7c3aed; 
    --accent-green: #16a34a;  
    --glass-bg: rgba(255, 255, 255, 0.25); 
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    --glass-blur: blur(8px) saturate(180%); 
}

/* =========================================
   BASE SETUP
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'DM Sans', sans-serif; 
}

body {
    background-color: #0d0b14; 
    color: var(--text-main);
    display: flex;
    justify-content: center;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden; 
}

body.light-mode {
    background-color: #d3d0d5;
}

body, .sidebar, .card, .theme-toggle {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* =========================================
   BACKGROUND ANIMATION
   ========================================= */
body::before, body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(90px); 
    z-index: -1; 
    animation: float 20s infinite alternate ease-in-out;
}

body::before {
    background: rgba(162, 119, 255, 0.15); 
    width: 60vw;
    height: 60vw;
    max-width: 600px;
    max-height: 600px;
    top: -10%;
    left: -10%;
}

body::after {
    background: rgba(74, 222, 128, 0.12); 
    width: 50vw;
    height: 50vw;
    max-width: 500px;
    max-height: 500px;
    bottom: -10%;
    right: -10%;
    animation-delay: -10s; 
}

body.light-mode::before { background: rgb(195, 163, 255); }
body.light-mode::after { background: rgba(22, 163, 74, 0.15); }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(5vw, 5vh) scale(1.05); }
    66% { transform: translate(-2vw, 8vh) scale(0.95); }
    100% { transform: translate(-5vw, -2vh) scale(1); }
}

/* =========================================
   PARTICLES BACKGROUND
   ========================================= */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; 
    pointer-events: none; 
}

body::before, body::after {
    z-index: -2; 
}


/* =========================================
   TYPOGRAPHY
   ========================================= */
h1, h2, h3 { 
    color: var(--text-heading); 
    font-weight: 600; 
}
h1 { 
    font-family: 'Cormorant Garamond', serif; 
    font-size: 4.8rem; 
    margin-bottom: 1rem; 
    
    font-weight: 600;
}
h1 span {
    font-family: inherit; 
    font-style: inherit;
}

h2 { 
    font-size: 1.5rem; 
    margin-bottom: 1.5rem; 
    margin-top: 3rem; 
}

.accent-purple { color: var(--accent-purple); }
.accent-green { color: var(--accent-green); }


/* =========================================
   LAYOUT & NAVIGATION
   ========================================= */
.content {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem 3rem 110px;
}

.top-bar {
    display: flex;
    justify-content: flex-end;
}

.sidebar {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    width: 64px;
    height: auto;
    background: var(--glass-bg); 
    backdrop-filter: var(--glass-blur); 
    -webkit-backdrop-filter: var(--glass-blur); 
    border: 1px solid var(--glass-border); 
    border-radius: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    z-index: 100; 
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: var(--glass-shadow);
}

.sidebar:hover {
    width: 180px;
    align-items: flex-start;
}

.logo {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent-purple);
    font-weight: bold;
    margin-bottom: 2rem;
    transition: margin 0.4s ease;
}

.logo-link {
    display: flex;
    justify-content: center;
    width: 100%;
}

.logo-link:hover .logo {
    border-color: var(--accent-purple);
    color: var(--text-heading);
    transform: scale(1.05);
}

.sidebar:hover .logo {
    margin-left: 12px;
}

.nav-links {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    padding: 12px 22px;
    transition: color 0.3s;
}

.nav-links a i {
    min-width: 20px;
    text-align: center;
}

.nav-links span {
    margin-left: 15px;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.sidebar:hover .nav-links span {
    opacity: 1;
    transition-delay: 0.1s;
}

.nav-links a:hover { color: var(--text-heading); }

/* =========================================
   COMPONENTS
   ========================================= */
.theme-toggle {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
}

.theme-toggle:hover {
    background: var(--glass-border);
    color: var(--text-heading);
}

.tag {
    background: rgba(74, 222, 128, 0.1);
    color: var(--accent-green);
    padding: 6px 16px; 
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    width: fit-content; 
}


/* --- HERO SECTION STYLES --- */
.hero {
    min-height: 100vh; 
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: flex-start;
    padding: 2rem 0;
    gap: 2rem; 
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1rem; 
    max-width: 800px; 
}

.hero-description {
    font-size: 1.15rem;
    line-height: 1.6;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap; 
    gap: 1rem; 
    align-items: center;
}

.btn {
    padding: 10px 20px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
    cursor: pointer;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.15); 
    color: var(--text-heading);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.2); 
    color: var(--text-heading);
    
    border-color: var(--accent-purple);
    
    box-shadow: -10px 0 25px rgba(162, 119, 255, 0.4), 
                 10px 0 25px rgba(74, 222, 128, 0.4);
                 
    transform: translateY(-2px);
}

body.light-mode .btn-primary {
    background: rgba(64, 97, 84, 0.838);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* --- SECTION SPACING (DESKTOP) --- */
#experience,
#projects,
#skills,
#recognition {
    padding-top: 2rem;
    padding-bottom: 4rem; 
    margin-bottom: 2rem;  
}

/* --- MOBILE  --- */
@media (max-width: 768px) {
    #experience,
    #projects,
    #skills,
    #recognition {
        padding-top: 1.5rem;
        padding-bottom: 2rem; 
        margin-bottom: 1rem;  
    }
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border); 
    transition: all 0.3s ease;
    color: var(--text-main);
    backdrop-filter: blur(3px) saturate(180%);
    -webkit-backdrop-filter: saturate(180%);
}

.btn-secondary:hover {
    background: var(--glass-bg);
    color: var(--accent-purple); 
    border-color: var(--accent-purple); 
    text-shadow: 0 0 12px rgba(162, 119, 255, 0.8); 
    transform: translateY(-2px);
}

.card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card {
    background: rgba(26, 23, 38, 0.7);
}

body.light-mode .featured-card {
    background: rgba(255, 255, 255, 0.6);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.grid-2-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.grid-3-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1rem; }
.pill {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.date-badge, .status-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.status-badge { background: rgba(74, 222, 128, 0.1); color: var(--accent-green); }
.score { color: var(--text-heading); font-weight: 600; font-size: 0.9rem; }
.skill-text { font-size: 0.9rem; line-height: 1.8; }

/* =========================================
   BLOG SECTION
   ========================================= */
.blog-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
}

.blog-title-pill {
    display: inline-block;
    padding: 10px 32px;
    border-radius: 50px;
    background: #4f4d5926; 
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-heading);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s ease;
    position: relative;
    z-index: 10;
}

body.light-mode .blog-title-pill {
    background: #ffffff;
    color: #111118;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.blog-title-pill:hover {
    transform: translateY(-5px);
    border-color: transparent;
    box-shadow: -15px 0 30px rgba(162, 119, 255, 0.6), 15px 0 30px rgba(74, 222, 128, 0.6);
}

.empty-state {
    color: #625d77;
    font-size: 1.2rem;
    font-style: italic;
}

body.light-mode .empty-state {
    color: #565d6a; 
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--glass-border);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem; 
    transition: color 0.3s ease, transform 0.2s ease;
}

.footer-link i { font-size: 1.2rem; }
.footer-link:hover { color: var(--accent-purple); transform: translateY(-2px); }

/* =========================================
   MOBILE OPTIMIZATIONS
   ========================================= */
@media (max-width: 768px) {
    .content {
        padding: 2rem 1.5rem 100px 1.5rem; 
    }

    .hero {
        min-height: auto; 
        padding-top: 2rem; 
        align-items: center; 
        text-align: center;
    }

    .hero-content {
        align-items: center;
    }

    .action-buttons {
        justify-content: center; 
    }

    .action-buttons .btn {
        flex: 1 1 calc(50% - 1rem); 
        min-width: 140px;
        text-align: center;
        justify-content: center;
    }

    .sidebar {
        top: auto;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%; 
        max-width: 400px; 
        height: auto;
        flex-direction: row;
        justify-content: space-between;
        padding: 0.5rem 1rem;
        border-radius: 32px;
        z-index: 1000; 
    }

    .logo, .logo-link { display: none; }
    
    .sidebar:hover {
        width: 90%; 
        align-items: center;
    }
        
    .nav-links {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .nav-links a { 
        margin-bottom: 0; 
        padding: 10px; 
        font-size: 1.2rem; 
        flex: 1; /* Distribute space evenly */
        justify-content: center;
    }
    
    .nav-links span { display: none !important; }
    
    h1 { font-size: 2.5rem; }
    
    .site-footer {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-links { justify-content: center; }
}

/* =========================================
   PROJECT BUTTONS & MODAL
   ========================================= */
.project-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-small {
    padding: 6px 16px;
    font-size: 0.85rem;
}

.project-actions .btn-small {
    display: inline-flex;
    align-items: center;
    gap: 8px; 
}

.demo-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    
    transform: translate(-50%, -40%); 
    
    width: 90%;
    max-width: 420px;
    z-index: 1000;
    padding: 24px;
    border-radius: 16px;
    
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.demo-modal.show-modal {
    opacity: 1;
    transform: translate(-50%, -50%);
    pointer-events: auto;
}


.close-modal {
    position: absolute;
    top: 16px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--accent-purple);
}

/* =========================================
   LIGHT MODE FORM 
   ========================================= */

body.light-mode .form-group input, 
body.light-mode .form-group textarea, 
body.light-mode .form-group select {
    background: rgba(0, 0, 0, 0.03) !important; 
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #111118 !important; 
}

body.light-mode .form-group select option {
    background: #ffffff; 
    color: #111118;      
}

body.light-mode input::placeholder, 
body.light-mode textarea::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

body.light-mode .form-group label {
    color: var(--accent-purple);
    font-weight: 700;
}



/* =========================================
   CONTACT DESCRIPTION TEXT
   ========================================= */
.contact-description {
    max-width: 580px;
    margin: 0 auto;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-main); 
}

.contact-description strong {
    color: var(--text-heading); 
    font-weight: 600;
    letter-spacing: 0.3px;
}

body.light-mode .contact-description {
    color: #4f4f55;
}

body.light-mode .contact-description strong {
    color: #4f4f55; 
}

/* =========================================
   TOOLTIP SPEECH BUBBLE
   ========================================= */

.tooltip-trigger {
    position: relative;
    display: inline-block;
    cursor: help; 
    text-decoration: underline;
    text-decoration-color: var(--accent-purple);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    transition: color 0.3s ease;
}

.tooltip-trigger:hover, 
.tooltip-trigger:focus {
    color: var(--accent-purple);
    outline: none; 
}

.tooltip-bubble {
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: max-content;
    max-width: 280px;
    padding: 12px 16px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    
    color: var(--text-heading);
    font-size: 0.85rem;
    line-height: 1.5;
    text-align: left;
    text-decoration: none; 
    
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
}

.tooltip-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: rgba(255,255,255,0.2) transparent transparent transparent;
}

.tooltip-trigger:hover .tooltip-bubble,
.tooltip-trigger:focus .tooltip-bubble {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

body.light-mode .tooltip-bubble {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #111118;
    box-shadow: 0 10px 25px rgba(31, 38, 135, 0.15);
}

body.light-mode .tooltip-bubble::after {
    border-color: rgba(0,0,0,0.1) transparent transparent transparent;
}

/* SUCCESS TOAST NOTIFICATION */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--accent-green); 
    padding: 12px 24px;
    border-radius: 12px;
    color: var(--text-heading);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast i {
    color: var(--accent-green);
    font-size: 1.2rem;
}