/*
Theme Name: Neural Glitch
Theme URI: https://example.com
Description: Ein KI-inspiriertes WordPress-Theme mit Neural-Network-Partikeln, Glitch-Effekten und holographischen Animationen. Designed für KI-Coding-Projekte.
Version: 1.0.0
Author: Du
Text Domain: neural-glitch-theme
*/

/* ======================================================
   FONTS
====================================================== */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

/* ======================================================
   CSS VARIABLES
====================================================== */
:root {
  --void:       #02040a;
  --deep:       #050c18;
  --surface:    #0a1628;
  --surface2:   #0f1f38;
  --border:     rgba(0,255,200,0.15);
  --border-hot: rgba(0,255,200,0.5);
  --teal:       #00ffc8;
  --teal-dim:   rgba(0,255,200,0.6);
  --teal-glow:  rgba(0,255,200,0.12);
  --magenta:    #ff00aa;
  --mag-dim:    rgba(255,0,170,0.6);
  --mag-glow:   rgba(255,0,170,0.1);
  --amber:      #ffaa00;
  --white:      #e8f4ff;
  --muted:      rgba(180,210,255,0.45);
  --font-head:  'Orbitron', monospace;
  --font-body:  'Space Mono', monospace;
  --r:          4px;
}

/* ======================================================
   RESET
====================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.8;
  overflow-x: hidden;
  cursor: none;
}

a { color: var(--teal); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--magenta); }
img { max-width: 100%; height: auto; display: block; }

/* ======================================================
   CUSTOM CURSOR
====================================================== */
#cursor-outer {
  position: fixed;
  width: 36px; height: 36px;
  border: 1px solid var(--teal);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.08s, border-color 0.2s, width 0.2s, height 0.2s;
}
#cursor-inner {
  position: fixed;
  width: 6px; height: 6px;
  background: var(--teal);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}
body:hover #cursor-outer { opacity: 1; }

/* ======================================================
   NEURAL CANVAS (background)
====================================================== */
#neural-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0.55;
}

/* ======================================================
   SCANLINES overlay
====================================================== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* ======================================================
   LAYOUT
====================================================== */
.site-wrapper {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ======================================================
   HEADER
====================================================== */
#masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(2,4,10,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-title {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: var(--teal);
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 0 20px var(--teal-dim);
}
.site-title a { color: inherit; }
.site-title a:hover { color: var(--magenta); text-shadow: 0 0 20px var(--mag-dim); }

.header-status {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  flex: 1;
}
.status-dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--teal);
  border-radius: 50%;
  margin-right: 6px;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px var(--teal);
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* ======================================================
   NAVIGATION
====================================================== */
#site-navigation { margin-left: auto; }
#site-navigation ul { list-style: none; display: flex; gap: 2px; }

#site-navigation ul li a {
  display: block;
  padding: 6px 14px;
  font-family: var(--font-head);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: var(--r);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

#site-navigation ul li a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--teal-glow);
  opacity: 0;
  transition: opacity 0.2s;
}

#site-navigation ul li a:hover,
#site-navigation ul li.current-menu-item a {
  color: var(--teal);
  border-color: var(--border-hot);
  text-decoration: none;
}
#site-navigation ul li a:hover::before,
#site-navigation ul li.current-menu-item a::before { opacity: 1; }

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--teal);
  font-family: var(--font-head);
  font-size: 10px;
  padding: 6px 12px;
  cursor: none;
  border-radius: var(--r);
  letter-spacing: 0.1em;
}

/* ======================================================
   GLITCH TEXT EFFECT
====================================================== */
.glitch {
  position: relative;
  display: inline-block;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}
.glitch::before {
  color: var(--magenta);
  animation: glitch-1 3.5s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}
.glitch::after {
  color: var(--teal);
  animation: glitch-2 3.5s infinite;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}
@keyframes glitch-1 {
  0%,90%,100% { transform: none; opacity: 0; }
  91% { transform: translate(-3px, 1px); opacity: 0.7; }
  93% { transform: translate(3px, -1px); opacity: 0.7; }
  95% { transform: translate(-2px, 2px); opacity: 0.7; }
  97% { transform: none; opacity: 0; }
}
@keyframes glitch-2 {
  0%,88%,100% { transform: none; opacity: 0; }
  89% { transform: translate(3px, -2px); opacity: 0.6; }
  91% { transform: translate(-3px, 1px); opacity: 0.6; }
  94% { transform: translate(2px, -1px); opacity: 0.6; }
  96% { transform: none; opacity: 0; }
}

/* ======================================================
   HERO SECTION
====================================================== */
.hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 28px 60px;
  max-width: 960px;
  margin: 0 auto;
  position: relative;
}

.hero-eyebrow {
  font-family: var(--font-head);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.2s forwards;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.4s forwards;
}

.hero-sub {
  font-size: 13px;
  color: var(--muted);
  max-width: 500px;
  line-height: 1.8;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.6s forwards;
}

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.8s forwards;
}

.hero-stat-val {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 900;
  color: var(--teal);
  text-shadow: 0 0 24px var(--teal-dim);
  display: block;
  line-height: 1;
}

.hero-stat-label {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

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

/* ======================================================
   HOLO CARDS (Post cards)
====================================================== */
.holo-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
  transform-style: preserve-3d;
}

.holo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0,255,200,0.05) 0%,
    transparent 50%,
    rgba(255,0,170,0.05) 100%
  );
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.holo-card::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0,255,200,0.06),
    transparent
  );
  transition: left 0.5s ease;
  pointer-events: none;
}

.holo-card:hover {
  border-color: var(--border-hot);
  transform: translateY(-3px);
}
.holo-card:hover::before { opacity: 1; }
.holo-card:hover::after  { left: 140%; }

/* Corner accents */
.holo-card .corner {
  position: absolute;
  width: 12px; height: 12px;
}
.holo-card .corner-tl { top: 8px; left: 8px; border-top: 1px solid var(--teal); border-left: 1px solid var(--teal); }
.holo-card .corner-tr { top: 8px; right: 8px; border-top: 1px solid var(--teal); border-right: 1px solid var(--teal); }
.holo-card .corner-bl { bottom: 8px; left: 8px; border-bottom: 1px solid var(--teal); border-left: 1px solid var(--teal); }
.holo-card .corner-br { bottom: 8px; right: 8px; border-bottom: 1px solid var(--teal); border-right: 1px solid var(--teal); }

.post-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-tag {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--teal);
  border-radius: 2px;
  color: var(--teal);
  font-family: var(--font-head);
  font-size: 8px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: var(--teal-glow);
}
.post-tag.mag {
  border-color: var(--magenta);
  color: var(--magenta);
  background: var(--mag-glow);
}
.post-tag.amb {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(255,170,0,0.08);
}

.post-title {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 10px;
  line-height: 1.4;
}
.post-title a { color: var(--white); }
.post-title a:hover { color: var(--teal); text-decoration: none; }

.post-excerpt {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

/* Section header */
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 48px 0 24px;
}
.section-header-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-hot), transparent);
}
.section-header-text {
  font-family: var(--font-head);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--teal);
  white-space: nowrap;
}

/* ======================================================
   MAIN / CONTENT
====================================================== */
#primary {
  position: relative;
  z-index: 2;
  padding-bottom: 80px;
}

.content-area {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ======================================================
   SINGLE POST
====================================================== */
.single-header {
  padding: 60px 28px 40px;
  max-width: 960px;
  margin: 0 auto;
}

.single-header .post-title {
  font-size: clamp(18px, 3vw, 32px);
  margin-bottom: 16px;
}
.single-header .post-title a { color: var(--white); }

.entry-content {
  max-width: 720px;
  font-size: 14px;
  line-height: 1.9;
}

.entry-content h2 {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  text-shadow: 0 0 16px var(--teal-dim);
}

.entry-content h3 {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--magenta);
  margin: 28px 0 12px;
}

.entry-content p { margin-bottom: 20px; color: var(--white); }
.entry-content a { color: var(--teal); border-bottom: 1px solid var(--border); }
.entry-content a:hover { color: var(--magenta); border-color: var(--magenta); text-decoration: none; }

.entry-content strong { color: var(--amber); font-weight: 700; }

.entry-content ul,
.entry-content ol {
  margin: 0 0 20px 0;
  padding: 0;
  list-style: none;
}
.entry-content ul li,
.entry-content ol li {
  padding: 6px 0 6px 20px;
  position: relative;
  color: var(--white);
  border-bottom: 1px solid rgba(0,255,200,0.05);
}
.entry-content ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--teal);
}

.entry-content code {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--teal);
}

.entry-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  overflow-x: auto;
  margin-bottom: 24px;
  position: relative;
}
.entry-content pre::before {
  content: '// CODE';
  display: block;
  font-family: var(--font-head);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--teal);
  margin-bottom: 12px;
  opacity: 0.6;
}
.entry-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--white);
  font-size: 13px;
}

blockquote {
  border-left: 2px solid var(--teal);
  margin: 24px 0;
  padding: 8px 20px;
  color: var(--muted);
  font-style: italic;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 8px 16px;
  margin-top: 40px;
  transition: all 0.2s;
}
.back-link:hover {
  color: var(--teal);
  border-color: var(--border-hot);
  text-decoration: none;
}

/* ======================================================
   PAGE TEMPLATE
====================================================== */
.page-header {
  padding: 60px 28px 20px;
  max-width: 960px;
  margin: 0 auto;
}
.page-header h1 {
  font-family: var(--font-head);
  font-size: clamp(18px, 3vw, 36px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
}
.page-header h1 .glitch::before,
.page-header h1 .glitch::after { content: attr(data-text); }

/* ======================================================
   WIDGETS / SIDEBAR
====================================================== */
.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.widget-title {
  font-family: var(--font-head);
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  text-shadow: 0 0 12px var(--teal-dim);
}
.widget ul { list-style: none; }
.widget ul li {
  padding: 7px 0;
  border-bottom: 1px solid rgba(0,255,200,0.05);
  font-size: 12px;
}
.widget ul li a { color: var(--muted); }
.widget ul li a:hover { color: var(--teal); text-decoration: none; }
.widget ul li a::before { content: '› '; color: var(--teal); }

/* ======================================================
   PAGINATION
====================================================== */
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px; }
.page-numbers {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-family: var(--font-head);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--muted);
  transition: all 0.2s;
}
.page-numbers:hover, .page-numbers.current {
  color: var(--teal);
  border-color: var(--border-hot);
  background: var(--teal-glow);
  text-decoration: none;
}

/* ======================================================
   SEARCH FORM
====================================================== */
.search-form { display: flex; gap: 8px; }
.search-field {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 12px;
  padding: 8px 12px;
  outline: none;
  cursor: none;
}
.search-field::placeholder { color: var(--muted); }
.search-field:focus { border-color: var(--border-hot); }
.search-submit {
  background: var(--teal-glow);
  border: 1px solid var(--border-hot);
  border-radius: var(--r);
  color: var(--teal);
  font-family: var(--font-head);
  font-size: 9px;
  letter-spacing: 0.15em;
  padding: 8px 14px;
  cursor: none;
  text-transform: uppercase;
  transition: all 0.2s;
}
.search-submit:hover { background: rgba(0,255,200,0.2); }

/* ======================================================
   FOOTER
====================================================== */
#colophon {
  position: relative;
  z-index: 2;
  background: rgba(2,4,10,0.9);
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-name {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  text-shadow: 0 0 16px var(--teal-dim);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  font-family: var(--font-head);
  font-size: 8px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-links a:hover { color: var(--teal); text-decoration: none; }
.footer-copy {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* ======================================================
   COMMENTS
====================================================== */
.comments-area { margin-top: 48px; border-top: 1px solid var(--border); padding-top: 32px; }
.comments-title {
  font-family: var(--font-head);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 24px;
}
.comment {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.comment-meta { font-size: 10px; color: var(--muted); margin-bottom: 8px; }
.comment-body p { font-size: 13px; color: var(--white); }

/* ======================================================
   RESPONSIVE
====================================================== */
@media (max-width: 680px) {
  body { font-size: 13px; cursor: auto; }
  #cursor-outer, #cursor-inner { display: none; }
  .site-header-inner { padding: 0 16px; }
  .header-status { display: none; }
  #site-navigation { display: none; }
  #site-navigation.toggled {
    display: block;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: rgba(2,4,10,0.97);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    z-index: 99;
  }
  #site-navigation.toggled ul { flex-direction: column; gap: 4px; }
  #site-navigation.toggled ul li a { width: 100%; border: 1px solid var(--border); }
  .menu-toggle { display: block; }
  .hero { padding: 40px 16px 40px; min-height: auto; }
  .hero-stats { gap: 24px; }
  .content-area, .single-header, .page-header { padding: 0 16px; }
  .site-wrapper { padding: 0 16px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
