/* ================================ Ayush's Time Capsule Portfolio CSS ================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Orbitron", sans-serif;
  background-color: #000;
  color: #fff;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

body.light-mode {
  background-color: #f4f4f4;
  color: #111;
}

/* ========== Landing Section ========== */
.landing {
  height: 100vh;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  overflow: hidden;
}

#starsCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.intro {
  z-index: 1;
  text-align: center;
}

.intro h1 {
  font-size: 2.5rem;
  color: #0ff;
}

.intro h2.glitch {
  font-size: clamp(2rem, 6vw, 3.5rem);
  position: relative;
  color: #fff;
  text-shadow: 0 0 5px #0ff, 0 0 10px #0ff;
}

.intro h2.glitch::before,
.intro h2.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  width: 100%;
  overflow: hidden;
  color: #0ff;
  z-index: -1;
}

.intro h2.glitch::before {
  top: -2px;
  text-shadow: -2px 0 red;
}

.intro h2.glitch::after {
  top: 2px;
  text-shadow: 2px 0 blue;
}

#enterBtn {
  margin-top: 20px;
  padding: 12px 24px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #0ff;
  color: #0ff;
  backdrop-filter: blur(8px);
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s ease;
}

#enterBtn:hover {
  background: #0ff;
  color: #000;
}

/* ========== Compass Nav ========== */
.compass-nav {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 99;
}

.compass-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.compass-nav li {
  background: rgba(0, 255, 255, 0.1);
  padding: 10px 14px;
  border-radius: 50px;
  border: 1px solid #0ff;
  cursor: pointer;
  color: #0ff;
  font-size: 0.9rem;
  transition: 0.3s ease;
}

.compass-nav li:hover {
  background: #0ff;
  color: #000;
}

/* ========== Section Defaults ========== */
.section {
  min-height: 100vh;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.section h2 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: #0ff;
  text-shadow: 0 0 10px #0ff;
}

/* ========== Past Section ========== */
.past {
  background: url("assets/images/parchment.jpg") center/cover no-repeat;
  color: #222;
  font-family: "Courier New", Courier, monospace;
  position: relative;
  padding: 30px;
  width: 90%;
  max-width: 1000px;
  margin: auto;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
  min-height: 400px;
  max-height: 500px;
  overflow-y: auto;
}

.typewriter-text {
  width: 100%;
  font-size: 1.2rem;
  line-height: 1.6;
  white-space: normal;
  overflow-wrap: break-word;
  padding: 10px 5px;
  border-left: 2px solid #444;
  animation: typing 4s steps(40, end), blink 0.5s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  50% { border-color: transparent; }
}

.past::-webkit-scrollbar {
  width: 8px;
}

.past::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.past::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.past::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ========== Present Section ========== */
.present {
  background: radial-gradient(circle at center, #0ff2, #000);
  perspective: 1000px;
}

.cube-container {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
  width: 90%;
}

.skill-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #0ff4;
  border-radius: 15px;
  padding: 20px;
  width: 240px;
  height: 160px;
  backdrop-filter: blur(12px);
  transition: transform 0.5s, box-shadow 0.5s;
  transform-style: preserve-3d;
  color: #fff;
  text-align: center;
  font-size: 1rem;
  box-shadow: 0 0 10px #0ff5;
}

.skill-card:hover {
  transform: rotateY(15deg) scale(1.05);
  box-shadow: 0 0 20px #0ff;
}

/* ========== Future Section ========== */
.future {
  background: linear-gradient(to bottom, #000, #010c1d);
  position: relative;
  overflow: hidden;
}

.planet-orbit {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
}

.planet {
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, #0ff, #007bff);
  border-radius: 50%;
  animation: orbit 6s linear infinite;
  box-shadow: 0 0 20px #0ff9;
  transition: 0.4s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #000;
}

.planet:hover {
  transform: scale(1.2);
}

@keyframes orbit {
  0% {
    transform: rotate(0deg) translateX(20px) rotate(0deg);
  }
  100% {
    transform: rotate(360deg) translateX(20px) rotate(-360deg);
  }
}

/* ========== Capsule Section ========== */
.capsule {
  background: #111;
  text-align: center;
}

#unlockCapsule {
  background: transparent;
  border: 1px solid #0ff;
  color: #0ff;
  padding: 10px 20px;
  border-radius: 10px;
  transition: 0.3s;
  margin-bottom: 20px;
}

#unlockCapsule:hover {
  background: #0ff;
  color: #000;
}

.capsule-content {
  max-width: 800px;
  margin: 0 auto;
  background: rgba(0, 255, 255, 0.05);
  padding: 20px;
  border: 1px solid #0ff5;
  border-radius: 12px;
  display: none;
}

.capsule-content.hidden {
  display: none;
}

.capsule-content.visible {
  display: block;
  animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========== Contact Section ========== */
.contact {
  background: #0a0a0a;
}

#contactForm {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 90%;
  max-width: 500px;
}

#contactForm input,
#contactForm textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #0ff4;
  color: #fff;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 1rem;
  resize: none;
  outline: none;
  transition: border 0.3s;
}

#contactForm input:focus,
#contactForm textarea:focus {
  border: 1px solid #0ff;
}

#contactForm button {
  background: #0ff;
  color: #000;
  padding: 12px;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s ease;
}

#contactForm button:hover {
  background: #fff;
  color: #000;
}

/* ========== Responsive Enhancements ========== */
@media (max-width: 768px) {
  .intro h1 {
    font-size: 1.8rem;
  }

  .compass-nav {
    bottom: 20px;
    left: 20px;
  }

  .compass-nav li {
    font-size: 0.8rem;
    padding: 8px 12px;
  }

  .section h2 {
    font-size: 2rem;
  }

  .skill-card {
    width: 100%;
    max-width: 280px;
    height: auto;
  }

  .capsule-content {
    padding: 15px;
  }

  #contactForm {
    width: 100%;
  }

  .past {
    max-height: 400px;
    padding: 20px;
  }

  .typewriter-text {
    font-size: 1rem;
  }
}

@media (min-width: 769px) {
  .past {
    max-height: 500px;
    padding: 30px;
  }
}

/* ========== Utility Classes ========== */
.shake {
  animation: shake 0.3s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}
/* ========== footer ========== */

.footer {
  background: #000;
  color: #0ff;
  padding: 40px 0 20px;
  text-align: center;
  border-top: 1px solid #0ff4;
  margin-top: 60px;
}

.footer p {
  margin: 10px 0;
  font-size: 1rem;
}

.social-icons {
  margin: 20px 0;
  display: flex;
  justify-content: center;
  gap: 30px;
}

.social-icons a {
  color: #0ff;
  font-size: 1.6rem;
  transition: transform 0.3s ease, color 0.3s ease;
}

.social-icons a:hover {
  color: #fff;
  transform: scale(1.2) rotate(5deg);
}

.footer-credit {
  font-size: 0.85rem;
  opacity: 0.7;
}