/* CSS Mini Reset */

html,
body,
div,
form,
fieldset,
legend,
label {
  margin: 0;
  padding: 0;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

th,
td {
  text-align: left;
  vertical-align: top;
}

h1,
h2,
h3,
h4,
h5,
h6,
th,
td,
caption {
  font-weight: normal;
}

img {
  display: block;
  border: 0;
  margin: 0 auto;
}

figure {
  margin: 0;
}

/* Fonts */

@font-face {
  font-family: "IBM Plex";
  src: url("fonts/IBMPlexMono-Regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "IBM Plex";
  src: url("fonts/IBMPlexMono-Bold.woff") format("woff");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "IBM Plex";
  src: url("fonts/IBMPlexMono-BoldItalic.woff") format("woff");
  font-weight: bold;
  font-style: italic;
}

@font-face {
  font-family: "IBM Plex";
  src: url("fonts/IBMPlexMono-Italic.woff") format("woff");
  font-weight: normal;
  font-style: italic;
}

/* Minimal */

html {
  font-size: calc(max(min(14px + 0.75vw, 50px), 14.5px + 0.75vw));
  font-family: "IBM Plex", "Courier", monospace;
  line-height: 1.6;
  background-color: #f7f7f4;
  background: url("background.png");
  color: #4b4a4a;
  scroll-snap-type: y mandatory;
}

main {
  margin: 1em auto;
}

img {
  max-width: 100%;
}

a:link {
  color: black;
}

a:visited {
  color: #868686;
}

.highlight {
  background: #ffdb4d;
}

iframe {
  display: block;
  width: 100%;
  height: 40vh;
  margin: 0 auto;
}

blockquote {
  font-style: italic;
  margin: 2em 0;
  padding-left: 1em;
  border-left: solid 2px #ffdb4d;
  text-align: center;
  color: #868686;
}

/* DZine 2.0 */
.page {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 100vh;
  /* Full viewport height */
  width: 100%;
  /* Full container width */
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.snap-end {
  display: block;
  width: 100%;
  scroll-snap-align: end;
  scroll-snap-stop: always;
}

.page-content {
  display: block;
  max-width: 30em;
  width: 90%;
}

.longform {
  margin: 4em 0 10em 0;
}

.figure-dzine img {
  max-height: 90vh;
  max-width: 100%;
  border-radius: 20px;
}

.framed-picture {
  height: 90vh;
  width: 100%;
  background-color: rgb(100, 100, 100);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.framed-picture img {
  border-radius: 0;
  max-width: 50%;
  border: 20px white solid;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
}

.framed-picture figcaption {
  font-size: 0.6em;
  color: white;
  text-align: center;
  width: 50%;
  margin: 1em auto;
}

.centered {
  text-align: center;
}

.inline-text {
  display: inline;
  height: 1.3em;
}

.post-it {
  max-width: 70%;
}

.photo-gallery {
  height: 90vh;
  width: calc(90vh / 1.618);
  background-color: rgb(100, 100, 100);
  border-radius: calc(90vh * 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin: 0 auto;
}

.polaroid-carousel {
  display: grid;
  width: calc(81vh / 1.618);
  /* 90% of container */
  grid-auto-flow: column;
  gap: calc(9vh / 1.618);
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.polaroid-carousel::-webkit-scrollbar {
  display: none;
}

.polaroid-card {
  display: grid;
  width: calc(81vh / 1.618);
  /* 100% of container */
  height: 81vh;
  grid-template-rows: 1.22fr 0.4fr;
  scroll-snap-align: start;
  position: relative;
}

.polaroid {
  display: grid;
  grid-template-rows: 1fr 0.22fr;
  width: calc(81vh / 1.618);
  /* 100% of container */

  /* Set height based on Polaroid aspect ratio */
  background: white;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  /* Optional: Add a shadow for a more realistic look */
}

.polaroid-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.polaroid-photo img {
  width: calc(73vh / 1.618);
  /* 90% of container */
  height: calc(73vh / 1.618);
  object-fit: cover;
}

.polaroid-title {
  display: block;
  overflow: hidden;
}

.caption {
  display: block;
  width: 100%;
  font-size: 14px;
  color: lightgray;
  overflow: scroll;
  overscroll-behavior: contain;
  margin-bottom: 12px;
}

.polaroid-card::after {
  content: "";
  position: absolute;
  width: 100%;
  bottom: 12px;
  height: 40px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    rgb(100, 100, 100)
  );
  pointer-events: none;
}

#WarGames {
  margin: 0 auto;
  height: 100vh;
}

.page-content figcaption {
  font-family:
    system-ui,
    -apple-system,
    "Helvetica Neue",
    sans-serif;
  font-size: 0.6em;
  text-align: center;
}

.dots {
  position: absolute;
  bottom: 6px;
  font-size: 12px;
  display: block;
  height: 12px;
  width: 100%;
  text-align: center;
  color: lightgray;
}

.message {
  padding: 0.8em;
  margin: 0.8em 0;
  /* Creates space between bubbles */
  border-radius: 0.8em;
  max-width: 80%;
  /* Maximum width for long messages */
  word-wrap: break-word;
  font-size: 0.8em;
}

.message.me {
  background-color: #f8cd5f;
  margin-left: auto;
}

.message.other {
  background-color: #e2e3e5;
  margin-right: auto;
}

.post-it {
  max-width: 400px;
  box-shadow: 5px 5px 7px rgba(0, 0, 0, 0.9);
  transform: rotate(-3deg);
  background: #ffd665;
}

.him {
  font-family: "Workbench";
  color: black;
}

.him strong {
  font-weight: 700;
  color: black;
}

.dark-page {
  background: #242424;
  color: #bbbbbb;
}

.dark-page .him {
  color: #bbbbbb;
}

#game-of-life {
  background-image: url("figures/dark-gol-header.gif");
}


/* Styles for portraits higher than the golden ratio */
@media (max-aspect-ratio: 1/1.618) {
  .photo-gallery {
    width: 90vw;
    height: calc(90vw * 1.618);
  }

  .polaroid-carousel {
    /* 90% of container */
    width: 81vw;
  }

  .polaroid-card {
    /* 100% of container */
    width: 81vw;
    height: calc(81vw * 1.618);
  }

  .polaroid {
    /* 100% of container */
    width: 81vw;
  }

  .polaroid-photo img {
    /* 90% of container */
    width: 73vw;
    height: 73vw;
  }
}
