:root {
  --bg: #ffffff;
  --text: #121212;
  --box: #f2f2f2;
  --accent: #66faff;
}

body.dark-mode {
  --bg: #121212;
  --text: #f0f0f0;
  --box: #1a1a1a;
  --accent: #ff4444;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Loader */
.loader {
  border: 16px solid #f3f3f3;
  border-top: 16px solid var(--accent);
  border-radius: 50%;
  width: 120px;
  height: 120px;
  animation: spin 2s linear infinite;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

body.loading {
  overflow: hidden;
}
body.loading * {
  visibility: hidden;
}
body.loading .loader {
  visibility: visible;
}

canvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

#hero {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

#three-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

/* Toggle switch */
.switch {
  z-index: 5;
  position: absolute;
  top: 20px;
  right: 20px;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch.top-right {
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 0.4s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent);
}
input:checked + .slider:before {
  transform: translateX(26px);
}

/* Quick nav */
#quick-links {
  display: flex;
  gap: 1em;
  margin-top: 200px;
  z-index: 2;
  position: relative;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}

#quick-links button {
  background: var(--text);
  color: var(--bg);
  border: none;
  padding: 0.7em 1.2em;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}
#quick-links button:hover {
  background: var(--accent);
  color: var(--bg);
}

#swipe-prompt {
  z-index: 2;
  color: var(--text);
  font-weight: bold;
  font-size: 1.2em;
  animation: bounce 2s infinite;
  margin-top: 25px;
  text-align: justify;
}

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

/* Main sections */
main {
  padding: 3em 1.5em;
  max-width: 900px;
  margin: auto;
  margin-top: 60px;
}

section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  margin-bottom: 3em;
  background: var(--box);
  padding: 2em;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Back to top */
#back-to-top {
  display: none;
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 0.5em 1em;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  z-index: 20;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
#back-to-top:hover {
  background: var(--accent);
}

/* Avatar image */
.avatar {
  width: 130px;
  border-radius: 50%;
  margin: 1em 0;
}

/* Tools – password + weather */
#tools input[type="text"],
#tools input[type="password"] {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border-radius: 5px;
  border: 1px solid var(--accent);
  background: var(--bg);
  color: var(--text);
}

#tools button {
  margin-top: 10px;
  padding: 10px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#tools button:hover {
  background: var(--text);
  color: var(--bg);
}

#weather-result {
  margin-top: 10px;
  font-weight: bold;
}

#strength-bar {
  margin-top: 5px;
  height: 10px;
  width: 0;
  background: red;
  transition: width 0.4s, background 0.4s;
  border-radius: 5px;
}










.cyber-box {
  background-color: var(--box);
  padding: 1.5em;
  border-radius: 10px;
  margin-bottom: 2em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.cyber-box textarea,
.cyber-box input {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border-radius: 5px;
  border: none;
  background-color: var(--bg);
  color: var(--text);
}
.cyber-box button {
  margin-top: 10px;
  background-color: var(--bg);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
}
.cyber-box button:hover {
  background-color: var(--accent);
}
.cyber-box code {
  display: block;
  margin-top: 10px;
  padding: 10px;
  background-color: var(--bg);
  color: #d5d1c5;
  font-family: 'Courier New', Courier, monospace;
  border-radius: 5px;
  white-space: pre-line;
}

/* Timeline Styles */
.timeline-container {
  margin-top: 2em;
  padding: 2em 1em;
  position: relative;
}
.timeline {
  position: relative;
  height: 6px;
  background: var(--accent);
  margin: 2em auto;
  width: 90%;
  border-radius: 3px;
}
.timeline-item {
  position: absolute;
  top: -60px;
  transform: translateX(-50%);
  width: 200px;
  background: var(--box);
  color: var(--text);
  padding: 1em;
  border-radius: 10px;
  font-size: 0.9em;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  text-align: center;
}