/*
 * #ROOT VARIABLES
 * Defines custom properties for colors, typography, shadows, and transitions.
 */
:root {
  /* Colors - Updated for a cooler, more vibrant palette */
  --bg-gradient-dark: linear-gradient(145deg, hsl(220, 15%, 12%) 0%, hsl(220, 10%, 8%) 100%);
  --bg-gradient-card: linear-gradient(145deg, hsl(220, 15%, 15%) 0%, hsl(220, 10%, 10%) 100%);
  --bg-gradient-accent: linear-gradient(to right, hsl(270, 100%, 70%), hsl(300, 100%, 65%)); /* Purple to Magenta */
  --border-gradient-subtle: linear-gradient(to bottom right, hsla(220, 15%, 25%, 0.5) 0%, hsla(220, 10%, 15%, 0) 50%);
  --text-gradient-primary: linear-gradient(to right, hsl(270, 100%, 70%), hsl(300, 100%, 65%)); /* Purple to Magenta */
  --jet: hsl(220, 10%, 18%);
  --onyx: hsl(220, 10%, 12%);
  --eerie-black-1: hsl(220, 10%, 10%);
  --eerie-black-2: hsl(220, 10%, 8%);
  --smoky-black: hsl(220, 10%, 5%);
  --white-1: hsl(0, 0%, 95%);
  --white-2: hsl(0, 0%, 98%);
  --accent-color: hsl(285, 100%, 65%); /* Mid-purple */
  --accent-color-light: hsl(295, 100%, 75%); /* Lighter purple/pink */
  --light-gray: hsl(220, 10%, 70%);
  --light-gray-70: hsla(220, 10%, 70%, 0.7);
  --error-red: hsl(0, 70%, 50%);
  --bg-floating-gradient: linear-gradient(
  90deg,
  hsl(250, 20%, 12%) 0%,
  hsl(260, 30%, 18%) 20%,
  hsl(240, 40%, 22%) 40%,
  hsl(255, 45%, 20%) 60%,
  hsl(235, 30%, 15%) 80%,
  hsl(250, 20%, 12%) 100%
);


  /* Typography */
  --ff-poppins: 'Poppins', sans-serif;
  --fs-1: 28px; /* Heading H2 size */
  --fs-2: 22px; /* Heading H3 size */
  --fs-3: 20px; /* Name size */
  --fs-4: 18px; /* Heading H4 size */
  --fs-5: 16px; /* Project title size */
  --fs-6: 15px; /* Paragraph text, service item text, testimonials text */
  --fs-7: 14px; /* Contact info, skill percentage */
  --fs-8: 12px; /* Title (Web Developer), navbar link */
  --fw-300: 300; /* Light font weight */
  --fw-400: 400; /* Regular font weight */
  --fw-500: 500; /* Medium font weight */
  --fw-600: 600; /* Semi-bold font weight */

  /* Shadow */
  --shadow-1: 0 4px 15px hsla(0, 0%, 0%, 0.3);
  --shadow-2: 0 8px 25px hsla(0, 0%, 0%, 0.4);
  --shadow-3: 0 12px 35px hsla(0, 0%, 0%, 0.5);
  --shadow-4: 0 16px 45px hsla(0, 0%, 0%, 0.6);
  --shadow-5: 0 20px 60px hsla(0, 0%, 0%, 0.7);
  /* Adjusted glow shadow color to match new accent */
  --shadow-glow: 0 0 15px hsla(285, 100%, 65%, 0.5);

  /* Transition */
  --transition-1: 0.4s ease-in-out; /* Slightly slower for general elements */
  --transition-2: 0.8s ease-in-out; /* Slower for page transitions and images */
  --transition-3: 0.6s cubic-bezier(0.25, 0.8, 0.25, 1); /* Slower for skill bars */
  --transition-4: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); /* Springy transition */
}

/*-----------------------------------*\
 * #GLOBAL RESET & BASE STYLES
 * Resets default browser styles and sets base properties for the document.
\*-----------------------------------*/
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a { text-decoration: none; }

li { list-style: none; }

img, ion-icon, a, button, time, span { display: block; }

button {
  font: inherit;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
}

input, textarea {
  display: block;
  width: 100%;
  background: none;
  font: inherit;
}

::selection {
  background: var(--accent-color);
  color: var(--smoky-black);
}

:focus { outline-color: var(--accent-color); }

html {
  font-family: var(--ff-poppins);
  overflow-y: scroll;
}

/* Hide scrollbar for html and body */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
article::-webkit-scrollbar,
.sidebar::-webkit-scrollbar,
.select-list::-webkit-scrollbar {
  width: 0;
  height: 0; /* For horizontal scrollbars */
  background: transparent;
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
article::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb,
.select-list::-webkit-scrollbar-thumb {
  background: transparent;
}

body {
  background: var(--bg-floating-gradient);
  background-size: 2000% 100%;
  animation: backgroundPan 40s linear infinite alternate; /* Slower background pan */
  color: var(--light-gray);
  position: relative; /* Needed for pseudo-elements */
  overflow-x: hidden; /* Prevent horizontal scroll from particles */
}


/*-----------------------------------*\
 * #ANIMATION KEYFRAMES
 * Defines all global CSS animations.
\*-----------------------------------*/
@keyframes backgroundPan {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes text-gradient-animation {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* Typewriter animation (only for cursor, typing handled by JS) */
@keyframes blink-cursor {
  from, to { border-right-color: transparent; }
  50% { border-right-color: var(--accent-color); }
}

/* General fade-in-up animation */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* General scale-in animation */
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* Fade-in-left animation */
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Fade-in-right animation */
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Fade-in-bottom animation */
@keyframes fadeInBottom {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Image Modal Zoom */
@keyframes zoom {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Project Item Icon Pulse */
@keyframes pulse {
  0% { transform: translate(-50%, -50%) scale(1); }
  100% { transform: translate(-50%, -50%) scale(1.05); }
}

/* Typing animation for name (JS handles width, CSS handles cursor) */
@keyframes typing {
  from { width: 0 }
  /* To width will be set by JS based on text length */
}

/* New: Subtle particle background movement */
@keyframes particleMove {
  0% { background-position: 0 0; }
  100% { background-position: 100% 100%; }
}

/* New: Hover Glow Effect - Adjusted for new accent color */
@keyframes border-glow {
  0% { box-shadow: 0 0 0px var(--accent-color); }
  50% { box-shadow: 0 0 10px var(--accent-color-light), 0 0 20px hsla(285, 100%, 65%, 0.3); }
  100% { box-shadow: 0 0 0px var(--accent-color); }
}

/* New: Text Shimmer Effect (for titles) - Adjusted for new accent color */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/*-----------------------------------*\
 * #REUSED STYLES
 * Common styles applied across multiple components.
\*-----------------------------------*/
.sidebar, article {
  background: var(--bg-gradient-card);
  border: 1px solid var(--jet);
  border-radius: 20px;
  padding: 15px;
  box-shadow: var(--shadow-2);
  z-index: 1;
  transition: box-shadow var(--transition-1);
  will-change: transform, opacity, max-height, box-shadow; /* Added will-change */
}

.sidebar:hover, article:hover {
  box-shadow: var(--shadow-3);
  /* Added subtle glow on hover for main containers */
  border-color: hsla(285, 100%, 65%, 0.5); /* New glow color */
}

.separator {
  width: 100%;
  height: 1px;
  background: var(--jet);
  margin: 16px 0;
}

.icon-box {
  position: relative;
  background: var(--border-gradient-subtle);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  color: var(--accent-color);
  box-shadow: var(--shadow-1);
  z-index: 1;
  overflow: hidden;
  transition: transform var(--transition-4); /* Springy transition */
}

.icon-box:hover,
.icon-box:active { /* Added :active for touch devices */
  transform: scale(1.1) rotate(5deg); /* Bounce and slight rotate */
}


.icon-box::before {
  content: "";
  position: absolute;
  top: 1px; /* Retain top inset */
  right: 1px; /* Retain right inset */
  bottom: 1px; /* Retain bottom inset */
  left: 0px; /* Moved slightly to the left from 1px */
  background: var(--eerie-black-1);
  border-radius: inherit;
  z-index: -1;
}

.icon-box ion-icon { --ionicon-stroke-width: 35px; }

/* Article (Page) Transition */
article {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0; /* Changed for scroll-triggered animation */
  visibility: hidden;
  pointer-events: none;
  transform: translateY(20px); /* Initial state for page transition */
  /* Adjusted transition for smoother page changes without flash */
  transition: opacity var(--transition-2), transform var(--transition-2), visibility 0s linear var(--transition-2);
  overflow-y: scroll;
}

article.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  position: relative;
  transform: translateY(0); /* Final state for page transition */
  transition: opacity var(--transition-2), transform var(--transition-2), visibility 0s linear; /* Visibility changes immediately */
}

/* Article Title (Typewriter effect handled by JS, cursor by CSS) */
.article-title {
  position: relative;
  padding-bottom: 7px;
  font-weight: var(--fw-600);
  font-size: var(--fs-1);
  font-family: monospace, monospace;
  box-sizing: border-box;
  display: inline-block; /* Keep inline-block for proper text flow */
  vertical-align: bottom;
  color: var(--white-2);
  white-space: nowrap; /* Keep text on single line during typing */
  overflow: hidden; /* Hide overflow */
  /* Re-added border-right for blinking effect */
  border-right: 0.15em solid transparent;
  /* Removed shimmer animation initially from here, will be added by JS */
  background: linear-gradient(90deg, var(--white-2) 0%, var(--accent-color) 20%, var(--white-2) 40%, var(--accent-color) 60%, var(--white-2) 80%, var(--accent-color) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; /* Vendor prefix for background-clip */
  -webkit-text-fill-color: transparent; /* Ensures text color is the gradient */
  background-clip: text; /* Standard property */
  color: transparent; /* Fallback for browsers not supporting background-clip */
}

.article-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 3px;
  background: var(--text-gradient-primary);
  border-radius: 3px;
}

/* Class added by JS to enable blinking cursor after typing and add shimmer */
.article-title.typewriter-active {
  border-right-color: var(--accent-color); /* Blinking cursor */
  animation: blink-cursor 0.75s step-end infinite, shimmer 5s infinite linear; /* Combine animations */
}


/* Heading Styles */
.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);
}

/* Custom Scrollbar for elements with .has-scrollbar */
.has-scrollbar::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.has-scrollbar::-webkit-scrollbar-track {
  background: var(--onyx);
  border-radius: 5px;
}
.has-scrollbar::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 5px;
}
.has-scrollbar::-webkit-scrollbar-button { width: 20px; }

/* Content Card for testimonials, skills, etc. */
.content-card {
  position: relative;
  background: var(--bg-gradient-card);
  padding: 15px;
  padding-top: 45px;
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  cursor: pointer;
  z-index: 1;
  transition: transform var(--transition-1), box-shadow var(--transition-1);
}

.content-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-dark);
  border-radius: inherit;
  z-index: -1;
}

.content-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-3), var(--shadow-glow); /* Added glow */
}

/* General animation classes applied by JavaScript */
.animate-fade-in-left { animation: fadeInLeft 1s ease-out forwards; } /* Slower */
.animate-fade-in-right { animation: fadeInRight 1s ease-out forwards; } /* Slower */
.animate-fade-in-bottom { animation: fadeInBottom 1s ease-out forwards; } /* Slower */


/*-----------------------------------*\
 * #MAIN LAYOUT
 * Defines the main content area.
\*-----------------------------------*/
main {
  margin: 15px 12px;
  margin-bottom: 75px;
  min-width: 259px;
  position: relative;
}

/*-----------------------------------*\
 * #SIDEBAR
 * Styles for the left-hand sidebar personal information.
\*-----------------------------------*/
.sidebar {
  margin-bottom: 15px;
  max-height: 112px; /* Default closed state for all screens */
  overflow-y: hidden;
  transition: max-height var(--transition-2), box-shadow var(--transition-1);
}

.sidebar.active {
  max-height: 405px; /* Open state for larger screens */
  overflow-y: auto;
}

.sidebar-info {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 15px;
}

.avatar-box {
  /* Updated gradient for avatar border */
  background-image: linear-gradient(to right, hsl(270, 100%, 70%), hsl(300, 100%, 65%), hsl(270, 100%, 70%));
  background-size: 400% auto;
  animation: text-gradient-animation 3s linear infinite; /* Adjusted duration for smoother animation */
  padding: 3px;
  box-shadow: var(--shadow-1);
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-block;
  box-sizing: border-box;
}

.avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  transition: transform 0.5s ease;
  will-change: transform; /* Added will-change */
}
.avatar-box img:hover {
  transform: scale(1.05) rotate(2deg); /* Slight zoom and rotate on hover */
}


.info-content .name {
  color: var(--white-2);
  font-size: var(--fs-3);
  font-weight: var(--fw-500);
  letter-spacing: -0.25px;
  margin-bottom: 10px;
  overflow: visible; /* Changed to visible */
  white-space: normal; /* Changed to normal */
  border-right: none; /* No cursor for this one */
  animation: none; /* Explicitly removed animation */
  width: auto; /* Allow width to be auto */
  font-family: var(--ff-poppins);
  text-align: center;
  margin: 0 auto;
  border-bottom: 2px solid transparent;
  /* Updated border-image gradient */
  border-image: var(--text-gradient-primary) 1;
  padding-bottom: 0.01em;
  box-sizing: border-box;
}

.info-content .title {
  color: var(--white-1);
  background: var(--jet);
  font-size: var(--fs-8);
  font-weight: var(--fw-300);
  width: max-content;
  padding: 3px 12px;
  border-radius: 8px;
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--transition-1);
}
.info-content .title:hover {
  box-shadow: var(--shadow-glow); /* Apply glow on hover */
}


.info_more-btn {
  position: absolute;
  top: -15px;
  right: -15px;
  border-radius: 0 15px;
  font-size: 13px;
  color: var(--accent-color-light);
  background: var(--border-gradient-subtle);
  padding: 10px;
  box-shadow: var(--shadow-2);
  transition: var(--transition-1);
  z-index: 1;
  overflow: hidden;
}

.info_more-btn::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: var(--bg-gradient-dark);
  transition: var(--transition-1);
  z-index: -1;
}

.info_more-btn:hover, .info_more-btn:focus {
  background: var(--bg-gradient-accent);
  color: var(--white-2);
  box-shadow: var(--shadow-3);
}

.info_more-btn:hover::before, .info_more-btn:focus::before {
  background: var(--eerie-black-2);
}

.info_more-btn span { display: none; }

.sidebar-info_more {
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-2), visibility var(--transition-2);
}

.sidebar.active .sidebar-info_more {
  opacity: 1;
  visibility: visible;
}

.contacts-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.contact-item {
  min-width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0; /* Initial state for scroll-triggered animation */
  transform: translateY(20px); /* Initial state for scroll-triggered animation */
}

.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;
}

.social-item .social-link {
  color: var(--light-gray-70);
  font-size: 18px;
  transition: color var(--transition-1), transform var(--transition-1);
}

.social-item .social-link:hover {
  color: var(--accent-color);
  transform: translateY(-3px) scale(1.1);
  filter: drop-shadow(0 0 5px var(--accent-color)); /* Glow for social icons */
}

/*-----------------------------------*\
 * #NAVBAR
 * Styles for the main navigation bar.
\*-----------------------------------*/
.navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: hsla(220, 15%, 10%, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--jet);
  border-radius: 12px 12px 0 0;
  box-shadow: var(--shadow-3);
  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), transform var(--transition-1);
  position: relative;
  overflow: hidden;
  will-change: color, transform; /* Added will-change */
}

.navbar-link::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width var(--transition-1);
}

.navbar-link:hover, .navbar-link:focus {
  color: var(--white-1);
  transform: translateY(-2px);
  /* Sharper, more prominent glow on hover */
  text-shadow: 0 0 8px var(--accent-color), 0 0 15px hsla(285, 100%, 65%, 0.4); /* New glow color */
}

.navbar-link.active {
  color: var(--accent-color);
  /* Even stronger and clearer glow for the active link */
  text-shadow: 0 0 12px var(--accent-color), 0 0 25px hsla(285, 100%, 65%, 0.6); /* New glow color */
}

.navbar-link.active::after {
  width: 80%;
}

/*-----------------------------------*\
 * #ABOUT SECTION
 * Styles for the About Me page content.
\*-----------------------------------*/
.about .article-title { margin-bottom: 15px; }

.about-text {
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  line-height: 1.6;
  /* Updated gradient for about text */
  background-image: linear-gradient(to right, hsl(270, 100%, 70%), hsl(300, 100%, 65%), hsl(270, 100%, 70%));
  background-size: 400% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  animation: text-gradient-animation 3s linear infinite; /* Adjusted duration for smoother animation */
}

.about-text p { margin-bottom: 15px; }

/* 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(--bg-gradient-card);
  padding: 20px;
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  z-index: 1;
  opacity: 0; /* Initial state for scroll-triggered animation */
  transform: translateY(20px); /* Initial state for scroll-triggered animation */
  transition: transform var(--transition-1), box-shadow var(--transition-1); /* Explicitly list */
  will-change: transform, opacity, box-shadow; /* Added will-change */
}

/* Removed .service-item.fade-in-up from here, now handled by JS */

.service-item::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-dark);
  border-radius: inherit;
  z-index: -1;
}

.service-item:hover {
  transform: translateY(-5px) scale(1.02); /* Added scale for more noticeable animation */
  box-shadow: var(--shadow-4), var(--shadow-glow); /* Increased shadow for more impact, added glow */
  transition: transform var(--transition-1), box-shadow var(--transition-1); /* Explicitly list */
}

.service-icon-box {
  margin-bottom: 10px;
  background: var(--jet);
  border-radius: 10px;
  padding: 10px;
  box-shadow: inset 0 0 5px hsla(0,0%,0%,0.5);
  transition: transform var(--transition-4); /* Springy transition */
}
.service-icon-box:hover {
  transform: rotate(-8deg) scale(1.1); /* Rotate and scale on hover */
}


.service-icon-box img { margin: auto; }

.service-content-box { text-align: center; }

.service-item-title {
  margin-bottom: 7px;
  color: var(--white-2);
}

.service-item-text {
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  line-height: 1.6;
}

/* Testimonials Section */
.testimonials { margin-bottom: 30px; }

.testimonials-title { margin-bottom: 20px; }

.testimonials-list {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 15px;
  margin: 0 -15px;
  padding: 25px 15px;
  padding-bottom: 35px;
  overflow-x: auto;
  scroll-behavior: smooth;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
}

.testimonials-item {
  min-width: 100%;
  scroll-snap-align: center;
  background: var(--bg-gradient-card);
  border: 1px solid var(--jet);
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  opacity: 0; /* Initial state for scroll-triggered animation */
  transform: translateY(20px); /* Initial state for scroll-triggered animation */
  transition: transform var(--transition-1), box-shadow var(--transition-1); /* Explicitly list */
  will-change: transform, opacity, box-shadow; /* Added will-change */
}

/* Removed .testimonials-item.fade-in-up from here, now handled by JS */

.testimonials-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-3), var(--shadow-glow); /* Added glow */
  transition: transform var(--transition-1), box-shadow var(--transition-1); /* Explicitly list */
}

.testimonials-avatar-box {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(15px, -25px);
  /* Updated gradient for testimonials avatar border */
  background: var(--bg-gradient-accent);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
  padding: 3px;
  transition: transform var(--transition-1);
}
.testimonials-avatar-box:hover {
  transform: translate(15px, -25px) scale(1.05); /* Slight scale on hover */
}


.testimonials-avatar-box img { border-radius: 12px; }

.testimonials-item-title { margin-bottom: 7px; }

.testimonials-text {
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  line-height: 1.6;
  display: -webkit-box;
  line-clamp: 4;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Clients Section */
.clients { margin-bottom: 15px; }

.clients-list {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 15px;
  margin: 0 -15px;
  padding: 25px;
  padding-bottom: 25px;
  overflow-x: auto;
  scroll-behavior: smooth;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
}

.clients-item {
  min-width: 50%;
  scroll-snap-align: start;
  background: var(--bg-gradient-card);
  border: 1px solid var(--jet);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
  opacity: 0; /* Initial state for scroll-triggered animation */
  transform: scale(0.8); /* Initial state for scroll-triggered animation */
  transition: transform var(--transition-1), box-shadow var(--transition-1); /* Explicitly list */
  will-change: transform, opacity, box-shadow; /* Added will-change */
}

/* Removed .clients-item.scale-in from here, now handled by JS */

.clients-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-2), var(--shadow-glow); /* Added glow */
  transition: transform var(--transition-1), box-shadow var(--transition-1); /* Explicitly list */
}

.clients-item img {
  width: 100%;
  filter: grayscale(1);
  transition: filter var(--transition-1), transform var(--transition-1);
}

.clients-item img:hover {
  filter: grayscale(0);
  transform: scale(1.05);
  transition: filter var(--transition-1), transform var(--transition-1);
}

/*-----------------------------------*\
 * #RESUME SECTION
 * Styles for the Resume page content, including education, experience, and skills.
\*-----------------------------------*/
.resume .article-title { margin-bottom: 30px; }

/* Education and Experience Timeline */
.timeline { margin-bottom: 30px; }

.timeline .title-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

.timeline-list {
  font-size: var(--fs-6);
  margin-left: 45px;
}

.timeline-item {
  position: relative;
  opacity: 0; /* Initial state for scroll-triggered animation */
  transform: translateY(20px); /* Initial state for scroll-triggered animation */
}

/* Removed .timeline-item.fade-in-up from here, now handled by JS */

.timeline-item:not(:last-child) { margin-bottom: 20px; }

.timeline-item-title {
  font-size: var(--fs-6);
  line-height: 1.3;
  margin-bottom: 7px;
  color: var(--white-2);
}

.timeline-list span {
  color: var(--accent-color-light); /* Updated color */
  font-weight: var(--fw-400);
  line-height: 1.6;
}

.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: -25px;
  left: -33px;
  width: 1px;
  height: calc(100% + 50px);
  background: var(--jet);
}

.timeline-item::after {
  content: "";
  position: absolute;
  top: 5px;
  left: -33px;
  height: 6px;
  width: 6px;
  /* Updated background gradient for timeline dots */
  background: var(--text-gradient-primary);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--jet);
  animation: pulse 1.5s infinite alternate; /* Subtle pulse for timeline dots */
}

.timeline-text {
  color: var(--light-gray);
  font-weight: var(--fw-300);
  line-height: 1.6;
}

/* Skills Section */
.skill .skills-title { margin-bottom: 20px; }

.skills-list { padding: 20px; }

.skills-item:not(:last-child) { margin-bottom: 15px; }

.skill .title-wrapper {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}

.skill .title-wrapper data {
  color: var(--light-gray);
  font-size: var(--fs-7);
  font-weight: var(--fw-300);
}

.skill-progress-bg {
  background: var(--jet);
  width: 100%;
  height: 8px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px hsla(0,0%,0%,0.3);
}

.skill-progress-fill {
  /* Updated gradient for skill progress bar */
  background: linear-gradient(to right, hsl(270, 100%, 70%), hsl(300, 100%, 65%), hsl(270, 100%, 70%));
  height: 100%;
  border-radius: inherit;
  width: 0%;
  transition: width var(--transition-3); /* Uses slower transition-3 */
}

/*-----------------------------------*\
 * #PORTFOLIO SECTION
 * Styles for the Portfolio page content, including filtering and projects.
\*-----------------------------------*/
.portfolio .article-title { margin-bottom: 30px; }

/* Filter Select Box (Mobile) */
.filter-select-box {
  display: block;
  margin: 20px auto;
  width: calc(100% - 30px);
  max-width: 300px;
  position: relative;
  cursor: pointer;
  background: var(--bg-gradient-card);
  border: 1px solid var(--jet);
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  transition: box-shadow var(--transition-1);
}

.filter-select-box:hover { box-shadow: var(--shadow-3), var(--shadow-glow); } /* Added glow */

.filter-select {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 12px 15px;
  color: var(--white-2);
  font-size: var(--fs-6);
  font-weight: var(--fw-500);
  text-transform: capitalize;
}

.filter-select ion-icon {
  font-size: 18px;
  color: var(--accent-color);
  transition: transform var(--transition-1);
}

.filter-select.active ion-icon { transform: rotate(180deg); }

.select-list {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;
  background: var(--bg-gradient-card);
  border: 1px solid var(--jet);
  border-radius: 14px;
  box-shadow: var(--shadow-3);
  padding: 10px;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-1), visibility var(--transition-1);
  max-height: 200px;
  overflow-y: auto;
}

.filter-select.active + .select-list {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.select-item button {
  background: var(--eerie-black-2);
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  text-transform: capitalize;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  transition: var(--transition-1);
  text-align: center;
  margin-bottom: 5px;
}

.select-item:last-child button { margin-bottom: 0; }

.select-item button:hover,
.select-item button.active {
  background: var(--accent-color);
  color: var(--eerie-black-2);
}

/* Project List */
.project-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 10px;
}

.project-item {
  display: none; /* Controlled by JS active class */
  opacity: 0; /* Initial state for scroll-triggered animation */
  /* transform is handled by animate-left/right classes */
  will-change: transform, opacity, box-shadow; /* Added will-change */
}

.project-item.active {
  display: block;
  /* Animation will be applied by animate-left/right classes via JS */
}

/* New classes for alternating animations */
.project-item.animate-left {
  animation: fadeInLeft 1s ease-out forwards; /* Slower animation */
}

.project-item.animate-right {
  animation: fadeInRight 1s ease-out forwards; /* Slower animation */
}

.project-item > a {
  width: 100%;
  position: relative;
  background: var(--bg-gradient-card);
  border: 1px solid var(--jet);
  border-radius: 16px;
  box-shadow: var(--shadow-2);
  transition: transform var(--transition-1), box-shadow var(--transition-1);
}

.project-item > a:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-4), var(--shadow-glow); /* Added glow */
  transition: transform var(--transition-1), box-shadow var(--transition-1);
}

.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.6); }

.project-item-icon-box {
  --scale: 0.8;
  background: var(--accent-color);
  color: var(--eerie-black-2);
  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);
  box-shadow: var(--shadow-1);
}

.project-item > a:hover .project-item-icon-box {
  --scale: 1;
  opacity: 1;
  animation: pulse 1s infinite alternate;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-2);
}

.project-item > a:hover img { transform: scale(1.15); }

.project-title, .project-category { margin-left: 10px; }

.project-title {
  color: var(--white-2);
  font-size: var(--fs-5);
  font-weight: var(--fw-400);
  text-transform: capitalize;
  line-height: 1.3;
}

.project-category {
  color: var(--light-gray-70);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
}

/*-----------------------------------*\
 * #BLOG SECTION
 * Styles for the Blog page content.
\*-----------------------------------*/
.blog-posts { margin-bottom: 10px; }

.blog-posts-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.blog-post-item > a {
  position: relative;
  background: var(--bg-gradient-card);
  height: 100%;
  box-shadow: var(--shadow-2);
  border-radius: 16px;
  z-index: 1;
  opacity: 0; /* Initial state for scroll-triggered animation */
  transform: translateY(20px); /* Initial state for scroll-triggered animation */
  transition: transform var(--transition-1), box-shadow var(--transition-1);
}

/* Removed .blog-post-item > a.fade-in-up from here, now handled by JS */

.blog-post-item > a::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: var(--bg-gradient-dark);
  z-index: -1;
}

.blog-banner-box {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
}

.blog-banner-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-1);
}

.blog-post-item > a:hover .blog-banner-box img { transform: scale(1.1); }

.blog-content { padding: 15px; }

.blog-meta {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}

.blog-meta :is(.blog-category, time) {
  color: var(--light-gray-70);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
}

.blog-meta .dot {
  background: var(--light-gray-70);
  width: 4px;
  height: 4px;
  border-radius: 4px;
}

.blog-item-title {
  margin-bottom: 10px;
  line-height: 1.3;
  transition: var(--transition-1);
}

.blog-post-item > a:hover .blog-item-title { color: var(--accent-color); }

.blog-text {
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  line-height: 1.6;
}

/*-----------------------------------*\
 * #CONTACT SECTION
 * Styles for the Contact page content, including map and form.
\*-----------------------------------*/
.mapbox {
  position: relative;
  height: 180px; /* Reduced height for a smaller map */
  width: 100%;
  border-radius: 16px;
  margin-top: 20px; /* Added margin-top to move it lower */
  margin-bottom: 30px;
  border: 1px solid var(--jet);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}

.mapbox figure { height: 100%; }

.mapbox iframe {
  width: 100%;
  height: 100%;
  border: none;
  /* Adjusted filter for a lighter map theme */
  filter: grayscale(0.1) brightness(1.1) contrast(1.1) hue-rotate(0deg);
  transition: filter var(--transition-1);
}

.mapbox iframe:hover { filter: grayscale(0) invert(0); }

.contact-form { margin-bottom: 10px; }

.form-title { margin-bottom: 20px; }

.input-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
  margin-bottom: 25px;
}

.form-input {
  color: var(--white-2);
  font-size: var(--fs-6);
  font-weight: var(--fw-400);
  padding: 13px 20px;
  border: 1px solid var(--jet);
  border-radius: 14px;
  background: var(--eerie-black-1);
  outline: none;
  transition: border-color var(--transition-1), box-shadow var(--transition-1);
}

.form-input::placeholder {
  font-weight: var(--fw-500);
  color: var(--light-gray-70);
}

.form-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px hsla(285, 100%, 65%, 0.2); /* New glow color */
}

textarea.form-input {
  min-height: 100px;
  height: 120px;
  max-height: 200px;
  resize: vertical;
  margin-bottom: 25px;
}

textarea.form-input::-webkit-resizer { display: none; }

.form-input:focus:invalid {
  border-color: var(--error-red);
  box-shadow: 0 0 0 3px hsla(0, 70%, 50%, 0.2);
}

.form-btn {
  position: relative;
  width: 100%;
  /* Updated gradient for form button */
  background: var(--bg-gradient-accent);
  color: var(--white-2);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 14px;
  font-size: var(--fs-6);
  text-transform: capitalize;
  box-shadow: var(--shadow-3);
  z-index: 1;
  transition: var(--transition-1);
  overflow: hidden; /* For pseudo-element effects */
}

.form-btn::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: var(--bg-gradient-dark);
  transition: var(--transition-1);
  z-index: -1;
}

.form-btn:hover {
  background: var(--accent-color-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-4), var(--shadow-glow); /* Added glow */
  animation: border-glow 1.5s infinite alternate; /* Border glow on hover */
}

.form-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-2);
  animation: none; /* Disable glow when disabled */
}

.form-btn:disabled:hover {
  background: var(--bg-gradient-accent);
  color: var(--eerie-black-2);
}

.form-btn:disabled:hover::before { background: var(--eerie-black-2); }


/*-----------------------------------*\
 * #MODAL STYLES
 * Styles for the image modal and testimonials modal.
\*-----------------------------------*/
/* Image Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 99;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 80%;
  max-height: 80%;
  border-radius: 10px;
  will-change: transform, opacity; /* Added will-change */
}

/* New class for modal content animation */
.modal-content-animated {
  animation: zoom 0.5s ease-in-out; /* Slower zoom */
}

.close {
  position: absolute;
  top: 60px;
  right: 35px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

/* Testimonials Modal */
.modal-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 20;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--transition-1), visibility var(--transition-1);
}

.modal-container.active {
  pointer-events: all;
  visibility: visible;
  opacity: 1;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: hsla(0, 0%, 5%, 0.9);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 1;
  transition: var(--transition-1);
}

.overlay.active {
  opacity: 0.8;
  visibility: visible;
  pointer-events: all;
}

.testimonials-modal {
  background: var(--bg-gradient-card);
  position: relative;
  padding: 15px;
  margin: 15px 12px;
  border: 1px solid var(--jet);
  border-radius: 14px;
  box-shadow: var(--shadow-5);
  transform: scale(0.8);
  opacity: 0;
  transition: transform var(--transition-2), opacity var(--transition-2);
  z-index: 2;
}

.modal-container.active .testimonials-modal {
  transform: scale(1);
  opacity: 1;
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--jet);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--white-2);
  font-size: 18px;
  opacity: 0.7;
  transition: var(--transition-1);
}

.modal-close-btn:hover, .modal-close-btn:focus {
  opacity: 1;
  background: var(--accent-color);
  color: var(--eerie-black-2);
}

.modal-close-btn ion-icon { --ionicon-stroke-width: 50px; }

.modal-avatar-box {
  /* Updated gradient for modal avatar border */
  background: var(--bg-gradient-accent);
  width: max-content;
  border-radius: 14px;
  margin-bottom: 15px;
  box-shadow: var(--shadow-2);
  padding: 3px;
}

.modal-img-wrapper > img { display: none; }

.modal-title { margin-bottom: 4px; }

.modal-content time {
  font-size: var(--fs-6);
  color: var(--light-gray-70);
  font-weight: var(--fw-300);
  margin-bottom: 10px;
}

.modal-content p {
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  line-height: 1.6;
}

/*-----------------------------------*\
 * #RESPONSIVE MEDIA QUERIES
 * Adjusts styles for different screen sizes.
\*-----------------------------------*/

/* Small screens (max-width: 450px) */
@media (max-width: 450px) {
  .sidebar-info {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
  }

  .avatar-box {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
  }

  .info-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 10px;
  }

  .info-content .name {
    font-size: 18px;
    margin-bottom: 4px;
    text-align: left;
  }

  .info-content .title {
    font-size: 12px;
    padding: 2px 8px;
    margin-bottom: 0;
    text-align: left;
    white-space: normal;
    width: 100%;
    margin-top: 5px;
  }

  .sidebar {
    max-height: 112px; /* Default closed state for small screens */
    overflow-y: hidden;
  }
  .sidebar.active { /* When sidebar is active, it opens */
    max-height: 100vh; /* Open state for small screens */
    overflow-y: auto;
  }
  .sidebar-info_more {
    opacity: 0; /* Hidden by default */
    visibility: hidden;
    transition: opacity var(--transition-2), visibility var(--transition-2);
  }
  .sidebar.active .sidebar-info_more {
    opacity: 1;
    visibility: visible;
  }
  .info_more-btn {
    display: block; /* Always show button on small screens */
    animation: none;
  }
  .info_more-btn span { display: none; }
  .info_more-btn ion-icon { display: block; }

  .sidebar.active .info_more-btn ion-icon {
      transform: rotate(0deg);
  }
}

/* Mobile specific footer adjustment */
@media (max-width: 767px) {
  footer {
    margin-bottom: 60px;
  }
  /* Hide the main portfolio heading and horizontal filter list on small screens */
  .portfolio-heading { display: none; }
  .filter-list { display: none; }

  /* Explicitly re-declare for active state on small devices */
  .icon-box:active {
    transform: scale(1.1) rotate(5deg);
    transition: transform var(--transition-4);
  }
}

/* Medium screens (min-width: 450px) */
@media (min-width: 450px) {
  .clients-item { min-width: calc(33.33% - 10px); }
  .project-img, .blog-banner-box { height: auto; }
}

/* Larger mobile/small tablet (min-width: 580px) */
@media (min-width: 580px) {
  :root {
    --fs-1: 36px;
    --fs-2: 28px;
    --fs-3: 26px;
    --fs-6: 16px;
    --fs-7: 15px;
    --fs-8: 13px;
  }
  .sidebar, article {
    width: 520px;
    margin-inline: auto;
    padding: 30px;
  }
  .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: 180px;
    margin-bottom: 30px;
  }
  .sidebar.active { max-height: 584px; }
  .sidebar-info { gap: 25px; }
  .avatar-box {
    width: 120px;
    height: 120px;
  }
  .info-content .name { margin-bottom: 30px; }
  .info-content .title { padding: 3px 2px; }
  .info_more-btn {
    top: -20px;
    right: -20px;
    padding: 6px 10px;
  }
  .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; }
  .about-text { margin-bottom: 40px; }
  .service-item {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 18px;
    padding: 30px;
  }
  .service-icon-box {
    margin-bottom: 0;
    margin-top: 5px;
  }
  .service-content-box { text-align: left; }
  .testimonials-title { margin-bottom: 25px; }
  .testimonials-list {
    gap: 30px;
    margin: 0 -30px;
    padding: 30px;
    padding-bottom: 35px;
  }
  .content-card {
    padding: 30px;
    padding-top: 25px;
  }
  .testimonials-avatar-box {
    transform: translate(30px, -30px);
    border-radius: 20px;
  }
  .testimonials-avatar-box img { width: 80px; }
  .testimonials-item-title {
    margin-bottom: 10px;
    margin-left: 95px;
  }
  .testimonials-text {
    line-clamp: 2;
    -webkit-line-clamp: 2;
  }
  .modal-container { padding: 20px; }
  .testimonials-modal {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    gap: 35px;
    max-width: 680px;
  }
  .modal-avatar-box img { width: 80px; }
  .modal-img-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .modal-avatar-box {
    border-radius: 18px;
    margin-bottom: 0;
  }
  .modal-avatar-box img {
    display: block;
    flex-grow: 1;
    width: 35px;
  }
  .clients-list {
    gap: 50px;
    margin: 0 -30px;
    padding: 45px;
    scroll-padding-inline: 45px;
  }
  .clients-item { min-width: calc(33.33% - 35px); }
  .timeline-list { margin-left: 65px; }
  .timeline-item:not(:last-child)::before { left: -43px; }
  .timeline-item::after {
    height: 8px;
    width: 8px;
    left: -43px;
  }
  .skills-item:not(:last-child) { margin-bottom: 25px; }
  .project-img, .blog-banner-box { border-radius: 16px; }
  .blog-posts-list { gap: 30px; }
  .blog-content { padding: 25px; }
  .mapbox {
    height: 380px;
    border-radius: 18px;
  }
  .input-wrapper {
    gap: 30px;
    margin-bottom: 30px;
  }
  .form-input { padding: 15px 20px; }
  textarea.form-input { margin-bottom: 30px; }
  .form-btn {
    --fs-6: 16px;
    padding: 16px 20px;
  }
  .form-btn ion-icon { font-size: 18px; }
}

/* Tablet/Desktop (min-width: 768px) */
@media (min-width: 768px) {
  .sidebar, article { width: 700px; }
  .contacts-list {
    grid-template-columns: 1fr 1fr;
    gap: 30px 15px;
  }
  .navbar-link { --fs-8: 15px; }
  .testimonials-modal {
    gap: 35px;
    max-width: 680px;
  }
  .modal-avatar-box img { width: 80px; }
  /* Hide the dropdown select box on larger screens */
  .filter-select-box { display: none; }
  /* Show the horizontal filter list on larger screens */
  .filter-list {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 25px;
    padding-left: 5px;
    margin-bottom: 30px;
  }
  .filter-item button {
    color: var(--light-gray);
    font-size: var(--fs-5);
    transition: var(--transition-1);
  }
  .filter-item button:hover {
    color: var(--accent-color);
    text-shadow: 0 0 5px var(--accent-color); /* Subtle text shadow on hover */
  }
  .filter-item button.active {
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--accent-color), 0 0 15px hsla(285, 100%, 65%, 0.3); /* Stronger glow when active */
  }
  .project-list, .blog-posts-list { grid-template-columns: 1fr 1fr; }
  .input-wrapper { grid-template-columns: 1fr 1fr; }
  .form-btn {
    width: max-content;
    margin-left: auto;
  }
  /* Re-display the portfolio heading on larger screens */
  .portfolio-heading { display: block; }
}

/* Large Desktop (min-width: 1024px) */
@media (min-width: 1024px) {
  :root {
    --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;
  }
  .testimonials-item { min-width: calc(50% - 15px); }
  .clients-item { min-width: calc(25% - 38px); }
  .project-list { grid-template-columns: repeat(3, 1fr); }
  .blog-banner-box { height: 230px; }
}

/* Extra Large Desktop (min-width: 1250px) */
@media (min-width: 1250px) {
  .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;
    overflow-y: auto;
    margin-bottom: 0;
    padding-top: 60px;
    z-index: 1;
  }
  .sidebar-info { flex-direction: column; }
  .avatar-box {
    width: 150px;
    height: 150px;
    border-radius: 50%;
  }
  .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 { grid-template-columns: 1fr; }
  .contact-info :is(.contact-link) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .contact-info :is(.contact-link, time, address) {
    --fs-7: 14px;
    font-weight: var(--fw-300);
  }
  .separator:last-of-type {
    margin: 15px 0;
    opacity: 0;
  }
  .social-list { justify-content: center; }
  .timeline-text { max-width: 700px; }
}



.fade-in-up {
  animation: fade-in-up 1s ease-out forwards;
}
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}



@media (max-width: 450px) {
  /* ...existing styles... */

  .info_more-btn ion-icon {
    transition: transform 0.4s ease-in-out;
  }

  .sidebar.active .info_more-btn ion-icon {
    transform: rotate(180deg);
  }
}
