:root {
    /* Ethereal Prism Aesthetic Variables */
    --text-main: #1a1a24;
    --text-muted: #5a5a6a;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.7);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    
    /* Gradients */
    --accent-gradient: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
    --aurora-1: #ffecd2;
    --aurora-2: #fcb69f;
    --aurora-3: #a1c4fd;
    --aurora-4: #c2e9fb;
    --aurora-5: #e0c3fc;
    --aurora-6: #8ec5fc;
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    
    /* Default Mouse Positions */
    --mouse-x: 50vw;
    --mouse-y: 50vh;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
    background-color: #f8f9fb; /* Fallback */
}

/* =========================================
   THE AESTHETIC BACKGROUND (AURORA MESH)
========================================= */
.aurora-bg {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: -3;
    background: linear-gradient(-45deg, 
        var(--aurora-1), var(--aurora-2), 
        var(--aurora-3), var(--aurora-4), 
        var(--aurora-5), var(--aurora-6));
    background-size: 400% 400%;
    animation: auroraShift 20s ease-in-out infinite alternate;
    filter: blur(60px);
    will-change: transform, background-position;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

@keyframes auroraShift {
    0% { background-position: 0% 50%; transform: rotate(0deg); }
    50% { background-position: 100% 50%; transform: rotate(2deg); }
    100% { background-position: 0% 50%; transform: rotate(-2deg); }
}

.mouse-glow {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: -2;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
        rgba(255, 255, 255, 0.9) 0%, 
        transparent 35%
    );
    transition: opacity 0.3s;
}

.noise-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.2;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* =========================================
   TYPOGRAPHY & UTILITIES
========================================= */
h1, h2, h3, .logo, .hero-badge {
    font-family: var(--font-heading);
    font-weight: 700;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Glass Panels Base */
.glass, .glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding-top: 100px;
    margin-bottom: 80px;
}

/* =========================================
   NAVIGATION
========================================= */
.navbar {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    border-radius: 40px;
    z-index: 100;
}

.nav-container {
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    letter-spacing: -0.05em;
}

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

.nav-links a {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.3s;
}

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

/* =========================================
   HERO SECTION
========================================= */
#hero {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 60px;
}

.hero-content {
    padding: 4rem;
    border-radius: 32px;
    position: relative;
    overflow: hidden;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.8);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    border: 1px solid white;
}

.name {
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

.role {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 500;
}

.bio {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 700px;
    margin-bottom: 3rem;
}

.hero-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.glass-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid white;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-btn:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.glass-btn.primary {
    background: var(--text-main);
    color: white;
    border-color: var(--text-main);
}

.glass-btn.primary:hover {
    box-shadow: 0 10px 25px rgba(26, 26, 36, 0.2);
}

/* =========================================
   PROJECTS
========================================= */
.section-header {
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

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

.section-line {
    height: 1px;
    background: var(--glass-border);
    flex-grow: 1;
}

.project-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 1rem;
    border-radius: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    color: var(--text-main);
    background: rgba(255,255,255,0.4);
}

.filter-btn.active {
    background: white;
    color: var(--text-main);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    padding: 2rem;
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 20px 40px rgba(31, 38, 135, 0.1);
}

.project-card.filter-hidden {
    display: none;
}

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.project-category {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-main);
    background: rgba(255,255,255,0.7);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.project-links {
    display: flex;
    gap: 0.8rem;
}

.project-links a {
    color: var(--text-main);
    opacity: 0.6;
    transition: opacity 0.3s;
}

.project-links a:hover {
    opacity: 1;
}

.project-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

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

.project-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.project-tech-list span {
    font-size: 0.75rem;
    font-weight: 600;
    background: white;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    color: var(--text-muted);
}

/* =========================================
   SKILLS & EXPERIENCE
========================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-group {
    padding: 2rem;
    border-radius: 24px;
}

.skill-group h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tags span {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.timeline {
    padding: 3rem;
    border-radius: 32px;
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 3rem;
    border-left: 2px solid rgba(255,255,255,0.5);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--text-main);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.8);
}

.timeline-date {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.timeline-content p {
    color: var(--text-muted);
}

.clean-list {
    list-style: none;
    margin-top: 1rem;
}

.clean-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
}

.clean-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--text-main);
    font-weight: bold;
}

/* =========================================
   FOOTER & ANIMATIONS
========================================= */
.footer {
    text-align: center;
    padding: 3rem 0;
    margin-top: 5rem;
}

.footer .muted {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   HAMBURGER BUTTON
========================================= */
.hamburger-btn {
    background: rgba(255,255,255,0.35);
    border: 1px solid rgba(255,255,255,0.55);
    color: var(--text-main);
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.hamburger-btn:hover {
    background: rgba(255,255,255,0.7);
    transform: scale(1.05);
}

/* =========================================
   ACHIEVEMENTS DRAWER
========================================= */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s;
}
.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}
.achievements-drawer {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(400px, 92vw);
    z-index: 950;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 2rem 1.5rem;
    transform: translateX(110%);
    transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
    border-radius: 24px 0 0 24px;
}
.achievements-drawer::-webkit-scrollbar { display: none; }
.achievements-drawer.open { transform: translateX(0); }

.drawer-header {
    margin-bottom: 2rem;
    padding-right: 2rem;
    position: relative;
}
.drawer-header h2 { font-size: 2rem; margin-bottom: 0.25rem; font-family: var(--font-heading); }
.drawer-subtitle { color: var(--text-muted); font-size: 0.88rem; }
.drawer-close-btn {
    position: absolute;
    top: 0; right: 0;
    background: rgba(255,255,255,0.3);
    border: 1px solid rgba(255,255,255,0.5);
    color: var(--text-main);
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.drawer-close-btn:hover { background: rgba(255,255,255,0.9); transform: rotate(90deg); }

.drawer-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.cert-grid { display: flex; flex-direction: column; gap: 0.75rem; }

.cert-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
}
.cert-card:hover { transform: translateX(4px); box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.cert-icon { font-size: 1.6rem; flex-shrink: 0; }
.cert-info h4 { font-size: 0.88rem; font-weight: 600; margin-bottom: 0.15rem; line-height: 1.3; }
.cert-info p { font-size: 0.78rem; color: var(--text-muted); }

/* Drawer Navigation Cards (Phase 5) */
.drawer-nav-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}
.drawer-nav-card {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
}
.drawer-nav-card:hover {
    transform: translateX(8px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
.nav-icon {
    font-size: 2rem;
    margin-right: 1.25rem;
    background: rgba(255,255,255,0.2);
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
}
.nav-info { flex: 1; }
.nav-info h3 { font-family: var(--font-heading); font-size: 1.1rem; margin-bottom: 0.2rem; }
.nav-info p { font-size: 0.8rem; color: var(--text-muted); }
.nav-arrow { font-size: 1.2rem; color: var(--text-muted); transition: transform 0.3s; }
.drawer-nav-card:hover .nav-arrow { transform: translateX(4px); color: var(--text-main); }

/* =========================================
   MODAL ARCHITECTURE
========================================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 3rem;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    scrollbar-width: none; /* Hide scrollbar for a cleaner look */
}

.modal-container::-webkit-scrollbar { display: none; }

.modal-overlay.active .modal-container {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
    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 cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: rotate(90deg);
}

.modal-content {
    color: var(--text-main);
}

/* Prevent body scrolling when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Responsive Mobile Overhaul - "App-Like" Experience */
@media (hover: none) and (pointer: coarse) {
    /* Dim the mouse glow on mobile touch devices where it just sits awkwardly */
    .mouse-glow {
        opacity: 0.3;
    }
}

@media (max-width: 768px) {
    /* 📱 CORE APP-LIKE LAYOUT */
    body { overscroll-behavior-y: none; } /* Prevents pull-to-refresh bounce */
    .container { padding: 0 1.2rem; }
    .section { padding-top: 80px; margin-bottom: 80px; }
    
    /* 📱 FLOATING BOTTOM NAV (iOS Style) */
    .navbar {
        top: auto; bottom: 1.5rem;
        width: 90%; max-width: 360px;
        padding: 0.6rem;
        border-radius: 30px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.15), inset 0 0 0 1px rgba(255,255,255,0.2);
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
    .nav-container { padding: 0; justify-content: center; }
    .logo { display: none; }
    .nav-links {
        display: flex; width: 100%;
        justify-content: space-between;
        gap: 0; margin: 0;
    }
    .nav-links a {
        flex: 1; text-align: center;
        font-size: 0.85rem; font-weight: 600;
        padding: 0.7rem 0.2rem;
        border-radius: 24px;
    }
    .nav-links a.active {
        background: #fff; color: #ff758c;
        box-shadow: 0 4px 15px rgba(255,117,140,0.3);
    }
    .hamburger-btn { margin-left: 0.5rem; }

    /* 📱 HERO SECTION - CENTERED & BOLD */
    #hero {
        min-height: 90vh;
        padding-top: 3rem; padding-bottom: 6rem;
        display: flex; align-items: center; justify-content: center;
    }
    .hero-content {
        padding: 2.5rem 1.5rem;
        border-radius: 30px;
        text-align: center;
        background: linear-gradient(145deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.05) 100%);
    }
    .name { font-size: 3.2rem; line-height: 1.1; margin-bottom: 0.5rem; letter-spacing: -1px; }
    .role { font-size: 1.1rem; margin-bottom: 1.5rem; font-weight: 500; }
    .bio { font-size: 1rem; margin-bottom: 2.5rem; }
    
    .hero-links {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }
    .hero-links a { justify-content: center; padding: 0.8rem; font-size: 0.9rem; border-radius: 16px; }
    .hero-links a:last-child { grid-column: span 2; }

    /* 📱 PROJECT CAROUSEL (Horizontal Swipe) */
    .project-filters {
        flex-wrap: nowrap; overflow-x: auto;
        -webkit-overflow-scrolling: touch; scrollbar-width: none;
        padding: 0.5rem 0; margin-bottom: 1.5rem; gap: 0.5rem;
    }
    .project-filters::-webkit-scrollbar { display: none; }
    .filter-btn { white-space: nowrap; font-size: 0.85rem; padding: 0.6rem 1.2rem; flex-shrink: 0; }
    
    .project-grid {
        display: flex; flex-direction: row;
        overflow-x: auto; scroll-snap-type: x mandatory;
        padding-bottom: 2rem; gap: 1rem;
        margin: 0 -1.2rem; padding-left: 1.2rem; padding-right: 1.2rem;
        scrollbar-width: none;
    }
    .project-grid::-webkit-scrollbar { display: none; }
    .project-card {
        flex: 0 0 85%; scroll-snap-align: center;
        padding: 1.8rem; border-radius: 24px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    }
    .project-card h3 { font-size: 1.4rem; }

    /* 📱 BOTTOM SHEET DRAWER (iOS Style) */
    .achievements-drawer {
        width: 100%; height: 85vh;
        top: auto; bottom: 0; right: 0;
        transform: translateY(100%);
        border-radius: 30px 30px 0 0;
        padding: 2rem 1.5rem 6rem;
    }
    .achievements-drawer.open { transform: translateY(0); }
    .drawer-header { margin-bottom: 1.5rem; }
    .drawer-nav-card { padding: 1rem; border-radius: 20px; }
    .nav-icon { width: 45px; height: 45px; font-size: 1.5rem; margin-right: 1rem; }

    /* 📱 BOTTOM SHEET MODAL (iOS Style) */
    .modal-overlay { align-items: flex-end; }
    .modal-container {
        width: 100%; max-height: 85vh;
        padding: 2.5rem 1.5rem 5rem;
        border-radius: 30px 30px 0 0;
        transform: translateY(100%) scale(1);
        position: relative; margin: 0;
    }
    .modal-overlay.active .modal-container { transform: translateY(0) scale(1); }
    .modal-close { top: 1rem; right: 1rem; width: 36px; height: 36px; background: #fff; color: #000; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

    /* 📱 SKILLS & TIMELINE */
    .skills-grid { gap: 1rem; }
    .skill-group { padding: 1.5rem; border-radius: 24px; }
    .timeline { padding: 2rem 1.2rem; border-radius: 24px; }
    .timeline-item { padding-left: 1.5rem; margin-bottom: 2.5rem; }
    .timeline-item::before { left: -7px; }

    /* Footer */
    .footer { padding-bottom: 6rem; margin-top: 3rem; }
}
