/* ===============================
   HERO BASE (UPDATED - REDUCED GAP)
================================ */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: flex-start;
  padding-top: 100px;          /* adjusted – was 120px */
}

.hero-row {
  display: flex;
  align-items: flex-start;     /* ← changed from center → top alignment */
  gap: 4rem;                   /* ← explicit horizontal spacing (≈64px) */
  width: 100%;
}

/* ================= LIVE PROJECTS CAROUSEL ================= */
@media (max-width: 768px) {
  .carousel-slide {
    width: 280px;
  }
  
  .carousel-track {
    animation-duration: 45s;
  }
}

@media (max-width: 480px) {
  .carousel-slide {
    width: 260px;
    margin: 0 0.8rem;
  }
}

/* ===============================
   HERO IMAGE (DESKTOP)
================================ */
.hero-img {
  display: flex;
  justify-content: center;
  align-items: flex-start;     /* ← changed from flex-end → top alignment */
  flex: 0 0 auto;
}

.hero-img img {
  max-width: 380px;            /* ← reduced from 420px for better balance */
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
  /* Optional: force consistent portrait feel if your photo is portrait */
  /* aspect-ratio: 3 / 4; */
}

/* ===============================
   HERO CONTENT (text side)
================================ */
.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 0;              /* remove any extra top padding if present */
}

/* ===============================
   MAX WIDTH: 1320px
================================ */
@media (max-width: 1320px) {
  .container-lg {
    max-width: 1200px;
  }

  .hero-content {
    padding: 0;
  }

  .header-nav {
    padding: 0;
  }
}

/* ===============================
   MAX WIDTH: 1200px
================================ */
@media (max-width: 1200px) {
  .title {
    font-size: 40px;
  }

  .hero-img img {
    max-width: 360px;
  }

  .live-projects-badges {
    gap: 10px;
  }

  .live-projects-badges img {
    max-height: 28px;
  }

  .goToTop {
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 10px;
  }

  .goToTop img {
    width: 20px;
    height: 20px;
  }

  .about-content {
    padding-right: 0;
  }

  .services-row {
    justify-content: center;
  }

  .project-box {
    max-width: 454px;
  }

  .about,
  .projects,
  .contact {
    padding: 80px 0;
  }
}

/* ===============================
   MAX WIDTH: 977px (TABLET)
================================ */
@media (max-width: 977px) {
  .header-nav {
    padding: 0;
  }

  .nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--primary-accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 201;
    transition: background-color 0.2s ease, transform 0.2s ease;
  }

  .nav-btn:hover {
    background: var(--secondary-accent);
    transform: scale(1.05);
  }

  .nav-btn img {
    width: 20px;
    height: 20px;
    filter: invert(1);
  }

  .nav-list {
    display: none;
  }

  .nav.open .nav-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: absolute;
    top: 90px;
    right: 16px;
    left: 16px;
    padding: 18px;
    background: var(--primary-bg-color);
    border: 1px solid var(--gray-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    z-index: 200;
  }

  .nav.open {
    position: relative;
  }

  .theme-toggle {
    width: 48px;
    height: 48px;
  }

  .hero {
    padding-top: 120px;         /* adjusted for mobile navbar */
  }

  .hero-row {
    flex-direction: column;
    gap: 3rem;                 /* vertical spacing on tablet/mobile */
    align-items: center;
  }

  .hero-content {
    text-align: center;
  }

  .hero-img img {
    max-width: 340px;
  }

  .about-row {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .projects-row {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .skills-title {
    font-size: 30px;
    margin-bottom: 32px;
  }

  .circle-container {
    justify-content: center;
  }
}

/* ===============================
   MAX WIDTH: 720px (MOBILE)
================================ */
@media (max-width: 720px) {
  .container {
    padding: 0 20px;
  }

  .title {
    font-size: 32px;
    margin-bottom: 36px;
  }

  .hero-heading {
    font-size: 2.5rem;
  }

  .hero-heading-subtitle {
    font-size: 1.125rem;
  }

  .btn {
    width: 100%;
    text-align: center;
    margin-right: 0;
  }

  .hero-img img {
    max-width: 300px;
  }

  .hero {
    padding-top: 100px;         /* adjusted for small mobile */
  }

  .services-row {
    grid-template-columns: 1fr;
  }

  .projects-row {
    grid-template-columns: 1fr;
  }

  .contactForm {
    max-width: 100%;
    padding: 1.5rem;
    margin: 0 1rem;
  }

  .input-box {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  input,
  textarea {
    padding: 0.875rem 1rem;
  }

  textarea {
    min-height: 120px;
  }

  .contactForm {
    max-width: 100%;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .circle {
    width: 100px;
  }

  .skills-premium svg {
    width: 100px;
    height: 100px;
  }

  .skills-premium .number {
    top: 32px;
    font-size: 1rem;
  }
}

/* ===============================
   MAX WIDTH: 406px (SMALL MOBILE)
================================ */
@media (max-width: 406px) {
  .hero-heading {
    font-size: 2.1rem;
  }

  .hero-img img {
    max-width: 260px;
  }
}

/* ===============================
   MIN WIDTH: 1600px (LARGE SCREENS)
================================ */
@media (min-width: 1600px) {
  .title {
    font-size: 48px;
  }

  .hero-heading {
    font-size: 4rem;
  }
}