/* ============================================
   RankRecruit — Complete Stylesheet
   Dark Mode + Animations + Glassmorphism
   ============================================ */

/* === CSS Variables (Light Theme) === */
:root,
[data-theme="light"] {
    --bg-primary: #f8f9ff;
    --bg-secondary: #f0f2ff;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-glass: linear-gradient(135deg, rgba(219, 234, 254, 0.5) 0%, rgba(237, 233, 254, 0.5) 50%, rgba(254, 226, 226, 0.2) 100%);
    --bg-glass-stats: linear-gradient(135deg, rgba(219, 234, 254, 0.5) 0%, rgba(224, 221, 255, 0.4) 100%);
    --border-glass: rgba(147, 197, 253, 0.35);
    --border-light: rgba(200, 210, 240, 0.5);
    --border-card: rgba(200, 210, 240, 0.4);
    --text-primary: #1a1a2e;
    --text-secondary: #374151;
    --text-muted: #9ca3af;
    --text-faint: #c0c7d1;
    --accent: #0f3460;
    --accent-light: #3a86ff;
    --accent-bg: rgba(15, 52, 96, 0.06);
    --shadow-sm: 0 8px 32px rgba(15, 52, 96, 0.06);
    --shadow-lg: 0 16px 48px rgba(15, 52, 96, 0.1);
    --navbar-bg: rgba(248, 249, 255, 0.85);
    --skeleton-bg: #e4e7f5;
    --skeleton-shine: #f0f2ff;
    --glow-1: rgba(99, 102, 241, 0.12);
    --glow-2: rgba(59, 130, 246, 0.10);
    --glow-3: rgba(168, 85, 247, 0.08);
    --glow-4: rgba(236, 72, 153, 0.06);
}

/* === Dark Theme === */
[data-theme="dark"] {
    --bg-primary: #0a0e1a;
    --bg-secondary: #12162a;
    --bg-card: rgba(18, 22, 42, 0.85);
    --bg-glass: linear-gradient(135deg, rgba(30, 58, 95, 0.45) 0%, rgba(40, 25, 70, 0.35) 50%, rgba(25, 35, 55, 0.5) 100%);
    --bg-glass-stats: linear-gradient(135deg, rgba(30, 58, 95, 0.5) 0%, rgba(40, 25, 80, 0.3) 100%);
    --border-glass: rgba(58, 134, 255, 0.25);
    --border-light: rgba(40, 50, 80, 0.6);
    --border-card: rgba(40, 50, 80, 0.5);
    --text-primary: #e6edf3;
    --text-secondary: #c9d1d9;
    --text-muted: #8b949e;
    --text-faint: #484f58;
    --accent: #58a6ff;
    --accent-light: #79c0ff;
    --accent-bg: rgba(88, 166, 255, 0.12);
    --shadow-sm: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --navbar-bg: rgba(10, 14, 26, 0.92);
    --skeleton-bg: #1a1e35;
    --skeleton-shine: #252a45;
    --glow-1: rgba(99, 102, 241, 0.08);
    --glow-2: rgba(59, 130, 246, 0.06);
    --glow-3: rgba(168, 85, 247, 0.06);
    --glow-4: rgba(236, 72, 153, 0.04);
}

/* === Reset & Base === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    transition: background 0.4s ease, color 0.4s ease;
}

/* === Animated Gradient Mesh Background === */
@keyframes gradientShift {

    0%,
    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    25% {
        transform: translate(-2%, 2%) scale(1.05) rotate(1deg);
    }

    50% {
        transform: translate(2%, -1%) scale(1) rotate(0deg);
    }

    75% {
        transform: translate(-1%, -2%) scale(1.05) rotate(-1deg);
    }
}

@keyframes orbFloat1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

@keyframes orbFloat2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-40px, 30px) scale(1.05);
    }

    66% {
        transform: translate(25px, -40px) scale(0.98);
    }
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: -2;
    background:
        radial-gradient(ellipse at 20% 20%, var(--glow-1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, var(--glow-2) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, var(--glow-3) 0%, transparent 50%),
        radial-gradient(ellipse at 10% 70%, var(--glow-4) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 60%, var(--glow-2) 0%, transparent 40%);
    animation: gradientShift 20s ease-in-out infinite;
    pointer-events: none;
    will-change: transform;
}

body::after {
    content: '';
    position: fixed;
    top: 10%;
    right: -5%;
    width: 500px;
    height: 500px;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow-1) 0%, transparent 70%);
    animation: orbFloat1 15s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.7;
    will-change: transform;
}

#app::before {
    content: '';
    position: fixed;
    bottom: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow-3) 0%, transparent 70%);
    animation: orbFloat2 18s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.6;
    will-change: transform;
}


/* === Three.js Canvas === */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* === Confetti Canvas === */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
}

/* =============================================
   STICKY NAVBAR
   ============================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 24px;
    height: 56px;
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.4s ease,
        border-color 0.4s ease;
}

.navbar.visible {
    transform: translateY(0);
    opacity: 1;
    border-bottom-color: var(--border-light);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.nav-logo .accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dark-toggle {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1.5px solid var(--border-light);
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.dark-toggle:hover {
    border-color: var(--accent-light);
    color: var(--accent-light);
}

/* Toggle sun/moon icons */
[data-theme="light"] .icon-moon {
    display: none;
}

[data-theme="dark"] .icon-sun {
    display: none;
}

.nav-cta {
    padding: 8px 20px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(58, 134, 255, 0.3);
}

/* === App Container === */
#app {
    position: relative;
    z-index: 10;
}

/* === Sections === */
.section {
    display: none;
    padding: 40px 24px;
    max-width: 900px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.section.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 1;
    transform: translateY(0);
}

#upload-section.active {
    justify-content: flex-start;
    padding-top: 60px;
    min-height: auto;
}

/* Semi-transparent backdrop behind content for readability over 3D scene */
.hero,
.upload-grid,
.analyze-btn {
    position: relative;
    z-index: 2;
}

#processing-section.active,
#results-section.active {
    justify-content: center;
    min-height: 100vh;
}

/* === Page Transition === */
.section.fade-out {
    opacity: 0 !important;
    transform: translateY(-30px) !important;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.section.fade-in {
    animation: pageFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ringPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(58, 134, 255, 0.15);
    }

    50% {
        box-shadow: 0 0 0 20px rgba(58, 134, 255, 0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(6px);
    }
}

/* === Shimmer Animation for Tags === */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.shimmer {
    background: linear-gradient(90deg,
            var(--bg-secondary) 0%,
            var(--bg-secondary) 40%,
            rgba(58, 134, 255, 0.12) 50%,
            var(--bg-secondary) 60%,
            var(--bg-secondary) 100%);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

/* === Scroll Reveal === */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === HERO === */
.hero {
    text-align: center;
    margin-bottom: 48px;
    animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-badge {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 50px;
    background: var(--accent-bg);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    margin-bottom: 16px;
}

.hero-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 16px;
}

.hero-title .accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.6;
}

/* === UPLOAD GRID === */
.upload-grid {
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-width: 820px;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.upload-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}

.divider-line {
    width: 1px;
    flex: 1;
    background: linear-gradient(to bottom, transparent, var(--border-light), transparent);
}

.divider-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    margin: 12px 0;
}

/* === GLASS CARD === */
.glass-card {
    flex: 1;
    background: var(--bg-card);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border: 1px solid var(--border-glass);
    border-top: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    padding: 36px 28px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    border-top-color: rgba(99, 102, 241, 0.4);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

.glass-card.file-added {
    border-color: rgba(5, 150, 105, 0.3);
    border-top-color: rgba(5, 150, 105, 0.5);
}

[data-theme="light"] .glass-card.file-added {
    background: rgba(236, 253, 245, 0.6);
}

[data-theme="dark"] .glass-card.file-added {
    background: rgba(5, 150, 105, 0.12);
}

.card-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
    animation: float 3s ease-in-out infinite;
}

.card-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 2.5px;
    margin-bottom: 6px;
}

.card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.card-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 10px;
    border: 2px solid var(--border-light);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.file-name {
    margin-top: 12px;
    font-size: 0.85rem;
    color: #059669;
    font-weight: 500;
    min-height: 20px;
}

#jd-input {
    width: 100%;
    height: 160px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 14px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    color: var(--text-secondary);
    background: var(--bg-primary);
    resize: vertical;
    transition: all 0.3s ease;
    outline: none;
}

#jd-input:focus {
    border-color: var(--accent-light);
    box-shadow: 0 0 0 4px rgba(58, 134, 255, 0.1);
}

#jd-input::placeholder {
    color: var(--text-faint);
}

/* === ANALYZE BUTTON === */
.analyze-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 36px;
    padding: 16px 48px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 50%, #3a86ff 100%);
    background-size: 200% 200%;
    color: white;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 6px 20px rgba(15, 52, 96, 0.25), 0 0 40px rgba(58, 134, 255, 0.1);
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

[data-theme="dark"] .analyze-btn {
    background: linear-gradient(135deg, #1e3a5f 0%, #3a86ff 100%);
    box-shadow: 0 6px 20px rgba(58, 134, 255, 0.25);
}

.analyze-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(15, 52, 96, 0.3);
}

.analyze-btn:active {
    transform: translateY(0);
}

.analyze-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* === ERROR === */
.error-msg {
    margin-top: 16px;
    padding: 10px 20px;
    border-radius: 10px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.88rem;
    font-weight: 500;
    display: none;
    animation: fadeIn 0.4s ease;
}

[data-theme="dark"] .error-msg {
    background: rgba(220, 38, 38, 0.15);
    color: #fca5a5;
}

.error-msg.visible {
    display: block;
}

/* === SCROLL HINT === */
.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    animation: fadeIn 1.5s ease 0.8s both;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .scroll-hint {
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.scroll-hint svg {
    animation: bounce 2s ease-in-out infinite;
}

/* =============================================
   STATS BAR
   ============================================= */
.stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    width: 100%;
    max-width: 820px;
    padding: 44px 48px;
    margin: 40px 0 60px;
    background: var(--bg-glass-stats);
    border: 1px solid var(--border-glass);
    border-top: 2px solid rgba(99, 102, 241, 0.15);
    border-radius: 24px;
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    box-shadow: var(--shadow-sm), 0 0 60px rgba(99, 102, 241, 0.04);
}

.stat-item {
    text-align: center;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px;
}

.stat-number {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.stat-suffix {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent-light);
}

.stat-text {
    width: 100%;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: var(--border-light);
}

/* =============================================
   FEATURE ROWS
   ============================================= */
.feature-row {
    display: flex;
    align-items: center;
    gap: 60px;
    width: 100%;
    max-width: 860px;
    padding: 60px 0;
}

.feature-row.reverse {
    flex-direction: row-reverse;
}

.feature-illustration {
    flex: 0 0 320px;
    max-width: 320px;
}

.feature-illustration svg {
    width: 100%;
    height: auto;
}

/* Parallax container */
.parallax-container {
    transition: transform 0.15s ease-out;
}

.feature-text {
    flex: 1;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-left: 3px solid rgba(99, 102, 241, 0.25);
    border-radius: 24px;
    padding: 36px 32px;
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    box-shadow: var(--shadow-sm), 0 0 40px rgba(99, 102, 241, 0.03);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.feature-text:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(99, 102, 241, 0.06);
    border-left-color: rgba(99, 102, 241, 0.5);
}

.feature-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 50px;
    background: rgba(58, 134, 255, 0.08);
    color: var(--accent-light);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 14px;
}

[data-theme="dark"] .feature-badge {
    background: rgba(58, 134, 255, 0.15);
}

.feature-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.feature-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.feature-desc strong {
    color: var(--text-secondary);
    font-weight: 600;
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

/* =============================================
   HOW IT WORKS
   ============================================= */
.how-section {
    width: 100%;
    max-width: 860px;
    padding: 60px 48px 40px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-top: 2px solid rgba(168, 85, 247, 0.15);
    border-radius: 24px;
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    box-shadow: var(--shadow-sm), 0 0 60px rgba(168, 85, 247, 0.03);
    margin-top: 20px;
}

.how-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 48px;
    letter-spacing: -0.5px;
}

.how-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
}

.how-step {
    flex: 1;
    text-align: center;
    max-width: 220px;
}

.how-number {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.how-step h4 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.how-step p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.how-connector {
    font-size: 1.5rem;
    color: var(--border-light);
    margin-top: 30px;
    font-weight: 300;
}

/* =============================================
   BOTTOM CTA
   ============================================= */
.bottom-cta {
    text-align: center;
    padding: 60px 0 80px;
}

.bottom-cta p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-weight: 500;
}

/* =============================================
   PROCESSING
   ============================================= */
.process-container {
    text-align: center;
    animation: scaleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.process-ring {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 40px;
    animation: ringPulse 2s ease-in-out infinite;
}

.process-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

#progress-ring {
    transition: stroke-dashoffset 0.4s ease;
}

.process-pct {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
}

.process-labels {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.process-label {
    padding: 8px 24px;
    border-radius: 50px;
    background: var(--accent-bg);
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
}

.process-label.active {
    opacity: 1;
    transform: translateY(0);
    background: rgba(58, 134, 255, 0.12);
    color: var(--accent);
    font-weight: 600;
}

.process-label.done {
    opacity: 0.4;
    transform: translateY(0);
}

/* =============================================
   SKELETON LOADER
   ============================================= */
@keyframes skeletonPulse {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton-container {
    width: 100%;
    animation: fadeIn 0.4s ease;
}

.skeleton-row {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.skeleton-row:first-child {
    grid-template-columns: repeat(5, 1fr);
}

.skeleton-row:last-child {
    grid-template-columns: 1fr 1fr;
}

.skeleton-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 24px 16px;
}

.skeleton-card.wide {
    padding: 24px;
}

.skeleton-line {
    height: 14px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--skeleton-bg) 25%, var(--skeleton-shine) 50%, var(--skeleton-bg) 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
    margin-bottom: 10px;
}

.skeleton-line.w40 {
    width: 40%;
}

.skeleton-line.w60 {
    width: 60%;
}

.skeleton-line.w80 {
    width: 80%;
}

.skeleton-pills {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.skeleton-pill {
    width: 70px;
    height: 28px;
    border-radius: 50px;
    background: linear-gradient(90deg, var(--skeleton-bg) 25%, var(--skeleton-shine) 50%, var(--skeleton-bg) 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

/* =============================================
   RESULTS
   ============================================= */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1.5px solid var(--border-light);
    border-radius: 10px;
    background: var(--bg-primary);
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    animation: fadeIn 0.6s ease 0.2s both;
}

.back-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.results-hero {
    text-align: center;
    margin: 20px 0 40px;
    animation: scaleIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.results-badge {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.results-score {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 6rem;
    font-weight: 800;
    letter-spacing: -4px;
    line-height: 1;
    margin-bottom: 8px;
}

.results-quality {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* === METRICS ROW === */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    width: 100%;
    margin-bottom: 36px;
}

.metric-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-top: 2px solid rgba(59, 130, 246, 0.15);
    border-radius: 16px;
    padding: 20px 12px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    transform: translateY(20px);
}

.metric-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm), 0 0 30px rgba(59, 130, 246, 0.06);
}

.metric-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* === RESULTS CARDS === */
.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    margin-bottom: 16px;
}

.results-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 24px;
    animation: slideUp 0.6s ease both;
    box-shadow: var(--shadow-sm);
}

.results-card.full-width {
    width: 100%;
    margin-bottom: 16px;
}

.card-heading {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot-green {
    background: #059669;
}

.dot-red {
    background: #dc2626;
}

.dot-blue {
    background: #2563eb;
}

/* === PILLS === */
.pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pill {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 500;
    animation: fadeIn 0.4s ease both;
}

.pill-green {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.pill-red {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.pill-blue {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

[data-theme="dark"] .pill-green {
    background: rgba(5, 150, 105, 0.15);
    color: #6ee7b7;
    border-color: rgba(5, 150, 105, 0.3);
}

[data-theme="dark"] .pill-red {
    background: rgba(220, 38, 38, 0.15);
    color: #fca5a5;
    border-color: rgba(220, 38, 38, 0.3);
}

[data-theme="dark"] .pill-blue {
    background: rgba(37, 99, 235, 0.15);
    color: #93c5fd;
    border-color: rgba(37, 99, 235, 0.3);
}

.no-skills {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-style: italic;
}

/* === RECOMMENDATIONS === */
.section-heading {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.rec-item {
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent);
    border-radius: 0 12px 12px 0;
    padding: 14px 20px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    animation: slideUp 0.5s ease both;
}

/* === STATS EXPANDER === */
.stats-expander {
    width: 100%;
    margin-top: 24px;
    border: 1px solid var(--border-card);
    border-radius: 14px;
    overflow: hidden;
    animation: fadeIn 0.6s ease both;
}

.stats-expander summary {
    padding: 16px 20px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    background: var(--bg-secondary);
    transition: background 0.3s ease;
    list-style: none;
}

.stats-expander summary:hover {
    background: var(--bg-card);
}

.stats-expander summary::marker {
    display: none;
}

.stats-expander summary::-webkit-details-marker {
    display: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 20px;
}

.stat-group h4 {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.stat-line {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-line strong {
    color: var(--text-primary);
}

/* === CHARTS SECTION === */
#results-content {
    width: 100%;
}

.charts-section {
    width: 100%;
    margin: 24px 0 16px;
    animation: fadeIn 0.6s ease both;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 12px;
}

.chart-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-top: 2px solid rgba(99, 102, 241, 0.15);
    border-radius: 16px;
    padding: 24px;
    animation: slideUp 0.6s ease both;
}

.chart-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.chart-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 280px;
}

/* === GAP BARS === */
.gap-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    animation: slideUp 0.5s ease both;
}

.gap-bar-label {
    flex: 0 0 130px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
}

.gap-bar-track {
    flex: 1;
    height: 24px;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-card);
}

.gap-bar-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
}

.gap-bar-fill.excellent {
    background: linear-gradient(90deg, #059669, #34d399);
}

.gap-bar-fill.good {
    background: linear-gradient(90deg, #0ea5e9, #38bdf8);
}

.gap-bar-fill.fair {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.gap-bar-fill.poor {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.gap-bar-pct {
    font-size: 0.72rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.gap-bar-pct-outside {
    position: absolute;
    right: -36px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* === FOOTER === */
.footer {
    text-align: center;
    padding: 40px 0 20px;
    color: var(--text-faint);
    font-size: 0.78rem;
    letter-spacing: 0.3px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.8rem;
    }

    .upload-grid {
        flex-direction: column;
        gap: 20px;
    }

    .upload-divider {
        flex-direction: row;
        padding: 0;
    }

    .divider-line {
        height: 1px;
        width: auto;
    }

    .metrics-row {
        grid-template-columns: repeat(3, 1fr);
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .gap-bar-label {
        flex: 0 0 90px;
        font-size: 0.75rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .results-score {
        font-size: 4rem;
    }

    .feature-row,
    .feature-row.reverse {
        flex-direction: column;
        gap: 30px;
    }

    .feature-illustration {
        flex: none;
        max-width: 260px;
    }

    .feature-title {
        font-size: 1.6rem;
    }

    .stats-bar {
        flex-wrap: wrap;
        gap: 24px;
        padding: 32px 24px;
    }

    .stat-divider {
        display: none;
    }

    .how-steps {
        flex-direction: column;
        gap: 30px;
        align-items: center;
    }

    .how-connector {
        transform: rotate(90deg);
        margin: 0;
    }

    .how-section {
        padding: 40px 24px 30px;
    }

    .skeleton-row:first-child {
        grid-template-columns: repeat(3, 1fr);
    }

    .skeleton-row:last-child {
        grid-template-columns: 1fr;
    }
}