/* Skills section styling */
#skills {
  padding: 60px 20px;
  text-align: center; /* Center content */
}

/* Section Title (Inherits from main.css) */


/* Skills Box */
.skills-box {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* Skills Content */
.skills-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

/* Skills container: Responsive Grid */
.skills-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columns on desktop */
  gap: 20px;
  width: 90%;
  max-width: 1200px;
  padding: 20px;
  justify-items: center;
}

/* Skill card styling */
.skill {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-color);
  padding: 20px 15px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  width: 100%;
  max-width: 250px;
  min-height: 150px; /* Ensure a minimum height for consistency */
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease; /* Fun bounce effect */
}

/* Hover effect */
.skill:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 188, 212, 0.3);
}

/* Light Mode Overrides */
.light-mode .skill {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.light-mode .skill:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 0 15px rgba(0, 151, 167, 0.3);
}


/* Skill Name Styling */
.skill-name {
  font-size: 1.1rem;
  margin-bottom: 15px;
  font-weight: 500;
  color: var(--heading-color);
  text-align: center;
  display: flex;
  align-items: center;
}
.skill-name img {
    filter: drop-shadow(0 0 5px rgba(0, 188, 212, 0.5)); /* Glow on icon */
    transition: filter 0.4s ease;
}
.light-mode .skill-name img {
    filter: none; /* Remove glow in light mode */
}

/* Progress Bar Container */
.progress-container {
  position: relative;
  width: 80px;
  height: 80px;
  margin-top: 10px;
}

/* Background Circle */
.background-circle {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 4;
}

/* Foreground Circle */
.foreground-circle {
  fill: none;
  stroke: var(--accent-color); /* Accent color */
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dashoffset: 0;
  transform: rotate(-90deg); /* Start the circle from the top */
  transform-origin: center;
  transition: stroke-dashoffset 1.5s ease-out;
}

/* Percentage Text */
.percentage-text {
  position: absolute;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--accent-color);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Responsive Design */

/* Tablet View */
@media (max-width: 1024px) {
  .skills-container {
    grid-template-columns: repeat(3, 1fr); /* 3 columns for larger tablets */
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .skills-container {
    grid-template-columns: repeat(2, 1fr); /* 2 columns for smaller tablets/large phones */
    gap: 15px;
    padding: 15px;
  }

  .skill {
    max-width: 100%;
    min-height: 140px;
  }

  .skill-name {
    font-size: 1rem;
  }

  .percentage-text {
    font-size: 1rem;
  }
}

/* Mobile View */
@media (max-width: 480px) {
  .skills-container {
    grid-template-columns: 1fr; /* Single column for full width stacking on small phones */
    gap: 10px;
    padding: 10px;
  }

  .skill {
    max-width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    min-height: auto;
  }

  .skill-name {
    margin-bottom: 0;
    flex-grow: 1;
    text-align: left;
    font-size: 1.1rem;
  }

  .progress-container {
    width: 60px;
    height: 60px;
    margin-top: 0;
  }
  
  .percentage-text {
    font-size: 0.8rem;
  }
}
