/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Modern Dark Palette */
    --bg-dark: #0f172a;
    /* Slate 900 */
    --bg-card: rgba(30, 41, 59, 0.7);
    /* Slate 800 with opacity */
    --glass-border: rgba(255, 255, 255, 0.08);

    /* Accents (Aurora Colors) */
    --primary: #6366f1;
    /* Indigo */
    --secondary: #ec4899;
    /* Pink */
    --accent: #06b6d4;
    /* Cyan */

    /* Typography */
    --text-main: #f8fafc;
    /* Slate 50 */
    --text-muted: #94a3b8;
    /* Slate 400 */

    /* Animation */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.3;
    overflow-x: hidden;
    position: relative;
}

/* =========================================
   2. AURORA BACKGROUND
   ========================================= */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: var(--bg-dark);
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    will-change: transform;
    animation: float 10s infinite alternate ease-in-out;
}

.aurora-blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--primary);
}

.aurora-blob-2 {
    bottom: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--secondary);
    animation-delay: -5s;
}

.aurora-blob-3 {
    top: 40%;
    left: 40%;
    width: 30vw;
    height: 30vw;
    background: var(--accent);
    animation-duration: 15s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, -30px) scale(1.1);
    }
}

.bg-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

/* =========================================
   3. UTILITIES & LAYOUT
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.section-description {
    text-align: center;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 4rem;
}

/* Glass Card Utility */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* =========================================
   4. NAVBAR
   ========================================= */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

/* Mobile Toggle Button - Hidden by default on desktop */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
    z-index: 1001;
}

/* =========================================
   5. HERO SECTION
   ========================================= */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -2px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.btn {
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
    transform: scale(1.05);
}

/* =========================================
   6. SECTIONS (About, Projects, Tech)
   ========================================= */
section {
    padding: 100px 0;
}

/* Tech Stack */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.tech-category {
    padding: 2rem;
}

.tech-category h3 {
    color: var(--text-main);
    margin-bottom: 1rem;
}

.tech-badge {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: inline-block;
    margin: 4px;
}

/* =========================================
   8. ABOUT SECTION SPECIFICS
   ========================================= */

/* Grid Layout for About Section */
.about-grid-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Split 50/50 */
    gap: 2rem;
    align-items: start;
}

/* Bio Card Styling */
.bio-card {
    padding: 2.5rem;
    height: 100%;
    /* Match height of timeline column if possible */
}

.bio-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 1.5rem 0 2.5rem 0;
    line-height: 1.8;
}

/* Stats Row inside Bio */
.stat-row {
    display: flex;
    gap: 2rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Timeline Styling (Education/Experience) */
.timeline-wrapper .glass-card {
    padding: 2rem;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.timeline-item {
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px solid var(--glass-border);
    transition: var(--transition);
}

.timeline-item:hover {
    border-left-color: var(--primary);
}

.timeline-date {
    display: block;
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.timeline-item h4 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.timeline-place {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Responsive Fix for About */
@media (max-width: 900px) {}

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

.project-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-image {
    height: 220px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

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

.project-links {
    margin-top: auto;
    padding-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.project-link {
    font-size: 0.9rem;
    color: var(--text-main);
    text-decoration: none;
    border-bottom: 1px solid var(--text-muted);
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    color: white;
    border-radius: 8px;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Footer */
.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    text-align: center;
}

.footer-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.footer-nav a {
    color: #9ca3af;
    text-decoration: none;
    transition: var(--transition);
}

.footer-nav a:hover {
    color: white;
}

.footer-copyright {
    border-top: 1px solid #374151;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

/* =========================================
   10. SCROLL TO TOP BUTTON
   ========================================= */

.scroll-top {
    position: fixed;
    bottom: 5rem;
    left: 2rem;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent);
    border-radius: 50%;
    /* Makes it circular */
    color: var(--primary);
    cursor: pointer;

    /* Centering the SVG */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Animation & Transition */
    z-index: 1000;
    opacity: 0;
    /* Hidden by default */
    visibility: hidden;
    /* Hidden by default */
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* State when active (added by JS) */
.scroll-top.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Hover Effects */
.scroll-top:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.5);
    border-color: var(--primary);
}

/* SVG Specifics */
.scroll-top svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
    /* Slightly bolder icon */
}

/* =========================================
   11. TOAST NOTIFICATIONS
   ========================================= */
.toast-container {
    position: fixed;
    top: 100px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    min-width: 320px;
    max-width: 400px;
    padding: 16px 20px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(6, 182, 212, 0.15);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    pointer-events: auto;

    /* Animation */
    opacity: 0;
    transform: translateX(100%);
    animation: toastSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast.toast-hide {
    animation: toastSlideOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toastSlideIn {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    0% {
        opacity: 1;
        transform: translateX(0);
    }

    100% {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Toast Icon Container */
.toast-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-success .toast-icon {
    background: linear-gradient(135deg, var(--accent), #0891b2);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

.toast-success .toast-icon svg {
    color: white;
    width: 20px;
    height: 20px;
}

/* Toast Content */
.toast-content {
    flex: 1;
    padding-top: 2px;
}

.toast-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.toast-message {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Toast Close Button */
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.toast-close svg {
    width: 18px;
    height: 18px;
}

/* Toast Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    border-radius: 0 0 12px 12px;
    animation: toastProgress 5s linear forwards;
}

@keyframes toastProgress {
    0% {
        width: 100%;
    }

    100% {
        width: 0%;
    }
}

/* Toast Variants */
.toast-error .toast-icon {
    background: linear-gradient(135deg, var(--secondary), #db2777);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.4);
}

.toast-warning .toast-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.toast-info .toast-icon {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

/* =========================================
   7. RESPONSIVE
   ========================================= */
@media (max-width: 768px) {

    /* Show hamburger button on mobile */
    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Mobile Navigation Menu */
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 3rem 2rem;
        gap: 1.5rem;
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }

    .nav-menu.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-menu .nav-link {
        display: block;
        padding: 1rem;
        font-size: 1.25rem;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .nav-menu .nav-link:hover {
        background: rgba(99, 102, 241, 0.1);
    }

    /* Hero adjustments */
    .hero-title {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }

    .hero-description {
        font-size: 1rem;
    }

    /* About section stacking */
    .about-grid-modern {
        grid-template-columns: 1fr;
    }

    /* Contact section stacking */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* Projects grid adjustment */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    /* Toast mobile adjustments */
    .toast-container {
        top: 90px;
        right: 12px;
        left: 12px;
    }

    .toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}