/*
Theme Name: Cybernoid V1
Theme URI: https://example.com/cybernoid
Author: cyborgsdream333
Description: Minimal starter theme for WordPress.
Version: 0.1.0
Text Domain: cybernoid-v1
*/

:root {
  --bg: #f6f3ee;
  --fg: #1b1b1b;
  --accent: #d1462f;
  --muted: #6b6258;
  --beat-energy: 0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Georgia", "Times New Roman", serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}

.site-main {
  max-width: 760px;
  margin: 10vh auto;
  padding: 0 24px 10vh;
}

a:any-link,
a:-webkit-any-link {
  color: var(--accent) !important;
  -webkit-text-fill-color: var(--accent);
  text-decoration: none !important;
}

a:hover,
a:focus,
a:active,
a:visited {
  color: var(--accent) !important;
  -webkit-text-fill-color: var(--accent);
  text-decoration: none !important;
}

.site-main h2 a:any-link,
.site-main h2 a:-webkit-any-link {
  color: var(--accent) !important;
  -webkit-text-fill-color: var(--accent);
  text-decoration: none !important;
}

article {
  margin: 32px 0 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

h1,
h2 {
  margin: 0 0 12px;
  font-weight: 600;
}

p {
  margin: 0 0 16px;
}

.site-tagline {
  color: var(--muted);
  margin-bottom: 32px;
}

/* DEMOS page */
.demos-main {
  max-width: 1100px;
  margin: 8vh auto;
  padding: 0 24px 10vh;
}

.demos-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 20px;
}

.demos-title h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.demos-subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
}

.demos-actions {
  display: flex;
  gap: 10px;
}

.demos-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: rgba(0, 0, 0, 0.04);
  color: var(--fg);
  text-decoration: none;
  font-size: 14px;
}

.demos-nav {
  margin-bottom: 20px;
}

.demos-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.demos-menu a {
  color: var(--accent);
  text-decoration: none;
}

.demos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.demo-card {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.demo-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

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

.demo-thumb-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.02em;
}

.demo-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-card-title {
  margin: 0;
  font-size: 18px;
}

.demo-card-title a {
  color: var(--fg);
  text-decoration: none;
}

.demo-card-meta {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.demo-card-excerpt {
  margin: 0;
  color: var(--muted);
}

.demo-card-audio {
  width: 100%;
}

.demo-audio-link {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.demo-card-empty {
  padding: 20px;
  align-items: flex-start;
  justify-content: center;
}

.demos-pagination {
  margin-top: 24px;
}

.demos-pagination ul {
  list-style: none;
  display: flex;
  gap: 10px;
  padding: 0;
}

.demos-pagination a,
.demos-pagination span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: var(--fg);
  text-decoration: none;
}

.demo-single {
  max-width: 900px;
}

.demo-single-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.demo-back {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
}

.demo-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.demo-hero {
  margin: 0 0 18px;
}

.demo-hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
}

.demo-single-audio {
  width: 100%;
  margin: 10px 0 16px;
}

.demo-single-content {
  margin-top: 12px;
}

.demo-single-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}

.demo-single-nav a {
  color: var(--accent);
  text-decoration: none;
}

.demo-analysis {
  margin: 20px 0 10px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 calc(12px + (var(--beat-energy) * 22px)) rgba(24, 224, 198, calc(0.12 + (var(--beat-energy) * 0.35)));
  transition: box-shadow 0.15s ease;
}

.demo-visualizer {
  margin: 18px 0 12px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(243, 235, 224, 0.8));
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.08);
}

.demo-visualizer canvas {
  width: 100%;
  height: 400px;
  display: block;
}

.demo-analysis-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 10px;
}

.demo-analysis-bpm {
  color: var(--accent);
}

.demo-waveform {
  width: 100%;
  position: relative;
}

.demo-waveform canvas {
  width: 100%;
  height: 120px;
  display: block;
}

.demo-single-page {
  position: relative;
  overflow-x: hidden;
}

.demo-single-page .site-main,
.demo-single-page .demo-single {
  position: relative;
  z-index: 1;
}

.demo-lighting {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
  background:
    radial-gradient(circle at 20% 20%, rgba(24, 224, 198, calc(0.08 + (var(--beat-energy) * 0.25))) 0, rgba(24, 224, 198, 0) 55%),
    radial-gradient(circle at 80% 12%, rgba(209, 70, 47, calc(0.08 + (var(--beat-energy) * 0.3))) 0, rgba(209, 70, 47, 0) 60%),
    radial-gradient(circle at 55% 85%, rgba(39, 72, 98, calc(0.06 + (var(--beat-energy) * 0.22))) 0, rgba(39, 72, 98, 0) 60%);
  transition: opacity 0.2s ease, filter 0.2s ease;
  filter: blur(calc(8px + (var(--beat-energy) * 10px)));
}

.demo-title {
  position: relative;
  display: inline-block;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.08),
    0 0 calc(10px + (var(--beat-energy) * 18px)) rgba(209, 70, 47, calc(0.18 + (var(--beat-energy) * 0.45)));
  transition: text-shadow 0.15s ease;
}

#demoWaveformCanvas {
  position: relative;
  z-index: 1;
}

#demoWaveformOverlay {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  pointer-events: none;
}
