/* CS 448Z: Physically Based Animation and Sound -- Spring 2026 */

:root {
  --cardinal: #8C1515;
  --cardinal-light: #B83A3A;
  --cardinal-bg: #FDF6F6;
  --text: #2D2D2D;
  --text-light: #666;
  --bg: #FAFAFA;
  --white: #FFFFFF;
  --border: #E0E0E0;
  --max-width: 750px;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Source Serif 4', 'Georgia', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--text);
  line-height: 1.3;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--cardinal);
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

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

p { margin: 0 0 1rem; }

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: #F0F0F0;
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

/* Header */
header {
  background: var(--white);
  border-bottom: 3px solid var(--cardinal);
  padding: 2.5rem 0 2rem;
  margin-bottom: 2rem;
}

header .course-number {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cardinal);
  margin: 0 0 0.15rem;
}

header .subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-light);
  margin: 0.25rem 0 0.5rem;
  letter-spacing: 0.02em;
}

header .instructor {
  font-size: 1.05rem;
  margin: 0 0 1.5rem;
}

header figure {
  margin: 0 0 -0.75rem;
}

header figure img {
  width: 100%;
  max-width: 100%;
  border-radius: 4px;
}

/* Nav */
nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0.4rem 0;
  margin-top: -0.75rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

nav a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}
nav a:hover {
  color: var(--cardinal);
  text-decoration: none;
}

/* Logistics (definition list) */
dl.logistics {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.5rem 1rem;
  margin: 0;
}

dl.logistics dt {
  font-weight: 700;
  color: var(--text);
}

dl.logistics dd {
  margin: 0;
}

/* Project cards */
.project-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  background: var(--white);
}

.project-card .project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

.project-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.project-card .weight {
  font-weight: 700;
  color: var(--cardinal);
  font-size: 0.95rem;
  white-space: nowrap;
}

.project-card .meta {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.3rem;
}

.project-card p:last-child {
  margin-bottom: 0;
}

/* Schedule table */
.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}

table.schedule {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.5;
}

table.schedule thead th {
  background: var(--cardinal);
  color: var(--white);
  font-weight: 600;
  text-align: left;
  padding: 0.65rem 0.75rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

table.schedule td {
  padding: 0.6rem 0.75rem;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

table.schedule tr:nth-child(even) td {
  background: #F7F7F7;
}

table.schedule td:first-child {
  white-space: nowrap;
  font-weight: 500;
  width: 100px;
}

table.schedule tr.highlight td {
  background: var(--cardinal-bg);
  border-left: 3px solid var(--cardinal);
}

table.schedule .topic-img {
  display: block;
  max-width: 180px;
  margin: 0.5rem 0;
  border-radius: 3px;
}

/* Details (collapsible reading lists) */
table.schedule details {
  margin-top: 0.5rem;
}

table.schedule details summary {
  cursor: pointer;
  color: var(--cardinal);
  font-weight: 500;
  font-size: 0.88rem;
}
table.schedule details summary:hover {
  color: var(--cardinal-light);
}

table.schedule details ul {
  margin: 0.4rem 0 0 1rem;
  padding: 0;
  font-size: 0.88rem;
}

table.schedule details li {
  margin-bottom: 0.35rem;
}

/* Topics list */
.topics-list {
  columns: 2;
  column-gap: 2rem;
  list-style: disc;
  padding-left: 1.25rem;
}

.topics-list li {
  margin-bottom: 0.4rem;
  break-inside: avoid;
}

/* Grading table */
table.grading {
  width: 100%;
  max-width: 400px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

table.grading th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid var(--cardinal);
  font-weight: 600;
}

table.grading td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

table.grading td:last-child {
  text-align: right;
  font-weight: 600;
}

/* AI Policy callout */
.policy-box {
  border-left: 4px solid var(--cardinal);
  background: var(--cardinal-bg);
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.policy-box p:last-child { margin-bottom: 0; }

/* Demos */
.demo-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
}

.demo-item img {
  width: 120px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Utilities */
.text-muted { color: var(--text-light); }
.text-small { font-size: 0.875rem; }

/* Footer */
footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-light);
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .container { padding: 0 0.5rem; }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.2rem; }

  dl.logistics {
    grid-template-columns: 1fr;
    gap: 0.2rem 0;
  }
  dl.logistics dt { margin-top: 0.5rem; }

  nav ul { gap: 0.2rem 0.75rem; }
  nav a { font-size: 0.8rem; }

  .topics-list { columns: 1; }

  table.schedule { font-size: 0.85rem; }
  table.schedule td:first-child { width: auto; }

  .project-card .project-header {
    flex-direction: column;
    gap: 0.2rem;
  }
}
