:root {
  --bg-dark: #0e1a2b;
  --text-dark: #f5f5f5;
  --accent: #4caf50;
  --accent2: #00ffc8;
  --font: 'Fira Code', monospace;
}

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

body {
  font-family: var(--font);
  background-color: var(--bg-dark);
  color: var(--text-dark);
  text-align: center;
  padding: 2rem;
}

h1 {
  font-size: 2.8rem;
  background: linear-gradient(to right, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Typewriter */
.typewriter {
  font-size: 1.2rem;
  color: var(--accent2);
  margin-bottom: 2rem;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid;
  width: 0;
  animation: typing 3s steps(40, end) forwards, blink 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink {
  50% { border-color: transparent; }
}

/* Glowing Stat Boxes */
.glow-box {
  width: 700px;
  max-width: 90vw;
  margin: 2rem auto;
  background-color: var(--bg-dark);
  border: 2px solid rgba(0, 255, 200, 0.4);
  box-shadow: 0 0 18px rgba(0, 255, 200, 0.4);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeInZoom 0.8s ease-in-out;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.glow-box:hover {
  transform: scale(1.03);
  box-shadow: 0 0 30px rgba(0, 255, 200, 0.6);
}

.glow-box img {
  width: 100%;
  display: block;
}

@keyframes fadeInZoom {
  0% {
    transform: scale(0.95);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Section Header */
h2 {
  font-family: 'Nunito', sans-serif;
  font-size: 2rem;
  margin-top: 3rem;
  color: #ffd166;
}

/* Snake Animation Image */
.snake {
  width: 90%;
  max-width: 700px;
  border-radius: 10px;
  margin: 1.5rem auto;
  box-shadow: 0 0 15px var(--accent);
}

/* Footer */
footer {
  margin-top: 4rem;
  border-top: 1px solid #444;
  padding-top: 1rem;
  font-size: 1rem;
  color: var(--text-dark);
}

footer a {
  font-size: 1.5rem;
  color: var(--accent2);
  margin: 0 10px;
  text-decoration: none;
}

/* Floating Contact Button - shows while scrolling */
.floating-contact {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background-color: var(--accent2);
  color: #0e1a2b;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  z-index: 1000;
  display: none;
  transition: background-color 0.2s ease;
}

.floating-contact:hover {
  background-color: #00e6b0;
}

/* Footer Contact Button - shown at the end */
.footer-contact {
  text-align: center;
  margin-top: 1.5rem;
}

.footer-contact-btn {
  background-color: var(--accent2);
  color: #0e1a2b;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.2s ease;
}

.footer-contact-btn:hover {
  background-color: #00e6b0;
}

/* Theme toggle icon */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999;
}

.theme-toggle input {
  display: none;
}

.theme-toggle label {
  font-size: 1.6rem;
  color: var(--accent2);
  cursor: pointer;
  transition: transform 0.3s;
}

.theme-toggle label:hover {
  transform: scale(1.2);
}

/* Light Mode Support */
body.light-mode {
  background-color: #f2f2f2;
  color: #111;
}

body.light-mode h1,
body.light-mode h2,
body.light-mode .typewriter {
  color: #333;
  -webkit-text-fill-color: unset;
  background: none;
}

body.light-mode .glow-box {
  background: #fff;
  border: 2px solid #ccc;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

body.light-mode .footer-contact-btn,
body.light-mode .floating-contact {
  background-color: #111;
  color: #fff;
  box-shadow: none;
}

body.light-mode .footer-icons a {
  color: #000;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .typewriter {
    font-size: 1rem;
    white-space: normal;
    border-right: none;
    width: 100%;
    animation: none;
  }

  .glow-box {
    width: 95%;
    margin: 1rem auto;
    box-shadow: 0 0 12px rgba(0, 255, 200, 0.3);
  }

  footer a {
    font-size: 1.2rem;
    margin: 0 6px;
  }

  .footer-contact-btn,
  .floating-contact {
    font-size: 0.8rem;
    padding: 6px 10px;
  }

  .theme-toggle label {
    font-size: 1.4rem;
  }
}
