/* =================================
   Blog Layout Styles
   ================================= */

:root {
  --blog-max-width: 840px;
  --blog-hero-max-width: 1300px;
}

.blog-page {
  position: relative;
}

.blog-page .site {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.blog-main {
  flex: 1 0 auto;
  display: grid;
  gap: clamp(3.2rem, 7vw, 5rem);
  padding: clamp(4rem, 8vw, 5.5rem) clamp(1.5rem, 5vw, 3.2rem) clamp(5rem, 9vw, 6.5rem);
  justify-items: center;
}

.blog-hero {
  position: relative;
  width: min(var(--blog-hero-max-width), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(1.8rem, 4vw, 2.6rem);
  align-items: stretch;
  padding: clamp(2.8rem, 5vw, 3.8rem);
  border-radius: clamp(1.8rem, 4vw, 2.6rem);
  background:
    radial-gradient(140% 120% at 16% 18%, rgba(var(--fg-blue-rgb), 0.25) 0%, transparent 58%),
    radial-gradient(160% 140% at 84% 22%, rgba(var(--fg-purple-rgb), 0.16) 0%, transparent 65%),
    rgba(var(--fg-black-rgb), 0.78);
  border: 1px solid rgba(var(--fg-white-rgb), 0.12);
  box-shadow: 0 28px 72px rgba(var(--fg-black-rgb), 0.48);
  overflow: hidden;
}

.blog-hero::after {
  content: "";
  position: absolute;
  inset: -22% -16% 18% 40%;
  background: radial-gradient(circle, rgba(var(--fg-gradient-1-rgb), 0.12) 0%, transparent 65%);
  opacity: 0.55;
  filter: blur(28px);
  pointer-events: none;
}

.blog-hero__media {
  position: relative;
  border-radius: clamp(1.4rem, 3vw, 2rem);
  overflow: hidden;
  background: rgba(var(--fg-white-rgb), 0.05);
  border: 1px solid rgba(var(--fg-white-rgb), 0.12);
  box-shadow: 0 24px 40px rgba(var(--fg-black-rgb), 0.45);
  isolation: isolate;
  min-height: clamp(260px, 36vw, 420px);
}

.blog-hero__media::before {
  content: "";
  position: absolute;
  inset: -18% -22% 32% -12%;
  background: radial-gradient(circle at 20% 20%, rgba(var(--fg-purple-rgb), 0.25), transparent 65%);
  mix-blend-mode: screen;
  z-index: 0;
}

.blog-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.6s ease;
  z-index: 1;
}

.blog-hero__media:hover .blog-hero__image,
.blog-hero__media:focus-within .blog-hero__image {
  transform: scale(1.06);
}

.blog-hero__content {
  position: relative;
  align-self: center;
  display: grid;
  gap: clamp(0.8rem, 2vw, 1.3rem);
  padding: clamp(0.4rem, 1.5vw, 1rem) clamp(0.6rem, 2.2vw, 1.4rem);
}

.blog-hero__topic {
  margin: 0;
  align-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 1.1rem;
  border-radius: var(--fg-radius-pill);
  background: linear-gradient(135deg, rgba(var(--fg-blue-rgb), 0.65), rgba(var(--fg-purple-rgb), 0.6));
  border: 1px solid rgba(var(--fg-white-rgb), 0.22);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-white);
}

.blog-hero__title {
  margin: 0;
  font-size: clamp(2.3rem, 4vw + 1rem, 3.5rem);
  line-height: 1.18;
  letter-spacing: 0.02em;
  color: var(--fg-white);
}

.blog-hero__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(var(--fg-white-rgb), 0.68);
}

.blog-hero__meta::before {
  content: "\25CF";
  font-size: 0.7rem;
  color: rgba(var(--fg-white-rgb), 0.45);
}

.blog-hero__attributes {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.82rem;
}

.blog-hero__attributes li {
  padding: 0.4rem 0.85rem;
  border-radius: var(--fg-radius-pill);
  border: 1px solid rgba(var(--fg-white-rgb), 0.2);
  background: linear-gradient(135deg, rgba(var(--fg-blue-rgb), 0.3), rgba(var(--fg-purple-rgb), 0.24));
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(var(--fg-white-rgb), 0.82);
}

.blog-article {
  position: relative;
  width: min(var(--blog-max-width), 100%);
  margin: 0 auto;
  background: rgba(var(--fg-black-rgb), 0.82);
  border-radius: clamp(1.6rem, 4vw, 2.4rem);
  border: 1px solid rgba(var(--fg-white-rgb), 0.08);
  box-shadow: 0 24px 64px rgba(var(--fg-black-rgb), 0.5);
  overflow: hidden;
}

.blog-article::before {
  content: "";
  position: absolute;
  inset: -24% 50% 72% -18%;
  background: radial-gradient(circle, rgba(var(--fg-blue-rgb), 0.22) 0%, transparent 60%);
  filter: blur(30px);
  opacity: 0.5;
  pointer-events: none;
}

.blog-article__inner {
  position: relative;
  z-index: 1;
  padding: clamp(2.4rem, 6vw, 3.6rem) clamp(3rem, 7vw, 4rem);
  display: grid;
  gap: clamp(1.4rem, 2.6vw, 2.2rem);
  font-size: clamp(1.08rem, 0.9vw + 1rem, 1.18rem);
  line-height: 1.78;
}


.blog-flex {
  display: flex;
  gap: clamp(1.6rem, 3.5vw, 2.6rem);
  align-items: flex-start;
  margin: 0 0 clamp(1.8rem, 3.6vw, 2.6rem);
}

.blog-flex__text {
  flex: 1 1 min(420px, 55%);
  display: grid;
  gap: clamp(0.9rem, 2.6vw, 1.4rem);
}

.blog-flex__media {
  flex: 0 0 auto;
  display: grid;
  gap: 0.75rem;
  justify-items: center;
  max-width: 100%;
  margin: 0;
}

.blog-flex__caption,
.blog-figure__caption {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(var(--fg-white-rgb), 0.7);
  text-align: center;
  overflow-wrap: anywhere;
}

.blog-article strong {
  color: var(--fg-white);
}

.blog-article p {
  margin: 0 0 clamp(1rem, 2vw, 1.35rem);
}

.blog-article h2 {
  margin: clamp(1.5rem, 3vw, 1.9rem) 0 clamp(0.7rem, 1.8vw, 1.1rem);
  line-height: 1.28;
  color: var(--fg-green);
}

.blog-article h2:first-child {
  margin-top: 0;
}

.blog-article h3 {
  margin: clamp(1.3rem, 2.6vw, 1.7rem) 0 clamp(0.45rem, 1.2vw, 0.75rem);
  line-height: 1.35;
  color: var(--fg-blue);
}

.blog-article a,
.blog-article a:visited {
  color: var(--fg-blue);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.3em;
  transition: color 0.2s ease;
}

.blog-article a:hover,
.blog-article a:focus-visible {
  color: var(--fg-purple);
}

.blog-article ul,
.blog-article ol {
  margin: clamp(1.2rem, 3vw, 1.6rem) 0 clamp(1.2rem, 3vw, 1.6rem) clamp(1.1rem, 3vw, 1.6rem);
  padding: 0;
  display: grid;
  gap: 0.8rem;
  color: rgba(var(--fg-white-rgb), 0.82);
}

.blog-article ul {
  list-style: none;
}

.blog-article ul > li::before {
  content: "\2022";
  color: var(--fg-blue);
  margin-right: 0.8rem;
}

.html-game-video-wrapper {
  display: grid;
  gap: 0.75rem;
  justify-items: center;
  border-radius: 20px;
  width: min(320px, 100%);
  min-width: 300px;
  max-width: 320px;
  overflow: hidden;
  box-shadow: 0 2px 5px #0000005e;
}

.html-game-video-wrapper video {
  display: block;
  width: 100%;
  height: auto;
}

.html-game-video-wrapper--wide {
  width: min(100%, 320px);
  max-width: 320px;
  min-width: 0;
}

.blog-article blockquote {
  margin: clamp(1.8rem, 3.4vw, 2.6rem) 0;
  padding: clamp(1.4rem, 3vw, 2rem);
  border-left: 3px solid rgba(var(--fg-blue-rgb), 0.6);
  background: rgba(var(--fg-white-rgb), 0.05);
  border-radius: 0.75rem;
  font-style: italic;
  color: rgba(var(--fg-white-rgb), 0.9);
}

.blog-article img,
.blog-article picture,
.blog-article video {
  width: 100%;
  border-radius: clamp(1.1rem, 2.5vw, 1.6rem);
  border: 1px solid rgba(var(--fg-white-rgb), 0.08);
  box-shadow: 0 18px 40px rgba(var(--fg-black-rgb), 0.38);
}

.blog-article figure,
.blog-figure {
  margin: clamp(1.8rem, 3.6vw, 2.6rem) 0;
  display: grid;
  gap: 0.75rem;
  justify-items: center;
}

.blog-article figcaption {
  font-size: 0.95rem;
  color: rgba(var(--fg-white-rgb), 0.7);
  text-align: center;
}

.blog-figure--fixed {
  width: 341px;
  max-width: 100%;
}

.blog-figure--fixed img {
  width: 341px;
  height: auto;
}

.blog-figure--tall {
  width: 282px;
  max-width: 100%;
}

.blog-figure--tall img {
  width: 282px;
  height: 472px;
  object-fit: cover;
}

.blog-main--list {
  gap: clamp(3rem, 7vw, 4.6rem);
}

.blog-list-hero {
  position: relative;
  padding: clamp(3.2rem, 6vw, 4.6rem);
  border-radius: clamp(1.9rem, 4vw, 2.6rem);
  background:
    radial-gradient(130% 160% at 12% 18%, rgba(var(--fg-blue-rgb), 0.25) 0%, transparent 58%),
    radial-gradient(150% 150% at 82% 16%, rgba(var(--fg-purple-rgb), 0.18) 0%, transparent 62%),
    rgba(var(--fg-black-rgb), 0.82);
  border: 1px solid rgba(var(--fg-white-rgb), 0.1);
  box-shadow: 0 26px 70px rgba(var(--fg-black-rgb), 0.48);
  overflow: hidden;
}

.blog-list-hero::after {
  content: "";
  position: absolute;
  inset: 16% -20% -30% 44%;
  background: radial-gradient(circle, rgba(var(--fg-gradient-1-rgb), 0.18) 0%, transparent 65%);
  filter: blur(30px);
  opacity: 0.55;
  pointer-events: none;
}

.blog-list-hero__inner {
  position: relative;
  z-index: 1;
  max-width: min(820px, 100%);
  margin: 0 auto;
  text-align: center;
  display: grid;
  gap: clamp(1rem, 3vw, 1.6rem);
}

.blog-list-hero__eyebrow {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(var(--fg-white-rgb), 0.68);
}

.blog-list-hero__title {
  margin: 0;
  font-size: clamp(2.4rem, 4vw + 1.4rem, 3.6rem);
  line-height: 1.18;
  color: var(--fg-white);
}

.blog-list-hero__subtitle {
  margin: 0 auto;
  max-width: 52ch;
  font-size: clamp(1.05rem, 0.8vw + 0.95rem, 1.2rem);
  line-height: 1.75;
  color: rgba(var(--fg-white-rgb), 0.78);
}

.blog-list {
  display: grid;
  gap: clamp(2.4rem, 6vw, 3.6rem);
}

.blog-list__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(1.8rem, 4vw, 2.6rem);
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-card {
  margin: 0;
}

.blog-card__link {
  position: relative;
  display: grid;
  grid-template-columns: clamp(150px, 32vw, 180px) minmax(0, 1fr);
  gap: clamp(1.4rem, 3.8vw, 2.1rem);
  align-items: center;
  padding: clamp(1.6rem, 3.6vw, 2.1rem);
  border-radius: clamp(1.4rem, 3.5vw, 1.8rem);
  background: linear-gradient(135deg, rgba(var(--fg-black-rgb), 0.78), rgba(var(--fg-gradient-2-rgb), 0.45));
  border: 1px solid rgba(var(--fg-white-rgb), 0.12);
  box-shadow: 0 22px 48px rgba(var(--fg-black-rgb), 0.46);
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.blog-card__link:hover,
.blog-card__link:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(var(--fg-white-rgb), 0.22);
  box-shadow: 0 28px 64px rgba(var(--fg-black-rgb), 0.5);
}

.blog-card__media {
  position: relative;
  width: clamp(150px, 32vw, 180px);
  aspect-ratio: 1 / 1;
  border-radius: clamp(1rem, 2.5vw, 1.4rem);
  overflow: hidden;
  background: rgba(var(--fg-white-rgb), 0.08);
  border: 1px solid rgba(var(--fg-white-rgb), 0.1);
  display: grid;
  place-items: center;
}

.blog-card__icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card__meta {
  display: grid;
  gap: clamp(0.4rem, 2vw, 0.8rem);
}

.blog-card__topic {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.9rem;
  border-radius: var(--fg-radius-pill);
  background: rgba(var(--fg-blue-rgb), 0.2);
  border: 1px solid rgba(var(--fg-blue-rgb), 0.3);
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(var(--fg-white-rgb), 0.8);
  width: fit-content;
}

.blog-card__title {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 1.7rem);
  letter-spacing: 0.04em;
  color: var(--fg-white);
}

.blog-card__date {
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(var(--fg-white-rgb), 0.6);
}

.blog-card__excerpt {
  margin: 0;
  font-size: clamp(1rem, 0.6vw + 0.95rem, 1.1rem);
  line-height: 1.75;
  color: rgba(var(--fg-white-rgb), 0.78);
}

@media (max-width: 1024px) {
  .blog-hero {
    grid-template-columns: minmax(0, 1fr);
    padding: clamp(2.4rem, 6vw, 3.4rem);
  }

  .blog-hero__media {
    min-height: clamp(240px, 48vw, 360px);
  }

  .blog-hero__content {
    padding: clamp(0.8rem, 3vw, 1.6rem) clamp(0.8rem, 3vw, 1.6rem) 0;
  }

  .blog-hero__meta::before {
    display: none;
  }

  .blog-card__link {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  .blog-card__media {
    margin: 0 auto;
  }

  .blog-card__meta {
    justify-items: center;
  }
}

@media (max-width: 640px) {
  .blog-main {
    padding: clamp(3rem, 8vw, 4.4rem) clamp(1.1rem, 7vw, 1.8rem) clamp(4rem, 10vw, 5.2rem);
    gap: clamp(2.6rem, 8vw, 3.8rem);
  }

  .blog-hero {
    border-radius: clamp(1.3rem, 6vw, 1.8rem);
  }

  .blog-hero__title {
    font-size: clamp(2rem, 6vw + 1rem, 2.6rem);
  }

  .blog-article {
    border-radius: clamp(1.1rem, 6vw, 1.6rem);
  }

  .blog-article__inner {
    padding: clamp(2rem, 8vw, 2.8rem) clamp(1.2rem, 7vw, 1.8rem);
  }

  .blog-list-hero {
    border-radius: clamp(1.2rem, 7vw, 1.8rem);
  }

  .blog-flex {
    margin: clamp(1.4rem, 6vw, 2rem) 0;
  }
}

@media (max-width: 860px) {
  .blog-flex {
    flex-direction: column;
  }

  .blog-flex__text,
  .blog-flex__media {
    width: 100%;
  }

  .html-game-video-wrapper {
    max-width: 100%;
  }
}
