/* PHYS 480/581 General Relativity -- course page stylesheet
   Self-contained: does not depend on the main site's CSS.
   Edit the variables below to retheme. */

:root {
  --red: #ba0c2f;       /* UNM Cherry */
  --red-dark: #8f0924;
  --ink: #1b1f27;
  --ink-soft: #4b5262;
  --ink-faint: #7a8296;
  --bg: #f7f7f9;
  --surface: #ffffff;
  --border: #e4e4ea;
  --border-strong: #d3d3dc;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(20, 20, 30, 0.04), 0 8px 24px -12px rgba(20, 20, 30, 0.12);
  --content-width: 1180px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- top bar ---- */

#course-topbar {
  background: var(--ink);
  color: #fff;
}
#course-topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  font-size: 0.88em;
}
#course-topbar a { color: #fff; opacity: 0.85; }
#course-topbar a:hover { opacity: 1; }
#course-topbar .crumb-sep { opacity: 0.4; margin: 0 8px; }
#course-topbar .site-name { opacity: 0.6; }

/* ---- header ---- */

#course-header {
  background: var(--surface);
  border-bottom: 3px solid var(--red);
  padding: 2.4em 0 2em;
}
#course-header .eyebrow {
  display: inline-block;
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.6em;
}
#course-header h1 {
  font-size: clamp(1.6em, 3.4vw, 2.3em);
}
#course-header .subtitle {
  color: var(--ink-soft);
  font-size: 1.05em;
}

/* ---- notice banner ---- */

.notice {
  margin: 0 0 2em;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: #fdeceb;
  border: 1px solid #f6c6c1;
  color: var(--red-dark);
  font-weight: 600;
}

/* ---- layout ---- */

#course-body {
  padding: 2.6em 0 4em;
}

.layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

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

.sidebar {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

@media (max-width: 860px) {
  .sidebar { position: static; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}

.card h2 {
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.9em;
}

.people dl {
  margin: 0;
}
.people .person + .person {
  margin-top: 1.1em;
  padding-top: 1.1em;
  border-top: 1px solid var(--border);
}
.people .role {
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 2px;
}
.people .name { font-weight: 600; }
.people .detail { color: var(--ink-soft); font-size: 0.92em; }

.quicklinks ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.quicklinks a {
  color: var(--ink);
  font-weight: 500;
}
.quicklinks a:hover { color: var(--red); }

.textbooks .book { margin-bottom: 14px; }
.textbooks .book:last-child { margin-bottom: 0; }
.textbooks .book-label {
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 2px;
}

.grade-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.grade-list li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  color: var(--ink-soft);
}
.grade-list li:first-child { border-top: none; }
.grade-list .pct {
  flex: none;
  width: 3.2em;
  font-weight: 700;
  color: var(--red);
}

/* ---- main content sections ---- */

.content section,
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
  margin-bottom: 22px;
}

.content section > h2,
.panel > h2 {
  font-size: 1.15em;
  padding-bottom: 0.6em;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.9em;
}

.content section p,
.panel p { color: var(--ink-soft); }
.content section p + h3 { margin-top: 1.2em; }
.content h3 {
  font-size: 1em;
  margin-bottom: 0.4em;
}

/* ---- tables ---- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

table.schedule {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92em;
  min-width: 760px;
}

table.schedule caption {
  text-align: left;
  caption-side: top;
}

table.schedule th {
  background: var(--red);
  color: #fff;
  font-size: 0.82em;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: left;
  padding: 10px 14px;
  white-space: nowrap;
}

table.schedule td {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  vertical-align: top;
}

table.schedule tbody tr:nth-child(even) { background: #fbfbfc; }
table.schedule tbody tr:hover { background: #fdf2f1; }

table.schedule .week { font-weight: 600; white-space: nowrap; }
table.schedule .highlight td { background: #fdeceb; color: var(--red-dark); font-weight: 600; }
table.schedule ul.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ---- footer ---- */

#course-footer {
  border-top: 1px solid var(--border);
  padding: 2em 0;
  color: var(--ink-faint);
  font-size: 0.85em;
  text-align: center;
}
#course-footer a { color: var(--ink-faint); text-decoration: underline; }
