/*
Theme Name: Kinetickino
Theme URI: https://kinetickino.example.com
Author: Gordo
Author URI: https://kinetickino.example.com
Description: Anime & manga blog theme with webcomic hosting. A dark, kinetic visual system with glitch, scanline, spiral and noise effects.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kinetickino
Tags: blog, custom-menu, featured-images, custom-post-types, dark, anime, manga
*/

/* ==========================================================================
   Fonts (also enqueued via wp_enqueue_style in functions.php; @import kept
   as a fallback so the design renders even if enqueue is disabled)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Space+Mono:wght@400;700&display=swap');

/* ==========================================================================
   Reset
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
  --black: #0A0A0A;
  --red: #E6002E;
  --hot-pink: #FF0066;
  --white: #FAFAFA;
}

/* ==========================================================================
   Base
   ========================================================================== */
body {
  background: var(--black);
  color: var(--white);
  font-family: 'Bebas Neue', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Responsive safety: never allow horizontal scroll, keep media fluid. */
html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

svg {
  max-width: 100%;
}

/* Accessible keyboard focus rings (only show for keyboard users). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.nav-toggle:focus-visible,
.comic-filter:focus-visible {
  outline: 2px solid var(--hot-pink);
  outline-offset: 3px;
}

/* ==========================================================================
   Keyframe Animations
   ========================================================================== */
@keyframes spiral {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}

@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes textReveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* ==========================================================================
   Global Effects: Scanline / Noise
   ========================================================================== */
.scanline {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--hot-pink), transparent);
  opacity: 0.3;
  animation: scanline 4s linear infinite;
  pointer-events: none;
  z-index: 100;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Site Header / Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand name with glitch hover effect (from JSX .brand-name) */
.site-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 0.3em;
  color: var(--white);
  position: relative;
  line-height: 1;
}

.site-brand::after {
  content: 'KINETICKINO';
  position: absolute;
  left: 2px;
  top: 2px;
  color: var(--red);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.site-brand:hover::after {
  opacity: 1;
  animation: glitch 0.3s ease infinite;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
}

.nav-menu a {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  position: relative;
  padding: 4px 0;
  transition: color 0.3s ease;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--hot-pink));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a {
  color: var(--white);
}

.nav-menu a:hover::after,
.nav-menu .current-menu-item > a::after {
  transform: scaleX(1);
}

/* Hamburger — content-box keeps the 28x20 bar geometry (so the open/close
   transforms still line up) while padding grows the tap target to >=44px. */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: content-box;
  width: 28px;
  height: 20px;
  padding: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 95;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(80vw, 320px);
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    padding: 100px 40px 40px;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 0, 102, 0.2);
    transform: translateX(100%);
    /* visibility:hidden takes the off-screen links out of the tab order
       until the panel is opened. */
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
  }

  .nav-menu.is-open {
    transform: translateX(0);
    visibility: visible;
  }

  /* Larger tap targets for the slide-in menu links (>=44px). */
  .nav-menu a {
    font-size: 1rem;
    padding: 12px 0;
    display: block;
    width: 100%;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(230, 0, 46, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(255, 0, 102, 0.1) 0%, transparent 40%);
  pointer-events: none;
}

.spiral-bg {
  position: absolute;
  width: 800px;
  height: 800px;
  opacity: 0.03;
  animation: spiral 60s linear infinite;
}

.logo-container {
  position: relative;
  animation: fadeInUp 1s ease-out forwards, float 6s ease-in-out infinite;
  animation-delay: 0s, 1s;
}

.logo-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, var(--hot-pink), transparent 70%);
  opacity: 0;
  filter: blur(40px);
  transition: opacity 0.5s ease;
}

.logo-container:hover .logo-glow {
  opacity: 0.4;
}

.logo-image {
  width: 280px;
  height: 280px;
  object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(255, 0, 102, 0.3));
  transition: all 0.4s ease;
}

.logo-container:hover .logo-image {
  filter: drop-shadow(0 0 50px rgba(255, 0, 102, 0.5));
  transform: scale(1.05);
}

.brand-name {
  font-size: clamp(3rem, 10vw, 8rem);
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.3em;
  color: var(--white);
  margin-top: 2rem;
  position: relative;
  animation: fadeInUp 1s ease-out 0.3s both;
}

.brand-name::after {
  content: 'KINETICKINO';
  position: absolute;
  left: 2px;
  top: 2px;
  color: var(--red);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.brand-name:hover::after {
  opacity: 1;
  animation: glitch 0.3s ease infinite;
}

.tagline {
  font-family: 'Space Mono', monospace;
  font-size: clamp(0.8rem, 2vw, 1.1rem);
  color: var(--hot-pink);
  letter-spacing: 0.5em;
  margin-top: 1rem;
  text-transform: uppercase;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: fadeInUp 1s ease-out 1s both;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--hot-pink), transparent);
  animation: pulse 2s ease-in-out infinite;
}

.scroll-text {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--white);
  opacity: 0.5;
  letter-spacing: 0.3em;
  writing-mode: vertical-rl;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding: 120px 40px;
  position: relative;
}

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: var(--white);
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--hot-pink));
}

/* ==========================================================================
   Cards / Grid (reused for posts, webcomics, chapters archives)
   ========================================================================== */
.features-grid {
  display: grid;
  /* min(300px, 100%) keeps the desktop 300px track but prevents a track
     wider than the viewport on narrow phones (no horizontal scroll). */
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.feature-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 50px 40px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--hot-pink));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  background: linear-gradient(135deg, rgba(255,0,102,0.05) 0%, rgba(230,0,46,0.03) 100%);
  transform: translateY(-5px);
  border-color: rgba(255,0,102,0.2);
}

.feature-number {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 4rem;
  color: var(--hot-pink);
  opacity: 0.2;
  line-height: 1;
  margin-bottom: 1rem;
  transition: opacity 0.3s ease;
}

.feature-card:hover .feature-number {
  opacity: 0.5;
}

.feature-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  color: var(--white);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.feature-desc {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
}

/* "READ MORE" / "READ SERIES" link — gradient border slides in on hover */
.card-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: var(--white);
  padding: 10px 24px;
  border: 1px solid rgba(255,255,255,0.15);
  position: relative;
  overflow: hidden;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.card-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--red), var(--hot-pink));
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: -1;
}

.card-link:hover {
  border-color: var(--hot-pink);
}

.card-link:hover::before {
  transform: translateX(0);
}

/* ==========================================================================
   CTA
   ========================================================================== */
.cta-section {
  text-align: center;
  padding: 150px 40px;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(230,0,46,0.05) 50%, transparent 100%);
}

.cta-button {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  padding: 20px 60px;
  background: transparent;
  border: 2px solid var(--hot-pink);
  color: var(--white);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.cta-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--red), var(--hot-pink));
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: -1;
}

.cta-button:hover::before {
  transform: translateX(0);
}

.cta-button:hover {
  border-color: var(--red);
  transform: scale(1.05);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: linear-gradient(180deg, var(--black) 0%, #050505 100%);
  padding: 80px 40px 40px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.email-capture {
  position: relative;
}

.email-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  color: var(--white);
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
}

.email-subtitle {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1.5rem;
}

.email-form {
  display: flex;
  gap: 0;
  position: relative;
}

.email-input {
  flex: 1;
  padding: 16px 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-right: none;
  color: var(--white);
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.3s ease;
}

.email-input:focus {
  border-color: var(--hot-pink);
  background: rgba(255,0,102,0.05);
}

.email-input::placeholder {
  color: rgba(255,255,255,0.3);
}

.email-submit {
  padding: 16px 30px;
  background: linear-gradient(90deg, var(--red), var(--hot-pink));
  border: none;
  color: var(--white);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.email-submit:hover {
  transform: translateX(5px);
  box-shadow: -5px 0 20px rgba(255,0,102,0.3);
}

.success-message {
  position: absolute;
  bottom: -30px;
  left: 0;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--hot-pink);
}

.social-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

@media (max-width: 768px) {
  .social-section {
    align-items: center;
  }
}

.social-title {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.3em;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.social-icons {
  display: flex;
  gap: 20px;
}

.social-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--white);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.social-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--red), var(--hot-pink));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.social-icon:hover::before {
  opacity: 1;
}

.social-icon:hover {
  transform: translateY(-5px) rotate(5deg);
  border-color: var(--hot-pink);
  box-shadow: 0 10px 30px rgba(255,0,102,0.3);
}

.social-icon svg {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.social-icon:hover svg {
  transform: scale(1.2);
}

.footer-bottom {
  max-width: 1200px;
  margin: 60px auto 0;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

.copyright {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
}

.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.3em;
  color: var(--white);
  opacity: 0.5;
}

/* ==========================================================================
   WordPress core utility classes
   ========================================================================== */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.alignleft { float: left; margin-right: 1.5em; }
.alignright { float: right; margin-left: 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

/* ==========================================================================
   Footer menu
   ========================================================================== */
.footer-nav {
  margin-top: 1.5rem;
}

.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .footer-menu {
    justify-content: center;
  }
}

.footer-menu a {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease;
}

.footer-menu a:hover {
  color: var(--hot-pink);
}

/* ==========================================================================
   Archive header
   ========================================================================== */
.archive-header {
  margin-bottom: 3rem;
}

.archive-description {
  max-width: 700px;
  margin-top: 1.5rem;
}

/* ==========================================================================
   Category / tag pills
   ========================================================================== */
.category-pill {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--hot-pink);
  background: rgba(255, 0, 102, 0.08);
  border: 1px solid rgba(255, 0, 102, 0.3);
  padding: 5px 12px;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.category-pill:hover {
  background: var(--hot-pink);
  color: var(--black);
}

.tag-pill {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 8px 8px 0;
  transition: color 0.3s ease;
}

.tag-pill:hover {
  color: var(--hot-pink);
}

/* ==========================================================================
   Card meta (author + date)
   ========================================================================== */
.card-meta {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.1em;
  margin-top: 1rem;
}

.card-meta-sep {
  margin: 0 8px;
  opacity: 0.5;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.kinetickino-pagination {
  margin-top: 80px;
}

.kinetickino-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.kinetickino-pagination .page-numbers {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.kinetickino-pagination .page-numbers:hover,
.kinetickino-pagination .page-numbers.current {
  color: var(--white);
  border-color: var(--hot-pink);
  background: linear-gradient(90deg, var(--red), var(--hot-pink));
}

/* ==========================================================================
   Single post
   ========================================================================== */
.single-hero {
  position: relative;
  width: 100%;
  max-height: 70vh;
  overflow: hidden;
}

.single-hero-image {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
  display: block;
}

.single-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 40%,
    rgba(230, 0, 46, 0.2) 80%,
    rgba(10, 10, 10, 0.95) 100%
  );
  pointer-events: none;
}

.single-inner {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 40px;
}

.single-header {
  padding: 60px 0 40px;
}

.single-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.single-cats .category-pill {
  margin-bottom: 0;
}

.single-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 1.05;
  letter-spacing: 0.04em;
  color: var(--white);
}

.single-meta {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.1em;
  margin-top: 1.5rem;
}

.single-content {
  font-family: 'Space Mono', monospace;
  font-size: 0.95rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.8);
}

.single-content p {
  margin-bottom: 1.5rem;
}

.single-content h2,
.single-content h3,
.single-content h4 {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.08em;
  color: var(--white);
  margin: 2.5rem 0 1rem;
}

.single-content h2 { font-size: 2.2rem; }
.single-content h3 { font-size: 1.7rem; }

.single-content a {
  color: var(--hot-pink);
  text-decoration: underline;
}

.single-content img {
  height: auto;
  margin: 2rem 0;
}

.single-content blockquote {
  border-left: 3px solid var(--hot-pink);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: rgba(255, 255, 255, 0.6);
}

.single-tags {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   Author box
   ========================================================================== */
.author-box {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin: 60px 0;
  padding: 40px;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.author-box .author-avatar img {
  border-radius: 50%;
  border: 2px solid var(--hot-pink);
}

.author-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hot-pink);
}

.author-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.1em;
  color: var(--white);
  margin: 0.25rem 0 0.75rem;
}

.author-bio {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   Previous / Next navigation
   ========================================================================== */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 60px 0;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.post-nav-next {
  text-align: right;
  margin-left: auto;
}

.post-nav a {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-nav-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hot-pink);
}

.post-nav-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
}

.post-nav a:hover .post-nav-title {
  color: var(--white);
}

@media (max-width: 600px) {
  .author-box {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .post-nav {
    flex-direction: column;
  }

  .post-nav-next {
    text-align: left;
    margin-left: 0;
  }
}

/* ==========================================================================
   Webcomic library — filters
   ========================================================================== */
.comic-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 3rem;
}

.comic-filter {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.6);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 22px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.comic-filter::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--red), var(--hot-pink));
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: -1;
}

.comic-filter:hover {
  color: var(--white);
  border-color: var(--hot-pink);
}

.comic-filter.is-active {
  color: var(--white);
  border-color: var(--hot-pink);
}

.comic-filter.is-active::before {
  transform: translateX(0);
}

.comic-card[hidden] {
  display: none;
}

/* ==========================================================================
   Genre tags + comic card meta
   ========================================================================== */
.comic-genres,
.series-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1rem;
}

.genre-tag {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hot-pink);
  background: rgba(255, 0, 102, 0.08);
  border: 1px solid rgba(255, 0, 102, 0.25);
  padding: 4px 10px;
  transition: all 0.3s ease;
}

.genre-tag--link:hover {
  background: var(--hot-pink);
  color: var(--black);
}

.comic-card-meta {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.08em;
  margin-top: 0.75rem;
}

.comic-chapters {
  color: var(--hot-pink);
}

/* ==========================================================================
   Single webcomic — series header
   ========================================================================== */
.series-header {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px 60px;
  align-items: start;
}

@media (max-width: 860px) {
  .series-header {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.series-cover {
  position: relative;
}

.series-cover-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
  filter: drop-shadow(0 0 30px rgba(255, 0, 102, 0.2));
}

.series-cover-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(255, 0, 102, 0.25), transparent 70%);
  filter: blur(40px);
  z-index: -1;
}

.series-type {
  margin-bottom: 1rem;
}

.series-type-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

.series-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: 0.04em;
  color: var(--white);
  margin-bottom: 1.25rem;
}

/* Per-series metadata (ACF) — Space Mono rows matching the design system. */
.series-meta {
  margin: 1.5rem 0 0;
  display: grid;
  gap: 10px;
}

.series-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
}

.series-meta-row dt {
  flex-shrink: 0;
  min-width: 90px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.series-meta-row dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

.series-synopsis {
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.7);
  margin: 1.5rem 0 2rem;
  max-width: 640px;
}

.series-synopsis p {
  margin-bottom: 1.2rem;
}

.series-actions {
  margin-top: 2rem;
}

.series-start {
  display: inline-block;
}

/* ==========================================================================
   Chapter list
   ========================================================================== */
.chapter-list-section {
  padding: 40px 40px 100px;
}

.chapter-list-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.chapter-list {
  list-style: none;
  margin-top: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.chapter-row:nth-child(odd) {
  background: rgba(255, 255, 255, 0.02);
}

.chapter-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.04);
}

.chapter-link {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 24px;
  transition: background 0.3s ease, padding-left 0.3s ease;
}

.chapter-link:hover {
  background: linear-gradient(90deg, rgba(255, 0, 102, 0.12), transparent);
  padding-left: 32px;
}

.chapter-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--hot-pink);
  min-width: 80px;
  flex-shrink: 0;
}

.chapter-name {
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  flex: 1;
}

.chapter-date {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .chapter-date {
    display: none;
  }
}

/* ==========================================================================
   Chapter reader (long-strip)
   ========================================================================== */
.chapter-reader {
  background: var(--black);
}

.reader-header {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px 30px;
  text-align: center;
}

.reader-breadcrumb {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.reader-breadcrumb:hover {
  color: var(--hot-pink);
}

.reader-title {
  font-family: 'Bebas Neue', sans-serif;
  color: var(--white);
}

.reader-num {
  display: block;
  font-size: 1rem;
  letter-spacing: 0.3em;
  color: var(--hot-pink);
  margin-bottom: 0.5rem;
}

.reader-name {
  display: block;
  font-size: clamp(1.8rem, 5vw, 3rem);
  letter-spacing: 0.05em;
}

/* Long-strip reading column */
.reader-strip {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.reader-page {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}

.reader-content {
  font-family: 'Space Mono', monospace;
  font-size: 0.95rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.8);
  padding: 0 24px;
}

.reader-content img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

/* Chapter nav buttons */
.reader-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}

.reader-nav-btn {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  color: var(--white);
  padding: 16px 32px;
  background: linear-gradient(90deg, var(--red), var(--hot-pink));
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reader-nav-btn:not(.is-disabled):hover {
  transform: scale(1.04);
  box-shadow: 0 10px 30px rgba(255, 0, 102, 0.35);
}

.reader-nav-btn.is-disabled {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.25);
  cursor: not-allowed;
}

.reader-nav-index {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease;
}

.reader-nav-index:hover {
  color: var(--hot-pink);
}

@media (max-width: 600px) {
  .reader-nav {
    flex-direction: column;
  }

  .reader-nav-btn {
    width: 100%;
    text-align: center;
  }
}

/* ==========================================================================
   Search query highlight
   ========================================================================== */
.search-query {
  color: var(--hot-pink);
}

/* ==========================================================================
   404
   ========================================================================== */
.error-404 {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 40px;
  position: relative;
  overflow: hidden;
}

.error-404-inner {
  position: relative;
  z-index: 1;
}

.error-code {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(8rem, 30vw, 20rem);
  line-height: 1;
  letter-spacing: 0.05em;
  color: var(--white);
  position: relative;
  display: inline-block;
}

.error-code::before,
.error-code::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.error-code::before {
  color: var(--red);
  z-index: -2;
  animation: glitch 0.4s ease infinite;
}

.error-code::after {
  color: var(--hot-pink);
  z-index: -1;
  animation: glitch 0.3s ease infinite reverse;
}

.error-subtitle {
  font-family: 'Space Mono', monospace;
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--hot-pink);
  margin: 1rem 0 3rem;
}

/* ==========================================================================
   Phones (<=480px): tighten heavy horizontal padding so content reflows
   cleanly and type stays readable. Tablet/desktop are untouched.
   ========================================================================== */
@media (max-width: 480px) {
  .nav-container {
    padding: 16px 20px;
  }

  .section {
    padding: 72px 20px;
  }

  .cta-section {
    padding: 90px 20px;
  }

  .footer {
    padding: 60px 20px 32px;
  }

  .single-inner {
    padding: 0 20px;
  }

  .series-header {
    padding: 48px 20px 40px;
  }

  .chapter-list-section {
    padding: 32px 20px 72px;
  }

  .error-404 {
    padding: 90px 20px;
  }

  /* Long-spacing labels can overrun very narrow screens — ease them off. */
  .error-subtitle {
    letter-spacing: 0.25em;
  }

  .tagline {
    letter-spacing: 0.3em;
  }

  /* Chapter rows: let the title wrap instead of squeezing the number. */
  .chapter-link {
    gap: 12px;
    padding: 16px;
  }

  /* Touch-friendly filter buttons (>=44px) without altering desktop/tablet. */
  .comic-filter {
    min-height: 44px;
  }
}

/* ==========================================================================
   Reduced motion: honour the OS/browser preference. Near-zero durations
   stop the looping spiral/scanline/float/glitch while preserving the END
   state of one-shot reveals (fadeInUp) so nothing stays hidden.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  /* Fully hide the perpetual decorative layers rather than freezing a frame. */
  .scanline,
  .spiral-bg,
  .noise {
    display: none;
  }
}

/* ==========================================================================
   Brand Art gallery (mobile-first masonry) + lightbox
   ========================================================================== */
.gallery-intro {
  max-width: 700px;
  margin-top: 1.5rem;
}

.gallery-filters {
  margin-top: 2.5rem;
}

/* CSS multi-column masonry: 1 col on phones, layering up with min-width. */
.gallery-grid {
  column-count: 1;
  column-gap: 24px;
  max-width: 1400px;
  margin: 2.5rem auto 0;
}

@media (min-width: 600px) {
  .gallery-grid {
    column-count: 2;
  }
}

@media (min-width: 960px) {
  .gallery-grid {
    column-count: 3;
  }
}

.gallery-item {
  break-inside: avoid;
  margin: 0 0 24px;
}

.gallery-item[hidden] {
  display: none;
}

.gallery-link {
  display: block;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

/* Red→pink top bar that scales in on hover, echoing .feature-card. */
.gallery-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 2;
  background: linear-gradient(90deg, var(--red), var(--hot-pink));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.gallery-link:hover::before {
  transform: scaleX(1);
}

.gallery-image {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-link:hover {
  border-color: rgba(255, 0, 102, 0.25);
  box-shadow: 0 10px 30px rgba(255, 0, 102, 0.25);
}

.gallery-link:hover .gallery-image {
  transform: scale(1.05);
}

.gallery-caption {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 10px;
}

/* --- Lightbox ----------------------------------------------------------- */
.kk-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.kk-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.kk-lb-figure {
  margin: 0;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.kk-lb-img {
  max-width: 92vw;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 0 60px rgba(255, 0, 102, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.kk-lb-caption {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  max-width: 700px;
}

.kk-lb-close,
.kk-lb-prev,
.kk-lb-next {
  position: absolute;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  font-family: 'Bebas Neue', sans-serif;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.kk-lb-close {
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  font-size: 2rem;
}

.kk-lb-prev,
.kk-lb-next {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 64px;
  font-size: 2.4rem;
}

.kk-lb-prev { left: 16px; }
.kk-lb-next { right: 16px; }

.kk-lb-close:hover,
.kk-lb-prev:hover,
.kk-lb-next:hover {
  border-color: var(--hot-pink);
  background: linear-gradient(135deg, var(--red), var(--hot-pink));
}

.kk-lb-prev[hidden],
.kk-lb-next[hidden] {
  display: none;
}

@media (max-width: 600px) {
  .kk-lb-prev,
  .kk-lb-next {
    width: 40px;
    height: 52px;
    font-size: 2rem;
  }
}
