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

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --success-color: #22c55e;
    --transition: all 0.3s ease;
}

/* Dark Mode Variables */
body.dark-mode {
    --text-dark: #f0f0f0;
    --text-light: #b0b0b0;
    --light-bg: #1a1a2e;
    --border-color: #404060;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background-color: #fff;
    line-height: 1.6;
}

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

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1rem 0;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.dark-mode-toggle {
    background: rgba(99, 102, 241, 0.2);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}
.dark-mode-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1) rotate(20deg);
}
body.dark-mode .navbar {
    background: #0d0d1a !important;
    backdrop-filter: none;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(99, 102, 241, 0.3);
}
body.dark-mode .dark-mode-toggle i::before {
    content: '☀️';
}
body.dark-mode .dark-mode-toggle {
    background: rgba(139, 92, 246, 0.2);
}

.logo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.logo-text {
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* Monogram — shown only on small screens (see 768px block) */
.logo-mark {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.logo-link:hover {
    color: var(--secondary-color);
}

.logo-link:hover .logo-mark {
    filter: brightness(1.06);
    transform: scale(1.03);
}

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

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

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

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

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* Hero Section — raining letters + scrambled title (creative mode) */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    color: white;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.raining-letters {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

body.terminal-mode .raining-letters {
    display: none;
}

.rain-char {
    position: absolute;
    font-size: 1.8rem;
    font-weight: 300;
    color: #475569;
    opacity: 0.4;
    transform: translate(-50%, -50%);
    will-change: transform, top;
    line-height: 1;
    user-select: none;
    transition: color 0.1s, transform 0.1s, text-shadow 0.1s, opacity 0.1s;
}

.rain-char.rain-char--active {
    color: #00ff00;
    font-size: 2rem;
    font-weight: 700;
    opacity: 1;
    z-index: 10;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 12px rgba(255, 255, 255, 0.4);
    animation: rainCharPulse 1s ease-in-out infinite;
}

@keyframes rainCharPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.82; }
}

.hero .dud {
    color: #0f0;
    opacity: 0.7;
}

/* Creative + light theme: data-hero-bg set by JS (moon off) — !important beats base .hero #000 */
body.creative-mode[data-hero-bg="light"] .hero {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
    color: #1e293b !important;
}

body.creative-mode[data-hero-bg="light"] .hero-name,
body.creative-mode[data-hero-bg="light"] .hero-scramble-roles {
    color: #1e293b !important;
}

body.creative-mode[data-hero-bg="light"] .rain-char {
    color: #64748b;
    opacity: 0.28;
}

body.creative-mode[data-hero-bg="light"] .rain-char.rain-char--active {
    color: #059669;
    text-shadow: 0 0 14px rgba(5, 150, 105, 0.35), 0 0 2px rgba(99, 102, 241, 0.15);
}

body.creative-mode[data-hero-bg="light"] .hero .dud {
    color: #047857;
    opacity: 0.85;
}

body.creative-mode[data-hero-bg="light"] .hero .btn-secondary {
    color: #1e293b !important;
    border-color: var(--primary-color);
}

body.creative-mode[data-hero-bg="light"] .hero .btn-secondary:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-color: var(--secondary-color);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
    .rain-char.rain-char--active {
        animation: none !important;
    }
    .hero-name,
    .hero-scramble-roles,
    .hero-buttons {
        animation: none !important;
    }
}

.hero-content {
    position: relative;
    z-index: 20;
    text-align: center;
    width: 100%;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
    padding: 0 clamp(1rem, 4vw, 1.75rem);
    box-sizing: border-box;
}

/* Static name + scrambled role line */
.hero-name {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: clamp(2rem, 6vw, 3.75rem);
    font-weight: 700;
    margin-bottom: 0.35rem;
    line-height: 1.1;
    letter-spacing: 0.02em;
    color: #ffffff;
    animation: heroFadeUp 0.85s ease backwards;
}

.hero-scramble-roles {
    font-family: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', Consolas, monospace;
    font-size: clamp(1.35rem, 4.2vw, 2.25rem);
    font-weight: 700;
    margin: 0 0 2rem;
    line-height: 1.2;
    letter-spacing: 0.06em;
    color: #ffffff;
    min-height: 1.3em;
    animation: heroFadeUp 0.85s ease 0.06s backwards;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: heroFadeUp 0.85s ease 0.18s backwards;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Hero: gentler motion (professional, not flashy) */
@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    display: inline-block;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
    position: relative;
    padding-bottom: 1rem;
    animation: titleSlideIn 0.8s ease-out;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    animation: expandWidth 0.8s ease-out 0.3s forwards;
}

@keyframes titleSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 100px;
    }
}

/* Sections */
section {
    padding: 80px 0;
}

.about {
    background: var(--light-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
}

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

.about-stats {
    display: grid;
    gap: 2rem;
}

.stat {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Skills Section */
.skills {
    background: white;
    padding: 40px 0;
}

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

.skill-category {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-tag {
    background: white;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: inline-block;
    z-index: 1;
}

.skill-tag::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--primary-color);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: -1;
}

.skill-tag:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
    border-color: var(--secondary-color);
}

.skill-tag:hover::before {
    width: 300px;
    height: 300px;
}

.skill-tag:hover {
    color: white !important;
    z-index: 1;
}

/* Core stack summary (skills — scannable for recruiters) */
.core-stack-strip {
    max-width: 920px;
    margin: 0 auto 1.75rem;
    padding: 1rem 1.25rem;
    background: rgba(99, 102, 241, 0.09);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-dark);
    text-align: left;
}

body.dark-mode .core-stack-strip {
    background: rgba(99, 102, 241, 0.14);
    color: var(--text-dark);
}

body.terminal-mode .core-stack-strip {
    background: rgba(0, 0, 0, 0.35);
    border-left-color: #9ca3af;
    border-radius: 0;
    color: #e5e7eb;
}

/* ========================================
   TECH STACK BADGES (inside Skills section)
======================================== */
.tech-stack-area {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.tech-stack-area .tech-category {
    text-align: center;
}

.tech-stack-area .tech-category h4 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem;
}

.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #fff;
    background: var(--badge-color, #6366f1);
    box-shadow: 0 3px 10px var(--badge-glow, rgba(99,102,241,0.3));
    cursor: default;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tech-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.5s ease;
}

.tech-badge:hover::before {
    left: 100%;
}

.tech-badge:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 8px 25px var(--badge-glow, rgba(99,102,241,0.5));
    filter: brightness(1.15);
}

.tech-badge i {
    font-size: 1rem;
}

/* Dark Mode */
body.dark-mode .tech-stack-area .tech-category h4 {
    color: #e4e4e4;
}

body.dark-mode .tech-badge {
    box-shadow: 0 3px 15px var(--badge-glow, rgba(99,102,241,0.4));
}

body.dark-mode .tech-badge:hover {
    box-shadow: 0 8px 30px var(--badge-glow, rgba(99,102,241,0.6));
}

/* Terminal Mode */
body.terminal-mode .tech-stack-area .tech-category h4 {
    color: #ccc;
}

body.terminal-mode .tech-badge {
    background: #222;
    color: #ccc;
    border: 1px solid #444;
    border-radius: 0;
    box-shadow: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

body.terminal-mode .tech-badge:hover {
    background: #333;
    color: #fff;
    border-color: #888;
    box-shadow: none;
    filter: none;
    transform: translateY(-2px);
}

/* Creative Mode */
body.creative-mode .tech-badge:hover {
    transform: translateY(-6px) scale(1.12) rotate(-2deg);
    box-shadow: 0 12px 35px var(--badge-glow, rgba(99,102,241,0.6));
}

/* Responsive */
@media (max-width: 768px) {
    .tech-badge {
        padding: 6px 12px;
        font-size: 0.72rem;
    }

    .tech-badge i {
        font-size: 0.85rem;
    }

    .tech-stack-area .tech-category h4 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .tech-badges {
        gap: 0.5rem;
    }

    .tech-badge {
        padding: 5px 10px;
        font-size: 0.68rem;
    }
}

/* Experience Section */
.experience {
    background: var(--light-bg);
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: var(--border-color);
}
/* Experience Section */
.experience {
    background: var(--light-bg);
}

.experience-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.experience-card {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--primary-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.experience-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.experience-card:hover {
    transform: translateX(15px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.15);
}

.experience-card:hover::before {
    transform: scaleX(1);
}

.exp-header {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.exp-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.2);
}

.exp-year {
    display: none;
}

.exp-badge-icon {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
}

.exp-badge-text {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.exp-header h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 0;
}

.exp-company {
    color: var(--primary-color);
    font-weight: 600;
    margin: 0.5rem 0 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.exp-company i {
    font-size: 0.9rem;
}

.exp-duration {
    display: none;
}

.exp-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), transparent);
    margin: 1.5rem 0;
}

.exp-highlights {
    list-style: none;
    margin: 1.5rem 0;
    padding: 0;
}

.exp-highlights li {
    margin: 0.75rem 0;
    color: var(--text-light);
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.exp-highlights i {
    color: var(--primary-color);
    font-size: 0.85rem;
    margin-top: 0.35rem;
    flex-shrink: 0;
}

.exp-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.exp-skill {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.exp-skill:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.timeline-item {
    margin-bottom: 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.timeline-item:nth-child(odd) .timeline-content {
    order: -1;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border: 4px solid white;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 0 4px var(--light-bg);
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.timeline-content h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.timeline-content .company {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-content .date {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.timeline-content .description {
    color: var(--text-light);
    line-height: 1.6;
}

/* Projects Section */
.projects {
    background: white;
}

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

.project-card {
    background: var(--light-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
    z-index: 0;
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

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

.project-card h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    font-size: 1.3rem;
    color: var(--text-dark);
    position: relative;
    z-index: 1;
}

.project-card p {
    padding: 0 1.5rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 1.5rem 1rem;
}

.project-tags span {
    background: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

/* Contact Section */
.contact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.contact .section-title {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background: none !important;
}

.contact .section-title::after {
    background: rgba(255, 255, 255, 0.5) !important;
}

.contact::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent);
    border-radius: 50%;
    animation: pulse 6s ease-in-out infinite;
}

.contact-intro {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.95;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: start;
    position: relative;
    z-index: 1;
}

.contact-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.info-grid {
    display: grid;
    gap: 1.5rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    border-radius: 15px;
    transition: var(--transition);
    text-align: center;
}

.info-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.info-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.info-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.info-card p {
    opacity: 0.95;
    margin: 0;
}

.info-card a {
    color: #fff;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
}

.info-card a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.info-meta {
    font-size: 0.85rem;
    opacity: 0.75;
    margin-top: 0.5rem !important;
}

.social-section {
    padding: 2em 0;
}

.social-section h4 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.social-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.social-card i {
    font-size: 1.8rem;
    transition: var(--transition);
}

.social-card:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-8px);
}

.social-card:hover i {
    transform: scale(1.2) rotate(10deg);
}

.contact-form-wrapper {
    position: relative;
    min-height: 700px;
    padding: 20px;
    overflow: hidden;
}

.form-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
}

.form-title {
    font-size: 1.4rem;
    margin: 0 0 0.5rem 0;
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.form-title i {
    color: var(--secondary-color);
    font-size: 1.3rem;
}

.form-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
}

.contact-item a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    opacity: 0.8;
}

.form-modern {
    background: rgba(255, 255, 255, 0.08);
    padding: 2rem 2.5rem;
    border-radius: 20px;
    backdrop-filter: blur(25px);
    border: 1.5px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.form-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
    z-index: 0;
}

.form-modern:hover::before {
    left: 100%;
}

.form-modern:hover {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.2);
}

.form-group {
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
}

.form-group-message {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.95;
}

.form-label .char-limit {
    font-size: 0.8rem;
    opacity: 0.7;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    margin-left: 0.3rem;
}

.form-modern input,
.form-modern textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-modern input::placeholder,
.form-modern textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-modern input:focus,
.form-modern textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--secondary-color);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5), inset 0 0 10px rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
}

.textarea-wrapper {
    position: relative;
}

.textarea-wrapper textarea {
    padding-bottom: 30px;
    resize: vertical;
    min-height: 110px;
}

.textarea-wrapper textarea::-webkit-scrollbar {
    width: 6px;
}

.textarea-wrapper textarea::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.textarea-wrapper textarea::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.4);
    border-radius: 10px;
}

.textarea-wrapper textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.6);
}

.form-success {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--success-color);
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 1rem;
    pointer-events: none;
    z-index: 3;
}

.form-group-message .form-success {
    top: auto;
    bottom: 10px;
    transform: translateY(0);
}

.form-success i {
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-error {
    display: block;
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: 6px;
    opacity: 0;
    transition: var(--transition);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.form-error.show {
    opacity: 1;
    animation: shake 0.3s ease-in-out;
}

.form-error::before {
    content: '⚠';
    font-weight: 700;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.btn-submit {
    padding: 14px 36px;
    font-size: 1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    width: auto;
    pointer-events: auto;
    z-index: 9999;
}

.btn-submit.escaped {
    animation: buttonPulse 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes buttonPulse {
    0% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3);
    }
    100% {
        filter: brightness(1);
    }
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
    z-index: 0;
}

.btn-submit:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: var(--accent-color);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.4), 0 0 20px rgba(139, 92, 246, 0.2);
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit span,
.btn-submit i {
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.btn-submit:hover i {
    transform: translateX(4px) rotate(20deg);
}

.btn-submit:active {
    transform: translateY(-1px) scale(1);
}

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

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
}

.footer-section h4 i {
    color: var(--primary-color);
}

.footer-section p {
    opacity: 0.8;
    font-size: 0.95rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
}

.quick-links a i {
    color: var(--primary-color);
    transition: var(--transition);
    width: 16px;
    text-align: center;
}

.quick-links a:hover {
    color: var(--primary-color);
    padding-left: 0.3rem;
}

.quick-links a:hover i {
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 0.4rem 0;
    }

    .nav-wrapper {
        position: relative;
        gap: 0.4rem;
        flex-wrap: nowrap;
        align-items: center;
    }

    .navbar .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .logo,
    .logo-link {
        flex-shrink: 0;
    }

    .logo-text {
        display: none;
    }

    .logo-mark {
        display: inline-flex;
    }

    .dark-mode-toggle,
    .mode-switch-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        font-size: 0.95rem;
    }

    .hamburger {
        display: flex;
        margin-left: 0.15rem;
    }

    .hamburger span {
        margin: 4px 0;
    }

    .nav-menu {
        position: absolute;
        top: calc(100% + 0.35rem);
        left: 0;
        right: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 0.65rem 1rem;
        gap: 0.35rem;
        display: none;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 12px 12px;
    }

    .hero {
        margin-top: 52px;
    }

    .nav-menu.active {
        display: flex;
    }

    body.dark-mode .nav-menu {
        background: #0d0d1a !important;
        border-top: 1px solid rgba(99, 102, 241, 0.3);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    }

    .hero-name {
        font-size: 2.5rem;
    }

    .hero-scramble-roles {
        font-size: 1.65rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 250px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .skill-category {
        background: white;
        border: 1px solid var(--border-color);
    }

    .experience-card {
        padding: 1.75rem;
    }

    .exp-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .exp-badge {
        width: 80px;
        height: 80px;
        font-size: 0.9rem;
    }

    .exp-year {
        font-size: 1.5rem;
    }

    .exp-skill {
        font-size: 0.8rem;
        padding: 5px 12px;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .social-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .timeline::before {
        display: none;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        padding-left: 2rem;
        position: relative;
    }

    .timeline-marker {
        position: absolute;
        left: 0;
        top: 10px;
    }

    .timeline-item:nth-child(odd) .timeline-content {
        order: 0;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .social-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

    section {
        padding: 60px 0;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .form-modern {
        padding: 2rem;
    }

    .btn-submit {
        width: 100%;
        padding: 14px 24px;
    }

    .form-label {
        font-size: 0.9rem;
    }

    .form-modern input,
    .form-modern textarea {
        padding: 12px 14px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 2rem;
    }

    .hero-scramble-roles {
        font-size: 1.35rem;
    }

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

    .about-stats {
        grid-template-columns: 1fr;
    }

    .experience-card {
        padding: 1.5rem;
    }

    .exp-badge {
        width: 70px;
        height: 70px;
        font-size: 0.8rem;
    }

    .exp-highlights li {
        font-size: 0.9rem;
    }

    .info-grid {
        gap: 1rem;
    }

    .info-card {
        padding: 1.5rem;
    }

    .social-grid {
        grid-template-columns: 1fr 1fr;
    }

}
/* Certifications Section */
.certifications {
    background: white;
}

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

.cert-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    border-left: 5px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
}

.cert-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent);
    border-radius: 50%;
    transition: transform 0.6s ease;
    transform: scale(0);
    z-index: 0;
}

.cert-card:hover::before {
    transform: scale(1);
}

.cert-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.3);
    border-left-color: rgba(255, 255, 255, 0.6);
}

.cert-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    z-index: 2;
}

.cert-completed .cert-badge {
    background: rgba(34, 197, 94, 0.4);
    border-color: rgba(34, 197, 94, 0.6);
}

.cert-inprogress .cert-badge {
    background: rgba(59, 130, 246, 0.4);
    border-color: rgba(59, 130, 246, 0.6);
    animation: pulse 2s infinite;
}

.cert-recognized .cert-badge {
    background: rgba(250, 204, 21, 0.4);
    border-color: rgba(250, 204, 21, 0.6);
}

.cert-verified .cert-badge {
    background: rgba(34, 197, 94, 0.4);
    border-color: rgba(34, 197, 94, 0.6);
    animation: pulse 2s infinite;
}

.cert-icon {
    font-size: 3rem;
    margin: 1rem 0;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.cert-card:hover .cert-icon {
    transform: rotateY(360deg) scale(1.2);
}

.cert-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    font-weight: 600;
}

.cert-card p {
    position: relative;
    z-index: 1;
    flex: 1;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cert-footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.cert-meta {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
    display: inline-block;
}

.cert-verify-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.cert-card .cert-verify-link {
    color: rgba(255, 255, 255, 0.95);
}

.cert-verify-link:hover {
    border-bottom-color: var(--primary-color);
    color: var(--secondary-color);
}

.cert-card .cert-verify-link:hover {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.85);
}

body.terminal-mode .cert-verify-link {
    color: #93c5fd;
}

body.terminal-mode .cert-verify-link:hover {
    color: #fff;
}

/* Education Section */
.education {
    background: var(--light-bg);
}

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

.education-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    border-top: 4px solid var(--primary-color);
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.education-card::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.education-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}

.education-card:hover::after {
    opacity: 0.05;
}

.education-card h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.education-card:hover h3 {
    color: var(--primary-color);
}

.education-card .degree-spec {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

.education-card .school {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.education-card .year {
    color: var(--secondary-color);
    font-weight: 600;
    margin-top: 1rem;
    position: relative;
    z-index: 1;
}

/* ========================================
   DARK MODE STYLES
======================================== */
body.dark-mode {
    background-color: #0d0d1a;
    color: #e4e4e4;
}

body.dark-mode .about {
    background: #0d0d1a;
}

body.dark-mode .about-text p {
    color: #c0c0c0;
}

body.dark-mode .stat {
    background: #1a1a2e;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .stat h3 {
    color: #a5b4fc;
}

body.dark-mode .stat p {
    color: #c0c0d0;
}

body.dark-mode .skills {
    background: #111128;
}

body.dark-mode .skill-category {
    background: #1a1a2e;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .skill-category h3 {
    color: #fff;
}

body.dark-mode .skill-tag {
    background: rgba(99, 102, 241, 0.1);
    color: #a5a6f6;
    border-color: rgba(99, 102, 241, 0.4);
}

body.dark-mode .skill-tag:hover,
body.dark-mode .skill-tag:hover * {
    color: white !important;
}

body.dark-mode .experience {
    background: #0d0d1a;
}

body.dark-mode .experience-card {
    background: #1a1a2e;
    border-color: #303060;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .experience-card h3,
body.dark-mode .exp-company {
    color: #e4e4e4;
}

body.dark-mode .exp-highlights li {
    color: #c0c0c0;
}

body.dark-mode .exp-skill {
    background: rgba(99, 102, 241, 0.15);
    color: #a5a6f6;
}

body.dark-mode .projects {
    background: #111128;
}

body.dark-mode .project-card {
    background: #1a1a2e;
    border-color: #303060;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .project-card h3 {
    color: #fff;
}

body.dark-mode .project-card p {
    color: #c0c0c0;
}

body.dark-mode .project-tags span {
    background: rgba(99, 102, 241, 0.15);
    color: #a5a6f6;
}

body.dark-mode .certifications {
    background: #0d0d1a;
}

body.dark-mode .education {
    background: #111128;
}

body.dark-mode .education-card {
    background: #1a1a2e;
    border-color: #303060;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .education-card h3 {
    color: #e4e4e4;
}

body.dark-mode .education-card .school {
    color: #9090a0;
}

body.dark-mode .section-title {
    color: #fff;
}

body.dark-mode .about-text p {
    color: #c8c8d0;
}

body.dark-mode .contact-intro {
    color: #d0d0d0;
}

body.dark-mode .hero {
    background: #000000;
}

body.dark-mode .hero-name,
body.dark-mode .hero-scramble-roles {
    color: #ffffff;
}

body.dark-mode .exp-duration {
    color: #9090a0;
}

body.dark-mode .info-card h4 {
    color: #fff;
}

body.dark-mode .info-card p,
body.dark-mode .info-card a {
    color: #d0d0e0;
}

body.dark-mode .social-section h4 {
    color: #e4e4e4;
}

body.dark-mode .form-title {
    color: #ffffff;
}

body.dark-mode .form-subtitle {
    color: #b0b0c0;
}

body.dark-mode .footer {
    background: #080812;
}

body.dark-mode .footer-section h4 {
    color: #fff;
}

body.dark-mode .footer-section p {
    color: #a0a0b0;
}

body.dark-mode .footer-section a {
    color: rgba(200, 200, 220, 0.8);
}

body.dark-mode .footer-bottom p {
    color: #808090;
}

body.dark-mode .nav-link {
    color: #ffffff !important;
}

body.dark-mode .nav-menu .nav-link {
    color: #ffffff !important;
}

body.dark-mode .logo-link {
    color: #a5b4fc;
}

body.dark-mode .logo-link:hover {
    color: #c4b5fd;
}

/* ========================================
   ANIMATIONS
======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 30px rgba(99, 102, 241, 0.6); }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    0%, 100% { border-color: transparent; }
    50% { border-color: var(--primary-color); }
}

@keyframes morphBorder {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.6s ease forwards;
}

.animate-fadeInRight {
    animation: fadeInRight 0.6s ease forwards;
}

.animate-scaleIn {
    animation: scaleIn 0.6s ease forwards;
}

.animate-hidden {
    opacity: 0;
}

/* ========================================
   MODE SWITCH BUTTON (NAVBAR)
======================================== */
.mode-switch-btn {
    background: rgba(34, 197, 94, 0.15);
    border: 2px solid rgba(34, 197, 94, 0.4);
    color: #22c55e;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.mode-switch-btn:hover {
    background: #22c55e;
    color: #0d0d1a;
    transform: scale(1.1);
}

body.creative-mode .mode-switch-btn {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: #6366f1;
}

body.creative-mode .mode-switch-btn:hover {
    background: #6366f1;
    color: white;
}

/* ========================================
   MOUSE FOLLOW GLOW (Creative Mode)
======================================== */
.mouse-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

body.creative-mode .mouse-glow {
    opacity: 1;
}

/* ========================================
   PARTICLE CANVAS (Creative Mode)
======================================== */
.particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.creative-mode .particle-canvas {
    opacity: 1;
}

/* ========================================
   3D CARD TILT (Creative Mode)
======================================== */
body.creative-mode .experience-card,
body.creative-mode .project-card,
body.creative-mode .cert-card,
body.creative-mode .skill-category,
body.creative-mode .info-card,
body.creative-mode .education-card {
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s ease;
}

body.creative-mode .tilt-active {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 30px rgba(99, 102, 241, 0.1);
}

/* ========================================
   COUNTER ANIMATION (Creative Mode)
======================================== */
.stat h3 .counter-value {
    display: inline;
}

/* ========================================
   TYPING CURSOR
======================================== */
.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: white;
    margin-left: 4px;
    animation: cursorBlink 0.8s infinite;
    vertical-align: text-bottom;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ========================================
   TERMINAL MODE
======================================== */
body.terminal-mode {
    font-family: 'Courier New', 'Lucida Console', 'Consolas', monospace !important;
}

body.terminal-mode *:not(.fas):not(.fab):not(.far):not(.fa):not(i) {
    font-family: inherit !important;
    border-radius: 0 !important;
}

/* --- Terminal Mode (Always Dark) --- */
body.terminal-mode {
    background: #0a0a0a !important;
    color: #ffffff !important;
}

body.terminal-mode .navbar {
    background: #0a0a0a !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

body.terminal-mode .nav-link {
    color: #ffffff !important;
    font-size: 0.85rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
}

body.terminal-mode .nav-link::before,
body.terminal-mode .nav-link::after {
    display: none !important;
}

body.terminal-mode .nav-link:hover {
    color: #a5b4fc !important;
}

body.terminal-mode .hero {
    background: #0a0a0a !important;
    min-height: 100vh;
    color: #fff !important;
}

body.terminal-mode .hero::before,
body.terminal-mode .hero::after {
    display: none !important;
}

body.terminal-mode .hero-name {
    font-size: clamp(2rem, 8vw, 3rem) !important;
    color: #ffffff !important;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
    animation: none !important;
}

body.terminal-mode .hero-name::before {
    content: '> ';
    color: rgba(255, 255, 255, 0.4);
}

body.terminal-mode .hero-scramble-roles {
    font-size: 1.15rem !important;
    color: rgba(255, 255, 255, 0.92) !important;
    font-weight: 600 !important;
    animation: none !important;
}

body.terminal-mode .btn {
    background: transparent !important;
    border: 1px solid #fff !important;
    color: #fff !important;
    border-radius: 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    font-size: 0.85rem !important;
    box-shadow: none !important;
    animation: none !important;
}

body.terminal-mode .btn:hover {
    background: #fff !important;
    color: #0a0a0a !important;
}

body.terminal-mode section {
    background: #0a0a0a !important;
}

body.terminal-mode .section-title {
    color: #ffffff !important;
    font-size: 1.5rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
}

body.terminal-mode .section-title::before {
    content: '# ';
    color: rgba(255, 255, 255, 0.3);
}

body.terminal-mode .section-title::after {
    background: rgba(255, 255, 255, 0.1) !important;
}

body.terminal-mode .about-text p {
    color: #ccc !important;
}

body.terminal-mode .stat {
    background: #111 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

body.terminal-mode .stat h3 {
    color: #ffffff !important;
}

body.terminal-mode .stat p {
    color: #888 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    font-size: 0.75rem !important;
}

body.terminal-mode .skill-category {
    background: #111 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

body.terminal-mode .skill-category h3 {
    color: #ffffff !important;
}

body.terminal-mode .skill-tag {
    background: #1a1a1a !important;
    color: #ddd !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
}

body.terminal-mode .skill-tag::before {
    display: none !important;
}

body.terminal-mode .skill-tag:hover {
    background: #fff !important;
    color: #0a0a0a !important;
}

body.terminal-mode .experience-card,
body.terminal-mode .project-card,
body.terminal-mode .cert-card,
body.terminal-mode .education-card,
body.terminal-mode .info-card {
    background: #111 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

body.terminal-mode .experience-card h3,
body.terminal-mode .project-card h3,
body.terminal-mode .cert-card h3,
body.terminal-mode .education-card h3,
body.terminal-mode .info-card h4 {
    color: #ffffff !important;
}

body.terminal-mode .exp-company {
    color: #aaa !important;
}

body.terminal-mode .exp-duration {
    color: #777 !important;
}

body.terminal-mode .exp-highlights li {
    color: #bbb !important;
}

body.terminal-mode .exp-badge {
    background: #1a1a1a !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ddd !important;
}

body.terminal-mode .project-card p,
body.terminal-mode .cert-card p,
body.terminal-mode .education-card p {
    color: #bbb !important;
}

body.terminal-mode .project-tag {
    background: #1a1a1a !important;
    color: #ccc !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.terminal-mode .cert-icon {
    background: #1a1a1a !important;
    color: #fff !important;
}

body.terminal-mode .status-badge {
    background: #1a1a1a !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ddd !important;
}

body.terminal-mode .info-card a {
    color: #a5b4fc !important;
}

body.terminal-mode .info-icon {
    background: #1a1a1a !important;
    color: #fff !important;
}

body.terminal-mode .form-modern {
    background: #111 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

body.terminal-mode .form-modern input,
body.terminal-mode .form-modern textarea {
    background: #0a0a0a !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

body.terminal-mode .form-modern input:focus,
body.terminal-mode .form-modern textarea:focus {
    border-color: rgba(255, 255, 255, 0.3) !important;
}

body.terminal-mode .form-modern label {
    color: #aaa !important;
}

body.terminal-mode .form-modern button {
    background: transparent !important;
    border: 1px solid #fff !important;
    color: #fff !important;
}

body.terminal-mode .form-modern button:hover {
    background: #fff !important;
    color: #0a0a0a !important;
}

body.terminal-mode .social-card,
body.terminal-mode .social-link {
    background: #111 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}

body.terminal-mode .social-card:hover,
body.terminal-mode .social-link:hover {
    background: #fff !important;
    color: #0a0a0a !important;
}

body.terminal-mode footer {
    background: #0a0a0a !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.terminal-mode footer h3 {
    color: #fff !important;
}

body.terminal-mode footer a,
body.terminal-mode footer p {
    color: #aaa !important;
}

body.terminal-mode .dark-mode-toggle,
body.terminal-mode .mode-switch-btn {
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    background: transparent !important;
}

body.terminal-mode .scroll-to-top {
    background: transparent !important;
    border: 1px solid #fff !important;
    color: #fff !important;
}

/* Terminal scanline effect */
body.terminal-mode::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 65, 0.015) 2px,
        rgba(0, 255, 65, 0.015) 4px
    );
    pointer-events: none;
    z-index: 99999;
}

/* Terminal mode animations override - remove all fancy animations */
body.terminal-mode .animate-fadeInUp,
body.terminal-mode .animate-fadeInLeft,
body.terminal-mode .animate-fadeInRight,
body.terminal-mode .animate-scaleIn {
    animation: terminalFadeIn 0.3s ease forwards !important;
}

@keyframes terminalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========================================
   CREATIVE MODE EXTRAS
======================================== */
body.creative-mode .hero {
    overflow: hidden;
}

body.creative-mode .section-title {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

body.creative-mode .btn-primary {
    position: relative;
    overflow: hidden;
}

body.creative-mode .btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, rgba(255, 255, 255, 0.2), transparent 30%);
    animation: rotateBorder 3s linear infinite;
}

@keyframes rotateBorder {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

body.creative-mode .stat:hover h3 {
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

body.creative-mode .skill-tag:hover {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3), 0 0 40px rgba(99, 102, 241, 0.1);
}

/* Creative mode page transitions */
body.creative-mode section {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ========================================
   SCROLL PROGRESS BAR
======================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    z-index: 100001;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

body.terminal-mode .scroll-progress {
    background: #ffffff;
    box-shadow: none;
    height: 2px;
}

/* ========================================
   BUTTON HOVER SHEEN
======================================== */
.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.25),
        transparent
    );
    transform: skewX(-20deg);
    transition: none;
}

.btn:hover::after {
    animation: sheenSlide 0.6s ease forwards;
}

@keyframes sheenSlide {
    from { left: -100%; }
    to { left: 150%; }
}

/* ========================================
   RIPPLE CLICK EFFECT
======================================== */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.25);
    transform: scale(0);
    animation: rippleExpand 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 99998;
}

body.terminal-mode .ripple {
    background: rgba(255, 255, 255, 0.1);
}

@keyframes rippleExpand {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ========================================
   TEXT SCRAMBLE
======================================== */
.scramble-text {
    display: inline;
}

.scramble-char {
    display: inline-block;
    transition: none;
}

.scramble-char.decoding {
    color: var(--primary-color);
    opacity: 0.7;
}

body.terminal-mode .scramble-char.decoding {
    color: #666;
}

/* ========================================
   STAGGERED SKILL TAGS
======================================== */
.skill-tag.stagger-hidden {
    opacity: 0;
    transform: translateY(10px) scale(0.9);
}

.skill-tag.stagger-reveal {
    animation: staggerPop 0.3s ease forwards;
}

@keyframes staggerPop {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.exp-highlights li.stagger-hidden {
    opacity: 0;
    transform: translateX(-15px);
}

.exp-highlights li.stagger-reveal {
    animation: staggerSlideIn 0.3s ease forwards;
}

@keyframes staggerSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   PARTICLE CHAOS EASTER EGG
======================================== */
.particle-chaos-btn {
    position: absolute;
    bottom: 30px;
    right: 30px;
    padding: 8px 14px;
    font-size: 0.85rem;
    border: 2px solid rgba(255, 100, 100, 0.4);
    border-radius: 20px;
    background: rgba(255, 100, 100, 0.1);
    color: rgba(255, 100, 100, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 100;
    animation: chaosButtonPulse 2s ease-in-out infinite;
}

@keyframes chaosButtonPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 100, 100, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 100, 100, 0.7);
        transform: scale(1.08);
    }
}

.particle-chaos-btn:hover {
    background: rgba(255, 100, 100, 0.2);
    border-color: rgba(255, 100, 100, 0.7);
    color: rgba(255, 100, 100, 0.9);
    transform: scale(1.12);
    box-shadow: 0 0 25px rgba(255, 100, 100, 0.8);
    animation: none;
}

.particle-chaos-btn:active {
    transform: scale(0.95);
}

/* Particles */
.chaos-particle {
    position: fixed;
    pointer-events: none;
    font-size: 1.5rem;
    z-index: 999;
}

@keyframes particleExplode {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0) rotate(360deg);
    }
}

.chaos-particle.exploding {
    animation: particleExplode 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Shatter Fragments */
.shatter-fragment {
    backface-visibility: hidden;
    will-change: transform, opacity;
}

.shatter-fragment.shatter-animate {
    animation: shatterFly var(--duration, 1.2s) cubic-bezier(0.23, 1, 0.32, 1) var(--delay, 0s) forwards;
}

@keyframes shatterFly {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
    }
    30% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(var(--scale, 0));
        opacity: 0;
    }
}

/* Confetti Pieces */
.confetti-piece {
    will-change: transform, opacity;
    text-shadow: 0 0 4px currentColor;
}

.confetti-piece.confetti-animate {
    animation: confettiFly var(--duration, 1.5s) cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes confettiFly {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
    }
    20% {
        opacity: 1;
    }
    60% {
        opacity: 0.8;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.3);
        opacity: 0;
    }
}

/* Popup Styles */
.particle-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(255, 100, 100, 0.95), rgba(255, 150, 150, 0.95));
    padding: 40px;
    border-radius: 20px;
    border: 2px solid rgba(255, 200, 200, 0.5);
    backdrop-filter: blur(10px);
    z-index: 10000;
    text-align: center;
    box-shadow: 0 20px 60px rgba(255, 100, 100, 0.4), 0 0 40px rgba(255, 100, 100, 0.3);
    animation: popupSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 500px;
    width: 90%;
}

@keyframes popupSlideIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.particle-popup h2 {
    color: white;
    margin: 0 0 15px 0;
    font-size: 1.8rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.particle-popup p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 25px 0;
    font-size: 1rem;
    line-height: 1.6;
}

.particle-popup-btn {
    padding: 12px 30px;
    font-size: 1rem;
    border: 2px solid white;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.particle-popup-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.particle-popup-btn:active {
    transform: scale(0.95);
}

.particle-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========================================
   SKILL BAR RACE EASTER EGG
======================================== */
.skill-race-btn {
    display: inline-block;
    margin-bottom: 0.5rem;
    padding: 10px 22px;
    font-size: 0.9rem;
    font-weight: 700;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    background: transparent;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    animation: raceButtonPulse 2.5s ease-in-out infinite;
}

@keyframes raceButtonPulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(99, 102, 241, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
    }
}

.skill-race-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
    animation: none;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

.skill-race-btn:active {
    transform: scale(0.95);
}

.skill-race-btn.racing {
    background: var(--primary-color);
    color: white;
    animation: none;
    pointer-events: none;
    opacity: 0.7;
}

/* Race Overlay */
.race-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease;
    padding: 20px;
    overflow-y: auto;
}

.race-container {
    width: 90%;
    max-width: 800px;
    animation: raceSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes raceSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.race-header {
    text-align: center;
    margin-bottom: 30px;
}

.race-header h2 {
    color: white;
    font-size: 2rem;
    margin: 0 0 8px 0;
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.race-header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin: 0;
}

.race-countdown {
    text-align: center;
    font-size: 5rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 0 40px rgba(99, 102, 241, 0.8);
    animation: countdownPulse 0.5s ease;
}

@keyframes countdownPulse {
    0% {
        transform: scale(1.5);
        opacity: 0;
    }
    50% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Race Lanes */
.race-lane {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    gap: 12px;
}

.race-label {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 160px;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.race-track {
    flex: 1;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.race-bar {
    height: 100%;
    width: 0%;
    border-radius: 16px;
    position: relative;
    transition: width 0.1s linear;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
}

.race-bar-inner {
    height: 100%;
    width: 100%;
    border-radius: 16px;
    background: linear-gradient(90deg, var(--bar-color), var(--bar-color-light));
    box-shadow: 0 0 15px var(--bar-color);
    position: relative;
    overflow: hidden;
}

.race-bar-inner::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: raceShimmer 1s linear infinite;
}

@keyframes raceShimmer {
    from {
        left: -50%;
    }
    to {
        left: 150%;
    }
}

.race-runner {
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    z-index: 2;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5));
}

.race-percent {
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 40px;
    text-align: left;
}

/* Winner announcement */
.race-winner {
    text-align: center;
    margin-top: 25px;
    animation: winnerBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes winnerBounce {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.race-winner h3 {
    color: #feca57;
    font-size: 1.8rem;
    margin: 0 0 8px 0;
    text-shadow: 0 0 20px rgba(254, 202, 87, 0.5);
}

.race-winner p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin: 0 0 20px 0;
}

.race-close-btn {
    padding: 12px 35px;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.race-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

@media (max-width: 600px) {
    .race-label {
        min-width: 100px;
        font-size: 0.75rem;
    }
    .race-track {
        height: 26px;
    }
    .race-header h2 {
        font-size: 1.5rem;
    }
}