/* Button Style on Hover */
.button a {
  background-color: var(--wp--preset--color--grape);
  transition: background 0.3s ease; /* moved transition here for smoother effect */
}

/* Accessible focus for buttons/links */
.button a:focus {
  outline: 2px solid var(--wp--preset--color--soft-blue);
  outline-offset: 2px;
  background-color: var(--wp--preset--color--dark-grape);
}

/* Button hover/focus state */
.button a:hover,
.button a:focus {
  background-color: var(--wp--preset--color--dark-grape);
}

/* Intro Text - Adjusted for mobile screens */
@media (max-width: 36.5625rem) {
  .hero-intro,
  .hero-tagline {
    padding-left: 0.1rem !important;
  }

  .wp-site-blocks .hero-intro {
    font-size: 2.8rem !important;
    padding-bottom: 0.5rem !important;
  }

  #intro-two {
    font-size: 1.7rem !important;
  }

  .hero-tagline {
    font-size: 1.3rem !important;
  }
}

/* Front Page Project section */
.projects .featured-projects a:hover,
.projects .featured-projects a:focus {
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-thickness: 0.1rem;
  text-underline-offset: 0.2rem;
}

section .featured-projects {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15.625rem, 1fr));
}

/* Stack them on smaller screens */
@media (max-width: 46.875rem) {
  section .featured-projects,
  div .front-project-info-row {
    padding-top: 0.1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  div .front-project-categories {
    width: 100%;
    padding-top: 0.5rem;
  }
}

@media (max-width: 76.25rem) {
  .front-project-info-row {
    /* padding-top: 0.4rem; */
    flex-direction: column;
    align-items: flex-start;
  }

  .front-project-title {
    order: 2;
  }

  .nl-term-badge {
    padding-top: 0.5rem;
    font-size: 0.8rem;
    order: 1;
  }
}

/* Skills Tabs */
/* --- Tabs Container --- */
.skills-tabs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 1rem 0;
  align-items: stretch;
}

/* --- Tab Buttons --- */
.tab-button {
  all: unset;
  cursor: pointer;
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  background: #ffffff80;
  color: #14192e;
  font-size: 1.2rem;
  font-weight: 400;
  border: 0.125rem solid transparent;
  text-align: left;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

/* Active and selected tab styles */
.tab-button.active,
.tab-button[aria-selected="true"] {
  background: var(--wp--preset--color--grape);
  color: var(--wp--preset--color--light-apricot);
  font-weight: 600;
}

/* Focus styles for tab buttons (keyboard accessibility) */
.tab-button:focus,
.tab-button:focus-visible {
  outline: 0.125rem solid var(--wp--preset--color--soft-blue);
  outline-offset: 2px;
}

/* --- Responsive: Tabs remain vertical on mobile --- */
@media (max-width: 47.9375rem) {
  .skills-tabs {
    flex-direction: column;
    gap: 0.5rem;
    max-width: 100%;
    padding: 0.5rem 0;
  }
  .tab-button {
    text-align: center;
    font-size: 0.98rem;
    padding: 0.75rem 1rem;
  }
}

/* --- Tab Content Groups --- */
.tab-content {
  border-radius: 0.625rem;
  padding: 2rem;
  min-height: 13.75rem;
  margin: 0;
  position: relative;
  z-index: 0;
  display: none;
  opacity: 0;
  transition: opacity 0.3s;
  vertical-align: top;
}

.tab-content.active {
  display: block;
  opacity: 1;
  animation: fadeInTab 0.4s;
}

@keyframes fadeInTab {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Responsive: Content area on mobile --- */
@media (max-width: 47.9375rem) {
  .tab-content {
    padding: 1rem;
    min-height: 7.5rem;
  }
}

/* Styling the term list for skills section */
.nl-term-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nl-term-badge {
  text-decoration: none;
  pointer-events: none;
  border: 0.0625rem solid var(--wp--preset--color--deep-indigo);
  border-radius: 0.5rem;
  padding: 0.25em 0.75em;
  background-color: var(--wp--preset--color--deep-indigo);
  color: white;
  text-transform: uppercase;
  font-size: 1.1rem;
}

@media (max-width: 47.5rem) {
  .nl-term-badge {
    font-size: 1rem;
  }
}

/* About Section */
.about-content {
  max-width: 50rem;
  justify-content: center;
  margin: 0 auto;
  padding-bottom: 2rem;
}

.about-content p {
  text-align: center;
}

/* Add :focus for image accessibility */
.about-content img:hover,
.about-content img:focus {
  transform: scale(1.05);
  transition: all 0.3s ease;
  filter: drop-shadow(0px 0px 0.3125rem var(--wp--preset--color--grape));
}
