:root {
    /* Color Palette — Deep Navy Dark Theme */
    --bg-main: #0d0f14;
    --bg-surface: #13161e;
    --bg-glass: rgba(22, 25, 35, 0.65);
    --bg-glass-hover: rgba(32, 36, 50, 0.85);

    --text-primary: #f0f2f8;
    --text-secondary: #9499b0;
    --text-tertiary: #616680;

    --accent-blue: #00d4ff;
    --accent-violet: #7c4dff;
    --accent-pink: #ff2a85;
    --accent-gradient: linear-gradient(135deg, var(--accent-blue), var(--accent-violet));

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Layout */
    --max-width: 1200px;
    --section-padding: 8rem 2rem;

    /* Effects */
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --border-glass: 1px solid rgba(255, 255, 255, 0.07);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
}

/* =============================================
   Light Mode — Variable Overrides
   ============================================= */
[data-theme="light"] {
    /* Core backgrounds */
    --bg-main: #f5f6fa;
    --bg-surface: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.75);
    --bg-glass-hover: rgba(240, 242, 248, 0.9);

    /* Text */
    --text-primary: #1a1c24;
    --text-secondary: #5a5f72;
    --text-tertiary: #8a8fa5;

    /* Effects */
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.06);
    --border-glass: 1px solid rgba(0, 0, 0, 0.08);
}

/* =============================================
   Light Mode — Component Overrides
   ============================================= */

/* Noise overlay — hide in light mode */
[data-theme="light"] .noise-overlay {
    display: none;
}

/* Cursor glow — stronger ring for light mode */
[data-theme="light"] .cursor-glow {
    mix-blend-mode: normal;
    background: transparent;
    border: 2px solid rgba(124, 77, 255, 0.25);
    box-shadow: 0 0 20px rgba(124, 77, 255, 0.2);
    opacity: 0.8;
}

/* Cursor trail (sparkles) — visible in light mode */
[data-theme="light"] .cursor-trail {
    mix-blend-mode: multiply;
    background: rgba(124, 77, 255, 0.35);
    box-shadow: 0 0 12px rgba(124, 77, 255, 0.3);
}

/* Buttons */
[data-theme="light"] .btn-outline {
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .btn-outline:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .btn-primary:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Glass cards */
[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .glass-card:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Navbar */
[data-theme="light"] .navbar.scrolled {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Stats strip */
[data-theme="light"] .stats-strip {
    background: rgba(0, 0, 0, 0.015);
}

[data-theme="light"] .stat-divider {
    background: rgba(0, 0, 0, 0.08);
}

/* Education card */
[data-theme="light"] .education-card {
    background: linear-gradient(145deg, rgba(240, 242, 248, 0.9) 0%, rgba(230, 233, 240, 0.95) 100%);
}

/* Product showcase */
[data-theme="light"] .product-showcase {
    background: radial-gradient(circle at top right, rgba(0, 240, 255, 0.04), transparent 50%),
        rgba(245, 246, 250, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Product badge */
[data-theme="light"] .product-badge {
    background: rgba(0, 212, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.2);
}

/* Skill cards */
[data-theme="light"] .skill-card {
    background: linear-gradient(to bottom right, rgba(245, 246, 250, 0.9), rgba(235, 237, 245, 0.95));
    border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .skill-card:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

/* Skill pill badges */
[data-theme="light"] .skill-pill {
    background: linear-gradient(90deg, rgba(124, 77, 255, 0.08) 0%, rgba(0, 212, 255, 0.08) 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .skill-pill:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* Project cards */
[data-theme="light"] .project-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .project-card:hover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .project-image {
    background: #eef0f5;
}

[data-theme="light"] .image-placeholder {
    background: linear-gradient(45deg, rgba(235, 237, 245, 1) 0%, rgba(225, 228, 238, 1) 100%);
}

[data-theme="light"] .image-placeholder::after {
    background: radial-gradient(circle, rgba(124, 77, 255, 0.15) 0%, transparent 70%);
}

/* Project link badge */
[data-theme="light"] .project-link-badge {
    background: rgba(124, 77, 255, 0.08);
    border-color: rgba(124, 77, 255, 0.2);
}

/* Timeline */
[data-theme="light"] .timeline-line {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .timeline-dot {
    background: rgba(124, 77, 255, 0.15);
    border-color: rgba(124, 77, 255, 0.3);
}

[data-theme="light"] .timeline-card {
    border-left-color: rgba(124, 77, 255, 0.15);
}

[data-theme="light"] .timeline-card:hover {
    border-left-color: rgba(124, 77, 255, 0.5);
}

[data-theme="light"] .timeline-card-active {
    border-left-color: rgba(124, 77, 255, 0.5) !important;
    background: rgba(124, 77, 255, 0.03) !important;
}

/* Currently building cards */
[data-theme="light"] .currently-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .currently-card:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

/* Footer */
[data-theme="light"] .footer {
    background: #eef0f5;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Tech marquee */
[data-theme="light"] .tech-marquee-wrapper {
    background: rgba(0, 0, 0, 0.015);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .tech-marquee-wrapper::before {
    background: linear-gradient(to right, var(--bg-main), transparent);
}

[data-theme="light"] .tech-marquee-wrapper::after {
    background: linear-gradient(to left, var(--bg-main), transparent);
}

/* Contact buttons */
[data-theme="light"] .contact-btn {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .contact-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.2);
}

/* Floating consult button modal */
[data-theme="light"] .fcb-backdrop {
    background: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .fcb-connect-box {
    background: rgba(245, 246, 250, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .fcb-social-icon {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
}

[data-theme="light"] .fcb-social-link:hover .fcb-social-icon {
    background: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .fcb-connect-text h2 {
    color: var(--text-primary);
}

[data-theme="light"] .fcb-close-btn {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

[data-theme="light"] .fcb-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Scroll progress bar — slightly more opaque for visibility */
[data-theme="light"] #scroll-progress {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Open to work badge */
[data-theme="light"] .open-to-work-badge {
    background: rgba(0, 160, 60, 0.1);
    border-color: rgba(0, 160, 60, 0.3);
    color: #008a3a;
}

[data-theme="light"] .otw-dot {
    background: #00a848;
    box-shadow: 0 0 8px #00a848;
}

/* Intro overlay */
[data-theme="light"] .intro-overlay {
    background-color: var(--bg-main);
}

/* Empty slot */
[data-theme="light"] .empty-slot {
    border-color: rgba(0, 0, 0, 0.08);
}

/* Gradient spheres — much more prominent in light mode */
[data-theme="light"] .gradient-sphere {
    opacity: 0.25;
    filter: blur(140px);
}

/* Mobile overrides */
@media (max-width: 768px) {
    [data-theme="light"] .navbar.scrolled {
        background: rgba(245, 246, 250, 0.97);
    }

    [data-theme="light"] .glass-card {
        background: rgba(255, 255, 255, 0.95);
    }

    [data-theme="light"] .nav-links {
        background: rgba(245, 246, 250, 0.98);
    }

    [data-theme="light"] .product-showcase {
        background: rgba(245, 246, 250, 0.95);
    }
}

/* Reset & Base HTML */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-size: 16px;
    width: 100%;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    width: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Noise overlay for cinematic texture */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    /* Prevent Safari from treating this as a massive compositing layer that needs constant repaints */
    transform: translateZ(0);
}

@media (max-width: 768px) {

    /* SVG filters on full screen elements lock up iOS Safari. Simplify or disable on mobile. */
    .noise-overlay {
        display: none;
    }
}

/* Custom Glow */
.cursor-glow {
    position: fixed;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(140, 82, 255, 0.22) 0%, rgba(0, 240, 255, 0) 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
    mix-blend-mode: screen;
    will-change: transform;
}

@media (max-width: 768px) {
    .cursor-glow {
        display: none;
        /* Cursor glow is not needed on touch devices, and it costs GPU */
    }
}

/* Typography Base */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

p {
    color: var(--text-secondary);
    font-weight: 400;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

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

.no-scroll {
    overflow: hidden !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* Hire Me — gradient CTA button */
.btn-hire {
    background: linear-gradient(135deg, var(--accent-violet), var(--accent-blue));
    color: #fff;
    border: none;
    font-weight: 700;
    box-shadow: 0 0 24px rgba(140, 82, 255, 0.35);
}

.btn-hire:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(140, 82, 255, 0.55);
    filter: brightness(1.1);
}

/* =============================================
   Open to Work Badge
   ============================================= */
.open-to-work-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1.1rem;
    background: rgba(0, 255, 102, 0.08);
    border: 1px solid rgba(0, 255, 102, 0.25);
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: #00ff66;
    letter-spacing: 0.03em;
    margin-bottom: 1.2rem;
}

.otw-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff66;
    box-shadow: 0 0 8px #00ff66;
    animation: pulse 2s infinite;
}

/* =============================================
   Stats Strip
   ============================================= */
.stats-strip {
    padding: 3rem 2rem;
    border-top: var(--border-glass);
    border-bottom: var(--border-glass);
    background: rgba(255, 255, 255, 0.02);
}

.stats-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    max-width: var(--max-width);
    margin: 0 auto;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1rem 4rem;
    flex: 1;
    min-width: 160px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.04em;
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-family: var(--font-heading);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
}

.stat-divider {
    width: 1px;
    height: 52px;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .stats-strip {
        padding: 2.5rem 0;
    }

    .stats-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem 0.5rem;
        justify-items: center;
    }

    .stat-item {
        padding: 0.75rem 1rem;
        min-width: unset;
        width: 100%;
    }

    .stat-number {
        font-size: clamp(2rem, 10vw, 2.8rem);
    }

    .stat-divider {
        display: none;
    }
}

/* =============================================
   Timeline / Journey Section
   ============================================= */
.timeline {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-violet), var(--accent-blue), transparent);
}

.timeline-item {
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 2.5rem;
}

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

.timeline-dot {
    position: absolute;
    left: -2px;
    top: 1.1rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: 3px solid var(--bg-main);
    box-shadow: 0 0 12px rgba(140, 82, 255, 0.6);
    z-index: 1;
}

.timeline-content {
    padding: 1.5rem 2rem;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
    border-left: 2px solid rgba(140, 82, 255, 0.2);
}

.timeline-content:hover {
    border-left-color: rgba(140, 82, 255, 0.6);
    transform: translateX(6px);
}

.timeline-date {
    display: inline-block;
    font-size: 0.78rem;
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-violet);
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
}

.timeline-content p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-tags .tag {
    background: rgba(140, 82, 255, 0.1);
    border: 1px solid rgba(140, 82, 255, 0.2);
    color: var(--accent-violet);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-family: var(--font-heading);
    font-weight: 600;
}

@media (max-width: 768px) {
    .timeline {
        padding-left: 1rem;
    }

    .timeline-item {
        padding-left: 2rem;
    }

    .timeline-content {
        padding: 1.2rem 1.5rem;
    }

    .timeline-content:hover {
        transform: none;
    }
}

/* =============================================
   Timeline per-item reveal animation (Framer-style)
   Each .timeline-item.timeline-reveal starts hidden and
   slides in from the left as it enters the viewport.
   JS adds .active class via IntersectionObserver.
   ============================================= */
.timeline-title-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-title-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item.timeline-reveal {
    opacity: 0;
    transform: translateX(-44px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item.timeline-reveal.active {
    opacity: 1;
    transform: translateX(0);
}

/* Active (latest) timeline dot — pulses */
.timeline-dot-active {
    background: var(--accent-gradient) !important;
    box-shadow: 0 0 0 0 rgba(140, 82, 255, 0.7);
    animation: dotPulse 2.5s infinite;
}

@keyframes dotPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(140, 82, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(140, 82, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(140, 82, 255, 0);
    }
}

/* Active card — slightly highlighted border */
.timeline-card-active {
    border-left: 2px solid rgba(140, 82, 255, 0.55) !important;
    background: rgba(140, 82, 255, 0.04) !important;
}

@media (max-width: 768px) {
    .timeline-item.timeline-reveal {
        transform: translateY(20px);
    }

    .timeline-item.timeline-reveal.active {
        transform: translateY(0);
    }
}

/* Navbar Custom Visibility */
.mobile-nav {
    display: none !important;
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none !important;
    }

    .mobile-nav {
        display: flex !important;
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 100;
    transition: opacity 1s ease-out, background 0.3s ease, padding 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.navbar.scrolled {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: var(--border-glass);
    padding: 1rem 0;
}

@media (max-width: 768px) {
    .navbar.scrolled {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(13, 15, 20, 0.97);
    }
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--text-primary);
}

.nav-brand span {
    color: var(--accent-blue);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent-gradient);
    transition: var(--transition-smooth);
}

.nav-link:hover::after {
    width: 100%;
}

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

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
}

.lang-switcher a {
    color: var(--text-tertiary);
}

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

.lang-switcher .divider {
    color: var(--text-tertiary);
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    padding: 0;
    flex-shrink: 0;
}

.theme-toggle:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .theme-toggle {
    border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .theme-toggle:hover {
    border-color: rgba(0, 0, 0, 0.25);
    background: rgba(0, 0, 0, 0.04);
}

/* =============================================
   Floating Capsule Navbar (Mobile)
   ============================================= */
.navbar-floating {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    transition: opacity 1s ease-out, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
    opacity: 0;
    pointer-events: none;
    /* Default spacing to enable floating rounded effect */
    padding: 0.5rem;
    border-radius: 100px;
    background: rgba(20, 20, 25, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="light"] .navbar-floating {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
}

.nav-container-floating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link-floating {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 100px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.nav-link-floating:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .nav-link-floating:hover {
    background: rgba(0, 0, 0, 0.04);
}

.nav-link-floating.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .nav-link-floating.active {
    background: rgba(0, 0, 0, 0.06);
}

/* The Top Glow Indicator */
.nav-link-floating .glow-indicator {
    position: absolute;
    top: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2rem;
    height: 2px;
    background: #fff;
    border-radius: 100px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .nav-link-floating .glow-indicator {
    background: var(--accent-blue);
    box-shadow: 0 0 10px var(--accent-blue);
}

.nav-link-floating.active .glow-indicator {
    opacity: 1;
    top: 0;
}

.nav-divider {
    width: 1px;
    height: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 0.5rem;
}

[data-theme="light"] .nav-divider {
    background: rgba(0, 0, 0, 0.1);
}

.theme-toggle-floating {
    padding: 0.6rem;
}

.nav-text {
    white-space: nowrap;
}

/* Dark mode: show sun, hide moon */
.theme-icon-sun {
    display: block;
}

.theme-icon-moon {
    display: none;
}

/* Light mode: show moon, hide sun */
[data-theme="light"] .theme-icon-sun {
    display: none;
}

[data-theme="light"] .theme-icon-moon {
    display: block;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .navbar-floating {
        position: absolute;
        top: 1.5rem;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 400px;
        height: 54px;
        /* fixed height for animation */
        padding: 0.5rem;
        box-sizing: border-box;
        overflow: hidden;
        justify-content: flex-start;
        align-items: center;
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
    }

    /* Toggle icon inside floating bar */
    .mobile-nav-toggle {
        display: none;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        color: var(--text-primary);
        align-items: center;
        justify-content: center;
        cursor: pointer;
        flex-shrink: 0;
    }

    .nav-container-floating {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 0;
        transition: opacity 0.3s ease, transform 0.3s ease;
        opacity: 1;
        transform: translateX(0);
        flex-shrink: 1;
    }

    /* Scrolled (Collapsed) State */
    .navbar-floating.navbar-scrolled {
        position: fixed;
        top: 1.5rem;
        left: 1.5rem;
        transform: none;
        width: 54px;
        height: 54px;
        border-radius: 50%;
        padding: 0;
        justify-content: center;
        background: rgba(20, 20, 25, 0.9);
        z-index: 1000;
    }

    [data-theme="light"] .navbar-floating.navbar-scrolled {
        background: rgba(255, 255, 255, 0.9);
    }

    /* Show toggle when scrolled */
    .navbar-floating.navbar-scrolled:not(.navbar-expanded) .mobile-nav-toggle {
        display: flex;
    }

    /* Hide links when scrolled but not expanded */
    .navbar-floating.navbar-scrolled:not(.navbar-expanded) .nav-container-floating {
        opacity: 0;
        pointer-events: none;
        position: absolute;
        transform: translateX(20px);
    }

    /* Scrolled + Expanded State */
    .navbar-floating.navbar-scrolled.navbar-expanded {
        width: calc(100vw - 3rem);
        max-width: 400px;
        border-radius: 100px;
        padding: 0.5rem;
        justify-content: flex-start;
    }

    /* Keep toggle shown but switch icon */
    .navbar-floating.navbar-scrolled.navbar-expanded .mobile-nav-toggle {
        display: flex;
        margin-right: 0.25rem;
    }

    .navbar-floating.navbar-scrolled.navbar-expanded .mobile-nav-toggle .toggle-icon-menu {
        display: none;
    }

    .navbar-floating.navbar-scrolled.navbar-expanded .mobile-nav-toggle .toggle-icon-close {
        display: block !important;
    }

    /* Show links when expanded */
    .navbar-floating.navbar-scrolled.navbar-expanded .nav-container-floating {
        position: relative;
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
    }

    /* Hide text on mobile to save space, show only icons */
    .nav-text {
        display: none;
    }

    .nav-link-floating {
        padding: 0.6rem;
        flex: 1;
        justify-content: center;
    }
}


/* Footer Placeholder Styles */
footer {
    background: var(--bg-surface);
    border-top: var(--border-glass);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    max-width: 300px;
}

.footer-links-wrapper {
    display: flex;
    gap: 4rem;
}

.footer-col h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

.footer-col a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: var(--border-glass);
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #00ff66;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 10px #00ff66;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 255, 102, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(0, 255, 102, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 255, 102, 0);
    }
}

/* Sections General */
.section {
    padding: var(--section-padding);
    position: relative;
    z-index: 10;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    display: block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-glass);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    background: var(--bg-glass-hover);
    border-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {

    /* backdrop-filter destroys iOS Safari performance when scrolling past multiple cards */
    .glass-card {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(15, 15, 17, 0.85);
        /* Slightly more opaque to make up for lack of blur */
    }
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
    align-items: stretch;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.education-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    background: linear-gradient(145deg, rgba(20, 20, 25, 0.8) 0%, rgba(10, 10, 15, 0.9) 100%);
}

.edu-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.education-card h3 {
    color: var(--accent-violet);
    margin-bottom: 1.5rem;
}

.edu-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.edu-field,
.edu-loc {
    display: block;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

/* Product Section */
.product-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    background: radial-gradient(circle at top right, rgba(0, 240, 255, 0.05), transparent 50%),
        rgba(15, 15, 17, 0.6);
    border: var(--border-glass);
    border-radius: 32px;
    padding: 4rem;
    overflow: hidden;
    position: relative;
    transform-style: preserve-3d;
}

@media (max-width: 768px) {
    .product-showcase {
        transform-style: flat;
        background: rgba(15, 15, 17, 0.85);
        /* Solidify background explicitly */
    }
}

.product-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.product-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.product-desc {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.product-features {
    margin-bottom: 2.5rem;
}

.product-features li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-primary);
}

.product-features .check {
    color: var(--accent-blue);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(0, 240, 255, 0.1);
    border-radius: 50%;
}

.product-visual {
    position: relative;
    height: 100%;
    min-height: 300px;
    perspective: 1000px;
}

.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(140, 82, 255, 0.3) 0%, transparent 70%);
    filter: blur(40px);
    z-index: 0;
}

.dashboard-mockup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateY(-15deg) rotateX(5deg);
    width: 100%;
    height: 250px;
    background: #0a0a0c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: -20px 20px 40px rgba(0, 0, 0, 0.5);
    z-index: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.5s ease;
}

.product-showcase:hover .dashboard-mockup {
    transform: translate(-50%, -50%) rotateY(0deg) rotateX(0deg) scale(1.05);
}

.mockup-header {
    height: 30px;
    background: #141418;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 6px;
}

.mockup-header span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #333;
}

.mockup-header span:nth-child(1) {
    background: #ff5f56;
}

.mockup-header span:nth-child(2) {
    background: #ffbd2e;
}

.mockup-header span:nth-child(3) {
    background: #27c93f;
}

.mockup-body {
    display: flex;
    flex: 1;
}

.mockup-sidebar {
    width: 60px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    background: #0d0d12;
}

.mockup-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mockup-chart {
    height: 80px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(140, 82, 255, 0.2) 0%, rgba(0, 240, 255, 0.2) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mockup-lines {
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    width: 100%;
}

.mockup-lines.w-75 {
    width: 75%;
}

.mockup-lines.w-50 {
    width: 50%;
}

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

.skill-card {
    background: linear-gradient(to bottom right, rgba(20, 20, 25, 0.8), rgba(10, 10, 15, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    transform-style: preserve-3d;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255, 255, 255, 0.06), transparent 40%);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.skill-icon {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: inline-flex;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    transform: translateZ(30px);
    /* 3D effect inner element */
}

.skill-card ul {
    transform: translateZ(20px);
}

.skill-card li {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-card li::before {
    content: '→';
    color: var(--accent-blue);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    transform: translateZ(20px);
}

.tech-tags .tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.tech-tags .tag:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Responsiveness for these sections */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .product-showcase {
        grid-template-columns: 1fr;
        padding: 2rem;
    }

    .product-visual {
        min-height: 250px;
        margin-top: 2rem;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 1rem;
    }

    .container {
        padding: 0 1rem;
        width: 100%;
        max-width: 100vw;
    }

    .projects-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2rem;
        width: 100%;
        margin: 0 auto;
    }

    .project-card {
        width: 100%;
        margin: 0;
    }

    .project-info {
        padding: 1.5rem;
    }
}

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

.project-card {
    background: var(--bg-glass);
    border: var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.2);
}

.project-image {
    height: 200px;
    background: #0a0a0c;
    position: relative;
    overflow: hidden;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(20, 20, 25, 1) 0%, rgba(30, 30, 40, 1) 100%);
    position: relative;
}

.image-placeholder::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(140, 82, 255, 0.5) 0%, transparent 70%);
    animation: pulse 2s infinite;
}

.project-info {
    padding: 2rem;
    flex: 1;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.project-info p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.tech-stack {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Project link — now a small top-right badge, won't overlap text */
.project-link-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.35rem 0.85rem;
    background: rgba(124, 77, 255, 0.15);
    border: 1px solid rgba(124, 77, 255, 0.35);
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-violet);
    letter-spacing: 0.03em;
    z-index: 5;
    transition: background 0.3s, border-color 0.3s, transform 0.3s;
}

.project-link-badge:hover {
    background: rgba(124, 77, 255, 0.3);
    border-color: rgba(124, 77, 255, 0.7);
    transform: translateY(-2px);
}

/* Project card needs position:relative for badge to anchor */
.project-card {
    position: relative;
}

/* =============================================
   Button Shimmer Effect
   A glare sweeps across all 3 hero CTA buttons
   on a staggered loop.
   ============================================= */
@keyframes shimmerSweep {
    0% {
        transform: translateX(-120%) skewX(-15deg);
    }

    100% {
        transform: translateX(300%) skewX(-15deg);
    }
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.18) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: translateX(-120%) skewX(-15deg);
    animation: shimmerSweep 3.5s infinite;
    pointer-events: none;
    border-radius: inherit;
}

.btn-primary::after {
    animation-delay: 0s;
}

.btn-outline::after {
    animation-delay: 1.2s;
}

.btn-hire::after {
    animation-delay: 2.4s;
}

/* =============================================
   Contact Buttons — WhatsApp & Phone variants
   ============================================= */
.contact-btn-whatsapp {
    border-color: rgba(37, 211, 102, 0.35) !important;
    color: #25d366 !important;
}

.contact-btn-whatsapp:hover {
    background: rgba(37, 211, 102, 0.1) !important;
    border-color: rgba(37, 211, 102, 0.7) !important;
}

.contact-btn-phone {
    border-color: rgba(0, 212, 255, 0.35) !important;
    color: var(--accent-blue) !important;
}

.contact-btn-phone:hover {
    background: rgba(0, 212, 255, 0.08) !important;
    border-color: rgba(0, 212, 255, 0.6) !important;
}

.empty-slot {
    border: 1px dashed rgba(255, 255, 255, 0.1);
    background: transparent;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 2rem;
    min-height: 350px;
}

.empty-slot:hover {
    transform: none;
    box-shadow: none;
}

.empty-slot h3 {
    color: var(--text-tertiary);
}

/* Contact Section */
.contact-box {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    background: radial-gradient(circle at center, rgba(140, 82, 255, 0.05) 0%, var(--bg-glass) 100%);
}

.contact-intro {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .contact-links {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .contact-btn {
        width: 80%;
        justify-content: center;
    }
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: 600;
    transition: var(--transition-smooth);
}

.contact-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.contact-btn .icon {
    font-size: 1.2rem;
}

/* Fix the project link hover (no circular background, just a sleek transition) */
.project-card:hover .project-link {
    background: transparent !important;
    color: var(--accent-blue) !important;
    transform: translateX(10px) !important;
}

/* Ensure project link has transparent background by default now */
.project-link {
    background: transparent !important;
    justify-content: flex-end;
    width: auto !important;
    border-radius: 0 !important;
    padding-right: 2rem;
}

@media (max-width: 768px) {
    .project-link {
        right: 1rem;
        bottom: 1.5rem;
        padding-right: 1rem;
    }
}

/* Fix Contact title alignment */
.contact-content .section-title {
    position: static;
    transform: none;
    left: auto;
    display: block;
    text-align: center;
}

.contact-content .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* =========================================
   Intro Typography Animation (Hero Level)
   ========================================= */
.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-main);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease-out, visibility 1s ease-out;
}

.intro-overlay.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.intro-content {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 5vw, 2.8rem);
    font-weight: 800;
    text-align: center;
    color: var(--text-primary);
    padding: 0 1.5rem;
    width: 100%;
    max-width: 900px;
    letter-spacing: -0.03em;
}

@media (max-width: 576px) {
    .intro-content {
        text-align: center;
        padding: 0 1rem;
    }
}

.intro-typewriter {
    display: inline-block;
}

.intro-cursor {
    display: inline-block;
    color: var(--accent-blue);
    font-weight: 300;
    animation: blinkCursor 0.8s infinite;
    margin-left: 2px;
}

@keyframes blinkCursor {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* =============================================
   Scroll Progress Bar (top of page)
   ============================================= */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #00d4ff, #7c4dff);
    z-index: 99999;
    transition: width 0.08s linear;
    pointer-events: none;
    border-radius: 0 2px 2px 0;
}

/* =============================================
   Infinite Tech Stack Marquee
   ============================================= */
.tech-marquee-wrapper {
    overflow: hidden;
    padding: 1.5rem 0;
    border-top: var(--border-glass);
    border-bottom: var(--border-glass);
    background: rgba(255, 255, 255, 0.015);
    position: relative;
}

.tech-marquee-wrapper::before,
.tech-marquee-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    height: 100%;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.tech-marquee-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-main), transparent);
}

.tech-marquee-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-main), transparent);
}

.tech-marquee-track {
    display: flex;
    width: max-content;
    animation: marqueeScroll 30s linear infinite;
}

.tech-marquee-track:hover {
    animation-play-state: paused;
}

.tech-marquee-inner {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.tech-tag {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0 1.5rem;
    letter-spacing: 0.03em;
    transition: color 0.3s;
    cursor: default;
}

.tech-tag:hover {
    color: var(--accent-violet);
}

.tech-sep {
    color: var(--text-tertiary);
    font-size: 1rem;
    line-height: 1;
}

/* =============================================
   Currently Building Section
   ============================================= */
.currently-section {
    padding: var(--section-padding);
}

.currently-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.currently-card {
    padding: 2rem;
    border-radius: var(--radius-lg);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.currently-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.currently-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.2rem;
}

.currently-label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-violet);
}

.currently-icon {
    font-size: 1rem;
    line-height: 1;
}

.currently-pulse {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #00e676;
    box-shadow: 0 0 8px #00e676;
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

.currently-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.currently-card p {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0;
}

@media (max-width: 900px) {
    .currently-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   Floating Consult Button Component
   ============================================= */

/* Floating Wrapper */
.fcb-wrapper {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 105;
}

@media (max-width: 768px) {
    .fcb-wrapper {
        bottom: 0.5rem;
        right: 0.5rem;
    }
}

/* Base button trigger */
.fcb-trigger {
    position: relative;
    cursor: pointer;
    width: 128px;
    height: 128px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.fcb-trigger:hover {
    transform: scale(1.05);
}

@media (min-width: 1024px) {
    .fcb-trigger {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 768px) {
    .fcb-trigger {
        width: 90px;
        height: 90px;
    }
}

/* Rotating text SVG container */
.fcb-rotating-text {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: rotateText 10s linear infinite;
}

/* Rotating Text path matching the React logic exactly */
.fcb-rotating-text svg {
    width: 100%;
    height: 100%;
}

.fcb-rotating-text text {
    font-size: 20.4px;
    fill: var(--text-secondary);
    /* or #4b5563 matching gray-600 */
    font-family: var(--font-heading);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@keyframes rotateText {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Center Image Container */
.fcb-image-container {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.fcb-image-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--bg-surface);
    border: 3px solid var(--accent-violet);
    box-shadow: 0 0 20px rgba(124, 77, 255, 0.5);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .fcb-image-wrapper {
        width: 56px;
        height: 56px;
    }
}

.fcb-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    transform: scale(1.3);
    transform-origin: center 15%;
}

.fcb-trigger:hover .fcb-image-wrapper {
    border-color: var(--accent-blue);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.6);
}

@media (min-width: 1024px) {
    .fcb-image-wrapper {
        width: 96px;
        height: 96px;
    }
}

/* Fallback gradient if image fails */
.fcb-image-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #f97316);
    /* red-500 to orange-500 equivalent */
}

/* =============================================
   Floating Consult Modal
   ============================================= */

/* Backdrop (hidden by default) */
.fcb-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 103;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fcb-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

/* Modal Window (hidden by default) */
.fcb-modal {
    position: fixed;
    bottom: 12rem;
    right: 2rem;
    z-index: 104;
    padding: 2rem;
    max-width: 32rem;
    width: calc(100vw - 4rem);

    display: flex;
    flex-direction: column;
    align-items: center;

    /* Animation initial state matching framer-motion: scale: 0.8, y: 20, opacity: 0 */
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8) translateY(20px);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

@media (min-width: 1024px) {
    .fcb-modal {
        padding: 0;
    }
}

.fcb-modal.is-open {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

/* Close Button */
.fcb-close-btn {
    position: absolute;
    top: -2rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.fcb-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Connect Text Styling */
.fcb-connect-text {
    text-align: center;
    margin-bottom: 2rem;
}

.fcb-connect-text h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 0.8rem;
    font-family: var(--font-heading);
}

.fcb-connect-text h2 .text-pink {
    color: var(--accent-pink);
}

.fcb-connect-text p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 auto;
    max-width: 90%;
    font-family: var(--font-body);
}

/* Connect Box Styling (The dark glowing box) */
.fcb-connect-box {
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;

    /* Neon purple glow */
    box-shadow: 0 0 60px rgba(124, 77, 255, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.fcb-social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.fcb-social-link:hover {
    transform: translateY(-5px);
}

.fcb-social-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.fcb-social-link:hover .fcb-social-icon {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.fcb-social-link span {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font-body);
    transition: color 0.3s ease;
}

.fcb-social-link:hover span {
    color: #ffffff;
}

@media (max-width: 480px) {
    .fcb-connect-box {
        padding: 2rem 1rem;
        gap: 1rem;
    }

    .fcb-social-icon {
        width: 50px;
        height: 50px;
    }

    .fcb-social-icon svg {
        width: 20px;
        height: 20px;
    }

    .fcb-connect-text h2 {
        font-size: 2rem;
    }
}

/* =============================================
   Mobile Bottom Navigation
   ============================================= */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: var(--border-glass);
    display: none;
    /* Hidden on desktop */
    justify-content: space-around;
    align-items: center;
    padding: 0.8rem 0.5rem calc(0.8rem + env(safe-area-inset-bottom));
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.85);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.mb-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.7rem;
    font-family: var(--font-heading);
    font-weight: 500;
    transition: color 0.3s ease, transform 0.2s ease;
    flex: 1;
}

.mb-nav-link svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), stroke 0.3s ease;
}

.mb-nav-link:hover,
.mb-nav-link.active {
    color: var(--accent-violet);
}

[data-theme="light"] .mb-nav-link:hover,
[data-theme="light"] .mb-nav-link.active {
    color: var(--accent-blue);
}

.mb-nav-link.active svg {
    transform: translateY(-2px) scale(1.1);
}

.mb-nav-link.active span {
    font-weight: 700;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }

    /* Hide the old hamburger button just in case */
    .mobile-menu-btn {
        display: none !important;
    }

    /* Adjust main body padding to prevent content from being hidden behind the nav */
    body {
        padding-bottom: calc(4rem + env(safe-area-inset-bottom));
    }

    /* Allow the floating consult button to sit lower naturally */
    .fcb-wrapper {
        bottom: 0.5rem;
        right: 0.5rem;
    }
}