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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #fff;
    overflow-x: hidden;
}

/* Scroll Snap removed */

/* Fixed Canvas Background */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.navbar.hidden {
    transform: translateY(-100%);
}

/* Navbar inverted styles removed - navbar stays white */

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 50px;
}

.nav-logo {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    color: #5f6368;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #1a1a1a;
}

.nav-btn-wrapper {
    position: relative;
    display: inline-block;
    border-radius: 50px;
    flex-shrink: 0;
}

.nav-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    z-index: 2;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: buttonPulse 20s ease-in-out infinite;
}


/* Language Switcher */
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.burger-menu span {
    width: 100%;
    height: 2px;
    background: #1a1a1a;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Burger menu inverted style removed - stays dark */

.burger-menu.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e0e0e0;
    padding: 0 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

/* Mobile menu inverted style removed - stays white */

.mobile-menu.active {
    max-height: 400px;
    padding: 20px 0;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 16px;
    margin-bottom: 16px;
}

/* Mobile menu links inverted style removed */

.mobile-menu-links a {
    padding: 12px 40px;
    color: #5f6368;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    transition: all 0.2s ease;
}

/* Mobile menu links inverted color removed */

.mobile-menu-links a:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
}

/* Mobile menu links inverted hover removed */

.mobile-menu-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    margin: 0 40px;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: buttonPulse 20s ease-in-out infinite;
}

/* Mobile menu button inverted style removed */

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

    .nav-btn {
        display: none;
    }

    .burger-menu {
        display: flex;
    }

    .mobile-menu {
        display: flex;
    }

    .nav-container {
        padding: 0 20px;
    }

    /* Project tabs responsive */
    .projects-tabs {
        gap: 8px;
        max-width: 95vw;
        justify-content: center;
    }

    .project-tab {
        padding: 12px;
        font-size: 13px;
        gap: 8px;
    }

    .project-tab span {
        display: none;
    }

    .project-tab svg {
        width: 20px;
        height: 20px;
    }

    .projects-buttons-container {
        gap: 16px;
        margin-top: 24px;
    }
}

/* Scrollable Content */
.scroll-content {
    position: relative;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 60px;
}

.content {
    position: relative;
    z-index: 10;
    text-align: center;
    pointer-events: auto;
}

.badge {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    font-size: 14px;
    color: #333;
    margin-bottom: 30px;
}

h1 {
    font-size: clamp(40px, 8vw, 72px);
    font-weight: 500;
    color: #000;
    line-height: 1.1;
    margin-bottom: 5px;
}

h2 {
    font-size: clamp(28px, 6vw, 50px);
    font-weight: 300;
    color: #666;
    line-height: 1.1;
    margin-bottom: 40px;
}

/* Animated Border Button - Google AI Mode Style */
.download-btn-wrapper {
    position: relative;
    display: inline-block;
    border-radius: 50px;
}

.download-btn {
    position: relative;
    display: inline-block;
    padding: 16px 50px;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    z-index: 2;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: buttonPulse 20s ease-in-out infinite;
}

/* AI-themed button hover effects */
/* Gradient border effect using pseudo-element */
.nav-btn::before,
.mobile-menu-btn::before,
.download-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50px;
    padding: 2px;
    background: linear-gradient(90deg, #4A9EFF, #6BB5FF, #4A9EFF);
    background-size: 200% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: borderFlow 2s linear infinite, shimmerReveal 20s ease-in-out infinite;
}

/* Shimmer overlay using ::after */
.nav-btn::after,
.mobile-menu-btn::after,
.download-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(74, 158, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

/* Hover states for all buttons */
.nav-btn:hover,
.mobile-menu-btn:hover,
.download-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.15),
        0 0 20px rgba(74, 158, 255, 0.3);
    animation-play-state: paused;
}

.nav-btn:hover::before,
.mobile-menu-btn:hover::before,
.download-btn:hover::before {
    opacity: 1;
    animation-play-state: paused;
}

.nav-btn:hover::after,
.mobile-menu-btn:hover::after,
.download-btn:hover::after {
    left: 100%;
}

/* Keyframe for gradient border animation */
@keyframes borderFlow {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 0%;
    }
}

/* Periodic pulse animation - plays every 20 seconds to draw attention */
@keyframes buttonPulse {
    0%, 95% {
        box-shadow:
            0 0 0 rgba(0, 0, 0, 0),
            0 0 0 rgba(74, 158, 255, 0);
        transform: scale(1);
    }
    96% {
        box-shadow:
            0 4px 8px rgba(0, 0, 0, 0.1),
            0 0 15px rgba(74, 158, 255, 0.4);
        transform: scale(1.02);
    }
    97% {
        box-shadow:
            0 6px 12px rgba(0, 0, 0, 0.12),
            0 0 25px rgba(74, 158, 255, 0.5);
        transform: scale(1.03);
    }
    98% {
        box-shadow:
            0 4px 8px rgba(0, 0, 0, 0.1),
            0 0 15px rgba(74, 158, 255, 0.4);
        transform: scale(1.02);
    }
    100% {
        box-shadow:
            0 0 0 rgba(0, 0, 0, 0),
            0 0 0 rgba(74, 158, 255, 0);
        transform: scale(1);
    }
}

/* Shimmer reveal animation for periodic attention */
@keyframes shimmerReveal {
    0%, 95% {
        opacity: 0;
    }
    96% {
        opacity: 1;
    }
    98% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Projects Section */
.projects-section {
    position: relative;
    /* Increase height to create a "break" (scroll distance) */
    height: 150vh;
    min-height: 150vh;
    background: transparent;
    overflow: visible;
}

/* Container to stick the content */
.projects-sticky-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 5;
}

.projects-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 600px;
    padding: 0 40px;
}

.project-label {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

/* Project label styling */
.project-label {
    background: rgba(74, 158, 255, 0.15);
    border: 1px solid rgba(74, 158, 255, 0.3);
    color: #4A9EFF;
}

@keyframes pulse-active {

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

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.projects-title {
    font-size: clamp(32px, 6vw, 56px);
    font-weight: 500;
    color: #1a1a1a !important;
    margin-bottom: 20px;
    line-height: 1.2;
    transition: opacity 0.2s ease;
    opacity: 1;
}

.projects-description {
    font-size: clamp(16px, 2vw, 18px);
    line-height: 1.6;
    color: #666 !important;
    margin-bottom: 30px;
    transition: opacity 0.2s ease;
    opacity: 1;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 16px 24px;
    border-radius: 12px;
    mask-image: radial-gradient(ellipse 100% 100% at center, black 70%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 100% 100% at center, black 70%, transparent 100%);
}

.projects-buttons-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    z-index: 10;
    width: 100%;
    max-width: 90vw;
    margin-top: 30px;
}

.projects-cta-wrapper {
    position: relative;
    display: inline-block;
    border-radius: 50px;
}

.projects-cta {
    position: relative;
    display: inline-block;
    padding: 14px 32px;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    z-index: 2;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* AI-themed hover effect for project details button */
.projects-cta::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50px;
    padding: 2px;
    background: linear-gradient(90deg, #4A9EFF, #6BB5FF, #4A9EFF);
    background-size: 200% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: borderFlow 2s linear infinite;
}

.projects-cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(74, 158, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

/* Hover states for project details button */
.projects-cta:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.15),
        0 0 20px rgba(74, 158, 255, 0.3);
}

.projects-cta:hover::before {
    opacity: 1;
}

.projects-cta:hover::after {
    left: 100%;
}

/* The animated border container for projects button */
.projects-cta-border {
    position: absolute;
    inset: -2px;
    border-radius: 50px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.projects-cta-border::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: #fff;
    border-radius: 48px;
    z-index: 2;
}

.projects-cta-glow {
    position: absolute;
    inset: -8px;
    border-radius: 58px;
    overflow: hidden;
    opacity: 0;
    filter: blur(10px);
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.projects-cta-gradient {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    transform: translate(-50%, -50%);
    background: conic-gradient(
        from 0deg,
        #4285f4 0deg,
        #9b72cb 60deg,
        #d96570 120deg,
        #ffc145 180deg,
        #4285f4 240deg,
        #9b72cb 300deg,
        #4285f4 360deg
    );
}


.projects-tabs-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.tabs-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}

.projects-tabs {
    display: flex;
    gap: 12px;
    justify-content: center;
    max-width: 90vw;
    flex-wrap: wrap;
}

.project-tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    flex: 0 0 auto;
}


.project-tab:hover {
    border-color: rgba(0, 0, 0, 0.2);
    color: #333;
}

.project-tab.active {
    background: rgba(0, 0, 0, 0.05);
    border-color: #1a1a1a;
    color: #1a1a1a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.project-tab[data-status="active"].active {
    border-color: rgba(34, 197, 94, 0.6);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.project-tab svg {
    flex-shrink: 0;
}

.projects-footnote {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.4);
    text-align: center;
    margin-top: 20px;
    font-style: italic;
    max-width: 400px;
}

/* Skills Section */
.skills-section {
    position: relative;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 80px 20px 120px;
}

.skills-container {
    max-width: 1200px;
    width: 100%;
    z-index: 10;
}

.skills-title {
    text-align: center;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 500;
    color: #000;
    margin-bottom: 70px;
}

/* Three Pillars Layout */
.skills-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 0 20px;
}

/* Individual Pillar Card */
.skill-pillar {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    padding: 36px 28px;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: default;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    opacity: 0;
    transform: translateY(40px);
}

.skill-pillar.visible {
    opacity: 1;
    transform: translateY(0);
}

.skill-pillar:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Pillar Header */
.pillar-header {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.pillar-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.skill-pillar[data-category="build"] .pillar-icon {
    background: rgba(74, 158, 255, 0.1);
    color: #4A9EFF;
}

.skill-pillar[data-category="lead"] .pillar-icon {
    background: rgba(34, 197, 94, 0.1);
    color: #22C55E;
}

.skill-pillar[data-category="analyze"] .pillar-icon {
    background: rgba(168, 85, 247, 0.1);
    color: #A855F7;
}

.skill-pillar:hover .pillar-icon {
    transform: scale(1.1);
}

.pillar-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.pillar-subtitle {
    font-size: 14px;
    color: #888;
    font-weight: 400;
}

/* Skill Chips Container */
.pillar-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.skill-chip {
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
}

/* BUILD Category - Blue */
.skill-pillar[data-category="build"] .pillar-title {
    color: #1a1a1a;
}

.skill-pillar[data-category="build"]:hover {
    border-color: rgba(74, 158, 255, 0.4);
}

.skill-pillar[data-category="build"] .skill-chip {
    background: rgba(74, 158, 255, 0.08);
    color: #2563eb;
    border: 1px solid rgba(74, 158, 255, 0.2);
}

.skill-pillar[data-category="build"] .skill-chip:hover {
    background: #4A9EFF;
    color: #fff;
    border-color: #4A9EFF;
    transform: translateY(-2px);
}

/* LEAD Category - Green */
.skill-pillar[data-category="lead"] .pillar-title {
    color: #1a1a1a;
}

.skill-pillar[data-category="lead"]:hover {
    border-color: rgba(34, 197, 94, 0.4);
}

.skill-pillar[data-category="lead"] .skill-chip {
    background: rgba(34, 197, 94, 0.08);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.skill-pillar[data-category="lead"] .skill-chip:hover {
    background: #22C55E;
    color: #fff;
    border-color: #22C55E;
    transform: translateY(-2px);
}

/* ANALYZE Category - Purple */
.skill-pillar[data-category="analyze"] .pillar-title {
    color: #1a1a1a;
}

.skill-pillar[data-category="analyze"]:hover {
    border-color: rgba(168, 85, 247, 0.4);
}

.skill-pillar[data-category="analyze"] .skill-chip {
    background: rgba(168, 85, 247, 0.08);
    color: #9333ea;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.skill-pillar[data-category="analyze"] .skill-chip:hover {
    background: #A855F7;
    color: #fff;
    border-color: #A855F7;
    transform: translateY(-2px);
}

/* Skills Responsive */
@media (max-width: 900px) {
    .skills-pillars {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .skill-pillar {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .skills-section {
        padding: 60px 16px;
    }

    .skill-pillar {
        padding: 28px 20px;
    }

    .pillar-icon {
        width: 50px;
        height: 50px;
    }

    .skill-chip {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* Add margin below skills section */
.skills-section {
    margin-bottom: 60px;
}

/* About Me Section (Bento Grid) */
.about-section {
    position: relative;
    min-height: auto;  /* Fix from 100vh */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    padding: 80px 0;  /* Fix from 80px 20px */
    border-top: 1px solid #eaeaea;
}

.bento-container {
    max-width: 1200px;
    width: 100%;
    z-index: 10;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, minmax(280px, auto));
    gap: 24px;
}

/* Card Base Styles */
.bento-card {
    background: #ffffff;
    border-radius: 32px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.bento-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: rgba(74, 158, 255, 0.3);
}

/* 1. Bio Card (Large) */
.bio-card {
    grid-column: span 2;
    grid-row: span 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #111;
}

.bio-text {
    font-size: 17px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 30px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.2s;
}

.card-link:hover {
    color: #1d4ed8;
}

/* 2. Visual Card (Shape) */
.visual-card {
    grid-column: span 1;
    grid-row: span 1;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.abstract-shape {
    width: 100px;
    height: 100px;
    position: relative;
}

.shape-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #4A9EFF 0%, #2563eb 100%);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: blobMorph 8s ease-in-out infinite both alternate;
    opacity: 0.8;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.3);
}

/* 3. Experience Card */
.experience-card {
    grid-column: span 1;
    grid-row: span 2;
    background: #fff;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 30px;
}

.experience-content {
    width: 100%;
}

.experience-content h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.experience-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.experience-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.exp-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.exp-text {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* 5. Values Card (Wide) */
.values-card {
    grid-column: span 3;
    grid-row: span 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.values-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #111;
}

.values-content p {
    color: #666;
    margin-bottom: 24px;
    max-width: 600px;
}

.value-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tag {
    padding: 8px 20px;
    background: rgba(74, 158, 255, 0.1);
    color: #2563eb;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.bento-card:hover .tag {
    background: #2563eb;
    color: #fff;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .bio-card,
    .values-card {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .bento-grid {
        display: flex;
        flex-direction: column;
    }

    .bento-card {
        min-height: 200px;
    }
}

/* Contact Section */
.contact-section {
    position: relative;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
    padding: 80px 0;  /* Fix from 80px 20px */
}

.contact-container {
    width: 100%;
    max-width: 600px;
    z-index: 10;
}

.contact-header {
    text-align: center;
    margin-bottom: 40px;
}

.contact-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 500;
    color: #fff;
    margin-bottom: 12px;
}

.contact-subtitle {
    font-size: 16px;
    color: #888;
}

/* Footer */
.footer {
    background: #0a0a0a;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 80px 20px 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
    gap: 40px;
}

.brand-name {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    display: block;
    margin-bottom: 12px;
}

.brand-tagline {
    color: #888;
    font-size: 14px;
    max-width: 250px;
    line-height: 1.6;
}

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

.link-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.group-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    display: block;
}

.link-group a {
    color: #888;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.link-group a:hover {
    color: #4A9EFF;
}

.footer-bottom {
    padding-top: 40px;
    text-align: center;
}

.copyright {
    color: #555;
    font-size: 13px;
}

@media (max-width: 768px) {
    .footer-top {
        flex-direction: column;
        gap: 60px;
    }

    .footer-links {
        gap: 60px;
        width: 100%;
    }

    .link-group {
        flex: 1;
    }
}

.mode-toggle {
    display: flex;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    padding: 6px;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1;
}

.mode-btn:hover {
    color: #ccc;
}

.mode-btn.active {
    color: #fff;
}

.mode-btn svg {
    flex-shrink: 0;
}

.mode-indicator {
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    background: rgba(74, 158, 255, 0.2);
    border: 1px solid rgba(74, 158, 255, 0.5);
    border-radius: 50px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-toggle[data-active="ai"] .mode-indicator {
    transform: translateX(100%);
}

/* Contact Form Container */
.contact-modes-wrapper {
    display: grid;
    grid-template-columns: 1fr;
}

.contact-form-container,
.ai-chat-container {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0.3s;
    min-height: 500px;
}

.contact-form-container.active,
.ai-chat-container.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 16px;
    color: #fff;
    font-family: inherit;
    transition: border-color 0.3s ease, background 0.3s ease;
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: rgba(74, 158, 255, 0.5);
    background: rgba(74, 158, 255, 0.05);
}

.form-group label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #666;
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-group textarea+label {
    top: 18px;
    transform: none;
}

.form-group input:focus+label,
.form-group input:not(:placeholder-shown)+label,
.form-group textarea:focus+label,
.form-group textarea:not(:placeholder-shown)+label {
    top: -10px;
    left: 16px;
    font-size: 12px;
    color: #4A9EFF;
    background: #0a0a0a;
    padding: 0 8px;
}

/* Submit Button */
.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 32px;
    background: linear-gradient(135deg, #4A9EFF 0%, #2563eb 100%);
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(74, 158, 255, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn .btn-loading {
    display: none;
}

.submit-btn.loading .btn-text,
.submit-btn.loading .btn-icon {
    display: none;
}

.submit-btn.loading .btn-loading {
    display: flex;
}

.spinner {
    animation: spin 1s linear infinite;
}

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

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

/* Form Success */
.form-success {
    text-align: center;
    padding: 60px 20px;
}

.form-success svg {
    margin-bottom: 24px;
}

.form-success h3 {
    font-size: 28px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 12px;
}

.form-success p {
    font-size: 16px;
    color: #888;
}

/* AI Chat Container */
.ai-chat-container {
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px 16px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
}

.chat-message {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.ai {
    align-self: flex-start;
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.2);
    color: #e0e0e0;
}

.chat-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #4A9EFF 0%, #2563eb 100%);
    color: #fff;
}

.chat-message.typing {
    display: flex;
    gap: 6px;
    padding: 18px 22px;
}

.chat-message.typing span {
    width: 8px;
    height: 8px;
    background: #4A9EFF;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.chat-message.typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-message.typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Chat Input */
.chat-input-container {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 0 16px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
}

.chat-input {
    flex: 1;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    font-size: 15px;
    color: #fff;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input:focus {
    border-color: rgba(74, 158, 255, 0.5);
}

.chat-input::placeholder {
    color: #666;
}

.chat-send-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4A9EFF 0%, #2563eb 100%);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.4);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

/* Specification Preview */
.spec-preview {
    margin-top: 20px;
    padding: 24px;
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 16px;
    animation: messageSlide 0.3s ease;
}

.spec-preview h3 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
}

.spec-content {
    font-size: 14px;
    line-height: 1.7;
    color: #ccc;
    margin-bottom: 20px;
}

.spec-content strong {
    color: #4A9EFF;
}

.spec-actions {
    display: flex;
    gap: 12px;
}

.spec-btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.spec-btn.secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ccc;
}

.spec-btn.secondary:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.spec-btn.primary {
    background: linear-gradient(135deg, #4A9EFF 0%, #2563eb 100%);
    border: none;
    color: #fff;
}

.spec-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 158, 255, 0.3);
}

/* Scrollbar for chat */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ================================
   Project Modal Styles
   ================================ */

.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    backdrop-filter: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-modal.active .modal-backdrop {
    opacity: 1;
}

.modal-container {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: transparent;
    border: none;
    border-radius: 24px;
    overflow: visible;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease;
    /* No padding - content floats inside particle border */
    padding: 0;
}

.project-modal.active .modal-container {
    transform: translateY(0) scale(1);
    opacity: 1;
    transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease 0.1s;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
    transform: rotate(90deg);
}

.modal-content {
    max-height: 80vh;
    overflow-y: auto;
    padding: 36px;
    /* Glassmorphism card floating in center - particles form border around it */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* Modal Header */
.modal-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.modal-label {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.25);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: #4A9EFF;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.modal-title {
    font-size: clamp(26px, 5vw, 32px);
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 10px;
    line-height: 1.2;
}

.modal-subtitle {
    font-size: 15px;
    color: #666;
    line-height: 1.5;
    max-width: 500px;
    margin: 0 auto;
}

/* Modal Sections */
.modal-section {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.modal-section:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
}

.section-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.modal-section:hover .section-icon {
    transform: scale(1.1);
}

.section-icon.description {
    background: rgba(74, 158, 255, 0.15);
    color: #4A9EFF;
}

.section-icon.value {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.section-content {
    flex: 1;
}

.section-content h3 {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-content p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* Workflow Section */
.workflow-section {
    flex-direction: column;
    padding: 24px;
}

.workflow-section h3 {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.workflow-steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

.workflow-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4A9EFF 0%, #2563eb 100%);
    border-radius: 50%;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
}

.step-content h4 {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.step-content p {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    padding: 0 8px;
}

.workflow-connector {
    flex: 0 0 40px;
    height: 2px;
    background: linear-gradient(90deg, rgba(74, 158, 255, 0.5), rgba(74, 158, 255, 0.2));
    margin-top: 20px;
    border-radius: 1px;
}

/* Tech Stack */
.modal-section>h3 {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-chip {
    padding: 8px 16px;
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: #4A9EFF;
    transition: all 0.2s ease;
}

.tech-chip:hover {
    background: rgba(74, 158, 255, 0.2);
    border-color: rgba(74, 158, 255, 0.4);
    transform: translateY(-2px);
}

/* Value Section */
.value-section {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.05), rgba(251, 191, 36, 0.02));
    border-color: rgba(251, 191, 36, 0.15);
}

.value-section:hover {
    border-color: rgba(251, 191, 36, 0.25);
}

/* Modal Responsive */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 90vh;
        border-radius: 20px;
    }

    .modal-content {
        padding: 24px;
    }

    .modal-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }

    .workflow-steps {
        flex-direction: column;
        gap: 16px;
    }

    .workflow-connector {
        width: 2px;
        height: 24px;
        flex: 0 0 24px;
        margin: 0 auto;
        background: linear-gradient(180deg, rgba(74, 158, 255, 0.5), rgba(74, 158, 255, 0.2));
    }

    .workflow-step {
        flex-direction: row;
        text-align: left;
        gap: 16px;
    }

    .step-number {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .step-content p {
        padding: 0;
    }

    .modal-section {
        flex-direction: column;
        gap: 12px;
    }

    .section-icon {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 20px;
    }

    .modal-title {
        font-size: 24px;
    }

    .modal-subtitle {
        font-size: 14px;
    }

    .tech-chip {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .contact-section {
        padding: 60px 16px;
    }

    .mode-btn {
        padding: 12px 16px;
        font-size: 14px;
    }

    .mode-btn svg {
        width: 18px;
        height: 18px;
    }

    .form-group input,
    .form-group textarea {
        padding: 16px 18px;
    }

    .chat-messages {
        height: 350px;
    }

    .spec-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 20px;
    }

    .modal-title {
        font-size: 24px;
    }

    .modal-subtitle {
        font-size: 14px;
    }

    .tech-chip {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .contact-section {
        padding: 60px 16px;
    }

    .mode-btn {
        padding: 12px 16px;
        font-size: 14px;
    }

    .mode-btn svg {
        width: 18px;
        height: 18px;
    }

    .form-group input,
    .form-group textarea {
        padding: 16px 18px;
    }

    .chat-messages {
        height: 350px;
    }

    .spec-actions {
        flex-direction: column;
    }
}
/* ============================================
   Legal Notice Modal
   ============================================ */

.legal-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.legal-modal.active {
    pointer-events: all;
    opacity: 1;
}

.legal-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.legal-modal.active .modal-backdrop {
    opacity: 1;
}

.legal-container {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
}

.legal-modal.active .legal-container {
    transform: translateY(0);
    opacity: 1;
}

.legal-content {
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px;
}

.legal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.legal-title {
    font-size: 32px;
    font-weight: 600;
    color: #111;
    margin: 0;
}

.legal-lang-toggle {
    display: flex;
    gap: 8px;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 12px;
}

.legal-lang-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: #666;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.legal-lang-btn:hover {
    background: rgba(74, 158, 255, 0.1);
    color: #4A9EFF;
}

.legal-lang-btn.active {
    background: #ffffff;
    color: #111;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.legal-body {
    position: relative;
}

.legal-version {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.legal-section {
    margin-bottom: 32px;
}

.legal-section:last-child {
    margin-bottom: 0;
}

.legal-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #111;
    margin-bottom: 16px;
}

.legal-section p {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin: 0;
}

.legal-section a {
    color: #4A9EFF;
    text-decoration: none;
    transition: color 0.2s ease;
}

.legal-section a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.legal-section strong {
    color: #111;
    font-weight: 600;
}

.legal-source {
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
    margin-top: 40px;
}

.legal-source p {
    font-size: 14px;
    color: #999;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.legal-link {
    color: #999;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.legal-link:hover {
    color: #4A9EFF;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .legal-container {
        width: 95%;
        max-height: 90vh;
        border-radius: 16px;
    }

    .legal-content {
        padding: 28px 24px;
        max-height: 90vh;
    }

    .legal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .legal-title {
        font-size: 26px;
    }

    .legal-section h3 {
        font-size: 18px;
    }

    .legal-section p {
        font-size: 15px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .legal-content {
        padding: 24px 20px;
    }

    .legal-title {
        font-size: 24px;
    }

    .legal-section {
        margin-bottom: 24px;
    }

    .legal-section h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .legal-section p {
        font-size: 14px;
    }

    .legal-lang-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}
