/* ==================================================
   COLORS
================================================== */

:root {
  --paper: #f8f3e9;
  --text: #272727;
  --muted-text: #5f5952;
  --accent: #a72f38;
  --accent-dark: #5e151c;
  --line: #9b9185;
  --wood: #70472f;
  --wood-light: #9a6b49;
  --wood-dark: #3c261a;
}


/* ==================================================
   GENERAL SETTINGS
================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  padding: 34px;

  color: var(--text);

  font-family: "American Typewriter", "Times New Roman", serif;
  font-size: 18px;

  background-image:
    linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18)),
    url("Links_and_Images/images/background.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}


/* ==================================================
   PAGE LAYOUT
================================================== */

.page {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}


/* ==================================================
   SITE HEADER
================================================== */

.menu {
  min-height: 128px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--paper);
}

.menu h1 {
  padding: 16px;

  font-family: "American Typewriter", "Courier New", monospace;
  font-size: 3.7rem;
  font-weight: normal;
  letter-spacing: 3px;
  text-align: center;

  text-shadow: 3px 3px 0 var(--accent);
}


/* ==================================================
   TOP NAVIGATION
================================================== */

.top-navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 18px;

  margin-bottom: 10px;
  padding: 15px 22px;

  font-family: "Courier New", monospace;
  font-size: 0.82rem;

  background-color: var(--paper);
  border: 1px solid var(--accent);
}

.top-navigation a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.top-navigation a:hover,
.top-navigation a:focus-visible,
.top-navigation a.active {
  color: var(--paper);
  background-color: var(--accent);
  outline: 0;
}

.top-navigation span {
  color: var(--accent);
  font-size: 0.7rem;
}


/* ==================================================
   SIDEBARS AND MAIN CONTENT
================================================== */

.main-area {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 170px;
  gap: 10px;
  min-height: 560px;
}

.home-sidebar {
  min-width: 0;
  min-height: 20%;
  max-height: 360px;

  background-color: rgba(248, 243, 233, 0.94);
  border: 1px solid var(--accent);
}

.chat-sidebar {
  padding: 18px 12px;
  min-height: 20%;
  max-height: 565px;

  font-family: "Courier New", monospace;
  text-align: center;
}

.chat-toggle,
.chat-toggle-label {
  display: none;
}

.chat-sidebar h2 {
  margin-bottom: 14px;
  padding-bottom: 10px;

  color: var(--accent);

  font-size: 0.95rem;
  letter-spacing: 1px;

  border-bottom: 1px dotted var(--line);
}

.chat-sidebar h2::after {
  display: none;
}

.cbox-frame {
  display: block;

  width: 100%;
  height: 450px;

  background-color: #ffffff;
  border: 0;
}

.chat-quick-link {
  display: inline-block;

  margin-top: 12px;

  color: var(--accent);

  font-size: 0.68rem;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.chat-quick-link:hover,
.chat-quick-link:focus-visible {
  color: var(--paper);
  background-color: var(--accent);
  outline: 0;
}

.content {
  min-width: 0;
  padding: 42px 38px;

  overflow-wrap: break-word;

  background-color: var(--paper);
  border: 1px solid var(--accent);
}

.content section {
  margin-bottom: 38px;
  padding-bottom: 38px;

  border-bottom: 1px dotted var(--line);
}

.content section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}


/* ==================================================
   HEADINGS AND TEXT
================================================== */

h2,
h3,
h4,
h5,
h6 {
  font-family: "Courier New", monospace;
}

h2 {
  position: relative;

  margin-bottom: 20px;
  padding-bottom: 8px;

  font-size: 1.45rem;
  letter-spacing: 1px;
}

h2::after {
  content: "";

  position: absolute;
  bottom: 0;
  left: 0;

  width: 58px;
  height: 2px;

  background-color: var(--accent);
}

h3 {
  margin: 25px 0 15px;

  color: var(--accent);

  font-size: 1.1rem;
}

p {
  margin-bottom: 22px;
  line-height: 1.75;
}

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


/* ==================================================
   LISTS
================================================== */

ul,
ol {
  margin: 10px 0 20px 28px;
  line-height: 1.9;
}

ul {
  list-style-type: square;
}

ul li::marker {
  color: var(--accent);
}

ol {
  list-style-type: lower-roman;
}


/* ==================================================
   LINKS
================================================== */

.content a:link,
.footer a:link {
  color: var(--accent);

  font-weight: bold;
  text-decoration: none;

  border-bottom: 1px dotted var(--accent);
}

.content a:visited,
.footer a:visited {
  color: #70414a;
}

.content a:hover,
.footer a:hover {
  color: var(--paper);
  background-color: var(--accent);
  border-bottom-color: transparent;
}

.content a:active,
.footer a:active {
  color: var(--paper);
  background-color: var(--accent-dark);
}


/* ==================================================
   FOOTER
================================================== */

.footer {
  min-height: 80px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-top: 10px;
  padding: 18px 28px;

  color: var(--muted-text);
  background-color: rgba(248, 243, 233, 0.94);
  border: 1px solid var(--accent);
}

.footer p {
  margin: 0;

  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  text-align: center;
}


/* ==================================================
   FAVORITE MOVIES
================================================== */

.movie-list li {
  margin-bottom: 18px;
}

.movie-list li:last-child {
  margin-bottom: 0;
}

.movie-comment {
  display: block;

  margin-top: 4px;

  color: var(--muted-text);

  font-size: 0.95rem;
  line-height: 1.5;
}

/* ==================================================
   FAVORITE SERIES
================================================== */

.series-list li {
  margin-bottom: 18px;
}

.series-list li:last-child {
  margin-bottom: 0;
}

.series-comment {
  display: block;

  margin-top: 4px;

  color: var(--muted-text);

  font-size: 0.95rem;
  line-height: 1.5;
}

/* ==================================================
   FAVORITE GAMES
================================================== */

.game-list li {
  margin-bottom: 18px;
}

.game-list li:last-child {
  margin-bottom: 0;
}

.game-comment {
  display: block;

  margin-top: 4px;

  color: var(--muted-text);

  font-size: 0.95rem;
  line-height: 1.5;
}


/* ==================================================
   BUTTONS AND BADGES
================================================== */

.badge-link {
  display: inline-block;
  border-bottom: 0 !important;
}

.badge-link:hover {
  background-color: transparent !important;
}

.site-badge {
  display: block;

  max-width: 100%;
  height: auto;
}

.button-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 14px;

  padding: 14px;

  background-color: rgba(255, 255, 255, 0.24);
  border: 1px dotted var(--line);
}

.neighbor-button {
  display: block;

  width: 88px;
  height: 31px;

  image-rendering: pixelated;
}

.button-entry p {
  margin: 0;

  color: var(--muted-text);

  font-family: "Courier New", monospace;
  font-size: 0.76rem;
  line-height: 1.55;
}

.button-entry .badge-link:focus-visible {
  outline: 2px dotted var(--accent);
  outline-offset: 3px;
}


/* ==================================================
   INTEREST BUTTONS
================================================== */

.interest-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.floating-interest-buttons {
  justify-content: center;

  margin-top: 10px;
}

.interest-button:link,
.interest-button:visited {
  display: block;

  border: 0;
}

.interest-button:focus-visible {
  outline: 2px dotted var(--accent);
  outline-offset: 3px;
}

.interest-button img {
  display: block;

  width: 88px;
  height: 31px;

  image-rendering: pixelated;
}

/* ==================================================
   RIGHT SIDEBAR LINKS
================================================== */

.right-sidebar{
  min-width: 0;
  
  display: flex;
  flex-direction: column;
  gap: 10px;
  
  align-self: start;
}

.sidebar-link-box {
  padding: 20px 16px;
  
  font-family: "Courier New", monospace;
  text-align: center;
  
  background-color: rgba(248, 243, 233, 0.94);
  border: 1px solid var(--accent);
}

.sidebar-link-box h2 {
  margin-bottom: 12px;
  padding-bottom: 10px;
  
  color: var(--accent);
  
  font-size: 0.95rem;
  letter-spacing: 1px;
  
  border-bottom: 1px dotted var(--line);
}

.sidebar-link-box h2::after {
  display: none;
}

.sidebar-link-box p {
  margin-bottom: 14px;
  
  color: var(--muted-text);
  
  font-size: 0.74rem;
  line-height: 1.5;
}

.sidebar-feature-link {
  display: block;
  
  padding: 10px 8px;
  
  color: var(--accent);
  
  font-size: 0.72rem;
  font-weight: bold;
  line-height: 1.4;
  text-decoration: none;
  
  border: 1px solid var(--accent);
}

.sidebar-feature-link:link,
.sidebar-feature-link:visited {
  color: var(--paper);
  background-color: var(--accent);
}

.sidebar-feature-link:hover,
.sidebar-feature-link:focus-visible {
  color: var(--accent);
  background-color: transparent;
  outline: 0;
}


/* ==================================================
   CURRENT MOOD
================================================== */

.mood-box {
  padding-bottom: 16px;
}

.imood-link {
  display: inline-block;

  margin-bottom: 14px;

  line-height: 0;
}

.imood-indicator {
  display: block;

  max-width: 100%;
  height: auto;
}

.imood-link:hover,
.imood-link:focus-visible {
  outline: 2px dotted var(--accent);
  outline-offset: 4px;
}

/* ==================================================
   GUESTBOOK
================================================== */

.guestbook-sidebar {
  padding: 24px 16px;
}

.guestbook-box {
  font-family: "Courier New", monospace;
  text-align: center;
}

.guestbook-box h2 {
  margin-bottom: 14px;
  padding-bottom: 10px;

  color: var(--accent);

  font-size: 0.95rem;
  letter-spacing: 1px;

  border-bottom: 1px dotted var(--line);
}

.guestbook-box h2::after {
  display: none;
}

.guestbook-box p {
  margin-bottom: 16px;

  color: var(--muted-text);

  font-size: 0.78rem;
  line-height: 1.5;
}

.guestbook-link {
  display: block;

  padding: 10px 8px;

  color: var(--paper);

  font-size: 0.72rem;
  font-weight: bold;
  line-height: 1.4;
  text-decoration: none;

  background-color: var(--accent);
  border: 1px solid var(--accent);
}

.guestbook-link:hover,
.guestbook-link:focus-visible {
  color: var(--accent);
  background-color: transparent;
  outline: 0;
}

.site-button-box {
  margin-top: 28px;
  padding-top: 24px;

  font-family: "Courier New", monospace;
  text-align: center;

  border-top: 1px dotted var(--line);
}

.site-button-box h2 {
  margin-bottom: 14px;

  color: var(--accent);

  font-size: 0.95rem;
  letter-spacing: 1px;
}

.site-button-box h2::after {
  display: none;
}

.own-button-link {
  display: inline-block;
  border: 0;
}

.own-site-button {
  display: block;

  width: 88px;
  height: 31px;

  image-rendering: pixelated;
}

.site-button-box p {
  margin-top: 10px;

  color: var(--muted-text);

  font-size: 0.68rem;
  line-height: 1.4;
}

.own-button-link:hover,
.own-button-link:focus-visible {
  outline: 2px dotted var(--accent);
  outline-offset: 3px;
}


/* ==================================================
   MEDIA SHELF
================================================== */

.collection-index-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.content .collection-card:link,
.content .collection-card:visited {
  min-width: 0;
  min-height: 165px;

  display: flex;
  flex-direction: column;

  padding: 15px 14px;

  color: var(--text);

  font-family: "Courier New", monospace;
  font-weight: normal;
  text-decoration: none;

  background-color: rgba(255, 255, 255, 0.28);
  border: 1px solid var(--line);
}

.content .collection-card:hover,
.content .collection-card:focus-visible {
  color: var(--paper);
  background-color: var(--accent);
  border-color: var(--accent);
  outline: 0;
}

.collection-card h3 {
  margin: 12px 0 10px;

  color: var(--accent);

  font-size: 1rem;
}

.collection-card:hover h3,
.collection-card:focus-visible h3 {
  color: var(--paper);
}

.collection-card p {
  margin-bottom: 16px;

  color: var(--muted-text);

  font-size: 0.76rem;
  line-height: 1.55;
}

.collection-card:hover p,
.collection-card:focus-visible p {
  color: var(--paper);
}

.collection-open {
  margin-top: auto;

  font-size: 0.68rem;
  font-weight: bold;
  text-transform: uppercase;
}

.collection-kicker {
  margin-bottom: 8px;

  color: var(--accent);

  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.collection-credit {
  margin-top: 20px;
  margin-bottom: 0;

  color: var(--muted-text);

  font-family: "Courier New", monospace;
  font-size: 0.68rem;
  line-height: 1.5;
  text-align: right;
}

.shelf-row {
  position: relative;

  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(125px, 150px));
  align-items: start;
  justify-content: start;
  gap: 26px 16px;

  padding: 28px 30px 46px;

  background:
    repeating-linear-gradient(
      90deg,
      rgba(112, 71, 47, 0.05) 0,
      rgba(112, 71, 47, 0.05) 1px,
      transparent 1px,
      transparent 42px
    ),
    #e9dfd0;
  border: 1px solid var(--wood-dark);
  box-shadow:
    inset 12px 0 0 var(--wood),
    inset -12px 0 0 var(--wood),
    inset 0 12px 0 var(--wood-light),
    0 7px 0 rgba(39, 39, 39, 0.22);
}

.shelf-row::after {
  content: "";

  position: absolute;
  right: -6px;
  bottom: -2px;
  left: -6px;

  height: 25px;

  background:
    repeating-linear-gradient(
      4deg,
      transparent 0,
      transparent 5px,
      rgba(60, 38, 26, 0.18) 6px,
      transparent 7px
    ),
    linear-gradient(
      90deg,
      var(--wood-dark),
      var(--wood-light) 18%,
      var(--wood) 55%,
      var(--wood-dark)
    );
  border: 1px solid var(--wood-dark);
  box-shadow: 0 5px 0 rgba(39, 39, 39, 0.25);
}

.media-item {
  min-width: 0;

  background-color: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 2px 3px 0 rgba(39, 39, 39, 0.16);
}

.media-item summary {
  display: block;
  padding: 10px;

  font-family: "Courier New", monospace;

  cursor: pointer;
  list-style: none;
}

.media-item summary::-webkit-details-marker {
  display: none;
}

.media-item summary::after {
  content: "+ details";

  display: block;
  margin-top: 9px;

  color: var(--accent);

  font-size: 0.62rem;
  text-align: right;
  text-transform: uppercase;
}

.media-item[open] summary::after {
  content: "− close";
}

.media-item summary:hover,
.media-item summary:focus-visible {
  background-color: rgba(167, 47, 56, 0.08);
  outline: 2px var(--accent);
  outline-offset: -5px;
}

.media-cover-placeholder,
.media-cover {
  width: 100%;
  aspect-ratio: 1;
}

.media-cover-placeholder {
  display: grid;
  place-items: center;

  color: var(--muted-text);

  font-size: 0.62rem;
  letter-spacing: 1px;
  text-transform: uppercase;

  background:
    linear-gradient(
      135deg,
      transparent 49%,
      rgba(167, 47, 56, 0.18) 50%,
      transparent 51%
    ),
    #e8dfd2;
  border: 1px dashed var(--line);
}

.media-cover {
  display: block;
  height: auto;
  object-fit: cover;

  border: 1px solid var(--line);
}

.cd-collection .media-cover {
  aspect-ratio: 1 / 1;
}

.book-collection .media-cover-placeholder,
.book-collection .media-cover {
  aspect-ratio: 2 / 3;
}

.media-caption {
  display: block;
  margin-top: 10px;

  color: var(--text);

  font-size: 0.72rem;
  font-weight: bold;
  line-height: 1.35;
  text-align: center;
}

.media-details {
  padding: 14px 16px 16px;

  font-family: "Courier New", monospace;

  border-top: 1px dotted var(--line);
}

.media-details h3 {
  margin: 0 0 12px;

  font-size: 1rem;
}

.media-details dl {
  margin-bottom: 14px;
}

.media-details dl div {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 8px;

  padding: 6px 0;

  font-size: 0.72rem;

  border-bottom: 1px dotted rgba(155, 145, 133, 0.65);
}

.media-details dt {
  color: var(--accent);
  font-weight: bold;
}

.media-details dd {
  min-width: 0;
  margin: 0;
}

.media-details p {
  margin: 0;

  color: var(--muted-text);

  font-size: 0.74rem;
  line-height: 1.6;
}

.media-details .media-source-link {
  margin-top: 12px;

  font-size: 0.68rem;
}

.media-item[open] {
  grid-column: 1 / -1;

  display: grid;
  grid-template-columns: minmax(125px, 160px) minmax(0, 1fr);
  align-items: start;
  gap: 14px;

  background-color: transparent;
  border: 0;
  box-shadow: none;
}

.media-item[open] > summary {
  background-color: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 2px 3px 0 rgba(39, 39, 39, 0.16);
}

.media-item[open] .media-details {
  background-color: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 2px 3px 0 rgba(39, 39, 39, 0.16);
}


/* ==================================================
   404 PAGE
================================================== */

.not-found-content {
  display: flex;
  align-items: center;
}

.not-found-card {
  width: 100%;
  text-align: center;
}

.error-code {
  margin-bottom: 10px;

  color: var(--accent);

  font-family: "Courier New", monospace;
  font-size: 7rem;
  font-weight: bold;
  line-height: 0.9;
  letter-spacing: -6px;

  text-shadow: 4px 4px 0 rgba(39, 39, 39, 0.15);
}

.not-found-card h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.error-message {
  font-size: 1.1rem;
  font-weight: bold;
}

.error-log {
  margin: 28px 0;
  padding: 20px 24px;

  color: #d7d1c8;

  font-family: "Courier New", monospace;
  font-size: 0.82rem;
  text-align: left;

  background-color: #242424;
  border-left: 4px solid var(--accent);
}

.error-log p {
  margin-bottom: 8px;
  line-height: 1.5;
}

.error-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;

  margin-top: 28px;

  font-family: "Courier New", monospace;
}


/* ==================================================
   NARROW SCREENS
================================================== */

@media (max-width: 800px) {
  body {
    padding: 16px;
    background-attachment: scroll;
  }

  .main-area {
    grid-template-columns: 190px minmax(0, 1fr) 140px;
  }

  .content {
    padding: 32px 24px;
  }

  .media-item[open] {
    display: block;
  }

  .media-item[open] > summary {
    width: min(160px, 100%);
    margin-bottom: 12px;
  }
}

@media (max-width: 620px) {
  body {
    padding: 12px;
    font-size: 16px;
  }

  .menu {
    min-height: 105px;
  }

  .menu h1 {
    font-size: 2.6rem;
  }

  .top-navigation {
    gap: 9px 12px;
  }

  .top-navigation span {
    display: none;
  }

  .main-area {
    grid-template-columns: 1fr;
  }

  .home-sidebar {
    min-height: 80px;
  }

  .chat-sidebar {
    min-height: 0;
    max-height: none;
    padding: 0;
  }

  .chat-toggle {
    position: absolute;

    display: block;
    width: 1px;
    height: 1px;

    opacity: 0;
  }

  .chat-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 15px 18px;

    color: var(--accent);

    font-family: "Courier New", monospace;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 1px;

    cursor: pointer;
    user-select: none;
  }

  .chat-toggle-label::after {
    content: "+ OPEN";

    font-size: 0.68rem;
    letter-spacing: 0;
  }

  .chat-toggle:checked + .chat-toggle-label::after {
    content: "− CLOSE";
  }

  .chat-toggle:focus-visible + .chat-toggle-label {
    outline: 2px dotted var(--accent);
    outline-offset: -5px;
  }

  .chat-toggle-label:hover {
    color: var(--paper);
    background-color: var(--accent);
  }

  .chat-panel {
    display: none;
    padding: 18px 12px;

    border-top: 1px dotted var(--line);
  }

  .chat-toggle:checked ~ .chat-panel {
    display: block;
  }

  .chat-panel h2 {
    display: none;
  }

  .collection-index-grid {
    grid-template-columns: 1fr;
  }

  .content .collection-card:link,
  .content .collection-card:visited {
    min-height: 0;
  }

  .shelf-row {
    grid-template-columns: repeat(auto-fill, minmax(105px, 135px));
    justify-content: center;
    padding: 24px 24px 42px;
  }

  .media-item[open] {
    display: block;
  }

  .media-item[open] > summary {
    width: min(150px, 100%);
  }

  .content {
    padding: 28px 20px;
  }

  h2 {
    font-size: 1.3rem;
  }

  .error-code {
    font-size: 5rem;
    letter-spacing: -4px;
  }

  .error-actions {
    flex-direction: column;
    gap: 8px;
  }

  .error-actions span {
    display: none;
  }
}
