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

:root {
  /* Brand: Royal Blue + Golden Amber from CSF logo */
  --color-primary: #1e7bc4;
  --color-primary-dark: #1565a8;
  --color-primary-light: #eef6fd;
  --color-primary-mid: #d6eaf8;
  --color-accent: #c9960c;
  --color-accent-light: #fdf6e3;
  --color-accent-mid: #f5e0a0;
  /* Warm neutrals */
  --color-bg: #faf9f7;
  --color-surface: #ffffff;
  --color-surface-warm: #fdf8f2;
  --color-border: #e5e0d8;
  --color-border-hover: #cec8be;
  --color-text: #1a1a2e;
  --color-text-secondary: #4a5568;
  --color-text-muted: #9ca3af;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.03);
  --shadow-md: 0 4px 16px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.09), 0 4px 8px rgba(0,0,0,.04);
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nav-height: 64px;
  --max-width: 1200px;
  --transition: 0.18s ease;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--color-bg); color: var(--color-text); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.25; color: var(--color-text); }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.875rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p { color: var(--color-text-secondary); }

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.page-content { flex: 1; padding: 2rem 0 4rem; }

/* ===== Navigation ===== */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--color-border); box-shadow: 0 1px 0 var(--color-border); height: var(--nav-height); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.nav-brand { display: flex; align-items: center; gap: 0.625rem; font-weight: 800; font-size: 1.05rem; color: var(--color-text); text-decoration: none; }
.nav-brand:hover { text-decoration: none; }
.nav-brand-icon { height: 36px; width: auto; display: block; border-radius: 0; background: none; box-shadow: none; }
.nav-links { display: flex; align-items: center; gap: 0.125rem; list-style: none; }
.nav-links a { display: block; padding: 0.5rem 0.875rem; border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 500; color: var(--color-text-secondary); transition: background var(--transition), color var(--transition); text-decoration: none; }
.nav-links a:hover, .nav-links a.active { background: var(--color-primary-light); color: var(--color-primary); text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; border-radius: var(--radius-sm); color: var(--color-text-secondary); }
.nav-toggle:hover { background: var(--color-bg); }
.nav-toggle svg { display: block; }

@media (max-width: 640px) {
  .nav-toggle { display: flex; align-items: center; }
  .nav-links { display: none; position: absolute; top: var(--nav-height); left: 0; right: 0; background: var(--color-surface); border-bottom: 1px solid var(--color-border); flex-direction: column; padding: 0.75rem 1.25rem 1rem; gap: 0.125rem; box-shadow: var(--shadow-md); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.625rem 0.875rem; }
}

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.625rem 1.375rem; border-radius: var(--radius-xl); font-size: 0.9rem; font-weight: 600; cursor: pointer; border: none; transition: background var(--transition), box-shadow var(--transition), transform var(--transition); text-decoration: none; white-space: nowrap; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--color-primary); color: #fff; box-shadow: 0 2px 10px rgba(30,123,196,.3); }
.btn-primary:hover { background: var(--color-primary-dark); box-shadow: 0 4px 16px rgba(30,123,196,.4); }
.btn-secondary { background: var(--color-surface); color: var(--color-text); border: 1.5px solid var(--color-border); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-light); }
.btn-outline { background: transparent; color: var(--color-primary); border: 1.5px solid var(--color-primary); }
.btn-outline:hover { background: var(--color-primary-light); }
.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8rem; border-radius: var(--radius-md); }
.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; }

/* ===== Cards ===== */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition); }
.card:hover { box-shadow: var(--shadow-md); border-color: var(--color-border-hover); transform: translateY(-2px); }
.card-link { display: block; text-decoration: none; color: inherit; }
.card-link:hover { text-decoration: none; }

/* ===== Badges ===== */
.badge { display: inline-flex; align-items: center; padding: 0.2rem 0.7rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.01em; }
.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-green  { background: #dcfce7; color: #15803d; }
.badge-purple { background: #f3e8ff; color: #7e22ce; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-gray   { background: #f5f5f4; color: #57534e; }
.badge-teal   { background: #ccfbf1; color: #0f766e; }
.badge-pink   { background: #fce7f3; color: #be185d; }

/* ===== Search & Filters ===== */
.search-bar { position: relative; flex: 1; min-width: 0; }
.search-bar input { width: 100%; padding: 0.625rem 1rem 0.625rem 2.75rem; border: 1.5px solid var(--color-border); border-radius: var(--radius-xl); font-size: 0.9rem; background: var(--color-surface); color: var(--color-text); transition: border-color var(--transition), box-shadow var(--transition); outline: none; }
.search-bar input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(30,123,196,.12); }
.search-bar .search-icon { position: absolute; left: 0.875rem; top: 50%; transform: translateY(-50%); color: var(--color-text-muted); pointer-events: none; }
.filter-select { padding: 0.625rem 1rem; border: 1.5px solid var(--color-border); border-radius: var(--radius-xl); font-size: 0.875rem; background: var(--color-surface); color: var(--color-text); cursor: pointer; outline: none; transition: border-color var(--transition); }
.filter-select:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(30,123,196,.12); }
.controls-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 1.5rem; }

/* ===== Accordion ===== */
.accordion { border: 1.5px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.accordion-item { border-bottom: 1px solid var(--color-border); }
.accordion-item:last-child { border-bottom: none; }
.accordion-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.375rem; background: var(--color-surface); border: none; cursor: pointer; font-size: 0.95rem; font-weight: 600; color: var(--color-text); text-align: left; transition: background var(--transition); gap: 1rem; }
.accordion-trigger:hover { background: var(--color-bg); }
.accordion-trigger[aria-expanded="true"] { background: var(--color-primary-light); color: var(--color-primary); }
.accordion-icon { flex-shrink: 0; transition: transform var(--transition); }
.accordion-trigger[aria-expanded="true"] .accordion-icon { transform: rotate(180deg); }
.accordion-body { display: none; padding: 1rem 1.375rem 1.375rem; background: var(--color-bg); }
.accordion-body.open { display: block; }
.accordion-body ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.accordion-body ul li { display: flex; align-items: flex-start; gap: 0.625rem; font-size: 0.9rem; color: var(--color-text-secondary); }
.accordion-body ul li::before { content: ''; flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, #1e7bc4, #c9960c); margin-top: 0.42rem; }

/* ===== Breadcrumb ===== */
.breadcrumb { display: flex; align-items: center; gap: 0.375rem; font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 1.5rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--color-text-secondary); }
.breadcrumb a:hover { color: var(--color-primary); text-decoration: none; }
.breadcrumb-sep { color: var(--color-text-muted); }
.breadcrumb-current { color: var(--color-text); font-weight: 600; }

/* ===== Page Header ===== */
.page-header { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1.5px solid var(--color-border); }
.page-header h1 { margin-bottom: 0.5rem; }
.page-header p { font-size: 1.05rem; max-width: 640px; }

/* ===== States ===== */
.state-box { text-align: center; padding: 4rem 2rem; color: var(--color-text-muted); }
.state-box svg { margin: 0 auto 1rem; opacity: 0.35; }
.state-box h3 { color: var(--color-text-secondary); margin-bottom: 0.375rem; }
.state-box p { font-size: 0.9rem; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--color-border); border-top-color: var(--color-primary); border-radius: 50%; animation: spin 0.7s linear infinite; margin: 0 auto 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.results-count { font-size: 0.85rem; margin-bottom: 1rem; background: var(--color-accent-light); color: var(--color-accent); border: 1px solid var(--color-accent-mid); display: inline-block; padding: 0.2rem 0.75rem; border-radius: 999px; font-weight: 600; }

/* ===== Grid ===== */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
@media (max-width: 480px) { .grid-cards { grid-template-columns: 1fr; } }

/* ===== Skill Card ===== */
.skill-card { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; cursor: pointer; }
.skill-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.skill-card-title { font-size: 1rem; font-weight: 700; color: var(--color-text); line-height: 1.35; }
.skill-card-summary { font-size: 0.875rem; color: var(--color-text-secondary); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.skill-card-meta { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: auto; }
.skill-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 0.875rem; border-top: 1px solid var(--color-border); font-size: 0.8rem; color: var(--color-text-muted); }
.skill-card-footer .arrow { color: var(--color-primary); font-size: 1.1rem; transition: transform var(--transition); }
.card:hover .skill-card-footer .arrow { transform: translateX(5px); }

/* ===== Hero ===== */
.hero { background: linear-gradient(135deg, #0d4f8c 0%, #1e7bc4 45%, #2d9cdb 75%, #c9960c 100%); color: #fff; padding: 5.5rem 0 4.5rem; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 50%, rgba(255,255,255,.07) 0%, transparent 60%); }
.hero::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 56px; background: var(--color-bg); clip-path: ellipse(55% 100% at 50% 100%); }
.hero-inner { position: relative; z-index: 1; max-width: 680px; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 0.35rem 1rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 1.25rem; color: rgba(255,255,255,.95); }
.hero h1 { color: #fff; margin-bottom: 1rem; font-size: clamp(2rem, 5vw, 3rem); text-shadow: 0 2px 12px rgba(0,0,0,.15); }
.hero p { color: rgba(255,255,255,.88); font-size: 1.1rem; margin-bottom: 2.25rem; max-width: 540px; line-height: 1.7; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.875rem; }
.btn-hero-primary { background: #fff; color: var(--color-primary-dark); font-weight: 700; box-shadow: 0 4px 20px rgba(0,0,0,.18); border-radius: var(--radius-xl); }
.btn-hero-primary:hover { background: #eef6fd; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.22); }
.btn-hero-secondary { background: rgba(255,255,255,.15); color: #fff; border: 1.5px solid rgba(255,255,255,.45); border-radius: var(--radius-xl); backdrop-filter: blur(8px); }
.btn-hero-secondary:hover { background: rgba(255,255,255,.25); }

/* ===== Feature Cards ===== */
.features-section { padding: 4rem 0; }
.features-section h2 { text-align: center; margin-bottom: 0.5rem; }
.features-section .section-sub { text-align: center; margin-bottom: 2.75rem; font-size: 1rem; }
.feature-card { padding: 1.875rem; display: flex; flex-direction: column; gap: 0.875rem; }
.feature-icon { width: 52px; height: 52px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; background: var(--color-primary-light); }
.feature-card h3 { font-size: 1.05rem; }
.feature-card p { font-size: 0.875rem; line-height: 1.65; }

/* ===== Stats ===== */
.stats-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.5rem; }
.stat-card { flex: 1; min-width: 140px; padding: 1.375rem 1.5rem; text-align: center; background: var(--color-surface); border: 1.5px solid var(--color-border); border-radius: var(--radius-md); }
.stat-value { font-size: 2.25rem; font-weight: 800; background: linear-gradient(135deg, #1e7bc4, #c9960c); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1; margin-bottom: 0.3rem; }
.stat-label { font-size: 0.78rem; color: var(--color-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

/* ===== Skill Detail ===== */
.skill-detail-header { background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent-light)); border: 1.5px solid var(--color-primary-mid); border-radius: var(--radius-lg); padding: 2rem; margin-bottom: 1.5rem; box-shadow: var(--shadow-sm); }
.skill-detail-header h1 { margin-bottom: 0.75rem; }
.skill-detail-header p { font-size: 1rem; margin-bottom: 1rem; }
.skill-meta-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.related-roles-section, .tags-section { margin-top: 1.5rem; }
.related-roles-section h4, .tags-section h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--color-text-muted); margin-bottom: 0.5rem; font-weight: 700; }
.tags-list { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.section-card { background: var(--color-surface); border: 1.5px solid var(--color-border); border-radius: var(--radius-md); padding: 1.625rem; margin-bottom: 1.25rem; box-shadow: var(--shadow-sm); }
.section-card h2 { font-size: 1.1rem; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1.5px solid var(--color-border); }

/* ===== Career Map Table ===== */
.career-map-controls { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 1.25rem; }
.table-wrapper { background: var(--color-surface); border: 1.5px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); overflow: hidden; }
.table-scroll { overflow-x: auto; max-height: calc(100vh - 260px); overflow-y: auto; }
.career-table { border-collapse: collapse; width: 100%; min-width: 700px; font-size: 0.85rem; }
.career-table th, .career-table td { border: 1px solid var(--color-border); padding: 0.625rem 0.875rem; text-align: left; vertical-align: top; }
.career-table thead th { background: linear-gradient(135deg, #1565a8, #1e7bc4); color: #fff; font-weight: 600; font-size: 0.8rem; white-space: nowrap; position: sticky; top: 0; z-index: 3; }
.career-table thead tr:nth-child(2) th { background: linear-gradient(135deg, #1e7bc4, #2d9cdb); font-size: 0.78rem; top: 37px; }
.career-table tbody td:first-child { position: sticky; left: 0; z-index: 2; background: var(--color-surface-warm); font-weight: 700; white-space: nowrap; min-width: 100px; border-right: 2px solid var(--color-border); }
.career-table thead tr:nth-child(1) th:first-child { position: sticky; left: 0; z-index: 4; background: #1565a8; font-weight: 700; white-space: nowrap; min-width: 100px; }
.career-table thead tr:nth-child(2) th:first-child { background: #1e7bc4; z-index: 4; }
.career-table tbody tr:hover td { background: var(--color-primary-light); }
.career-table tbody tr:hover td:first-child { background: var(--color-primary-mid); }
.role-pill { display: inline-block; background: var(--color-primary-light); color: var(--color-primary-dark); border-radius: 999px; padding: 0.2rem 0.625rem; font-size: 0.75rem; font-weight: 600; margin: 0.15rem 0.15rem 0.15rem 0; white-space: nowrap; text-decoration: none; border: 1px solid var(--color-primary-mid); }
a.role-pill-link { cursor: pointer; text-decoration: none; transition: background var(--transition), color var(--transition), border-color var(--transition); }
a.role-pill-link:hover { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }

/* ===== Mobile Career Map Cards ===== */
.career-map-cards { display: none; }
@media (max-width: 767px) { .career-map-cards { display: block; } .table-wrapper { display: none; } }
.level-card { background: var(--color-surface); border: 1.5px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); margin-bottom: 1rem; overflow: hidden; }
.level-card-header { background: linear-gradient(135deg, #1565a8, #1e7bc4); color: #fff; padding: 0.875rem 1.375rem; font-weight: 700; font-size: 0.95rem; }
.level-card-body { padding: 1rem 1.375rem; }
.track-group { margin-bottom: 1rem; }
.track-group:last-child { margin-bottom: 0; }
.track-group-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--color-text-muted); margin-bottom: 0.5rem; }
.dept-group { margin-bottom: 0.625rem; }
.dept-group-title { font-size: 0.8rem; font-weight: 600; color: var(--color-text-secondary); margin-bottom: 0.3rem; }
.dept-roles { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.show-more-btn { background: none; border: none; color: var(--color-primary); font-size: 0.8rem; font-weight: 600; cursor: pointer; padding: 0.25rem 0; margin-top: 0.5rem; display: flex; align-items: center; gap: 0.25rem; }
.show-more-btn:hover { text-decoration: underline; }
.collapsible-content { overflow: hidden; transition: max-height 0.3s ease; }
.collapsible-content.collapsed { max-height: 120px; }

/* ===== Pagination ===== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 0.375rem; margin-top: 2rem; flex-wrap: wrap; }
.page-btn { min-width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text-secondary); font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: all var(--transition); }
.page-btn:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-light); }
.page-btn.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; box-shadow: 0 2px 8px rgba(30,123,196,.3); }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ===== Footer ===== */
.footer { background: var(--color-surface-warm); border-top: 1.5px solid var(--color-border); padding: 1.75rem 0; margin-top: auto; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; font-size: 0.85rem; color: var(--color-text-muted); }

/* ===== About Page ===== */
.about-section { max-width: 760px; }
.about-section h2 { margin-bottom: 0.75rem; }
.about-section p { margin-bottom: 1rem; }
.methodology-step { display: flex; gap: 1.125rem; margin-bottom: 1.5rem; }
.step-num { flex-shrink: 0; width: 38px; height: 38px; background: linear-gradient(135deg, #1e7bc4, #c9960c); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.875rem; box-shadow: 0 2px 8px rgba(30,123,196,.3); }
.step-content h4 { margin-bottom: 0.25rem; }
.step-content p { font-size: 0.9rem; }

/* ===== Utility ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
