/* ── Blog (pages are generated by scripts/build.mjs) ──────── */
.blog-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.blog-crumbs {
  position: static;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  font-size: 13px;
  color: var(--t3);
  margin-bottom: 24px;
}
.blog-crumbs a {
  color: var(--t2);
  text-decoration: none;
}
.blog-crumbs a:hover {
  color: var(--t1);
}

.blog-hero {
  margin-bottom: 40px;
}
.blog-hero h1,
.blog-post h1 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 12px;
  color: var(--t1);
}
.blog-hero p {
  color: var(--t2);
  font-size: 17px;
  line-height: 1.6;
  margin: 0;
}

.blog-meta {
  color: var(--t3);
  font-size: 13px;
  margin: 0;
}
.blog-cat {
  color: var(--accent);
  font-weight: 600;
}

.blog-draft {
  background: var(--accent-soft);
  border: 1px solid var(--accent-glow);
  color: var(--accent-light);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 14px;
  margin: 0 0 24px;
}
.blog-draft-tag {
  background: var(--accent-soft);
  color: var(--accent-light);
  border-radius: var(--r-full);
  padding: 1px 8px;
  font-size: 12px;
  vertical-align: middle;
}

/* Post list */
.blog-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.blog-item a {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: rgba(17, 24, 39, 0.6);
  text-decoration: none;
  transition: border-color var(--dur), background var(--dur);
}
.blog-item a:hover {
  border-color: var(--accent-glow);
  background: rgba(23, 31, 49, 0.8);
}
.blog-item img {
  flex: none;
  width: 72px;
  height: auto;
  border-radius: 4px;
}
.blog-item h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--t1);
}
.blog-item p {
  color: var(--t2);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 8px;
}
.blog-item p.blog-meta {
  margin: 0;
  color: var(--t3);
  font-size: 13px;
}
.blog-empty {
  color: var(--t2);
}

/* Post body */
.blog-post header {
  margin-bottom: 32px;
}
.blog-body {
  color: #cbd3de;
  font-size: 16px;
  line-height: 1.75;
}
.blog-body > * {
  margin: 0 0 18px;
}
.blog-body h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--t1);
  margin: 44px 0 14px;
}
.blog-body h3 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--t1);
  margin: 32px 0 10px;
  clear: both;
}
.blog-body strong {
  color: var(--t1);
  font-weight: 600;
}
.blog-body a {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 500;
}
.blog-body a:hover {
  text-decoration: underline;
}
.blog-body ul,
.blog-body ol {
  padding-left: 22px;
}
.blog-body li {
  margin-bottom: 6px;
}
.blog-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 16px;
  color: var(--t2);
}
.blog-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}
.blog-body code {
  background: var(--w-06);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.92em;
}

/* Card art: floated beside its write-up on wide screens */
.blog-body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: var(--sh-md);
}
.blog-body p > img:only-child {
  float: right;
  width: 150px;
  margin: 4px 0 12px 20px;
}
@media (max-width: 560px) {
  .blog-body p > img:only-child {
    float: none;
    width: 180px;
    margin: 0 auto;
  }
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  clear: both;
}
.blog-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.45;
}
.blog-body th,
.blog-body td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-2);
  white-space: nowrap;
}
.blog-body td:first-child {
  white-space: normal;
  min-width: 160px;
}
.blog-body th {
  color: var(--t2);
  font-weight: 600;
  background: var(--w-04);
}
.blog-body tr:last-child td {
  border-bottom: 0;
}

/* Call to action */
.blog-cta {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-top: 48px;
  padding: 24px;
  border: 1px solid var(--accent-glow);
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, rgba(76, 31, 168, 0.25), rgba(17, 24, 39, 0.7));
  clear: both;
}
.blog-cta h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--t1);
}
.blog-cta p {
  color: var(--t2);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 14px;
}
.blog-cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.blog-btn {
  display: inline-block;
  padding: 9px 16px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.blog-btn:hover {
  background: var(--accent-light);
}
.blog-btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--t1);
}
.blog-btn--ghost:hover {
  background: var(--w-06);
}
@media (max-width: 560px) {
  .blog-cta {
    flex-direction: column;
  }
}

.blog-related {
  margin-top: 56px;
}
.blog-related h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 16px;
  color: var(--t1);
}

/* ── Post components ───────────────────────────────────────── */
.blog-body img[data-zoom] {
  cursor: zoom-in;
}

/* Promo art and other full-width images */
.blog-figure {
  margin: 0 0 22px;
  clear: both;
}
.blog-figure img {
  width: 100%;
  border-radius: var(--r-lg);
}
.blog-figure figcaption,
.blog-video figcaption {
  color: var(--t3);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 8px;
}
.blog-figure figcaption a,
.blog-video figcaption a {
  color: var(--t2);
}

.blog-gallery {
  list-style: none;
  padding: 0 !important;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  clear: both;
}
.blog-gallery .blog-figure {
  margin: 0;
}
.blog-gallery img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* Card grid */
.card-grid {
  list-style: none;
  padding: 0 !important;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 22px 18px;
  clear: both;
}
.card-grid li {
  margin: 0;
}
.card-tile-art {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 10px;
  cursor: zoom-in;
  transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  box-shadow: var(--sh-md);
}
.card-tile-art.is-tilting {
  transition: transform 0.06s linear, box-shadow 0.2s ease;
  transform: perspective(700px) rotateX(var(--rx)) rotateY(var(--ry)) scale(1.04);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--accent-glow);
}
@media (hover: hover) and (pointer: fine) {
  .card-tile-art:hover {
    transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(1.04);
  }
}
.card-tile-art:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.blog-body .card-tile-art img {
  width: 100%;
  border-radius: 10px;
  box-shadow: none;
}
.card-tile-glare {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 55%),
    linear-gradient(115deg, rgba(232, 121, 249, 0) 30%, rgba(232, 121, 249, 0.18) 48%, rgba(56, 189, 248, 0.18) 56%, rgba(56, 189, 248, 0) 72%);
  mix-blend-mode: screen;
}
.card-tile-art.is-tilting .card-tile-glare {
  opacity: 1;
}
.blog-body .card-tile-label {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.4;
}
.card-tile-label a {
  font-weight: 400 !important;
}
.card-tile-name {
  display: block;
  color: var(--t1);
  font-weight: 600;
}
.card-tile-sub {
  display: block;
  color: var(--t3);
}
@media (prefers-reduced-motion: reduce) {
  .card-tile-art,
  .card-tile-art:hover,
  .card-tile-art.is-tilting {
    transform: none;
    transition: none;
  }
}

/* YouTube */
.blog-video {
  margin: 0 0 22px;
  clear: both;
}
.blog-video-play,
.blog-video-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  padding: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #000;
}
.blog-video-play {
  cursor: pointer;
}
.blog-body .blog-video-play img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  opacity: 0.85;
  transition: opacity var(--dur);
}
.blog-video-play:hover img {
  opacity: 1;
}
.blog-video-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 48px;
  margin: -24px 0 0 -34px;
  border-radius: 14px;
  background: var(--accent);
  box-shadow: var(--sh-lg);
}
.blog-video-icon::after {
  content: "";
  position: absolute;
  left: 27px;
  top: 14px;
  border-style: solid;
  border-width: 10px 0 10px 17px;
  border-color: transparent transparent transparent #fff;
}

/* Full-screen viewer */
.zoom {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: rgba(4, 6, 14, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.zoom--open {
  display: flex;
}
.zoom-lock,
.zoom-lock body {
  overflow: hidden;
}
.zoom-stage {
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.zoom-stage img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  max-height: calc(100dvh - 120px);
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.zoom-stage figcaption {
  color: var(--t2);
  font-size: 14px;
  margin-top: 12px;
  text-align: center;
}
.zoom-stage figcaption a {
  color: var(--accent-light);
}
.zoom button {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  border: 1px solid var(--w-15);
  background: var(--w-08);
  color: var(--t1);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.zoom button:hover {
  background: var(--w-15);
}
.zoom-close {
  position: absolute;
  top: 16px;
  right: 16px;
}
.zoom--single .zoom-prev,
.zoom--single .zoom-next {
  display: none;
}
@media (max-width: 560px) {
  .zoom {
    padding: 64px 12px 24px;
  }
  .zoom-prev,
  .zoom-next {
    position: absolute;
    bottom: 16px;
  }
  .zoom-prev {
    left: calc(50% - 56px);
  }
  .zoom-next {
    right: calc(50% - 56px);
  }
  .zoom-stage img {
    max-height: calc(100dvh - 170px);
  }
}

/* A placeholder image whose file hasn't been added yet (previews only). */
.blog-figure--missing {
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 16px;
  border: 2px dashed currentColor;
  border-radius: 12px;
  opacity: 0.6;
  text-align: center;
  font-size: 0.9rem;
}
