/* style.css – Plourples! retro dot-com aesthetic */

:root {
  --border: #000;
  --bg: #fff;
  --text: #000;
  --link: #0000ee;
  --link-visited: #551a8b;
  --accent: #660099;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Times New Roman", Georgia, serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
}

img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between; /* logo left, placeholder center, splash right */
  padding: 10px 20px;
  background: url("felt.png") repeat;
  border-bottom: 2px solid var(--border);
}

header .logo {
  flex-shrink: 0;
  margin-right: 20px;
}

header .logo img {
  max-height: 70px;  /* adjust to taste */
  width: auto;       /* keep aspect ratio */
  display: block;
}

header .placeholder {
  flex: 1;
  text-align: center;
}

header .tagline {
  font-size: 1.2rem;
  font-weight: bold;
  color: #000;
  margin-left: 20px;
  white-space: nowrap;
}

/* Navigation */
nav {
  background: #ddd;
  border-bottom: 2px solid var(--border);
  padding: 5px;
  text-align: center;
}

nav a {
  color: var(--link);
  text-decoration: none;
  margin: 0 10px;
  font-weight: bold;
}

nav a:visited {
  color: var(--link-visited);
}

/* Wrapper layout */
.wrap {
  display: flex;
}

/* Sidebar */
aside {
  width: 200px;
  background: url("felt.png") repeat;
  padding: 10px;
  border-right: 2px solid var(--border);
  color: #000;
}

/* Sidebar groups */
.sidemenu-grid {
  display: block; /* desktop vertical layout */
}

.sidemenu-grid .group {
  margin-bottom: 20px;
}

.sidemenu-grid .group strong {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
}

.sidemenu-grid .group a {
  display: block;
  margin: 2px 0;
  color: #000;
  text-decoration: none;
  font-size: 0.9em;
}

.sidemenu-grid .group a:hover {
  text-decoration: underline;
}

.sidebar-placeholder {
  margin-top: 20px;
  font-family: monospace;
  min-height: 1.5em;
}

/* Main content */
main {
  flex: 1;
  padding: 20px;
}

/* Sections */
.section {
  margin-bottom: 20px;
  border: 2px solid var(--border);
}

.section .head {
  background: #ccc;
  font-weight: bold;
  padding: 4px;
  border-bottom: 2px solid var(--border);
}

/* Card layout */
.cards {
  display: flex;
  flex-wrap: wrap;       /* allows cards to move to next line */
  gap: 10px;             /* spacing between cards */
}

.card {
  flex: 0 0 calc(25% - 10px);  /* 4 cards per row minus gap */
  box-sizing: border-box;
  min-height: 200px;            /* consistent height */
  border: 2px solid var(--border);
  padding: 8px;
  text-align: center;
  font-size: 1em;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;  /* align content to top */
}

.card .thumb {
  margin-bottom: 6px;
  border-bottom: 2px solid var(--border); /* polaroid line */
  padding-bottom: 4px;
}

.card .thumb-link {
  text-decoration: none; /* removes default underline */
  color: inherit;
}

.card .thumb-link img {
  width: 100%;
  height: auto;
  max-height: 180px;
  display: block;
  object-fit: contain;
  margin-left: auto;
  margin-right: auto;
}

.card .thumb-link p {
  margin: 4px 0 2px 0;
  font-weight: bold;
  color: var(--text);
  text-decoration: none;
}

.card .thumb-link:hover p {
  text-decoration: underline;
}

.card .type {
  font-size: 0.9em;
  color: var(000);
  font-weight: bold;
}

.card .type a {
  color: var(--link);
  text-decoration: none;
}

.card .type a:hover {
  text-decoration: underline;
}

.footnote {
  font-size: 0.8em;       /* smaller text */
  color: #666666;         /* grey shade */
  display: block;         /* ensure it sits on its own line */
  margin-top: 4px;        /* optional spacing from paragraph above */
}

/* Video embeds */
.video-container {
  text-align: center;
  margin: 15px auto 0 auto;
}

.video-container iframe {
  width: 560px;
  height: 315px;
  border: 0;
}

/* Footer */
footer {
  border-top: 2px solid var(--border);
  padding: 10px;
  text-align: center;
  font-size: 0.8em;
  background: #eee;
}

/* Mobile responsiveness */
@media (max-width: 700px) {

  /* Stack wrapper vertically */
  .wrap {
    flex-direction: column;
  }

  /* Sidebar full-width on mobile */
  aside {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid var(--border);
  }

  /* Cards stack vertically */
  .card {
    flex: 1 1 100%; /* full width on mobile */
    min-height: auto;
  }

  /* Sidebar 2x2 grid */
  .sidemenu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .sidemenu-grid .group {
    margin-bottom: 0;
  }

  /* Header stacks vertically */
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  header .logo,
  header .placeholder,
  header .tagline {
    margin: 5px 0;
    text-align: center;
  }

  header .tagline {
    font-size: 1em;
  }

  /* Mobile video embed fix */
  .video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
  }

  .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}
