/* =========================================
   1. DESIGN TOKENS & EXCLUSIVE DARK THEME
   ========================================= */
:root {
    --bg-canvas: #05070a;
    --bg-surface: rgba(17, 22, 33, 0.72);
    --bg-surface-hover: rgba(24, 31, 46, 0.9);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(168, 85, 247, 0.4);
    
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --accent: #a855f7;
    --accent-glow: rgba(168, 85, 247, 0.3);
    
    --nav-height: 72px;
    --radius-lg: 20px;
    --radius-md: 12px;
    --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================
   PERSISTENT PURPLE AMBIENT BACKGROUND GLOW
   ========================================= */
.ambient-glow-bg {
    position: fixed;
    bottom: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 120vw;
    height: 500px;
    background: radial-gradient(ellipse at bottom, rgba(147, 51, 234, 0.60) 0%, rgba(168, 85, 247, .08) 45%, transparent 75%);
    z-index: -1;
    pointer-events: none;
    filter: blur(60px);
}

/* =========================================
   2. TRANSPARENT NAVIGATION BAR
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    background: transparent;
    transition: background-color 0.35s ease, backdrop-filter 0.35s ease, border-color 0.35s ease;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: var(--bg-surface);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-subtle);
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.01em;
    padding: 6px 12px;
    border-radius: 999px;
}

.nav-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-highlight);
    background-color: #111827;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
    padding: 8px 14px;
    border-radius: 999px;
    display: inline-block;
}

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

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
}

.menu-toggle span {
    width: 22px;
    height: 1.5px;
    background: var(--text-primary);
    transition: 0.25s ease;
}

/* =========================================
   3. HERO SECTION & SOCIAL ICONS UNDER PROFILE
   ========================================= */
.section {
    padding: 90px 0;
}

.hero {
    height: 100vh;
    min-height: 640px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding-top: var(--nav-height);
    padding-bottom: 60px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 56px;
    align-items: center;
}

.hero-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.profile-frame {
    width: 280px;
    height: 280px;
    border-radius: 28px;
    padding: 6px;
    background: linear-gradient(145deg, rgba(168, 85, 247, 0.3), rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-subtle);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.profile-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 22px;
    display: block;
    background-color: #0f172a;
}

/* Social Icons Under Profile */
.profile-socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.social-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.social-icon-badge:hover {
    transform: translateY(-3px);
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 8px 20px var(--accent-glow);
}

.eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin-bottom: 14px;
}

.hero-content h1 {
    font-size: clamp(2.2rem, 4vw, 3.3rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.executive-summary {
    font-size: 1.08rem;
    color: var(--text-secondary);
    max-width: 620px;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 24px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.25s var(--transition-smooth), background-color 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-canvas);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 10px 25px -5px var(--accent-glow);
}

.btn-secondary {
    background-color: rgba(168, 85, 247, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background-color: rgba(168, 85, 247, 0.15);
    border-color: var(--border-highlight);
}

/* Scroll Down Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
    z-index: 10;
    animation: fadeInOut 2.5s infinite ease-in-out;
    pointer-events: none;
}

.scroll-mouse {
    width: 20px;
    height: 32px;
    border: 1.5px solid rgba(168, 85, 247, 0.5);
    border-radius: 999px;
    display: flex;
    justify-content: center;
    padding-top: 5px;
    background: var(--bg-surface);
    box-shadow: 0 0 15px var(--accent-glow);
}

.scroll-wheel {
    width: 3px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 999px;
    animation: scrollAnim 1.8s infinite cubic-bezier(0.15, 0.41, 0.69, 0.94);
}

@keyframes scrollAnim {
    0% { transform: translateY(0); opacity: 1; }
    70% { transform: translateY(10px); opacity: 0; }
    100% { transform: translateY(0); opacity: 0; }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}

/* =========================================
   4. SHARED HEADERS & GLASS CARDS
   ========================================= */
.section-header {
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.3rem);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.glass-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s var(--transition-smooth), border-color 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-highlight);
    background: var(--bg-surface-hover);
}

/* =========================================
   5. EDUCATION & INTERNSHIPS TIMELINE
   ========================================= */
.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    padding: 28px 32px;
}

.timeline-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-meta .date {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;;
}

.badge {
    align-self: flex-start;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(168, 85, 247, 0.25);
    color: #f3e8ff;
    border: 1px solid rgba(192, 132, 252, 0.5);
}

.accent-badge {
    background: var(--accent-glow);
    color: var(--accent);
}

.timeline-body h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-body .subtitle {
    font-size: 0.92rem;
    font-weight: 600;
    color: #c084fc;
    margin-bottom: 12px;
}

.timeline-body p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.clean-list {
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* =========================================
   6. PROJECTS & CERTS GRID
   ========================================= */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

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

.media-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: var(--bg-canvas);
    border-bottom: 1px solid var(--border-subtle);
    overflow: hidden;
}

.media-container img,
.media-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--transition-smooth);
}

.project-card:hover .media-container img,
.project-card:hover .media-container video {
    transform: scale(1.04);
}

.card-content {
    padding: 26px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.tag-row span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--accent-glow);
    padding: 3px 10px;
    border-radius: 6px;
}

.card-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.card-content p {
    color: var(--text-secondary);
    font-size: 0.93rem;
    margin-bottom: 22px;
    flex-grow: 1;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 12px;
    margin-left: -12px;
    border-radius: 8px;
    align-self: flex-start;
}

.card-link:hover {
    text-decoration: underline;
}

/* =========================================
   7. BLOG CARDS
   ========================================= */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.blog-card {
    padding: 28px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.blog-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--accent);
}

.platform {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.blog-card h3 {
    font-size: 1.15rem;
    line-height: 1.35;
}

.blog-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

/* =========================================
   8. FOOTER & SCROLL REVEAL ANIMATIONS
   ========================================= */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 40px 0;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 6px 12px;
    border-radius: 8px;
}

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

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s var(--transition-smooth), transform 0.7s var(--transition-smooth);
}

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

/* =========================================
   9. NATURAL BLOOMING PURPLE SLIME CURSOR
   ========================================= */
@media (pointer: fine) {
    body, a, button, video {
        cursor: none !important;
    }

    .slime-cursor {
        position: fixed;
        top: 0;
        left: 0;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        pointer-events: none;
        z-index: 2147483647;
        
        background: radial-gradient(circle at 35% 35%, rgba(216, 180, 254, 0.95), rgba(168, 85, 247, 0.75));
        box-shadow: 0 0 25px 8px rgba(168, 85, 247, 0.55),
                    inset 0 0 10px rgba(255, 255, 255, 0.9);
        mix-blend-mode: screen;
        
        transform-origin: center center;
        will-change: transform, width, height, border-radius;
        transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                    height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                    border-radius 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                    background 0.3s ease,
                    box-shadow 0.3s ease;
    }

    .slime-cursor.morphed {
        background: radial-gradient(circle, rgba(168, 85, 247, 0.85), rgba(147, 51, 234, 0.65));
        box-shadow: 0 0 35px 12px rgba(168, 85, 247, 0.65),
                    inset 0 0 14px rgba(255, 255, 255, 0.85);
    }

    .slime-cursor.clicking {
        filter: brightness(1.3);
        box-shadow: 0 0 45px 16px rgba(168, 85, 247, 0.8);
    }
}

@media (pointer: coarse) {
    .slime-cursor {
        display: none !important;
    }
}

/* =========================================
   10. RESPONSIVE BREAKPOINTS & MOBILE FIXES
   ========================================= */

@media (max-width: 960px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 36px;
    }

    .hero-media {
        align-items: center;
    }

    .profile-frame {
        margin: 0 auto;
        width: 220px;
        height: 220px;
    }

    .executive-summary {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 20px;
    }
}

@media (max-width: 680px) {
    .navbar {
        padding: 0 16px;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: var(--bg-surface);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border-subtle);
        transform: translateY(-130%);
        transition: transform 0.35s var(--transition-smooth);
        box-shadow: 0 20px 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links.open {
        transform: translateY(0);
    }

    .menu-toggle {
        display: flex;
    }

    /* Force cards to single column on mobile */
    .cards-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 60px 0;
    }

    .hero {
        height: auto;
        min-height: 100vh;
        padding-top: calc(var(--nav-height) + 20px);
        padding-bottom: 80px;
    }
}