/* ------------------------ */
/* ✅ ORIGINAL DESKTOP CSS (unchanged) */
/* ------------------------ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #ffffff;
  color: #111827;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  height: 100%;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  cursor: none;
  line-height: 1.6;
}

.cursor-dot {
  width: 5px;
  height: 5px;
  background-color: rgb(0, 0, 0);
  pointer-events: none;
}

.cursor-outline {
  width: 30px;
  height: 30px;
  border: 2px solid black;
  pointer-events: none;
}

.cursor-dot,
.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.main-container {
  display: grid;
  height: 100vh;
  width: 100%;
  padding: 10px;
  grid-template-rows: repeat(4, 1fr);
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  grid-template-areas:
    "box-1 box-1 box-2 box-2 box-3"
    "box-4 box-5 box-5 box-5 box-3"
    "box-4 box-5 box-5 box-5 box-6"
    "box-7 box-8 box-9 box-9 box-10";
}

.box {
  border: 2px solid #000000;
  border-radius: 5px;
  background-size: cover;
  background-position: center;
  color: inherit;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.box:hover {
  transform: scale(1.01);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
}

/* Box-specific colors */
.box1 {
  background-color: #00FF9C;
  background-color: #00FF9C;
}

.box1 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.box2 {
  background-color: #8C00FF;
  background-color: #8C00FF;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
}

.box3 {
  background-color: #FFD000;
  background-color: #FFD000;
}

.box4 {
  background-color: #CCFF00;
  background-color: #CCFF00;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  grid-template-columns: repeat(2, 1fr);
  padding: 10px;
  gap: 10px;
}

.box5 {
  background-color: #ff006a;
  background-color: #ff006a;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  text-align: left;
}

.box5 h1 {
  font-size: clamp(2.5rem, 5vw, 4.375rem);
  font-weight: 700;
  margin-bottom: 10px;
}

.box5 p {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #f1f5f9;
}

.box6 {
  background-color: #00FFD4;
  background-color: #00FFD4;
  display: flex;
  flex-direction: column;
  padding: 10px 0;
}

.box7 {
  background-color: #C100FF;
  background-color: #C100FF;
  display: flex;
  flex-direction: column;
  padding: 10px 0;
}

.box8 {
  background-color: #EEFF00;
  background-color: #EEFF00;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
}

.box9 {
  background-color: #00FF80;
  background-color: #00FF80;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
}

.box10 {
  background-color: #0047FF;
  background-color: #0047FF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}

/* Profile image */
#profile-img {
  height: min(400px, 40vh);
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* Social Icons */
.box10 i {
  font-size: clamp(2.5rem, 5vw, 4.375rem);
  color: #000000;
  transition: transform 0.3s ease, color 0.3s ease;
}

.box10 i:hover {
  transform: scale(1.15);
  color: #000000;
}

/* Remove default anchor styling */
a {
  text-decoration: none;
  color: inherit;
  margin-left: 11px;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Project icons */
.p-i-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1.5rem, 3vw, 3.125rem);
  padding-top: 20px;
  margin-bottom: 1rem;
}

.p-icons {
  height: clamp(3.75rem, 6vw, 5rem);
  transition: transform 0.3s ease;
  object-fit: contain;
}

.p-icons-project {
  height: clamp(3.125rem, 5vw, 4.375rem);
  object-fit: contain;
}

.p-icons:hover {
  transform: scale(1.1);
}

#resume {
  height: clamp(5rem, 8vw, 6.25rem);
}

.resume-container {
  margin-bottom: 0.5rem;
}

.contact-container {
  display: flex;
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-top: 10px;
  margin-bottom: 1rem;
}

.cp-container {
  display: flex;
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-bottom: 1rem;
}

.lang-containers {
  display: flex;
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-bottom: 1rem;
}

/* Ensure proper heading hierarchy */
h4 {
  font-weight: 400;
  margin: 0;
}

/* Focus styles for accessibility */
a:focus-visible {
  outline: 2px solid #008cff;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .box:hover {
    transform: none;
  }
}


/* ------------------------ */
/* ✅ MOBILE RESPONSIVENESS (Updated as per request) */
/* ------------------------ */
@media (max-width: 1024px) {
  body {
    cursor: auto; /* Disable custom cursor for mobile/tablet */
  }

  .cursor-dot,
  .cursor-outline {
    display: none;
  }

  .main-container {
    display: flex;
    flex-direction: column;
    height: auto;
    padding: 15px;
  }

  .box {
    width: 100%;
    height: auto;
    min-height: 300px;
  }

  /* 📌 Reorder elements */
  .box5 { order: 1; } /* Myself section first */
  .box2 { order: 2; }
  .box3 { order: 3; }
  .box4 { order: 4; }
  .box6 { order: 5; }
  .box7 { order: 6; }
  .box8 { order: 7; }
  .box9 { order: 8; }
  .box10 { order: 9; }
  .box1 { order: 10; } /* Cat gif moved to bottom */

  .box5 {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .box5 h1 {
    font-size: 2rem;
  }

  .box5 p {
    font-size: 0.95rem;
  }

  #profile-img {
    width: 80%;
    height: auto;
  }

  .p-i-container,
  .cp-container,
  .lang-containers,
  .contact-container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .p-icons,
  .p-icons-project {
    height: 60px;
  }

  h4 {
    margin-top: 10px;
    font-size: 1.1rem;
  }

  .box2,
  .box4,
  .box6,
  .box7,
  .box8,
  .box9,
  .box10 {
    padding: 15px 0;
  }

  .box4 {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
  }

  .contact-container i {
    font-size: 2.5rem;
  }

  .main-container > .box + .box {
    margin-top: 15px;
  }
}

@media (max-width: 600px) {
  .box5 h1 {
    font-size: 1.75rem;
  }

  .box5 h2 {
    font-size: 1.2rem;
  }

  .box5 p {
    font-size: 0.9rem;
  }

  #profile-img {
    width: 90%;
  }

  .p-icons,
  .p-icons-project {
    height: 50px;
  }

  .contact-container i {
    font-size: 2rem;
  }

  .box {
    min-height: 250px;
  }
}
