/* ===== Databricks for Data & AI Engineers — shared styles ===== */
:root {
  --bg: #0b0f17;
  --bg-elev: #121826;
  --bg-elev-2: #1a2233;
  --border: #262f42;
  --text: #e7ecf5;
  --text-dim: #9aa7bd;
  --text-faint: #6b7690;
  --accent: #ff6659;
  --accent-2: #ff9248;
  --accent-soft: rgba(255, 102, 89, 0.14);
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #f87171;
  --code-bg: #0d1320;
  --radius: 14px;
  --max-w: 1180px;
  --sidebar-w: 280px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f7fb;
    --bg-elev: #ffffff;
    --bg-elev-2: #eef1f8;
    --border: #dfe3ee;
    --text: #1b2130;
    --text-dim: #55617a;
    --text-faint: #8892a6;
    --accent: #e8391f;
    --accent-2: #ff8a3d;
    --accent-soft: rgba(232, 57, 31, 0.1);
    --code-bg: #eef1f8;
  }
}
:root[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-elev: #ffffff;
  --bg-elev-2: #eef1f8;
  --border: #dfe3ee;
  --text: #1b2130;
  --text-dim: #55617a;
  --text-faint: #8892a6;
  --accent: #e8391f;
  --accent-2: #ff8a3d;
  --accent-soft: rgba(232, 57, 31, 0.1);
  --code-bg: #eef1f8;
}

* { 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;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* Layout shell */
.shell {
  display: flex;
  min-height: 100vh;
}

/* Topbar (mobile) */
.topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 40;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
}
.topbar .brand { font-weight: 700; font-size: 15px; }
.topbar .spacer { flex: 1; }
.icon-btn {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 16px;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 16px 40px;
}
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.sidebar .brand .logo {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; font-size: 15px;
  flex-shrink: 0;
}
.sidebar .brand .name { font-weight: 700; font-size: 14.5px; line-height: 1.25; }
.sidebar .brand .name small { display: block; font-weight: 500; color: var(--text-faint); font-size: 11.5px; }

.progress-box {
  margin: 0 8px 16px;
  padding: 12px 14px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.progress-box .label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-dim); margin-bottom: 8px; }
.progress-box .bar { height: 7px; background: var(--border); border-radius: 99px; overflow: hidden; }
.progress-box .bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; transition: width .3s ease; width: 0%; }

.nav-group { margin-bottom: 6px; }
.nav-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-faint); padding: 12px 12px 6px;
}
.navlink {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 10px;
  color: var(--text-dim); font-size: 13.5px; font-weight: 500;
  margin: 1px 0;
}
.navlink:hover { background: var(--bg-elev-2); text-decoration: none; color: var(--text); }
.navlink.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.navlink .num {
  width: 22px; height: 22px; border-radius: 7px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-faint); flex-shrink: 0;
}
.navlink.active .num { background: var(--accent); border-color: var(--accent); color: #fff; }
.navlink.done .num { background: var(--green); border-color: var(--green); color: #06240f; }
.navlink.done .num::after { content: "✓"; }
.navlink.done .num-text { display: none; }

/* Main content */
.main {
  flex: 1;
  min-width: 0;
  padding: 40px 48px 80px;
}
.content { max-width: 860px; margin: 0 auto; }
.wide { max-width: var(--max-w); margin: 0 auto; }

.crumb { font-size: 13px; color: var(--text-faint); margin-bottom: 14px; }
.crumb a { color: var(--text-faint); }
.crumb a:hover { color: var(--accent); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 99px;
  margin-bottom: 14px; letter-spacing: .02em;
}
.badge.alt { background: rgba(250, 204, 21, .12); color: var(--amber); }

h1 { font-size: 32px; font-weight: 800; margin: 0 0 12px; letter-spacing: -.01em; }
h2 { font-size: 22px; font-weight: 750; margin: 40px 0 14px; letter-spacing: -.005em; padding-top: 6px; }
h3 { font-size: 17px; font-weight: 700; margin: 24px 0 10px; color: var(--text); }
p { color: var(--text-dim); margin: 0 0 14px; }
h1 + p.lead, p.lead { font-size: 17px; color: var(--text-dim); margin-bottom: 22px; }
ul, ol { color: var(--text-dim); padding-left: 22px; margin: 0 0 14px; }
li { margin-bottom: 6px; }
li > strong { color: var(--text); }
strong { color: var(--text); }
hr.sep { border: none; border-top: 1px solid var(--border); margin: 36px 0; }

code {
  font-family: var(--mono);
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 13px;
  color: var(--accent);
}
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 0 0 18px;
}
pre code { background: none; border: none; padding: 0; color: var(--text); font-size: 13px; line-height: 1.6; }

.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--bg-elev);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 0 0 18px;
}
.callout p:last-child { margin-bottom: 0; }
.callout .ct-title { font-weight: 700; color: var(--accent); font-size: 13px; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.callout.warn { border-left-color: var(--amber); }
.callout.warn .ct-title { color: var(--amber); }
.callout.tip { border-left-color: var(--green); }
.callout.tip .ct-title { color: var(--green); }

.grid { display: grid; gap: 16px; margin: 18px 0 24px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.card h4 { margin: 0 0 6px; font-size: 14.5px; font-weight: 700; }
.card p { margin: 0; font-size: 13.5px; }

/* Module cards (homepage grid) */
.module-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s, transform .15s;
  position: relative;
}
.module-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.module-card .mc-top { display: flex; align-items: center; justify-content: space-between; }
.module-card .mc-num {
  font-size: 12px; font-weight: 800; color: var(--accent);
  background: var(--accent-soft); padding: 3px 9px; border-radius: 99px;
}
.module-card .mc-time { font-size: 11.5px; color: var(--text-faint); }
.module-card h4 { margin: 4px 0 0; font-size: 15.5px; font-weight: 750; color: var(--text); }
.module-card p { margin: 0; font-size: 13px; color: var(--text-dim); }
.module-card .mc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag {
  font-size: 10.5px; font-weight: 600; color: var(--text-dim);
  background: var(--bg-elev-2); border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 6px;
}
.module-card.done { border-color: var(--green); }
.module-card .mc-check {
  position: absolute; top: 16px; right: 16px;
  width: 20px; height: 20px; border-radius: 6px;
  background: var(--green); color: #06240f; font-size: 12px;
  display: none; align-items: center; justify-content: center; font-weight: 800;
}
.module-card.done .mc-check { display: flex; }

/* Objectives / checklist */
.checklist { list-style: none; padding: 0; margin: 0 0 18px; }
.checklist li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 8px; background: var(--bg-elev); cursor: pointer; font-size: 14px; color: var(--text-dim);
}
.checklist li input { margin-top: 3px; accent-color: var(--accent); width: 15px; height: 15px; flex-shrink: 0; cursor: pointer; }
.checklist li.checked { color: var(--text-faint); text-decoration: line-through; }

/* Timeline (12-month roadmap) */
.timeline { position: relative; margin: 20px 0 30px; padding-left: 28px; border-left: 2px solid var(--border); }
.tl-item { position: relative; padding-bottom: 26px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -34px; top: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}
.tl-month { font-size: 12px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.tl-item h4 { margin: 3px 0 4px; font-size: 15.5px; }
.tl-item p { margin: 0; font-size: 13.5px; }

/* Resources */
.res-list { list-style: none; padding: 0; margin: 0 0 18px; }
.res-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px;
  background: var(--bg-elev);
}
.res-list a { font-weight: 650; font-size: 14px; }
.res-list .res-desc { font-size: 12.5px; color: var(--text-faint); display: block; margin-top: 2px; }
.res-list .res-type { font-size: 10.5px; font-weight: 700; color: var(--text-faint); background: var(--bg-elev-2); padding: 3px 8px; border-radius: 6px; white-space: nowrap; }

table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 13.5px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); color: var(--text-dim); }
th { color: var(--text); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }

/* Prev/next footer nav */
.pagenav { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; }
.pagenav a {
  flex: 1; display: block; border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 18px; background: var(--bg-elev); text-decoration: none;
}
.pagenav a:hover { border-color: var(--accent); }
.pagenav .dir { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.pagenav .title { font-weight: 700; color: var(--text); font-size: 14px; }
.pagenav .next { text-align: right; }

.mark-done-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff; border: none;
  padding: 11px 20px; border-radius: 10px; font-weight: 700; font-size: 13.5px;
  cursor: pointer; margin: 30px 0 0;
}
.mark-done-btn.is-done { background: var(--green); color: #06240f; }
.mark-done-btn:hover { opacity: .9; }

.hero {
  padding: 8px 0 10px;
}
.hero h1 { font-size: 38px; }
.stat-row { display: flex; gap: 28px; flex-wrap: wrap; margin: 22px 0 32px; }
.stat { min-width: 110px; }
.stat .num { font-size: 26px; font-weight: 800; color: var(--accent); }
.stat .lbl { font-size: 12.5px; color: var(--text-faint); }

.milestone {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; background: var(--bg-elev); position: relative; overflow: hidden;
}
.milestone .m-idx { font-size: 11px; font-weight: 800; color: var(--text-faint); letter-spacing: .05em; text-transform: uppercase; }
.milestone h4 { margin: 6px 0 6px; font-size: 16px; }
.milestone p { font-size: 13px; margin-bottom: 0; }

footer.site-footer {
  max-width: var(--max-w); margin: 60px auto 0; padding: 24px 0; border-top: 1px solid var(--border);
  color: var(--text-faint); font-size: 12.5px; text-align: center;
}

/* Responsive */
@media (max-width: 980px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .topbar { display: flex; }
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 50; height: 100vh;
    transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.4);
  }
  .sidebar.open { transform: translateX(0); }
  .main { padding: 24px 18px 60px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  h1 { font-size: 26px; }
  .hero h1 { font-size: 28px; }
  .pagenav { flex-direction: column; }
}
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 45; }
.overlay.show { display: block; }
