/* ===============================
   RESET & BASE STYLES
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: "Poppins", sans-serif;
  color: #fff;
  background-color: #000;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===============================
   STARFIELD CANVAS
================================ */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: #000;
}

/* ===============================
   MOBILE MENU TOGGLE
================================ */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ===============================
   NAVIGATION
================================ */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  transition: background 0.3s ease;
}

.navbar.scrolled {
  background: rgba(0, 0, 0, 0.95);
}

.logo-container {
  position: relative;
  z-index: 1001;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 2px;
  cursor: pointer;
  animation: shake 3s ease-in-out infinite;
  transition: transform 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: rotate(0deg); }
  10%, 30%, 50%, 70%, 90% { transform: rotate(-3deg); }
  20%, 40%, 60%, 80% { transform: rotate(3deg); }
}

.logo:hover {
  animation: none;
}

/* Social Links */
.social-links {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  display: flex;
  gap: 15px;
  margin-left: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, margin-left 0.3s ease;
}

.logo-container:hover .social-links,
.logo-container.locked .social-links {
  opacity: 1;
  pointer-events: all;
  margin-left: 25px;
}

.social-icon {
  color: #fff;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
}

.social-icon:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

/* Navigation Menu */
.nav-menu {
  list-style: none;
  display: flex;
  gap: 40px;
  font-size: 14px;
  letter-spacing: 2px;
  align-items: center;
}

.nav-menu a {
  color: #fff;
  text-decoration: none;
  font-weight: 400;
  transition: opacity 0.3s;
  position: relative;
  padding: 10px 0;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 0;
  height: 1px;
  background: #fff;
  transition: width 0.3s ease;
}

.nav-menu a:hover::after {
  width: 100%;
}

/* ===============================
   HERO SECTION
================================ */
.hero-name {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  position: relative;
  text-align: left;
  padding: 0 40px 40px;
  will-change: opacity;
}

.hero-title {
  font-size: clamp(3rem, 12vw, 12rem);
  font-weight: 800;
  letter-spacing: -3px;
  color: #fff;
  line-height: 1;
  margin-bottom: 30px;
  border-right: 6px solid #fff;
  white-space: nowrap;
  overflow: hidden;
  animation: blinkCursor 0.7s infinite;
  padding-right: 10px;
}

@keyframes blinkCursor {
  0%, 50% { border-color: #fff; }
  51%, 100% { border-color: transparent; }
}

.hero-subtitle {
  text-align: left;
  opacity: 0;
  animation: fadeInSubtitle 0.1s ease 0.5s forwards;
}

.hero-subtitle p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 5px 0;
}

@keyframes fadeInSubtitle {
  to { opacity: 1; }
}

.scroll-indicator {
  position: absolute;
  bottom: 80px;
  right: 40px;
  font-size: 2rem;
  animation: bounce 2s infinite;
  color: #fff;
  opacity: 0.5;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* ===============================
   ABOUT SECTION
================================ */
.about-section {
  padding: 5rem 5%;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  min-height: 60vh;
  display: flex;
  align-items: center;
  will-change: transform;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.about-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.about-container {
  display: grid;
  grid-template-columns: 1fr 400px 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.about-spacer {
  /* Empty space for balance */
}

/* ===============================
   SPOTIFY CARD
================================ */
.spotify-card {
  border: 1px solid #fff;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 400px;
  justify-self: end;
  background: rgba(0, 0, 0, 0.5);
}

.album-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.song-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.song-title {
  font-size: 1rem;
  font-weight: 600;
}

.song-artist {
  font-size: 0.8rem;
  opacity: 0.7;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.play-btn:hover {
  transform: scale(1.05);
}

.progress-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: #333;
  position: relative;
  cursor: pointer;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: #fff;
  transition: width 0.1s linear;
}

.time-display {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  opacity: 0.6;
  min-width: 80px;
}

.music-invite {
  font-size: 0.7rem;
  text-align: center;
  opacity: 0.6;
  margin-top: 0.2rem;
}

/* ===============================
   ABOUT CONTENT
================================ */
.about-content {
  text-align: left;
  justify-self: start;
}

.about-greeting {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3rem, 8vw, 4rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1.2rem;
}

.about-greeting::after {
  content: "";
  display: block;
  width: 50px;
  height: 1px;
  background: #fff;
  margin: 0.8rem 0 1.4rem 0;
  opacity: 0.6;
}

.about-text p {
  font-size: 0.9rem;
  font-family: 'arial', serif;
  line-height: 1.5;
  margin-bottom: 1rem;
  opacity: 0.85;
  max-width: 420px;
}

.quote-section {
  text-align: center;
  padding: 10px 2px;
  margin-top: 1.5rem;
}

.quote-section blockquote p {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 100;
  font-family: 'Times new roman', sans-serif;
  letter-spacing: 2px;
  font-style: normal;
  opacity: 0.9;
}

/* ===============================
   SPLIT PATH SECTION
================================ */
.split-path {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.path-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  max-width: 1200px;
  width: 100%;
}

.path-card {
  position: relative;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  transition: all 0.4s ease;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  min-height: 280px;
}

.path-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: left 0.4s ease;
  z-index: 0;
}

.path-card:hover::before {
  left: 0;
}

.path-card:hover {
  border-color: #fff;
  transform: translateY(-10px);
}

.path-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px;
}

.path-content h2 {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 20px;
}

.path-content p {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  font-weight: 300;
  opacity: 0.8;
  margin-bottom: 30px;
}

.path-arrow {
  font-size: 2rem;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.4s ease;
}

.path-card:hover .path-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ===============================
   CONTENT SECTIONS
================================ */
.content-section {
  min-height: 80vh;
  padding: 80px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 20px;
  opacity: 0.9;
}

.section-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 300;
  letter-spacing: 2px;
  opacity: 0.6;
}

/* ===============================
   PROJECTS GRID
================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.project-card {
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 30px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  min-height: 250px;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: #fff;
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.05);
}

.project-card h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.project-card p {
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  line-height: 1.8;
  opacity: 0.8;
  margin-bottom: 20px;
  flex-grow: 1;
}

.tech-tags, 
.impact-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.tag, 
.stat {
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.05);
}

/* ===============================
   SEE MORE BUTTON
================================ */
.see-more-container {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.see-more-btn {
  display: inline-block;
  min-width: 200px;
  text-align: center;
  padding: 15px 40px;
  font-size: 0.9rem;
}

/* ===============================
   MILESTONES SECTION
================================ */
.milestones-section {
  padding: 80px 40px 120px;
  overflow: hidden;
}

.milestones-section .section-title {
  font-size: clamp(4rem, 12vw, 18rem);
  font-weight: 800;
  letter-spacing: -5px;
  margin-bottom: 60px;
  opacity: 1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.3);
  text-stroke: 2px rgba(255, 255, 255, 0.3);
  position: relative;
  cursor: default;
  transition: all 0.3s ease;
}

.milestones-section .section-title::before {
  content: 'MILESTONES';
  position: absolute;
  inset: 0;
  color: #fff;
  -webkit-text-stroke: 0;
  text-stroke: 0;
  background: radial-gradient(
    circle 150px at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.4) 40%,
    transparent 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.milestones-section .section-title:hover::before {
  opacity: 1;
}

/* Timeline */
.timeline-horizontal-wrapper {
  margin-top: 40px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 60px 0 40px;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.timeline-horizontal-wrapper:active {
  cursor: grabbing;
}

.timeline-horizontal-wrapper::-webkit-scrollbar {
  height: 6px;
}

.timeline-horizontal-wrapper::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.timeline-horizontal-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.timeline-horizontal-track {
  display: flex;
  align-items: flex-start;
  position: relative;
  padding: 0 40px;
  width: fit-content;
  min-width: 100%;
}

.timeline-horizontal-track::before {
  content: '';
  position: absolute;
  top: 95px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.3) 10%,
    rgba(255, 255, 255, 0.3) 90%,
    transparent
  );
  z-index: 0;
}

.timeline-item-h {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 200px;
  position: relative;
  padding: 0 20px;
}

.item-year {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 20px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.item-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #000;
  position: relative;
  z-index: 2;
  margin: 15px 0;
  transition: all 0.3s ease;
}

.timeline-item-h:hover .item-dot {
  transform: scale(1.5);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);
}

.item-content {
  text-align: center;
  margin-top: 20px;
  max-width: 180px;
}

.item-content h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  color: #fff;
  line-height: 1.3;
}

.item-content p {
  font-size: 0.85rem;
  opacity: 0.7;
  line-height: 1.5;
  font-weight: 300;
}

/* ===============================
   CONTACT SECTION
================================ */
.contact-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px 40px;
  text-align: center;
}

.contact-content h2 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  margin-bottom: 30px;
  letter-spacing: -1px;
}

.contact-content p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 300;
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto 60px;
  line-height: 1.8;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn {
  border: 2px solid #fff;
  padding: 15px 40px;
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  background: transparent;
  min-width: 150px;
  text-align: center;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: #fff;
  transition: left 0.3s ease;
  z-index: -1;
}

.btn:hover::before {
  left: 0;
}

.btn:hover {
  color: #000;
}

.footer {
  margin-top: 80px;
  padding: 30px;
  opacity: 0.5;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

/* ===============================
   ANIMATION UTILITIES
================================ */
.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===============================
   TABLET RESPONSIVE (768px - 1024px)
================================ */
@media (max-width: 1024px) {
  .about-container {
    grid-template-columns: 1fr 350px 1fr;
    gap: 2rem;
  }

  .spotify-card {
    max-width: 350px;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

/* ===============================
   MOBILE RESPONSIVE (max-width: 768px)
================================ */
@media (max-width: 768px) {
  /* Mobile Menu */
  .mobile-menu-toggle {
    display: flex;
  }

  .navbar {
    padding: 20px;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    gap: 30px;
    padding: 100px 40px 40px;
    transition: right 0.3s ease;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu a {
    display: block;
    font-size: 16px;
    padding: 15px 0;
  }

  /* Hero Section */
  .hero-name {
    padding: 0 20px 60px;
  }

  .hero-title {
    white-space: normal;
    border-right: none;
    animation: none;
  }

  .scroll-indicator {
    right: 20px;
    bottom: 40px;
  }

  /* About Section */
  .about-section {
    padding: 60px 20px;
  }

  .about-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-spacer {
    display: none;
  }

  .spotify-card {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    justify-self: center;
  }

  .about-content {
    text-align: center;
    justify-self: center;
  }

  .about-text p {
    margin: 0 auto 1rem;
  }

  .about-greeting::after {
    margin-left: auto;
    margin-right: auto;
  }

  /* Split Path */
  .path-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .path-card {
    min-height: 250px;
  }

  /* Content Sections */
  .content-section {
    padding: 60px 20px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  /* Milestones */
  .milestones-section {
    padding: 40px 20px 80px;
  }

  .timeline-horizontal-track {
    padding: 0 20px;
  }

  .timeline-item-h {
    min-width: 160px;
    padding: 0 15px;
  }

  .item-content {
    max-width: 140px;
  }

  /* Contact */
  .contact-section {
    padding: 60px 20px 40px;
  }

  .contact-buttons {
    gap: 15px;
    justify-content: center;
  }

  .btn {
    padding: 12px 30px;
    min-width: 140px;
  }

  /* Social Links - Keep hidden on mobile by default, click to show */
.social-links {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  margin-left: 10px;
  flex-direction: row;
  transition: opacity 0.3s ease, margin-left 0.3s ease;
}

  .logo-container.locked .social-links {
  opacity: 1;
  pointer-events: all;
  margin-left: 15px;
}

  .logo-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===============================
   SMALL MOBILE (max-width: 480px)
================================ */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2.5rem;
    letter-spacing: -1px;
  }

  .about-greeting {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 2.5rem;
  }

  .milestones-section .section-title {
    font-size: 3rem;
    letter-spacing: -2px;
  }

  .path-content h2 {
    font-size: 1.8rem;
  }

  .project-card {
    padding: 25px;
  }

  .spotify-card {
    padding: 0.8rem;
  }

  .contact-buttons {
    flex-direction: column;
    width: 100%;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 250px;
  }
}

/* ===============================
   TOUCH DEVICE OPTIMIZATIONS
================================ */
@media (hover: none) and (pointer: coarse) {
  .project-card:hover,
  .path-card:hover {
    transform: none;
  }

  .project-card:active {
    transform: scale(0.98);
  }

  .path-card:active {
    transform: scale(0.98);
  }

  .btn:hover {
    color: #fff;
  }

  .btn:hover::before {
    left: -100%;
  }

  .btn:active {
    background: #fff;
    color: #000;
  }
}

/* ===============================
   ACCESSIBILITY IMPROVEMENTS
================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-title {
    animation: none;
    border-right: none;
  }

  .scroll-indicator {
    animation: none;
  }

  .logo {
    animation: none;
  }
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}