/* Matrix-grunge palette */
:root {
  --bg: #000000;
  --text: #00ff66;      /* toxic green */
  --muted: #004422;     /* dark moss */
  --accent: #33ff33;    /* phosphor green */
  --error: purple;     
}

body.matrix-bg {
  background: var(--bg);
  color: var(--text);
  font-family: "Courier New", monospace;
  text-shadow: 0 0 6px var(--accent);
  margin: 0;
  padding: 0;
}

/* ASCII art blocks */
.ascii-art {
  background: #0a0a0a;
  box-shadow: 0 0 12px var(--muted);
  color: var(--accent);
  font-family: monospace;
  text-align: center;
  white-space: pre;
  max-width: 800px;
  margin: 20px auto;   /* <-- auto centers horizontally */
  text-shadow: 0 0 8px var(--accent);
}
/* Glitch title */
.glitch {
  font-size: 2.5rem;
  text-align: center;
  color: var(--accent);
  position: relative;
}
.glitch::before,
.glitch::after {
  content: "INFECTED MACHINE";
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--error);
  clip: rect(0, 900px, 0, 0);
  animation: glitch 2s infinite linear alternate-reverse;
}
.glitch::after {
  color: var(--muted);
  animation-duration: 3s;
}

@keyframes glitch {
  0% { clip: rect(0, 9999px, 0, 0); }
  20% { clip: rect(10px, 9999px, 40px, 0); transform: translate(-2px, -2px); }
  40% { clip: rect(30px, 9999px, 60px, 0); transform: translate(2px, 2px); }
  60% { clip: rect(5px, 9999px, 20px, 0); transform: translate(-1px, 1px); }
  80% { clip: rect(40px, 9999px, 80px, 0); transform: translate(1px, -1px); }
  100% { clip: rect(0, 9999px, 0, 0); }
}

/* Panels */
.panel {
  background: #0a0a0a;
  border: 1px solid var(--muted);
  padding: 20px;
  margin: 20px auto;
  max-width: 800px;
  box-shadow: 0 0 12px var(--muted);
}
.panel h2 {
  color: var(--accent);
  text-shadow: 0 0 6px var(--accent);
}

.subtitles {
  background: black;
}

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--error);
  text-shadow: 0 0 6px var(--error);
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  border-top: 1px solid var(--muted);
  margin-top: 40px;
}

/* Bio section */
.bio {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.bio-text {
  flex: 1;
  color: var(--text);
}

/* Quicklinks box */
.quicklinks {
  position: fixed;
  right: 20px;
  top: 200px;
  background: #0a0a0a;
  border: 1px solid var(--muted);
  padding: 10px;
  box-shadow: 0 0 12px var(--muted);
}
.quicklinks h3 {
  margin: 0 0 10px;
  color: var(--accent);
}
.quicklinks ul {
  list-style: none;
  padding: 0;
}
.quicklinks li {
  margin: 6px 0;
}
.quicklinks a {
  color: var(--accent);
  text-decoration: none;
}
.quicklinks a:hover {
  color: var(--error);
}

/* Quote showcase */
.quotes blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 12px;
  margin: 12px 0;
  color: var(--accent);
  font-style: italic;
}

/* Tabs navigation */
.tabs ul {
  display: flex;
  gap: 20px;
  list-style: none;
  padding: 0;
  justify-content: center;
}
.tabs button {
  background: #0a0a0a;
  border: 1px solid var(--muted);
  color: var(--accent);
  padding: 8px 12px;
  cursor: pointer;
}
.tabs button:hover {
  background: var(--muted);
  color: var(--error);
}

/* Base nav styling */
.tabs {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid #0f0;
  font-family: monospace;
  position: relative;
    max-width: 800px;
  margin: 20px auto;   /* <-- auto centers horizontally */
}

.tabs .menu {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tabs .menu li {
  position: relative;
}

.tabs a, .tabs button {
  display: block;
  padding: 10px 15px;
  color: #0f0;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
}

.tabs a:hover, .tabs button:hover {
  background: #0a0a0a;
}

/* Base dropdown container */
.dropdown {
  position: relative;
}

.dropdown-content {
  position: absolute;
  top: 100%; /* sits below the button */
  left: 0;
  min-width: 180px;
  background: rgba(0,0,0,0.9);
  border: 1px solid #0f0;
  list-style: none;
  padding: 8px 0;
  margin: 0;

  /* hidden state */
  visibility: hidden;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
  z-index: 999;
}

/* visible state */
.dropdown-content.show {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0s;
  animation: glitchFade 0.35s ease;
}

/* dropdown items */
.dropdown-content li a {
  display: block;
  padding: 8px 12px;
  color: #0f0;
  text-decoration: none;
}

.dropdown-content li a:hover {
  background: rgba(0,255,0,0.2);
}

/* glitch flicker animation */
@keyframes glitchFade {
  0%   { opacity: 0; transform: translateY(-5px) skew(0deg); }
  20%  { opacity: 1; transform: translateY(0) skew(2deg); }
  40%  { opacity: 0.8; transform: translateY(0) skew(-2deg); }
  60%  { opacity: 1; transform: translateY(0) skew(1deg); }
  80%  { opacity: 0.9; transform: translateY(0) skew(-1deg); }
  100% { opacity: 1; transform: translateY(0) skew(0deg); }
}


@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  .tabs .menu {
    display: none;
    flex-direction: column;
  }
  .tabs .menu.active {
    display: flex;
  }
  .tabs .menu li {
    width: 100%;
  }
}

/* Matrix rain canvas overlay */
#matrix {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1; /* behind content */
  background: black;
}

@keyframes glitchFade {
  0% { opacity: 0; transform: skew(0deg); }
  20% { opacity: 1; transform: skew(2deg); }
  40% { opacity: 0.7; transform: skew(-2deg); }
  60% { opacity: 1; transform: skew(1deg); }
  80% { opacity: 0.8; transform: skew(-1deg); }
  100% { opacity: 1; transform: skew(0deg); }
}



