:root {

  --bg-gradient-onyx: linear-gradient(
    to bottom right, 
    hsl(240, 1%, 25%) 3%, 
    hsl(0, 0%, 19%) 97%
  );
  --bg-gradient-jet: linear-gradient(
    to bottom right, 
    hsla(240, 1%, 18%, 0.251) 0%, 
    hsla(240, 2%, 11%, 0) 100%
  ), hsl(240, 2%, 13%);
  --bg-gradient-yellow-1: linear-gradient(
    to bottom right, 
    hsl(45, 100%, 71%) 0%, 
    hsla(36, 100%, 69%, 0) 50%
  );
  --bg-gradient-yellow-2: linear-gradient(
    135deg, 
    hsla(45, 100%, 71%, 0.251) 0%, 
    hsla(35, 100%, 68%, 0) 59.86%
  ), hsl(240, 2%, 13%);
  --border-gradient-onyx: linear-gradient(
    to bottom right, 
    hsl(0, 0%, 25%) 0%, 
    hsla(0, 0%, 25%, 0) 50%
  );
  --text-gradient-yellow: linear-gradient(
    to right, 
    hsl(45, 100%, 72%), 
    hsl(35, 100%, 68%)
  );

  --jet: hsl(0, 0%, 22%);
  --onyx: hsl(240, 1%, 17%);
  --eerie-black-1: hsl(240, 2%, 13%);
  --eerie-black-2: hsl(240, 2%, 12%);
  --smoky-black: hsl(0, 0%, 7%);
  --white-1: hsl(0, 0%, 100%);
  --white-2: hsl(0, 0%, 98%);
  --orange-yellow-crayola: hsl(45, 100%, 72%);
  --vegas-gold: hsl(45, 54%, 58%);
  --light-gray: hsl(0, 0%, 84%);
  --light-gray-70: hsla(0, 0%, 84%, 0.7);
  --bittersweet-shimmer: hsl(0, 43%, 51%);

  --ff-poppins: 'Poppins', sans-serif;

  --fs-1: 24px;
  --fs-2: 18px;
  --fs-3: 17px;
  --fs-4: 16px;
  --fs-5: 15px;
  --fs-6: 14px;
  --fs-7: 13px;
  --fs-8: 11px;

  --fw-300: 300;
  --fw-400: 400;
  --fw-500: 500;
  --fw-600: 600;

  --shadow-1: -4px 8px 24px hsla(0, 0%, 0%, 0.25);
  --shadow-2: 0 16px 30px hsla(0, 0%, 0%, 0.25);
  --shadow-3: 0 16px 40px hsla(0, 0%, 0%, 0.25);
  --shadow-4: 0 25px 50px hsla(0, 0%, 0%, 0.15);
  --shadow-5: 0 24px 80px hsla(0, 0%, 0%, 0.25);

  --transition-1: 0.25s ease;
  --transition-2: 0.5s ease-in-out;

}


#particle-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Mobile touch improvements */
* {
  -webkit-tap-highlight-color: rgba(255, 219, 112, 0.2);
  -webkit-touch-callout: none;
}

a { text-decoration: none; }

li { list-style: none; }

img, ion-icon, a, button, time, span { display: block; }

img {
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

input, textarea {
  display: block;
  width: 100%;
  background: none;
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
}

/* Prevent text size adjustment on orientation change */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Smooth scrolling for mobile */
html {
  scroll-behavior: smooth;
}

/* Prevent pull-to-refresh on mobile Chrome */
body {
  overscroll-behavior-y: contain;
}


::selection {
  background: var(--orange-yellow-crayola);
  color: var(--smoky-black);
}

html { font-family: var(--ff-poppins); }

body { background: var(--smoky-black); }

.sidebar,
article {
  background: var(--eerie-black-2);
  border: 1px solid var(--jet);
  border-radius: 20px;
  padding: 15px;
  box-shadow: var(--shadow-1);
  z-index: 1;
}

.separator {
  width: 100%;
  height: 1px;
  background: var(--jet);
  margin: 16px 0;
}

.icon-box {
  position: relative;
  background: var(--border-gradient-onyx);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  color: var(--orange-yellow-crayola);
  box-shadow: var(--shadow-1);
  z-index: 1;
}

.icon-box::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--eerie-black-1);
  border-radius: inherit;
  z-index: -1;
}

.icon-box ion-icon { --ionicon-stroke-width: 35px; }

article { display: none; }

article.active {
  display: block;
  animation: slideFadeIn 0.18s ease-out;
}

@keyframes slideFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.page-leave {
  animation: slideFadeOut 0.18s ease-in forwards;
}

@media (prefers-reduced-motion: reduce) {
  article.active,
  .page-leave {
    animation: none !important;
  }
}

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.h2,
.h3,
.h4,
.h5 {
  color: var(--white-2);
  text-transform: capitalize;
}

.h2 { font-size: var(--fs-1); }

.h3 { font-size: var(--fs-2); }

.h4 { font-size: var(--fs-4); }

.h5 {
  font-size: var(--fs-7);
  font-weight: var(--fw-500);
}

.article-title {
  position: relative;
  padding-bottom: 7px;
}

.article-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 3px;
  background: var(--text-gradient-yellow);
  border-radius: 3px;
}


main {
  margin: 15px 12px;
  margin-bottom: 75px;
  min-width: 259px;
}

.resume{
  text-align: center;
  color: hsl(45, 54%, 58%);
  font-weight: 1000;
  text-decoration: none;
  cursor: pointer;
}

.sidebar {
  margin-bottom: 15px;
  max-height: none;
  overflow: visible;
  transition: max-height 0.5s ease, opacity 0.5s ease;
  position: relative;
  background: linear-gradient(
    135deg,
    hsl(240, 2%, 13%) 0%,
    hsl(240, 1%, 17%) 25%,
    hsl(240, 2%, 13%) 50%,
    hsl(240, 1%, 17%) 75%,
    hsl(240, 2%, 13%) 100%
  );
  background-size: 400% 400%;
  animation: sidebarGradient 15s ease infinite;
  box-shadow: 
    0 0 20px rgba(255, 219, 112, 0.1),
    inset 0 0 30px rgba(255, 219, 112, 0.02);
}

/* Removed :has() overflow toggle to prevent sidebar width jump */
/* (Tooltips now render via a body-level portal) */

@keyframes sidebarGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Subtle overlay gradient for depth */
.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 219, 112, 0.03) 0%,
    rgba(255, 184, 77, 0.02) 25%,
    transparent 50%,
    rgba(255, 219, 112, 0.02) 75%,
    rgba(255, 184, 77, 0.03) 100%
  );
  background-size: 400% 400%;
  animation: sidebarOverlay 20s ease infinite;
  border-radius: 20px;
  pointer-events: none;
  opacity: 0.6;
}

@keyframes sidebarOverlay {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.sidebar.active { opacity: 1; }

/* Bounce effect on expand/collapse */
.sidebar-bounce {
  animation: sidebarBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes sidebarBounce {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.05);
  }
  50% {
    transform: scale(0.98);
  }
  70% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

/* Ripple effect */
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 219, 112, 0.4);
  transform: scale(0);
  animation: rippleAnimation 0.6s ease-out;
  pointer-events: none;
  z-index: 10;
}

@keyframes rippleAnimation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ===== SKELETON LOADER STYLES ===== */

/* Sidebar Skeleton */
.sidebar-skeleton {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0;
  position: relative;
  z-index: 100;
}

.skeleton-avatar {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  position: relative;
  overflow: hidden;
}

.skeleton-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  position: relative;
  overflow: hidden;
}

.skeleton-line-title {
  width: 140px;
  height: 16px;
}

.skeleton-line-subtitle {
  width: 100px;
  height: 12px;
}

.skeleton-line-text {
  width: 100%;
  height: 10px;
}

.skeleton-line-full {
  width: 100%;
  height: 12px;
  margin-bottom: 8px;
}

.skeleton-button {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  position: relative;
  overflow: hidden;
}

/* Skeleton Image */
.skeleton-image {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  position: relative;
  overflow: hidden;
}

/* Shimmer Animation */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 219, 112, 0.15) 50%,
    transparent 100%
  );
  animation: shimmerMove 2s infinite;
}

@keyframes shimmerMove {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Loaded State - Fade out skeleton elements */
.skeleton-avatar.loaded,
.skeleton-line.loaded,
.skeleton-button.loaded {
  animation: fadeOutSkeleton 0.3s ease-out forwards;
}

@keyframes fadeOutSkeleton {
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* Progressive Loading States */
.content-loading {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.content-loaded {
  opacity: 1;
  transform: translateY(0);
}

.content-loading-active {
  position: relative;
  pointer-events: none;
}

/* Dynamic Content Spinner */
.dynamic-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 20px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  transition: opacity 0.3s ease-out;
}

.spinner-ring {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--orange-yellow-crayola);
  animation: spinnerBounce 1.4s infinite ease-in-out;
  box-shadow: 0 0 10px rgba(255, 219, 112, 0.4);
}

.spinner-ring:nth-child(1) {
  animation-delay: -0.32s;
}

.spinner-ring:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes spinnerBounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Spinner Sizes */

/* Loading State Overlay */
.loading-state {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading-dynamic-content {
  position: relative;
  min-height: 100px;
}

/* Skeleton Placeholders */
.skeleton-placeholder {
  padding: 15px;
  border-radius: 12px;
  background: var(--eerie-black-2);
  border: 1px solid var(--jet);
}

/* Shimmer Overlay for Content Sections */
.shimmer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  border-radius: inherit;
}

/* Global Loading Indicator */
.global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.global-loader.active {
  opacity: 1;
}

.global-loader-spinner {
  display: flex;
  gap: 8px;
  align-items: center;
}

.global-loader-spinner .spinner-ring {
  width: 16px;
  height: 16px;
  background: var(--orange-yellow-crayola);
  border-radius: 50%;
  animation: spinnerBounce 1.4s infinite ease-in-out;
}

.global-loader-spinner .spinner-ring:nth-child(2) {
  animation-delay: 0.2s;
}

.global-loader-spinner .spinner-ring:nth-child(3) {
  animation-delay: 0.4s;
}

.global-loader-text {
  color: var(--light-gray);
  font-size: var(--fs-4);
  font-weight: var(--fw-500);
  letter-spacing: 0.5px;
}

/* Element-specific loader */
.element-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: inherit;
  z-index: 100;
}

.element-loader-spinner {
  display: flex;
  gap: 6px;
}

.element-loader-spinner .spinner-ring {
  width: 10px;
  height: 10px;
  background: var(--orange-yellow-crayola);
  border-radius: 50%;
  animation: spinnerBounce 1.4s infinite ease-in-out;
}

.element-loader-text {
  color: var(--light-gray);
  font-size: var(--fs-7);
}

/* Image Loading States */
.image-skeleton {
  pointer-events: none;
}

.image-skeleton.fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.image-loaded {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.image-error {
  opacity: 0.3;
}

.image-error-placeholder {
  pointer-events: none;
}

.image-error-placeholder svg {
  opacity: 0.5;
}

.image-error-placeholder span {
  margin-top: 8px;
  font-size: var(--fs-8);
}

/* ===== END SKELETON LOADER STYLES ===== */

.sidebar-info {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
  text-align: center;
}

.avatar-box {
  background: var(--bg-gradient-onyx);
  border-radius: 20px;
  position: relative;
  transition: all 0.3s ease;
  animation: avatarPulse 3s ease-in-out infinite;
  width: 80px;
  height: 80px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Subtle pulse animation */
@keyframes avatarPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 219, 112, 0.4);
  }
  50% {
    box-shadow: 0 0 20px 5px rgba(255, 219, 112, 0.2);
  }
}

/* Hover effect with 3D tilt */
.avatar-box:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 10px 30px rgba(255, 219, 112, 0.3);
  animation: none; /* Stop pulse on hover */
}

.avatar-box picture {
  width: 100%;
  height: 100%;
  display: block;
}

.avatar-box img {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.avatar-box:hover img {
  transform: scale(1.05);
}

/* Status Badge */

/* Pulsing green dot */

@keyframes statusPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

.info-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.info-content .name {
  color: var(--white-2);
  font-size: var(--fs-3);
  font-weight: var(--fw-500);
  letter-spacing: -0.25px;
  margin-bottom: 10px;
}

.info-content .title {
  color: var(--white-1);
  background: var(--onyx);
  font-size: var(--fs-8);
  font-weight: var(--fw-300);
  width: max-content;
  padding: 3px 12px;
  border-radius: 8px;
  margin: 0 auto;
}

.info_more-btn {
  position: absolute;
  top: -15px;
  right: -15px;
  border-radius: 0 15px;
  font-size: 13px;
  color: var(--orange-yellow-crayola);
  background: var(--border-gradient-onyx);
  padding: 10px;
  box-shadow: var(--shadow-2);
  transition: var(--transition-1);
  z-index: 1;
}

.info_more-btn::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: var(--bg-gradient-jet);
  transition: var(--transition-1);
  z-index: -1;
}

.info_more-btn:hover,
.info_more-btn:focus { background: var(--bg-gradient-yellow-1); }

.info_more-btn:hover::before,
.info_more-btn:focus::before { background: var(--bg-gradient-yellow-2); }

.info_more-btn span { display: none; }

.sidebar-info_more {
  opacity: 1;
  visibility: visible;
  transition: var(--transition-2);
}

.sidebar.active .sidebar-info_more {
  opacity: 1;
  visibility: visible;
}

.contacts-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  justify-items: center;
}

.contact-item {
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.contact-info {
  max-width: calc(100% - 46px);
  width: calc(100% - 46px);
}

.contact-title {
  color: var(--light-gray-70);
  font-size: var(--fs-8);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.contact-info :is(.contact-link, time, address) {
  color: var(--white-2);
  font-size: var(--fs-7);
}

.contact-info address { font-style: normal; }

.social-list {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 15px;
  padding-bottom: 4px;
  padding-left: 7px;
  position: relative;
  z-index: 2;
}

.social-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
}

.social-item .social-link {
  color: var(--light-gray-70);
  font-size: 18px;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border-radius: 8px;
  background: rgba(255, 219, 112, 0.05);
}

.social-item .social-link:hover {
  color: var(--orange-yellow-crayola);
  transform: translateY(-3px) scale(1.1);
  background: rgba(255, 219, 112, 0.15);
  box-shadow: 0 5px 15px rgba(255, 219, 112, 0.3);
  animation: socialBounce 0.5s ease;
}

@keyframes socialBounce {
  0%, 100% { transform: translateY(-3px) scale(1.1); }
  50% { transform: translateY(-5px) scale(1.15); }
}

/* Tooltip Styles */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  transform: translateY(-5px);
  background: linear-gradient(145deg, #2c2c2c, #1a1a1a);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 219, 112, 0.3);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 10000;
}

[data-tooltip]::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 12px;
  transform: none;
  border: 6px solid transparent;
  border-top-color: #2c2c2c;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 10000;
}

[data-tooltip]:hover::before {
  opacity: 1;
  transform: translateY(0);
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: none;
}

/* Disable pseudo-element tooltips when portal is active */
body.has-tooltip-portal .sidebar [data-tooltip]::before,
body.has-tooltip-portal .sidebar [data-tooltip]::after {
  content: none !important;
}

.navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: hsla(240, 1%, 17%, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid var(--jet);
  border-radius: 12px 12px 0 0;
  box-shadow: var(--shadow-2);
  z-index: 5;
}

.navbar-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding: 0 10px;
}

.navbar-link {
  color: var(--light-gray);
  font-size: var(--fs-8);
  padding: 20px 7px;
  transition: color var(--transition-1);
  position: relative;
  overflow: hidden;
}

.navbar-link:hover,
.navbar-link:focus { color: var(--light-gray-70); }

.navbar-link.active { color: var(--orange-yellow-crayola); }

.navbar-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0%;
  height: 2px;
  background: var(--orange-yellow-crayola);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar-link:hover::after,
.navbar-link.active::after {
  width: 100%;
}

.about .article-title { margin-bottom: 15px; }

.service { margin-bottom: 35px; }

.service-title { margin-bottom: 20px; }

.service-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.service-item {
  position: relative;
  background: var(--border-gradient-onyx);
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  box-shadow: var(--elevation-1);
  z-index: 1;
  transition: all 0.3s ease;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  overflow: hidden;
}

.service-item::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
  z-index: -1;
  transition: background 0.3s ease;
}

.service-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), hsla(45, 100%, 72%, 0.08), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: -1;
}

.service-item:hover::after {
  opacity: 1;
}

.service-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--elevation-2);
}

.service-icon-box {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.service-icon {
  font-size: 2.5rem;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border-gradient-onyx);
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.service-item:hover .service-icon {
  transform: rotateY(360deg);
}

.service-content-box {
  flex: 1;
}

.service-item-title {
  margin-bottom: 7px;
  background: var(--text-gradient-yellow);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: var(--fw-500);
  font-size: var(--type-sm);
  line-height: var(--lh-tight);
}

.service-item-text {
  color: var(--light-gray);
  font-size: var(--type-xs);
  font-weight: var(--fw-300);
  line-height: var(--lh-relaxed);
}


.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: hsl(0, 0%, 5%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 1;
  transition: var(--transition-1);
}

.overlay.active {
  opacity: 0.8;
  visibility: visible;
  pointer-events: all;
}

.article-title { margin-bottom: 30px; }

/* Enhanced Timeline Section */
.timeline { margin-bottom: 30px; }

.timeline-list {
  font-size: var(--fs-6);
  margin-left: 45px;
}

.timeline-item { position: relative; }

.timeline-item:not(:last-child) { margin-bottom: 20px; }

.org-name {
  font-size: var(--type-xs);
  padding-top:-50vh ;
}

.timeline-list span {
  color: var(--vegas-gold);
  font-weight: var(--fw-400);
  line-height: 1.6;
}

.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: -25px;
  left: -30px;
  width: 1px;
  height: calc(100% + 50px);
  background: var(--jet);
}

.timeline-item::after {
  content: "";
  position: absolute;
  top: 5px;
  left: -33px;
  height: 6px;
  width: 6px;
  background: var(--text-gradient-yellow);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--jet);
}

.timeline-text {
  color: var(--light-gray);
  font-weight: var(--fw-300);
  font-size: var(--type-sm);
  line-height: var(--lh-relaxed);
}

/* New Enhanced Timeline Styles */
.timeline-section {
  margin-bottom: 50px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 35px;
  position: relative;
}

.section-icon {
  font-size: 2.5rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border-gradient-onyx);
  border-radius: 12px;
  position: relative;
  flex-shrink: 0;
}

.section-icon::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
  z-index: -1;
}

.section-title {
  background: var(--text-gradient-yellow);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: var(--fw-600);
}

.section-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, 
    var(--orange-yellow-crayola), 
    transparent);
  margin-left: 20px;
}

/* Timeline Container */
.timeline-container {
  position: relative;
  padding-left: 40px;
}

/* Timeline Item */
.timeline-container .timeline-item {
  position: relative;
  display: flex;
  gap: 25px;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateX(-30px);
  animation: slideInTimeline 0.6s ease-out forwards;
}

.timeline-container .timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-container .timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-container .timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-container .timeline-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInTimeline {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Timeline Marker */

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 3px var(--jet),
                0 0 20px var(--orange-yellow-crayola);
  }
  50% {
    box-shadow: 0 0 0 3px var(--jet),
                0 0 30px var(--orange-yellow-crayola);
  }
}

/* Timeline Content */
.timeline-content {
  flex: 1;
  background: var(--eerie-black-2);
  border: 1px solid var(--jet);
  border-radius: 16px;
  padding: 25px;
  position: relative;
  transition: all 0.3s ease;
}

.timeline-container .timeline-item:hover .timeline-content,
.timeline-item .timeline-content:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.35),
              0 8px 24px rgba(255, 215, 0, 0.18),
              0 0 16px rgba(255, 215, 0, 0.35);
  border-color: rgba(255, 215, 0, 0.4);
}

.timeline-item .timeline-content:focus-visible {
  outline: 2px solid #ffdb70;
  outline-offset: 4px;
}

.timeline-content > * {
  position: relative;
  z-index: 1;
}

.timeline-badge {
  display: inline-block;
  background: var(--text-gradient-yellow);
  color: var(--eerie-black-1);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: var(--fs-8);
  font-weight: var(--fw-600);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  animation: badgeGlow 2s ease-in-out infinite;
}

@keyframes badgeGlow {
  0%, 100% {
    box-shadow: 0 0 10px hsla(45, 100%, 72%, 0.3);
  }
  50% {
    box-shadow: 0 0 20px hsla(45, 100%, 72%, 0.6);
  }
}

.timeline-title {
  color: var(--white-2);
  margin-bottom: 8px;
  font-weight: var(--fw-600);
}

.company-name {
  color: var(--orange-yellow-crayola);
  font-size: var(--fs-3);
  font-weight: var(--fw-600);
  margin-bottom: 8px;
}

.timeline-period {
  display: inline-block;
  color: var(--light-gray-70);
  font-size: var(--fs-7);
  font-weight: var(--fw-500);
  margin-bottom: 12px;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0;
}

.timeline-tags .tag {
  background: hsla(45, 100%, 72%, 0.1);
  color: var(--orange-yellow-crayola);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: var(--fs-8);
  font-weight: var(--fw-500);
  border: 1px solid hsla(45, 100%, 72%, 0.2);
  transition: all 0.3s ease;
}

.timeline-tags .tag:hover {
  background: hsla(45, 100%, 72%, 0.2);
  transform: translateY(-2px);
}

.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 10px;
}

.project-item { display: none; }

.project-item.active {
  display: block;
  animation: scaleUp 0.25s ease forwards;
}

@keyframes scaleUp {
  0% { transform: scale(0.5); }
  100% { transform: scale(1); }
}

.project-item > a { width: 100%; outline: none; }
.project-item > a:focus-visible {
  outline: 2px solid #ffdb70;
  outline-offset: 4px;
  border-radius: 12px;
}

.project-img {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 15px;
}

.project-img::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1;
  transition: var(--transition-1);
}

.project-item > a:hover .project-img::before { background: hsla(0, 0%, 0%, 0.5); }
.project-item > a:focus-visible .project-img::before { background: hsla(0, 0%, 0%, 0.5); }

.project-item-icon-box {
  --scale: 0.8;

  background: var(--jet);
  color: var(--orange-yellow-crayola);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(var(--scale));
  font-size: 20px;
  padding: 18px;
  border-radius: 12px;
  opacity: 0;
  z-index: 1;
  transition: var(--transition-1);
}

.project-item > a:hover .project-item-icon-box,
.project-item > a:focus-visible .project-item-icon-box {
  --scale: 1;
  opacity: 1;
}

.project-item-icon-box ion-icon { --ionicon-stroke-width: 50px; }

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-2);
}

/* Ensure video previews in project cards match image styling */
.project-img video,
.project-card-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none; /* do not interfere with hover overlay and clicks */
}

.project-item > a:hover .project-img img,
.project-item > a:focus-visible .project-img img {
  transform: scale(1.1);
}

/* Match hover zoom effect for video previews */
.project-item > a:hover .project-img video,
.project-item > a:hover .project-card-video,
.project-item > a:focus-visible .project-img video,
.project-item > a:focus-visible .project-card-video {
  transform: scale(1.1);
  transition: transform var(--transition-2);
}

.project-title,
.project-category { margin-left: 10px; }

.project-title {
  color: var(--white-2);
  font-size: var(--type-sm);
  font-weight: var(--fw-400);
  text-transform: capitalize;
  line-height: var(--lh-tight);
  margin-bottom: var(--space-2);
}

.project-category {
  color: var(--light-gray-70);
  font-size: var(--type-xs);
  font-weight: var(--fw-300);
  line-height: var(--lh-base);
}

/* Enhanced Organizations Section */
.organization-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* Organization Card */
.organization-card {
  background: var(--eerie-black-2);
  border: 1px solid var(--color-border);
  box-shadow: var(--elevation-1);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(30px);
  animation: slideUpCard 0.6s ease-out forwards;
}

.organization-card:nth-child(1) { animation-delay: 0.1s; }
.organization-card:nth-child(2) { animation-delay: 0.2s; }
.organization-card:nth-child(3) { animation-delay: 0.3s; }
.organization-card:nth-child(4) { animation-delay: 0.4s; }
.organization-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideUpCard {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.organization-card:hover {
  transform: translateY(-8px);
  border-color: var(--color-border);
  box-shadow: var(--elevation-2);
}

/* Card Header */
.org-card-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 25px;
  background: linear-gradient(135deg, 
    hsla(45, 100%, 72%, 0.05) 0%, 
    transparent 100%);
  border-bottom: 1px solid var(--jet);
  position: relative;
}

.org-card-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 25px;
  right: 25px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    var(--orange-yellow-crayola),
    transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.organization-card:hover .org-card-header::after {
  opacity: 1;
}

/* Organization Logo */
.org-logo {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-gradient-jet);
  border: 2px solid var(--jet);
  padding: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.org-logo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    hsla(45, 100%, 72%, 0.1),
    transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.organization-card:hover .org-logo {
  border-color: var(--orange-yellow-crayola);
  transform: scale(1.05);
}

.organization-card:hover .org-logo::before {
  opacity: 1;
}

.org-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* Header Content */
.org-header-content {
  flex: 1;
  min-width: 0;
}

.org-name {
  color: var(--white-2);
  font-size: var(--type-base);
  font-weight: var(--fw-600);
  margin-bottom: 8px;
  line-height: var(--lh-tight);
  transition: color 0.3s ease;
}

.organization-card:hover .org-name {
  color: var(--orange-yellow-crayola);
}

.org-badge {
  display: inline-block;
  background: hsla(45, 100%, 72%, 0.1);
  color: var(--orange-yellow-crayola);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: var(--fs-8);
  font-weight: var(--fw-500);
  border: 1px solid hsla(45, 100%, 72%, 0.2);
  letter-spacing: 0.5px;
}

/* Card Body */
.org-card-body {
  padding: 25px;
}

.org-desc {
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  line-height: 1.8;
  text-align: justify;
  margin-bottom: 20px;
}

/* Organization Actions */

/* Media query for larger screens */
@media (max-width: 767px) {
  .organization-container {
    padding: 8px;
  }

  /* Organization title and description */
}

/* Extra small devices - organizations */
@media (max-width: 479px) {
  .organization-container {
    padding: 6px;
  }
}


@media (min-width: 580px) {

  :root {

    --fs-1: 32px;
    --fs-2: 24px;
    --fs-3: 26px;
    --fs-4: 18px;
    --fs-6: 15px;
    --fs-7: 15px;
    --fs-8: 12px;

  }

  .sidebar, article {
    width: 520px;
    margin-inline: auto;
    padding: 30px;
  }

  .article-title {
    font-weight: var(--fw-600);
    padding-bottom: 15px;
  }

  .article-title::after {
    width: 40px;
    height: 5px;
  }

  .icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 18px;
  }

  main {
    margin-top: 60px;
    margin-bottom: 100px;
  }

  .sidebar {
    max-height: none;
    margin-bottom: 30px;
  }

  .sidebar.active { max-height: none; }

  .sidebar-info { 
    gap: 25px;
    flex-direction: column;
    align-items: center;
  }

  .avatar-box { 
    border-radius: 30px;
    width: 120px;
    height: 120px;
  }

  .avatar-box img { 
    width: 100%;
    height: 100%;
  }

  .info-content .name { margin-bottom: 15px; }

  .info-content .title { padding: 5px 18px; }

  .info_more-btn {
    top: -30px;
    right: -30px;
    padding: 10px 15px;
  }

  .info_more-btn span {
    display: block;
    font-size: var(--fs-8);
  }

  .info_more-btn ion-icon { display: none; }

  .separator { margin: 32px 0; }

  .contacts-list { gap: 20px; }

  .contact-info {
    max-width: calc(100% - 64px);
    width: calc(100% - 64px);
  }

  .navbar { border-radius: 20px 20px 0 0; }

  .navbar-list { gap: 20px; }

  .navbar-link { --fs-8: 14px; }

  .about .article-title { margin-bottom: 20px; }

  .timeline-list { margin-left: 65px; }

  .timeline-item:not(:last-child)::before { left: -40px; }

  .timeline-item::after {
    height: 8px;
    width: 8px;
    left: -43px;
  }

  .project-img  { border-radius: 16px; }

}


@media (min-width: 768px) {

  .sidebar, article { width: 700px; }

  .contacts-list {
    grid-template-columns: 1fr 1fr;
    gap: 30px 15px;
  }



  .navbar-link { --fs-8: 15px; }

  .article-title { padding-bottom: 20px; }

  .project-list { grid-template-columns: 1fr 1fr; }
  
}


@media (min-width: 1024px) {

  /**
   * CUSTOM PROPERTY
   */

  :root {

    /**
    * shadow
    */

    --shadow-1: -4px 8px 24px hsla(0, 0%, 0%, 0.125);
    --shadow-2: 0 16px 30px hsla(0, 0%, 0%, 0.125);
    --shadow-3: 0 16px 40px hsla(0, 0%, 0%, 0.125);

  }

  .sidebar, article {
    width: 950px;
    box-shadow: var(--shadow-5);
  }




  main { margin-bottom: 60px; }

  .main-content {
    position: relative;
    width: max-content;
    margin: auto;
  }

  .navbar {
    position: absolute;
    bottom: auto;
    top: 0;
    left: auto;
    right: 0;
    width: max-content;
    border-radius: 0 20px;
    padding: 0 20px;
    box-shadow: none;
  }

  .navbar-list {
    gap: 30px;
    padding: 0 20px;
  }

  .navbar-link { font-weight: var(--fw-500); }


  .service-list {
    grid-template-columns: 1fr 1fr;
    gap: 20px 25px;
  }

  .project-list { grid-template-columns: repeat(3, 1fr); }


}

@media (min-width: 1250px) {

  body::-webkit-scrollbar { width: 20px; }

  body::-webkit-scrollbar-track { background: var(--smoky-black); }

  body::-webkit-scrollbar-thumb {
    border: 5px solid var(--smoky-black);
    background: hsla(0, 0%, 100%, 0.1);
    border-radius: 20px;
    box-shadow: inset 1px 1px 0 hsla(0, 0%, 100%, 0.11),
                inset -1px -1px 0 hsla(0, 0%, 100%, 0.11);
  }

  body::-webkit-scrollbar-thumb:hover { background: hsla(0, 0%, 100%, 0.15); }

  body::-webkit-scrollbar-button { height: 60px; }

  .sidebar, article { width: auto; }

  article { min-height: 100%; }


  main {
    max-width: 1200px;
    margin-inline: auto;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 25px;
  }

  .main-content {
    min-width: 75%;
    width: 75%;
    margin: 0;
  }

  .sidebar {
    position: sticky;
    top: 60px;
    max-height: max-content;
    height: 100%;
    margin-bottom: 0;
    padding-top: 60px;
    z-index: 1;
  }

  .sidebar-info { 
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .avatar-box { 
    width: 150px;
    height: 150px;
  }

  .avatar-box img { 
    width: 100%;
    height: 100%;
  }

  .info-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .info-content .name {
    white-space: nowrap;
    text-align: center;
  }

  .info-content .title { 
    margin: auto;
  }

  .info_more-btn { display: none; }

  .sidebar-info_more {
    opacity: 1;
    visibility: visible;
  }

.contacts-list {
  display: grid;
  grid-template-columns: 1fr;
}

.contact-info .contact-link {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-info .contact-link,
.contact-info time,
.contact-info address {
  font-size: var(--fs-7, 14px); /* Sets default to 14px if --fs-7 is undefined */
  font-weight: var(--fw-300, 300); /* Sets default to 300 if --fw-300 is undefined */
}

.separator:last-of-type {
  margin: 15px 0;
  opacity: 0;
}

.social-list {
  display: flex;
  justify-content: center;
}

.timeline-text {
  max-width: 700px;
}
}

/* NEW ANIMATIONS & UI/UX UPDATES */

/* Smooth slide & fade in animation */
@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* A pulse effect for interactive elements */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Apply slide & fade to articles when activated */
article.active {
  display: block;
  animation: slideFadeIn 0.6s ease-out;
}

/* Add an animated underline effect to navigation links */
.navbar-link {
  position: relative;
  overflow: hidden;
}

.navbar-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0%;
  height: 2px;
  background: var(--orange-yellow-crayola);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar-link:hover::after,
.navbar-link.active::after {
  width: 100%;
}

/* Enhanced Chatbot Features */
.chatbot-btn {
  animation: pulse 2s infinite;
}

.chatbot-btn:hover {
  animation: pulse 0.8s ease-in-out;
  transform: scale(1.1);
}

@keyframes pulse {
  0% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
  50% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 10px rgba(0, 123, 255, 0.1); }
  100% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
}

/* Smart Suggestions */

/* Enhanced suggestion container for better visibility */

/* Make suggestions more prominent in dark theme */

/* Enhanced Typing Indicator */
.typing-indicator {
  opacity: 0.8;
}

@keyframes typing {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* Enhanced Message Formatting */

/* Sidebar toggle transition update */
.sidebar {
  transition: max-height 0.5s ease, opacity 0.5s ease;
}

.sidebar.active {
  opacity: 1;
}

/* Filter select dropdown now uses a slideFadeIn effect */

/* Timeline items get a gentle hover lift & shadow */
.timeline-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover,
.timeline-item:focus-within {
  transform: translateX(5px);
  box-shadow: none;
}

/* Organization buttons lift on hover */

/* Global transition for smoother interactions */
* {
  transition: all 0.25s ease;
}

/* FAQ answer expand/collapse animation */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease;
}

.faq-answer.show {
  max-height: 200px; /* Adjust as needed */
  opacity: 1;
}

/* ===== Additional Animation & UI/UX Improvements ===== */

/* Fade in up for reveal animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.reveal {
  opacity: 0;
  transform: translateY(20px);
}
.reveal.animate {
  animation: fadeInUp 0.6s ease forwards;
}

/* Zoom effect for project items on hover */
.project-item {
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: var(--elevation-0);
  transition: transform 0.3s ease, box-shadow var(--duration-2) var(--ease-standard);
}
.project-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--elevation-1);
}

/* Back-to-top button styles */
.back-to-top {
  position: fixed;
  bottom: 90px;
  right: 37px;
  background: var(--orange-yellow-crayola);
  color: var(--smoky-black);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  transition: all 0.4s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(-10px);
}
.back-to-top:hover {
  transform: translateY(-15px);
}

/* Mobile-specific tweaks */
@media (max-width: 767px) {
  /* Center the RESUME link within the sidebar contacts */
  .contacts-list .resume {
    display: block;
    width: 100%;
    margin: 0 auto;
    text-align: center;
  }

  /* Hide back-to-top on mobile to avoid overlapping chatbot */
  .back-to-top { display: none !important; }
}

/* Enhanced sliding animation for FAQ answers */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.4s ease;
  opacity: 0;
  padding: 0 10px;
}
.faq-answer.show {
  max-height: 200px; /* Adjust as needed */
  opacity: 1;
  padding: 10px;
}

/* Bounce effect for avatar image on page load */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}

.avatar-box img {
  animation: bounce 2s;
}

/* Project Modal Styles (Dark Mode with Animation) */
/* ============================================
   PROJECT MODAL STYLES - Vertical Layout
   Images on top (70%), Info at bottom (30%)
   ============================================ */

.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1001;
  padding: 20px;
  overflow: hidden;
}

.project-modal-wrapper {
  background: linear-gradient(180deg, #1e1e1e 0%, #1a1a1a 100%);
  border-radius: 12px;
  max-width: 900px;
  width: 95%;
  max-height: 95vh;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 219, 112, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: projectModalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 215, 0, 0.35) rgba(255, 255, 255, 0.03);
}

.project-modal-wrapper::-webkit-scrollbar {
  width: 10px;
}

.project-modal-wrapper::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  margin: 8px 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-modal-wrapper::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.35), rgba(255, 215, 0, 0.25));
  border-radius: 12px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.project-modal-wrapper::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.55), rgba(255, 215, 0, 0.4));
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.35), inset 0 1px 3px rgba(255, 255, 255, 0.25);
  transform: scaleY(1.05);
}

.project-modal-wrapper::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.65), rgba(255, 215, 0, 0.5));
  box-shadow: 0 2px 6px rgba(255, 215, 0, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes projectModalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.project-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
  background: rgba(26, 26, 26, 0.9);
  border: 1px solid rgba(255, 219, 112, 0.4);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  line-height: 1;
  font-size: 28px;
  cursor: pointer;
  color: #ffdb70;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.project-modal-close:hover {
  transform: rotate(90deg) scale(1.1);
  background: rgba(255, 219, 112, 0.2);
  border-color: #ffdb70;
}

/* ============================================
   IMAGE GALLERY SECTION (TOP 70%)
   ============================================ */

.project-gallery-slider {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.project-gallery-image-container {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
  padding: 20px 100px; /* extra horizontal space so buttons don’t overlap media */
  position: relative;
  box-sizing: border-box;
}

.project-gallery-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  object-fit: contain;
  transition: transform 0.3s ease, opacity 0.15s ease;
}

.project-gallery-image:hover {
  transform: scale(1.02);
}

/* Video element styles for project modal */
.project-gallery-video {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  object-fit: contain;
  background: #000;
}

.project-gallery-counter {
  position: static;
  margin-top: 12px;
  background: rgba(26, 26, 26, 0.9);
  color: #ffdb70;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(255, 219, 112, 0.3);
  backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
  white-space: nowrap;
}

.project-gallery-prev,
.project-gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(180deg, rgba(26, 26, 26, 0.85), rgba(26, 26, 26, 0.6));
  border: 1px solid rgba(255, 219, 112, 0.35);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ffdb70;
  font-size: 1.6rem;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  z-index: 10;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.project-gallery-prev span,
.project-gallery-next span {
  line-height: 1;
  display: block;
}

.project-gallery-prev:focus-visible,
.project-gallery-next:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 219, 112, 0.5), 0 6px 18px rgba(0, 0, 0, 0.4);
}

.project-gallery-prev {
  left: 16px;
}

.project-gallery-next {
  right: 16px;
}

.project-gallery-prev:hover,
.project-gallery-next:hover {
  background: rgba(255, 219, 112, 0.16);
  border-color: #ffdb70;
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 6px 22px rgba(255, 219, 112, 0.18), 0 8px 20px rgba(0, 0, 0, 0.4);
}

.project-gallery-prev:active,
.project-gallery-next:active {
  transform: translateY(-50%) scale(0.96);
}

/* ============================================
   PROJECT INFO SECTION (BOTTOM 30%)
   ============================================ */

.project-modal-info {
  flex: 0 0 30%;
  padding: 25px 30px;
  background: #1a1a1a;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Custom scrollbar for info section */
.project-modal-info::-webkit-scrollbar {
  width: 8px;
}

.project-modal-info::-webkit-scrollbar-track {
  background: rgba(255, 219, 112, 0.05);
  border-radius: 10px;
}

.project-modal-info::-webkit-scrollbar-thumb {
  background: rgba(255, 219, 112, 0.3);
  border-radius: 10px;
  transition: background 0.3s ease;
}

.project-modal-info::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 219, 112, 0.5);
}

.project-info-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffdb70;
  margin: 0;
  line-height: 1.3;
}

.project-info-description {
  font-size: 1rem;
  color: #e0e0e0;
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
}

/* Rich description styling for enhanced formatting */
.project-info-description.rich {
  white-space: normal;
}
.project-info-description.rich h4,
.project-info-description.rich h5 {
  margin: 8px 0 6px;
  font-weight: 700;
  color: #ffdb70;
}
.project-info-description.rich h4 { font-size: 1.1rem; }
.project-info-description.rich h5 { font-size: 1rem; color: #ffd35a; }

.project-info-description.rich ol,
.project-info-description.rich ul {
  margin: 6px 0 8px 18px;
}
.project-info-description.rich li { margin: 4px 0; }

.project-info-description.rich .desc-divider {
  border: 0;
  border-top: 1px solid rgba(255, 219, 112, 0.25);
  margin: 10px 0;
}
.project-info-description.rich .desc-section { margin-bottom: 6px; }

.project-info-description.rich code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0 6px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.project-info-description.rich em {
  color: #c8e6ff;
  font-style: normal;
}

.project-info-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 219, 112, 0.2);
  border-bottom: 1px solid rgba(255, 219, 112, 0.2);
}

.tech-label {
  font-weight: 600;
  color: #ffdb70;
  font-size: var(--type-sm);
}

.tech-stack {
  color: #b0b0b0;
  font-size: var(--type-sm);
  display: block;
  width: 100%;
}

.tech-stack .section-title {
  display: block;
  margin: 8px 0 6px;
  color: #ffdb70;
  font-weight: 600;
}

.tech-stack .tech-table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 10px;
}

.tech-stack .tech-table th,
.tech-stack .tech-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 219, 112, 0.15);
  color: #e0e0e0;
  text-align: left;
  font-size: var(--type-xs);
}

.tech-stack .tech-table th {
  color: #ffdb70;
  font-weight: 600;
}

.project-info-links {
  display: flex;
  gap: 15px;
  margin-top: 5px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #ffdb70;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 20px;
  border: 2px solid rgba(255, 219, 112, 0.4);
  border-radius: 8px;
  background: rgba(255, 219, 112, 0.05);
  transition: all 0.3s ease;
}

.project-link:hover {
  background: #ffdb70;
  color: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 219, 112, 0.3);
}

.project-link:active {
  transform: translateY(0);
}

.link-icon {
  font-size: 1.1rem;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
  .project-modal-wrapper {
    max-height: 90vh;
    width: 98%;
  }

  .project-modal-info {
    flex: 0 0 40%;
    padding: 20px;
  }

  .project-info-title {
    font-size: 1.5rem;
  }

  .project-gallery-image-container {
    padding: 15px 50px;
  }

  .project-gallery-prev,
  .project-gallery-next {
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
    border-radius: 10px;
  }

  .project-gallery-prev {
    left: 10px;
  }

  .project-gallery-next {
    right: 10px;
  }

  .project-info-links {
    flex-direction: column;
    gap: 10px;
  }

  .project-link {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .project-modal {
    padding: 10px;
  }

  .project-modal-wrapper {
    border-radius: 8px;
  }

  .project-modal-info {
    flex: 0 0 45%;
    padding: 15px;
    gap: 12px;
  }

  .project-info-title {
    font-size: 1.3rem;
  }

  .project-info-description {
    font-size: 0.9rem;
  }

  .project-gallery-image-container {
    padding: 10px 40px;
  }

  .project-gallery-prev,
  .project-gallery-next {
    width: 35px;
    height: 35px;
    font-size: 1.3rem;
    border-radius: 10px;
  }

  .project-modal-close {
    width: 35px;
    height: 35px;
    font-size: 24px;
  }
}

/* Achievement Modal Styles — polished, responsive, glassmorphism */
.achievement-modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  display: none; /* toggled via .active */
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1002;
}

.achievement-modal.active { display: flex; }

.achievement-modal-content {
  position: relative;
  width: min(1100px, 92vw);
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  padding: 18px 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02))
    , rgba(18, 18, 20, 0.7);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: modalPopIn 420ms ease both;
}

.achievement-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--orange-yellow-crayola);
  border: 1px solid rgba(255, 215, 0, 0.25);
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.08), rgba(255, 215, 0, 0.02));
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.achievement-modal-close:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 8px 22px rgba(255, 215, 0, 0.12);
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.12), rgba(255, 215, 0, 0.04));
}

.achievement-modal-body {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  padding: 6px 6px 0;
  overflow: hidden;
}

.achievement-media {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 12px;
  min-height: 0; /* allow child to shrink in grid */
}

.achievement-slider {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  max-height: min(58vh, 620px);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.achievement-slide-image {
  width: 100%;
  height: auto;
  max-height: min(58vh, 620px);
  object-fit: contain;
  display: block;
  transition: opacity 320ms ease, transform 320ms ease;
  opacity: 1;
}

.achievement-slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.achievement-slider-prev,
.achievement-slider-next {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  color: var(--orange-yellow-crayola);
  background: linear-gradient(180deg, rgba(255,215,0,0.1), rgba(255,215,0,0.03));
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.achievement-slider-prev:hover,
.achievement-slider-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.14);
}

.achievement-info {
  padding: 12px 10px 6px 8px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.achievement-title-modal {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  background: var(--text-gradient-yellow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
  position: relative;
  padding-bottom: 16px;
}

.achievement-title-modal::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--text-gradient-yellow);
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* Enhanced Modal Scrollbar */
.achievement-modal-content::-webkit-scrollbar {
  width: 10px;
}

.achievement-modal-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  margin: 8px 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.achievement-modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, 
    rgba(255, 215, 0, 0.35), 
    rgba(255, 215, 0, 0.25)
  );
  border-radius: 12px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  box-shadow: 
    0 2px 8px rgba(255, 215, 0, 0.2),
    inset 0 1px 2px rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.achievement-modal-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, 
    rgba(255, 215, 0, 0.55), 
    rgba(255, 215, 0, 0.4)
  );
  box-shadow: 
    0 4px 12px rgba(255, 215, 0, 0.35),
    inset 0 1px 3px rgba(255, 255, 255, 0.25);
  transform: scaleY(1.05);
}

.achievement-modal-content::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, 
    rgba(255, 215, 0, 0.65), 
    rgba(255, 215, 0, 0.5)
  );
  box-shadow: 
    0 2px 6px rgba(255, 215, 0, 0.4),
    inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Firefox scrollbar styling */
.achievement-modal-content {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 215, 0, 0.35) rgba(255, 255, 255, 0.03);
}

.achievement-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
  padding: 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.04), rgba(255, 215, 0, 0.01));
  border: 1px solid rgba(255, 215, 0, 0.12);
}

.achievement-organizer {
  color: var(--white-2);
  opacity: 0.88;
  font-size: 0.95rem;
  line-height: 1.5;
  padding-left: 28px;
  position: relative;
}

.achievement-organizer::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.1rem;
}

.achievement-date-location {
  color: var(--orange-yellow-crayola);
  opacity: 0.95;
  font-size: 0.95rem;
  font-weight: 500;
  padding-left: 28px;
  position: relative;
  letter-spacing: 0.01em;
}

.achievement-date-location::before {
  content: '📍';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.1rem;
}

/* Teammates Section Styling */
.achievement-teammates {
  margin-top: 8px;
  padding: 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(255, 215, 0, 0.02));
  border: 1px solid rgba(255, 215, 0, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.teammates-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--orange-yellow-crayola);
  margin: 0 0 14px 0;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.teammates-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.teammate-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s ease;
}

.teammate-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 215, 0, 0.2);
  transform: translateX(4px);
}

.teammate-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--text-gradient-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--smoky-black);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.25);
}

.teammate-info {
  flex: 1;
}

.teammate-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--white-2);
  margin: 0 0 4px 0;
  line-height: 1.2;
}

.teammate-role {
  font-size: 0.85rem;
  color: var(--light-gray);
  opacity: 0.8;
  margin: 0;
  line-height: 1.2;
}

/* GitHub Button Styles */
.achievement-media .achievement-github {
  margin-top: 15px;
  padding: 0;
}

/* Space when multiple action buttons are present */
.achievement-github .github-button + .github-button {
  margin-top: 12px;
}

.github-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #24292e 0%, #1a1e22 100%);
  color: #ffffff;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  width: 100%;
  justify-content: center;
}

.github-button:hover {
  background: linear-gradient(135deg, #2c3136 0%, #24292e 100%);
  border-color: rgba(255, 215, 0, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.github-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.github-button ion-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.github-button span {
  display: block;
  letter-spacing: 0.02em;
}

/* Related project button styles */
.related-project-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: var(--orange-yellow-crayola);
  background: transparent;
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  align-self: flex-start;
}

.related-project-button:hover {
  background: linear-gradient(180deg, rgba(255,215,0,0.08), rgba(255,215,0,0.03));
  box-shadow: 0 6px 18px rgba(255, 215, 0, 0.12);
}

/* Mobile responsive */
@media (max-width: 600px) {
  .achievement-media .achievement-github {
    margin-top: 12px;
  }
  
  .github-button {
    padding: 12px 20px;
    font-size: 0.95rem;
  }
  
  .github-button ion-icon {
    font-size: 1.3rem;
  }
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .achievement-modal-body { grid-template-columns: 1fr; }
  .achievement-slider { height: min(40vh, 420px); }
  
  .teammate-item {
    padding: 10px;
  }
  
  .teammate-avatar {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .achievement-modal-content { animation: none; }
  .achievement-slide-image { transition: opacity 160ms ease; }
}

/* Service Section */
.service {
  margin-bottom: 35px;
}

.service-title {
  margin-bottom: 20px;
}

.service-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.service-item {
  position: relative;
  background: var(--border-gradient-onyx);
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  box-shadow: var(--elevation-1);
  z-index: 1;
  transition: all 0.3s ease;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  overflow: hidden;
}

.service-item::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
  z-index: -1;
  transition: background 0.3s ease;
}

.service-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), hsla(45, 100%, 72%, 0.08), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: -1;
}

.service-item:hover::after {
  opacity: 1;
}

.service-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--elevation-2);
}

.service-icon-box {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.service-icon {
  font-size: 2.5rem;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border-gradient-onyx);
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.service-item:hover .service-icon {
  transform: rotateY(360deg);
}

.service-content-box {
  flex: 1;
}

.service-item-title {
  margin-bottom: 7px;
  background: var(--text-gradient-yellow);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: var(--fw-500);
  font-size: var(--type-sm);
  line-height: var(--lh-tight);
}

.service-item-text {
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  line-height: 1.6;
}

/* Skills Section */
.skills {
  margin-bottom: 35px;
}

.skill-progress-fill {
  background: var(--text-gradient-yellow);
  height: 100%;
  border-radius: inherit;
  position: relative;
  animation: skillProgress 1.5s ease-out forwards;
  transform-origin: left;
}

.skill-progress-fill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes skillProgress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Achievements Section Styles */
.achievements {
  margin-bottom: 30px;
}

.achievements-title {
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 7px;
}

.achievements-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 3px;
  background: var(--text-gradient-yellow);
  border-radius: 3px;
}

/* Awards Timeline Accordion */
.awards-timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.year-group {
  background: var(--border-gradient-onyx);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.year-group::before {
  content: "";
   position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
  z-index: 0;
}

.year-header {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 25px;
  background: linear-gradient(135deg, 
    hsla(45, 100%, 72%, 0.1), 
    hsla(35, 100%, 68%, 0.05));
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--white-2);
}

.year-header:hover {
  background: linear-gradient(135deg, 
    hsla(45, 100%, 72%, 0.15), 
    hsla(35, 100%, 68%, 0.08));
}

.year-header.active {
  background: linear-gradient(135deg, 
    hsla(45, 100%, 72%, 0.2), 
    hsla(35, 100%, 68%, 0.1));
}

.year-title {
  font-size: var(--fs-1);
  font-weight: var(--fw-600);
  background: var(--text-gradient-yellow);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.award-count {
  font-size: var(--fs-6);
  color: var(--light-gray);
  padding: 5px 15px;
  background: hsla(0, 0%, 22%, 0.5);
  border-radius: 20px;
  margin-left: auto;
  margin-right: 15px;
}

.toggle-icon {
  font-size: var(--fs-4);
  color: var(--orange-yellow-crayola);
  transition: transform 0.3s ease;
  display: inline-block;
}

.year-header.active .toggle-icon {
  transform: rotate(180deg);
}

.year-content {
  position: relative;
  z-index: 1;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
              padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 25px;
}

.year-content.active {
  max-height: 5000px;
  padding: 25px;
}

.achievements-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  list-style: none;
  padding: 0;
}

.achievement-card.visible {
  opacity: 1;
  transform: translateY(0) rotateX(0);
}

.achievement-card {
  background: linear-gradient(145deg, var(--eerie-black-2), var(--eerie-black-1));
  border: 1px solid var(--color-border);
  box-shadow: var(--elevation-1);
  border-radius: 20px;
  padding: 30px 25px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(50px) rotateX(-10deg);
  animation: awardEntrance 0.8s ease-out forwards;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.achievement-card:nth-child(1) { animation-delay: 0.1s; }
.achievement-card:nth-child(2) { animation-delay: 0.3s; }
.achievement-card:nth-child(3) { animation-delay: 0.5s; }

/* Glowing border effect */
.achievement-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(145deg, 
    hsla(45, 100%, 72%, 0.1), 
    hsla(35, 100%, 68%, 0.05));
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
}

.achievement-card:hover::before {
  opacity: 1;
}

/* Inner glow */
.achievement-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
    hsla(45, 100%, 72%, 0.15), 
    transparent 60%
  );
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.achievement-card:hover::after {
  opacity: 1;
}

.achievement-card:hover {
  transform: translateY(-10px) scale(1.03) rotateX(0deg);
  box-shadow: var(--elevation-2), 0 0 0 1px var(--color-accent-weak);
}

/* Award Badge */
.award-badge {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--orange-yellow-crayola), hsl(35, 100%, 68%));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  box-shadow: 
    0 10px 30px hsla(45, 100%, 72%, 0.4),
    inset 0 -2px 10px rgba(0,0,0,0.3);
  animation: badgePulse 2s ease-in-out infinite;
  z-index: 2;
  border: 3px solid var(--eerie-black-2);
}

/* Award Ribbon */
.award-ribbon {
  position: absolute;
  top: 15px;
  left: -10px;
  background: linear-gradient(90deg, var(--orange-yellow-crayola), hsl(35, 100%, 68%));
  color: var(--eerie-black-1);
  padding: 5px 20px 5px 15px;
  font-size: var(--fs-8);
  font-weight: var(--fw-600);
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  clip-path: polygon(0 0, 100% 0, 90% 50%, 100% 100%, 0 100%);
  z-index: 1;
}

.achievement-card .card-content {
  transform: translateZ(20px);
  margin-top: 20px;
}

.achievement-card .card-title {
  color: var(--white-2);
  font-size: var(--fs-4);
  margin-bottom: 10px;
  line-height: 1.4;
  background: var(--text-gradient-yellow);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: var(--fw-600);
}

.achievement-card .card-subtitle {
  color: var(--light-gray-70);
  font-size: var(--fs-6);
  margin-bottom: 12px;
  font-style: italic;
}

.achievement-card .card-date,
.achievement-card .card-location {
  color: var(--light-gray);
  font-size: var(--fs-7);
  font-weight: var(--fw-400);
  margin: 5px 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Animations */
@keyframes awardEntrance {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 10px 30px hsla(45, 100%, 72%, 0.4),
                inset 0 -2px 10px rgba(0,0,0,0.3);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 15px 40px hsla(45, 100%, 72%, 0.6),
                inset 0 -2px 10px rgba(0,0,0,0.3);
  }
}

/* Optional scrollbar styling similar to your "has-scrollbar" class */

.achievement-item {
  background: #2c2c2c;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  width: 400px;      /* Fixed width */
  min-width: 600px;  /* Fixed minimum width */
  height: auto;      /* Allow card content to be fully visible */
  overflow: visible; /* Show full content */
  box-sizing: border-box;
  width: auto !important; min-width: 0 !important; /* Let width adapt to content */
  flex: 0 0 auto; /* New line: prevent the panel from shrinking */
}

.achievement-item:hover,
.achievement-item:focus,
.achievement-item:active {
  transform: scale(1.05);
  box-shadow: 0px 4px 15px rgba(255, 215, 0, 0.5);
  border-color: var(--orange-yellow-crayola);
  outline: none;
}

.achievement-item h4 {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.1rem;
  color: #fff;         /* Default color: white */
  text-align: center;  /* Center the title inside the panel */
  padding: 0 1em;
}

.achievement-item:hover h4 {
  color: #FFD700;      /* On hover: gold */
}

.achievement-item p {
  font-family: inherit;
  font-size: 0.9rem;
  color: inherit;
  margin: 0;
  overflow: visible;
  text-overflow: clip;
  display: block;
  line-clamp: unset;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
}

/* Updated Achievement Modal (Bigger Horizontal Layout) */
.achievement-modal {
  display: none; /* Hidden by default, shown via JS */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.achievement-modal.active {
  display: flex;
  opacity: 1;
}

.achievement-modal-content {
  background: #1a1a1a;
  color: #fff;
  border-radius: 8px;
  max-width: 1200px;  /* Increased modal size for clearer image display */
  width: 95%;
  padding: 40px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.achievement-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 2rem;
  cursor: pointer;
  color: #ffdb70;
  z-index: 5; /* Ensure the close button is on top */
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Use centered pseudo-elements for a perfectly centered X */
.achievement-modal-close::before,
.achievement-modal-close::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  background-color: #ffdb70;
  top: 50%;
  left: 50%;
  transform-origin: center;
  border-radius: 1px;
}

.achievement-modal-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.achievement-modal-close::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* Hide the text glyph to prevent visual offset differences across fonts */
.achievement-modal-close span { display: none; }

.achievement-modal-close:hover {
  transform: scale(1.1);
}

.achievement-modal-body {
  display: flex;
  flex-direction: row; /* Side-by-side columns */
  gap: 20px;
  margin-top: 20px;
}

/* Left column: Media (Image and slider controls) */
.achievement-media {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.achievement-slider {
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
}

.achievement-slide-image {
  width: 100%;
  height: auto;
  max-height: min(58vh, 620px);
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

.achievement-slider-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.achievement-slider-prev,
.achievement-slider-next {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #ffdb70;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Right column: Text Information */
.achievement-info {
  flex: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.achievement-info h3 {
  margin-top: 0;
}

.achievement-info p {
  margin: 10px 0;
}

.achievement-details p {
  margin: 5px 0;
  font-size: 0.95rem;
  color: #ccc;
}

/* When viewport width is less than 960px, switch to a single column */

/* Tablets and medium screens */

/* Small mobile devices */
@media (max-width: 580px) {

  .achievement-card {
    padding: 12px;
    border-radius: 12px;
  }

  .card-content {
    padding: 8px 0;
  }
}

/* Extra small screens - prevent overflow */
@media (max-width: 479px) {

  .achievement-card {
    padding: 10px;
    min-height: auto;
  }

  /* Ensure cards don't overflow */
  .achievements-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .achievement-card .card-content {
    padding: 6px 0;
  }

  .achievement-card .h4 {
    font-size: 13px;
    line-height: 1.3;
  }
}

/* Responsive adjustments for the Achievements Modal */
@media (max-width: 600px) {
  /* Ensure modal content fits within smaller screens */
  .achievement-modal-content {
    max-width: 100%;
    width: 95%;
    padding: 15px;
    margin: 0 10px;
    flex-direction: column;
    max-height: 98vh;
    height: auto;
  }

  /* Force vertical stacking and isolate columns to avoid overlap */
  .achievement-modal-body {
    display: grid !important;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 16px;
    overflow-y: auto;
  }

  /* Make sure the media section spans the full width and doesn't overflow */
  .achievement-media {
    width: 100%;
    min-height: 200px;
    position: relative;
    z-index: auto;
    overflow: hidden;
  }

  /* Responsive image sizing: adapt based on aspect ratio without spilling */
  .achievement-slider {
    height: auto;
    max-height: 55vh;
    overflow: hidden;
  }
  .achievement-slide-image {
    width: 100%;
    height: auto;
    max-height: 55vh;
    border-radius: 14px;
  }
  .achievement-slide-image.fit-contain { object-fit: contain; height: auto; max-height: 55vh; }
  .achievement-slide-image.fit-cover { object-fit: cover; height: 100%; max-height: 100%; }

  /* Action buttons section: ensure it sits below the image cleanly */
  .achievement-media .achievement-github {
    position: relative;
    z-index: 0;
    margin-top: 12px;
  }
  .github-button { display: inline-flex; width: 100%; }

  /* Adjust the info section for better readability */
  .achievement-info {
    width: 100%;
    padding: 10px;
    position: relative;
    z-index: 0;
  }

  .achievement-info h3 {
    font-size: 16px;
    line-height: 1.4;
  }

  .achievement-info p {
    font-size: 13px;
    line-height: 1.5;
  }

  .achievement-details p {
    font-size: 12px;
  }

  /* Modal close button */
  .achievement-modal-close {
    width: 36px;
    height: 36px;
    font-size: 24px;
  }

  /* Slider navigation buttons */
  .achievement-slider-prev,
  .achievement-slider-next {
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
  }
}

/* Extra small phones */
@media (max-width: 400px) {
  .achievement-modal-content {
    width: 98%;
    padding: 12px;
    margin: 0 5px;
  }

  .achievement-slider {
    height: 60vh;
    max-height: 60vh;
    overflow: visible;
  }
  .achievement-slide-image {
    width: 100%;
    height: auto;
    max-height: 60vh;
    border-radius: 14px;
    object-fit: contain;
  }
  .achievement-slide-image.fit-contain { object-fit: contain; }
  .achievement-slide-image.fit-cover { object-fit: cover; height: 100%; max-height: 100%; }

  .achievement-info h3 {
    font-size: 14px;
  }

  .achievement-info p {
    font-size: 12px;
  }

  .achievement-slider-prev,
  .achievement-slider-next {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
  }
}

/* Ensure the chatbox is always above the theme toggle */
.chatbox {
  z-index: 1100 !important;
}

/* ===== IMAGE OPTIMIZATION STYLES ===== */

/* Lazy loading and responsive images */
img {
  transition: opacity 0.3s ease;
}

img[data-src] {
  opacity: 0;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

img.loaded {
  opacity: 1;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Picture element responsive behavior */
picture {
  display: block;
  width: 100%;
}

picture img {
  width: 100%;
  height: auto;
  display: block;
}

/* Optimized avatar styles */
.avatar-box img {
  object-fit: cover;
  border-radius: inherit;
}

/* Organization images optimization */

/* Achievement images optimization */
.achievement-slide-image {
  object-fit: contain;
  max-width: 100%;
  height: auto;
}

/* Project images optimization */
.project-img img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* Certification images optimization */

/* Loading placeholder for images */

/* WebP support styles */

/* ===== COMPREHENSIVE MOBILE RESPONSIVE STYLES ===== */

/* Extra small devices (phones, less than 480px) */
@media (max-width: 479px) {
  :root {
    --fs-1: var(--type-xl);
    --fs-2: var(--type-base);
    --fs-3: var(--type-sm);
    --fs-4: var(--type-sm);
    --fs-5: var(--type-xs);
    --fs-6: var(--type-xs);
    --fs-7: var(--type-xs);
    --fs-8: var(--type-xs);
  }

  main {
    margin: 10px 8px;
    margin-bottom: 60px;
  }

  .sidebar,
  article {
    padding: 12px;
    border-radius: 16px;
  }

  .article-title {
    font-size: var(--fs-2);
    padding-bottom: 10px;
  }

  .h2 { font-size: var(--type-xl); }
  .h3 { font-size: var(--type-base); }
  .h4 { font-size: var(--type-sm); }

  /* Sidebar adjustments */
  .sidebar-info {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  /* Ensure avatar is perfectly centered on small screens */
  .avatar-box {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .avatar-box img {
    width: 100% !important;
    height: 100% !important;
  }

  .info-content .name {
    font-size: var(--type-base);
    text-align: center;
  }

  .info-content .title {
    font-size: var(--type-xs);
    padding: 3px 10px;
  }

  /* Contact info */
  .contact-item {
    padding: 10px;
  }

  .contact-title {
    font-size: var(--type-xs);
  }

  .contact-info {
    font-size: var(--type-xs);
  }

  /* Navigation */
  .navbar {
    padding: 0 8px;
  }

  .navbar-list {
    gap: 8px;
    padding: 0 8px;
  }

  .navbar-link {
    font-size: var(--type-xs);
    padding: 12px 10px;
  }

  /* Filter buttons */

  /* Cards and content */

  /* Form inputs */

  /* Icon boxes */
  .icon-box {
    width: 24px;
    height: 24px;
    font-size: var(--type-sm);
  }

  /* Scrollbar adjustments */

  /* Achievement cards */
  .achievement-card {
    padding: 12px;
  }

  .award-badge {
    display: none !important;
  }

  .award-ribbon {
    font-size: var(--type-xs);
    padding: 4px 10px;
    top: 8px;
    right: 8px;
  }

  .card-content {
    padding: 8px;
  }

  .card-title {
    font-size: var(--type-xs);
  }

  .card-subtitle {
    font-size: var(--type-xs);
  }

  .card-date,
  .card-location {
    font-size: var(--type-xs);
    line-height: var(--lh-tight);
  }
}

/* Small devices (phones, 480px to 579px) */
@media (max-width: 579px) {
  .sidebar {
    margin-bottom: 10px;
  }

  .sidebar-info {
    gap: 12px;
  }

  /* Social links */
  .social-list {
    gap: 12px;
  }

  .social-item {
    padding: 8px;
  }

  /* Timeline adjustments */
  .timeline-list {
    margin-left: 25px;
  }

  .timeline-item:not(:last-child) {
    margin-bottom: 15px;
  }

  .timeline-text {
    font-size: var(--type-xs);
  }

  /* Service items */
  .service-item {
    padding: 15px;
    gap: 12px;
  }

  .service-icon-box {
    width: 45px;
    height: 45px;
  }

  .service-content-box {
    gap: 8px;
  }

  .service-item-title {
    font-size: var(--type-xs);
  }

  .service-item-text {
    font-size: var(--type-xs);
  }

  /* Project cards */
  .project-item {
    min-height: 200px;
  }

  .project-img {
    height: 150px;
  }

  .project-title {
    font-size: var(--type-xs);
  }

  .project-category {
    font-size: var(--type-xs);
  }

  /* Modal adjustments */

  /* Year accordion */
  .year-header {
    padding: 12px 15px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .year-title {
    font-size: var(--type-base);
    line-height: var(--lh-tight);
  }

  .award-count {
    font-size: var(--type-xs);
    padding: 3px 8px;
  }

  .toggle-icon {
    font-size: var(--type-xs);
  }

  .year-content {
    padding: 12px;
  }

  .achievements-list {
    gap: 12px;
  }

  .award-badge {
    display: none !important;
  }
}

/* Responsive Styles for Service and Skills Section */
@media (min-width: 580px) {
  .service-list {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }

  .project-list {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }

  .year-header {
    padding: 18px 25px;
  }
}

@media (min-width: 768px) {
  .service-item {
    flex-direction: row;
  }
  
  .service-icon-box {
    width: 70px;
    height: 70px;
  }
  
  .service-icon {
    font-size: 3rem;
  }

  /* Keep avatar on top for desktop view */
  .sidebar-info {
    flex-direction: column;
  }

  .avatar-box {
    width: 120px;
    height: 120px;
  }
}

@media (min-width: 1024px) {
  .service-list {
    grid-template-columns: 1fr 1fr;
  }
}

/* Responsive styles for year accordion */
@media (max-width: 580px) {
  .year-header {
    padding: 15px 20px;
  }
  
  .year-title {
    font-size: var(--fs-2);
  }
  
  .award-count {
    font-size: var(--fs-8);
    padding: 4px 10px;
  }
  
  .year-content.active {
    padding: 20px;
  }
}

/* Touch-friendly improvements for mobile */
@media (max-width: 767px) {
  /* Larger touch targets */
  button,
  a,
  .navbar-link,
  .info_more-btn {
    min-height: 44px;
    min-width: 44px;
  }

  /* Better spacing for touch */
  .navbar-list {
    gap: 4px;
  }

  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
  }

  main {
    overflow-x: hidden;
  }

  /* Adjust container widths */
  .sidebar,
  article {
    max-width: 100%;
    width: 100%;
  }

  /* Better text wrapping */
  .name,
  .title,
  .h2,
  .h3,
  .h4 {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Improve readability */
  p,
  .timeline-text,
  .service-item-text {
    line-height: var(--lh-relaxed);
  }

  /* Stack elements vertically */

  /* Full width buttons */
}

/* Performance improvements */
.avatar-box,
.project-img {
  contain: layout style paint;
}

/* Preload critical images */
.critical-image {
  font-display: swap;
}

/* Responsive image containers */
.responsive-img-container {
  position: relative;
  overflow: hidden;
}

.responsive-img-container::before {
  content: '';
  display: block;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.responsive-img-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Progressive image enhancement */
.progressive-img {
  filter: blur(0px);
  transition: filter 0.3s ease;
}

.progressive-img.loading {
  filter: blur(2px);
}

/* ===== ADDITIONAL MOBILE RESPONSIVE IMPROVEMENTS ===== */

/* Timeline mobile improvements */
@media (max-width: 767px) {
  .timeline-list {
    margin-left: 20px;
  }

  .timeline-item::after {
    left: -26px;
  }

  .timeline-item:not(:last-child)::before {
    left: -20px;
  }

  .timeline-text {
    font-size: var(--type-xs);
    line-height: var(--lh-relaxed);
  }

  .timeline-list span {
    font-size: var(--type-xs);
  }
}

@media (max-width: 479px) {
  .timeline-list {
    margin-left: 15px;
  }

  .timeline-item::after {
    left: -21px;
    width: 8px;
    height: 8px;
  }

  .timeline-item:not(:last-child)::before {
    left: -17px;
    width: 1px;
  }

  .timeline-text {
    font-size: var(--type-xs);
  }
}

/* Skills section mobile improvements */
@media (max-width: 767px) {

  .skill-progress-fill {
    height: 6px;
  }
}

/* Testimonials mobile improvements */

/* Certifications mobile improvements */

/* Chatbot mobile improvements */
@media (max-width: 767px) {
  .chatbox {
    width: calc(100% - 20px);
    max-width: calc(100vw - 20px);
    max-height: 70vh;
    bottom: 80px;
    right: 10px;
  }

  .chatbox-header {
    padding: 12px 15px;
  }

  .chatbox-header h3 {
    font-size: var(--type-sm);
  }

  .chatbox-messages {
    padding: 12px;
    max-height: calc(70vh - 140px);
  }

  .message {
    padding: 10px 12px;
    font-size: var(--type-xs);
    max-width: 85%;
  }

  .chatbox-input {
    padding: 10px 12px;
    font-size: var(--type-xs);
  }
}

@media (max-width: 479px) {
  .chatbox {
    width: calc(100% - 16px);
    max-width: calc(100vw - 16px);
    max-height: 65vh;
    bottom: 75px;
    right: 8px;
  }

  .chatbox-header {
    padding: 10px 12px;
  }

  .chatbox-header h3 {
    font-size: var(--type-xs);
  }

  .message {
    padding: 8px 10px;
    font-size: var(--type-xs);
    max-width: 90%;
  }

  .chatbox-input {
    padding: 8px 10px;
    font-size: var(--type-xs);
  }
}

/* Map and contact form mobile improvements */

/* Particle background mobile optimization */
@media (max-width: 767px) {
  #particle-background {
    opacity: 0.5;
  }
}

@media (max-width: 479px) {
  #particle-background {
    opacity: 0.3;
  }
}

/* Better spacing for mobile landscape */
@media (max-width: 767px) and (orientation: landscape) {
  .sidebar {
    max-height: none;
  }

  .sidebar.active {
    max-height: none;
  }

  main {
    margin: 8px 10px;
  }

  .navbar {
    padding: 0 10px;
  }

  .navbar-list {
    padding: 0 5px;
    gap: 5px;
  }

  .navbar-link {
    padding: 10px 8px;
  }
}

/* Improve touch target sizes for accessibility */
@media (max-width: 767px) {
  a,
  button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .icon-box {
    min-width: 44px;
    min-height: 44px;
  }

  .navbar-link {
    padding: 14px 12px;
  }
}

/* Prevent zoom on input focus for iOS */
@media (max-width: 767px) {
  input[type="text"],
  input[type="email"],
  textarea {
    font-size: 16px !important;
  }
}

/* Safe area insets for notched devices */
@supports (padding: env(safe-area-inset-bottom)) {
  .navbar {
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  main {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Optimize animations for mobile performance */
@media (max-width: 767px) {
  .sidebar,
  article,
  .achievement-card,
  .project-item {
    will-change: auto;
  }
}

/* Respect reduced motion: disable/slow animations when requested */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Slow down shimmer effects on very small screens */
@media (max-width: 479px) {
  .shimmer, .shimmer-overlay {
    animation-duration: 2.5s !important;
  }
}

/* Print styles for mobile */
@media print {
  .navbar,
  .chatbox,
  .info_more-btn,
  #particle-background {
    display: none !important;
  }

  main {
    margin: 0;
  }

  .sidebar {
    max-height: none !important;
  }

  article {
    page-break-inside: avoid;
  }
}

/* Tech Stack (Interactive) */
.tech-stack-section {
  margin: 30px 0 10px;
}

.tech-stack-title {
  margin-bottom: 16px;
}

.stack-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  overflow: visible; /* ensure child glows can extend beyond */
}

.filter-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: visible; /* allow glow to extend vertically */
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none; /* Firefox */
  padding-block: 6px; /* avoid vertical clipping at edges */
  padding-inline: 12px; /* give horizontal room so glow isn't clipped by scrollport */
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--border-gradient-onyx);
  border: 1px solid var(--color-border);
  color: var(--white-2);
  font-size: var(--type-xs);
  transition: background var(--duration-2) var(--ease-standard), transform var(--duration-2) var(--ease-standard), box-shadow var(--duration-2) var(--ease-standard);
  box-shadow: var(--elevation-1);
  scroll-snap-align: start;
}

.chip:hover { transform: translateY(-2px); box-shadow: none; }
.chip.active {
  background: var(--bg-gradient-jet);
  border-color: rgba(255, 219, 112, 0.4);
  color: var(--orange-yellow-crayola);
  box-shadow: none;
  filter: none;
  z-index: 2; /* sit above neighbors while active */
}
.chip { position: relative; z-index: 1; }
.chip:focus-visible { outline: 2px solid #ffdb70; outline-offset: 2px; }

.filter-chips::-webkit-scrollbar { height: 6px; }
.filter-chips::-webkit-scrollbar-thumb { background: var(--jet); border-radius: 6px; }

.stack-search-wrapper { flex: 1; display: flex; justify-content: flex-end; }
.stack-search {
  width: min(240px, 100%);
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--border-gradient-onyx);
  border: 1px solid var(--color-border);
  color: var(--white-2);
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.stack-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--border-gradient-onyx);
  border: 1px solid var(--color-border);
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: var(--elevation-1);
  /* allow hover glow and focus ring to extend beyond bounds */
  overflow: visible;
  transition: transform var(--duration-2) var(--ease-standard), box-shadow var(--duration-2) var(--ease-standard);
}

.stack-item::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
  z-index: -1;
}

.stack-item::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), hsla(45, 100%, 72%, 0.08), transparent 50%);
  opacity: 0; pointer-events: none; z-index: -1;
  transition: opacity var(--duration-3) var(--ease-standard);
}

.stack-item:hover,
.stack-item:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.35),
              0 8px 24px rgba(255, 215, 0, 0.18),
              0 0 16px rgba(255, 215, 0, 0.35);
  border-color: rgba(255, 215, 0, 0.4);
}
.stack-item:hover::after { opacity: 1; }

.stack-icon {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--border-gradient-onyx);
  font-size: 1.3rem;
}
.stack-icon svg { width: 22px; height: 22px; display: block; }
.stack-icon img { width: 22px; height: 22px; display: block; }
.stack-icon ion-icon { font-size: 1.3rem; color: var(--orange-yellow-crayola); }

.stack-name { font-size: var(--type-sm); color: var(--white-2); font-weight: var(--fw-500); }
.stack-category { font-size: var(--type-xs); color: var(--text-muted); }

@media (min-width: 540px) {
  .stack-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .stack-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 767px) {
  .stack-controls { flex-direction: column; align-items: stretch; gap: 10px; }
  .stack-search-wrapper { justify-content: stretch; }
  .stack-search { width: 100%; }
  /* Let chips wrap into multiple rows on small screens */
  .filter-chips { flex-wrap: wrap; overflow-x: visible; gap: 10px; padding-inline: 0; }
  .chip { flex: 0 0 auto; white-space: nowrap; }
}

/* Gold glow hover for Projects (match timeline-content aesthetic) */
article.projects ul.project-list li.project-item:hover,
article.projects ul.project-list li.project-item:focus-within {
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.35),
              0 8px 24px rgba(255, 215, 0, 0.18),
              0 0 16px rgba(255, 215, 0, 0.35);
  border-color: rgba(255, 215, 0, 0.4);
}
.filter-chips { -ms-overflow-style: none; }
.filter-chips::-webkit-scrollbar { display: none; }

/* See All toggle (visible on all viewports) */
.stack-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  align-self: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--border-gradient-onyx);
  border: 1px solid var(--color-border);
  color: var(--white-2);
  box-shadow: var(--elevation-1);
}
.stack-toggle[aria-expanded="true"] {
  color: var(--orange-yellow-crayola);
  border-color: rgba(255, 219, 112, 0.4);
}

@media (max-width: 767px) {
  .stack-toggle { align-self: center; }
}