/* AI Career OS — Design System (Phase 1) */
:root {
  --bg: #0b1220;
  --bg-alt: #0f1830;
  --surface: #141d33;
  --surface-2: #1b2745;
  --border: #26324f;
  --text: #e7ecf5;
  --muted: #9aa8c4;
  --primary: #4f7cff;
  --primary-2: #6ea8ff;
  --accent: #22d3ee;
  --risk-high: #ff5d6c;
  --risk-mid: #ffb020;
  --risk-low: #33d69f;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --maxw: 1140px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--primary-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.6em; letter-spacing: -0.022em; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); }
img { max-width: 100%; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 62ch; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--primary); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #04122a; font-weight: 800; font-size: 0.9rem;
}
.brand-text { font-size: 1.05rem; }
.site-nav { margin-left: auto; }
.nav-list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; }
.nav-item > a {
  display: block; padding: 10px 14px; color: var(--muted); border-radius: 8px; font-size: 0.95rem;
  font-weight: 500; transition: 0.14s;
}
.nav-item > a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.nav-item.active > a {
  color: var(--primary-2); background: rgba(79, 124, 255, 0.16); font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(79, 124, 255, 0.35);
}
.nav-item.active > a:hover { background: rgba(79, 124, 255, 0.24); color: var(--primary-2); }
.nav-cta { margin-left: 6px; }
.nav-cta > a {
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; font-weight: 700;
  padding: 9px 18px; border-radius: 999px;
}
.nav-cta > a:hover { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 6px 18px rgba(79, 124, 255, 0.35); }
.nav-cta.active > a::after { display: none; }
.header-search input {
  width: 220px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 0.9rem;
}
.header-search input:focus { outline: 2px solid var(--primary); border-color: transparent; }
.nav-toggle { display: none; }

/* Hero */
.hero {
  padding: 72px 0 56px;
  background:
    radial-gradient(1000px 500px at 80% -10%, rgba(79, 124, 255, 0.22), transparent 60%),
    radial-gradient(800px 400px at 10% 0%, rgba(34, 211, 238, 0.14), transparent 55%);
}
.hero-eyebrow { color: var(--accent); font-weight: 700; letter-spacing: 0.08em; margin: 0 0 12px; font-size: 0.9rem; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.04; letter-spacing: -0.035em; margin-bottom: 18px; }
.hero-lead { max-width: 60ch; font-size: 1.12rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 40px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 32px; }
.hero-stats > div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.9rem; color: var(--text); }
.hero-stats span { color: var(--muted); font-size: 0.9rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: 0.98rem;
  border: 1px solid transparent; cursor: pointer; transition: 0.16s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(79, 124, 255, 0.4); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface); }
.btn-block { width: 100%; }

/* Sections */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-link { font-weight: 600; white-space: nowrap; }
.page-head { margin-bottom: 28px; }
.page-head.center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.page-head .lead { margin-inline: 0; }
.page-head.center .lead { margin-inline: auto; }

/* Grid + Cards */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; color: var(--text); transition: 0.16s;
}
a.card:hover { border-color: var(--primary); transform: translateY(-3px); text-decoration: none; box-shadow: var(--shadow); }
.card h3 { margin: 10px 0 8px; font-size: 1.12rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 0.86rem; color: var(--muted); flex-wrap: wrap; }
.tag { font-size: 0.75rem; font-weight: 700; color: var(--accent); background: rgba(34, 211, 238, 0.1); padding: 4px 10px; border-radius: 999px; }
.chip { font-size: 0.75rem; color: var(--muted); background: var(--surface-2); padding: 4px 10px; border-radius: 999px; }
.chip-ok { color: var(--risk-low); background: rgba(51, 214, 159, 0.12); }
.chip-no { color: var(--muted); }

/* Risk badges */
.risk-badge { display: inline-flex; align-items: baseline; font-weight: 800; padding: 3px 10px; border-radius: 999px; font-size: 1.05rem; }
.risk-unit { font-size: 0.7rem; margin-left: 1px; }
.risk-high, .risk-badge.risk-high { color: var(--risk-high); background: rgba(255, 93, 108, 0.12); }
.risk-mid, .risk-badge.risk-mid { color: var(--risk-mid); background: rgba(255, 176, 32, 0.12); }
.risk-low, .risk-badge.risk-low { color: var(--risk-low); background: rgba(51, 214, 159, 0.12); }
.risk-tag { font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.trend-up { color: var(--risk-low); }
.trend-down { color: var(--risk-high); }
.trend-flat { color: var(--muted); }

/* Features */
.feature { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.feature-num { font-size: 1.6rem; font-weight: 800; color: var(--primary); opacity: 0.5; }
.feature h3 { margin: 6px 0 10px; }

/* Breadcrumb */
.breadcrumb { padding-top: 18px; }
.breadcrumb ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; font-size: 0.85rem; color: var(--muted); }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 8px; color: var(--border); }

/* Detail */
.detail-head { margin-bottom: 24px; }
.detail-head h1 { margin: 12px 0; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 32px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.stat-label { font-size: 0.82rem; color: var(--muted); }
.stat-value { font-size: 1.5rem; font-weight: 800; }
.stat-value small { font-size: 0.9rem; }
.detail-block { margin: 28px 0; }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.pill-list li { background: var(--surface-2); border: 1px solid var(--border); padding: 6px 14px; border-radius: 999px; font-size: 0.88rem; }
.faq-item { border-top: 1px solid var(--border); padding: 16px 0; }
.faq-item:first-of-type { border-top: 0; }
.faq-item h3 { margin: 0 0 6px; font-size: 1.05rem; }
.faq-item p { margin: 0; color: var(--muted); }
.detail-cta, .cta { background: linear-gradient(135deg, rgba(79,124,255,0.14), rgba(34,211,238,0.1)); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; text-align: center; margin-top: 36px; }
.cta { margin: 0; border-radius: 0; }
.cta h2, .detail-cta h2 { margin-bottom: 10px; }
.cta p { color: var(--muted); margin-bottom: 22px; }

/* Article */
.article { max-width: 760px; }
.article-head { margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
.article-head h1 { margin: 12px 0; }
.article-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 0.88rem; }
.tags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.article-body h2 { margin-top: 1.8em; }
.article-body h3 { margin-top: 1.4em; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body li { margin: 0.35em 0; }
.article-card time { font-size: 0.8rem; color: var(--muted); }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 0.88rem; cursor: pointer; transition: 0.14s; }
.filter:hover { color: var(--text); }
.filter.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Diagnosis */
.badge-beta { display: inline-block; background: var(--accent); color: #04122a; font-weight: 800; font-size: 0.72rem; padding: 3px 10px; border-radius: 999px; letter-spacing: 0.08em; margin-bottom: 12px; }
.diagnosis-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.diagnosis-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.field { margin-bottom: 20px; border: 0; padding: 0; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.92rem; }
.field input[type="number"], .field select {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg-alt); color: var(--text); font-size: 0.95rem; font-family: inherit;
}
.field input:focus, .field select:focus { outline: 2px solid var(--primary); border-color: transparent; }
.radio-row { display: flex; flex-direction: column; gap: 8px; }
.radio-row label, .check-grid label { font-weight: 400; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.diagnosis-result { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.score-ring { display: grid; place-items: center; width: 160px; height: 160px; border-radius: 50%; margin: 0 auto 18px; background: conic-gradient(var(--ring-color) var(--ring-deg), var(--surface-2) 0); }
.score-ring-inner { width: 128px; height: 128px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; }
.score-ring-inner strong { font-size: 2.2rem; line-height: 1; }
.score-ring-inner span { font-size: 0.8rem; color: var(--muted); }
.result-plan { margin-top: 18px; }
.result-plan li { margin: 8px 0; }
.disclaimer { font-size: 0.8rem; color: var(--muted); margin-top: 24px; text-align: center; }

/* Search */
.search-page-form input, .search-page-form { width: 100%; }
.search-page-form input { padding: 14px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1rem; margin-bottom: 16px; }
.search-page-form input:focus { outline: 2px solid var(--primary); border-color: transparent; }
.search-results { display: grid; gap: 12px; }
.search-hit { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; }
.search-hit:hover { border-color: var(--primary); text-decoration: none; }
.search-hit h3 { margin: 6px 0 4px; font-size: 1.05rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 40px 0; margin-top: 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.footer-brand p { color: var(--muted); margin: 8px 0 0; font-size: 0.9rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-nav a { color: var(--muted); font-size: 0.9rem; }
.copyright { width: 100%; color: var(--muted); font-size: 0.82rem; border-top: 1px solid var(--border); padding-top: 18px; margin: 8px 0 0; }

/* Images */
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero-media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.article-card.has-media { padding: 0; overflow: hidden; }
.article-card .card-media { aspect-ratio: 16 / 10; overflow: hidden; }
.article-card .card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s; }
.article-card:hover .card-media img { transform: scale(1.04); }
.article-card .card-body { padding: 18px 20px 20px; }
.article-hero { margin: 0 0 28px; }
.article-hero img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px;
  border: 1px solid var(--border);
}
.page-banner { margin-bottom: 26px; }
.page-banner img {
  width: 100%; height: 220px; object-fit: cover; border-radius: 16px;
  border: 1px solid var(--border); box-shadow: var(--shadow); display: block;
}

/* Responsive */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .diagnosis-wrap { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-media { order: -1; }
  .hero-media img { aspect-ratio: 16 / 9; }
  .page-banner img { height: 180px; }
}
@media (max-width: 720px) {
  .header-search { display: none; }
  .nav-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 42px; height: 42px; margin-left: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
  .nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); margin: 0 auto; transition: 0.2s; }
  .site-nav {
    position: fixed; inset: 64px 0 auto 0; margin: 0; background: var(--bg-alt);
    border-bottom: 1px solid var(--border); max-height: 0; overflow: hidden; transition: max-height 0.25s;
  }
  .site-nav.open { max-height: 80vh; overflow-y: auto; }
  .nav-list { flex-direction: column; padding: 8px 16px 20px; }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: transparent; border: 0; margin: 0 0 0 12px; padding: 0; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
  .check-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
  .footer-nav { gap: 12px; }
}
