/* Ensure sticky header does not overlap section titles */
section, [id] {
  scroll-margin-top: 5.5rem;
}

/* Prevent global horizontal page blowout */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Custom Page Scrollbar */
::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: #F8FAFC;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Accessible focus outlines */
*:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
}

/* Edge Masking for Smooth Marquee Entry & Exit */
.marquee-mask {
  mask-image: linear-gradient(to right, transparent, black 2%, black 98%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 2%, black 98%, transparent);
}

/* Constrain touch gestures horizontally to the carousel element */
#cert-carousel-viewport {
  touch-action: pan-y; /* Allows vertical scrolling on touch devices unless dragging horizontally */
  overscroll-behavior-x: contain;
}

/* Active card highlight inside carousel */
.cert-card.is-active {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 1px #2563EB, 0 4px 6px -1px rgba(37, 99, 235, 0.1);
}

/* Smooth button transitions */
button, a {
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
/* ==========================================================================
   Hero Section & Profile Frame
   ========================================================================== */
.hero-section {
  width: 100%;
  padding-top: 1.5rem;
  padding-bottom: 2.25rem;
}

.hero-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 2.5rem;
}

.hero-content {
  flex: 1 1 65%;
  min-width: 0;
}

.hero-image-wrapper {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Polished Profile Frame */
.profile-frame {
  position: relative;
  width: 290px;
  height: 330px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(226, 232, 240, 0.8);
  background-color: #f8fafc;
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Tablet Screens (max-width: 1024px) */
@media (max-width: 1024px) {
  .hero-container {
    gap: 1.75rem;
  }

  .profile-frame {
    width: 250px;
    height: 290px;
  }
}

/* Mobile Screens (max-width: 768px) */
@media (max-width: 768px) {
  .hero-section {
    padding-top: 1.25rem;
    padding-bottom: 2rem;
  }

  .hero-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.75rem;
  }

  .hero-content {
    flex: 1 1 100%;
    width: 100%;
  }

  .hero-image-wrapper {
    width: 100%;
    justify-content: center;
  }

  .profile-frame {
    width: 220px;
    height: 260px;
    border-radius: 16px;
  }
}

/* ==========================================================================
   Two-Column Professional Summary & Technical Skills Sidebar
   ========================================================================== */
.summary-skills-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2.25rem;
  align-items: start;
  width: 100%;
}

.summary-main-col {
  min-width: 0;
}

/* Skills Sidebar Container */
.skills-sidebar-card {
  background-color: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

.skills-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.875rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #E2E8F0;
}

.skills-category-group {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.skills-category {
  display: flex;
  flex-direction: column;
}

/* Modern Skill Tags / Badges with Subtle Blue Accent */
.skills-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #1E40AF;
  background-color: #EFF6FF;
  border: 1px solid #DBEAFE;
  border-radius: 0.375rem;
  transition: all 150ms ease-in-out;
  user-select: none;
}

.skill-badge:hover {
  background-color: #DBEAFE;
  border-color: #BFDBFE;
  transform: translateY(-1px);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .summary-skills-grid {
    grid-template-columns: 1fr 310px;
    gap: 1.75rem;
  }
  
  .skills-sidebar-card {
    padding: 1.25rem;
  }
}

/* Mobile & Small Screens (max-width: 768px) */
@media (max-width: 768px) {
  .summary-skills-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .skills-sidebar-card {
    padding: 1.25rem 1rem;
  }
}