/*
Theme Name: Savvy Modern
Description: Dark/neon glassmorphism theme with scroll-reveal motion and an ambient canvas background, built for dev.savvymatthew.com.
Version: 1.0.0
Author: Matthew F. Clark
Requires PHP: 7.4
*/

/* ==================== design tokens ==================== */

:root {
  --svmx-bg-0: #06040f;
  --svmx-neon-cyan: #5df1ff;
  --svmx-neon-violet: #b47bff;
  --svmx-neon-pink: #ff5ec8;
  --svmx-text: #eef0ff;
  --svmx-text-dim: #b3b3d9;
  --svmx-glass-bg: rgba(255, 255, 255, 0.055);
  --svmx-glass-bg-strong: rgba(255, 255, 255, 0.08);
  --svmx-glass-border: rgba(255, 255, 255, 0.14);
  --svmx-glass-blur: 16px;
  --svmx-radius: 16px;
  --svmx-max: 1240px;
}

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

html {
  background: var(--svmx-bg-0);
  -webkit-text-size-adjust: 100%;
}

/* ==================== iOS / Safari polish ==================== */

/* kills the gray tap-highlight flash Safari puts on links/buttons on tap */
* {
  -webkit-tap-highlight-color: transparent;
}

/* our buttons carry their own look via class rules (higher specificity than
   this element selector, so this doesn't fight them) — without this, iOS
   renders <button> with native chrome (rounded corners, system font) that
   can visibly clash with or override custom styling */
button {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

/* iOS Safari auto-zooms the page when a focused form field's font-size is
   under 16px — the comment form and search form both have real inputs */
input,
textarea,
select {
  font-size: 16px;
}

/* ==================== custom cursor ====================
   Elements are created by assets/interactive.js only on fine-pointer,
   non-reduced-motion devices, and it adds .svmx-has-cursor to <html> at
   the same time — cursor:none only ever applies once the replacement
   actually exists. */

#svmx-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--svmx-neon-cyan);
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
  mix-blend-mode: difference;
}
#svmx-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(180, 123, 255, 0.6);
  border-radius: 50%;
  z-index: 9998;
  pointer-events: none;
  transition: border-color 0.3s ease;
}
html.svmx-has-cursor,
html.svmx-has-cursor * {
  cursor: none !important;
}

#svmx-masonry,
#svmx-videos,
#svmx-feature-slider {
  scroll-margin-top: 96px;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(60vmax 60vmax at 8% -10%, rgba(180, 123, 255, 0.22), transparent 60%),
    radial-gradient(55vmax 55vmax at 105% 10%, rgba(93, 241, 255, 0.16), transparent 60%),
    radial-gradient(70vmax 70vmax at 50% 130%, rgba(255, 94, 200, 0.12), transparent 60%),
    var(--svmx-bg-0);
  color: var(--svmx-text-dim);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: var(--svmx-neon-cyan);
}

h1, h2, h3, h4 {
  color: var(--svmx-text);
  line-height: 1.2;
  margin: 0 0 0.6em;
}

.svmx-gradient-text {
  background: linear-gradient(100deg, var(--svmx-neon-cyan), var(--svmx-neon-violet) 55%, var(--svmx-neon-pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(180, 123, 255, 0.22));
}

.svmx-wrap {
  max-width: var(--svmx-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

::selection {
  background: var(--svmx-neon-violet);
  color: #0b0821;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--svmx-neon-violet) transparent;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--svmx-neon-cyan), var(--svmx-neon-violet));
  border-radius: 8px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}

#svmx-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
}

/* ==================== header ==================== */

.svmx-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 6, 24, 0.55);
  backdrop-filter: blur(var(--svmx-glass-blur));
  -webkit-backdrop-filter: blur(var(--svmx-glass-blur));
  border-bottom: 1px solid var(--svmx-glass-border);
  /* iOS Safari has a known bug where a blurred sticky element's backdrop
     can "freeze" on a stale frame instead of updating while scrolling;
     forcing its own compositing layer reliably avoids it */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.svmx-header-inner {
  max-width: var(--svmx-max);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.svmx-logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--svmx-text);
  text-decoration: none;
  white-space: nowrap;
}
.svmx-logo img {
  max-height: 40px;
  width: auto;
}

.svmx-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--svmx-glass-border);
  border-radius: 10px;
  color: var(--svmx-text);
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
  cursor: pointer;
}

.svmx-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}

.svmx-nav li {
  position: relative;
}

.svmx-nav a {
  color: var(--svmx-text-dim);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.25s ease;
}
.svmx-nav a:hover,
.svmx-nav .current-menu-item > a {
  color: var(--svmx-neon-cyan);
}

.svmx-nav .menu-item-has-children > a::after {
  content: "▾";
  margin-left: 4px;
  font-size: 0.7em;
}

.svmx-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: rgba(12, 9, 28, 0.92);
  border: 1px solid var(--svmx-glass-border);
  border-radius: 12px;
  backdrop-filter: blur(var(--svmx-glass-blur));
  padding: 0.5rem;
  flex-direction: column;
  gap: 0;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
}
.svmx-nav .menu-item-has-children:hover > .sub-menu {
  display: flex;
}
.svmx-nav .sub-menu li {
  width: 100%;
}
.svmx-nav .sub-menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}
.svmx-nav .sub-menu a:hover {
  background: rgba(93, 241, 255, 0.1);
}

@media (max-width: 860px) {
  .svmx-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .svmx-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  .svmx-header-inner {
    flex-wrap: wrap;
  }
  .svmx-header.is-open .svmx-nav {
    display: block;
  }
  .svmx-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 1rem 0;
  }
  .svmx-nav .sub-menu {
    display: flex;
    position: static;
    background: transparent;
    border: none;
    backdrop-filter: none;
    box-shadow: none;
    padding-left: 1rem;
  }
}

/* ==================== buttons / links ==================== */

.svmx-btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--svmx-neon-cyan), var(--svmx-neon-violet));
  color: #0b0821 !important;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.svmx-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(93, 241, 255, 0.35);
}

.svmx-btn-ghost {
  background: transparent;
  border: 1px solid var(--svmx-glass-border);
  color: var(--svmx-text) !important;
}
.svmx-btn-ghost:hover {
  border-color: rgba(93, 241, 255, 0.6);
  box-shadow: 0 12px 32px rgba(93, 241, 255, 0.18);
}

/* ==================== glass surfaces ==================== */

.svmx-glass {
  background: var(--svmx-glass-bg);
  border: 1px solid var(--svmx-glass-border);
  border-radius: var(--svmx-radius);
  backdrop-filter: blur(var(--svmx-glass-blur));
  -webkit-backdrop-filter: blur(var(--svmx-glass-blur));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.svmx-section {
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.svmx-section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 1.5rem;
}

/* ==================== video hero ==================== */

.svmx-video-hero {
  position: relative;
  /* 100vh first as a fallback for browsers that don't understand svh —
     Safari's address bar means 100vh is taller than what's actually
     visible on screen, cutting off the CTA/scroll-indicator until the
     bar collapses; 100svh matches the true minimum visible viewport. */
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  max-height: 960px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--svmx-bg-0);
}

.svmx-video-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.svmx-video-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(6, 4, 15, 0.6);
}

.svmx-video-hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(6, 4, 15, 0.92) 0%, rgba(6, 4, 15, 0.25) 45%, transparent 75%),
    radial-gradient(ellipse at center, transparent 40%, rgba(6, 4, 15, 0.6) 100%);
}

.svmx-video-hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  padding-top: 3rem;
}

.svmx-video-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--svmx-glass-bg);
  border: 1px solid var(--svmx-glass-border);
  backdrop-filter: blur(var(--svmx-glass-blur));
  -webkit-backdrop-filter: blur(var(--svmx-glass-blur));
  color: var(--svmx-text-dim);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.75rem;
}
.svmx-video-hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--svmx-neon-cyan);
  box-shadow: 0 0 10px var(--svmx-neon-cyan);
  animation: svmx-pulse 1.8s ease-in-out infinite;
}
@keyframes svmx-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.svmx-video-hero-title {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1.05;
  margin-bottom: 1.25rem;
}

.svmx-video-hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--svmx-text-dim);
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.svmx-video-hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
}
.svmx-video-hero-scroll span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: var(--svmx-neon-cyan);
  transform: translateX(-50%);
  animation: svmx-scroll-wheel 1.6s ease infinite;
}
@keyframes svmx-scroll-wheel {
  0% { transform: translate(-50%, 0); opacity: 1; }
  70% { transform: translate(-50%, 14px); opacity: 0; }
  100% { transform: translate(-50%, 14px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .svmx-video-hero-badge-dot,
  .svmx-video-hero-scroll span {
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .svmx-video-hero-scroll {
    display: none;
  }
}

/* ==================== featured hero slider ==================== */

.svmx-feature-slider {
  position: relative;
  border-radius: var(--svmx-radius);
  overflow: hidden;
  background: var(--svmx-glass-bg);
  border: 1px solid var(--svmx-glass-border);
  backdrop-filter: blur(var(--svmx-glass-blur));
  -webkit-backdrop-filter: blur(var(--svmx-glass-blur));
}

.svmx-feature-track {
  position: relative;
  min-height: clamp(460px, 55vw, 660px);
}

.svmx-feature-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.7s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.35s ease, visibility 0s linear 0.35s;
}
.svmx-feature-slide.is-active {
  opacity: 1;
  visibility: visible;
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.7s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.05s ease;
}

/* neon scan-line sweeping edge, replays each time a slide becomes active */
.svmx-feature-slide.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  left: 0;
  background: linear-gradient(180deg, var(--svmx-neon-cyan), var(--svmx-neon-violet), var(--svmx-neon-pink));
  box-shadow: 0 0 20px 4px rgba(93, 241, 255, 0.8), 0 0 40px 10px rgba(180, 123, 255, 0.35);
  z-index: 6;
  pointer-events: none;
  animation: svmx-scan-sweep 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}
@keyframes svmx-scan-sweep {
  from { left: 0%; opacity: 1; }
  to { left: 100%; opacity: 0; }
}

/* brief RGB-glitch flicker on the incoming slide's image */
.svmx-feature-glitch {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  background-image: var(--slide-bg);
  background-size: cover;
  background-position: center;
  mix-blend-mode: screen;
}
.svmx-feature-slide.is-glitching .svmx-feature-glitch {
  opacity: 1;
  animation: svmx-glitch-shift 0.13s steps(2, end) 2;
}
@keyframes svmx-glitch-shift {
  0% { transform: translate(0, 0); filter: hue-rotate(0deg); clip-path: inset(0 0 60% 0); }
  50% { transform: translate(4px, -2px); filter: hue-rotate(90deg); clip-path: inset(40% 0 20% 0); }
  100% { transform: translate(-3px, 2px); filter: hue-rotate(-90deg); clip-path: inset(70% 0 0 0); }
}

.svmx-feature-media {
  position: relative;
  display: block;
  flex: 1 1 auto;
  overflow: hidden;
}
.svmx-feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.svmx-feature-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 4, 15, 0.9), transparent 55%);
  z-index: 1;
}
.svmx-feature-media-meta {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-size: 0.85rem;
}
.svmx-feature-media-meta img {
  border-radius: 50%;
  width: 28px;
  height: 28px;
}

.svmx-feature-body {
  flex: 0 0 auto;
  padding: 1.5rem clamp(1.25rem, 3vw, 2.25rem) 2rem;
}
.svmx-feature-title {
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  margin-bottom: 0.6rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  letter-spacing: -0.01em;
}
.svmx-feature-title a {
  color: var(--svmx-text);
  text-decoration: none;
}
.svmx-feature-title a:hover {
  color: var(--svmx-neon-cyan);
}
.svmx-feature-sub {
  font-size: 0.9rem;
  color: var(--svmx-text-dim);
}
.svmx-feature-sub .svmx-cat {
  color: var(--svmx-neon-cyan);
  font-weight: 600;
}

/* progress bar */
.svmx-feature-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 7;
}
.svmx-feature-progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--svmx-neon-cyan), var(--svmx-neon-violet));
  box-shadow: 0 0 10px rgba(93, 241, 255, 0.6);
}

/* arrows */
.svmx-feature-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 7;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--svmx-glass-border);
  background: rgba(6, 4, 15, 0.55);
  backdrop-filter: blur(var(--svmx-glass-blur));
  -webkit-backdrop-filter: blur(var(--svmx-glass-blur));
  color: var(--svmx-text);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.svmx-feature-arrow:hover {
  border-color: rgba(93, 241, 255, 0.6);
  color: var(--svmx-neon-cyan);
}
.svmx-feature-prev { left: 1rem; }
.svmx-feature-next { right: 1rem; }

/* dots */
.svmx-feature-dots {
  position: absolute;
  right: clamp(1.25rem, 3vw, 2.25rem);
  bottom: 1.6rem;
  z-index: 7;
  display: flex;
  gap: 0.5rem;
}
.svmx-feature-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--svmx-glass-border);
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, transform 0.25s ease;
}
.svmx-feature-dot.is-active {
  background: var(--svmx-neon-cyan);
  box-shadow: 0 0 10px var(--svmx-neon-cyan);
  transform: scale(1.2);
}

@media (max-width: 640px) {
  .svmx-feature-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .svmx-feature-slide {
    transition: opacity 0.2s ease !important;
    clip-path: none !important;
  }
  .svmx-feature-slide.is-active::before,
  .svmx-feature-slide.is-glitching .svmx-feature-glitch {
    animation: none !important;
    display: none !important;
  }
  .svmx-feature-progress {
    display: none;
  }
}

.svmx-featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
@media (max-width: 980px) {
  .svmx-featured-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .svmx-featured-grid { grid-template-columns: 1fr; }
}
.svmx-featured-grid .svmx-card-thumb {
  aspect-ratio: 4 / 3;
}
.svmx-featured-grid .svmx-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==================== tabs ==================== */

.svmx-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}
.svmx-tab {
  background: var(--svmx-glass-bg);
  border: 1px solid var(--svmx-glass-border);
  color: var(--svmx-text-dim);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}
.svmx-tab:hover {
  border-color: rgba(93, 241, 255, 0.5);
  color: var(--svmx-text);
}
.svmx-tab.is-active {
  background: linear-gradient(100deg, var(--svmx-neon-cyan), var(--svmx-neon-violet));
  color: #0b0821;
  border-color: transparent;
}

/* ==================== masonry post grid ==================== */

.svmx-masonry {
  column-count: 3;
  column-gap: 1.5rem;
}
@media (max-width: 980px) {
  .svmx-masonry { column-count: 2; }
}
@media (max-width: 640px) {
  .svmx-masonry { column-count: 1; }
}

.svmx-card {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.svmx-card:hover {
  transform: translateY(-6px);
  border-color: rgba(93, 241, 255, 0.5);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45), 0 0 32px rgba(180, 123, 255, 0.25);
}
.svmx-card-thumb {
  display: block;
  overflow: hidden;
}
.svmx-card-thumb img {
  width: 100%;
  transition: transform 0.6s ease;
}
.svmx-card:hover .svmx-card-thumb img {
  transform: scale(1.08);
}
.svmx-card-body {
  padding: 1.1rem 1.25rem 1.4rem;
}
.svmx-card-cat {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--svmx-neon-cyan);
  margin: 0 0.4rem 0.4rem 0;
}
.svmx-card-title {
  font-size: 1.05rem;
  margin: 0.2rem 0 0.6rem;
}
.svmx-card-title a {
  color: var(--svmx-text);
  text-decoration: none;
}
.svmx-card-title a:hover {
  color: var(--svmx-neon-cyan);
}
.svmx-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--svmx-text-dim);
}
.svmx-card-meta img {
  border-radius: 50%;
  width: 22px;
  height: 22px;
}

/* ==================== single post ==================== */

.svmx-post-header {
  padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem;
}
.svmx-post-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}
.svmx-post-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--svmx-text-dim);
  font-size: 0.9rem;
  margin-top: 1rem;
}
.svmx-post-meta img {
  border-radius: 50%;
  width: 32px;
  height: 32px;
}
.svmx-post-thumb {
  border-radius: var(--svmx-radius);
  overflow: hidden;
  margin-bottom: 2rem;
}

/* backdrop-filter is dropped here on purpose: applying a blur filter to a
   container whose height is unbounded (a full article body) is a known
   cause of flickering/disappearing content while scrolling on long pages.
   It's kept on .svmx-glass generally since cards/header are bounded height. */
.entry-content,
.svmx-comments {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.entry-content {
  padding: clamp(1.5rem, 4vw, 3rem);
}
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4 {
  background: linear-gradient(100deg, var(--svmx-neon-cyan), var(--svmx-neon-violet) 60%, var(--svmx-neon-pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--svmx-text);
}
.entry-content a {
  color: var(--svmx-neon-cyan);
  text-decoration: none;
  background-image: linear-gradient(90deg, var(--svmx-neon-cyan), var(--svmx-neon-violet));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
}
.entry-content img {
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
.entry-content blockquote {
  border-left: 3px solid var(--svmx-neon-violet);
  background: rgba(180, 123, 255, 0.08);
  padding: 1rem 1.25rem;
  border-radius: 0 12px 12px 0;
  margin-left: 0;
}
.entry-content pre,
.entry-content code {
  background: #0a0620;
  border: 1px solid var(--svmx-glass-border);
  border-radius: 10px;
  color: var(--svmx-neon-cyan);
}

/* ==================== videos section ==================== */

.svmx-videos {
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

/* ==================== footer ==================== */

.svmx-footer {
  border-top: 1px solid var(--svmx-glass-border);
  background: rgba(6, 4, 15, 0.85);
  margin-top: 3rem;
  color: var(--svmx-text-dim);
  font-size: 0.9rem;
}

.svmx-footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2.25rem 1.5rem 1.5rem;
}

.svmx-footer-logo img {
  max-height: 32px;
  width: auto;
}

.svmx-footer-menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}
.svmx-footer-menu a {
  color: var(--svmx-text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.25s ease;
}
.svmx-footer-menu a:hover {
  color: var(--svmx-neon-cyan);
}

.svmx-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem 1.5rem 2.25rem;
  border-top: 1px solid var(--svmx-glass-border);
}

.svmx-copyright {
  margin: 0;
  font-size: 0.85rem;
  color: var(--svmx-text-dim);
}

.svmx-social {
  display: flex;
  gap: 0.9rem;
}
.svmx-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--svmx-glass-border);
  color: var(--svmx-text-dim);
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.svmx-social a:hover {
  color: var(--svmx-neon-cyan);
  border-color: rgba(93, 241, 255, 0.5);
  transform: translateY(-2px);
}

/* ==================== 404 / search ==================== */

.svmx-notfound {
  text-align: center;
  padding: clamp(3rem, 8vw, 6rem) 1.5rem;
}

/* ==================== scroll reveal ====================
   The hidden/revealed states are applied inline by assets/reveal.js, not
   here, so content defaults to fully visible if that script never runs
   (and can't be permanently hidden by a "remove unused CSS" optimizer
   stripping a rule keyed to a JS-only class). This block only turns off
   the animation for reduced-motion users. */

@media (prefers-reduced-motion: reduce) {
  .svmx-card, .svmx-btn, .svmx-card-thumb img {
    transition: none !important;
  }
  #svmx-bg-canvas {
    display: none;
  }
}
