/* =====================================================
   DESIGN TOKENS
   ===================================================== */
:root {
  --color-bg:             #080810;
  --color-surface:        #0f0f1a;
  --color-surface-raised: #161625;
  --color-surface-border: #1e1e30;

  --color-text:           #e4e4f0;
  --color-text-muted:     #7a7a9a;
  --color-text-dim:       #3e3e5a;

  --color-green:          #00ff88;
  --color-green-dim:      rgba(0, 255, 136, 0.12);
  --color-green-glow:     rgba(0, 255, 136, 0.35);

  --color-orange:         #ff6b35;
  --color-orange-dim:     rgba(255, 107, 53, 0.12);
  --color-orange-glow:    rgba(255, 107, 53, 0.35);

  --font-display: 'Orbitron', monospace;
  --font-mono:    'Share Tech Mono', monospace;
  --font-body:    'Inter', sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --max-width: 1100px;

  --duration-fast:   150ms;
  --duration-normal: 300ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    linear-gradient(rgba(0, 255, 136, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.025) 1px, transparent 1px),
    radial-gradient(ellipse at 15% 5%,  rgba(0, 255, 136, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 95%, rgba(255, 107, 53, 0.06) 0%, transparent 55%);
  background-size: 44px 44px, 44px 44px, 100% 100%, 100% 100%;
}

img  { display: block; max-width: 100%; }

a {
  color: var(--color-green);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}
a:hover { color: var(--color-orange); }

/* =====================================================
   SITE WRAPPER
   ===================================================== */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* =====================================================
   NAV
   ===================================================== */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 8, 16, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--color-surface-border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-green);
  text-shadow: 0 0 16px var(--color-green-glow);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-brand:hover { color: var(--color-green); }

.brand-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 0.4em 0.85em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition:
    color          var(--duration-fast) ease,
    border-color   var(--duration-fast) ease,
    background     var(--duration-fast) ease;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--color-text);
  border-color: var(--color-surface-border);
  background: var(--color-surface-raised);
}

.nav-link.active {
  color: var(--color-green);
  border-color: rgba(0, 255, 136, 0.3);
  background: var(--color-green-dim);
}

/* =====================================================
   HEADER
   ===================================================== */
.site-header {
  position: relative;
  text-align: center;
  padding: 5rem 1.5rem 3.5rem;
  overflow: hidden;
}

.header-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 700px 300px at 50% 0%, rgba(0, 255, 136, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

/* Subtle scanlines */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    transparent,
    transparent 3px,
    rgba(0, 255, 136, 0.018) 3px,
    rgba(0, 255, 136, 0.018) 6px
  );
  pointer-events: none;
}

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

.site-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw + 0.8rem, 3rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3em;
}

.title-highlight {
  color: var(--color-green);
  text-shadow:
    0 0 30px var(--color-green-glow),
    0 0 60px rgba(0, 255, 136, 0.15);
}

.site-subheading {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-orange);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-subheading::before {
  content: '// ';
  color: var(--color-text-dim);
}

/* =====================================================
   MAIN CONTENT
   ===================================================== */
.main-content {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
  width: 100%;
}

/* =====================================================
   WELCOME SECTION
   ===================================================== */
.welcome-section {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 4rem;
  padding-top: 1rem;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-orange);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.section-heading::before,
.section-heading::after {
  content: '';
  flex: 1;
  max-width: 72px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-orange));
}

.section-heading::after {
  background: linear-gradient(to left, transparent, var(--color-orange));
}

.welcome-text {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

/* =====================================================
   PANELS GRID
   ===================================================== */
.panels-section {
  padding-bottom: 1rem;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* =====================================================
   PANEL BASE
   ===================================================== */
.panel {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-surface-border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition:
    border-color  var(--duration-normal) var(--ease-out),
    transform     var(--duration-normal) var(--ease-out),
    box-shadow    var(--duration-normal) var(--ease-out);
}

/* Corner bracket decorations (appear on hover) */
.panel::before,
.panel::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  opacity: 0;
  transition: opacity var(--duration-normal) ease;
  pointer-events: none;
}

.panel::before {
  top: -1px; left: -1px;
  border-top:  2px solid;
  border-left: 2px solid;
  border-radius: 2px 0 0 0;
}

.panel::after {
  bottom: -1px; right: -1px;
  border-bottom: 2px solid;
  border-right:  2px solid;
  border-radius: 0 0 2px 0;
}

.panel:hover {
  transform: translateY(-3px);
}

.panel:hover::before,
.panel:hover::after {
  opacity: 1;
}

/* Green variant panels */
.panel--voki,
.panel--wordcloud {
  --panel-accent: var(--color-green);
  --panel-accent-dim: var(--color-green-dim);
  --panel-accent-glow: var(--color-green-glow);
}

.panel--voki:hover,
.panel--wordcloud:hover {
  border-color: rgba(0, 255, 136, 0.3);
  box-shadow: 0 8px 40px rgba(0, 255, 136, 0.07);
}

.panel--voki::before,
.panel--voki::after,
.panel--wordcloud::before,
.panel--wordcloud::after {
  border-color: var(--color-green);
}

/* Orange variant panel */
.panel--copyright {
  --panel-accent: var(--color-orange);
  --panel-accent-dim: var(--color-orange-dim);
  --panel-accent-glow: var(--color-orange-glow);
}

.panel--copyright:hover {
  border-color: rgba(255, 107, 53, 0.3);
  box-shadow: 0 8px 40px rgba(255, 107, 53, 0.07);
}

.panel--copyright::before,
.panel--copyright::after {
  border-color: var(--color-orange);
}

/* =====================================================
   PANEL INTERNALS
   ===================================================== */
.panel-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-icon {
  font-size: 0.9rem;
  line-height: 1;
  flex-shrink: 0;
}

.panel-icon--green  { color: var(--color-green); }
.panel-icon--orange { color: var(--color-orange); }

.panel-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel--voki .panel-title,
.panel--wordcloud .panel-title {
  color: var(--color-green);
}

.panel--copyright .panel-title {
  color: var(--color-orange);
}

/* Live Voki embed wrapper */
.voki-embed {
  background: var(--color-surface-raised);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  min-height: 200px;
}

.voki-embed iframe {
  display: block;
  border-radius: var(--radius-sm);
}

/* Word cloud trigger button */
.wordcloud-trigger {
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: zoom-in;
  position: relative;
  overflow: hidden;
}

.wordcloud-trigger:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 3px;
}

.wordcloud-img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 255, 136, 0.2);
  background: var(--color-surface-raised);
  display: block;
  transition:
    filter    var(--duration-normal) var(--ease-out),
    transform var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out);
}

.wordcloud-trigger:hover .wordcloud-img {
  filter: brightness(1.12) saturate(1.15);
  transform: scale(1.025);
  box-shadow: 0 0 24px rgba(0, 255, 136, 0.3);
}

.wordcloud-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem;
  background: linear-gradient(transparent, rgba(8, 8, 16, 0.85));
  color: var(--color-green);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.wordcloud-trigger:hover .wordcloud-hint {
  opacity: 1;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox[hidden] { display: none; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 16, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: zoom-out;
}

.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: min(900px, 100%);
  width: 100%;
  animation: lightbox-in var(--duration-normal) var(--ease-out) both;
}

@keyframes lightbox-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 255, 136, 0.3);
  box-shadow: 0 0 60px rgba(0, 255, 136, 0.12);
}

.lightbox-close {
  position: absolute;
  top: -1rem;
  right: -1rem;
  width: 2.2rem;
  height: 2.2rem;
  background: var(--color-surface-raised);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 50%;
  color: var(--color-green);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background  var(--duration-fast) ease,
    box-shadow  var(--duration-fast) ease;
  z-index: 2;
}

.lightbox-close:hover {
  background: var(--color-green-dim);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.25);
}

.lightbox-close:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 2px;
}

/* Embed / image placeholders */
.embed-placeholder,
.image-placeholder {
  background: var(--color-surface-raised);
  border-radius: var(--radius-md);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(0, 255, 136, 0.2);
}

.embed-placeholder-inner,
.image-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
}

.embed-icon,
.placeholder-icon {
  font-size: 2rem;
  color: rgba(0, 255, 136, 0.25);
  line-height: 1;
}

.embed-placeholder-inner p,
.image-placeholder-inner p {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-dim);
}

.embed-sub,
.placeholder-sub {
  font-size: 0.65rem;
  color: var(--color-text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

/* CC icons display */
.copyright-icons-display {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-surface-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.cc-icon {
  width: 52px;
  height: 52px;
  filter: invert(1) opacity(0.75);
  transition:
    filter    var(--duration-fast) ease,
    transform var(--duration-fast) ease;
}

.cc-icon:hover {
  filter: invert(1) opacity(1) sepia(1) saturate(3) hue-rotate(-15deg);
  transform: scale(1.15);
}

/* Panel text */
.panel-text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.75;
  flex: 1;
}

/* Panel buttons */
.panel-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6em 1em;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid;
  transition:
    background  var(--duration-fast) ease,
    box-shadow  var(--duration-fast) ease,
    color       var(--duration-fast) ease;
  text-decoration: none;
  width: 100%;
}

.panel-btn--green {
  color: var(--color-green);
  border-color: rgba(0, 255, 136, 0.3);
  background: var(--color-green-dim);
}

.panel-btn--green:hover {
  color: var(--color-green);
  background: rgba(0, 255, 136, 0.2);
  box-shadow: 0 0 18px rgba(0, 255, 136, 0.18);
}

.panel-btn--orange {
  color: var(--color-orange);
  border-color: rgba(255, 107, 53, 0.3);
  background: var(--color-orange-dim);
}

.panel-btn--orange:hover {
  color: var(--color-orange);
  background: rgba(255, 107, 53, 0.2);
  box-shadow: 0 0 18px rgba(255, 107, 53, 0.18);
}

.btn-arrow {
  transition: transform var(--duration-fast) ease;
}

.panel-btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-surface-border);
  padding: 1.25rem 1.5rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15em;
  justify-content: center;
  line-height: 1.8;
}

.footer-copy a {
  color: var(--color-text-muted);
  transition: color var(--duration-fast) ease;
}

.footer-copy a:hover {
  color: var(--color-green);
}

/* Make CC inline icons visible on dark bg */
.footer-copy img {
  filter: invert(1) opacity(0.5);
  vertical-align: middle;
  display: inline;
}

/* =====================================================
   PLACEHOLDER PAGES
   ===================================================== */
.placeholder-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  text-align: center;
}

.placeholder-page-inner {
  max-width: 480px;
}

.placeholder-page-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  margin-bottom: 1rem;
}

.placeholder-page-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.placeholder-page-title span {
  color: var(--color-green);
}

.placeholder-page-text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 820px) {
  .panel-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .nav-inner {
    height: auto;
    padding: 0.75rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .nav-links {
    gap: 0.2rem;
  }

  .nav-link {
    padding: 0.35em 0.65em;
  }

  .site-header {
    padding: 3rem 1rem 2.5rem;
  }

  .main-content {
    padding: 0 1rem 4rem;
  }
}
