/* CS310/5102 Course Website Styles */
:root {
  --bg: #0f172a;
  --panel: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #38bdf8;
  --accent-2: #a78bfa;
  --danger: #ef4444;
  --border: #1f2937;
  --badge-bg: #1f2937;
  --header-height: 72px;
}
/* Light theme */
:root[data-theme="light"] {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #334155;
  --accent: #0ea5e9;
  --accent-2: #6d28d9;
  --danger: #b91c1c;
  --border: #e5e7eb;
  --badge-bg: #e5e7eb;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Noteworthy", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
html { scroll-behavior: smooth; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 1.25rem; }
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(17,24,39,0.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.root[data-theme="light"] .header {}
:root[data-theme="light"] .header { background: rgba(255,255,255,0.85); }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1.25rem; }
.brand { font-weight: 700; letter-spacing: 0.5px; color: var(--text); }
.nav ul { list-style: none; display: flex; gap: 1rem; padding: 0; margin: 0; }
.nav li a { color: var(--text); padding: 0.5rem 0.75rem; border-radius: 6px; }
.nav li a:hover { background: #1f2937; }
.nav li a.active { outline: 2px solid var(--accent); }
.theme-toggle { color: var(--text); background: #1f2937; border: 1px solid #334155; padding: 0.4rem 0.6rem; border-radius: 6px; }
:root[data-theme="light"] .nav li a:hover { background: #e5e7eb; }
:root[data-theme="light"] .theme-toggle { background: #e5e7eb; border-color: #cbd5e1; }

.hero { padding: 2rem 1.25rem; background: var(--panel); color: var(--text); margin-top: var(--header-height); }
.hero h1 { margin: 0 0 0.25rem 0; font-size: 2rem; }
.hero p { margin: 0.25rem 0; color: var(--muted); }

.main { padding: 1.25rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; }
.card h3 { margin: 0 0 0.5rem 0; }
.small { color: var(--muted); font-size: 0.95rem; }
.kicker { color: var(--accent-2); font-weight: 600; font-size: 0.9rem; }
.table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 12px; overflow: hidden; }
.table th, .table td { padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border); text-align: left; }
.table th { background: #0b1020; color: var(--text); }
:root[data-theme="light"] .table th { background: #f1f5f9; color: var(--text); }
.badge { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 999px; background: var(--badge-bg); color: var(--text); font-size: 0.8rem; }

.footer { padding: 1.25rem; border-top: 1px solid var(--border); color: var(--muted); }

.section-title { margin: 0.5rem 0 0.75rem; font-size: 1.35rem; }
.subtitle { color: var(--muted); margin-bottom: 0.5rem; }
.notice { background: var(--panel); border-left: 4px solid var(--accent); padding: 0.75rem; border-radius: 8px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }

.view { display: block; scroll-margin-top: var(--header-height); }

.list { margin: 0.25rem 0 0.75rem; padding-left: 1rem; }
.list li { margin: 0.25rem 0; }

blockquote.sample { border-left: 4px solid var(--accent); margin: 0; padding-left: 0.75rem; color: var(--muted); font-size: 0.95rem; }

.header .toggle { display: none; }
@media (max-width: 900px) {
  .header .toggle { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text); background: var(--panel); border: 1px solid var(--border); padding: 0.4rem 0.6rem; border-radius: 6px; }
  .nav ul { display: none; }
  .nav.open ul { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.75rem; }
}
