/* ============================================================
   KAIA LISA - webcore.css
   Y2K/2005 override stylesheet — loaded on top of styles.css
   ============================================================ */

/* ── FONTS ── */
@font-face {
  font-family: "PressStart2P";
  src: url("../fonts/PressStart2P-Regular.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ── BASE ── */
body {
  background: #000 !important;
  color: #00ff00 !important;
  font-family: "VT323", "Courier New", monospace !important;
  cursor:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><circle cx="10" cy="10" r="8" fill="%23ff00ff" stroke="%2300ffff" stroke-width="2"/></svg>')
      10 10,
    auto !important;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 16px;
}
::-webkit-scrollbar-track {
  background: #000;
  border: 2px solid #00ff00;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff00ff, #00ffff);
  border: 2px solid #ffff00;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #00ffff, #ff00ff);
}

/* ── HEADER ── */
header {
  background: linear-gradient(
    45deg,
    #ff00ff,
    #00ffff,
    #ffff00,
    #ff00ff
  ) !important;
  background-size: 400% 400% !important;
  animation: gradient-shift 3s ease infinite !important;
  border: 5px solid #00ff00 !important;
  box-shadow:
    0 0 30px #ff00ff,
    inset 0 0 30px rgba(0, 255, 255, 0.5) !important;
  padding: 16px 20px !important;
  position: relative;
  overflow: visible;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

header::before {
  content: "★";
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 30px;
  color: #ffff00;
  animation: spin 3s linear infinite;
}

header::after {
  content: "★";
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 30px;
  color: #ffff00;
  animation: spin 3s linear infinite reverse;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Site name */
header h1,
header .logo,
header .site-name {
  font-family: "PressStart2P", monospace !important;
  font-size: clamp(1.2rem, 3vw, 2.2rem) !important;
  color: #fff !important;
  text-shadow:
    3px 3px 0 #ff00ff,
    6px 6px 0 #00ffff,
    9px 9px 0 #ffff00,
    9px 9px 20px rgba(255, 0, 255, 0.8) !important;
  animation: glitch-text 1s infinite !important;
  letter-spacing: 2px;
  line-height: 1.4;
}

@keyframes glitch-text {
  0%,
  90%,
  100% {
    transform: translate(0);
  }
  92% {
    transform: translate(-3px, 3px);
  }
  94% {
    transform: translate(3px, -3px);
  }
  96% {
    transform: translate(-2px, -2px);
  }
}

/* Header subtext */
header p {
  color: #ffff00 !important;
  font-size: 20px !important;
  text-shadow:
    2px 2px 0 #000,
    2px 2px 10px #00ffff !important;
  margin-top: 15px;
}

/* About panel text */
.about-text p {
  color: #fff !important;
  font-size: 0.8rem !important;
  font-family: "Courier", monospace !important;
}

/* Header right — row on desktop, col on mobile */
.header-right {
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 6px !important;
}

/* Header buttons — equal size, scoped to header only */
.header-right #mode-toggle,
.header-right .about-btn {
  flex: 1 !important;
  width: auto !important;
  text-align: center !important;
  padding: 8px 12px !important;
  font-size: 14px !important;
  margin: 0 !important;
  display: block !important;
}

.header-right #mode-toggle {
  white-space: nowrap !important;
}

/* ── MODE TOGGLE BUTTON ── */
#mode-toggle,
.mode-toggle {
  position: static !important;
  top: auto !important;
  right: auto !important;
  z-index: auto !important;
  background: linear-gradient(180deg, #c0c0c0, #808080) !important;
  border: 3px outset #fff !important;
  font-family: "VT323", monospace !important;
  font-weight: bold !important;
  color: #000 !important;
  cursor: pointer !important;
  box-shadow: 3px 3px 0 #000 !important;
  transition: all 0.1s !important;
  text-transform: uppercase;
  text-align: center !important;
  border-radius: 0 !important;
}

#mode-toggle:hover,
.mode-toggle:hover {
  background: linear-gradient(180deg, #ffff00, #ff00ff) !important;
  transform: translate(1px, 1px) !important;
  box-shadow: 2px 2px 0 #000 !important;
}

#mode-toggle:active,
.mode-toggle:active {
  border-style: inset !important;
  transform: translate(3px, 3px) !important;
  box-shadow: 1px 1px 0 #000 !important;
}

/* Always show full text in webcore, never the emoji */
#mode-toggle .btn-short {
  display: none !important;
}
#mode-toggle .btn-long {
  display: inline !important;
}

/* ── NAVIGATION / FILTER BAR ── */
nav,
.filter-bar {
  margin: 30px auto !important;
  text-align: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.7) !important;
  border: 3px solid #00ffff !important;
  backdrop-filter: blur(5px);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
  max-width: 1200px !important;
  width: 100% !important;
}

.about-panel {
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

nav a,
nav button,
.filter-bar button,
.filter-btn,
.about-btn {
  display: inline-block !important;
  background: linear-gradient(180deg, #c0c0c0, #808080) !important;
  border: 3px outset #fff !important;
  padding: 12px 24px !important;
  margin: 8px !important;
  color: #000 !important;
  text-decoration: none !important;
  font-family: "VT323", monospace !important;
  font-size: 18px !important;
  font-weight: bold !important;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 #000 !important;
  transition: all 0.1s !important;
  cursor: pointer;
}

nav a:hover,
nav button:hover,
.filter-bar button:hover,
.filter-btn:hover,
.about-btn:hover {
  background: linear-gradient(180deg, #ffff00, #ff00ff) !important;
  transform: translate(1px, 1px) !important;
  box-shadow: 3px 3px 0 #000 !important;
}

nav a:active,
nav button:active,
nav a.active,
nav button.active,
.filter-btn:active,
.filter-btn.active,
.about-btn:active,
.about-btn.active {
  border-style: inset !important;
  transform: translate(3px, 3px) !important;
  box-shadow: 1px 1px 0 #000 !important;
  background: linear-gradient(180deg, #808080, #c0c0c0) !important;
}

/* ── TICKER ── */
.ticker-wrap {
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow: hidden !important;
}

.ticker,
.marquee {
  background: #ff00ff !important;
  color: #ffff00 !important;
  border: 4px solid #00ffff !important;
  box-shadow: 0 0 20px #ff00ff !important;
  padding: 12px 0 !important;
  font-family: "VT323", monospace !important;
  font-size: 20px !important;
  font-weight: bold !important;
  overflow: visible !important;
  position: relative;
}

.ticker::before {
  content: "★ ";
  color: #00ffff;
  animation: blink 0.8s infinite;
}
.ticker::after {
  content: " ★";
  color: #00ffff;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

/* ── GRID ── */
.portfolio-grid,
.project-grid {
  margin: 40px 0 !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.grid-item {
  background: #000 !important;
  padding: 0 !important;
  position: relative;
  transition: all 0.3s ease !important;
  box-shadow:
    0 0 0 2px #ff00ff,
    0 0 0 4px #00ffff,
    0 0 15px rgba(255, 0, 255, 0.5) !important;
  border: 2px solid #fff !important;
  overflow: hidden;
}

.grid-item:nth-child(6n + 1) {
  box-shadow:
    0 0 0 2px #ff69b4,
    0 0 0 4px #ffd700,
    0 0 15px rgba(255, 105, 180, 0.5) !important;
}
.grid-item:nth-child(6n + 2) {
  box-shadow:
    0 0 0 2px #00ffff,
    0 0 0 4px #ff00ff,
    0 0 15px rgba(0, 255, 255, 0.5) !important;
}
.grid-item:nth-child(6n + 3) {
  box-shadow:
    0 0 0 2px #ffff00,
    0 0 0 4px #ff1493,
    0 0 15px rgba(255, 255, 0, 0.5) !important;
}
.grid-item:nth-child(6n + 4) {
  box-shadow:
    0 0 0 2px #ff1493,
    0 0 0 4px #00ff00,
    0 0 15px rgba(255, 20, 147, 0.5) !important;
}
.grid-item:nth-child(6n + 5) {
  box-shadow:
    0 0 0 2px #00ff00,
    0 0 0 4px #ff00ff,
    0 0 15px rgba(0, 255, 0, 0.5) !important;
}
.grid-item:nth-child(6n + 6) {
  box-shadow:
    0 0 0 2px #ffd700,
    0 0 0 4px #00ffff,
    0 0 15px rgba(255, 215, 0, 0.5) !important;
}

.grid-item:hover {
  transform: scale(1.08) rotate(-2deg) !important;
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 6px #ff00ff,
    0 0 0 9px #00ffff,
    0 0 0 12px #ffff00,
    0 0 40px rgba(255, 0, 255, 0.8),
    0 10px 30px rgba(0, 0, 0, 0.5) !important;
  z-index: 10;
}

.grid-item img {
  border: 2px solid #00ff00 !important;
  transition: all 0.3s !important;
}
.grid-item:hover img {
  transform: scale(1.02) !important;
}

.grid-item h3,
.grid-item .item-title {
  color: #ffff00 !important;
  font-family: "PressStart2P", monospace !important;
  font-size: 14px !important;
  text-shadow:
    2px 2px 0 #ff00ff,
    2px 2px 10px rgba(255, 0, 255, 0.8) !important;
  margin: 15px 0 10px 0 !important;
  line-height: 1.6;
}

.grid-item .item-overlay {
  padding: 12px !important;
}

.grid-item .type,
.grid-item .year,
.grid-item .item-meta,
.grid-item .item-role,
.grid-item p {
  color: #00ffff !important;
  font-family: "VT323", monospace !important;
  font-size: 18px !important;
}

.grid-item::after {
  content: "✦";
  position: absolute;
  bottom: -8px;
  right: -8px;
  font-size: 20px;
  color: #ffff00;
  text-shadow:
    0 0 5px #ffff00,
    0 0 10px #ff00ff;
  animation: twinkle-star 2s infinite;
  z-index: 5;
}

.grid-item:nth-child(even)::after {
  content: "♡";
  color: #ff69b4;
  text-shadow:
    0 0 5px #ff69b4,
    0 0 10px #ff1493;
}

@keyframes twinkle-star {
  0%,
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.2) rotate(180deg);
  }
}

/* ── OVERLAY  ── */

/* Desktop: ensure gradient reaches the bottom edge */
.grid-item .item-overlay {
  inset: 0 !important;
  padding-bottom: 14px !important;
}

/* Mobile: always-visible overlay — remove darkening, keep subtle
   bottom gradient only for text legibility */
@media (hover: none) {
  .item-overlay {
    background: linear-gradient(
      to top,
      rgba(10, 10, 10, 0.72) 0%,
      transparent 40%
    ) !important;
  }
}

/* ── MODAL ── */
.modal,
.modal-overlay {
  background: rgba(0, 0, 0, 0.95) !important;
  border: 5px solid #00ffff !important;
  box-shadow: 0 0 50px #ff00ff !important;
}

.modal-content,
.modal-box {
  background: #000 !important;
  border: 5px solid #ffff00 !important;
  color: #00ff00 !important;
}

.modal h2,
.modal-title {
  color: #ff00ff !important;
  font-family: "PressStart2P", monospace !important;
  font-size: clamp(1rem, 3vw, 1.8rem) !important;
  text-shadow: 3px 3px 0 #00ffff !important;
  line-height: 1.4 !important;
  word-wrap: break-word !important;
}

.modal-body {
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  overflow: hidden !important;
}

.modal-category {
  font-family: "VT323", monospace !important;
  font-size: 1.2rem !important;
  color: #00ffff !important;
}

.modal-role {
  font-family: "VT323", monospace !important;
  font-size: 1.1rem !important;
  color: #ffff00 !important;
}

.modal-desc {
  font-family: "VT323", monospace !important;
  font-size: 1.2rem !important;
  color: #00ff00 !important;
  line-height: 1.5 !important;
  word-wrap: break-word !important;
}

.modal-action:not([style*="display: none"]) {
  background: linear-gradient(180deg, #c0c0c0, #808080) !important;
  border: 3px outset #fff !important;
  padding: 12px 24px !important;
  margin: 8px !important;
  color: #000 !important;
  text-decoration: none !important;
  font-family: "VT323", monospace !important;
  font-size: 18px !important;
  font-weight: bold !important;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 #000 !important;
  transition: all 0.1s !important;
  cursor: pointer;
}

.modal-action:not([style*="display: none"]):hover {
  background: linear-gradient(180deg, #ffff00, #ff00ff) !important;
  transform: translate(1px, 1px) !important;
  box-shadow: 3px 3px 0 #000 !important;
}

.modal-action:not([style*="display: none"]):active {
  border-style: inset !important;
  transform: translate(3px, 3px) !important;
  box-shadow: 1px 1px 0 #000 !important;
  background: linear-gradient(180deg, #808080, #c0c0c0) !important;
}

/* ── FOOTER ── */
footer,
.site-footer {
  background: #1a1a1a !important;
  border-top: 5px solid #ff00ff !important;
  padding: 40px 20px !important;
  margin-top: 60px;
  box-shadow: 0 -10px 30px rgba(255, 0, 255, 0.3);
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 16px !important;
}

footer p,
.site-footer p {
  color: #00ffff !important;
  font-family: "VT323", monospace !important;
  font-size: 18px !important;
}
footer a,
.site-footer a {
  color: #00ff00 !important;
  text-decoration: none;
  text-shadow: 0 0 5px #00ff00;
  transition: all 0.3s;
}
footer a:hover,
.site-footer a:hover {
  color: #ffff00 !important;
  text-shadow: 0 0 10px #ffff00;
  text-decoration: underline;
}
footer .copyright,
.site-footer .copyright {
  color: #666 !important;
  font-size: 14px !important;
  margin-top: 20px;
}

/* ── WEBCORE-ONLY ELEMENTS ── */
.webcore-only {
  display: block !important;
}

.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  animation: twinkle 3s infinite;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.particle {
  position: fixed;
  font-size: 20px;
  animation: fall linear infinite;
  pointer-events: none;
}

@keyframes fall {
  to {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

/* Visitor counter */
.visitor-counter,
.counter {
  background: #000 !important;
  border: 4px solid #00ff00 !important;
  padding: 20px !important;
  text-align: center;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 30px 0 !important;
  flex: 1 !important;
  box-shadow: 0 0 25px rgba(0, 255, 0, 0.5) !important;
}

.visitor-counter p,
.counter p {
  color: #00ff00 !important;
  font-family: "PressStart2P", monospace !important;
  font-size: 12px !important;
  margin-bottom: 15px;
}

.counter-display {
  font-family: "VT323", monospace !important;
  font-size: 32px !important;
  color: #ff0000 !important;
  background: #000;
  padding: 15px;
  border: 3px solid #ff0000;
  letter-spacing: 8px;
  display: inline-block;
  text-shadow: 0 0 10px #ff0000;
}

/* MIDI player */
.midi-player {
  background: #000 !important;
  border: 5px solid #00ffff !important;
  text-align: center;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 25px !important;
  margin: 30px 0 !important;
  flex: 1 !important;
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.5) !important;
}

.midi-player h4 {
  color: #ffff00 !important;
  font-family: "PressStart2P", monospace !important;
  font-size: 12px !important;
  text-align: center;
  margin-bottom: 15px;
  text-shadow: 2px 2px 0 #ff00ff;
}

.midi-player p {
  color: #00ff00 !important;
  font-family: "VT323", monospace !important;
  font-size: 18px !important;
  text-align: center;
}

.midi-controls {
  display: flex;
  gap: 5px !important;
  justify-content: center;
  margin: 15px 0;
  flex-wrap: nowrap !important;
}

.midi-button {
  background: linear-gradient(180deg, #c0c0c0, #808080) !important;
  border: 3px outset #fff !important;
  padding: 6px 10px !important;
  font-family: "VT323", monospace !important;
  font-size: 14px !important;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.1s;
  color: #000 !important;
}

.midi-button:hover {
  background: linear-gradient(180deg, #d0d0d0, #909090) !important;
}
.midi-button:active {
  border-style: inset !important;
}

/* Under construction */
.construction,
.under-construction {
  background: #ffff00 !important;
  border: 5px dashed #ff0000 !important;
  padding: 30px !important;
  text-align: center;
  margin: 30px 0 !important;
  flex: 1 !important;
  animation: construction-pulse 2s infinite;
}

@keyframes construction-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.construction h2,
.under-construction h2 {
  color: #000 !important;
  font-family: "PressStart2P", monospace !important;
  font-size: 16px !important;
  margin-bottom: 20px;
}
.construction p,
.under-construction p {
  color: #000 !important;
  font-family: "VT323", monospace !important;
  font-size: 20px !important;
  font-weight: bold;
}

.webcore-only:has(.visitor-counter) {
  display: flex !important;
  gap: 10px !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
}

/* 88x31 badges */
.badges {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 30px 0 !important;
}

.badge {
  width: 88px !important;
  height: 31px !important;
  border: 1px solid #666 !important;
  transition: transform 0.2s !important;
  image-rendering: pixelated;
  cursor: pointer;
}

.badge:hover {
  transform: scale(1.3) !important;
  box-shadow: 0 0 10px #ff00ff;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .webcore-only:has(.visitor-counter) {
    flex-direction: column !important;
  }
   .visitor-counter,
  .midi-player,
  .construction,
  .under-construction {
    margin: 0 !important;
  }
}

@media (max-width: 768px) {
  header h1,
  header .logo,
  header .site-name {
    font-size: 24px !important;
  }

  .grid-item h3,
  .grid-item .item-title {
    font-size: 11px !important;
  }

  nav,
  .filter-bar {
    padding: 12px !important;
  }

  nav a,
  nav button,
  .filter-bar button,
  .filter-btn {
    padding: 8px 12px !important;
    margin: 4px !important;
    font-size: 14px !important;
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: flex-start !important;
  }

  .header-right {
    flex-direction: column !important;
    align-items: stretch !important;
    min-width: 100px !important;
    flex-shrink: 0 !important;
  }

  .header-right #mode-toggle,
  .header-right .about-btn {
    width: 100% !important;
    min-width: unset !important;
    flex: none !important;
  }
  .filter-bar {
    padding: 4px !important;
    margin: 0 !important;
  }

  .filter-btn {
    padding: 6px 8px !important;
    margin: 2px !important;
    font-size: 12px !important;
    letter-spacing: 0.05em !important;
  }

  .modal-body {
    grid-template-columns: 1fr !important;
  }

  .modal-action:not([style*="display:none"]):not([style*="display: none"]) {
    display: block !important;
    width: 100% !important;
    margin: 4px 0 !important;
    padding: 10px !important;
    box-sizing: border-box !important;
  }
}

/* ── ACCESSIBILITY ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .particle {
    display: none !important;
  }
}

@media (prefers-contrast: high) {
  body {
    background: #000 !important;
    color: #fff !important;
  }
  .grid-item {
    border: 3px solid #fff !important;
  }
}

/* ── PRINT ── */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }

  .stars,
  #particles,
  .visitor-counter,
  .midi-player,
  .construction,
  #mode-toggle {
    display: none !important;
  }

  .grid-item {
    border: 1px solid #000 !important;
    animation: none !important;
  }
}
