@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:root {
  --primary: #33ff33;
  --secondary: #ff3377;
  --accent: #ffff33;
  --dark: #000;
  --light: #fff;
  --gray: #333;
  --secondary-dark: #cc2255;
  --primary-dark: #229922;
  --primary-light: #55ff55;
  --secondary-light: #ff6699;
}

body {
  background-color: var(--dark);
  color: var(--light);
  font-family: "Press Start 2P", cursive;
  line-height: 1.6;
  overflow-x: hidden;
}

.pixel-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
    url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2333ff33' fill-opacity='0.1'%3E%3Cpath d='M0 0h10v10H0zM10 10h10v10H10z'/%3E%3C/g%3E%3C/svg%3E");
  z-index: -1;
  animation: bg-pulse 20s infinite alternate;
}

@keyframes bg-pulse {
  0% {
    opacity: 0.9;
  }
  100% {
    opacity: 1;
  }
}

/* Moving pixel objects animation */
.pixel-object {
  position: fixed; /* Changed from absolute to fixed */
  width: 20px;
  height: 20px;
  background-color: var(--primary);
  opacity: 0.2;
  z-index: -1;
  animation: float 15s linear infinite;
  pointer-events: none;
}

.pixel-object:nth-child(2n) {
  background-color: var(--secondary);
  width: 15px;
  height: 15px;
  animation-duration: 25s;
  animation-delay: -5s;
}

.pixel-object:nth-child(3n) {
  background-color: var(--accent);
  width: 10px;
  height: 10px;
  animation-duration: 20s;
  animation-delay: -10s;
}

@keyframes float-vertical {
  0% {
    transform: translateY(-100px) rotate(0deg);
  }
  100% {
    transform: translateY(calc(100vh + 100px)) rotate(360deg);
  }
}

/* Add this for some diagonal moving pixels */
@keyframes float-diagonal {
  0% {
    transform: translate(-100px, -100px) rotate(0deg);
  }
  100% {
    transform: translate(calc(100vw + 100px), calc(100vh + 100px))
      rotate(360deg);
  }
}

@keyframes float {
  0% {
    transform: translate(-100px, 0) rotate(0deg);
  }
  100% {
    transform: translate(calc(100vw + 100px), 100vh) rotate(360deg);
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  text-align: center;
  padding: 40px 0 30px;
  position: relative;
  border-bottom: 4px solid var(--primary);
}

.title-container {
  position: relative;
  display: inline-block;
}

h1 {
  font-size: 2.5rem;
  position: relative;
  color: var(--primary);
  text-shadow: 4px 4px 0 var(--secondary);
  margin-bottom: 20px;
  animation: glitch 5s infinite;
}

@keyframes glitch {
  0%,
  90%,
  100% {
    transform: translate(0, 0);
    text-shadow: 4px 4px 0 var(--secondary);
  }
  92% {
    transform: translate(-5px, 0);
    text-shadow: -4px 0 0 var(--accent);
  }
  94% {
    transform: translate(5px, 0);
    text-shadow: 4px 0 0 var(--secondary);
  }
  96% {
    transform: translate(0, 0);
    text-shadow: none;
  }
  98% {
    transform: translate(0, 0);
    text-shadow: 4px 4px 0 var(--secondary);
  }
}

.subtitle {
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 30px;
}

.blink {
  animation: blink 1s infinite;
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

/* Navigation - Updated Navbar */
.navbar {
  background-color: rgba(0, 0, 0, 0.8);
  border: 4px solid var(--primary);
  border-radius: 0;
  padding: 0;
  margin: 30px auto;
  max-width: 800px;
  position: relative;
  box-shadow: 0 8px 0 rgba(51, 255, 51, 0.2);
}

.navbar::before {
  content: "";
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border: 2px solid var(--accent);
  z-index: -1;
  pointer-events: none;
}

.nav-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  position: relative;
}

.nav-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 25%;
  height: 50%;
  width: 2px;
  background-color: var(--accent);
}

.nav-link {
  display: block;
  color: var(--accent);
  text-decoration: none;
  padding: 15px 20px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.nav-link:hover,
.nav-link.active {
  background-color: var(--primary);
  color: var(--dark);
}

.nav-link::before {
  content: ">";
  position: absolute;
  left: -20px;
  transition: all 0.3s;
  opacity: 0;
}

.nav-link::after {
  content: "<";
  position: absolute;
  right: -20px;
  transition: all 0.3s;
  opacity: 0;
}

.nav-link:hover::before {
  left: 10px;
  opacity: 1;
}

.nav-link:hover::after {
  right: 10px;
  opacity: 1;
}

/* Projects Section */
.projects {
  padding: 50px 0;
  position: relative;
}

.section-title {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 40px;
  color: var(--primary);
  text-shadow: 3px 3px 0 var(--secondary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.project-card {
  background-color: var(--gray);
  border: 4px solid var(--primary);
  padding: 20px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(51, 255, 51, 0.1) 0%,
    rgba(255, 51, 119, 0.1) 50%,
    rgba(255, 255, 51, 0.1) 100%
  );
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 0;
}

.project-card:hover {
  transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
  border-color: var(--accent);
  box-shadow: 8px 8px 0 rgba(255, 255, 51, 0.3);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card:hover .project-image {
  transform: scale(1.05);
  border-color: var(--accent);
}

.project-card:hover .project-title {
  color: var(--secondary);
  text-shadow: 2px 2px 0 var(--accent);
}

.project-card:hover .view-project {
  background-color: var(--secondary);
  transform: translateY(-3px);
}

.project-image {
  height: 180px;
  margin-bottom: 15px;
  background-color: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary);
  overflow: hidden;
  transition: all 0.3s;
  position: relative;
}

.project-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.7) 100%
  );
  opacity: 0.7;
}

.project-image span {
  position: relative;
  z-index: 1;
  font-size: 1.2rem;
  color: var(--light);
  text-shadow: 2px 2px 0 var(--dark);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit:cover;
  transition: transform 0.3s ease;
}

.project-image:hover img {
  transform: scale(1.05);
}

.project-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--accent);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}

.tag {
  background-color: var(--secondary);
  color: var(--light);
  padding: 5px 10px;
  font-size: 0.7rem;
}

.project-description {
  font-size: 0.8rem;
  margin-bottom: 15px;
}

.view-project {
  display: inline-block;
  background-color: var(--primary);
  color: var(--dark);
  padding: 8px 15px;
  text-decoration: none;
  font-size: 0.7rem;
}

.view-project:hover {
  background-color: var(--accent);
}

/* Skills Section */
.skills {
  padding: 50px 0;
  background-color: rgba(51, 51, 51, 0.3);
  border-top: 4px solid var(--primary);
  border-bottom: 4px solid var(--primary);
  position: relative;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 20px;
  text-align: center;
  grid-auto-rows: 1fr;
}

.skill-item {
  padding: 15px;
  background-color: var(--gray);
  border: 2px solid var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 120px; /* Add fixed height */
  height: 100%;
}

.skill-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--accent);
}

.skill-name {
  font-size: 0.8rem;
  word-wrap: break-word;
  max-width: 100%;
  padding: 0 5px;
  margin-top: 10px;
}

/* Footer */
footer {
  padding: 30px 0;
  text-align: center;
  border-top: 4px solid var(--primary);
  margin-top: 50px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.social-links {
  display: flex;
  flex-wrap: wrap; /* Allows items to wrap to next line */
  gap: 20px; /* Space between items */
  justify-content: center; /* Centers items when they wrap */
  max-width: 100%; /* Prevents horizontal overflow */
  padding: 0 10px; /* Adds padding on small screens */
  margin: 0 auto; /* Centers the container */
  
}

.social-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary);
  transition: all 0.3s;
  background-color: var(--dark);
  image-rendering: pixelated;
}

.social-icon:hover {
  background-color: var(--primary);
  transform: translateY(-3px) scale(1.1);
  box-shadow: 4px 4px 0 var(--secondary);
}

.social-icon:hover .pixel-icon {
  fill: var(--dark);
}

.social-icon::after {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border: 2px solid var(--accent);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
}

.social-btn {
  color: var(--primary);
  text-decoration: none;
  padding: 8px 12px;
  border: 3px solid var(--primary);
  font-size: 0.7rem;
  text-transform: uppercase;
  transition: all 0.3s;
  background-color: var(--dark);
  box-shadow: 4px 4px 0 var(--secondary);
  image-rendering: pixelated;
}

.social-btn:hover {
  background-color: var(--primary);
  color: var(--dark);
  transform: translateY(-3px);
  box-shadow: 6px 6px 0 var(--secondary);
}

.social-icon:hover::after {
  opacity: 1;
}

.social-links a {
  color: var(--primary);
  font-size: 1.5rem;
  transition: color 0.3s;
}

.social-links a:hover {
  color: var(--accent);
}

.copyright {
  font-size: 0.7rem;
  color: #777;
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 {
    font-size: 1.8rem;
  }

  .hero {
    min-height: 40vh;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .navbar {
    max-width: 90%;
  }

  .nav-list {
    flex-direction: column;
  }

  .nav-item:not(:last-child)::after {
    display: none;
  }

  .nav-item {
    border-bottom: 2px solid var(--accent);
  }

  .nav-item:last-child {
    border-bottom: none;
  }
}

/* Skills Grid */
.skills-grid {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px 0;
}

.skill-item {
  background-color: var(--gray);
  border: 3px solid var(--primary);
  padding: 15px 10px;
  min-width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s;
}

.skill-item:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: 4px 4px 0 var(--secondary);
}

.fab {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.skill-name {
  font-size: 0.8rem;
  color: var(--light);
  text-align: center;
  padding: 0 5px;
  word-break: keep-all;
}

.skill-item:hover .skill-name {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(255, 255, 0, 0.8);
  transform: scale(1.1);
  transition: all 0.3s ease;
}


.skill-item:hover .fab {
  color: var(--accent);
  transform: scale(1.2);
  text-shadow: 0 0 10px rgba(255, 255, 51, 0.5);
}

.skill-item:hover .skill-icon {
  width: 40px;
  transform: scale(1.3);
  transition: transform 0.2s, filter 0.2s;
}
/* Music Player Styles */

.pause-icon {
  display: none;
  font-size: 16px;
}

.music-btn.playing .play-icon {
  display: inline;
}

.music-btn.playing .pause-icon {
  display: none;
}

.music-btn:not(.playing) .play-icon {
  display: none;
}

.music-btn:not(.playing) .pause-icon {
  display: inline;
}

.music-player {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 5px;
}

.music-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary);
  color: var(--dark);
  border: 2px solid var(--accent);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.music-btn:hover {
  background-color: var(--accent);
  transform: scale(1.1);
}

.music-btn.playing {
  animation: pulse 1s infinite;
}

.music-btn.muted {
  opacity: 0.6;
  position: relative;
}

.music-btn.muted::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--secondary);
  transform: rotate(-45deg);
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* 8-Bit Game Volume Slider */
#volumeSlider {
  appearance: none;
  width: 100px;
  height: 16px;
  background: var(--dark);
  border: 4px solid var(--primary);
  outline: none;
  box-shadow: 4px 4px 0 var(--secondary);
  image-rendering: pixelated;
  margin-bottom: 15px;
  position: relative;
}

#volumeSlider::before {
  position: absolute;
  top: -20px;
  left: 0;
  font-size: 0.6rem;
  color: var(--accent);
  text-shadow: 2px 2px 0 var(--dark);
}

/* Track - the groove */
#volumeSlider::-webkit-slider-runnable-track {
  height: 8px;
  background: repeating-linear-gradient(
    to right,
    var(--gray),
    var(--gray) 2px,
    var(--dark) 2px,
    var(--dark) 4px
  );
  border: 2px solid var(--accent);
}

#volumeSlider::-moz-range-track {
  height: 8px;
  background: repeating-linear-gradient(
    to right,
    var(--gray),
    var(--gray) 2px,
    var(--dark) 2px,
    var(--dark) 4px
  );
  border: 2px solid var(--accent);
}

/* Thumb - the handle */
#volumeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 20px;
  background: var(--accent);
  border: 3px solid var(--primary);
  border-bottom: 6px solid var(--primary);
  margin-top: -6px; /* Centers thumb on track */
  cursor: pointer;
  image-rendering: pixelated;
  box-shadow: 2px 2px 0 var(--secondary);
}

#volumeSlider::-moz-range-thumb {
  width: 12px;
  height: 20px;
  background: var(--accent);
  border: 3px solid var(--primary);
  border-bottom: 6px solid var(--primary);
  cursor: pointer;
  image-rendering: pixelated;
  box-shadow: 2px 2px 0 var(--secondary);
}

/* Volume indicators */
#volumeSlider::after {
  position: absolute;
  bottom: -15px;
  left: 0;
  width: 100%;
  color: var(--primary);
  font-size: 0.6rem;
  text-align: center;
  letter-spacing: 2px;
}

/* Health Bar Contact - 8-bit Style */
.health-contact {
  text-align: center;
  margin: 20px auto;
  max-width: 250px;
  cursor: pointer;
  transition: all 0.3s;
}

.health-text {
  color: var(--accent);
  font-size: 0.8rem;
  text-shadow: 2px 2px 0 var(--dark);
  margin-bottom: 5px;
  letter-spacing: 1px;
}

.health-bar {
  height: 16px;
  border: 3px solid var(--primary);
  background: var(--dark);
  position: relative;
  overflow: hidden;
  box-shadow: 4px 4px 0 var(--gray);
}

.health-fill {
  height: 100%;
  width: 100%;
  background: repeating-linear-gradient(
    45deg,
    var(--secondary),
    var(--secondary) 4px,
    var(--secondary-dark) 4px,
    var(--secondary-dark) 8px
  );
  position: relative;
  transition: width 0.5s cubic-bezier(0.65, 0, 0.35, 1);
  display: flex; /* Add this */
  align-items: center; /* Add this */
  justify-content: center; /* Add this */
}

.health-fill::before {
  content: attr(data-text);
  position: relative;
  width: 100%;
  text-align: center;
  font-size: 0.6rem;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Hover Animations */
.health-contact:hover {
  transform: translateY(-3px);
}

.health-contact:hover .health-bar {
  border-color: var(--accent);
  box-shadow: 4px 4px 0 var(--secondary);
}

.health-contact:hover .health-fill {
  animation: healthPulse 0.8s infinite alternate,
    healthGlow 1.5s infinite alternate;
}

@keyframes healthPulse {
  0% {
    transform: scaleX(1);
  }
  100% {
    transform: scaleX(0.95);
  }
}

@keyframes healthGlow {
  0% {
    box-shadow: 0 0 5px var(--secondary);
  }
  100% {
    box-shadow: 0 0 15px var(--secondary);
  }
}

.refilling {
  animation: healthRefill 5s linear forwards,
    healthPulse 0.8s infinite alternate;
}

@keyframes healthRefill {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

/* Add this for the refill transition effect */
.health-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  mix-blend-mode: overlay;
}

/* Hero Section */
.hero {
  height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
    url('data:image/svg+xml;utf8,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><rect width="2" height="2" fill="%2333ff33" opacity="0.2"/></svg>');
  position: relative;
  overflow: hidden;
}

/* Pixel Text Effect */
.pixel-text-container {
  position: relative;
  display: inline-block;
}

.pixel-text {
  font-family: "Press Start 2P", cursive;
  font-size: clamp(2rem, 5vw, 4rem);
  color: var(--primary);
  text-shadow: 4px 4px 0 var(--secondary);
  letter-spacing: 2px;
  position: relative;
}

.pixel-text::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  width: 0;
  overflow: hidden;
  animation: typing 3s steps(10) infinite alternate;
}

.typing-cursor {
  position: absolute;
  right: -15px;
  top: 0;
  width: 10px;
  height: 1em;
  background: var(--accent);
  animation: blink 1s infinite;
}

/* Scroll Hint */
.pixel-scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;
  text-decoration: none;
}

.pixel-arrow {
  color: var(--primary);
  font-size: 1.5rem;
  animation: bounce 2s infinite;
  margin-bottom: 0.5rem;
}

.pixel-scroll-hint p {
  color: var(--accent);
  font-size: 0.8rem;
  margin-top: 5px;
  text-transform: uppercase;
}

/* Animations */
@keyframes typing {
  to {
    width: 100%;
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Floating Pixels Background */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><rect width="3" height="3" fill="%2333ff33" opacity="0.1"/></svg>');
  animation: pixelFloat 20s linear infinite;
}

@keyframes pixelFloat {
  from {
    transform: translateY(0) translateX(0);
  }
  to {
    transform: translateY(-100vh) translateX(100px);
  }
}

/* About Section */
.about-section {
  padding: 50px 0;
  background-color: rgba(51, 51, 51, 0.3);
  border-top: 4px solid var(--secondary);
  border-bottom: 4px solid var(--secondary);
}

.about-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.portrait-container {
  width: 200px; /* Adjust to your preferred size */
  height: 200px;
  border: 4px solid var(--accent);
  box-shadow: 8px 8px 0 var(--secondary);
  overflow: hidden;
  margin: 0 auto 20px;
  transition: all 0.3s;
}

.portrait-container:hover {
  transform: scale(1.05) rotate(5deg);
  border-color: var(--primary);
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* This ensures proper filling without stretching */
  object-position: center top; /* Focuses on face by default */
  display: block;
}
.bio-text {
  flex: 1;
  min-width: 300px;
  padding: 20px;
  background-color: var(--gray);
  border: 4px solid var(--primary);
  line-height: 1.8;
  font-size: 0.9rem;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bio-text p {
  margin-bottom: 15px;
}

.skills-list {
  list-style: none;
  padding-left: 20px;
}

.skills-list li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 20px;
}

.skills-list li::before {
  content: "*";
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* Contact Section */
.contact-section {
  padding: 50px 0;
  background-color: rgba(0, 0, 0, 0.7);
}

.form-row {
  margin-bottom: 20px;
}

.form-row label {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
}

.pixel-input,
.pixel-textarea {
  width: 100%;
  max-width: 100%;
  padding: 12px 15px;
  background-color: var(--dark);
  border: 3px solid var(--primary);
  color: var(--light);
  font-family: "Press Start 2P", cursive;
  font-size: 0.8rem;
  box-sizing: border-box;
  line-height: 1.5;
  display: flex;
  align-items: center;
}

.pixel-textarea {
  line-height: 1.6;
  padding-top: 15px;
  min-height: 150px;
  resize: vertical;
}

.pixel-button {
  background-color: var(--primary);
  color: var(--dark);
  border: none;
  padding: 12px 24px;
  font-family: "Press Start 2P", cursive;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 4px 4px 0 var(--secondary);
}

.pixel-button:hover {
  background-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 6px 6px 0 var(--secondary);
}

.contact-alternatives {
  text-align: center;
  margin-top: 40px;
}

.contact-methods {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background-color: var(--gray);
  border: 3px solid var(--primary);
  color: var(--primary);
  text-decoration: none;
  transition: all 0.3s;
}

.contact-chip:hover {
  background-color: var(--primary);
  color: var(--dark);
  transform: translateY(-3px);
  box-shadow: 4px 4px 0 var(--secondary);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .about-content {
    flex-direction: column;
  }

  .bio-text {
    min-width: auto;
  }

  .contact-methods {
    flex-direction: column;
    align-items: center;
  }
}

/* Form Container */
.contact-form {
  height: auto;
  max-width: 600px;
  margin: 0 auto;
  padding: 30px;
  background-color: var(--gray);
  border: 4px solid var(--primary);
  box-shadow: 8px 8px 0 var(--secondary-dark);
}

/* Form Rows */
.form-row {
  position: relative;
  margin-bottom: 30px;
}

/* Input Fields */
.pixel-input,
.pixel-textarea {
  width: 100%;
  padding: 15px;
  background-color: var(--dark);
  border: 3px solid var(--primary);
  color: var(--light);
  font-family: "Press Start 2P", cursive;
  font-size: 0.8rem;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pixel-textarea {
  min-height: 150px;
  resize: vertical;
}

/* Floating Labels */
.floating-label {
  position: absolute;
  left: 15px;
  top: 15px;
  color: var(--accent);
  font-size: 0.8rem;
  transition: all 0.3s ease;
  pointer-events: none;
  text-shadow: 2px 2px 0 var(--dark);
}

/* Input Highlight Effect */
.input-highlight {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--accent);
  transition: width 0.4s ease;
}

/* Focus/Hover States */
.pixel-input:hover,
.pixel-textarea:hover,
.bio-text:hover{
  border-color: var(--primary-light);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.pixel-input:focus,
.pixel-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent);
  padding-left: 20px;
}

.pixel-input:focus ~ .floating-label,
.pixel-textarea:focus ~ .floating-label,
.pixel-input:not(:placeholder-shown) ~ .floating-label,
.pixel-textarea:not(:placeholder-shown) ~ .floating-label {
  top: -25px;
  left: 5px;
  font-size: 0.7rem;
  color: var(--primary);
  text-shadow: 2px 2px 0 var(--secondary-dark);
}

.pixel-input:focus ~ .input-highlight,
.pixel-textarea:focus ~ .input-highlight {
  width: 100%;
}

/* Submit Button */
.pixel-button {
  position: relative;
  background-color: var(--primary);
  color: var(--dark);
  border: none;
  padding: 15px 30px;
  font-family: "Press Start 2P", cursive;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 4px 4px 0 var(--secondary-dark);
  overflow: hidden;
  display: block; /* Make the button a block-level element */
  margin: 0 auto; /* Center the button horizontally */
}

.pixel-button .button-text {
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.pixel-button .button-icon {
  position: absolute;
  right: -20px;
  opacity: 0;
  transition: all 0.3s ease;
}

.pixel-button:hover {
  transform: translateY(-3px);
  box-shadow: 6px 6px 0 var(--secondary-dark);
}

.pixel-button:hover .button-text {
  transform: translateX(-5px);
}

.pixel-button:hover .button-icon {
  right: 15px;
  opacity: 1;
}

.pixel-button:active {
  transform: translateY(1px);
  box-shadow: 2px 2px 0 var(--secondary-dark);
}

/* Responsive Adjustments */
@media (max-width: 600px) {
  .contact-form {
    padding: 30px;
  }

  .pixel-input,
  .bio-text
  .pixel-textarea {
    font-size: 0.7rem;
    padding: 12px;
  }
}

/* Carousel Container */
.projects-carousel {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 20px;
}

.carousel-container {
  width: 100%;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 30px;
  padding: 20px 10px;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Navigation Buttons */
.carousel-btn {
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  color: var(--dark);
  border: 3px solid var(--accent);
  border-radius: 0;
  font-family: "Press Start 2P", cursive;
  cursor: pointer;
  transition: all 0.3s;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  box-shadow: 4px 4px 0 var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 6px 6px 0 var(--secondary-dark);
}

.carousel-btn:active {
  transform: translateY(1px);
  box-shadow: 2px 2px 0 var(--secondary-dark);
}

.pixel-arrow {
  font-size: 1.5rem;
  line-height: 1;
}

/* Project Cards (Updated for Carousel) */
.project-card {
  flex: 0 0 calc(100% - 20px);
  max-width: 350px;
  scroll-snap-align: start;
  position: relative;
}

/* Navigation Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.carousel-dot {
  width: 16px;
  height: 16px;
  background-color: var(--gray);
  border: 2px solid var(--primary);
  cursor: pointer;
  transition: all 0.3s;
}

.carousel-dot.active {
  background-color: var(--primary);
  transform: scale(1.2);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .projects-carousel {
    gap: 5px;
    padding: 0 10px;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
  }

  .project-card {
    flex: 0 0 calc(100% - 10px);
    max-width: 280px;
  }
}

/* Navigation Buttons - Always show arrows */
.carousel-btn {
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  color: var(--dark);
  border: 3px solid var(--accent);
  font-family: "Press Start 2P", cursive;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 4px 4px 0 var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Always show arrows (no hover requirement) */
.pixel-arrow {
  display: block;
  font-size: 1.5rem;
  line-height: 1;
}

/* Disabled state */
.carousel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: var(--gray);
}

.carousel-btn:disabled:hover {
  transform: none;
  box-shadow: 4px 4px 0 var(--secondary);
}

/* Fix for carousel container */
.projects-carousel {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 20px;
}

/* Ensure proper button positioning */
.carousel-btn {
  position: static; /* Remove any absolute positioning */
  flex-shrink: 0;
}

/* Fix for carousel track width */
.carousel-track {
  display: flex;
  gap: 30px;
  width: max-content;
  transition: transform 0.5s ease;
}

/* Fix for extra page issue */
.carousel-container {
  width: 100%;
  overflow: hidden;
}

/* Arrow styling */
.pixel-arrow {
  color: var(--secondary-light); /* Always dark color for visibility */
  display: block;
  font-size: 1.5rem;
  line-height: 1;
  transition: all 0.3s;
}

/* Button states */
.carousel-btn:hover {
  background-color: var(--accent);
}

.carousel-btn:disabled .pixel-arrow {
  opacity: 0.5;
}

/* Dot indicators */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  background-color: var(--gray);
  border: 2px solid var(--primary);
  cursor: pointer;
  transition: all 0.3s;
}

.carousel-dot.active {
  background-color: var(--primary);
  transform: scale(1.2);
  box-shadow: 0 0 5px var(--primary-light);
}

.carousel-container {
  width: 100%;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  width: max-content;
  text-align: center;
  justify-content: center;
  align-items: stretch;
}

.no-projects-message {
  font-size: 1.5rem;
  color: #555;
  font-weight: bold;
  padding: 20px;
  border-radius: 8px;
}

.project-card {
  flex: 0 0 calc(100% - 20px);
  max-width: 350px;
  margin-right: 30px;
  max-height: 100%;
}

.carousel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.carousel-container {
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  scroll-snap-type: x mandatory; /* Snap to cards */
  scroll-behavior: smooth; /* Smooth scrolling */
  overflow-x: auto; /* Hide horizontal scrollbar */
  overflow-y: hidden; /* Prevent vertical scroll */
  -ms-overflow-style: none;  /* For IE/Edge to hide scrollbar */
  justify-content: flex-start;
}

.carousel-container::-webkit-scrollbar {
  display: none; /* For WebKit browsers (Chrome, Safari, etc.) */
}

#loading-spinner {
  display: none;  /* Initially hidden */
}

.spinner-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--dark);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  width: 80px;
  height: 80px;
  position: relative;
}

.spinner div {
  position: absolute;
  width: 16px;
  height: 16px;
  background-color: var(--primary);
  border-radius: 50%;
  animation: bounce 1s infinite linear;
}

.spinner div:nth-child(1) {
  top: 0;
  left: 0;
  animation-delay: 0s;
}

.spinner div:nth-child(2) {
  top: 0;
  left: 64px;
  animation-delay: 0.1s;
  background-color: var(--secondary);
}

.spinner div:nth-child(3) {
  top: 64px;
  left: 0;
  animation-delay: 0.2s;
  background-color: var(--accent);
}

.spinner div:nth-child(4) {
  top: 64px;
  left: 64px;
  animation-delay: 0.3s;
  background-color: var(--secondary-dark);
}

@keyframes bounce {
  0%, 100% {
      transform: scale(1);
  }
  50% {
      transform: scale(1.5);
  }
}
.form-errors {
  margin-top: 1rem;
  color: var(--secondary);
  font-size: 0.9rem;
  white-space: pre-line;
}
.input-error {
  border-color: var(--secondary);
}
@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
  100% { transform: translateX(0); }
}

.pixel-button.shake {
  animation: shake 0.3s;
}
