:root {
  --text-color: #5988b0;
  --bg-color: #1a1b24;
}

body {
  margin: 0;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text-color);
  background: var(--bg-color);
  font-size: 18px;
  line-height: 1.5em;
  position: relative;
  z-index: 0;
}

.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("grain.gif");
  opacity: 0.007;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
}

h1 {
  font-family: "Libre Caslon Text", "Times New Roman", serif;
  font-size: 32px;
  margin-top: 32px;
  font-weight: 600;
  line-height: normal;
  margin-bottom: 16px;
  color: var(--text-color);
}

a {
  color: var(--text-color);
  cursor: pointer;
}

a:hover {
  color: rgb(255, 255, 255);
  font-weight: 500;
}

.site-main {
  max-width: 100%;
  margin: auto;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}

.post-hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 100%;
  height: auto;
  min-height: 0;
  overflow: visible;
}

.post-hero-left,
.post-hero-right {
  height: auto;
  min-height: 0;
}

.post-hero-left {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
}

.post-hero-text {
  width: 50%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-hero-text h1,
.post-hero-text p {
  margin: 0;
}

.post-hero-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.post-hero-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.post-hero-right {
  display: flex;
  align-items: center;
  overflow: visible;
}

.post-hero-grid {
  width: 100%;
  height: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px 18px 18px 0;
  box-sizing: border-box;
  overflow: visible;
}

.post-hero-thumb {
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: block;
  --thumb-shift: 0%;
  --thumb-hover-shift: -5%;
  transform: translateX(var(--thumb-shift)) scale(0.9);
  transform-origin: left center;
  transition: transform 150ms ease;
}

.post-hero-thumb:nth-child(even) {
  --thumb-shift: -4.375%;
  --thumb-hover-shift: -9.375%;
}

.post-hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-hero-thumb:hover,
.post-hero-thumb:focus-visible {
  transform: translateX(var(--thumb-hover-shift)) scale(1);
}

.video-modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 100;
}

.video-modal.is-open {
  display: grid;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.video-modal-dialog {
  position: relative;
  width: min(90vw, 1200px);
  aspect-ratio: 16 / 9;
  z-index: 1;
}

.video-modal-frame {
  width: 100%;
  height: 100%;
  background: #000;
  position: relative;
}

.video-modal-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-preload {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.video-preload iframe {
  width: 1px;
  height: 1px;
  border: 0;
}

.video-modal-close {
  position: absolute;
  top: -32px;
  right: -32px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.video-modal-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

@media (max-width: 900px) {
  .post-hero-section {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    height: auto;
    min-height: 0;
    width: auto;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 2rem;
  }

  h1 {
    margin-top: 0;
  }

  .post-hero-left {
    box-shadow: none !important;
    display: block;
  }

  .post-hero-left,
  .post-hero-right {
    height: auto;
  }

  .post-hero-text {
    position: static;
    transform: none;
    width: 100%;
    padding: 2rem 0;
    box-sizing: border-box;
  }

  .post-hero-right {
    height: auto;
    padding-left: 0;
    padding-right: 0;
  }

  .post-hero-grid {
    padding: 0 0 32px;
    gap: 32px;
    grid-template-columns: 1fr;
  }

  .post-hero-thumb {
    width: 100%;
    transform: none;
  }

  .post-hero-thumb:hover,
  .post-hero-thumb:focus-visible {
    transform: none;
  }
}
