/* =========================================================
   WILL ROBOTS TAKE MY JOB? — Modern Lightweight Stylesheet
   Pure CSS3 with CSS Custom Properties, Dark Mode, & RTL
   ========================================================= */

:root {
    /* Color Palette - Light Theme */
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffffff;
    --bg-subtle: #f1f5f9;
    --bg-input: #ffffff;
    --border-color: #e2e8f0;
    --border-subtle: #edf2f7;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;
    
    /* Brand Accent */
    --brand-primary: #2563eb;
    --brand-hover: #1d4ed8;
    --brand-light: #eff6ff;
    --brand-ring: rgba(37, 99, 235, 0.2);
    
    /* Risk Levels */
    --risk-low: #10b981;
    --risk-low-bg: #ecfdf5;
    --risk-mod: #f59e0b;
    --risk-mod-bg: #fffbeb;
    --risk-high: #f97316;
    --risk-high-bg: #fff7ed;
    --risk-crit: #ef4444;
    --risk-crit-bg: #fef2f2;
    
    /* Metrics Accents */
    --metric-impact: #8b5cf6;
    --metric-human: #06b6d4;
    --metric-demand: #10b981;
    
    /* Typography & Spacing */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --container-max: 1200px;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --bg-page: #0b1120;
    --bg-surface: #1e293b;
    --bg-surface-elevated: #283548;
    --bg-subtle: #172033;
    --bg-input: #151e2e;
    --border-color: #334155;
    --border-subtle: #243042;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    
    --brand-primary: #3b82f6;
    --brand-hover: #60a5fa;
    --brand-light: #1e3a8a33;
    --brand-ring: rgba(59, 130, 246, 0.3);
    
    --risk-low-bg: #064e3b33;
    --risk-mod-bg: #78350f33;
    --risk-high-bg: #7c2d1233;
    --risk-crit-bg: #7f1d1d33;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* RTL Layout Configuration */
[dir="rtl"] {
    text-align: right;
}
[dir="rtl"] .search-icon {
    left: auto;
    right: 20px;
}
[dir="rtl"] .search-input {
    padding-left: 20px;
    padding-right: 56px;
}
[dir="rtl"] .badge-icon {
    margin-right: 0;
    margin-left: 6px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--brand-hover);
}

img, svg {
    display: block;
    max-width: 100%;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: 1rem;
    color: inherit;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Header & Navigation */
.site-header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    transition: var(--transition);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #2563eb, #8b5cf6);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

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

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--brand-primary);
    background-color: var(--brand-light);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--bg-subtle);
    border-color: var(--text-subtle);
}

.hamburger-btn {
    display: none;
}

/* Hero Section */
.hero-section {
    padding: 70px 0 50px;
    text-align: center;
    background: radial-gradient(circle at 50% 10%, var(--brand-light) 0%, transparent 60%);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--brand-light);
    color: var(--brand-primary);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--brand-ring);
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 18px;
    color: var(--text-main);
}

.hero-title .text-gradient {
    background: linear-gradient(135deg, var(--brand-primary), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 36px;
}

/* Live Search Box */
.search-wrapper {
    max-width: 640px;
    margin: 0 auto 20px;
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    position: relative;
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px var(--brand-ring), var(--shadow-xl);
}

.search-icon {
    position: absolute;
    left: 20px;
    color: var(--text-subtle);
    font-size: 1.3rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 18px 20px 18px 56px;
    border: none;
    background: transparent;
    font-size: 1.05rem;
    outline: none;
    color: var(--text-main);
}

.search-btn {
    margin-right: 8px;
    margin-left: 8px;
    padding: 12px 24px;
    background: var(--brand-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.search-btn:hover {
    background: var(--brand-hover);
    transform: translateY(-1px);
}

/* Autocomplete Dropdown */
.autocomplete-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-height: 380px;
    overflow-y: auto;
    z-index: 99;
    display: none;
    text-align: left;
}

.autocomplete-results.active {
    display: block;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-main);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover, .autocomplete-item.selected {
    background-color: var(--bg-subtle);
}

.autocomplete-item .job-title {
    font-weight: 600;
    font-size: 0.98rem;
}

.autocomplete-item .job-cat {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Popular Suggestions Pills */
.popular-suggestions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 18px;
}

.suggestion-pill {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    color: var(--text-main);
    font-weight: 500;
    transition: var(--transition);
}

.suggestion-pill:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: var(--brand-light);
}

/* Risk Badges */
.badge-risk {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.85rem;
}

.badge-risk-low {
    background-color: var(--risk-low-bg);
    color: var(--risk-low);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-risk-moderate {
    background-color: var(--risk-mod-bg);
    color: var(--risk-mod);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-risk-high {
    background-color: var(--risk-high-bg);
    color: var(--risk-high);
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.badge-risk-critical {
    background-color: var(--risk-crit-bg);
    color: var(--risk-crit);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Stats Counter Grid */
.stats-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 40px 0;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--brand-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Section Common Layout */
.section {
    padding: 50px 0;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 4px;
}

/* Job Cards Grid */
.job-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.job-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.job-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-primary);
}

.job-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.job-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
    line-height: 1.3;
}

.job-card-cat {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.job-card-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.job-card-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: var(--bg-subtle);
    padding: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 0.8rem;
}

.metric-item span {
    display: block;
    color: var(--text-muted);
}
.metric-item strong {
    color: var(--text-main);
    font-size: 0.95rem;
}

.job-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

.view-link {
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* =========================================================
   JOB DETAIL PAGE
   ========================================================= */
.job-hero {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 40px 0 50px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-subtle);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-muted);
}
.breadcrumb a:hover {
    color: var(--brand-primary);
}

.job-hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 40px;
    align-items: center;
}

.job-header-info h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.job-category-tag {
    display: inline-block;
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.job-lead-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Big Risk Gauge Card */
.risk-gauge-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-xl);
    text-align: center;
    position: relative;
}

.gauge-meter-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gauge-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.gauge-bg-circle {
    fill: none;
    stroke: var(--bg-subtle);
    stroke-width: 12;
}

.gauge-bar-circle {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.2s ease;
}

.gauge-center-text {
    position: absolute;
    text-align: center;
}

.gauge-score {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
}

.gauge-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Metric Bars Triad */
.metrics-triad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 32px 0;
}

.metric-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.metric-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.metric-box-val {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.progress-bar-bg {
    background: var(--bg-subtle);
    height: 8px;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 1s ease;
}

/* Two-column Comparison & Content Cards */
.analysis-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 32px 0;
}

.content-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.content-card-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-main);
}

.task-icon-ai {
    color: var(--risk-crit);
    font-size: 1.1rem;
    line-height: 1.4;
}

.task-icon-human {
    color: var(--risk-low);
    font-size: 1.1rem;
    line-height: 1.4;
}

.skills-pill-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.skill-pill {
    background: var(--brand-light);
    color: var(--brand-primary);
    border: 1px solid var(--brand-ring);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Disclaimer Callout */
.disclaimer-callout {
    background: var(--bg-subtle);
    border-left: 4px solid var(--brand-primary);
    padding: 16px 20px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 32px 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* =========================================================
   COMPARE JOBS PAGE
   ========================================================= */
.compare-selectors {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: 36px;
}

.select-wrapper {
    position: relative;
}

.job-select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-input);
    color: var(--text-main);
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.job-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-ring);
}

.vs-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #ffffff;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.compare-matrix-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.compare-matrix-table th, .compare-matrix-table td {
    padding: 18px 24px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.compare-matrix-table th {
    background: var(--bg-subtle);
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.05rem;
}

.compare-matrix-table tr:last-child td {
    border-bottom: none;
}

.factor-name {
    font-weight: 600;
    color: var(--text-muted);
    width: 25%;
}

/* =========================================================
   CALCULATOR PAGE
   ========================================================= */
.calculator-card {
    max-width: 760px;
    margin: 0 auto;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 36px;
    box-shadow: var(--shadow-lg);
}

.calc-step {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.calc-question {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-main);
}

.calc-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.calc-option-label {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-subtle);
    border: 2px solid transparent;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.calc-option-label:hover {
    border-color: var(--brand-ring);
    background: var(--brand-light);
}

.calc-option-label input[type="radio"]:checked + span {
    color: var(--brand-primary);
    font-weight: 700;
}

.calc-option-label:has(input[type="radio"]:checked) {
    border-color: var(--brand-primary);
    background: var(--brand-light);
}

.calc-result-box {
    display: none;
    margin-top: 32px;
    padding: 32px;
    border-radius: var(--radius-lg);
    background: var(--bg-subtle);
    border: 2px solid var(--brand-primary);
    text-align: center;
}

.calc-result-box.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* Footer */
.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 12px;
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text-main);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-subtle);
    font-size: 0.875rem;
    flex-wrap: wrap;
    gap: 16px;
}

/* Modals for Languages & Countries */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    max-width: 560px;
    width: 100%;
    padding: 28px;
    box-shadow: var(--shadow-xl);
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 800;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-grid-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.modal-item-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.modal-item-link:hover, .modal-item-link.current {
    background: var(--brand-light);
    color: var(--brand-primary);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* Mobile Responsive Breakpoints */
@media (max-width: 900px) {
    .job-hero-grid {
        grid-template-columns: 1fr;
    }
    .metrics-triad {
        grid-template-columns: 1fr;
    }
    .analysis-cards-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .compare-selectors {
        grid-template-columns: 1fr;
    }
    .vs-badge {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }
    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg-surface);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
        gap: 16px;
        display: none;
        box-shadow: var(--shadow-lg);
    }
    .nav-menu.active {
        display: flex;
    }
    .nav-link {
        width: 100%;
        padding: 10px 16px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .calc-options-grid {
        grid-template-columns: 1fr;
    }
    .modal-grid-options {
        grid-template-columns: 1fr;
    }
}
