/* ===== Design System Variables ===== */
:root {
  --primary: #8b5cf6;
  --primary-light: #a78bfa;
  --primary-dark: #7c3aed;
  --accent: #ec4899;
  --bg-dark: #121212;
  --bg-card: #1e1e1e;
  --bg-card-hover: #2a2a2a;
  --text-light: #fff;
  --text-muted: #bbb;
  --text-body: #ddd;
  --shadow-sm: 0 4px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(139, 92, 246, 0.3);
  --transition-base: 0.3s ease;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset di base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  background: var(--bg-dark);
  color: var(--text-body);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== Scroll Progress Bar ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ===== Back to Top Button ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-smooth);
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.5);
}

/* ===== Navbar with Glassmorphism ===== */
.navbar {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 15px 30px;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  position: fixed;
  z-index: 1000;
  transition: all var(--transition-base);
}

.navbar .logo {
  flex: 0 0 auto;
  margin-right: 30px;
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff, var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar ul {
  flex: 1;
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.navbar ul li {
  margin: 0 8px;
}

.navbar ul li a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

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

.navbar ul li a:hover {
  color: #fff;
  background: rgba(139, 92, 246, 0.1);
}

.navbar ul li a:hover::after {
  width: 60%;
}

/* ===== Hero Section Enhanced ===== */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  /* Poster come sfondo immediato mentre il video carica */
  background: url("assets/hero/poster.webp") center center / cover no-repeat;
  background-color: #121212;
  /* Fallback color */
  z-index: 0;
}

#hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: 1;
  transition: opacity 0.5s ease;
}

#hero-video.video-loading {
  opacity: 0;
}

#hero-video.video-fading {
  opacity: 0.7;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  /* Filtro scuro */
  z-index: 2;
  /* Overlay sopra il video */
}

.hero-content {
  margin-top: 20px;
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
  color: #fff;
  padding: 0 20px;
}

.hero-card {
  background: rgba(0, 0, 0, 0.75);
  padding: 5px 40px;
  padding-bottom: 30px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  max-width: 80%;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin-bottom: 30px;
}

.hero a {
  background: #5210b4;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 600;
  transition: background 0.3s ease;
}

.hero a:hover {
  background: #681fd5;
}

/* Sezione About Me - Enhanced */
.about {
  padding: 80px 20px;
  background: linear-gradient(135deg, #050505, #1a0430);
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-card {
  background: rgba(8, 8, 12, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 20px;
  padding: 50px 40px;
  max-width: 700px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Animated gradient border */
.about-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    135deg,
    var(--primary),
    var(--accent),
    var(--primary)
  );
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
  border-radius: 22px;
  z-index: -1;
  opacity: 0.3;
}

/* Profile Photo */
.about-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
  margin-bottom: 25px;
  transition: all 0.4s ease;
}

.about-photo:hover {
  transform: scale(1.05);
  box-shadow: 0 0 50px rgba(139, 92, 246, 0.5);
  border-color: var(--accent);
}

.about-card h2 {
  font-size: 2.2rem;
  margin-bottom: 25px;
  color: #fff;
}

.about-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.about-quote {
  font-style: italic;
  position: relative;
  padding: 20px 30px;
  background: rgba(139, 92, 246, 0.05);
  border-left: 3px solid var(--primary);
  border-radius: 0 10px 10px 0;
  margin: 25px 0 !important;
}

.about-cta {
  font-size: 1.3rem !important;
  font-weight: 600;
  color: var(--text-light) !important;
  margin-top: 20px !important;
}

/* Contact section (keep original) */
.contact {
  padding: 60px 20px;
  background: linear-gradient(135deg, #191919, rgb(45, 11, 80));
  color: #ddd;
  text-align: center;
}

/* Sezione Progetti */
.projects {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.projects h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 3.5rem;
  color: #fff;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid rgba(139, 92, 246, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.4s ease-out;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  position: relative;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(139, 92, 246, 0.3);
}

.project-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 3/2;
  /* Proporzione compatibile con 1152 × 768 */
  object-fit: contain;
}

.project-card .card-content {
  padding: 20px;
  color: #ddd;
}

.project-card .card-content h3 {
  margin-bottom: 10px;
}

.project-card .card-content p {
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.project-card .card-content a {
  display: inline-block;
  background: #5210b4;
  color: #fff;
  padding: 8px 15px;
  border-radius: 5px;
  font-weight: 500;
  transition: background 0.3s ease;
}

.project-card .card-content a:hover {
  background: #9727cf;
}

.contact h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
}

.contact-mail-container {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.contact-mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 5px;
  background: #6814c1;
  padding: 20px 30px;
  border-radius: 40px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  transition:
    background 0.3s ease,
    transform 0.3s ease;
}

.contact-mail i {
  font-size: 1.8rem;
}

.contact-mail:hover {
  background: rgb(178, 18, 196);
  transform: scale(1.03);
}

.contact-socials {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.contact-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 50%;
  text-decoration: none;
  color: #fff;
  transition:
    background 0.3s ease,
    transform 0.3s ease;
  font-size: 1.8rem;
}

.contact-social:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  background: #222;
  color: #bbb;
}

/* Logo immagine circolare */
.logo-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
  vertical-align: middle;
}


@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
}

.project-card .card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.button-row {
  display: flex !important;
  gap: 10px !important;
  /* Spazio orizzontale tra i due bottoni */
  margin-top: 10px !important;
}

/* Se vuoi uniformare lo stile dei bottoni, puoi aggiungere regole extra */
.button-row a {
  display: inline-flex !important;
  flex: 1 !important;
  /* Entrambi i link occuperanno la stessa larghezza */
  align-items: center !important;
  justify-content: space-between !important;
  /* Testo a sinistra, icona a destra */
}

footer a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: rgb(178, 18, 196);
  /* Hover: viola */
}

.language-toggle {
  flex: 0 0 30% !important;
  margin-left: 20px;
  /* Distanza dal menu se serve */
  justify-content: flex-end;
}

.language-toggle input[type="checkbox"] {
  display: none;
}

.language-toggle .toggle {
  margin-left: auto !important;
  display: inline-block;
  position: relative;
  width: 70px;
  /* Aumentato da 60px a 70px */
  height: 34px;
  /* Aumentato da 30px a 34px */
  background: #444;
  border-radius: 34px;
  cursor: pointer;
}

/* Pallino bianco */
.language-toggle .toggle-switch {
  position: absolute;
  z-index: 0;
  /* Metti il pallino sotto la bandiera */
  top: 3px;
  left: 3px;
  width: 28px;
  /* Larghezza pallino */
  height: 28px;
  /* Altezza pallino */
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

/* Bandiera IT a sinistra */
.language-toggle .toggle::before {
  z-index: 1;
  /* Metti il pallino sotto la bandiera */
  content: "";
  position: absolute;
  top: 50%;
  left: 6px;
  /* Più spazio dal bordo sinistro */
  transform: translateY(-50%);
  width: 22px;
  height: 15px;
  background: url("https://flagcdn.com/h20/it.png") no-repeat center/cover;
  border: 1px solid #fff;
  border-radius: 2px;
}

/* Bandiera UK a destra */
.language-toggle .toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 6px;
  /* Più spazio dal bordo destro */
  transform: translateY(-50%);
  width: 22px;
  height: 15px;
  background: url("https://flagcdn.com/h20/gb.png") no-repeat center/cover;
  border: 1px solid #fff;
  border-radius: 2px;
}

/* Quando è selezionato (lingua EN), pallino si sposta a destra */
.language-toggle input[type="checkbox"]:checked + .toggle .toggle-switch {
  transform: translateX(36px);
  /* Adattato alla nuova larghezza */
}

/* Opacità bandiere (opzionale) */
.language-toggle input[type="checkbox"]:checked + .toggle::before {
  opacity: 0.3;
  /* IT bandiera trasparente */
}

.language-toggle input[type="checkbox"]:not(:checked) + .toggle::after {
  opacity: 0.3;
  /* UK bandiera trasparente quando non selezionata */
}

/* Sezione Certificazioni */
.certifications {
  padding: 60px 20px;
  background: linear-gradient(135deg, #191919, #2d0b50);
  color: #ddd;
  text-align: center;
}

.certifications-container {
  max-width: 1000px;
  margin: 0 auto;
}

.certifications h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: #fff;
}

.cert-swiper {
  width: 100%;
  padding: 20px 0 50px;
  overflow: hidden;
}

/* Desktop Grid Restoration */
@media (min-width: 768px) {
  .cert-swiper {
    padding: 0;
    overflow: visible;
  }

  /* Hide loop duplicates in grid mode */
  .swiper-slide-duplicate {
    display: none !important;
  }

  .certification-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    /* Auto-fit for better width */
    column-gap: 30px;
    /* Restored detailed gap */
    row-gap: 30px;
    /* Vertical gap */
    width: 100% !important;
    transform: none !important;
    /* Reset swiper transform */
  }

  .swiper-slide {
    width: 100% !important;
    /* Force fill grid cell */
    height: auto !important;
    margin-right: 0 !important;
  }

  /* Hide Swiper controls on desktop */
  .swiper-pagination,
  .swiper-button-next,
  .swiper-button-prev {
    display: none !important;
  }
}


.certification-list {
  box-sizing: border-box;
  display: flex;
  width: 100%;
}

.swiper-slide {
  flex-shrink: 0;
  width: 100%;
  /* Default: fill container */
  height: auto;
  position: relative;
  transition-property: transform;
}

/* Mobile: carousel peek effect */
@media (max-width: 767px) {
  .swiper-slide {
    width: 70% !important;
    /* Show partial next/prev slides */
  }
}

/* Base Card Style */
.certification-card {
  background: #1e1e1e;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  opacity: 1 !important;
  /* Force visible */
  min-height: 200px;
  /* Safety height */
  transition: transform 0.3s;
}

.certification-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(139, 92, 246, 0.4);
}

/* Swiper Customization */
.swiper-button-next,
.swiper-button-prev {
  color: var(--primary) !important;
}

.swiper-pagination-bullet {
  background: #bbb !important;
}

.swiper-pagination-bullet-active {
  background: var(--primary) !important;
}

.cert-thumb {
  width: 100%;
  height: auto;
  cursor: pointer;
  transition: transform 0.3s;
}

.cert-thumb:hover {
  transform: scale(1.02);
}

.cert-info {
  padding: 15px;
  text-align: center;
}

.cert-info h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.cert-info p {
  color: #bbb;
  font-size: 0.9rem;
}

/* Lightbox Styles */
.cert-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
}

.cert-modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.cert-modal-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  transition: color 0.3s;
}

.cert-modal-close:hover {
  color: #bbb;
}

@media (max-width: 900px) {
  .navbar {
    flex-direction: column;
    padding: 10px 15px;
    gap: 8px;
  }

  .navbar .logo {
    width: 100%;
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 5px;
    justify-content: center;
  }

  .navbar .logo-img {
    width: 30px;
    height: 30px;
  }

  .navbar ul {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    gap: 4px;
    margin: 0;
  }

  .navbar ul li {
    margin: 0 2px;
  }

  .navbar ul li a {
    font-size: 0.8rem;
    padding: 6px 10px;
    border-radius: 6px;
  }

  .navbar ul li a::after {
    display: none;
    /* Hide underline animation on mobile */
  }

  .language-toggle {
    margin-top: 8px;
    margin-bottom: 0;
  }

  /* Hide "Home" on mobile */
  .navbar ul li:first-child {
    display: none;
  }

  .hero-card {
    margin: auto;
  }
}

/* ===== ENHANCED ANIMATIONS & EFFECTS ===== */

/* Animated Gradient Border for Hero Card */
@keyframes gradientBorder {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.hero-card {
  position: relative;
  background: rgba(18, 18, 18, 0.9) !important;
  border: 2px solid transparent;
  background-clip: padding-box !important;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -3px;
  z-index: -1;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    var(--primary),
    var(--accent),
    var(--primary-light),
    var(--primary)
  );
  background-size: 300% 300%;
  animation: gradientBorder 4s ease infinite;
  opacity: 0.8;
}

/* Hero Title Gradient Text */
.hero h1 {
  color: var(--text-light);
  background: linear-gradient(
    135deg,
    var(--text-light),
    var(--primary-light),
    var(--accent)
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientText 3s ease infinite;
}

@keyframes gradientText {
  0%,
  100% {
    background-position: 0% center;
  }

  50% {
    background-position: 100% center;
  }
}

/* Enhanced Hero CTA Button */
.hero-card > a {
  background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-smooth) !important;
}

.hero-card > a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.hero-card > a:hover::before {
  left: 100%;
}

.hero-card > a:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}


/* ===== ENHANCED PROJECT CARDS ===== */

/* Image Container with Overlay */
.project-card .img-container {
  position: relative;
  overflow: hidden;
}

.project-card .img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.8),
    rgba(236, 72, 153, 0.8)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition:
    opacity 0.4s ease-out,
    transform 0.4s ease-out;
}

.project-card:hover .img-overlay {
  opacity: 1;
}

.project-card .img-overlay i {
  font-size: 3rem;
  color: white;
  transform: scale(0.5);
  transition: transform var(--transition-smooth);
}

.project-card:hover .img-overlay i {
  transform: scale(1);
}

/* Tech Tags with Category Colors */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tech-tag {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Category: Web App - Cyan */
.tech-tag.webapp {
  background: rgba(6, 182, 212, 0.2);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.4);
}

/* Category: Game - Red */
.tech-tag.game {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Category: Desktop - Blue */
.tech-tag.desktop {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

/* Category: Tool - Orange */
.tech-tag.tool {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.4);
}

/* Category: Research - Yellow */
.tech-tag.research {
  background: rgba(234, 179, 8, 0.2);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

/* Category: Finance - Green */
.tech-tag.finance {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

/* Category: AI - Violet */
.tech-tag.ai {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

/* Technology tags - inherit category color or use default violet */
.tech-tag.tech {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Description tags - Light Gray */
.tech-tag.desc {
  background: rgba(156, 163, 175, 0.2);
  color: #d1d5db;
  border: 1px solid rgba(156, 163, 175, 0.4);
}

/* ===== TAG TOOLTIPS ===== */
.tech-tag {
  position: relative;
  cursor: help;
}

.tech-tag::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-5px);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 400;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 100;
  pointer-events: none;
}

.tech-tag:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-8px);
}


/* ===== PROJECT FILTER ===== */
.project-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.filter-btn {
  background: transparent;
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: var(--text-muted);
  padding: 10px 20px;
  /* Increased size */
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  /* Slightly larger text */
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
  color: var(--text-light);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

/* Category Border Colors for Buttons */
.filter-btn[data-filter="webapp"] {
  border-color: rgba(6, 182, 212, 0.5);
}

.filter-btn[data-filter="game"] {
  border-color: rgba(239, 68, 68, 0.5);
}

.filter-btn[data-filter="desktop"] {
  border-color: rgba(59, 130, 246, 0.5);
}

.filter-btn[data-filter="tool"] {
  border-color: rgba(249, 115, 22, 0.5);
}

.filter-btn[data-filter="research"] {
  border-color: rgba(234, 179, 8, 0.5);
}

.filter-btn[data-filter="finance"] {
  border-color: rgba(34, 197, 94, 0.5);
}

/* Category specific Hover Effects */
.filter-btn[data-filter="all"]:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.8);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.filter-btn[data-filter="webapp"]:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.8);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.filter-btn[data-filter="game"]:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.8);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.filter-btn[data-filter="desktop"]:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.filter-btn[data-filter="tool"]:hover {
  background: rgba(249, 115, 22, 0.15);
  border-color: rgba(249, 115, 22, 0.8);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.3);
}

.filter-btn[data-filter="research"]:hover {
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.8);
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.3);
}

.filter-btn[data-filter="finance"]:hover {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.8);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

/* Filter category colors on active */
.filter-btn.active[data-filter="webapp"] {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.filter-btn.active[data-filter="game"] {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.filter-btn.active[data-filter="desktop"] {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.filter-btn.active[data-filter="tool"] {
  background: linear-gradient(135deg, #f97316, #ea580c);
}

.filter-btn.active[data-filter="research"] {
  background: linear-gradient(135deg, #eab308, #ca8a04);
}

.filter-btn.active[data-filter="finance"] {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

/* Hidden project cards when filtered */
.project-card.hidden {
  display: none !important;
}

/* Enhanced Card Buttons */
.project-card .card-content a {
  background: linear-gradient(
    135deg,
    var(--primary),
    var(--primary-dark)
  ) !important;
  transition: all var(--transition-smooth) !important;
  position: relative;
  overflow: hidden;
}

.project-card .card-content a:hover {
  background: linear-gradient(
    135deg,
    var(--primary-light),
    var(--primary)
  ) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

/* ===== SCROLL ANIMATIONS ===== */

.project-card.animate-in {
  animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* Section Title Gradient */
.projects h2,
.about h2,
.certifications h2 {
  color: var(--text-light);
  background: linear-gradient(135deg, var(--text-light), var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cert-thumb:hover {
  transform: scale(1.05) !important;
}

/* ===== ENHANCED CONTACT SECTION ===== */

.contact-mail {
  background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
  transition: all var(--transition-smooth) !important;
}

.contact-mail:hover {
  background: linear-gradient(
    135deg,
    var(--primary-light),
    var(--accent)
  ) !important;
  transform: scale(1.05) !important;
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
}

.contact-social {
  background: rgba(139, 92, 246, 0.15) !important;
  border: 1px solid rgba(139, 92, 246, 0.2);
  transition: all var(--transition-smooth) !important;
}

.contact-social:hover {
  background: rgba(139, 92, 246, 0.3) !important;
  transform: scale(1.15) translateY(-3px) !important;
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

/* ===== MOBILE RESPONSIVE FILTER BUTTONS ===== */
@media (max-width: 768px) {
  .project-filter {
    gap: 6px;
    margin-bottom: 20px;
  }

  .filter-btn {
    padding: 5px 10px;
    font-size: 0.7rem;
    gap: 3px;
  }
}

/* Increase Section Titles size on Desktop */
@media (min-width: 768px) {
  .projects h2,
  .certifications h2,
  .about h2.section-title {
    font-size: 3.5rem !important;
    text-align: center !important;
  }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  /* Widen About Card & Reduce Text */
  .about-card {
    padding: 30px 20px !important;
    width: 95% !important;
    margin: 0 auto;
  }

  .about-content p {
    font-size: 0.95rem !important;
  }

  .about-quote {
    font-size: 0.95rem !important;
    padding: 15px 20px !important;
  }

  .about-cta {
    font-size: 1.1rem !important;
  }

  /* Consistent Section Titles on Mobile */
  .section-title,
  .projects h2,
  .certifications h2,
  .about h2,
  .contact h2 {
    font-size: 2.2rem !important;
    margin-bottom: 30px !important;
    text-align: center;
  }
}
