:root{
  --bg: #ffffff;
  --text: #111827;   /* near black */
  --muted: #6b7280;  /* gray-500 */
  --border: #e5e7eb; /* gray-200 */
  --accent: #2563eb; /* clean blue accent to match simple coursework theme */
  --card: #ffffff;
  --shadow: 0 2px 10px rgba(17,24,39,.06);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.site-header {
  padding: 40px 0 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.back-link {
  display: inline-block;
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 10px;
}
.back-link:hover { text-decoration: underline; }

h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.lede {
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 70ch;
}

.grid {
  display: grid;
  gap: 22px;
  padding: 28px 0 40px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(17,24,39,.08);
  border-color: #d1d5db; /* gray-300 */
}

.media {
  aspect-ratio: 16 / 9;
  background: #f8fafc; /* light slate */
  border-bottom: 1px solid var(--border);
}
.media video,
.media iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  border-radius: 0;
  object-fit: cover;
}

/* Audio cards use flexible height instead of fixed 16:9 */
.audio-media {
  aspect-ratio: auto;
  padding: 12px 14px;
  display: flex;
  align-items: center;
}
.audio-media audio {
  width: 100%;
}

/* Helper for iframes that need a wrapper ratio box */
.ratio-16x9 {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}
.ratio-16x9 > iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.content {
  padding: 14px 16px 16px;
}

.title {
  margin: 0 0 6px;
  font-size: 1.1rem;
  letter-spacing: -0.005em;
}

.desc {
  margin: 0 0 10px;
  color: var(--text);
}

.meta {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.92rem;
  display: grid;
  gap: 2px;
}

.site-footer {
  padding: 22px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}
.site-footer a {
  color: var(--accent);
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }

/* Small screens polish */
@media (max-width: 420px){
  .content { padding: 12px; }
  .title { font-size: 1.05rem; }
}
