/* ======= HERO ======= */
.hero {
  text-align: center;
  margin-top: 80px;
}

.hero-title {
  font-family: "Rubik Mono One", monospace;
  font-size: clamp(60px, 12vw, 180px);
  color: #1e40ff;

  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 0.9s ease forwards;
}

.hero-subtitle {
  margin: 20px 20px;
  font-size: 21px;
  color: #333;

  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 0.9s ease forwards;
  animation-delay: 1s;
}

.hero-title,
.hero-subtitle {
  filter: blur(6px);
}

.hero-title span {
  display: inline-block;
  transition: transform 0.2s ease, color 0.2s ease;
}

.hero-title span:hover {
  transform: translateY(-35px);
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (max-width: 768px) {
  .hero-title span:hover {
    transform: none;
  }
}

/* ======= CAROUSEL ======= */

.carousel {
  margin: 150px auto;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: scroll 50s linear infinite;
}

.carousel-item {
  flex: 0 0 auto;
  width: clamp(200px, 35vw, 600px);
  aspect-ratio: 3 / 2;

  position: relative;
  overflow: hidden;

  border-radius: 0; 
}

.carousel-item img {
  width: 100%;
  height: 100%;

  object-fit: cover;       
  object-position: center; 

  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* hover effect */
.carousel-item:hover img {
  transform: scale(1.03);
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
  .carousel {
    margin: 80px auto;
    -webkit-overflow-scrolling: touch;
  }

  .carousel-item {
    width: clamp(350px, 85vw, 400px);
    aspect-ratio: 4 / 3;
  }
}

/* ======= ABOUT ======= */

.about {
  width: 80%;
  margin: 150px auto;
}

.about h2 {
  font-family: "Rubik Mono One", monospace;
  font-size: 32px;
  color: #ff751f;
  margin-bottom: 40px;
}

.about h2:hover {
  color: #1e40ff;
}

.about-container {
  display: flex;
  align-items: center;
  gap: 40px;
}

.about-image {
  width: 50%;
}

.about-image img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.about-text {
  width: 50%;
  font-size: 18px;
  line-height: 1.6;
}

.about-link {
  margin-top: 20px;
}

.about-link a {
  text-decoration: none;
  color: #1e40ff;
  font-weight: 500;
  transition: color 0.3s ease, transform 0.2s ease;
}

.about-link a:hover {
  color: #ff751f;
  transform: translateX(4px);
}

@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
  }

  .about-image,
  .about-text {
    width: 100%;
  }

  .about-image img {
    height: 300px;
  }

  .about-text {
    font-size: 16px;
  }
}

/* ======= PROJECTS ======= */

.projects {
  width: 80%;
  margin: 150px auto;
}

.projects h2 {
  font-family: "Rubik Mono One", monospace;
  font-size: 32px;
  color: #ff751f;
  margin-bottom: 40px;
}

.projects h2:hover {
  color: #1e40ff;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.project-item {
  display: flex;
  flex-direction: column;
}

.project-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.project-item:hover img {
  transform: scale(1.03);
}

.project-item p {
  margin-top: 10px;
  font-size: 18px;
}

.projects,
.about {
  width: 80%;
  max-width: 1200px;
  margin: 150px auto;
}

@media (max-width: 768px) {

  /* ===== Projects spacing ===== */
  .projects {
    width: 90%;
    margin: 100px auto;
  }

  /* Grid becomes tighter */
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* Smaller, more compact cards */
  .project-item img {
    aspect-ratio: 3 / 4;
  }

  .project-item p {
    font-size: 14px;
    margin-top: 6px;
  }
}

/* ======= RESPONSIVE ======= */

@media (max-width: 1024px) {
  .hero h1 {
    font-size: 100px;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 70px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 50px;
  }
}