/* Base design system ported from johnnyphung.com */
:root {
      --bg: #FFFFFF;
      --bg-subtle: #FAFAFB;
      --bg-sunken: #F5F6F8;
      --text: #15161A;
      --text-muted: #585C64;
      --text-faint: #767B85;
      --border: #ECECF1;
      --border-strong: #E0E1E8;
      --accent: #4F46E5;
      --accent-hover: #4038C9;
      --accent-bright: #6366F1;
      --accent-soft: #EEEDFD;

      --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
      --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

      --shadow-xs: 0 1px 2px rgba(17,18,23,.06);
      --shadow-sm: 0 1px 3px rgba(17,18,23,.05), 0 1px 2px rgba(17,18,23,.03);
      --shadow-md: 0 12px 32px -12px rgba(17,18,23,.16);
      --shadow-lg: 0 24px 60px -16px rgba(17,18,23,.22);

      --r: 14px;
      --r-sm: 10px;
      --r-lg: 22px;
      --r-pill: 999px;

      --maxw: 1180px;
      --gutter: 40px;
    }

    *, *::before, *::after { box-sizing: border-box; }
    html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

    body {
      margin: 0;
      background: var(--bg);
      color: var(--text);
      font-family: var(--sans);
      font-size: 17px;
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
    }

    h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; }
    p { margin: 0; }
    a { color: inherit; text-decoration: none; }
    img, svg, iframe { display: block; max-width: 100%; }

    .container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

    /* ---------- accessibility helpers ---------- */
    .vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

    .skip-link {
      position: absolute; left: 16px; top: -64px; z-index: 100;
      background: var(--text); color: #fff; padding: 12px 18px; border-radius: 10px;
      font-weight: 600; font-size: 15px; transition: top .18s ease;
    }
    .skip-link:focus { top: 16px; }

    a:focus-visible, button:focus-visible, iframe:focus-visible, select:focus-visible, .th-sort:focus-visible {
      outline: 3px solid var(--accent);
      outline-offset: 2px;
      border-radius: 6px;
    }

    /* ---------- shared bits ---------- */
    .kicker {
      display: inline-flex; align-items: center; gap: 9px;
      font-family: var(--mono); font-size: 12.5px; font-weight: 500;
      letter-spacing: 0.02em; color: var(--accent); text-transform: lowercase;
    }
    .kicker .idx { color: var(--text-faint); }
    .kicker::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }

    .eyebrow {
      font-family: var(--mono); font-size: 13px; font-weight: 500;
      letter-spacing: 0.01em; color: var(--accent);
    }

    .chip {
      display: inline-flex; align-items: center; gap: 7px;
      font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--text-muted);
      padding: 6px 11px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-pill);
    }

    .btn {
      display: inline-flex; align-items: center; justify-content: center; gap: 9px;
      min-height: 46px; padding: 0 20px; border-radius: var(--r-pill);
      font-size: 15px; font-weight: 600; line-height: 1; cursor: pointer;
      border: 1px solid transparent; transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
    }
    .btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
    .btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
    .btn-ghost { background: var(--bg); color: var(--text); border-color: var(--border-strong); }
    .btn-ghost:hover { border-color: var(--text); transform: translateY(-1px); }

    .arrow { width: 15px; height: 15px; flex: 0 0 auto; }

    /* ---------- header ---------- */
    .site-header {
      position: sticky; top: 0; z-index: 50;
      display: flex; align-items: center; justify-content: space-between; gap: 24px;
      padding: 14px var(--gutter);
      background: rgba(255,255,255,0.78);
      backdrop-filter: saturate(180%) blur(16px);
      border-bottom: 1px solid var(--border);
    }
    .brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
    .brand .avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-strong); }
    .nav { display: flex; align-items: center; gap: 4px; }
    .nav a { font-size: 14.5px; font-weight: 500; color: var(--text-muted); padding: 9px 13px; border-radius: 9px; min-height: 24px; display: inline-flex; align-items: center; transition: color .15s ease, background .15s ease; }
    .nav a:hover { color: var(--text); background: var(--bg-sunken); }
    .nav .nav-cta { color: #fff; background: var(--accent); }
    .nav .nav-cta:hover { background: var(--accent-hover); color: #fff; }

    /* ---------- hero ---------- */
    .hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
    .hero::before {
      content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
      background-image: radial-gradient(circle at center, #E6E6EE 1px, transparent 1px);
      background-size: 24px 24px;
      -webkit-mask-image: radial-gradient(120% 80% at 70% 0%, #000 0%, transparent 70%);
      mask-image: radial-gradient(120% 80% at 70% 0%, #000 0%, transparent 70%);
      opacity: .7;
    }
    .hero::after {
      content: ""; position: absolute; top: -200px; right: -160px; width: 620px; height: 620px; z-index: 0;
      background: radial-gradient(circle, rgba(99,102,241,.16), rgba(99,102,241,0) 62%);
      pointer-events: none;
    }
    .hero-inner { position: relative; z-index: 1; padding: 92px 0 76px; display: flex; flex-direction: column; gap: 30px; align-items: flex-start; }
    .avail { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--text-muted); padding: 7px 13px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-pill); box-shadow: var(--shadow-xs); }
    .avail .led { width: 7px; height: 7px; border-radius: 50%; background: #16A34A; box-shadow: 0 0 0 3px rgba(22,163,74,.16); }
    .hero h1 { font-size: clamp(46px, 7.4vw, 86px); letter-spacing: -0.04em; max-width: 16ch; }
    .hero h1 .grad {
      background: linear-gradient(100deg, var(--accent), var(--accent-bright) 55%, #8B5CF6);
      -webkit-background-clip: text; background-clip: text; color: transparent;
    }
    .hero-lead { font-size: clamp(19px, 2.3vw, 23px); line-height: 1.5; color: var(--text-muted); max-width: 60ch; font-weight: 450; }
    .hero-lead strong { color: var(--text); font-weight: 600; }
    .hero-chips { display: flex; flex-wrap: wrap; gap: 9px; }
    .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
    .hero-note { font-size: 14px; color: var(--text-faint); }

    /* ---------- stat band ---------- */
    .stats { display: flex; flex-wrap: wrap; border: 1px solid var(--border); border-radius: var(--r); background: var(--bg); box-shadow: var(--shadow-sm); overflow: hidden; margin: 0 0 -1px; }
    .stat { flex: 1 1 0; min-width: 180px; padding: 26px 28px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
    .stat:last-child { border-right: 0; }
    .stat .num { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
    .stat .num .u { color: var(--accent); }
    .stat .cap { font-size: 13.5px; color: var(--text-muted); font-family: var(--mono); font-weight: 500; }
    .stats-wrap { position: relative; z-index: 2; margin-top: -40px; }

    /* ---------- sections ---------- */
    .section { padding: 96px 0; }
    .section.subtle { background: var(--bg-subtle); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
    section[id] { scroll-margin-top: 76px; }
    .sec-head { display: flex; flex-direction: column; gap: 18px; margin-bottom: 52px; }
    .sec-head.split { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
    .sec-head h2 { font-size: clamp(32px, 4.6vw, 46px); letter-spacing: -0.035em; }
    .sec-head .note { font-size: 16px; color: var(--text-muted); max-width: 420px; }

    .tag { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--text-muted); padding: 5px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 7px; }

    /* ---------- card grid ---------- */
    .card {
      display: flex; flex-direction: column; gap: 14px; padding: 28px;
      background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-xs);
      transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
    }
    a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
    .card .cat { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--accent); }
    .card h3 { font-size: 24px; letter-spacing: -0.025em; }
    .card p { font-size: 15.5px; line-height: 1.62; color: var(--text-muted); flex: 1 1 auto; }
    .card .go { display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 600; color: var(--accent); font-family: var(--mono); }
    .card .go.static { color: var(--text-faint); }

    .cta-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px; padding: 36px; background: var(--accent-soft); border: 1px solid #DAD8FB; border-radius: var(--r); }
    .cta-card h3 { font-size: 24px; letter-spacing: -0.025em; line-height: 1.2; }
    .cta-card .go { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--accent); }

    /* ---------- footer ---------- */
    .footer { background: var(--bg-sunken); border-top: 1px solid var(--border); padding: 88px 0 40px; }
    .footer-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
    .footer-head { display: flex; flex-direction: column; gap: 22px; max-width: 640px; }
    .footer-head h2 { font-size: clamp(34px, 5vw, 54px); letter-spacing: -0.04em; line-height: 1.04; }
    .footer-head h2 .grad { background: linear-gradient(100deg, var(--accent), #8B5CF6); -webkit-background-clip: text; background-clip: text; color: transparent; }
    .footer-id { display: flex; align-items: center; gap: 12px; }
    .footer-id img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-strong); }
    .footer-id .who { display: flex; flex-direction: column; }
    .footer-id .who .n { font-weight: 700; }
    .footer-id .who .r { font-size: 14px; color: var(--text-muted); }
    .footer-links { display: flex; flex-direction: column; gap: 6px; }
    .footer-links a { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-width: 260px; padding: 11px 16px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg); font-weight: 600; font-size: 15px; min-height: 24px; transition: border-color .15s ease, transform .15s ease; }
    .footer-links a:hover { border-color: var(--text); transform: translateX(2px); }
    .footer-links a .handle { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--text-muted); }
    .footer-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); }
    .footer-bar span { font-family: var(--mono); font-size: 13px; color: var(--text-faint); }

    /* ---------- responsive ---------- */
    @media (max-width: 1024px) {
      :root { --gutter: 32px; }
    }
    @media (max-width: 820px) {
      .nav .nav-link { display: none; }
      .sec-head.split { flex-direction: column; align-items: flex-start; }
      .stat { border-right: 0; border-bottom: 1px solid var(--border); }
      .stat:last-child { border-bottom: 0; }
    }
    @media (max-width: 540px) {
      :root { --gutter: 20px; }
      .section { padding: 64px 0; }
      .hero-inner { padding: 64px 0 56px; }
    }

    @media (prefers-reduced-motion: reduce) {
      html { scroll-behavior: auto; }
      *, *::before, *::after { transition: none !important; animation: none !important; }
    }

/* ---------- program roadmap (landing) ---------- */
.roadmap { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.roadmap-sem { display:flex; flex-direction:column; gap:14px; padding:26px; background:var(--bg); border:1px solid var(--border); border-radius:var(--r); box-shadow:var(--shadow-xs); }
.roadmap-sem .n { font-family:var(--mono); font-size:12.5px; color:var(--accent); }
.roadmap-sem h3 { font-size:20px; letter-spacing:-0.02em; }
.roadmap-sem .sem-hours { font-family:var(--mono); font-size:13px; color:var(--text-faint); }
.roadmap-sem ul { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.roadmap-sem li a { display:flex; justify-content:space-between; gap:12px; padding:10px 12px; border:1px solid var(--border); border-radius:var(--r-sm); font-size:14.5px; font-weight:600; transition:border-color .15s ease, transform .15s ease; }
.roadmap-sem li a:hover { border-color:var(--text); transform:translateX(2px); }
.roadmap-sem li .code { font-family:var(--mono); color:var(--text-faint); font-weight:500; }

/* ---------- course hero + meta band ---------- */
.course-hero .back { font-family:var(--mono); font-size:13px; color:var(--text-muted); }
.meta-band { display:flex; flex-wrap:wrap; gap:0; border:1px solid var(--border); border-radius:var(--r); background:var(--bg); box-shadow:var(--shadow-sm); overflow:hidden; }
.meta-band .m { flex:1 1 0; min-width:150px; padding:18px 22px; border-right:1px solid var(--border); display:flex; flex-direction:column; gap:4px; }
.meta-band .m:last-child { border-right:0; }
.meta-band .m .k { font-family:var(--mono); font-size:12px; color:var(--text-faint); }
.meta-band .m .v { font-size:18px; font-weight:700; letter-spacing:-0.02em; }

/* ---------- outcomes ---------- */
.outcomes-grid { display:grid; grid-template-columns:1fr 1fr; gap:40px; }
.outcomes-grid h3 { font-size:18px; margin-bottom:16px; letter-spacing:-0.02em; }
.outcomes-grid ol, .outcomes-grid ul { margin:0; padding-left:22px; display:flex; flex-direction:column; gap:12px; }
.outcomes-grid li { font-size:16px; line-height:1.6; color:var(--text-muted); }

/* ---------- 16-week schedule ---------- */
.sched-list { display:flex; flex-direction:column; }
.sched-row { display:grid; grid-template-columns:64px 1fr; gap:20px; padding:20px 16px; border-top:1px solid var(--border); }
.sched-row:hover { background:var(--bg-subtle); }
.sched-row .wk { font-family:var(--mono); font-size:13px; font-weight:600; color:var(--accent); }
.sched-row .body .t { font-size:17px; font-weight:600; letter-spacing:-0.01em; }
.sched-row .body .d { font-size:15px; line-height:1.55; color:var(--text-muted); margin-top:4px; }
.sched-row .flag { display:inline-block; margin-top:8px; font-family:var(--mono); font-size:11.5px; font-weight:600; padding:3px 9px; border-radius:var(--r-pill); }
.sched-row.is-midterm .flag { color:#9A3412; background:#FFF1E7; }
.sched-row.is-capstone .flag { color:#3730A3; background:var(--accent-soft); }

/* ---------- tools ---------- */
.tool-group { display:flex; flex-direction:column; gap:10px; padding:16px 0; border-top:1px solid var(--border); }
.tool-group .g { font-family:var(--mono); font-size:12.5px; color:var(--text-faint); }
.tool-group .tags { display:flex; flex-wrap:wrap; gap:8px; }

/* ---------- LMI dashboard ---------- */
.lmi-controls { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin-bottom:20px; }
.lmi-controls select { font-family:var(--sans); font-size:14px; padding:9px 12px; border:1px solid var(--border-strong); border-radius:var(--r-sm); background:var(--bg); color:var(--text); }
.live-badge { display:inline-flex; align-items:center; gap:8px; font-family:var(--mono); font-size:12.5px; font-weight:500; padding:7px 12px; border-radius:var(--r-pill); border:1px solid var(--border); }
.live-badge::before { content:""; width:8px; height:8px; border-radius:50%; }
.live-badge[data-state="snapshot"] { color:var(--text-muted); }
.live-badge[data-state="snapshot"]::before { background:var(--text-faint); }
.live-badge[data-state="live"] { color:#166534; background:#F0FDF4; border-color:#BBF7D0; }
.live-badge[data-state="live"]::before { background:#16A34A; box-shadow:0 0 0 3px rgba(22,163,74,.16); }
.lmi-table-wrap { overflow-x:auto; border:1px solid var(--border); border-radius:var(--r); background:var(--bg); box-shadow:var(--shadow-sm); }
.lmi-table { width:100%; border-collapse:collapse; font-size:15px; min-width:640px; }
.lmi-table caption { text-align:left; padding:16px 20px; font-family:var(--mono); font-size:12.5px; color:var(--text-faint); }
.lmi-table th, .lmi-table td { padding:14px 18px; text-align:left; border-top:1px solid var(--border); }
.lmi-table th[data-sort] { cursor:pointer; user-select:none; font-family:var(--mono); font-size:12.5px; font-weight:600; color:var(--text-muted); white-space:nowrap; }
.lmi-table th[data-sort]:hover { color:var(--text); }
.lmi-table th.num, .lmi-table td.num { text-align:right; font-variant-numeric:tabular-nums; }
.lmi-row { cursor:pointer; }
.lmi-row:hover { background:var(--bg-subtle); }
.lmi-row .occ { font-weight:600; letter-spacing:-0.01em; }
.lmi-row .soc { font-family:var(--mono); font-size:12px; color:var(--text-faint); }
.lmi-row .growth.up { color:#166534; font-weight:600; }
.lmi-row .growth.down { color:#B91C1C; font-weight:600; }
.wage-band { display:none; }
.wage-band.open { display:table-row; }
.wage-band td { background:var(--bg-sunken); padding:0; }
.wage-band .band-inner { padding:18px 20px; display:flex; flex-direction:column; gap:10px; }
.wage-band .bar { position:relative; height:10px; border-radius:var(--r-pill); background:linear-gradient(90deg,var(--accent-soft),var(--accent-bright)); }
.wage-band .ticks { display:flex; justify-content:space-between; font-family:var(--mono); font-size:12px; color:var(--text-muted); }

/* ---------- per-course careers widget ---------- */
.careers-widget { display:flex; flex-direction:column; gap:12px; padding:24px; background:var(--accent-soft); border:1px solid #DAD8FB; border-radius:var(--r); }
.careers-widget h3 { font-size:18px; letter-spacing:-0.02em; }
.careers-widget .roles { display:flex; flex-direction:column; gap:10px; }
.careers-widget .role { display:flex; justify-content:space-between; gap:16px; align-items:baseline; padding:10px 0; border-top:1px solid #DAD8FB; }
.careers-widget .role .r-t { font-weight:600; font-size:15px; }
.careers-widget .role .r-w { font-family:var(--mono); font-size:13.5px; color:var(--text-muted); white-space:nowrap; }
.careers-widget .note { font-size:13px; color:var(--text-muted); }

/* ---------- responsive additions ---------- */
@media (max-width:820px){ .roadmap{grid-template-columns:1fr;} .outcomes-grid{grid-template-columns:1fr;} }
