@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #f4f7f5;
  --muted: #96a09b;
  --faint: #68716d;
  --page: #0c100e;
  --panel: #141916;
  --panel-2: #191f1b;
  --line: #29302c;
  --acid: #b8f23f;
  --acid-dark: #8bc414;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 75% -10%, rgba(184, 242, 63, 0.08), transparent 29rem),
    var(--page);
  font-family: "Manrope", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.site-header {
  height: 74px;
  padding: 0 clamp(20px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 16, 14, 0.85);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-family: "DM Mono", monospace;
  font-size: 15px;
  letter-spacing: .08em;
}
.brand strong { color: var(--acid); font-weight: 500; }
.brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: #0b0e0c;
  background: var(--acid);
  font-weight: 700;
  border-radius: 6px;
  box-shadow: 0 0 28px rgba(184, 242, 63, .15);
}

.course-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: #b9c1bd;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.course-pill span {
  width: 7px;
  height: 7px;
  background: var(--acid);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(184, 242, 63, .09);
}

.page-shell {
  width: min(1400px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0 78px;
}

.course-intro {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 360px);
  gap: 48px;
  align-items: end;
  margin-bottom: 38px;
}
.eyebrow, .lesson-kicker {
  margin: 0 0 12px;
  color: var(--acid);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
}
h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 64px);
  line-height: .98;
  letter-spacing: -.055em;
}
.intro-copy {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
}
.progress-copy {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
}
.progress-copy span { color: var(--muted); }
.progress-copy strong { color: var(--acid); }
.progress-track {
  height: 5px;
  overflow: hidden;
  background: #29302c;
  border-radius: 10px;
}
.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--acid);
  border-radius: inherit;
  transition: width .35s ease;
}
.overall-progress small {
  display: block;
  margin-top: 9px;
  color: var(--faint);
  font-size: 10px;
  text-align: right;
}

.course-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}
.player-column, .lesson-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.player-column { min-width: 0; }
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(184, 242, 63, .13), transparent 24%),
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255,255,255,.012) 4px),
    #050706;
  user-select: none;
}
.video-frame::before {
  content: "LINUX BASECAMP";
  position: absolute;
  top: 20px;
  left: 22px;
  z-index: 2;
  color: rgba(255,255,255,.52);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: .16em;
  pointer-events: none;
}
video {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  display: block;
  object-fit: contain;
  background: #050706;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  -webkit-backface-visibility: hidden;
}
.video-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .88));
  opacity: .72;
  transition: opacity .25s ease;
}
.video-status {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
  padding: 9px 13px;
  color: #dce2df;
  background: rgba(0,0,0,.72);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 5px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
}
.video-status[hidden] { display: none; }
.hero-play {
  width: 68px;
  height: 68px;
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #0a0d0b;
  background: var(--acid);
  cursor: pointer;
  box-shadow: 0 15px 45px rgba(0,0,0,.5), 0 0 0 10px rgba(184,242,63,.09);
  transition: transform .2s ease, background .2s ease, opacity .2s ease;
}
.hero-play:hover { transform: translate(-50%, -50%) scale(1.07); background: #c8ff58; }
.hero-play.is-hidden { opacity: 0; pointer-events: none; }
.play-triangle, .play-icon {
  display: block;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentColor;
}
.custom-controls {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 12px;
  z-index: 5;
  opacity: 1;
  transition: opacity .25s ease, transform .25s ease;
}
.video-frame.controls-hidden .custom-controls {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}
.seek-bar, .volume-bar {
  --range-progress: 0%;
  width: 100%;
  height: 3px;
  display: block;
  margin: 0;
  appearance: none;
  border-radius: 5px;
  cursor: pointer;
}
.seek-bar {
  --buffered-progress: 0%;
  background: linear-gradient(
    to right,
    var(--acid) 0 var(--range-progress),
    rgba(255,255,255,.48) var(--range-progress) var(--buffered-progress),
    rgba(255,255,255,.16) var(--buffered-progress) 100%
  );
}
.volume-bar {
  background: linear-gradient(to right, var(--acid) var(--range-progress), rgba(255,255,255,.22) var(--range-progress));
}
.seek-bar::-webkit-slider-thumb, .volume-bar::-webkit-slider-thumb {
  width: 11px;
  height: 11px;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 4px rgba(184,242,63,.12);
}
.seek-bar::-moz-range-thumb, .volume-bar::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: var(--acid);
}
.control-row {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-button, .speed-button {
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.play-icon { color: white; border-top-width: 6px; border-bottom-width: 6px; border-left-width: 9px; }
.icon-button.is-playing .play-icon {
  width: 9px;
  height: 13px;
  margin: 0;
  border: 0;
  border-left: 3px solid white;
  border-right: 3px solid white;
}
.time-display {
  color: #e4e9e6;
  font-family: "DM Mono", monospace;
  font-size: 10px;
}
.time-separator { margin: 0 5px; color: #747c78; }
.controls-spacer { flex: 1; }
.volume-icon { font-size: 18px; }
.volume-bar { width: 66px; --range-progress: 100%; }
.speed-button { color: #dce2df; font-family: "DM Mono", monospace; font-size: 10px; }
.fullscreen-button span {
  width: 14px;
  height: 14px;
  display: block;
  border: 2px solid white;
  border-left-color: transparent;
  border-right-color: transparent;
}

.now-playing {
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 28px;
}
.now-playing h2 { margin: 0; font-size: 22px; letter-spacing: -.025em; }
.now-playing p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.complete-button {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  color: #b9c1bd;
  background: transparent;
  border: 1px solid #353d38;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}
.complete-button:hover { color: var(--ink); border-color: #66716b; }
.complete-button.is-complete { color: #10140f; border-color: var(--acid); background: var(--acid); }
.checkmark {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 9px;
}

.lesson-panel { min-height: 100%; }
.panel-heading {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.panel-heading .eyebrow { margin-bottom: 5px; }
.panel-heading h2 { margin: 0; font-size: 17px; }
.panel-heading > span { color: var(--faint); font-family: "DM Mono", monospace; font-size: 9px; }
.lesson-list { padding: 8px; }
.lesson-card {
  width: 100%;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 19px;
  gap: 12px;
  align-items: center;
  padding: 15px 13px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.lesson-card:hover { color: var(--ink); background: var(--panel-2); }
.lesson-card.is-active {
  color: var(--ink);
  background: rgba(184,242,63,.065);
  border-color: rgba(184,242,63,.28);
}
.lesson-number {
  width: 42px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #6e7772;
  background: #0e1210;
  border: 1px solid #252c28;
  border-radius: 3px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
}
.lesson-card.is-active .lesson-number { color: #10140f; background: var(--acid); border-color: var(--acid); }
.lesson-info { min-width: 0; }
.lesson-info strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.lesson-info span { display: block; margin-top: 4px; color: #68716d; font-size: 9px; }
.lesson-state {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  color: var(--acid);
  border: 1px solid #39413c;
  border-radius: 50%;
  font-size: 9px;
}
.lesson-state:not(.done) { color: transparent; }
.lesson-state.done { border-color: var(--acid); }
.panel-note {
  display: flex;
  gap: 12px;
  margin: 12px 18px 20px;
  padding-top: 18px;
  color: #68716d;
  border-top: 1px solid var(--line);
  font-size: 10px;
  line-height: 1.6;
}
.panel-note > span { color: var(--acid); font-size: 20px; }
.panel-note p { margin: 0; }
.panel-note strong { color: #aeb7b2; }

footer {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 76px);
  color: #555e59;
  border-top: 1px solid var(--line);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.sr-only {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.noscript { padding: 20px; color: #fff; background: #7d1d1d; text-align: center; }

@media (max-width: 1000px) {
  .course-layout { grid-template-columns: 1fr; }
  .lesson-panel { min-height: auto; }
}

@media (max-width: 680px) {
  .site-header {
    height: 64px;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  .course-pill { display: none; }
  .page-shell { width: min(100% - 28px, 1400px); padding: 42px 0 55px; }
  .course-intro { grid-template-columns: 1fr; gap: 28px; }
  .overall-progress { max-width: none; }
  .overall-progress small { text-align: left; }
  .course-layout { gap: 14px; }
  .video-frame::before { top: 12px; left: 14px; }
  .hero-play { width: 58px; height: 58px; }
  .custom-controls { left: 10px; right: 10px; bottom: 2px; }
  .seek-bar {
    height: 20px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 4px;
    touch-action: none;
  }
  .seek-bar::-webkit-slider-thumb { width: 15px; height: 15px; }
  .seek-bar::-moz-range-thumb { width: 15px; height: 15px; }
  .control-row { height: 48px; gap: 3px; }
  .icon-button, .speed-button { min-width: 40px; height: 44px; }
  .volume-bar { display: none; }
  .time-display { font-size: 9px; }
  .now-playing { min-height: 0; align-items: flex-start; padding: 21px; flex-direction: column; }
  .complete-button { width: 100%; min-height: 44px; justify-content: center; }
  .lesson-card { min-height: 64px; }
  footer { min-height: 68px; gap: 20px; }
  footer span:last-child { display: none; }
}

.video-frame:fullscreen,
.video-frame:-webkit-full-screen {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  background: #000;
}

@media (max-width: 380px) {
  .page-shell { width: calc(100% - 20px); }
  .brand { font-size: 13px; }
  .time-separator, #duration { display: none; }
  .panel-heading { padding-inline: 16px; }
}

@media (orientation: landscape) and (max-height: 500px) {
  .video-frame:fullscreen .custom-controls,
  .video-frame:-webkit-full-screen .custom-controls {
    padding-right: max(8px, env(safe-area-inset-right));
    padding-left: max(8px, env(safe-area-inset-left));
    padding-bottom: max(4px, env(safe-area-inset-bottom));
  }
}
