/* ====================== BASE STYLES ====================== */
:root {
  --primary: #6ac5f8;
  --secondary: #ff87d7;
  --background: linear-gradient(45deg, #1a1a2e 0%, #16213e 100%);
  --clr-1: rgb(247, 253, 255);
  --clr-2: rgb(79, 255, 237);
  --clr-3: rgb(255, 107, 240);
  --clr-4: rgb(240, 154, 255);
}

/* Aurora Background Effect */
.aurora {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(
    45deg,
    var(--clr-1),
    var(--clr-2),
    var(--clr-3),
    var(--clr-4)
  );
  opacity: 0.1;
  z-index: -2;
  animation: aurora-wave 20s linear infinite;
}

@keyframes aurora-wave {
  0% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
  100% {
    background-position: 0% center;
  }
}

/* Wave Effect Elements */
.wave-hover {
  display: inline-block;
  transition: transform 0.3s ease;
  position: relative;
  top: 0;
  z-index: 10;
  background: rgba(44, 47, 51, 1);
}

.wave-hover:hover {
  animation: letter-wave 0.8s ease;
}

.wave-text span {
  display: inline-block;
  animation: wave 2s ease-in-out infinite;
}

.wave-text span:nth-child(1) {
  animation-delay: 0s;
}
.wave-text span:nth-child(2) {
  animation-delay: 0.1s;
}
.wave-text span:nth-child(3) {
  animation-delay: 0.2s;
}
.wave-text span:nth-child(4) {
  animation-delay: 0.3s;
}
.wave-text span:nth-child(5) {
  animation-delay: 0.4s;
}
.wave-text span:nth-child(6) {
  animation-delay: 0.5s;
}
.wave-text span:nth-child(7) {
  animation-delay: 0.6s;
}
.wave-text span:nth-child(8) {
  animation-delay: 0.7s;
}
.wave-text span:nth-child(9) {
  animation-delay: 0.8s;
}
.wave-text span:nth-child(10) {
  animation-delay: 0.9s;
}

@keyframes wave {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes aurora-wave {
  0% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
  100% {
    background-position: 0% center;
  }
}

@keyframes letter-wave {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.wave-line {
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--clr-1),
    var(--clr-2),
    var(--clr-3),
    var(--clr-4)
  );
  margin: 1.5rem auto;
  width: 60%;
  animation: aurora-wave 8s linear infinite;
}

/* Flame Effect Styling */
.flame {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: visible;
}

.flame span {
  position: absolute;
  width: 20%;
  height: 20%;
  background: radial-gradient(orangered 20%, rgba(255, 69, 0, 0) 70%);
  border-radius: 50%;
  bottom: 0;
  left: calc((var(--n) - 0.5) * 100% / var(--particles));
  transform: translateX(-50%);
  mix-blend-mode: screen;
  animation: rise 1s ease-in infinite;
  animation-delay: calc(var(--rnd) * 1s);
}

@keyframes rise {
  from {
    transform: translateX(-50%) translateY(0) scale(1);
    filter: opacity(0);
  }
  25% {
    filter: opacity(1);
  }
  to {
    transform: translateX(-50%) translateY(-100%) scale(0);
    filter: opacity(0);
  }
}

/* Aurora Text Effects */
.aurora-text {
  background: linear-gradient(
    90deg,
    var(--clr-1),
    var(--clr-2),
    var(--clr-3),
    var(--clr-4)
  );
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: aurora-wave 8s linear infinite;
}

/* Restored Original Content Styling */
.qualifications-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
  text-align: left;
}

.coursework {
  margin-top: 10px;
  background: rgba(44, 47, 51, 0.8);
  padding: 15px;
  border-radius: 8px;
}

.coursework ul {
  list-style-type: disc;
  padding-left: 20px;
  margin: 10px 0;
  text-align: left;
}

/* Enhanced Card Styling */
.card {
  background: rgba(44, 47, 51, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  margin: 1rem auto;
}

.profile-card {
  text-align: center;
}

.contact-card {
  text-align: center;
  font-size: large;
}

.card:hover {
  box-shadow: 0 8px 32px rgba(106, 197, 248, 0.3);
}

/* Skill Cloud Adjustments */
.skill-cloud span {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--clr-2);
  padding: 0.8rem 1.5rem;
}

.home-page::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 0;
}

body {
  color: #fff;
  font-family: "Segoe UI", system-ui;
  line-height: 1.6;
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  margin-top: 3rem;
}

/* ====================== CARDS ====================== */
/* HOLO EFFECT INTEGRATION */
.card {
  width: 75%;
  position: relative;
  overflow: hidden;
  padding: 2rem;
  z-index: 10;
  touch-action: none;
  border-radius: 12px;
  box-shadow: -5px -5px 5px -5px var(--primary),
    5px 5px 5px -5px var(--secondary), -7px -7px 10px -5px transparent,
    7px 7px 10px -5px transparent, 0 0 5px 0px rgba(255, 255, 255, 0),
    0 55px 35px -20px rgba(0, 0, 0, 0.5);
  transition: transform 0.5s ease, box-shadow 0.2s ease;
  background-color: rgba(44, 47, 51, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0 auto; /* Center the cards */
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Sparkle & Holo Gradient */
.card:before,
.card:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
  mix-blend-mode: color-dodge;
  transition: all 0.3s ease;
}

.card:before {
  background: linear-gradient(
    115deg,
    transparent 20%,
    var(--primary) 40%,
    var(--secondary) 60%,
    transparent 80%
  );
  background-size: 250% 250%;
  filter: brightness(0.8) contrast(1.2);
  z-index: 1;
}

.card:after {
  background: url("https://assets.codepen.io/13471/sparkles.gif"),
    url(https://assets.codepen.io/13471/holo.png),
    linear-gradient(
      125deg,
      #ff008450 15%,
      #fca40040 30%,
      #ffff0030 40%,
      #00ff8a20 60%,
      #00cfff40 70%,
      #cc4cfa50 85%
    );
  background-size: 160%;
  background-blend-mode: overlay;
  z-index: 2;
  filter: brightness(1) contrast(1);
}

/* Hover Animation */
.card:hover {
  box-shadow: -20px -20px 30px -25px var(--primary),
    20px 20px 30px -25px var(--secondary), -7px -7px 10px -5px var(--primary),
    7px 7px 10px -5px var(--secondary), 0 0 13px 4px rgba(255, 255, 255, 0.3),
    0 55px 35px -20px rgba(0, 0, 0, 0.5);
}

.card:hover:before,
.card:hover:after {
  filter: brightness(0.5) contrast(1.2);
  opacity: 0.5;
}

/* Interactive 3D Tilt */
.card.active {
  animation: none;
  transition: box-shadow 0.1s ease-out;
}

.card.active:before,
.card.active:after {
  opacity: 0.5;
  background-size: 250% 250%;
  filter: brightness(0.8) contrast(1.3);
}

/* Glow Animation */
@keyframes holoGlow {
  0%,
  100% {
    opacity: 0.1;
    filter: brightness(0.2);
  }
  50% {
    opacity: 0.2;
    filter: brightness(0.4);
  }
}

.card.animated:before,
.card.animated:after {
  animation: holoGlow 12s infinite;
}

/* Holographic Shine */
@keyframes holo-glow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.card.shine-effect {
  background: linear-gradient(
    45deg,
    rgba(255, 107, 240, 0.2),
    rgba(79, 255, 237, 0.2)
  );
  background-size: 300% 300%;
  animation: holo-glow 4s infinite linear;
}

/* ====================== TYPOGRAPHY ====================== */
h1 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  text-shadow: 0 0 15px rgba(106, 197, 248, 0.3);
}

h2.title {
  font-size: 1.8rem;
  margin: 2rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

/* Fish Element Base Styling */
.title.aurora-text {
  isolation: isolate;
  position: relative;
}

.fish {
  opacity: 0;
  display: inline-block;
  transform: translateY(-30px) scale(0.5);
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

@keyframes fishSlam {
  0% {
    opacity: 0;
    transform: translateY(-30px) scale(0.5) rotate(-15deg);
  }
  70% {
    opacity: 1;
    transform: translateY(5px) scale(1.2) rotate(5deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes fishFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes fishShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  50% {
    transform: translateX(4px);
  }
  75% {
    transform: translateX(-2px);
  }
}

/* Trigger shake when parent element is hovered */
.title:hover .fish {
  animation: fishShake 0.4s ease-in-out;
}

/* ====================== SPECIAL ELEMENTS ====================== */
.profile-img {
  width: 200px;
  height: 200px;
  border: 3px solid var(--secondary);
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(106, 197, 248, 0.3);
  transition: transform 0.3s ease;
  position: relative;
  top: 0;
  z-index: 10;
  background: rgba(44, 47, 51, 1);
}

.profile-img:hover {
  transform: scale(1.05);
}

.accent-line {
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  margin: 1.5rem auto;
  width: 60%;
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.skill-cloud span {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  border: 1px solid var(--primary);
  transition: all 0.3s ease;
}

.skill-cloud span:hover {
  background: var(--primary);
  color: #16213e;
  transform: scale(1.05);
}

/* easter egg */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes spinFlip {
  0% {
    transform: rotateY(0);
  }
  100% {
    transform: rotateY(360deg);
  }
}

.spin {
  animation: spinFlip 0.6s ease-in-out;
}

/* ====================== BUTTONS & LINKS ====================== */
.project-link {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  margin-top: 1rem;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
}

.project-link:hover {
  box-shadow: 0 0 20px rgba(106, 197, 248, 0.5);
  letter-spacing: 1px;
}

.email-button {
  display: inline-block;
  padding: 1.2rem 2.5rem;
  margin: 2rem 0;
  background: linear-gradient(45deg, #ff87d7, #6ac5f8);
  border-radius: 15px;
  font-size: 1.2rem;
  text-decoration: none;
  transition: transform 0.3s ease;
  position: relative;
  top: 0;
  z-index: 10;
  background: rgba(44, 47, 51, 1);
}

.email-button:hover {
  transform: scale(1.05) rotate(-2deg);
}

/* ====================== RESPONSIVE DESIGN ====================== */
.qual-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin: 2rem 0;
}

.qual-block {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 15px;
  text-align: center;
}

.icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

/* Mobile Optimization */
@media (max-width: 768px) {
  .content-wrapper {
    padding: 1rem;
  }

  .card {
    width: 90%; /* Make it slightly wider on small screens */
    margin: 1rem auto; /* Ensures centering */
    text-align: center; /* Ensure content inside is centered */
  }

  .profile-img {
    width: 150px;
    height: 150px;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2.title {
    font-size: 1.4rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
  }

  .qual-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .skill-cloud span {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .email-button {
    padding: 1rem 2rem;
    font-size: 1rem;
    display: block;
    margin: 1rem auto;
  }

  .coursework {
    padding: 10px;
  }

  .coursework ul {
    padding-left: 15px;
  }

  .aurora-title span {
    display: inline-block;
    animation: letter-wave 0.8s ease infinite;
  }
}

@media (max-width: 480px) {
  .profile-img {
    width: 120px;
    height: 120px;
  }

  h1 {
    font-size: 1.6rem;
  }

  p {
    font-size: 1rem;
  }

  .project-link {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
  }

  .qual-block {
    padding: 1rem;
  }
}

/* Email Typing Effect Mobile Fix */
#email-link {
  word-break: break-all;
  font-size: 1.1rem;
}

@media (max-width: 400px) {
  #email-link {
    font-size: 1rem;
  }
}

@media (hover: none) {
  .card {
    touch-action: auto; /* Allow scrolling */
    transform: none !important;
  }
}
