/* =============================================================================
   KL Skill Development · Industry Problem-Statement Explorer
   Shared design system — themed per app via [data-app] on <body>.
   ========================================================================== */

/* ----- Design tokens ------------------------------------------------------ */
:root {
  --brand: #c8102e;          /* KL crimson */
  --brand-dark: #9c0c23;
  --ink: #14161b;
  --ink-2: #2b303a;
  --muted: #616b7a;
  --muted-2: #8b94a3;
  --line: #e7e9ee;
  --line-2: #eef0f4;
  --bg: #f5f6f9;
  --bg-2: #eef0f4;
  --card: #ffffff;
  --card-2: #fbfcfd;

  /* accent — overridden per app */
  --accent: #c8102e;
  --accent-2: #ff5470;
  --accent-ink: #ffffff;
  --accent-soft: rgba(200, 16, 46, .10);
  --accent-soft-2: rgba(200, 16, 46, .04);
  --glow: rgba(200, 16, 46, .28);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(16,19,26,.05), 0 1px 1px rgba(16,19,26,.04);
  --shadow: 0 6px 20px -8px rgba(16,19,26,.18), 0 2px 6px -3px rgba(16,19,26,.10);
  --shadow-lg: 0 30px 60px -22px rgba(16,19,26,.35), 0 10px 24px -14px rgba(16,19,26,.22);
  --ring: 0 0 0 4px var(--accent-soft);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", "Consolas", monospace;
  --maxw: 1240px;
}

/* Per-app accent themes */
body[data-app="java"] {
  --accent: #e8730c;         /* Java amber/orange */
  --accent-2: #c2410c;
  --accent-ink: #ffffff;
  --accent-soft: rgba(232, 115, 12, .12);
  --accent-soft-2: rgba(232, 115, 12, .05);
  --glow: rgba(232, 115, 12, .30);
}
body[data-app="python"] {
  --accent: #2f6fb0;         /* Python blue */
  --accent-2: #1e4f86;
  --accent-ink: #ffffff;
  --accent-soft: rgba(47, 111, 176, .12);
  --accent-soft-2: rgba(47, 111, 176, .05);
  --glow: rgba(47, 111, 176, .28);
  --accent-yellow: #ffd43b;
}

/* ----- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv02","cv03","cv04","ss01";
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
input { font: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
mark { background: var(--accent-soft); color: var(--accent-2); font-weight: 700; padding: 0 1px; border-radius: 3px; }

/* ----- Utilities ---------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* =============================================================================
   TOP BAR
   ========================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar__bar { height: 64px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand__logo { height: 34px; width: auto; }
.brand__div { width: 1px; height: 26px; background: var(--line); }
.brand__txt { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand__txt b { font-size: .92rem; font-weight: 700; letter-spacing: -.01em; }
.brand__txt span { font-size: .70rem; color: var(--muted); letter-spacing: .02em; }
.topbar__spacer { flex: 1; }
.topbar__nav { display: flex; align-items: center; gap: 6px; }
.navlink {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 999px; font-size: .85rem; font-weight: 600;
  color: var(--muted); transition: .18s;
}
.navlink:hover { color: var(--ink); background: var(--bg-2); }
.navlink--active { color: var(--accent); background: var(--accent-soft); }
.navlink .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* =============================================================================
   PAGE HEADER / HERO (explorer pages)
   ========================================================================== */
.phead { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.phead::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(1100px 380px at 12% -40%, var(--accent-soft), transparent 60%),
    radial-gradient(900px 360px at 92% -20%, var(--accent-soft-2), transparent 55%),
    linear-gradient(#ffffff, #fbfcfd);
}
.phead__in { position: relative; z-index: 1; padding: clamp(26px, 5vw, 52px) 0 clamp(20px, 3vw, 30px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  padding: 6px 13px; border-radius: 999px; margin-bottom: 16px;
}
.eyebrow svg { width: 15px; height: 15px; }
.phead h1 {
  font-size: clamp(1.9rem, 4.2vw, 3rem); font-weight: 800;
  letter-spacing: -.03em; line-height: 1.04; color: var(--ink);
}
.phead h1 .accent { color: var(--accent); }
.phead__sub { margin-top: 14px; max-width: 66ch; font-size: clamp(.98rem, 1.4vw, 1.1rem); color: var(--muted); }

.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.stat {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 18px; box-shadow: var(--shadow-sm);
  min-width: 110px;
}
.stat b { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat b .accent { color: var(--accent); }
.stat span { font-size: .76rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }

/* =============================================================================
   TOOLBAR (sticky search + filters)
   ========================================================================== */
.toolbar {
  position: sticky; top: 64px; z-index: 50;
  background: rgba(245,246,249,.86);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.toolbar__in { padding: 14px 0 14px; display: flex; flex-direction: column; gap: 12px; }

.searchrow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.search {
  position: relative; flex: 1 1 380px; min-width: 240px;
}
.search .ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted-2); pointer-events: none; }
.search .ico svg { width: 18px; height: 18px; display: block; }
.search__clear svg { width: 15px; height: 15px; }
.search input {
  width: 100%; height: 50px; border: 1px solid var(--line);
  background: var(--card); border-radius: 999px;
  padding: 0 96px 0 46px; font-size: .98rem; color: var(--ink);
  box-shadow: var(--shadow-sm); transition: .18s;
}
.search input::placeholder { color: var(--muted-2); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.search__kbd {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  display: flex; gap: 5px; align-items: center;
}
.kbd {
  font-family: var(--mono); font-size: .72rem; color: var(--muted);
  background: var(--bg-2); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 7px; padding: 2px 7px; min-width: 22px; text-align: center;
}
.search__clear {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%; display: none; align-items: center; justify-content: center;
  color: var(--muted); background: var(--bg-2);
}
.search__clear:hover { color: var(--ink); background: var(--line); }
.search.has-text .search__kbd { display: none; }
.search.has-text .search__clear { display: flex; }

.select {
  position: relative; height: 50px; display: inline-flex; align-items: center;
}
.select select {
  appearance: none; -webkit-appearance: none;
  height: 50px; border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 0 40px 0 18px; font-size: .9rem; font-weight: 600;
  color: var(--ink-2); box-shadow: var(--shadow-sm); cursor: pointer; transition: .18s;
}
.select select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.select::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-65%) rotate(45deg); pointer-events: none;
}

/* chip filters */
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips__label {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted-2); margin-right: 2px; align-self: center;
}
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 14px; border-radius: 999px;
  font-size: .83rem; font-weight: 600; color: var(--ink-2);
  background: var(--card); border: 1px solid var(--line);
  transition: .15s; white-space: nowrap;
}
.chip:hover { border-color: var(--muted-2); }
.chip .cnt { font-size: .72rem; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
  box-shadow: 0 4px 12px -4px var(--glow);
}
.chip[aria-pressed="true"] .cnt { color: rgba(255,255,255,.8); }
.chip--dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); }
.chip[aria-pressed="true"].chip--dot::before { background: rgba(255,255,255,.9); }

.resultbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.resultbar__count { font-size: .9rem; color: var(--muted); font-weight: 600; }
.resultbar__count b { color: var(--ink); font-variant-numeric: tabular-nums; }
.resultbar__right { display: flex; align-items: center; gap: 10px; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .84rem; font-weight: 600; color: var(--muted);
  padding: 8px 12px; border-radius: 999px; transition: .15s;
}
.btn-ghost:hover { color: var(--accent); background: var(--accent-soft); }
.btn-ghost svg { width: 15px; height: 15px; }
.btn-ghost[hidden] { display: none; }

/* view toggle */
.viewtoggle { display: inline-flex; padding: 3px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; }
.viewtoggle button { width: 34px; height: 30px; border-radius: 999px; display: grid; place-items: center; color: var(--muted); }
.viewtoggle button svg { width: 17px; height: 17px; }
.viewtoggle button[aria-pressed="true"] { background: var(--card); color: var(--accent); box-shadow: var(--shadow-sm); }

/* =============================================================================
   CARD GRID
   ========================================================================== */
.results { padding: 26px 0 60px; }
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}
.grid.is-list { grid-template-columns: 1fr; }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 20px 18px;
  box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform .2s cubic-bezier(.2,.7,.3,1), box-shadow .2s, border-color .2s;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(var(--accent), var(--accent-2)); opacity: .85;
  transform: scaleY(.0); transform-origin: top; transition: transform .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::before { transform: scaleY(1); }
.card:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--accent); }

.card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pscode {
  font-family: var(--mono); font-size: .76rem; font-weight: 700; letter-spacing: .02em;
  color: var(--accent); background: var(--accent-soft); padding: 4px 9px; border-radius: 7px;
}
.level {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .70rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line);
}
.level::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lvc, var(--muted-2)); }
.lv-0 { --lvc: #16a34a; --c: #16a34a; } .lv-1 { --lvc: #0ea5e9; --c: #0ea5e9; } .lv-2 { --lvc: #6366f1; --c: #6366f1; }
.lv-3 { --lvc: #d97706; --c: #d97706; } .lv-4 { --lvc: #dc2626; --c: #dc2626; } .lv-5 { --lvc: #9333ea; --c: #9333ea; }

.card__title { font-size: 1.06rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.28; color: var(--ink); }
.card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .74rem; font-weight: 600; color: var(--ink-2);
  background: var(--bg); border: 1px solid var(--line-2); padding: 3px 9px; border-radius: 7px;
}
.tag--sector::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.tag--module { color: var(--muted); }
.card__excerpt {
  margin-top: 12px; font-size: .89rem; color: var(--muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card__foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.concepts { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.concept {
  font-family: var(--mono); font-size: .70rem; color: var(--muted);
  background: var(--bg-2); padding: 2px 7px; border-radius: 6px; white-space: nowrap;
}
.concept--more { color: var(--accent); background: var(--accent-soft); font-family: var(--font); font-weight: 700; }
.card__cta {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  font-size: .8rem; font-weight: 700; color: var(--accent);
}
.card__cta svg { width: 15px; height: 15px; transition: transform .2s; }
.card:hover .card__cta svg { transform: translateX(3px); }

/* list view tweaks */
.grid.is-list .card { flex-direction: row; align-items: flex-start; gap: 22px; padding: 18px 22px; }
.grid.is-list .card__main { flex: 1; min-width: 0; }
.grid.is-list .card__top { flex-direction: column; align-items: flex-end; gap: 8px; min-width: 92px; order: 2; margin: 0; }
.grid.is-list .card__excerpt { -webkit-line-clamp: 2; }
.grid.is-list .card__foot { margin-top: 12px; }
@media (max-width: 640px){ .grid.is-list .card { flex-direction: column; } .grid.is-list .card__top { flex-direction: row; align-items: center; order: 0; width: 100%; } }

/* empty state */
.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty svg { width: 56px; height: 56px; color: var(--muted-2); margin: 0 auto 16px; }
.empty h3 { font-size: 1.2rem; color: var(--ink); font-weight: 700; }
.empty p { margin-top: 6px; font-size: .92rem; }
.empty button { margin-top: 18px; }

/* =============================================================================
   DETAIL DRAWER
   ========================================================================== */
.scrim {
  position: fixed; inset: 0; z-index: 90; background: rgba(16,19,26,.5);
  backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: .25s;
}
.scrim.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(640px, 100%);
  background: var(--card); box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform .32s cubic-bezier(.22,.7,.24,1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer__head {
  position: relative; padding: 26px clamp(22px,4vw,34px) 22px; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(700px 200px at 0% -60%, var(--accent-soft), transparent 70%),
    var(--card);
}
.drawer__close {
  position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted); background: var(--bg-2); transition: .15s;
}
.drawer__close:hover { color: var(--ink); background: var(--line); transform: rotate(90deg); }
.drawer__close svg { width: 18px; height: 18px; }
.drawer__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.drawer h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; padding-right: 44px; }
.drawer__tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }

.drawer__body { padding: 24px clamp(22px,4vw,34px) 30px; overflow-y: auto; flex: 1; }
.section { margin-bottom: 26px; }
.section:last-child { margin-bottom: 0; }
.section__h {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
}
.section__h .ic {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
}
.section__h .ic svg { width: 16px; height: 16px; }
.section__h .badge { margin-left: auto; font-size: .72rem; font-weight: 700; color: var(--muted); background: var(--bg-2); padding: 2px 9px; border-radius: 999px; }
.section p { font-size: .96rem; color: var(--ink-2); line-height: 1.65; }

.checklist { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.checklist li { position: relative; padding-left: 30px; font-size: .93rem; color: var(--ink-2); line-height: 1.55; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 19px; height: 19px; border-radius: 6px;
  background: var(--accent-soft); border: 1px solid var(--accent);
}
.checklist li::after { content: ""; position: absolute; left: 6px; top: 6px; width: 6px; height: 10px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(40deg); }

.watchlist { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.watchlist li { position: relative; padding-left: 30px; font-size: .93rem; color: var(--ink-2); line-height: 1.55; }
.watchlist li::before {
  content: "!"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: .72rem; font-weight: 800;
  color: #b45309; background: #fef3c7; border: 1px solid #fcd34d;
}

.approach-box {
  background: var(--accent-soft-2); border: 1px solid var(--accent-soft);
  border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 16px 18px;
}
.approach-box p { color: var(--ink-2); }

.drawer__foot {
  border-top: 1px solid var(--line); padding: 14px clamp(22px,4vw,34px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--card-2);
}
.navbtns { display: flex; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 16px; border-radius: 10px; font-size: .88rem; font-weight: 700;
  transition: .16s; border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
}
.btn:hover { border-color: var(--muted-2); background: var(--bg); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px -6px var(--glow); }
.btn--primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.copied { background: #16a34a; border-color: #16a34a; color: #fff; }

/* =============================================================================
   FOOTER
   ========================================================================== */
.foot { border-top: 1px solid var(--line); background: var(--card); }
.foot__in { padding: 28px 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.foot__brand { display: flex; align-items: center; gap: 12px; }
.foot__brand img { height: 38px; }
.foot__txt { font-size: .82rem; color: var(--muted); }
.foot__txt b { color: var(--ink-2); }
.foot__links { display: flex; gap: 18px; font-size: .84rem; font-weight: 600; color: var(--muted); }
.foot__links a:hover { color: var(--accent); }

/* =============================================================================
   LANDING PAGE  (index.html — data-app="home")
   ========================================================================== */
.home-hero { position: relative; overflow: hidden; }
.home-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(900px 460px at 8% -10%, rgba(200,16,46,.10), transparent 60%),
    radial-gradient(760px 420px at 78% -20%, rgba(232,115,12,.10), transparent 55%),
    radial-gradient(760px 520px at 100% 30%, rgba(47,111,176,.10), transparent 55%),
    linear-gradient(#ffffff, #f5f6f9);
}
.home-hero__in { position: relative; z-index: 1; padding: clamp(34px, 6vw, 76px) 0 clamp(26px, 4vw, 46px); display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.home-hero h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.03; color: var(--ink); }
.home-hero h1 .grad {
  background: linear-gradient(100deg, var(--brand), #e8730c 55%, #2f6fb0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.home-hero__sub { margin-top: 18px; max-width: 56ch; font-size: clamp(1rem, 1.5vw, 1.18rem); color: var(--muted); }
.home-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cta {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px;
  border-radius: 999px; font-weight: 700; font-size: .98rem; transition: .18s; border: 1px solid transparent;
}
.cta svg { width: 18px; height: 18px; transition: transform .2s; }
.cta:hover svg { transform: translateX(3px); }
.cta--java { background: #e8730c; color: #fff; box-shadow: 0 12px 26px -10px rgba(232,115,12,.6); }
.cta--java:hover { background: #c2410c; }
.cta--py { background: #2f6fb0; color: #fff; box-shadow: 0 12px 26px -10px rgba(47,111,176,.55); }
.cta--py:hover { background: #1e4f86; }

.home-hero__art { position: relative; display: grid; place-items: center; }
.petal { width: min(360px, 78vw); filter: drop-shadow(0 30px 50px rgba(16,19,26,.18)); animation: float 7s ease-in-out infinite; }
@keyframes float { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-12px); } }
.home-hero__art .ring { position: absolute; inset: -6% ; border-radius: 50%; border: 1px dashed rgba(200,16,46,.25); animation: spin 38s linear infinite; }
.home-hero__art .ring.r2 { inset: 6%; border-color: rgba(47,111,176,.22); animation-duration: 52s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.home-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* track cards */
.tracks { padding: clamp(30px, 5vw, 56px) 0; }
.tracks__head { text-align: center; max-width: 64ch; margin: 0 auto clamp(26px, 4vw, 40px); }
.tracks__head .eyebrow { margin-bottom: 14px; }
.tracks__head h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.tracks__head p { margin-top: 12px; color: var(--muted); font-size: 1.04rem; }

.track-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(18px, 3vw, 26px); }
.track {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s;
  --tc: #e8730c; --tc2: #c2410c;
}
.track--py { --tc: #2f6fb0; --tc2: #1e4f86; }
.track:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.track__banner { position: relative; padding: 26px 28px 22px; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, var(--tc), var(--tc2)); }
.track__banner::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.12); }
.track__banner::before { content: ""; position: absolute; right: 30px; bottom: -60px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.10); }
.track__lang { position: relative; display: flex; align-items: center; gap: 14px; }
.track__icon { width: 56px; height: 56px; border-radius: 16px; background: rgba(255,255,255,.18); display: grid; place-items: center; backdrop-filter: blur(4px); flex-shrink: 0; }
.track__icon svg { width: 32px; height: 32px; }
.track__lang h3 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.track__lang span { font-size: .85rem; opacity: .9; font-weight: 600; }
.track__body { padding: 22px 28px 26px; display: flex; flex-direction: column; flex: 1; }
.track__desc { color: var(--muted); font-size: .96rem; line-height: 1.6; }
.track__metrics { display: flex; gap: 22px; margin: 20px 0 18px; }
.track__metric b { font-size: 1.7rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.track__metric b .u { color: var(--tc); }
.track__metric span { display: block; font-size: .76rem; color: var(--muted); font-weight: 600; }
.track__sectors { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.track__sectors .tag::before { background: var(--tc); }
.track__go {
  margin-top: auto; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 50px; border-radius: 12px; font-weight: 700; font-size: .98rem; color: #fff;
  background: linear-gradient(135deg, var(--tc), var(--tc2)); transition: .18s; box-shadow: 0 10px 22px -10px var(--tc);
}
.track__go svg { width: 18px; height: 18px; transition: transform .2s; }
.track:hover .track__go svg { transform: translateX(4px); }
.track__link { position: absolute; inset: 0; z-index: 3; }

/* who/how section */
.howto { background: var(--card); border-top: 1px solid var(--line); }
.howto__in { padding: clamp(34px, 5vw, 58px) 0; }
.howto h2 { text-align: center; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }
.howto__lead { text-align: center; color: var(--muted); max-width: 60ch; margin: 0 auto clamp(28px, 4vw, 42px); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--card-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: .2s; }
.feature:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-3px); }
.feature__ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px; background: var(--accent-soft); color: var(--brand); }
.feature__ic svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -.01em; }
.feature p { font-size: .92rem; color: var(--muted); line-height: 1.6; }
.feature--j .feature__ic { background: rgba(232,115,12,.12); color: #e8730c; }
.feature--p .feature__ic { background: rgba(47,111,176,.12); color: #2f6fb0; }

@media (max-width: 900px) {
  .home-hero__in { grid-template-columns: 1fr; }
  .home-hero__art { order: -1; }
  .petal { width: min(260px, 60vw); }
  .track-grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
}

/* =============================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.card { animation: rise .4s both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* =============================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 860px) {
  .topbar__nav .navlink span.full { display: none; }
  .toolbar { top: 64px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}
@media (max-width: 560px) {
  .topbar__bar { gap: 10px; }
  .brand__txt span { display: none; }
  .search input { padding-right: 46px; }
  .search__kbd { display: none; }
  .grid { grid-template-columns: 1fr; }
  .stat { flex: 1 1 calc(50% - 6px); min-width: 0; }
}
