/* ===================================================================
   BASE & GLOBAL STYLES
   =================================================================== */
:root {
  /* Color System */
  --primary-color: #4361ee;
  --secondary-color: #3f37c9;
  --accent-color: #4895ef;
  --text-color: #2b2d42;
  --light-bg: #f8f9fa;
  --dark-bg: #212529;
  --text-muted: #6c757d;

  /* Gradients */
  --main-gradient: linear-gradient(
    135deg,
    #ffffff,
    #ffe4ce,
    hsl(0, 0%, 100%),
    #9ee0ff
  );
  --skill-gradient: linear-gradient(90deg, #0c6dfd, #8533ff);

  /* Shadows & Effects */
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --logo-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --hover-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);

  /* Spacing & Sizing */
  --border-radius: 12px;
  --transition: all 0.3s ease;
  --card-image-height: 220px;
}

/* Dark Theme Overrides */
[data-bs-theme="dark"] {
  --text-color: #f8f9fa;
  --light-bg: #212529;
  --dark-bg: #f8f9fa;
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  --logo-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --text-muted: #adb5bd;
}

/* Global Resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
  font-weight: 200;
}

/* Base Typography */
body {
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: var(--transition);
  padding-top: 70px; /* Add padding to account for fixed navbar */
}

/* ===================================================================
   BLOG CARD TEXT DECORATION RESET
   =================================================================== */
.blog-card-container * {
  text-decoration: none !important;
}

@font-face {
  font-family: "Virgil";
  src: url("/assets/fonts/Virgil.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

* {
  font-family: "Poppins", sans-serif;
  font-weight: 200;
}

body {
  background: var(--light-bg);
  color: var(--text-color);
  transition: var(--transition);
  line-height: 1.6;
  padding-top: 70px; /* Add padding to account for fixed navbar */
}

/* ===================================================================
   UNDER CONSTRUCTION TAG
   =================================================================== */
.construction-tag {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, #ff4d4d, #ff3333);
  color: #ffffff;
  padding: 8px 16px 8px 16px;
  border-radius: 25px;
  font-family: "Virgil", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 15px;
  cursor: default;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: visible;
  box-shadow: 0 4px 15px rgba(255, 77, 77, 0.25);
  z-index: 1000;
  min-width: 200px;
}

.construction-tag .tag-text {
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.5px;
  font-family: "Virgil", sans-serif;
}

.construction-tag .tag-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 4px 0;
}

.construction-tag .tag-hover-text {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, #ff4d4d, #ff3333);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 0 0 12px 12px;
  font-family: "Virgil", sans-serif;
  font-size: 1rem;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  white-space: normal;
  box-shadow: 0 6px 20px rgba(230, 0, 0, 0.2);
  z-index: 1001;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  text-align: center;
}

.construction-tag:hover {
  border-radius: 12px 12px 0 0;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 77, 77, 0.3);
  background: linear-gradient(135deg, #ff4d4d, #ff3333);
  margin-bottom: 60px;
  padding-bottom: 8px;
}

.construction-tag:hover .tag-hover-text {
  opacity: 1;
  transform: translateY(0);
  white-space: normal;
  text-align: center;
  line-height: 1.4;
  padding: 15px 20px;
}

/* ===================================================================
     PROFILE IMAGE STYLES
     =================================================================== */

/* Profile Image Container */

.Profile-Photo {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 250px;
  height: auto;
  border-radius: 20px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  background: white;
  padding: 8px;
  transform-style: preserve-3d;
  will-change: transform, box-shadow, border-color;
  transform: perspective(1000px) rotateX(0) rotateY(0) scale(1);
  backface-visibility: hidden;
  -webkit-font-smoothing: subpixel-antialiased;
  overflow: hidden;
}

.Profile-Photo:hover {
  transform: perspective(1000px) rotateX(5deg) rotateY(10deg) scale(1.02);
  box-shadow: 15px 20px 40px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.95);
  filter: brightness(1.03);
}

/* Add shine effect on hover */
.Profile-Photo::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 20%,
    rgba(255, 255, 255, 0.2) 40%,
    rgba(255, 255, 255, 0.05) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 3;
  pointer-events: none;
}

.Profile-Photo:hover::after {
  opacity: 1;
  animation: shine 1.5s ease-in-out;
}

@keyframes shine {
  0% {
    left: -100%;
    opacity: 0.6;
  }
  20% {
    opacity: 0.4;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

/* Morphing Gradient Background */
.morphing-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 450px;
  width: 100%;
  height: 120%;
  background: var(--skill-gradient);
  border-radius: 30px;
  z-index: 1;
  filter: blur(5px);
  opacity: 0.8;
  animation: morph 10s ease-in-out infinite;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: border-radius, transform;
}

@keyframes morph {
  0% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    transform: translate(-50%, -50%) scale(1);
  }
  25% {
    border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
  }
  50% {
    border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    transform: translate(-50%, -50%) scale(1.05);
  }
  75% {
    border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
  }
  100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .hero-container > .col-10 {
    margin: 0 auto !important;
    float: none !important;
    display: flex;
    justify-content: center;
    padding: 0;
  }

  .morphing-bg {
    max-width: 400px;
    width: 100%;
    height: 120%;
    left: 50%;
    transform: translateX(-50%) scale(1.1);
  }

  .Profile-Photo {
    max-width: 300px;
    margin: 0 auto;
    display: block;
    position: relative;
    z-index: 2;
  }

  .position-relative {
    margin: 0 auto;
    width: 100%;
    max-width: 300px;
    display: flex;
    justify-content: center;
    position: relative;
  }
}

/* Navbar Styles */
.navbar {
  background-color: white !important;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 0.75rem 0;
}

[data-bs-theme="dark"] .navbar {
  background-color: #1a1a1a !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
  font-size: 1.5rem;
}

.nav-link {
  color: var(--text-color) !important;
  font-weight: 400;
  margin: 0 0.5rem;
  position: relative;
  transition: var(--transition);
}

[data-bs-theme="dark"] .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-bs-theme="dark"] .nav-link:hover,
[data-bs-theme="dark"] .nav-link.active {
  color: white !important;
}

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

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

.navbar-toggler {
  border: none;
  padding: 0.5rem;
  color: rgba(0, 0, 0, 0.8);
}

[data-bs-theme="dark"] .navbar-toggler {
  color: rgba(255, 255, 255, 0.8);
}

.navbar-toggler:focus {
  box-shadow: none;
  outline: none;
}

/* Smooth transition for navbar elements */
.navbar * {
  transition: color 0.3s ease, background-color 0.3s ease,
    border-color 0.3s ease;
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-subtitle {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  background: var(--skill-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: inline-block;
  position: relative;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.divider {
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  margin: 0 auto;
  border-radius: 2px;
}

/* ===================================================================
   UNIFIED CARD STYLES (Blogs & Projects) - v3 (Flexbox Grid)
   =================================================================== */

/* --- Flexbox Grid Layout --- */
/*
  This uses a Flexbox-based grid to avoid conflicts with Bootstrap's .row class.
  It creates a responsive, wrapping grid of cards.
*/
.home-blogs #blogs-grid,
#projects #projects-container,
main #blogs-container,
main #projects-container {
  /* Establish a flex container */
  display: flex;
  flex-wrap: wrap;
  gap: 2rem; /* Consistent gap between all cards */

  /* Reset conflicting .row margins and set our own top margin */
  margin: 2rem 0 0 0;
  padding: 0; /* Reset any padding */
  width: 100%;
}

/* --- Flexbox Grid Items (The Cards) --- */
/*
  Targets the direct children of the flex container (our cards).
  The 'flex' property makes them grow and shrink correctly.
*/
.home-blogs #blogs-grid > *,
#projects #projects-container > *,
main #blogs-container > *,
main #projects-container > * {
  /* flex-grow, flex-shrink, flex-basis */
  flex: 1 1 320px;
  min-width: 320px; /* Ensures a minimum width before wrapping */
}

/* Force remove all underlines in blog cards */
.blog-card-container,
.blog-card-container *,
.blog-card-container a,
.blog-card-link,
.project-card-link {
  display: block;
  height: 100%;
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

/* Card Hover Effects */
.blog-card-link:hover,
.project-card-link:hover {
  transform: translateY(-5px);
  text-decoration: none;
}

/* Card Element */
.blog-card-link .card,
.project-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--light-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Card Image Container */
.card-img-container {
  overflow: hidden;
  height: var(--card-image-height);
  position: relative;
}

/* Card Hover Effects */
.blog-card-link:hover .card,
.project-card:hover {
  box-shadow: var(--hover-shadow);
  transform: translateY(-5px);
}

/* --- Card Image --- */
/* Remove gap between image and card edge */
.blog-card-img,
.project-card-image {
  height: 220px;
  width: 100%;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: transform 0.5s ease;
  position: relative; /* For positioning tags/overlays */
}

/* Style for <img> tags */
.blog-card-img {
  object-fit: cover;
  display: block;
}

/* Remove all text decoration from blog card */
.blog-card-link,
.blog-card-link *,
.blog-card-link:hover,
.blog-card-link:focus,
.blog-card-link:active {
  text-decoration: none !important;
}

/* Ensure no text decoration in card content */
.blog-card-content,
.blog-card-content * {
  text-decoration: none !important;
}

/* Reset any link styles in blog cards */
.blog-card-link a {
  text-decoration: none !important;
  transition: var(--transition);
}

/* Card image styles */
.card-img-top {
  width: 100%;
  height: var(--card-image-height);
  object-fit: cover;
  border: none;
  padding: 0;
  margin: 0;
  display: block;
  transition: transform 0.5s ease;
}

/* Hover effect for images */
.blog-card-link:hover .card-img-top,
.project-card:hover .card-img-top {
  transform: scale(1.05);
}

/* Ensure the image container doesn't overflow */
.card-img-container {
  overflow: hidden;
  height: var(--card-image-height);
  position: relative;
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
}

/* Maintain aspect ratio for logos and icons */
.project-skill-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  margin-right: 8px;
  margin-bottom: 8px;
  transition: transform 0.3s ease;
}

.project-skill-logo:hover {
  transform: scale(1.2);
}

/* ===================================================================
   CARD CONTENT STYLES
   =================================================================== */
/* Card body styles */
.card-body {
  background: transparent !important;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Card meta information (date, read time) */
.card-meta {
  color: var(--text-muted, #6c757d);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  display: block;
}

/* Card title */
.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0.25rem 0 0.75rem;
  color: var(--text-color);
  transition: color 0.2s ease;
  line-height: 1.4;
}

/* Card description/excerpt */
.card-text {
  color: var(--text-muted, #6c757d);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Card footer */
.card-footer {
  background: transparent;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1rem 1.5rem;
  margin-top: auto;
  transition: border-color 0.3s ease;
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .card-footer {
  border-top-color: rgba(255, 255, 255, 0.1);
}

/* Hover effects */
.card:hover .card-title {
  color: var(--primary-color);
}

.card:hover .card-footer {
  border-top-color: rgba(67, 97, 238, 0.2);
}

/* --- Card Footer/Features --- */

/* Blog Tags - Compact and Modern */
.blog-tags {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-width: calc(100% - 1.5rem);
}

.blog-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background-color: rgba(255, 255, 255, 0.95);
  color: #333;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  white-space: nowrap;
  max-width: 100%;
  text-transform: uppercase;
  height: 1rem;
}

/* Keep Project Tech Stack */
.project-card-footer {
  margin-top: auto; /* Push to the bottom of the card content */
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  gap: 1rem;
}

.tech-stack {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.project-skill-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  transition: transform 0.2s ease-in-out;
  opacity: 0.8;
}
.project-skill-logo:hover {
  transform: scale(1.1);
  opacity: 1;
}

/* Project links (Demo/Code) styling in footer */
.project-links a {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: var(--transition);
  gap: 0.5rem;
}
.project-links a:hover {
  transform: translateX(3px);
  color: var(--secondary-color);
}

/* --- Dark Mode --- */
[data-bs-theme="dark"] .blog-card-link .card,
[data-bs-theme="dark"] .project-card {
  background: #23272d !important;
  border-color: rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] .blog-card .card-body,
[data-bs-theme="dark"] .project-card-content {
  background: #23272d !important;
}

[data-bs-theme="dark"] .blog-card-link:hover .card,
[data-bs-theme="dark"] .project-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .blog-card-title,
[data-bs-theme="dark"] .project-card-title {
  color: #f8f9fa;
}

[data-bs-theme="dark"] .project-card:hover .project-card-title,
[data-bs-theme="dark"] .blog-card-link:hover .card-title {
  color: var(--accent-color);
}

[data-bs-theme="dark"] .blog-card .card-text,
[data-bs-theme="dark"] .blog-card-excerpt,
[data-bs-theme="dark"] .project-card-description,
[data-bs-theme="dark"] .blog-card-date,
[data-bs-theme="dark"] .project-card-date {
  color: #a0aec0;
}

[data-bs-theme="dark"] .blog-tag {
  background: rgba(30, 30, 30, 0.9);
  color: #f8f9fa;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .project-skill-logo {
  opacity: 0.9;
  filter: brightness(0.9) contrast(1.2);
}
[data-bs-theme="dark"] .project-skill-logo:hover {
  opacity: 1;
  filter: none;
}
[data-bs-theme="dark"] .project-card-footer {
  border-top-color: rgba(255, 255, 255, 0.1);
}

/* Footer Light Mode Styles */
:root:not([data-bs-theme="dark"]) footer .text-body-secondary,
:root:not([data-bs-theme="dark"]) footer .Border-top {
  color: #000000 !important;
  border-color: #000000 !important;
}

:root:not([data-bs-theme="dark"]) footer .gradient-icon svg {
  fill: #000000;
}

:root:not([data-bs-theme="dark"]) footer .gradient-icon:hover svg {
  fill: #4361ee;
  transition: fill 0.3s ease;
}

.container,
section {
  position: relative;
  z-index: 1;
}

/* ===================================================================
       REUSABLE COMPONENTS & UTILITIES
       =================================================================== */
/* Main button styles */
.MainButton {
  border-radius: 50px;
  transition: transform 1s ease, box-shadow 1s ease, background 1s ease;
  border: none;
  font-weight: 500;
}

/* Primary button (Get in Touch) */
.btn-primary.MainButton,
.btn-outline-primary.MainButton {
  background: var(--skill-gradient);
  background-size: 200% auto;
  border: none;
  color: white;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary.MainButton:hover,
.btn-outline-primary.MainButton:hover {
  background-position: right center;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(12, 109, 253, 0.3);
  color: white;
}

/* Add a subtle shine effect on hover */
.btn-primary.MainButton::after,
.btn-outline-primary.MainButton::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
}

.btn-primary.MainButton:hover::after,
.btn-outline-primary.MainButton:hover::after {
  opacity: 1;
  animation: shine 1.5s infinite;
}

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

/* Outline button (Projects) */
.btn-outline-dark.MainButton:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.NiceFont {
  font-family: "Virgil", "Poppins", sans-serif;
}

.hover-effect {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-effect:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-body {
  background: var(--main-gradient) !important;
  border-radius: 0 0 15px 15px;
}

/* ===================================================================
       HERO SECTION & TYPING ANIMATION
       =================================================================== */
.headline-wrapper {
  display: inline-block;
  position: relative;
}
.stroke {
  height: auto;
  display: inline-block;
  vertical-align: bottom;
  margin-top: -0.2em;
}
.stroke path {
  fill: currentColor;
}
.lead {
  padding-top: 25px;
  font-size: 1rem;
  display: block;
}
.Profile-Photo {
  border-radius: 100px;
  height: 500px;
  width: 100%;
  object-fit: cover;
}

.typing-container {
  position: relative;
}
p.Typing.waiting {
  opacity: 0;
}
.typing-cursor {
  display: inline-block;
  width: 2px;
  background-color: #000;
  animation: blink-caret 0.75s step-end infinite;
  margin-left: 1px;
  height: 1.2em;
  vertical-align: middle;
}
@keyframes blink-caret {
  50% {
    opacity: 1;
  }
}

.ButtonsContainer {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.ButtonsContainer.hidden {
  opacity: 0;
  visibility: hidden;
}
.ButtonsContainer.visible {
  opacity: 1;
  visibility: visible;
}

/* ===================================================================
       SKILLS SECTION
       =================================================================== */
.skills-category {
  background: var(--main-gradient);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  height: 100%;
}
.skills-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}
.skills-category h3 {
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
}
.skills-category h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 75px;
  height: 3px;
  background: var(--skill-gradient);
  border-radius: 2px;
}
.skill-tag {
  background: var(--skill-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.skills-logos-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: flex-start;
  align-items: center;
}
.skill-logo-wrapper {
  position: relative;
  transition: all 0.3s ease;
}
.skill-logo {
  width: 55px;
  height: 55px;
  padding: 8px;
  background: #ffffff;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: var(--logo-shadow);
  object-fit: contain;
}
.skill-logo-wrapper:hover {
  transform: translateY(-5px) rotate(5deg);
}
.skill-logo-wrapper:hover .skill-logo {
  border-color: #0c6dfd;
  box-shadow: var(--hover-shadow);
  background: linear-gradient(135deg, #ffffff, #f8f9ff);
}
.skill-logo-wrapper::after {
  content: attr(data-skill);
  position: absolute;
  bottom: 125%; /* Position above the element */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10;
}
.skill-logo-wrapper:hover::after {
  opacity: 1;
  visibility: visible;
  bottom: 100%;
}

/* ===================================================================
       CAROUSEL (Blogs & Projects)
       =================================================================== */
.carousel-container {
  overflow: hidden;
  padding: 0 40px;
  mask-image: linear-gradient(
    to right,
    transparent,
    black 5%,
    black 95%,
    transparent
  );
}
.carousel-track {
  display: flex;
  gap: 20px;
  transition: transform 0.3s ease;
  padding: 10px 0;
}
.cardsize {
  flex: 0 0 340px;
}
.card-img-top {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin: 0;
  padding: 0;
  display: block;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.carousel-progress-container {
  width: 100%;
  padding: 30px 0;
  display: flex;
  justify-content: center;
}
.carousel-progress-track {
  width: 90%;
  max-width: 600px;
  height: 10px;
  background: var(--main-gradient);
  border-radius: 5px;
  position: relative;
  cursor: pointer;
}
.carousel-progress-thumb {
  width: 50px;
  height: 16px;
  background: var(--skill-gradient);
  border-radius: 8px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  cursor: grab;
  z-index: 2;
}
.carousel-progress-thumb:active {
  cursor: grabbing;
}

/* ===================================================================
       FOOTER & DARK MODE
       =================================================================== */
.Border-top {
  position: relative;
  border-top: 2px solid transparent;
}
.Border-top::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--main-gradient);
}
footer .text-body-secondary {
  background: var(--main-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
footer .gradient-icon svg {
  fill: url(#iconGradient);
}

.mode-tog {
  position: fixed;
  right: 20px;
  top: 70px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  z-index: 11;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: background-color 1s ease;
  background-color: black;
}
.mode-tog.active {
  background-color: white;
}
.mode-tog svg {
  position: absolute;
  transition: all 0.5s ease;
  height: 20px;
  width: 20px;
}
.mode-tog .moon-icon {
  stroke: white;
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
.mode-tog .sun-icon {
  stroke: black;
  opacity: 0;
  transform: rotate(180deg) scale(0.5);
}
.mode-tog.active .moon-icon {
  opacity: 0;
  transform: rotate(-180deg) scale(0.5);
}
.mode-tog.active .sun-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.Togglecontainer {
  position: fixed;
  right: 20px;
  top: 70px;
  pointer-events: none;
}
.dark-mode {
  position: fixed;
  top: 90px; /* center on toggle */
  right: 40px; /* center on toggle */
  transform: translate(50%, -50%) scale(0);
  width: 350vmax;
  height: 350vmax;
  border-radius: 50%;
  background-color: black;
  transition: transform 1s ease-in-out;
}
.dark-mode.active {
  transform: translate(50%, -50%) scale(1);
}

/* ===================================================================
       DARK MODE THEME OVERRIDES
       =================================================================== */
[data-bs-theme="dark"] {
  color-scheme: dark;
}
[data-bs-theme="dark"] body {
  background: #121212 !important;
  color: #f8f9fa;
}
[data-bs-theme="dark"] .card {
  background-color: #2b3035;
  border-color: #495057;
}
[data-bs-theme="dark"] .card-body {
  background: rgb(26, 26, 26) !important;
}
[data-bs-theme="dark"] .btn-outline-dark {
  color: #f8f9fa;
  border-color: #f8f9fa;
}
[data-bs-theme="dark"] .typing-cursor {
  background-color: #fff;
}
[data-bs-theme="dark"] .skills-category {
  background: #1a1a1a;
  border-color: rgba(255, 255, 255, 0.1);
}
[data-bs-theme="dark"] .skills-category h3 {
  color: #ffffff;
}
[data-bs-theme="dark"] .skill-logo {
  background: #3a3a3a;
  border-color: #555;
}
[data-bs-theme="dark"] .skill-logo-wrapper:hover .skill-logo {
  background: linear-gradient(135deg, #3a3a3a, #4a4a4a);
}
[data-bs-theme="dark"] .carousel-progress-track {
  background: linear-gradient(135deg, #202020, #303030, #404040, #505050);
}

/* ===================================================================
       RESPONSIVE MEDIA QUERIES
       =================================================================== */
@media (min-width: 992px) {
  .Profile-Photo {
    height: 40rem;
  }
  .Introduction {
    min-height: 170px;
  }
}

@media (max-width: 991px) {
  .Profile-Photo {
    height: 30rem;
  }
  .cardsize {
    flex: 0 0 calc(50% - 10px) !important;
    max-width: calc(50% - 10px) !important;
  }
}

@media (max-width: 767px) {
  .circle-container,
  .container {
    text-align: center;
  }
  .skills-category h3::after {
    left: 50%;
    transform: translateX(-50%);
  }
  .ButtonsContainer {
    justify-content: center !important;
  }
  .MainButton {
    min-width: 300px;
  }
  .skills-logos-container {
    justify-content: center;
    gap: 12px;
  }
  .skill-logo {
    width: 45px;
    height: 45px;
  }
  .carousel-container {
    padding: 10px 12px;
  }
  .cardsize {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
  .carousel-track .card {
    max-width: 450px;
    margin: 0 auto;
  }
}

@media (max-width: 576px) {
  .Profile-Photo {
    height: 25rem;
  }

  .skill-logo {
    width: 40px;
    height: 40px;
  }
}
