/* ========================================
   ROOT VARIABLES
   ======================================== */
:root {
  --font-sans: 'Inconsolata', monospace;
  --font-mono: 'Inconsolata', monospace;
  --color-bg: #0a0a0f;
  --color-text: #ffffff;
  --color-accent: #7317cf;
  --color-card-bg: rgba(255, 255, 255, 0.05);
  --color-badge-bg: #2563eb;
  --spotify-green: #1db954;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   3D CANVAS (z-index: 1)
   ======================================== */
.canvas-cont {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1 !important;
  pointer-events: none;
  overflow: hidden;
}

#canvas3d {
  width: 100%;
  height: 100%;
  display: block;
}

/* ========================================
   PARTICLES BACKGROUND (z-index: -1 - BEHIND EVERYTHING)
   ======================================== */
#particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1 !important;
  pointer-events: none;
}

#particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1 !important;
  pointer-events: none;
}

/* ========================================
   SECTIONS (z-index: 2)
   ======================================== */
.section {
  min-height: 100vh;
  padding: 100px 5%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2 !important;
}

/* ========================================
   HERO SECTION + SKILLS
   ======================================== */
#hero {
  align-items: flex-start;
  padding-top: 60px;
}

#hero .content {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 25px;
  letter-spacing: -0.02em;
  min-height: 3.2em;
}

.highlight {
  color: var(--color-accent);
}

/* === TYPING TEXT EFFECT STYLES === */
#typing-text {
  display: inline;
  white-space: pre-wrap;
}

.typing-cursor {
  display: inline-block;
  color: #ffffff;
  margin-left: 2px;
  animation: blink 0.7s step-end infinite;
  vertical-align: text-bottom;
  background: transparent;
  width: auto;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* === SKILLS SECTION (Profile Info) === */
.skills {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  position: relative;
  z-index: 3 !important;
}

/* Profile Wrapper (for positioning badge) */
.profile-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 5px;
}

.profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-accent);
  background: #1a1a2e;
  display: block;
}

/* GPA Badge - Positioned Over Profile */
.gpa-badge {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: var(--color-badge-bg);
  color: white;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Profile Name */
.profile-name {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  letter-spacing: -0.01em;
}

/* Profile Subtitle */
.profile-subtitle {
  font-size: 1.1rem;
  color: #888;
  font-weight: 400;
  margin: 0;
  margin-bottom: 10px;
}

/* === TECH ICONS GRID === */
.lang-tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 5px;
  position: relative;
  z-index: 3 !important;
}

.tech-icon {
  width: 52px;
  height: 52px;
  background: var(--color-card-bg);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 3 !important;
}

.tech-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  position: relative;
  z-index: 3 !important;
  pointer-events: none;
}

.tech-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-6px) scale(1.08);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* Tooltip for tech icons */
.tech-icon[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.92);
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  animation: fadeIn 0.25s ease forwards;
  pointer-events: none;
  z-index: 10;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* ========================================
   🎵 MUSIC PLAYER STYLES
   ======================================== */
.music-player-container {
  margin-top: 20px;
  position: relative;
  z-index: 3 !important;
}

/* "Listening to" Label */
.listening-label {
  color: #888;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 8px;
  margin-left: 5px;
  font-family: var(--font-sans);
  letter-spacing: 0.5px;
}

/* Spotify music card */
.card {
  position: relative;
  width: 280px;
  height: 140px;
  background: #151515;
  border-radius: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.card:hover {
  border-color: var(--spotify-green);
  box-shadow: 0 5px 20px rgba(29, 185, 84, 0.2);
}

.top {
  position: relative;
  width: 100%;
  display: flex;
  gap: 10px;
}

.pfp {
  position: relative;
  top: 5px;
  left: 5px;
  height: 40px;
  width: 40px;
  background-color: #ffffff;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.title-1 {
  color: white;
  font-size: 18px;
  font-weight: normal;
  margin-left: 5px;
  font-family: var(--font-sans);
}

.title-2 {
  color: lightgrey;
  font-size: 11px;
  font-weight: lighter;
  margin-top: -3px;
  margin-left: 5px;
  font-family: var(--font-sans);
}

.time {
  width: 90%;
  background-color: #5e5e5e;
  height: 6px;
  border-radius: 3px;
  position: absolute;
  left: 5%;
  bottom: 24px;
  cursor: pointer;
}

.time:hover {
  height: 8px;
}

.elapsed {
  width: 0%;
  background-color: var(--spotify-green);
  height: 100%;
  border-radius: 3px;
  transition: width 0.1s linear;
}

.controls {
  gap: 4px;
  align-items: center;
  color: #ffffff;
  display: flex;
  position: absolute;
  bottom: 35px;
  left: 0;
  width: 100%;
  justify-content: center;
}

.volume {
  height: 100%;
  width: 42px;
  margin-right: 2px;
}

.air {
  height: 100%;
  width: 42px;
}

.controls svg {
  cursor: pointer;
  transition: 0.1s;
}

.controls svg:hover {
  color: #23da63;
}

.volume {
  opacity: 0;
  position: relative;
  transition: 0.2s;
}

.volume .slider {
  height: 4px;
  background-color: #5e5e5e;
  width: 80%;
  border-radius: 2px;
  margin-left: 10%;
}

.volume .slider .green {
  background-color: var(--spotify-green);
  height: 100%;
  width: 80%;
  border-radius: 3px;
}

.volume .circle {
  background-color: white;
  height: 6px;
  width: 6px;
  border-radius: 3px;
  position: absolute;
  right: 20%;
  top: -25%;
}

.volume_button:hover ~ .volume {
  opacity: 1;
}

.timetext {
  color: white;
  font-size: 9px;
  position: absolute;
  font-family: var(--font-sans);
}

.time_now {
  bottom: 10px;
  left: 15px;
}

.time_full {
  bottom: 10px;
  right: 15px;
}

.playing {
  display: flex;
  position: relative;
  justify-content: center;
  gap: 2px;
  width: 30px;
  height: 20px;
}

.greenline {
  background-color: var(--spotify-green);
  height: 20px;
  width: 3px;
  position: relative;
  transform-origin: bottom;
  border-radius: 2px;
}

/* Pause animation when not playing */
.playing.paused .greenline {
  animation: none;
  transform: scaleY(0.3);
}

.line-1 {
  animation: infinite playing 1s ease-in-out;
  animation-delay: 0.2s;
}

.line-2 {
  animation: infinite playing 1s ease-in-out;
  animation-delay: 0.5s;
}

.line-3 {
  animation: infinite playing 1s ease-in-out;
  animation-delay: 0.6s;
}

.line-4 {
  animation: infinite playing 1s ease-in-out;
  animation-delay: 0s;
}

.line-5 {
  animation: infinite playing 1s ease-in-out;
  animation-delay: 0.4s;
}

@keyframes playing {
  0% {
    transform: scaleY(0.1);
  }

  33% {
    transform: scaleY(0.6);
  }

  66% {
    transform: scaleY(0.9);
  }

  100% {
    transform: scaleY(0.1);
  }
}

/* Play/Pause button states */
.play-btn.playing {
  color: var(--spotify-green);
}

/* ========================================
   PROJECTS SECTION - BOUNCE CARDS
   ======================================== */
.projects-section {
  align-items: flex-end !important;
  text-align: right;
  padding: 120px 5%;
  position: relative;
  z-index: 2 !important;
}

.projects-section h2 {
  text-align: right;
  margin-right: 8%;
  margin-bottom: 50px;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.bounce-cards-container {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  max-width: 800px;
  height: 450px;
  margin-right: 4%;
  margin-left: auto;
}

.bounce-card {
  position: absolute;
  width: 260px;
  height: 400px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 4px solid #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: box-shadow 0.3s ease;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.bounce-card:hover {
  box-shadow: 0 15px 40px rgba(115, 23, 207, 0.4);
  z-index: 10;
}

/* Image Container - OPTIMIZED FOR CLARITY */
.card-image {
  width: 100%;
  height: 45%;
  overflow: hidden;
  background: #1a1a2e;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* ✅ Enhanced Image Clarity Settings */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: high-quality;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  filter: contrast(1.1) saturate(1.1) brightness(1.05); /* ✅ More vivid colors */
  transition: transform 0.3s ease, filter 0.3s ease;
}

.bounce-card:hover .card-image img {
  transform: scale(1.05);
  filter: contrast(1.15) saturate(1.15) brightness(1.1); /* ✅ Even more vivid on hover */
}

/* Subtle overlay for better text contrast */
.card-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 50%, rgba(26, 26, 46, 0.3) 100%);
  pointer-events: none;
}

/* Content Section */
.card-content {
  padding: 18px;
  height: 55%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: white;
  text-align: left;
}

.card-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.card-content p {
  font-size: 0.85rem;
  color: #aaa;
  line-height: 1.4;
  margin-bottom: 15px;
}

/* Card Links (Visit + GitHub) */
.card-links {
  display: flex;
  gap: 15px;
  align-items: center;
}

.btn {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0;
}

/* Visit Button */
.btn-primary {
  color: var(--color-accent);
}

.btn-primary:hover {
  color: #9b4dff;
  text-decoration: underline;
}

/* GitHub Button - No Background/Border */
.btn-github {
  background: transparent;
  border: none;
  padding: 0;
  min-width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-github:hover {
  transform: translateY(-2px) scale(1.1);
}

/* GitHub Icon - Always Visible (Original Color) */
.github-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: none; /* ✅ FIXED: Shows original icon color */
  opacity: 1;
  transition: all 0.3s ease;
}

.btn-github:hover .github-icon {
  transform: scale(1.1);
  filter: brightness(1.2); /* ✅ Slightly brighter on hover */
}

/* ========================================
   HOBBIES SECTION WITH CARDS
   ======================================== */
.hobbies-section {
  align-items: flex-start !important;
  text-align: left;
  padding: 100px 5%;
  position: relative;
  z-index: 2 !important;
}

.hobbies-section h2 {
  text-align: left;
  margin-left: 12%;
  margin-bottom: 15px;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hobby-cards-container {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  max-width: 700px;
  height: 380px;
  margin-left: 12%;
  margin-right: auto;
}

.hobby-card {
  position: absolute;
  width: 220px;
  height: 300px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 4px solid #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: box-shadow 0.3s ease;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.hobby-card:hover {
  box-shadow: 0 15px 40px rgba(115, 23, 207, 0.5);
  z-index: 10;
}

/* Image Container - OPTIMIZED FOR CLARITY */
.hobby-card-image {
  width: 100%;
  height: 60%;
  overflow: hidden;
  background: #1a1a2e;
  position: relative;
}

.hobby-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* ✅ Enhanced Image Clarity Settings */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: high-quality;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  filter: contrast(1.1) saturate(1.1) brightness(1.05); /* ✅ More vivid colors */
  transition: transform 0.3s ease, filter 0.3s ease;
}

.hobby-card:hover .hobby-card-image img {
  transform: scale(1.05);
  filter: contrast(1.15) saturate(1.15) brightness(1.1); /* ✅ Even more vivid on hover */
}

/* Subtle overlay for better contrast */
.hobby-card-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 50%, rgba(26, 26, 46, 0.3) 100%);
  pointer-events: none;
}

/* Content Section */
.hobby-card-content {
  padding: 15px;
  height: 40%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
  text-align: left;
}

.hobby-card-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: #fff;
}

.hobby-card-content p {
  font-size: 0.8rem;
  color: #bbb;
  line-height: 1.4;
}

/* ========================================
   FOOTER / SOCIALS
   ======================================== */
footer {
  text-align: center;
  padding: 60px 20px;
  z-index: 2 !important;
  position: relative;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.socials a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  padding: 10px 20px;
  border-radius: 10px;
}

.socials a:hover {
  color: var(--color-accent);
  background: rgba(115, 23, 207, 0.1);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
  .projects-section,
  .hobbies-section {
    align-items: center !important;
    text-align: center;
  }
  
  .projects-section h2,
  .hobbies-section h2 {
    text-align: center;
    margin-right: 0;
    margin-left: 0;
  }
  
  .bounce-cards-container,
  .hobby-cards-container {
    justify-content: center;
    margin-right: 0;
    margin-left: 0;
  }
  
  .bounce-card {
    width: 240px;
    height: 380px;
  }
  
  .hobby-card {
    width: 240px;
    height: 340px;
  }
  
  .music-player-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 80px 5%;
  }
  
  #hero {
    padding-top: 40px;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  .skills {
    align-items: center;
    text-align: center;
  }
  
  .profile-pic {
    width: 120px;
    height: 120px;
  }
  
  .profile-name {
    font-size: 1.75rem;
  }
  
  .profile-subtitle {
    font-size: 1rem;
  }
  
  .tech-icon {
    width: 46px;
    height: 46px;
  }
  
  .bounce-cards-container {
    height: 400px;
  }
  
  .hobby-cards-container {
    height: 360px;
  }
  
  .bounce-card {
    width: 180px;
    height: 260px;
  }
  
  .hobby-card {
    width: 200px;
    height: 300px;
  }
  
  .card-content h3,
  .hobby-card-content h3 {
    font-size: 1.4rem;
  }
  
  .card-content p,
  .hobby-card-content p {
    font-size: 0.8rem;
  }

  .card-content p {
    line-height: 1.3;
    margin-bottom: 8px;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .card-links {
    margin-top: auto;
    flex-shrink: 0;
  }
  
  .socials {
    gap: 15px;
  }
  
  .card-links {
    gap: 12px;
  }
  
  .btn {
    font-size: 0.85rem;
  }
  
  .github-icon {
    width: 26px;
    height: 26px;
  }
  
  .card {
    width: 260px;
    height: 130px;
  }

  .volume_button {
    width: 20px;
    height: 16px;
  }

  .volume {
    width: 36px;
  }

  .controls {
    bottom: 30px;
  }
  
  .title-1 {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }
  
  .profile-pic {
    width: 100px;
    height: 100px;
  }
  
  .profile-name {
    font-size: 1.5rem;
  }
  
  .profile-subtitle {
    font-size: 0.9rem;
  }
  
  .bounce-cards-container {
    height: 380px;
  }
  
  .hobby-cards-container {
    height: 320px;
  }
  
  .bounce-card {
    width: 160px;
    height: 240px;
  }
  
  .hobby-card {
    width: 180px;
    height: 280px;
  }
  
  .card-content,
  .hobby-card-content {
    padding: 15px;
  }

  .card-content p {
    line-height: 1.25;
    margin-bottom: 6px;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .card-links {
    margin-top: auto;
    flex-shrink: 0;
  }
  
  .lang-tags {
    justify-content: center;
  }
  
  .btn {
    font-size: 0.8rem;
  }
  
  .github-icon {
    width: 24px;
    height: 24px;
  }
  
  .card {
    width: 240px;
    height: 120px;
  }

  .volume_button {
    width: 18px;
    height: 14px;
  }

  .volume {
    width: 32px;
  }

  .controls {
    bottom: 28px;
  }
  
  .title-1 {
    font-size: 14px;
  }
  
  .title-2 {
    font-size: 10px;
  }
}
/* ========================================
   MOBILE RESPONSIVENESS FIXES
   ======================================== */
@media (max-width: 768px) {
  /* Profile picture smaller on mobile */
  .profile-pic {
    width: 100px;
    height: 100px;
  }
  
  /* GPA badge smaller and better positioned */
  .gpa-badge {
    padding: 3px 8px;
    font-size: 0.65rem;
    bottom: 2px;
    right: 2px;
  }
  
  /* Tech icons smaller */
  .tech-icon {
    width: 40px;
    height: 40px;
  }
  
  .tech-icon img {
    width: 24px;
    height: 24px;
  }
  
  /* Name and subtitle smaller */
  .profile-name {
    font-size: 1.5rem;
  }
  
  .profile-subtitle {
    font-size: 0.9rem;
  }
  
  /* Project cards match hobby card size on phones */
  .bounce-card {
    width: 180px;
    height: 260px;
  }
  
  .card-content h3 {
    font-size: 1.2rem;
  }
  
  .card-content p {
    font-size: 0.75rem;
  }
  
  /* Hobby cards smaller */
  .hobby-card {
    width: 180px;
    height: 260px;
  }
  
  /* Music player smaller */
  .card {
    width: 240px;
    height: 120px;
  }
  
  .title-1 {
    font-size: 14px;
  }
  
  .title-2 {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  /* Even smaller for very small phones */
  .profile-pic {
    width: 80px;
    height: 80px;
  }
  
  .gpa-badge {
    padding: 2px 6px;
    font-size: 0.55rem;
    bottom: 0px;
    right: 0px;
  }
  
  .tech-icon {
    width: 35px;
    height: 35px;
  }
  
  .tech-icon img {
    width: 20px;
    height: 20px;
  }
  
  .profile-name {
    font-size: 1.3rem;
  }
  
  .profile-subtitle {
    font-size: 0.8rem;
  }
  
  /* Typing text smaller */
  h1 {
    font-size: 2rem;
  }
  
  /* Cards even smaller */
  .bounce-card {
    width: 160px;
    height: 240px;
  }
  
  .hobby-card {
    width: 160px;
    height: 240px;
  }
  
  /* Music player */
  .card {
    width: 220px;
    height: 110px;
  }
}