/* Root var and global styles */
:root {
  --primary: #e5e7eb; /* Primary action color - Silver/White */
  --secondary: #101828; /* A very dark, slightly blue cosmic background */
  --dark: #0b0f19; /* Deep space black for cards and backgrounds */
  --light: #f1f1f1; /* Pure white for text */
  --accent: #3c79f5; /* Accent color - Deep Blue */
  --gray: #9ca3af; /* A muted, moon-rock gray for secondary text */

  --primary-glow: rgba(229, 231, 235, 0.2);
  --accent-glow: rgba(60, 121, 245, 0.3);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Space Grotesk", sans-serif;

  --stars: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="20" cy="20" r="0.8" fill="white" opacity="0.8"/><circle cx="50" cy="30" r="1" fill="white" opacity="0.6"/><circle cx="80" cy="10" r="0.6" fill="white" opacity="0.9"/><circle cx="10" cy="70" r="0.9" fill="white" opacity="0.7"/><circle cx="90" cy="80" r="0.7" fill="white" opacity="0.5"/></svg>');
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--dark);
  color: var(--light);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -2;
}

body::before {
  background-image: var(--stars);
  background-size: 200px 200px;
  animation: starsMove 100s linear infinite;
}

body::after {
  background-image: var(--stars);
  background-size: 150px 150px;
  animation: starsMove 150s linear infinite reverse;
}

@keyframes starsMove {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 1000px 500px;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

main {
  padding-top: 80px;
}

section {
  padding: 120px 0;
  position: relative;
}

/* === HEADER === */
header {
  padding: 20px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease-in-out;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(10px);
}

header.sticky {
  padding: 15px 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--light);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 35px;
}

.nav-links a {
  color: var(--gray);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
  position: relative;
  padding-bottom: 5px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--light);
}

.nav-links a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
}

.hamburger .line {
  width: 100%;
  height: 2px;
  background-color: var(--light);
  transition: all 0.3s ease;
}

/* === HERO SECTION === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.hero-text {
  flex: 1;
  position: relative;
  z-index: 2;
  animation: float 6s ease-in-out infinite;
}

.hero-text h3 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 10px;
  font-weight: 500;
}

.hero-text h1 {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 7vw, 5rem);
  margin-bottom: 20px;
  line-height: 1.1;
  text-shadow: 0 0 15px var(--primary-glow);
  background: linear-gradient(90deg, var(--light), #c1c9ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-text p {
  font-size: 1.2rem;
  color: var(--gray);
  margin-bottom: 40px;
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 35px;
  background: var(--primary);
  color: var(--dark);
  border: 2px solid var(--primary);
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease-in-out;
  letter-spacing: 0.5px;
  position: relative;
}

.btn:hover {
  background: transparent;
  color: var(--light);
  border-color: var(--light);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.4);
}

.hero-image {
  flex-shrink: 0;
  position: relative;
  width: 380px;
  height: 380px;
  animation: float 6s ease-in-out infinite;
  animation-delay: 0.5s;
}

.image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 7px solid var(--dark);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
}

.tech-orbits {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
}

.orbit {
  position: absolute;
  border: 1px dashed rgba(229, 231, 235, 0.4);
  border-radius: 50%;
  animation: orbit linear infinite;
}

.orbit-1 {
  width: 130%;
  height: 130%;
  top: -15%;
  left: -15%;
  animation-duration: 20s;
}
.orbit-2 {
  width: 165%;
  height: 165%;
  top: -32.5%;
  left: -32.5%;
  animation-duration: 30s;
  animation-direction: reverse;
}
.orbit-3 {
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  animation-duration: 40s;
}

.tech-icon {
  position: absolute;
  width: 50px;
  height: 50px;
  background: var(--dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
  transition: all 0.3s;
}

.orbit-1 .tech-icon {
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
}
.orbit-2 .tech-icon {
  top: 80%;
  left: 10%;
}
.orbit-3 .tech-icon {
  top: 60%;
  left: 70%;
}

.tech-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px var(--primary-glow);
  color: var(--light);
}

@keyframes orbit {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.cursor {
  display: inline-block;
  width: 3px;
  background-color: var(--primary);
  margin-left: 2px;
  animation: blink 1s infinite;
}

.cursor.typing {
  animation: none;
}

@keyframes blink {
  0%,
  49% {
    background-color: var(--primary);
  }
  50%,
  99% {
    background-color: transparent;
  }
  100% {
    background-color: var(--primary);
  }
}

/* === SECTION TITLE STYLES === */
.section-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 35px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--light);
  text-shadow: 0 0 10px var(--primary-glow);
  position: relative;
  display: inline-block;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.section-title h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.section-title p {
  color: var(--gray);
  font-size: 1.1rem;
  text-align: center;
  max-width: 600px;
  padding: 0 16px;
}

/* Enlarge effect for ALL section headers */
.section-title h2:hover {
  letter-spacing: 10px;
  transform: scale(1.1) translateY(4px);
  color: var(--accent);
  white-space: nowrap;
}

/*(Achievements header special case) */
.section-header-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  margin-bottom: 15px;
}

.section-header-link {
  background: var(--secondary);
  border: 1px solid var(--primary);
  color: var(--primary) !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
}

.section-header-link i {
  margin-left: 8px;
}

.section-header-link:hover {
  background: var(--primary);
  color: var(--dark) !important;
  box-shadow: 0 5px 15px var(--primary-glow);
  transform: translateY(-3px);
}

/* === SKILLS SECTION === */
.skills {
  background-color: var(--dark);
  position: relative;
  overflow: hidden;
  padding-bottom: 80px;
}

.constellation-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 600px;
  position: relative;
  animation: float 12s ease-in-out infinite, drift 15s ease-in-out infinite;
}

.constellation {
  position: relative;
  width: 100%;
  height: 500px;
  margin: 0 auto 40px;
}

.skill-star {
  position: absolute;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.4s ease;
  z-index: 10;
  filter: drop-shadow(0 0 8px var(--primary-glow));
  animation: star-pulse 4s infinite ease-in-out;
}

.skill-star i,
.skill-star .skill-dot {
  pointer-events: none;
}

.skill-star:hover,
.skill-star.active {
  transform: scale(1.3);
  color: var(--accent);
  filter: drop-shadow(0 0 20px var(--accent-glow));
  animation-play-state: paused;
}

@keyframes star-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 8px var(--primary-glow));
  }
  50% {
    filter: drop-shadow(0 0 16px var(--primary-glow));
  }
}

.skill-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  opacity: 0;
  transition: all 0.4s ease;
}

/* Star positions */
.skill-star:nth-child(1) {
  top: 15%;
  left: 25%;
}
.skill-star:nth-child(2) {
  top: 35%;
  left: 75%;
}
.skill-star:nth-child(3) {
  top: 75%;
  left: 15%;
}
.skill-star:nth-child(4) {
  top: 10%;
  left: 50%;
}
.skill-star:nth-child(5) {
  top: 65%;
  left: 65%;
}
.skill-star:nth-child(6) {
  top: 25%;
  left: 10%;
}
.skill-star:nth-child(7) {
  top: 85%;
  left: 85%;
}
.skill-star:nth-child(8) {
  top: 50%;
  left: 35%;
}
.skill-star:nth-child(9) {
  top: 20%;
  left: 85%;
}
.skill-star:nth-child(10) {
  top: 70%;
  left: 50%;
}
.skill-star:nth-child(11) {
  top: 40%;
  left: 25%;
}
.skill-star:nth-child(12) {
  top: 10%;
  left: 15%;
}
.skill-star:nth-child(13) {
  top: 60%;
  left: 10%;
}
.skill-star:nth-child(14) {
  top: 30%;
  left: 55%;
}
.skill-star:nth-child(15) {
  top: 45%;
  left: 80%;
}

.connection {
  position: absolute;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(229, 231, 235, 0.3),
    rgba(229, 231, 235, 0)
  );
  z-index: 1;
  pointer-events: none;
  transition: all 0.3s ease;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.8;
  }
}

.constellation:hover .connection {
  animation: pulse 2s infinite;
}

.skill-info-display {
  background: rgba(11, 15, 25, 0.8);
  border: 1px solid rgba(229, 231, 235, 0.1);
  border-radius: 15px;
  padding: 30px;
  width: 90%;
  max-width: 600px;
  margin-top: 40px;
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateY(20px);
}

.skill-info-display.active {
  opacity: 1;
  transform: translateY(0);
}

.skill-info-name {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 10px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skill-info-desc {
  color: var(--gray);
  font-size: 1.1rem;
  line-height: 1.7;
}

/* === PROJECTS SECTION === */
.projects {
  background-color: var(--secondary);
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
  perspective: 1500px;
}

.project-card {
  background: linear-gradient(145deg, #1e1e2a, #171722);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0) 50%
  );
  opacity: 0;
  transform: translateX(-100%);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.project-card:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.project-image {
  position: relative;
  overflow: hidden;
  height: 220px;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-image::after {
  content: attr(data-category);
  position: absolute;
  top: 20px;
  right: -30px;
  width: 120px;
  padding: 5px 0;
  background: var(--accent);
  color: var(--dark);
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  transform: rotate(45deg);
  box-shadow: 0 0 10px var(--accent-glow);
}

.project-content {
  padding: 25px;
  transform: translateZ(50px);
}

.project-icon {
  margin-right: 10px;
  color: var(--accent);
  font-size: 1.2rem;
}

.project-content h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--light);
  font-family: var(--font-heading);
}

.project-content p {
  color: var(--gray);
  margin-bottom: 20px;
}

.project-tech {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-tech span {
  background-color: rgba(60, 121, 245, 0.15);
  color: var(--primary);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.btn-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  margin-right: 20px;
  transition: color 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-link:hover {
  color: var(--light);
  text-shadow: 0 0 8px var(--accent-glow);
}

/* === JOURNEY === */
.journey {
  background-color: var(--dark);
  position: relative;
  overflow: hidden;
}

.timeline-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px; /* more mobile spacing */
}

.timeline-container::after {
  content: "";
  position: absolute;
  width: 4px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
  border-radius: 2px;
  z-index: 1;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  margin-bottom: 30px; /* consistent spacing */
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.5, 0, 0, 1);
}

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

.timeline-item:nth-child(odd) {
  left: 0;
  transform: translateX(-20px);
}

.timeline-item:nth-child(even) {
  left: 50%;
  transform: translateX(20px);
}

.timeline-item.visible:nth-child(odd) {
  transform: translateX(0);
}

.timeline-item.visible:nth-child(even) {
  transform: translateX(0);
}

.timeline-item::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  right: -10px;
  background-color: var(--dark);
  border: 4px solid var(--primary);
  top: 30px;
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 10px var(--primary-glow);
}

.timeline-item:nth-child(even)::after {
  left: -10px;
}

.timeline-content {
  padding: 25px;
  background: var(--secondary);
  border-radius: 10px;
  position: relative;
  border-left: 3px solid var(--accent);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.timeline-date {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.timeline-content h3 {
  margin-bottom: 5px;
  color: var(--light);
  font-family: var(--font-heading);
}

.timeline-content h4 {
  color: var(--gray);
  font-weight: 500;
  font-style: italic;
  margin-bottom: 10px;
}

/* === ACHIEVEMENTS === */
.achievements {
  background-color: var(--secondary);
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.achievement-card {
  background: var(--dark);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(60, 121, 245, 0.1);
  position: relative;
  overflow: hidden;
}

.achievement-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(60, 121, 245, 0.1) 0%,
    rgba(60, 121, 245, 0) 70%
  );
  transform: rotate(45deg);
  z-index: 0;
  transition: all 0.6s ease;
}

.achievement-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px -10px rgba(60, 121, 245, 0.2);
}

.achievement-card:hover::before {
  transform: rotate(45deg) translate(20%, 20%);
}

.achievement-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  background: linear-gradient(145deg, #2a2a3a, #1e1e2a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--primary);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  position: relative;
}

.achievement-card h3 {
  font-family: var(--font-heading);
  margin-bottom: 10px;
  color: var(--light);
  position: relative;
}

.achievement-card p {
  color: var(--gray);
  font-size: 0.95rem;
  position: relative;
}

/* === FOOTER & CONTACT === */
footer {
  text-align: center;
  padding: 100px 0 50px;
  background-color: var(--dark);
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at center,
    rgba(60, 121, 245, 0.05) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.social-links {
  display: flex;
  justify-content: center;
  list-style: none;
  margin-bottom: 40px;
  gap: 20px;
}

.social-links li {
  margin: 0 10px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--secondary);
  color: var(--gray);
  font-size: 1.5rem;
  border-radius: 50%;
  transition: all 0.3s;
}

.social-links a:hover {
  color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 5px 15px var(--primary-glow);
}

.copyright {
  color: var(--gray);
  font-size: 14px;
  margin-top: 30px;
}

.copyright i {
  color: var(--accent);
  margin: 0 5px;
}

/* === LOADING SCREEN === */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--dark);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 1s ease-out;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(60, 121, 245, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}

.loading-content h2 {
  color: var(--light);
  font-family: var(--font-heading);
  letter-spacing: 1px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* === ANIMATED EMAIL ICON === */
.contact-icon-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 250px;
  margin-bottom: 20px;
}

.letter-image {
  position: relative;
  width: 200px;
  height: 200px;
  cursor: pointer;
}

.animated-mail {
  position: absolute;
  height: 150px;
  width: 200px;
  transition: 0.4s;
}

.animated-mail .body {
  position: absolute;
  bottom: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 100px 200px;
  border-color: transparent transparent var(--primary) transparent;
  z-index: 2;
}

.animated-mail .top-fold {
  position: absolute;
  top: 50px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 50px 100px 0 100px;
  transform-origin: 50% 0%;
  transition: transform 0.4s 0.4s, z-index 0.2s 0.4s;
  border-color: var(--primary) transparent transparent transparent;
  z-index: 2;
}

.animated-mail .back-fold {
  position: absolute;
  bottom: 0;
  width: 200px;
  height: 100px;
  background: var(--gray);
  z-index: 0;
}

.animated-mail .left-fold {
  position: absolute;
  bottom: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 50px 0 50px 100px;
  border-color: transparent transparent transparent var(--gray);
  z-index: 2;
}

.animated-mail .letter {
  left: 20px;
  bottom: 0px;
  position: absolute;
  width: 160px;
  height: 60px;
  background: var(--light);
  z-index: 1;
  overflow: hidden;
  transition: 0.4s 0.2s;
}

.animated-mail .letter-border {
  height: 10px;
  width: 100%;
  background: repeating-linear-gradient(
    -45deg,
    var(--accent),
    var(--accent) 8px,
    transparent 8px,
    transparent 18px
  );
}

.animated-mail .letter-title {
  margin-top: 10px;
  margin-left: 5px;
  height: 10px;
  width: 40%;
  background: var(--accent);
}

.animated-mail .letter-context {
  margin-top: 10px;
  margin-left: 5px;
  height: 10px;
  width: 20%;
  background: var(--accent);
}

.animated-mail .letter-stamp {
  margin-top: -35px;
  margin-left: 120px;
  border-radius: 100%;
  height: 30px;
  width: 30px;
  background: var(--accent);
  opacity: 0.3;
}

.shadow {
  position: absolute;
  top: 200px;
  left: 50%;
  width: 400px;
  height: 30px;
  transition: 0.4s;
  transform: translateX(-50%);
  border-radius: 100%;
  background: radial-gradient(
    rgba(0, 0, 0, 0.5),
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0)
  );
}

.letter-image:hover .animated-mail {
  transform: translateY(50px);
}
.letter-image:hover .animated-mail .top-fold {
  transition: transform 0.4s, z-index 0.2s;
  transform: rotateX(180deg);
  z-index: 0;
}
.letter-image:hover .animated-mail .letter {
  height: 180px;
}
.letter-image:hover .shadow {
  width: 250px;
}

.animated-contact-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  gap: 15px;
}

.contact-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  transition: all 0.3s ease;
}

.animated-contact-link:hover .contact-text {
  color: var(--light);
  text-shadow: 0 0 15px var(--primary-glow);
}

.animated-contact-link.copied .contact-text {
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
}

/* === SCROLL DOWN CHEVRON === */
.scroll-down-link {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  cursor: pointer;
  color: var(--light);
  font-size: 1.5rem;
  opacity: 0.7;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.scroll-down-link:hover {
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
}

.scroll-down-link i {
  animation: bounce-chevron 2s infinite;
}

/* --- "Click Me" Prompt on Skill Star --- */
.call-to-action-star::after {
  content: "Click Me!";
  position: absolute;
  top: -45px; /* Position it above the star */
  left: 50%;
  background-color: var(--accent);
  color: var(--dark);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  font-family: var(--font-sans);
  white-space: nowrap;
  z-index: 20;
  animation: flashy-bounce 2s infinite ease-in-out;
}

/* This will hide the bubble after ANY star has been clicked */
.constellation-container.interacted .call-to-action-star::after {
  display: none;
}

/* Animation for the bubble */
@keyframes flashy-bounce {
  0%,
  100% {
    transform: translate(-50%, 0);
    box-shadow: 0 0 15px var(--accent-glow);
  }
  50% {
    transform: translate(-50%, -8px);
    box-shadow: 0 0 25px rgba(60, 121, 245, 0.7);
  }
}

@keyframes bounce-chevron {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* === AMBIENT ANIMATIONS === */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translateX(-15px);
  }
  50% {
    transform: translateX(15px);
  }
}

/* === CONSTELLATION RIPPLE EFFECT === */
@keyframes ripple {
  from {
    transform: scale(1);
    opacity: 0.7;
    border-width: 2px;
  }
  to {
    transform: scale(5);
    opacity: 0;
    border-width: 1px;
  }
}

.skill-star.featured-skill::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--primary);
  animation: ripple 1.5s ease-out forwards;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 992px) {
  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
    gap: 40px;
  }
  .hero-image {
    margin-bottom: 40px;
    width: 300px;
    height: 300px;
  }
  .hero-text h1 {
    font-size: 3.5rem;
  }
  .hero-buttons {
    justify-content: center;
  }
  .constellation {
    width: 100%;
    height: 300px;
  }
}

@media (max-width: 600px) {
  section {
    padding: 80px 0;
  }
  .hero-text h1 {
    font-size: 2.8rem;
  }
  .hero-text p {
    font-size: 1rem;
  }
  .btn {
    padding: 12px 25px;
    font-size: 14px;
  }
  .section-header-container {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  /* --- HAMBURGER ICON --- */
  .hamburger {
    display: flex;
  }
  .hamburger.active .line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active .line:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active .line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* --- MOBILE NAVIGATION MENU (FINAL FIX) --- */
  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: var(--dark);

    /* SWITCH TO BLOCK LAYOUT FOR FLAWLESS SCROLLING */
    display: block;
    overflow-y: auto; /* Allow scrolling */
    padding: 40px 0; /* Add top and bottom spacing */

    transition: all 0.5s ease;
  }

  .nav-links.active {
    left: 0;
  }

  /* --- STYLING FOR THE LINKS --- */
  .nav-links li {
    margin-left: 0;
    width: 100%;
    text-align: center;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }

  /* Staggered animation for links appearing */
  .nav-links.active li:nth-child(1) {
    transition-delay: 0.1s;
  }
  .nav-links.active li:nth-child(2) {
    transition-delay: 0.2s;
  }
  .nav-links.active li:nth-child(3) {
    transition-delay: 0.3s;
  }
  .nav-links.active li:nth-child(4) {
    transition-delay: 0.4s;
  }
  .nav-links.active li:nth-child(5) {
    transition-delay: 0.5s;
  }
  .nav-links.active li:nth-child(6) {
    transition-delay: 0.6s;
  }

  /* Animate links into view when menu is active */
  .nav-links.active li {
    opacity: 1;
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    padding: 15px;
    display: block;
    transition: color 0.3s ease, transform 0.3s ease;
  }

  .nav-links a:hover,
  .nav-links a:focus {
    color: var(--accent);
    transform: scale(1.1);
  }

  /* --- FIX FOR HEADER HOVER EFFECT ON ZOOM --- */
  .section-title h2:hover {
    letter-spacing: 2px; /* Revert to the default non-hover letter-spacing */
    transform: none; /* Completely disable the scale/translate effect */
    color: var(--light); /* Revert to the default non-hover color */
  }

  /* --- Other mobile fixes from your original file --- */
  .projects-container {
    grid-template-columns: 1fr;
  }
  .timeline-container::after {
    left: 31px;
  }
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  .timeline-item:nth-child(even) {
    left: 0%;
  }
  .timeline-item::after {
    display: none;
  } /*This will remove journey card circles for smaller screens and zoomed screens*/
  
  .achievements-grid {
    grid-template-columns: 1fr;
  }
}
