/*
 * Styles for the space‑themed single page. The dark palette, glowing
 * highlights and crisp typography combine to deliver a futuristic
 * experience. The layout adapts for mobile and desktop with flexbox.
 */

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: #f5f5f5;
  background-color: #0a0a23;
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* Typewriter effect for the hero tagline */
.typewriter {
  color: #ddddff;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  /* For centering and wrapping */
  display: inline-block;
  text-align: center;
  max-width: 600px;
  white-space: normal; /* Allow text to wrap */
  position: relative; /* For pseudo-element positioning */
}

/* The cursor is now a pseudo-element, so it flows with the text */
.typewriter::after {
  content: '';
  display: inline-block;
  width: 0.1em;
  height: 1.1em; /* Should be about the height of the text */
  background: #f6511d;
  margin-left: 0.15em;
  vertical-align: -0.1em; /* Align with the text */
  animation: blink-caret 0.8s step-end infinite;
}

@keyframes blink-caret {
  from, to {
    background-color: transparent;
  }
  50% {
    background-color: #f6511d;
  }
}

/* Hide the cursor when typing is finished */
.typewriter.typing-done::after {
  content: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* Navigation bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(10, 10, 35, 0.7);
  backdrop-filter: blur(6px);
}

.navbar ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1rem;
  flex-wrap: wrap;
}

.navbar a {
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  color: #ffffff;
  transition: color 0.3s ease;
  font-size: 0.9rem;
}

.navbar a:hover {
  color: #f6511d;
}

@media (max-width: 768px) {
  .navbar ul {
    gap: 1rem;
    padding: 0.5rem;
  }
  
  .navbar a {
    font-size: 0.8rem;
  }
}

/* Hero section */
.hero {
  position: relative;
  height: 100vh;
  background-image: url('space_bg1.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  /* Add padding to account for fixed navbar */
  padding-top: 5rem;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 1rem;
  text-align: center;
  /* Fade in the hero content with a slight upward motion */
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 2s ease-out forwards;
}

/* Circular profile photo in the hero */
.hero .profile-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #f6511d;
  box-shadow: 0 0 20px rgba(246, 81, 29, 0.4);
  margin: 0 auto 1rem;
  position: relative;
  will-change: transform;
  transition: transform 180ms ease;
}

.hero .profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Mouse-follow radial glow */
.hero .profile-photo::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background:
    radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(246,81,29,0.35), transparent 60%),
    radial-gradient(200px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.08), transparent 60%);
  pointer-events: none;
  filter: blur(6px);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #ffffff;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .typewriter {
    font-size: 1rem;
    max-width: 95%;
    line-height: 1.4;
  }
}

.hero p {
  font-size: 1.25rem;
  color: #ddddff;
  max-width: 600px;
  margin: 0 auto;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

/* Section styles */
section {
  padding: 4rem 2rem;
}

section h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-align: center;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

section p {
  font-size: 1.1rem;
  color: #ccccdd;
}

@media (max-width: 768px) {
  section {
    padding: 2rem 1rem;
  }
  
  section h2 {
    font-size: 1.8rem;
  }
  
  section p {
    font-size: 1rem;
  }
}

/* About section */
.about p {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

/* Features section */
.features {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2rem;
}

@media (min-width: 768px) {
  .features {
    flex-direction: row;
    justify-content: space-around;
    max-width: 1200px;
    margin: 0 auto;
  }
}

.feature {
  background: #17173a;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
  flex: 1;
}

.feature h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.feature p {
  color: #bbbbcc;
  font-size: 1rem;
}

/* Call to action section */
.cta {
  position: relative;
  background-image: url('space_bg2.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #ffffff;
  text-align: center;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
}

.cta h2,
.cta p,
.cta .cta-button {
  position: relative;
  z-index: 1;
}

.cta p {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: #ddddee;
}

.cta-button {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.8rem 2rem;
  font-size: 1rem;
  border: none;
  border-radius: 50px;
  background-color: #f6511d;
  color: #ffffff;
  font-weight: 600;
  text-transform: uppercase;
  transition: background 0.3s ease;
  box-shadow: 0 0 10px rgba(246, 81, 29, 0.5);
}

.cta-button:hover {
  background-color: #d94014;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  background-color: #090920;
  color: #666680;
  font-size: 0.9rem;
}

/* Summary, education, experience, projects, honors and contact cards */
.summary p,
.education-entry,
.experience-item,
.project-item,
.honors ul,
.contact p {
  background: #17173a;
  padding: 1.5rem 2rem;
  margin: 1rem auto;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
  max-width: 900px;
}

/* Specific styling for lists */
.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .skills-grid {
    flex-direction: row;
  }
}

.skill-category {
  flex: 1;
  background: #17173a;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

.skill-category h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.skill-category ul {
  list-style: none;
  padding: 0;
}

.skill-category li {
  margin-bottom: 0.3rem;
  color: #bbbbcc;
}

.skill-category li::before {
  content: '•';
  color: #f6511d;
  margin-right: 0.4rem;
}

.experience-item h3,
.project-item h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.experience-item h4 {
  font-size: 1rem;
  font-weight: 400;
  color: #a0a0c0;
  margin-bottom: 0.5rem;
}

.experience-item p,
.project-item p {
  color: #bbbbcc;
  font-size: 1rem;
  line-height: 1.5;
}

.projects .project-item {
  margin-bottom: 2rem;
}

.honors ul {
  list-style: none;
  max-width: 900px;
  margin: 1rem auto;
}

.honors li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: #bbbbcc;
}

.honors li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  top: 0;
  color: #f6511d;
}

.contact p {
  color: #ccccdd;
}

.contact a.cta-button {
  margin-top: 1rem;
}

/* Timeline styles for the experience section */
.experience .timeline {
  position: relative;
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem 0;
}

.experience .timeline::after {
  content: '';
  position: absolute;
  width: 4px;
  background-color: #f6511d;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
}

.experience .timeline-item {
  position: relative;
  width: 50%;
  padding: 1rem 2rem;
  min-height: 100px;
}

.experience .timeline-item.left {
  left: 0;
}

.experience .timeline-item.right {
  left: 50%;
}

.experience .timeline-item::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 20px;
  right: -10px;
  background-color: #f6511d;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(246, 81, 29, 0.5);
  z-index: 1;
}

.experience .timeline-item.right::after {
  left: -10px;
  right: auto;
}

.experience .timeline-content {
  background-color: #17173a;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
  color: #bbbbcc;
}

.experience .timeline-content h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
  color: #ffffff;
}

.experience .timeline-content h4 {
  font-size: 1rem;
  font-weight: 400;
  color: #a0a0c0;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.experience .timeline-content ul {
  list-style: none;
  padding-left: 1rem;
}

.experience .timeline-content li {
  margin-bottom: 0.5rem;
  position: relative;
}

.experience .timeline-content li::before {
  content: '•';
  position: absolute;
  left: -1rem;
  color: #f6511d;
}

/* Responsive timeline: full width entries on small screens */
@media (max-width: 768px) {
  .experience .timeline::after {
    left: 20px;
  }

  .experience .timeline-item {
    width: 100%;
    padding-left: 3rem;
    padding-right: 1rem;
    margin-bottom: 2rem;
  }

  .experience .timeline-item::after {
    left: 10px;
    right: auto;
  }

  .experience .timeline-item.right {
    left: 0;
  }
}