/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #0b0c10;
  color: #d1d2d3;
  line-height: 1.7;
  scroll-behavior: smooth;
  position: relative;
}

/* Starfield Background */
.starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

.starfield-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.star {
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.star.foreground { opacity: 0.8; }
.star.midground { opacity: 0.5; }
.star.background { opacity: 0.2; }

.star.streak {
  border-radius: 0;
  width: 10px !important;
  height: 1px !important;
  background: linear-gradient(to right, #66fcf1, transparent);
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: #1f2833;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.logo-img {
  height: 40px;
  width: auto;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.logo:hover .logo-img {
  transform: scale(1.1);
  filter: brightness(1.2);
}

.navbar nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.navbar nav a {
  color: #d1d2d3;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  text-transform: uppercase;
  position: relative;
  transition: color 0.3s ease;
}

.navbar nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #66fcf1;
  transition: width 0.3s ease, left 0.3s ease;
}

.navbar nav a:hover::after,
.navbar nav a:focus::after,
.navbar nav a.active::after {
  width: 100%;
  left: 0;
}

.navbar nav a:hover,
.navbar nav a:focus,
.navbar nav a.active {
  color: #66fcf1;
  outline: none;
}

/* Hero Section */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #0b0c10 0%, #1f2833 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 12, 16, 0.5);
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('circuit-pattern.png') repeat;
  opacity: 0.08;
  z-index: 0;
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
}

.hero > * {
  position: relative;
  z-index: 1;
}

/* Holographic Effect and Tech Aura */
.hex-container {
  position: relative;
  width: 240px;
  height: 240px;
  clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0% 50%);
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
  background: #66fcf1;
  animation: hexFadeIn 1s ease-out forwards, flicker 5s infinite;
}

.hex-container::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0% 50%);
  background: linear-gradient(45deg, #66fcf1, #45a29e, #a29eff);
  background-size: 200%;
  animation: holographicShift 6s infinite linear;
  z-index: -1;
  box-shadow: 0 0 18px rgba(102, 252, 241, 0.5);
}

.hex-container:hover {
  transform: scale(1.05);
}

.hex-container:hover .aura-ring {
  animation-duration: 1s;
}

.hex-container:hover .sparkle {
  opacity: 1;
}

.aura-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0% 50%);
  background: transparent;
  border: 2px solid;
  border-image: linear-gradient(45deg, #66fcf1, #45a29e) 1;
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: pulseAura 3s infinite ease-out;
}

.aura-ring:nth-child(2) { animation-delay: 1s; }
.aura-ring:nth-child(3) { animation-delay: 2s; }

@keyframes pulseAura {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

.sparkle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #66fcf1;
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 5px rgba(102, 252, 241, 0.5);
  animation: sparkleDrift 1s forwards;
}

@keyframes sparkleDrift {
  0% {
    opacity: 1;
    transform: translate(0, 0);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy));
  }
}

@keyframes holographicShift {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

@keyframes flicker {
  0%, 98% {
    opacity: 1;
  }
  99% {
    opacity: 0.8;
  }
  100% {
    opacity: 1;
  }
}

.hex-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-text {
  animation: flicker 5s infinite;
}

.hero-text h1 {
  color: #ffffff;
  font-size: 2.75rem;
  margin-bottom: 0.5rem;
}

.hero-text span {
  color: #66fcf1;
  background: linear-gradient(45deg, #66fcf1, #45a29e, #a29eff);
  background-size: 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: holographicShift 6s infinite linear;
}

.bio {
  max-width: 600px;
  margin: 0.5rem auto;
  color: #d1d2d3;
  font-size: 1.2rem;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.cta {
  background: #66fcf1;
  padding: 0.75rem 1.5rem;
  color: #0b0c10;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 700;
  transition: background 0.3s, transform 0.2s;
}

.cta:hover,
.cta:focus {
  background: linear-gradient(135deg, #66fcf1 0%, #45a29e 100%);
  transform: scale(1.05);
  outline: none;
}

.socials {
  margin-top: 1.5rem;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.social-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #d1d2d3;
  transition: color 0.3s, transform 0.3s, filter 0.3s;
}

.social-link:hover,
.social-link:focus {
  color: #66fcf1;
  transform: translateY(-3px) rotate(5deg);
  filter: drop-shadow(0 0 5px rgba(102, 252, 241, 0.5));
}

.social-logo {
  width: 40px;
  height: 40px;
  margin-bottom: 0.25rem;
}

.social-link span {
  font-size: 0.85rem;
  font-weight: 500;
}

/* Scan Lines */
.hero::before {
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 4px,
    rgba(102, 252, 241, 0.1) 4px,
    rgba(102, 252, 241, 0.1) 5px
  );
  animation: scanLines 3s linear infinite;
}

@keyframes scanLines {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 5px;
  }
}

/* Floating Particles */
.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #66fcf1;
  opacity: 0.05;
  border-radius: 50%;
}

/* Sections */
.section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: auto;
  position: relative;
}

.section-box {
  background: linear-gradient(180deg, #1f2833 0%, #161b22 100%);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.section-box:hover {
  transform: translateY(-8px);
}

.section-title {
  color: #66fcf1;
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  position: relative;
}

.section-title.neon-glow {
  animation: flickerNeon 0.3s forwards, pulseGlow 2s infinite 0.5s;
  text-shadow: 0 0 2px #66fcf1, 0 0 10px rgba(102, 252, 241, 0.5);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #66fcf1;
  box-shadow: 0 0 5px rgba(102, 252, 241, 0.5);
  transition: width 0.5s ease;
}

.section-title.neon-glow::after {
  width: 100%;
}

@keyframes flickerNeon {
  0%, 20%, 50%, 80%, 100% {
    opacity: 1;
  }
  10%, 30%, 60% {
    opacity: 0.5;
  }
}

@keyframes pulseGlow {
  0%, 100% {
    text-shadow: 0 0 2px #66fcf1, 0 0 10px rgba(102, 252, 241, 0.5);
  }
  50% {
    text-shadow: 0 0 4px #66fcf1, 0 0 15px rgba(102, 252, 241, 0.7);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateX(-20px);
  animation: slideIn 0.5s forwards;
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.section-text {
  color: #d1d2d3;
  font-size: 1.1rem;
}

.skills-list,
.projects-list,
.experience-list,
.education-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background: #0b0c10;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
}

.card:hover {
  background: #2a2f3a;
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(102, 252, 241, 0.2);
}

.project-card {
  text-align: left;
}

.project-card h3 {
  color: #66fcf1;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.tech-stack {
  color: #aaaaaa;
  font-size: 0.95rem;
  margin: 0.5rem 0;
}

.project-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.project-link {
  color: #66fcf1;
  text-decoration: none;
  font-weight: 500;
}

.project-link:hover {
  color: #45a29e;
  text-decoration: underline;
}

/* Experience and Education Sections */
.experience-list .card,
.education-list .card {
  text-align: left;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.experience-list .card h3,
.education-list .card h3 {
  color: #66fcf1;
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.experience-list .card .company,
.experience-list .card .duration,
.education-list .card .duration {
  color: #aaaaaa;
  font-size: 0.95rem;
}

.experience-list .card ul,
.education-list .card ul {
  list-style: none;
  padding-left: 0;
}

.experience-list .card ul li,
.education-list .card ul li {
  color: #d1d2d3;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  position: relative;
  padding-left: 1.5rem;
}

.experience-list .card ul li::before,
.education-list .card ul li::before {
  content: "•";
  color: #66fcf1;
  position: absolute;
  left: 0;
}

/* Contact Section */
.contact .section-text {
  margin-bottom: 1.5rem;
}

.contact-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

@media (max-width: 480px) {
  .contact-ctas {
    flex-direction: column;
    align-items: center;
  }
}

/* Footer */
.footer {
  background: linear-gradient(180deg, #1f2833 0%, #0b0c10 100%);
  text-align: center;
  padding: 2rem;
  color: #45a29e;
  font-size: 0.9rem;
  position: relative;
}

.footer-decor {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: #66fcf1;
  opacity: 0.5;
}

.footer-logo {
  height: 24px;
  width: auto;
  vertical-align: middle;
  margin: 0 0.25rem;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #66fcf1;
  color: #0b0c10;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 100;
}

.back-to-top.visible {
  opacity: 1;
}

.back-to-top:hover,
.back-to-top:focus {
  background: #45a29e;
  outline: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar {
    padding: 0.75rem 1rem;
    align-items: center;
  }

  .logo-img {
    height: 32px;
  }

  .navbar nav {
    flex: 1;
    overflow-x: hidden;
  }

  .nav-links {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0.5rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .navbar nav a {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    transition: background 0.3s, color 0.3s;
  }

  .navbar nav a:hover,
  .navbar nav a:focus,
  .navbar nav a.active {
    background: #2a2f3a;
    color: #66fcf1;
  }

  .navbar nav a::after {
    bottom: -2px;
    height: 1px;
  }

  .hero {
    padding: 3rem 1rem;
  }

  .hex-container {
    width: 216px;
    height: 216px;
  }

  .hex-container::before {
    top: -8px;
    left: -8px;
    width: calc(100% + 16px);
    height: calc(100% + 16px);
    box-shadow: 0 0 15px rgba(102, 252, 241, 0.5);
  }

  .aura-ring {
    width: 90%;
    height: 90%;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .section {
    padding: 3rem 1rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .skills-list,
  .projects-list,
  .experience-list,
  .education-list {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .socials {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .hex-container {
    width: 180px;
    height: 180px;
  }

  .hex-container::before {
    top: -6px;
    left: -6px;
    width: calc(100% + 12px);
    height: calc(100% + 12px);
    box-shadow: 0 0 12px rgba(102, 252, 241, 0.5);
  }

  .aura-ring {
    width: 80%;
    height: 80%;
  }

  .hero-text h1 {
    font-size: 1.75rem;
  }

  .cta {
    padding: 0.5rem 1rem;
  }

  .logo-img {
    height: 28px;
  }

  .navbar nav a {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
  }

  .social-logo {
    width: 28px;
    height: 28px;
  }

  .social-link span {
    font-size: 0.75rem;
  }
}

/* Accessibility */
:focus {
  outline: 2px solid #66fcf1;
  outline-offset: 2px;
}