/* Phase 1 baseline. The full look and feel lands in Phase 3. */

:root {
  --desktop: #008080;
  --window: #c0c0c0;
  --paper: #ffffff;
  --ink: #000000;
  --link: #0000ee;
  --visited: #551a8b;
  --title-bar: #000080;
  --title-ink: #ffffff;
  --bevel-light: #ffffff;
  --bevel-dark: #808080;
  --accent: #ffff00;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0 auto;
  padding: 16px;
  max-width: 52rem;
  background: var(--desktop);
  color: var(--ink);
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: break-word; /* long words wrap instead of widening the page at big text sizes */
}

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

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

/* Chunky focus ring: black outline with a yellow halo shows on teal, grey and navy alike. */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--accent);
}

.skip-link {
  position: absolute;
  left: -999px;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  padding: 0.5rem;
  background: var(--accent);
  color: var(--ink);
}

/* Header */

.site-header {
  text-align: center;
  color: var(--accent);
}
.site-title {
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(2rem, 8vw, 3.25rem);
  font-weight: bold;
  text-shadow: 3px 3px 0 var(--title-bar);
}
.site-title a,
.site-title a:visited {
  color: inherit;
  text-decoration: none;
}
.tagline {
  margin: 0 0 1rem;
  color: var(--paper);
  font-style: italic;
}

/* Bevelled boxes */

.site-nav,
.window {
  background: var(--window);
  border: 2px solid;
  border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  justify-content: center;
  margin: 0;
  padding: 0.5rem;
  list-style: none;
}
.site-nav a,
.site-nav a:visited {
  color: var(--ink);
}
.site-nav a[aria-current="page"] {
  font-weight: bold;
  text-decoration: none;
}

.window {
  margin: 1rem 0;
  padding: 0 1rem 1rem;
}
.window > h1 {
  margin: 0 -1rem 1rem;
  padding: 0.25rem 0.75rem;
  background: var(--title-bar);
  color: var(--title-ink);
  font-size: 1.125rem;
}

.portrait {
  float: right;
  width: 45%;
  max-width: 360px;
  margin: 0 0 1rem 1rem;
  border: 3px ridge var(--bevel-dark);
}

.construction {
  clear: both;
  padding: 0.5rem;
  border: 3px dashed var(--ink);
  background: var(--accent);
  text-align: center;
  font-weight: bold;
}

.gif {
  display: inline-block;
  vertical-align: middle;
}
.gif img {
  image-rendering: pixelated;
}

/* A row of 88x31 buttons. */
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}
.buttons img {
  display: block;
  width: 88px;
  height: 31px;
}

/* Read by screen readers, hidden on screen (e.g. "4 out of 5 stars" next to ★★★★). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.small {
  font-size: 0.875rem;
}

/* Movie Corner: recently watched */
.watch-log {
  padding-left: 1.25rem;
}
.watch-log li {
  margin-bottom: 0.75rem;
}
.watch-log cite {
  font-style: normal;
  font-weight: bold;
}
.stars {
  color: var(--title-bar);
  letter-spacing: 0.05em;
}
.liked {
  color: #a00000;
}
.tag {
  padding: 0 0.375rem;
  border: 1px solid var(--ink);
  background: var(--accent);
  font-size: 0.75rem;
  text-transform: uppercase;
}
.review {
  display: block;
  font-family: "Times New Roman", Times, serif;
  font-size: 1.0625rem;
  font-style: italic;
}

/* Dead shrine: favorite shows */
.favorite-shows {
  padding: 0;
  list-style: none;
}
.favorite-shows li {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: var(--paper);
  border: 2px inset var(--bevel-dark);
}
.favorite-shows h3 {
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  font-size: 1.375rem;
}
.favorite-shows p {
  margin: 0.375rem 0 0;
}
.favorite-shows .where {
  font-style: italic;
}
.favorite-shows .placeholder {
  border-style: dashed;
}

/* Code people copy: wraps so it fits on phones. */
pre.copy {
  padding: 0.75rem;
  background: var(--paper);
  border: 2px inset var(--bevel-dark);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Footer */

.site-footer {
  color: var(--paper);
  text-align: center;
  font-size: 0.875rem;
}
.counter .digits {
  padding: 0 0.25rem;
  background: var(--ink);
  color: #00ff00;
  font-family: "Courier New", Courier, monospace;
  letter-spacing: 0.15em;
}

@media (max-width: 30rem) {
  .portrait {
    float: none;
    display: block;
    width: 100%;
    margin: 0 auto 1rem;
  }
}
