:root {
  --max-width: 1100px;
  --text: #111;
  --muted: #555;
  --rule: #eee;
}

html, body { height: 100%; margin: 0; padding: 0; }

body {
  font-family: Helvetica, Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
}

.layout {
  display: flex;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem;
  gap: 3rem;
  align-items: flex-start;
}

.sidebar {
  flex: 0 0 180px;
  position: sticky;
  top: 2rem;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.sidebar nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.sidebar nav a:hover {
  text-decoration: underline;
}
.sidebar nav a.active {
  color: var(--text);
  font-weight: bold;
}

.content {
  flex: 1;
  min-width: 0; /* lets long content shrink instead of overflowing the flex item */
  text-align: justify;
  text-justify: inter-word;
}

.content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

h1 { margin-top: 0; }

footer {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Sidebar moves above content and goes horizontal on narrow screens */
@media (max-width: 700px) {
  .layout {
    flex-direction: column;
    gap: 1.5rem;
  }
  .sidebar {
    position: static;
    flex: 0 0 auto;
  }
  .sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.25rem;
  }
}

/* Append this to style.css */

.videos {
  margin-top: 2rem;
}

.video-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.video-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
}

.video-card img {
  width: 100%;
  border-radius: 6px;
  display: block;
}

.video-title {
  font-size: 0.9rem;
  font-weight: bold;
  line-height: 1.3;
  text-align: left;
}

.video-card:hover .video-title {
  text-decoration: underline;
}
