/* KingWerx Cyberpunk Theme */

:root {
  --neon-cyan: #0ff;
  --neon-magenta: #f0f;
  --neon-yellow: #ff0;
  --neon-red: #ff3333;
  --bg-dark: #0a0a0f;
  --bg-card: rgba(10, 10, 20, 0.85);
  --text-primary: #e0e0e0;
  --text-dim: #666;
  --border-glow: #0ff3;
}

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

body {
  font-family: 'Courier New', 'Consolas', monospace;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Scanlines overlay */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.1) 2px,
    rgba(0, 0, 0, 0.1) 4px
  );
  z-index: 1000;
}

/* Grid background */
.grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -1;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* Header */
header {
  text-align: center;
  padding: 40px 0 30px;
  border-bottom: 1px solid var(--border-glow);
  margin-bottom: 30px;
}

.logo-container {
  margin-bottom: 20px;
}

/* Logo */
.logo-link {
  text-decoration: none;
}

.logo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.logo-bracket {
  font-size: 3rem;
  color: var(--neon-magenta);
  font-weight: 100;
  opacity: 0.7;
}

.logo {
  font-size: 2.8rem;
  font-weight: bold;
  color: #fff;
  letter-spacing: 6px;
  text-transform: uppercase;
}

.logo .accent {
  color: var(--neon-cyan);
  text-shadow: 0 0 20px var(--neon-cyan), 0 0 40px var(--neon-cyan);
}

.tagline {
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 6px;
  margin-top: 10px;
}

.status-bar {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot.online {
  background: #0f0;
  box-shadow: 0 0 10px #0f0;
  animation: pulse 2s infinite;
}

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

/* Hero */
.hero {
  text-align: center;
  padding: 30px 0;
}

.bracket {
  color: var(--neon-magenta);
}

.intro-text {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--neon-cyan);
}

.description {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Navigation Cards */
.nav-grid {
  display: grid;
  gap: 15px;
  margin: 30px 0;
}

.nav-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid #333;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.nav-card:hover::before {
  left: 100%;
}

.nav-card:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
  transform: translateX(5px);
}

.nav-card.youtube:hover {
  border-color: var(--neon-red);
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.2);
}

.nav-card.youtube .card-icon {
  color: var(--neon-red);
}

.nav-card.weather:hover {
  border-color: var(--neon-cyan);
}

.nav-card.weather .card-icon {
  color: var(--neon-cyan);
}

.nav-card.system .card-icon {
  color: var(--neon-yellow);
}

.nav-card.access:hover {
  border-color: #0f0;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
}

.nav-card.access .card-icon {
  color: #0f0;
}

.nav-card.certs:hover {
  border-color: #f90;
  box-shadow: 0 0 20px rgba(255, 153, 0, 0.2);
}

.nav-card.certs .card-icon {
  color: #f90;
}

.nav-card.weatherclock:hover,
.nav-card.esp32-projects:hover {
  border-color: var(--neon-magenta);
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.2);
}

.nav-card.weatherclock .card-icon,
.nav-card.esp32-projects .card-icon {
  color: var(--neon-magenta);
}

.card-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.card-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 5px currentColor);
}

.card-content {
  flex: 1;
}

.card-content h3 {
  font-size: 1rem;
  margin-bottom: 4px;
  letter-spacing: 2px;
}

.card-content p {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.card-arrow {
  font-size: 1.5rem;
  color: var(--text-dim);
  transition: transform 0.3s ease;
}

.nav-card:hover .card-arrow {
  transform: translateX(5px);
  color: var(--neon-cyan);
}

.card-status {
  padding: 5px;
}

/* Stats Panel */
.stats-panel {
  display: flex;
  justify-content: space-between;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid #333;
  margin: 30px 0;
}

.stat {
  text-align: center;
  flex: 1;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.stat-value {
  font-size: 1.1rem;
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan);
}

.stat-bar {
  height: 6px;
  background: #222;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
  box-shadow: 0 0 10px var(--neon-cyan);
  animation: bar-pulse 2s infinite;
}

@keyframes bar-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Info Panel */
.info-panel {
  background: var(--bg-card);
  border: 1px solid #333;
  padding: 15px 20px;
  margin: 15px 0 30px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #222;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 2px;
}

.info-value {
  color: var(--neon-cyan);
  font-size: 0.85rem;
  font-family: 'Courier New', monospace;
}

/* Back Link */
.back-link {
  color: var(--neon-cyan);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 2px;
  transition: all 0.3s ease;
}

.back-link:hover {
  text-shadow: 0 0 10px var(--neon-cyan);
}

/* Panel Sections */
.panel-section {
  margin: 30px 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.section-title {
  color: var(--neon-magenta);
  font-size: 1.2rem;
  letter-spacing: 4px;
  text-shadow: 0 0 10px var(--neon-magenta);
  white-space: nowrap;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--neon-magenta), transparent);
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.gallery-item {
  background: var(--bg-card);
  border: 1px solid #333;
  overflow: hidden;
  transition: all 0.3s ease;
}

.gallery-item:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  filter: saturate(0.8);
  transition: filter 0.3s ease;
}

.gallery-item:hover img {
  filter: saturate(1);
}

.empty-state {
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
  padding: 40px;
  grid-column: 1 / -1;
}

/* Certification Cards */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid #333;
  padding: 20px;
  display: flex;
  gap: 15px;
  align-items: flex-start;
  transition: all 0.3s ease;
}

.cert-card:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.15);
}

.cert-badge {
  background: #1a1a2e;
  border: 1px solid #333;
  padding: 10px;
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 1px;
  text-align: center;
  min-width: 50px;
  flex-shrink: 0;
}

.cert-card.microsoft .cert-badge {
  color: #00a4ef;
  border-color: #00a4ef;
}

.cert-card.vmware .cert-badge {
  color: #6db33f;
  border-color: #6db33f;
}

.cert-card.access-ctrl .cert-badge {
  color: var(--neon-magenta);
  border-color: var(--neon-magenta);
}

.cert-info h3 {
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.cert-info p {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.cert-date {
  font-size: 0.7rem;
  color: var(--neon-cyan);
  display: block;
}

.cert-expires {
  font-size: 0.65rem;
  color: var(--neon-yellow);
  display: block;
  margin-top: 4px;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px 0;
  margin-top: 30px;
}

.footer-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
  margin-bottom: 20px;
}

footer p {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 2px;
}

/* Responsive - Tablet */
@media (max-width: 768px) {
  .container {
    padding: 15px;
    max-width: 100%;
  }

  /* Tables responsive */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Code blocks responsive */
  pre, .code-block {
    max-width: 100%;
    overflow-x: auto;
    font-size: 10px;
  }

  /* SVG schematics hide on tablet */
  .schematic-svg {
    display: none;
  }

  /* Project links wrap */
  .project-links {
    flex-wrap: wrap;
  }

  .project-link {
    flex: 1;
    min-width: 80px;
    justify-content: center;
    text-align: center;
  }

  /* Pinout grids */
  .pinout-grid, .specs-grid, .feature-grid, .component-list {
    grid-template-columns: 1fr;
  }

  /* Wiring tables */
  .wiring-table {
    font-size: 0.7rem;
  }

  .wiring-table th, .wiring-table td {
    padding: 6px 8px;
  }
}

/* Responsive - Mobile */
@media (max-width: 600px) {
  .container {
    padding: 10px;
  }

  .logo {
    font-size: 1.6rem;
    letter-spacing: 2px;
  }

  .logo-bracket {
    font-size: 1.8rem;
  }

  header {
    padding: 20px 0 15px;
  }

  .status-bar {
    flex-direction: column;
    gap: 10px;
  }

  .stats-panel {
    flex-direction: column;
    gap: 20px;
  }

  .nav-card {
    padding: 12px;
  }

  .card-icon {
    width: 30px;
    height: 30px;
  }

  .card-content h3 {
    font-size: 0.85rem;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery-item img {
    height: 180px;
  }

  .cert-grid {
    grid-template-columns: 1fr;
  }

  .cert-card {
    padding: 15px;
  }

  /* Page titles */
  .page-title h1 {
    font-size: 1.2rem;
    letter-spacing: 2px;
  }

  .subtitle {
    font-size: 0.7rem;
  }

  /* Code sections */
  .code-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .code-header h2 {
    font-size: 0.75rem;
  }

  .code-block {
    padding: 10px;
    font-size: 9px;
    max-height: 400px;
  }

  /* Notes section */
  .notes {
    padding: 15px;
  }

  .notes h3 {
    font-size: 0.85rem;
  }

  .notes li {
    font-size: 0.8rem;
  }

  /* Component cards */
  .component {
    padding: 15px;
    max-width: 100%;
  }

  .component img {
    width: 150px;
    height: 150px;
  }

  /* Feature boxes */
  .feature-box, .components-box {
    padding: 15px;
  }

  .feature-item, .component-item {
    padding: 8px;
  }

  /* Project cards */
  .project-card {
    margin-bottom: 10px;
  }

  .project-header {
    padding: 10px 15px;
    gap: 10px;
  }

  .project-header .tab-icon {
    width: 35px;
    height: 35px;
  }

  .project-header .tab-content h3 {
    font-size: 0.85rem;
  }

  .project-header .tab-content p {
    font-size: 0.65rem;
  }

  .project-links {
    padding: 0 15px 10px 15px;
    gap: 5px;
  }

  .project-link {
    padding: 6px 10px;
    font-size: 0.65rem;
  }

  .project-link svg {
    width: 12px;
    height: 12px;
  }

  /* Variant badge */
  .variant-badge {
    display: block;
    margin: 10px auto 0;
  }

  /* Pinout tables */
  .pinout-section, .specs-section {
    padding: 15px;
  }

  .pinout-section h2, .specs-section h2 {
    font-size: 1rem;
  }

  .pinout-group {
    padding: 10px;
  }

  .pinout-group h3 {
    font-size: 0.75rem;
  }

  .pinout-table td {
    font-size: 0.7rem;
    padding: 3px 5px;
  }

  .spec-item {
    padding: 8px 10px;
    font-size: 0.75rem;
  }
}

/* Responsive - Very small screens */
@media (max-width: 400px) {
  .logo {
    font-size: 1.3rem;
    letter-spacing: 1px;
  }

  .logo-bracket {
    font-size: 1.5rem;
    display: none;
  }

  .page-title h1 {
    font-size: 1rem;
  }

  .project-link {
    padding: 5px 8px;
    font-size: 0.6rem;
  }

  .code-block {
    font-size: 8px;
  }
}
