/* ---------------------------------------------------------------
   CS 5187 — Software Analysis
   Blue theme. All colors and sizes are declared as CSS variables
   below so the whole page can be re-styled from one place.
   --------------------------------------------------------------- */

:root {
  /* Blue palette — tweak these to re-theme the whole site. */
  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-900: #1e3a8a;

  --text:        #1f2937;
  --text-muted:  #4b5563;
  --text-faint:  #6b7280;
  --bg:          #ffffff;
  --bg-alt:      #f8fafc;
  --border:      #e5e7eb;
  --accent:      var(--blue-700);
  --accent-soft: var(--blue-50);
  --deadline:    #b91c1c;

  --sidebar-w: 220px;
  --content-max: 1100px;
  --radius: 6px;
  --mono: "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* --- Layout: sidebar + main --------------------------------- */

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--accent-soft);
  border-right: 1px solid var(--border);
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar h1 {
  font-size: 18px;
  margin: 0 0 4px 0;
  color: var(--blue-900);
}
.sidebar .term {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.sidebar nav h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin: 18px 0 6px;
}
.sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}
.sidebar nav li {
  margin: 2px 0;
}
.sidebar nav a {
  display: block;
  padding: 3px 6px;
  border-radius: 4px;
  color: var(--text);
  font-size: 14px;
}
.sidebar nav a:hover {
  background: var(--blue-100);
  text-decoration: none;
}

/* --- Main content ------------------------------------------- */

main {
  flex: 1;
  padding: 32px 40px;
  max-width: var(--content-max);
}

header.course {
  border-bottom: 3px solid var(--accent);
  padding-bottom: 12px;
  margin-bottom: 24px;
}
header.course h1 {
  margin: 0;
  font-size: 28px;
  color: var(--blue-900);
}
header.course .subtitle {
  color: var(--text-muted);
  font-size: 15px;
  margin-top: 4px;
}

section { margin-bottom: 36px; }

section h2 {
  font-size: 20px;
  color: var(--blue-700);
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  margin-bottom: 12px;
}

.info-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 20px;
  font-size: 14px;
}
.info-grid dt {
  font-weight: 600;
  color: var(--text-muted);
}
.info-grid dd { margin: 0; }

/* --- Teaching assistants ------------------------------------ */

.ta-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.ta-card {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ta-photo {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-faint);
}
.ta-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ta-name { font-weight: 600; color: var(--text); }
.ta-info a {
  font-size: 13px;
  white-space: nowrap;
}

/* --- Schedule table ----------------------------------------- */

table.schedule {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  table-layout: fixed;
}

table.schedule th,
table.schedule td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  vertical-align: top;
  text-align: left;
}

table.schedule thead th {
  background: var(--blue-700);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

table.schedule tbody tr:nth-child(even) td {
  background: var(--bg-alt);
}

table.schedule td.week {
  background: var(--blue-100) !important;
  font-weight: 600;
  color: var(--blue-900);
  text-align: center;
  width: 60px;
}

.date {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.lec-title {
  font-weight: 600;
  color: var(--blue-700);
}

.tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 4px;
  vertical-align: middle;
}
.tag.reading  { background: var(--blue-50);  color: var(--blue-700); border: 1px solid var(--blue-200); }
.tag.hw       { background: #fef3c7;         color: #92400e;         border: 1px solid #fde68a; }
.tag.deadline { background: #fee2e2;         color: var(--deadline); border: 1px solid #fecaca; }
.tag.exam     { background: #ede9fe;         color: #5b21b6;         border: 1px solid #ddd6fe; }
.tag.holiday  { background: #f3f4f6;         color: #4b5563;         border: 1px solid #e5e7eb; }
.tag.topic    { background: var(--blue-700); color: #fff;            border: 1px solid var(--blue-700); }
.tag.paper    { background: #ecfdf5;         color: #065f46;         border: 1px solid #a7f3d0; }

.notes-slot { color: var(--text-faint); font-style: italic; }

.holiday td {
  background: #f9fafb !important;
  color: var(--text-faint);
  font-style: italic;
  text-align: center;
}

.due {
  color: var(--deadline);
  font-weight: 600;
}

/* Prep / notes list inside a cell */
.cell ul {
  margin: 6px 0 0;
  padding-left: 16px;
}
.cell li { margin: 2px 0; }

/* --- Lecture list (lectures.html) --------------------------- */

.week-block {
  margin-bottom: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.week-block header {
  background: var(--blue-100);
  padding: 8px 14px;
  font-weight: 600;
  color: var(--blue-900);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
}
.week-block header .range {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 13px;
}
.week-readings {
  background: var(--blue-50);
  padding: 8px 14px;
  border-bottom: 1px solid var(--blue-200);
  font-size: 13.5px;
}
.week-readings b { color: var(--blue-900); }
.week-readings ul { margin: 4px 0 0 18px; padding: 0; }

.lecture {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}
.lecture:first-of-type { border-top: none; }
.lecture h3 {
  margin: 0 0 6px 0;
  font-size: 15px;
  color: var(--blue-700);
}
.lecture .meta {
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.lecture dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 2px 12px;
  margin: 0;
  font-size: 13.5px;
}
.lecture dt {
  color: var(--text-muted);
  font-weight: 600;
}
.lecture dd { margin: 0; }

/* --- Footer -------------------------------------------------- */

footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-faint);
}

/* --- Responsive --------------------------------------------- */

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  main { padding: 20px; }
  table.schedule { font-size: 12px; }
}
