/* Accessible + Light/Dark Theme Toggle Support */
@import url('https://fonts.googleapis.com/css2?family=VT323&family=Orbitron:wght@700&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: 'VT323', monospace;
  background-color: #0a0a0a;
  color: #ffffff;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
}

body.light-mode {
  background-color: #ffffff;
}

body.light-mode header,
body.light-mode footer {
  background: rgba(255, 255, 255, 0.8);
}

header, footer {
  background: rgba(0, 0, 0, 0.8);
  color: inherit;
}

header {
  padding: 10px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  flex-wrap: wrap;
}

.logo {
  width: 40px;
  margin-right: 10px;
}

.logo-container h1,
.logo-link h1 {
  font-family: 'Orbitron', sans-serif !important;
  font-weight: 700;
  color: #00d4ff;
  font-size: 1.5em;
  text-shadow: 0 0 5px #00ffcc, 0 0 10px #00ffcc;
  margin: 0;
}

body.light-mode .logo-container h1,
body.light-mode .logo-link h1 {
  text-shadow: none;
  color: #0077cc;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: inherit;
  font-family: 'VT323', monospace;
  font-size: 1em;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #00d4ff;
}

.cta-button {
  display: inline-block;
  padding: 12px 20px;
  background: #00d4ff;
  color: #121212;
  text-decoration: none;
  border-radius: 30px;
  font-weight: bold;
  font-size: 1em;
  transition: background 0.3s ease, transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.cta-button:hover {
  background: #007bff;
  transform: scale(1.05);
  box-shadow: 0 0 15px #007bff, 0 0 25px #00d4ff;
  color: #ffffff;
}

button#theme-toggle {
  margin-left: 15px;
  padding: 10px 15px;
  border-radius: 6px;
  border: none;
  font-size: 1em;
  background: #eee;
  color: #000;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
  font-family: 'VT323', monospace;
}

body.light-mode button#theme-toggle {
  background: #222;
  color: #fff;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-family: 'VT323', monospace;
  font-size: 0.9em;
  background: rgba(0, 0, 0, 0.8);
  z-index: 999;
}

footer a {
  color: #00d4ff;
  text-decoration: none;
  transition: color 0.3s;
  margin-left: 4px;
}

footer a:hover {
  color: #007bff;
}

/* Headings center alignment */
h1, h2, h3, h4, h5, h6 {
  text-align: center;
  width: 100%;
}

/* Skip Link Accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: -1;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
}

.skip-link:focus {
  position: absolute;
  left: 10px;
  top: 10px;
  width: auto;
  height: auto;
  z-index: 10000;
}

/* Responsive */
@media (max-width: 768px) {
  .logo {
    width: 30px;
  }
  .logo-container h1,
  .logo-link h1 {
    font-size: 1.2em;
  }
  .nav-links {
    justify-content: center;
  }
  h1 {
    font-size: 1.6em;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.4em;
  }
  .cta-button {
    padding: 10px 15px;
    font-size: 0.9em;
  }
  button#theme-toggle {
    margin-top: 10px;
    font-size: 0.9em;
  }
}

/* Matrix Effect */
.matrix-effect {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.matrix-column {
  position: absolute;
  width: 20px;
  color: #00ff00;
  font-family: 'Courier New', Courier, monospace;
  animation: scrollMatrix 10s linear infinite;
  line-height: 1.2;
  font-size: 14px;
}

@keyframes scrollMatrix {
  0% { top: -107%; }
  50% { top: 0; }
  100% { top: 107%; }
}

/* LIGHT MODE OVERRIDES */
body.light-mode {
  background-color: #ffffff;
  color: #000000;
}

body.light-mode header,
body.light-mode footer {
  background: rgba(255, 255, 255, 0.8);
  color: #000000;
}

body.light-mode .logo-container h1,
body.light-mode .glow-heading {
  color: #000000;
  text-shadow: none;
}

body.light-mode .nav-links li a {
  color: #000000;
}

body.light-mode footer a {
  color: #0077cc;
  text-decoration: underline;
}

body.light-mode * {
  text-shadow: none !important;
  box-shadow: none !important;
}


/* Ensure theme toggle JS class targets work */
body:not(.light-mode) {
  background-color: #0a0a0a;
  color: #ffffff;
}
