
:root {
  --pku-red: #8c1515;
  --pku-dark: #1f2937;
  --pku-ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --card: #ffffff;
  --blue: #233a8b;
  --gold: #c28f2c;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--pku-ink); background: #fff; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.nav { max-width: 1180px; margin: 0 auto; padding: 13px 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--pku-red), var(--blue)); color: white; display:grid; place-items:center; font-weight: 900; letter-spacing: -1px; box-shadow: 0 8px 20px rgba(140,21,21,.22); }
.brand-text strong { display: block; line-height: 1.05; font-size: 15px; }
.brand-text span { color: var(--muted); font-size: 12px; }
.nav-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a { padding: 9px 11px; border-radius: 999px; font-size: 14px; color: #374151; }
.nav-links a:hover, .nav-links a.active { background: #f3f4f6; color: var(--pku-red); }
.hero { background: radial-gradient(circle at 20% 10%, rgba(140,21,21,.14), transparent 30%), radial-gradient(circle at 80% 10%, rgba(35,58,139,.15), transparent 35%), linear-gradient(180deg, #fff, #f8fafc); border-bottom: 1px solid var(--line); }
.hero-inner { max-width: 1180px; margin: 0 auto; padding: 68px 22px 56px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--pku-red); font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 32px; height: 3px; border-radius: 99px; background: var(--pku-red); }
h1 { font-size: clamp(38px, 7vw, 72px); line-height: .96; margin: 16px 0 18px; letter-spacing: -0.055em; }
.hero p { font-size: 18px; color: #374151; max-width: 720px; }
.hero-card { background: rgba(255,255,255,.88); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); overflow: hidden; }
.hero-card img { width: 100%; max-height: 310px; object-fit: contain; background: white; padding: 22px; }
.hero-card-body { padding: 22px; border-top: 1px solid var(--line); }
.hero-card-body h3 { margin: 0 0 8px; }
.hero-actions { display:flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; border-radius: 999px; font-weight: 800; border: 1px solid var(--line); background: #fff; }
.btn.primary { background: var(--pku-red); color: #fff; border-color: var(--pku-red); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(15,23,42,.08); }
.container { max-width: 1180px; margin: 0 auto; padding: 42px 22px; }
.section-head { display:flex; justify-content:space-between; align-items:end; gap: 16px; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.05; letter-spacing: -.035em; margin: 0; }
.section-head p { color: var(--muted); max-width: 680px; margin: 8px 0 0; }
.grid { display: grid; gap: 18px; }
.grid.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 8px 25px rgba(15,23,42,.04); }
.card h3 { margin: 0 0 8px; font-size: 20px; }
.card p { color: #4b5563; margin: 0 0 14px; }
.kicker { color: var(--pku-red); font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.pill-row { display:flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pill { background: #f3f4f6; border: 1px solid #e5e7eb; color: #374151; border-radius: 999px; padding: 6px 9px; font-size: 12px; font-weight: 700; }
.feature-strip { background: var(--pku-dark); color: #fff; }
.feature-strip .container { padding-block: 34px; }
.stats { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.stat { border: 1px solid rgba(255,255,255,.16); border-radius: 18px; padding: 18px; background: rgba(255,255,255,.05); }
.stat strong { display:block; font-size: 30px; line-height:1; }
.stat span { color: #cbd5e1; font-size: 13px; }
.timeline { position: relative; display: grid; gap: 16px; }
.lecture-card { display:grid; grid-template-columns: 116px 1fr; gap: 18px; align-items:start; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: 0 8px 20px rgba(15,23,42,.04); }
.lecture-no { background: linear-gradient(135deg, var(--pku-red), var(--blue)); color: white; border-radius: 18px; min-height: 92px; display:flex; flex-direction:column; justify-content:center; align-items:center; font-weight: 900; }
.lecture-no span { font-size: 13px; opacity:.85; }
.lecture-no strong { font-size: 34px; line-height:1; }
.lecture-card h3 { margin: 0 0 6px; font-size: 22px; }
.lecture-card p { margin: 0 0 12px; color: #4b5563; }
ul.clean { margin: 10px 0 0; padding-left: 18px; color: #374151; }
.downloads { display:flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.downloads a { border: 1px solid var(--line); border-radius: 999px; padding: 8px 11px; font-size: 13px; font-weight: 800; background: #f9fafb; }
.downloads a:hover { color: var(--pku-red); background: #fff7ed; }
.table-wrap { overflow-x:auto; border: 1px solid var(--line); border-radius: 18px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f9fafb; color: #374151; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: none; }
.notice { background: #fff7ed; border: 1px solid #fed7aa; color: #7c2d12; border-radius: 16px; padding: 16px 18px; }
.staff-grid { display:grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.person { display:flex; gap: 16px; align-items:center; }
.avatar { width: 58px; height:58px; border-radius: 18px; background: linear-gradient(135deg, var(--pku-red), var(--blue)); color:white; display:grid; place-items:center; font-weight:900; }
.footer { border-top: 1px solid var(--line); background: #f9fafb; color: #4b5563; }
.footer .container { padding-block: 28px; display:flex; justify-content:space-between; gap:18px; flex-wrap:wrap; }
pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
pre { background: #111827; color: #e5e7eb; border-radius: 16px; padding: 16px; overflow:auto; }
@media (max-width: 860px) {
  .hero-inner, .grid.cards, .grid.two, .staff-grid, .stats { grid-template-columns: 1fr; }
  .section-head { display:block; }
  .lecture-card { grid-template-columns: 1fr; }
  .lecture-no { min-height: 68px; flex-direction: row; gap: 8px; justify-content:flex-start; padding-left: 18px; }
  .brand { min-width:auto; }
  .nav { align-items:flex-start; flex-direction:column; }
  .nav-links { justify-content:flex-start; }
}

/* ===== 2026 course material redesign ===== */

.timeline {
  display: grid;
  gap: 20px;
}

.lecture-card.modern {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 22px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96)),
    radial-gradient(circle at 100% 0%, rgba(140,21,21,0.10), transparent 30%);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.lecture-card.modern::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, var(--pku-red), var(--blue));
}

.lecture-card.modern.is-pending {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(248,250,252,0.98),
      rgba(248,250,252,0.98) 12px,
      rgba(241,245,249,0.98) 12px,
      rgba(241,245,249,0.98) 24px
    );
  opacity: 0.92;
}

.lecture-card.modern.is-pending::before {
  background: #cbd5e1;
}

.lecture-no {
  background: linear-gradient(135deg, var(--pku-red), var(--blue));
  color: white;
  border-radius: 20px;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 14px 28px rgba(140, 21, 21, 0.18);
}

.is-pending .lecture-no {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  box-shadow: none;
}

.lecture-no span {
  font-size: 13px;
  font-weight: 800;
  opacity: 0.88;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.lecture-no strong {
  font-size: 40px;
  line-height: 1;
  font-weight: 950;
}

.lecture-main h3,
.code-card.modern h3 {
  margin: 8px 0 8px;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.lecture-focus,
.code-card.modern p {
  color: #475569;
  font-size: 15.5px;
  margin-bottom: 14px;
}

.lecture-topline,
.code-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 850;
  border: 1px solid transparent;
}

.status.ready {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.status.pending {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}

.lab-line {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-left: 4px solid var(--gold);
  background: #fffbeb;
  border-radius: 12px;
  color: #475569;
}

.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.download-btn,
.downloads a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 850;
  border: 1px solid var(--pku-red);
  background: var(--pku-red);
  color: white;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.download-btn:hover,
.downloads a:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(140, 21, 21, 0.18);
  background: #7a1010;
  color: white;
}

.download-btn.disabled {
  cursor: not-allowed;
  border-color: #cbd5e1;
  background: #e2e8f0;
  color: #64748b;
  box-shadow: none;
}

.grid.cards[data-code] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.code-card.modern {
  position: relative;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background:
    radial-gradient(circle at 100% 0%, rgba(35,58,139,0.10), transparent 32%),
    #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
}

.code-card.modern::before {
  content: "</>";
  position: absolute;
  right: 22px;
  bottom: 16px;
  color: rgba(35, 58, 139, 0.08);
  font-size: 56px;
  font-weight: 950;
  letter-spacing: -0.08em;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 4px;
}

.pill {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 750;
}

.section-head {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.section-head h2 {
  background: linear-gradient(135deg, var(--pku-red), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (max-width: 860px) {
  .lecture-card.modern {
    grid-template-columns: 1fr;
  }

  .lecture-no {
    min-height: 72px;
    flex-direction: row;
    justify-content: flex-start;
    padding-left: 20px;
    gap: 10px;
  }

  .grid.cards[data-code] {
    grid-template-columns: 1fr;
  }
}

/* ===== layout fix for 1--15 course pages ===== */
html, body {
  overflow-x: hidden;
}

.container,
.page,
main {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.page {
  padding-left: 22px;
  padding-right: 22px;
}

.timeline,
.grid.cards,
.schedule-panel,
.table-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.lecture-card.modern,
.code-card.modern {
  max-width: 100%;
  box-sizing: border-box;
}

.lecture-topline,
.code-card-head {
  justify-content: flex-start;
}

.lecture-topline .status,
.code-card-head .status {
  margin-left: auto;
}

.table-wrap {
  overflow-x: auto;
}

.schedule-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
}

.schedule-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 13px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.schedule-table td {
  background: #ffffff;
  padding: 16px 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  vertical-align: top;
  color: #334155;
}

.schedule-table td:first-child {
  border-left: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px 0 0 16px;
  color: var(--pku-red);
  white-space: nowrap;
}

.schedule-table td:last-child {
  border-right: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0 16px 16px 0;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .schedule-table {
    min-width: 920px;
  }
}


/* ===== ros2-platform-page ===== */
.ros2-page {
  max-width: 1120px;
}

.ros2-hero {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: 42px;
  margin-bottom: 28px;
  color: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.30);
  background:
    radial-gradient(circle at 92% 12%, rgba(35,58,139,0.20), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 58%, #fff7ed 100%);
  box-shadow: 0 20px 54px rgba(15, 23, 42, 0.10);
}

.ros2-hero h1 {
  max-width: 820px;
  margin: 10px 0 14px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 0.96;
  letter-spacing: -0.055em;
  color: var(--pku-red);
}

.ros2-hero .lead {
  max-width: 820px;
  color: #475569;
  font-size: 18px;
  line-height: 1.7;
}

.download-btn.ghost {
  background: #ffffff;
  color: var(--pku-red);
  border-color: rgba(140, 21, 21, 0.35);
}

.ros2-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 26px 0;
}

.ros2-card,
.ros2-section {
  border: 1px solid rgba(148, 163, 184, 0.30);
  background: #ffffff;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.ros2-card h2,
.ros2-section h2 {
  margin: 0 0 12px;
  color: #111827;
  letter-spacing: -0.025em;
}

.ros2-card p,
.ros2-section p,
.steps li {
  color: #475569;
  line-height: 1.68;
}

.ros2-section {
  margin: 22px 0;
}

.module-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.module-list article {
  border-radius: 18px;
  padding: 18px;
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.95);
}

.module-list h3 {
  margin: 0 0 8px;
  color: var(--pku-red);
}

.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
}

.flow div {
  min-height: 84px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
  border: 1px solid rgba(148, 163, 184, 0.28);
  padding: 16px;
  font-weight: 900;
  color: #0f172a;
}

.flow small {
  display: block;
  margin-top: 6px;
  font-weight: 650;
  color: #64748b;
}

.flow span {
  color: var(--pku-red);
  font-weight: 950;
  font-size: 24px;
}

.steps {
  padding-left: 22px;
}

.steps li {
  margin: 14px 0;
}

pre {
  overflow-x: auto;
  border-radius: 16px;
  padding: 14px 16px;
  background: #0f172a;
  color: #e5e7eb;
}

code {
  border-radius: 7px;
  padding: 2px 6px;
  background: #f1f5f9;
  color: #8c1515;
  font-weight: 700;
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.warning-panel {
  border-color: rgba(217, 119, 6, 0.30);
  background: linear-gradient(135deg, #fffbeb, #ffffff);
}

@media (max-width: 900px) {
  .ros2-grid,
  .module-list {
    grid-template-columns: 1fr;
  }

  .flow {
    grid-template-columns: 1fr;
  }

  .flow span {
    text-align: center;
    transform: rotate(90deg);
  }

  .ros2-hero {
    padding: 28px;
  }
}
