:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #ec4899;
  --accent: #14b8a6;
  --dark: #0f172a;
  --dark-light: #1e293b;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --surface: #1e293b;
  --surface-light: #334155;
}

/* Light Mode Variables */
[data-theme="light"] {
  --dark: #eceadd;
  --dark-light: #f5f4ed;
  --text: #018577;
  --text-muted: #4a9b8e;
  --surface: #f5f4ed;
  --surface-light: #e5e3d6;
  --primary: #018577;
  --primary-dark: #016b60;
  --secondary: #14b8a6;
  --accent: #14b8a6;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--dark);
  color: var(--text);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Skip Navigation Link for Accessibility */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  transform: translateY(-100%);
  background: rgb(99, 102, 241);
  color: white;
  padding: 12px 20px;
  text-decoration: none;
  z-index: 99999;
  font-weight: 600;
  font-size: 15px;
  border-radius: 0 0 8px 0;
  transition: transform 0.3s ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid white;
  outline-offset: -2px;
}

.skip-link:hover {
  background: rgb(79, 70, 229);
}

/* Light mode skip link */
[data-theme="light"] .skip-link {
  background: rgb(1, 133, 119);
}

[data-theme="light"] .skip-link:hover {
  background: rgb(1, 107, 96);
}

/* Improved Focus Indicators */
/* Force focus on all interactive elements */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
[tabindex]:focus {
  outline: 3px solid var(--primary) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.5) !important;
  background: rgba(99, 102, 241, 0.1) !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--primary) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.5) !important;
  background: rgba(99, 102, 241, 0.1) !important;
}

/* Make sure interactive elements are always focusable */
a,
button,
input,
textarea,
select {
  position: relative;
}

/* Make all links and buttons clearly focusable */
a,
button,
[role="button"],
.nav-hamburger {
  outline: none !important;
}

a:focus,
button:focus,
[role="button"]:focus,
.nav-hamburger:focus {
  outline: 3px solid var(--primary) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.5) !important;
}

/* Light mode borders */
[data-theme="light"] nav,
[data-theme="light"] .service-card,
[data-theme="light"] .project-item,
[data-theme="light"] .skill-item,
[data-theme="light"] .contact-item {
  border-color: rgba(1, 133, 119, 0.15);
}

[data-theme="light"] .service-card {
  box-shadow: 0 4px 20px rgba(1, 133, 119, 0.08);
}

[data-theme="light"] .project-item {
  box-shadow: 0 4px 20px rgba(1, 133, 119, 0.08);
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 30%,
      rgba(99, 102, 241, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(236, 72, 153, 0.1) 0%,
      transparent 50%
    );
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] body::before {
  background: radial-gradient(
      circle at 20% 30%,
      rgba(1, 133, 119, 0.04) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(20, 184, 166, 0.05) 0%,
      transparent 50%
    );
}

/* Light mode - override indigo colors to teal */
[data-theme="light"] .theme-toggle:hover {
  background: rgba(1, 133, 119, 0.1);
}

[data-theme="light"] .lang-btn:hover {
  background: rgba(1, 133, 119, 0.1);
}

[data-theme="light"] .hero-badge {
  background: rgba(1, 133, 119, 0.1);
}

[data-theme="light"] .section-label {
  background: rgba(1, 133, 119, 0.1);
}

[data-theme="light"] .service-icon {
  background: rgba(1, 133, 119, 0.1);
}

[data-theme="light"] .contact-icon {
  background: rgba(1, 133, 119, 0.1);
}

[data-theme="light"] .btn-primary {
  box-shadow: 0 10px 30px rgba(1, 133, 119, 0.3);
}

[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 15px 40px rgba(1, 133, 119, 0.4);
}

[data-theme="light"] .service-card:hover {
  box-shadow: 0 20px 60px rgba(1, 133, 119, 0.2);
}

[data-theme="light"] .skill-item:hover .skill-box {
  box-shadow: 0 20px 60px rgba(1, 133, 119, 0.2);
}

section {
  padding: clamp(60px, 8vw, 100px) clamp(20px, 6vw, 80px);
  position: relative;
  z-index: 1;
}

/* Navigation - CONVERTED TO GRID */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  justify-items: center;
  padding: 0 clamp(20px, 5vw, 80px);
  background: rgb(15, 23, 42);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="light"] nav {
  background: #eceadd !important;
  border-bottom: 1px solid rgba(1, 133, 119, 0.15) !important;
  box-shadow: 0 2px 10px rgba(1, 133, 119, 0.08) !important;
}

[data-theme="light"] nav .nav-logo a {
  background: linear-gradient(135deg, #018577 0%, #14b8a6 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

[data-theme="light"] nav .nav-item a {
  color: #4a9b8e !important;
}

[data-theme="light"] nav .nav-item a:hover,
[data-theme="light"] nav .nav-item a.active {
  color: #018577 !important;
}

[data-theme="light"] nav .nav-hamburger span {
  background: #018577 !important;
  transition: all 0.3s ease;
}

nav .nav-logo a {
  font-size: 32px;
  font-weight: 400;
  text-decoration: none;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: "Anton SC", sans-serif;
  font-style: normal;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

nav .nav-logo a:hover {
  opacity: 0.8;
}

/* Nav Item - CONVERTED TO GRID */
nav .nav-item {
  display: grid;
  grid-template-columns: repeat(6, auto) auto;
  gap: 40px;
  align-items: center;
  justify-content: end;
  justify-self: end;
}

nav .nav-item a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  font-family: "Poppins", sans-serif;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  position: relative;
}

nav .nav-item a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  transition: width 0.3s ease;
}

nav .nav-item a:hover,
nav .nav-item a.active {
  color: var(--text);
}

nav .nav-item a:hover::after,
nav .nav-item a.active::after {
  width: 100%;
}

nav .nav-hamburger {
  display: none;
  grid-template-rows: repeat(3, auto);
  gap: 6px;
  cursor: pointer;
  justify-self: end;
  width: 44px;
  height: 44px;
  padding: 7px;
  box-sizing: border-box;
}

nav .nav-hamburger span {
  width: 30px;
  height: 3px;
  background: var(--text);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Nav Controls - CONVERTED TO GRID */
.nav-controls {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 12px;
  margin-left: 20px;
  padding-left: 20px;
  border-left: none;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: rgba(99, 102, 241, 0.1);
  transform: scale(1.05);
}

.theme-toggle i {
  position: absolute;
  font-size: 16px;
  transition: all 0.3s ease;
}

.theme-toggle .fa-sun {
  color: #fbbf24;
  opacity: 0;
  transform: rotate(-90deg) scale(0);
}

.theme-toggle .fa-moon {
  color: #94a3b8;
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-toggle .fa-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-toggle .fa-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0);
}

[data-theme="light"] .theme-toggle {
  border-color: rgba(0, 0, 0, 0.1);
}

/* Language Switcher - CONVERTED TO GRID */
.language-switcher {
  display: grid;
  grid-template-columns: auto auto;
  gap: 8px;
  background: var(--surface);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-btn {
  padding: 8px 14px;
  min-height: 36px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-family: "Space Mono", monospace;
}

.lang-btn:hover {
  color: var(--text);
  background: rgba(99, 102, 241, 0.1);
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
}

/* Hero Section - CONVERTED TO GRID */
#home {
  min-height: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
  padding-top: 120px;
}

.hero-content {
  animation: fadeInUp 0.8s ease;
  padding-top: 20px;
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--primary);
  border-radius: 50px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
  }
}

@keyframes pulse-teal {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(1, 133, 119, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(1, 133, 119, 0);
  }
}

[data-theme="light"] .hero-badge {
  animation: pulse-teal 2s infinite;
}

/* Light mode - Hero name gradient (Teal gradient) */
[data-theme="light"] .hero-name {
  background: linear-gradient(135deg, #018577 0%, #14b8a6 50%, #2dd4bf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Light mode - All gradient elements use teal gradient */
[data-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #018577 0%, #14b8a6 100%);
}

[data-theme="light"] .lang-btn.active {
  background: linear-gradient(135deg, #018577 0%, #14b8a6 100%);
}

[data-theme="light"] .service-card.featured {
  background: linear-gradient(135deg, #018577 0%, #14b8a6 100%);
}

[data-theme="light"] .service-card::before {
  background: linear-gradient(135deg, #018577 0%, #14b8a6 100%);
}

[data-theme="light"] .stat-number {
  background: linear-gradient(135deg, #018577 0%, #14b8a6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .floating-card i {
  background: linear-gradient(135deg, #018577 0%, #14b8a6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(1, 133, 119, 0.5));
}

[data-theme="light"] .floating-card:hover {
  box-shadow: 0 15px 50px rgba(1, 133, 119, 0.4) !important;
  border-color: #018577 !important;
  z-index: 10 !important;
}

[data-theme="light"] .floating-card:hover i {
  filter: drop-shadow(0 0 12px rgba(1, 133, 119, 0.8));
}

[data-theme="light"] .overlay-detail-project .right h1 {
  background: linear-gradient(135deg, #018577 0%, #14b8a6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .overlay-detail-project .right a {
  background: linear-gradient(135deg, #018577 0%, #14b8a6 100%);
}

[data-theme="light"] nav .nav-item a::after {
  background: linear-gradient(135deg, #018577 0%, #14b8a6 100%);
}

[data-theme="light"] .btn-secondary:hover {
  background: #018577;
  border-color: #018577;
  color: white;
}

[data-theme="light"] .hero-name {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
  color: #018577;
}

.hero-greeting {
  font-size: 22px;
  color: var(--text-muted);
  font-weight: 400;
  font-family: "Poppins", sans-serif;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.hero-name {
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 400;
  font-family: "Anton SC", sans-serif;
  font-style: normal;
  letter-spacing: clamp(1px, 0.2vw, 2px);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  line-height: 1;
}

.hero-title {
  font-size: clamp(22px, 3vw, 34px);
  color: var(--text);
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  margin-bottom: 20px;
  line-height: 1.3;
}

.hero-description {
  font-size: clamp(14px, 1.5vw, 17px);
  color: var(--text-muted);
  font-weight: 400;
  font-family: "Poppins", sans-serif;
  line-height: 1.8;
  max-width: clamp(280px, 80%, 600px);
  margin-bottom: 40px;
}

/* Hero CTA - CONVERTED TO GRID */
.hero-cta {
  display: grid;
  grid-template-columns: auto auto;
  gap: 20px;
  justify-content: start;
}

.btn {
  padding: 14px 32px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  font-family: "Poppins", sans-serif;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  height: 550px;
  display: grid;
  place-items: center;
}

.hero-circle {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  opacity: 0.2;
  filter: blur(80px);
  animation: float 6s ease-in-out infinite;
}

/* Floating Cards - CONVERTED TO GRID */
.floating-card {
  position: absolute;
  background: var(--surface);
  padding: 20px 30px;
  border-radius: 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  cursor: pointer;
  z-index: 1;
}

.floating-card:hover {
  transform: scale(1.05) translateY(-5px) !important;
  box-shadow: 0 15px 50px rgba(99, 102, 241, 0.4) !important;
  border-color: var(--primary) !important;
  z-index: 10 !important;
}

.floating-card i {
  font-size: 28px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
  transition: filter 0.3s ease;
}

.floating-card:hover i {
  filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.8));
}

.floating-card span {
  font-size: 16px;
  font-weight: 600;
}

.card-1 {
  top: 10%;
  right: 35%;
  animation: float 4s ease-in-out infinite;
}

.card-1 i {
  animation: spin-pulse 3s ease-in-out infinite;
}

.card-2 {
  bottom: 15%;
  right: 5%;
  animation: float 5s ease-in-out infinite;
  animation-delay: 1s;
}

.card-2 i {
  animation: shake 2.5s ease-in-out infinite;
  animation-delay: 0.5s;
}

.card-3 {
  bottom: 15%;
  left: 10%;
  animation: float 6s ease-in-out infinite;
  animation-delay: 2s;
}

.card-3 i {
  animation: rocket-launch 3s ease-in-out infinite;
  animation-delay: 1s;
}

.card-4 {
  top: 5%;
  right: 5%;
  animation: float 4.5s ease-in-out infinite;
  animation-delay: 0.5s;
}

.card-4 i {
  animation: shield-pulse 3.5s ease-in-out infinite;
  animation-delay: 0.8s;
}

.card-5 {
  top: 42%;
  left: 15%;
  animation: float 5.5s ease-in-out infinite;
  animation-delay: 1.5s;
}

.card-5 i {
  animation: paint-brush 3s ease-in-out infinite;
  animation-delay: 1.2s;
}

.card-6 {
  bottom: 45%;
  right: 15%;
  animation: float 5s ease-in-out infinite;
  animation-delay: 2.5s;
}

.card-6 i {
  animation: database-sync 4s ease-in-out infinite;
  animation-delay: 1.8s;
}

/* Icon Animations */
@keyframes spin-pulse {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(-10deg) scale(1.1);
  }
  50% {
    transform: rotate(10deg) scale(1.15);
  }
  75% {
    transform: rotate(-5deg) scale(1.1);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-3px) rotate(-5deg);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(3px) rotate(5deg);
  }
}

@keyframes rocket-launch {
  0%,
  100% {
    transform: translateY(0) rotate(-45deg);
  }
  50% {
    transform: translateY(-15px) rotate(-35deg);
  }
}

@keyframes shield-pulse {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(1.15) rotate(-5deg);
  }
  50% {
    transform: scale(1.25) rotate(0deg);
  }
  75% {
    transform: scale(1.15) rotate(5deg);
  }
}

@keyframes paint-brush {
  0%,
  100% {
    transform: rotate(0deg) translateX(0);
  }
  20% {
    transform: rotate(-20deg) translateX(-4px);
  }
  40% {
    transform: rotate(20deg) translateX(4px);
  }
  60% {
    transform: rotate(-15deg) translateX(-3px);
  }
  80% {
    transform: rotate(15deg) translateX(3px);
  }
}

@keyframes database-sync {
  0% {
    transform: rotateY(0deg) scale(1);
  }
  25% {
    transform: rotateY(180deg) scale(1.15);
  }
  50% {
    transform: rotateY(360deg) scale(1);
  }
  75% {
    transform: rotateY(540deg) scale(1.15);
  }
  100% {
    transform: rotateY(720deg) scale(1);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

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

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-label {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--primary);
  border-radius: 50px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.section-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  margin-bottom: 15px;
  line-height: 1.2;
}

.section-description {
  font-size: 17px;
  font-weight: 400;
  font-family: "Poppins", sans-serif;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* About Section */
#about {
  background: var(--surface);
  border-radius: 30px;
  margin: 0 clamp(20px, 6vw, 80px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Team Grid Layout */
.team-grid {
  display: grid;
  gap: 30px;
  margin-bottom: 50px;
}

/* Desktop and Tablet (768px and up) - 2 columns */
@media (min-width: 768px) {
  .team-grid {
    grid-template-columns: 1fr 1.5fr;
  }

  .team-card:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }

  .expertise-card:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }

  .team-card:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
  }

  .expertise-card:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
  }
}

/* Mobile (less than 768px) - 1 column */
@media (max-width: 767px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* Team Card (Person) - CONVERTED TO GRID */
.team-card {
  background: var(--dark);
  border-radius: 30px;
  padding: clamp(25px, 4vw, 40px);
  display: grid;
  grid-template-rows: auto auto;
  place-items: center;
  gap: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Team card gradient border on hover (like project cards) */
.team-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 30px;
  padding: 2px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.25);
  border-color: transparent;
}

[data-theme="light"] .team-card:hover {
  box-shadow: 0 20px 60px rgba(1, 133, 119, 0.25);
}

.team-photo {
  position: relative;
  width: 140px;
  height: 140px;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

.experience-badge {
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  padding: 10px 18px;
  border-radius: 30px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.experience-badge i {
  color: #fbbf24;
  font-size: 14px;
}

.experience-badge span {
  font-size: 12px;
  font-weight: 600;
}

.team-info {
  text-align: center;
}

.team-info h3 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.team-role {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 400;
  margin: 0;
}

/* Expertise Card - CONVERTED TO GRID */
.expertise-card {
  background: var(--dark);
  border-radius: 30px;
  padding: clamp(30px, 5vw, 50px);
  display: grid;
  align-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Expertise card gradient border on hover */
.expertise-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 30px;
  padding: 2px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

.expertise-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.25);
  border-color: transparent;
}

[data-theme="light"] .expertise-card:hover {
  box-shadow: 0 20px 60px rgba(1, 133, 119, 0.25);
}

.expertise-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 30px;
}

.expertise-text {
  max-width: 100%;
}

.expertise-text p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-muted);
  text-align: left;
  margin: 0;
}

/* Stats - CONVERTED TO GRID */
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 0;
}

.stat-item {
  text-align: center;
  padding: 30px;
  background: var(--dark);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
  display: block;
  font-size: 48px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.stat-label {
  display: block;
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

/* Service Card - CONVERTED TO GRID */
.service-card {
  background: var(--surface);
  padding: clamp(25px, 4vw, 40px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 110px 1fr auto;
  gap: 15px;
  min-height: 520px;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
}

.service-card.featured {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border: none;
}

.featured-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.service-icon {
  width: 70px;
  height: 70px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 16px;
  display: grid;
  place-items: center;
}

.service-card.featured .service-icon {
  background: rgba(255, 255, 255, 0.2);
}

.service-icon i {
  font-size: 32px;
  color: var(--primary);
}

.service-card.featured .service-icon i {
  color: white;
}

.service-card h3 {
  font-size: 24px;
  font-weight: 700;
  min-height: 60px;
  display: grid;
  align-items: center;
  margin: 0;
  padding: 0;
}

.service-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
}

.service-card.featured p {
  color: rgba(255, 255, 255, 0.9);
}

.service-features {
  list-style: none;
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 120px;
  margin: 0;
  padding: 0;
  width: 100%;
}

.service-features li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  min-height: 24px;
  padding: 0;
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  align-items: center;
  width: 100%;
}

.service-features li i {
  font-size: 11px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  align-self: flex-start;
  margin-top: 2px;
}

.service-features li span {
  line-height: 1.6;
  display: block;
  align-self: center;
}

.service-card.featured .service-features li {
  color: rgba(255, 255, 255, 0.9);
}

.service-features i {
  color: var(--accent);
}

.service-card.featured .service-features i {
  color: white;
}

/* Projects Section */
#projects {
  background: var(--surface);
  border-radius: 30px;
  margin: 0 clamp(20px, 6vw, 80px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Project Filters - CONVERTED TO GRID */
.project-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, auto));
  justify-content: center;
  gap: 12px;
  margin-bottom: 50px;
}

.filter-btn {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--surface);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn i {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.filter-btn:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  color: var(--text);
}

.filter-btn:hover i {
  transform: scale(1.1);
}

.filter-btn.active {
  background: var(--primary);
  border-color: transparent;
  color: white;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.filter-btn.active i {
  transform: scale(1.1);
}

/* Light mode filter buttons */
[data-theme="light"] .filter-btn.active {
  background: #018577;
  box-shadow: 0 8px 24px rgba(1, 133, 119, 0.4);
}

.projects-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

/* ============================================
   PROJECT CARDS - PROPER GRID LAYOUT
   ============================================ */

/* Project Item Container */
.project-item {
  background: var(--dark);
  border-radius: 20px;
  padding: 28px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease,
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  position: relative;
  overflow: hidden;
  min-width: 0;
  width: 100%;
}

.project-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 2px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-item:hover::before {
  opacity: 1;
}

.project-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.25);
  border-color: transparent;
}

[data-theme="light"] .project-item:hover {
  box-shadow: 0 20px 60px rgba(1, 133, 119, 0.25);
}

/* Project Header - Logo + Title (Horizontal) */
.project-header {
  display: grid;
  grid-template-columns: 65px 1fr;
  gap: 14px;
  align-items: center;
}

.project-icon {
  width: 65px;
  height: 65px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 14px;
  display: grid;
  place-items: center;
  padding: 13px;
}

.project-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.project-title-large {
  font-size: 26px;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  line-height: 1.2;
  margin: 0;
}

/* Project Content - Badge + Description */
.project-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Hide duplicate title */
.project-title {
  display: none;
}

.project-category {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 18px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  font-family: "Poppins", sans-serif;
  width: fit-content;
}

.project-category i {
  font-size: 9px;
}

/* Category Colors */
.project-category.purple {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.project-category.pink {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.project-category.cyan {
  background: rgba(34, 211, 238, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(34, 211, 238, 0.3);
}

.project-description {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Project Footer - Tech Stack at Bottom */
.project-footer {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  align-self: end;
}

.project-tech {
  font-size: 12px;
  color: var(--text-muted);
  font-family: "Poppins", sans-serif;
  line-height: 1.5;
}

.project-tech span {
  font-weight: 500;
}

/* Light Mode Category Colors */
[data-theme="light"] .project-category.purple {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

[data-theme="light"] .project-category.pink {
  background: rgba(236, 72, 153, 0.1);
  color: #db2777;
  border: 1px solid rgba(236, 72, 153, 0.2);
}

[data-theme="light"] .project-category.cyan {
  background: rgba(6, 182, 212, 0.1);
  color: #0891b2;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

[data-theme="light"] .project-footer {
  border-top: 1px solid rgba(1, 133, 119, 0.15);
}

/* Project Overlay - CONVERTED TO GRID */
.overlay-detail-project {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  display: none;
  place-items: center;
  z-index: 9999;
  padding: 40px;
}

.overlay-detail-project .detail {
  background: var(--surface);
  border-radius: 24px;
  padding: 50px;
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.overlay-detail-project .close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--dark);
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.overlay-detail-project .close:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: rotate(90deg);
}

.overlay-detail-project .close i {
  font-size: 20px;
  color: var(--text);
}

/* Overlay Scroll - CONVERTED TO GRID */
.overlay-detail-project .scroll {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 40px;
}

.overlay-detail-project .left {
  display: grid;
  gap: 20px;
  align-content: start;
}

.overlay-detail-project .left img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.overlay-detail-project .right {
  display: grid;
  align-content: start;
  gap: 20px;
}

.overlay-detail-project .right h1 {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.overlay-detail-project .right p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.8;
}

.overlay-detail-project .right a {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  width: fit-content;
}

.overlay-detail-project .right a:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

/* Skills Section */
.skills-container {
  display: grid;
  justify-content: center;
}

.skills-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 30px;
  max-width: 1000px;
  width: 100%;
}

.skill-item {
  text-align: center;
  animation: float 5s ease-in-out infinite;
}

.skill-item:nth-child(2n) {
  animation-delay: 1s;
}

.skill-item:nth-child(3n) {
  animation-delay: 2s;
}

.skill-box {
  width: 140px;
  height: 140px;
  background: var(--surface);
  border-radius: 20px;
  display: grid;
  place-items: center;
  margin: 0 auto 15px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-item:hover .skill-box {
  transform: translateY(-10px);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
}

.skill-box img {
  width: 70%;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

.skill-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Contact Section */
#contact {
  background: var(--surface);
  border-radius: 30px;
  margin: 0 clamp(20px, 6vw, 80px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

/* Contact Item - CONVERTED TO GRID */
.contact-item {
  background: var(--dark);
  padding: 30px;
  border-radius: 20px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 25px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.contact-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.contact-item.whatsapp {
  border-color: rgba(37, 211, 102, 0.5);
}

.contact-item.whatsapp:hover {
  background: linear-gradient(135deg, #25d366 0%, #20b959 100%);
  box-shadow: 0 20px 60px rgba(37, 211, 102, 0.4);
}

.contact-item.email {
  border-color: rgba(99, 102, 241, 0.5);
}

.contact-item.email:hover {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.4);
}

.contact-item.github {
  border-color: rgba(88, 166, 255, 0.5);
}

.contact-item.github:hover {
  background: linear-gradient(135deg, #24292e 0%, #0d1117 100%);
  box-shadow: 0 20px 60px rgba(88, 166, 255, 0.4);
}

.contact-icon {
  width: 70px;
  height: 70px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 16px;
  display: grid;
  place-items: center;
}

.contact-item.whatsapp .contact-icon {
  background: rgba(37, 211, 102, 0.1);
}

.contact-item.github .contact-icon {
  background: rgba(88, 166, 255, 0.1);
}

.contact-icon i {
  font-size: 32px;
}

.contact-item.whatsapp .contact-icon i {
  color: #25d366;
}

.contact-item.email .contact-icon i {
  color: var(--primary);
}

.contact-item.github .contact-icon i {
  color: #58a6ff;
}

.contact-item:hover .contact-icon {
  background: rgba(255, 255, 255, 0.2);
}

.contact-item:hover .contact-icon i {
  color: white;
}

/* Contact Info - CONVERTED TO GRID */
.contact-info {
  display: grid;
  gap: 5px;
  align-content: center;
  min-width: 0;
  overflow: hidden;
}

.contact-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.contact-item:hover .contact-label {
  color: rgba(255, 255, 255, 0.8);
}

.contact-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.contact-item:hover .contact-value {
  color: white;
}

/* Footer - CONVERTED TO GRID */
footer {
  padding: 60px 80px 30px;
  background: var(--dark);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: 30px;
  gap: 20px;
}

.footer-brand h3 {
  font-size: 32px;
  font-family: "Anton SC", sans-serif;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 1px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Light mode footer logo */
[data-theme="light"] .footer-brand h3 {
  background: linear-gradient(135deg, #018577 0%, #14b8a6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-brand p {
  color: var(--text-muted);
}

/* Footer Social - CONVERTED TO GRID */
.footer-social {
  display: grid;
  grid-template-columns: auto auto;
  gap: 15px;
}

.footer-social a {
  width: 45px;
  height: 45px;
  background: var(--surface);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 20px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social a:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* GitHub icon hover */
.footer-social a:nth-child(1):hover {
  background: #24292e;
  border-color: #24292e;
  color: white;
}

/* X (Twitter) icon hover */
.footer-social a:nth-child(2):hover {
  background: #000000;
  border-color: #000000;
  color: white;
}

/* Light mode - same colors for consistency */
[data-theme="light"] .footer-social a:nth-child(1):hover {
  background: #24292e;
  border-color: #24292e;
  color: white;
  box-shadow: 0 8px 20px rgba(36, 41, 46, 0.3);
}

[data-theme="light"] .footer-social a:nth-child(2):hover {
  background: #000000;
  border-color: #000000;
  color: white;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-bottom span {
  color: #ef4444;
  display: inline-block;
  animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  10%,
  30% {
    transform: scale(1.1);
  }
  20%,
  40% {
    transform: scale(1);
  }
}

/* Animation Keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--dark);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Scroll to Top Button - CONVERTED TO GRID */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

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

.scroll-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(99, 102, 241, 0.6);
}

.scroll-to-top:active {
  transform: translateY(-2px);
}

.scroll-to-top i {
  font-size: 20px;
  color: white;
  transition: transform 0.3s ease;
}

.scroll-to-top:hover i {
  transform: translateY(-3px);
}

/* Light Mode */
[data-theme="light"] .scroll-to-top {
  background: linear-gradient(135deg, #018577 0%, #14b8a6 100%);
  box-shadow: 0 8px 25px rgba(1, 133, 119, 0.4);
}

[data-theme="light"] .scroll-to-top:hover {
  box-shadow: 0 12px 35px rgba(1, 133, 119, 0.6);
}

/* ========================================
   RESPONSIVE DESIGN - ALL DEVICES
   ======================================== */

/* Large Desktop (1920px+) */
@media (min-width: 1920px) {
  section {
    padding: 120px 120px;
  }

  nav {
    padding: 0 120px;
  }

  #about,
  #projects,
  #contact {
    margin: 0 120px;
  }

  footer {
    padding: 80px 120px 40px;
  }

  .hero-name {
    font-size: 96px;
  }

  .section-title {
    font-size: 56px;
  }
}

/* Desktop (1440px - 1919px) */
@media (max-width: 1919px) and (min-width: 1440px) {
  section {
    padding: 100px 100px;
  }

  nav {
    padding: 0 100px;
  }

  #about,
  #projects,
  #contact {
    margin: 0 100px;
  }

  footer {
    padding: 60px 100px 30px;
  }
}

/* Laptop (1024px - 1439px) */
@media (max-width: 1439px) and (min-width: 1024px) {
  section {
    padding: 80px 60px;
  }

  nav {
    padding: 0 60px;
  }

  nav .nav-item {
    gap: 30px;
  }

  #home {
    gap: 60px;
  }

  /* Floating Cards - Laptop */
  .card-1 {
    top: 14%;
    right: 45%;
  }

  .card-2 {
    bottom: 30%;
    right: 0%;
  }

  .card-3 {
    bottom: 20%;
    left: 2%;
  }

  .card-4 {
    top: 3%;
    right: 3%;
  }

  .card-5 {
    top: 40%;
    left: 8%;
  }

  .card-6 {
    bottom: 57%;
    right: 0%;
  }

  #about,
  #projects,
  #contact {
    margin: 0 60px;
  }

  footer {
    padding: 60px 60px 30px;
  }

  .hero-name {
    font-size: 70px;
  }

  .hero-title {
    font-size: 30px;
  }

  .section-title {
    font-size: 42px;
  }

  .projects-wrapper {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

/* Tablet Landscape (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
  section {
    padding: 60px 40px;
  }

  nav {
    padding: 0 40px;
    grid-template-columns: auto 1fr auto;
  }

  nav .nav-item {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(7, auto);
    background: var(--surface);
    padding: 30px 40px;
    gap: 20px;
    transform: translateY(-500px);
    transition: transform 0.3s ease, background 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    justify-items: center;
    z-index: 999;
  }

  [data-theme="light"] nav .nav-item {
    border-bottom: 1px solid rgba(1, 133, 119, 0.15);
    box-shadow: 0 4px 10px rgba(1, 133, 119, 0.08);
  }

  nav .nav-item a {
    font-size: 16px;
    text-align: center;
  }

  nav .nav-item a::after {
    left: 50%;
    transform: translateX(-50%);
  }

  nav .nav-item .nav-controls {
    grid-template-columns: auto auto;
    gap: 12px;
    justify-self: center;
  }

  nav .nav-item.active {
    transform: translateY(0);
  }

  nav .nav-hamburger {
    display: grid;
  }

  #home {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 50px;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-visual {
    height: 400px;
  }

  .hero-circle {
    width: 300px;
    height: 300px;
  }

  .card-1 {
    top: 5%;
    right: 20%;
  }

  .card-2 {
    bottom: 10%;
    right: 14%;
  }

  .card-3 {
    bottom: 10%;
    left: 9%;
  }

  .card-4 {
    top: 15%;
    right: 61%;
  }
  .card-5 {
    top: 36%;
    left: 52%;
  }
  .card-6 {
    bottom: 35%;
    right: 52%;
  }

  .floating-card {
    /* padding: 15px 20px; */
  }

  .floating-card i {
    font-size: 22px;
  }

  .floating-card span {
    font-size: 13px;
  }

  .hero-name {
    font-size: 60px;
  }

  .hero-title {
    font-size: 28px;
  }

  .section-title {
    font-size: 38px;
  }

  .team-grid {
    gap: 25px;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  #about,
  #skills,
  #projects,
  #contact {
    margin: 0 40px;
  }

  .skills-wrapper {
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 32px;
    margin: 0 auto;
  }

  .projects-wrapper {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
  }

  .overlay-detail-project .scroll {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-wrapper {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  footer {
    padding: 50px 40px 25px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 25px;
  }

  .footer-social {
    justify-content: center;
  }
}

/* Tablet Portrait (600px - 767px) */
@media (max-width: 767px) and (min-width: 600px) {
  section {
    padding: 50px 30px;
  }

  nav {
    padding: 0 30px;
    grid-template-columns: auto 1fr auto;
    gap: 15px;
  }

  nav .nav-item {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(7, auto);
    background: var(--surface);
    padding: 25px 30px;
    gap: 18px;
    transform: translateY(-500px);
    transition: transform 0.3s ease, background 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    justify-items: center;
    z-index: 999;
  }

  [data-theme="light"] nav .nav-item {
    border-bottom: 1px solid rgba(1, 133, 119, 0.15);
    box-shadow: 0 4px 10px rgba(1, 133, 119, 0.08);
  }

  nav .nav-item a {
    font-size: 15px;
    text-align: center;
  }

  nav .nav-item a::after {
    left: 50%;
    transform: translateX(-50%);
  }

  nav .nav-item .nav-controls {
    grid-template-columns: auto auto;
    gap: 12px;
    justify-self: center;
  }

  nav .nav-item.active {
    transform: translateY(0);
  }

  nav .nav-hamburger {
    display: grid;
  }

  #home {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
    padding-top: 100px;
  }

  .hero-content {
    padding: 0 20px;
  }

  .hero-cta {
    grid-template-columns: 1fr;
    gap: 15px;
    justify-items: center;
  }

  .btn-secondary,
  .btn-primary {
    max-width: 240px;
    width: 100%;
  }

  .hero-visual {
    height: 350px;
  }

  .hero-circle {
    width: 280px;
    height: 280px;
  }

  .floating-card {
    padding: 15px 20px;
  }

  .card-1 {
    top: 5%;
    right: 25%;
  }

  .card-2 {
    bottom: 10%;
    right: 17%;
  }

  .card-3 {
    bottom: 10%;
    left: 17%;
  }

  .card-4 {
    top: 15%;
    right: 61%;
  }
  .card-5 {
    top: 36%;
    left: 57%;
  }
  .card-6 {
    bottom: 35%;
    right: 52%;
  }

  .floating-card i {
    font-size: 22px;
  }

  .floating-card span {
    font-size: 14px;
  }

  .hero-name {
    font-size: 52px;
    line-height: 1.1;
    word-break: keep-all;
    overflow-wrap: break-word;
  }

  .hero-title {
    font-size: 26px;
    line-height: 1.2;
  }

  .hero-description {
    font-size: 15px;
    line-height: 1.6;
    margin-left: auto;
    margin-right: auto;
  }

  .section-title {
    font-size: 34px;
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .team-card {
    padding: 30px;
  }

  .team-photo {
    width: 120px;
    height: 120px;
  }

  .expertise-card {
    padding: 35px;
  }

  .about-stats {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  #about,
  #projects,
  #contact {
    margin: 0 30px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .project-filters {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .filter-btn {
    padding: 10px 18px;
    font-size: 13px;
  }

  .projects-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .overlay-detail-project {
    padding: 20px;
  }

  .overlay-detail-project .detail {
    padding: 30px 20px;
  }

  .overlay-detail-project .scroll {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .overlay-detail-project .right h1 {
    font-size: 28px;
  }

  .skills-wrapper {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }

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

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  footer {
    padding: 40px 30px 20px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
  }

  .footer-social {
    justify-content: center;
  }
}

/* Mobile Large (480px - 599px) */
@media (max-width: 599px) and (min-width: 480px) {
  section {
    padding: 40px 20px;
  }

  nav {
    padding: 0 20px;
    grid-template-columns: auto 1fr auto;
    gap: 15px;
  }

  nav .nav-logo a {
    font-size: 28px;
  }

  nav .nav-item {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(7, auto);
    background: var(--surface);
    padding: 20px;
    gap: 15px;
    transform: translateY(-500px);
    transition: transform 0.3s ease, background 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    justify-items: center;
    z-index: 999;
  }

  [data-theme="light"] nav .nav-item {
    border-bottom: 1px solid rgba(1, 133, 119, 0.15);
    box-shadow: 0 4px 10px rgba(1, 133, 119, 0.08);
  }

  nav .nav-item a {
    font-size: 14px;
    text-align: center;
  }

  nav .nav-item a::after {
    left: 50%;
    transform: translateX(-50%);
  }

  nav .nav-item .nav-controls {
    grid-template-columns: auto auto;
    gap: 10px;
    justify-self: center;
  }

  nav .nav-item.active {
    transform: translateY(0);
  }

  nav .nav-hamburger {
    display: grid;
  }

  #home {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 35px;
    padding-top: 100px;
    padding-bottom: 50px;
  }

  .hero-content {
    padding: 0 15px;
  }

  .hero-cta {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 0 15px;
  }

  .btn {
    width: 100%;
    padding: 14px 28px;
    font-size: 15px;
  }

  .hero-visual {
    height: 300px;
  }

  .hero-circle {
    width: 250px;
    height: 250px;
  }

  .floating-card {
    padding: 12px 18px;
  }

  .card-1 {
    top: 3%;
    right: 20%;
  }

  .card-2 {
    bottom: 8%;
    right: 3%;
  }

  .card-3 {
    bottom: 8%;
    left: 3%;
  }

  .card-4,
  .card-5,
  .card-6 {
    display: none;
  }

  .floating-card i {
    font-size: 20px;
  }

  .floating-card span {
    font-size: 13px;
  }

  .hero-name {
    font-size: 52px;
    line-height: 1.1;
  }

  .hero-title {
    font-size: 26px;
    line-height: 1.3;
  }

  .hero-description {
    font-size: 16px;
    line-height: 1.7;
    padding: 0 10px;
  }

  .section-title {
    font-size: 32px;
  }

  .section-label {
    font-size: 11px;
    padding: 5px 12px;
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .team-card {
    padding: 25px;
  }

  .team-photo {
    width: 110px;
    height: 110px;
  }

  .team-info h3 {
    font-size: 28px;
  }

  .expertise-card {
    padding: 30px;
  }

  .expertise-title {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .expertise-text p {
    font-size: 15px;
  }

  .about-stats {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .stat-item {
    padding: 25px;
  }

  .stat-number {
    font-size: 42px;
  }

  #about,
  #projects,
  #contact {
    margin: 0 20px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .service-card {
    padding: 30px;
    min-height: auto;
  }

  .service-card h3 {
    font-size: 22px;
    min-height: auto;
  }

  .service-card p {
    min-height: auto;
  }

  .project-filters {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .filter-btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .projects-wrapper {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .project-item {
    padding: 30px;
  }

  .project-header {
    gap: 15px;
  }

  .project-icon {
    width: 70px;
    height: 70px;
  }

  .project-title-large {
    font-size: 28px;
  }

  .overlay-detail-project {
    padding: 15px;
  }

  .overlay-detail-project .detail {
    padding: 25px 15px;
  }

  .overlay-detail-project .scroll {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .overlay-detail-project .right h1 {
    font-size: 26px;
  }

  .skills-wrapper {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 18px;
  }

  .skill-box {
    width: 110px;
    height: 110px;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .contact-item {
    padding: 25px;
  }

  .contact-icon {
    width: 60px;
    height: 60px;
  }

  .contact-icon i {
    font-size: 28px;
  }

  .contact-value {
    font-size: 16px;
  }

  footer {
    padding: 35px 20px 18px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 18px;
  }

  .footer-brand h3 {
    font-size: 28px;
  }

  .footer-social {
    justify-content: center;
  }

  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }

  .scroll-to-top i {
    font-size: 18px;
  }
}

/* Mobile Small (< 480px) */
@media (max-width: 479px) {
  section {
    padding: 35px 15px;
  }

  nav {
    padding: 0 15px;
    height: 70px;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }

  nav .nav-logo a {
    font-size: 24px;
  }

  nav .nav-item {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(7, auto);
    background: var(--surface);
    padding: 18px 15px;
    gap: 12px;
    transform: translateY(-500px);
    transition: transform 0.3s ease, background 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    justify-items: center;
    z-index: 999;
  }

  [data-theme="light"] nav .nav-item {
    border-bottom: 1px solid rgba(1, 133, 119, 0.15);
    box-shadow: 0 4px 10px rgba(1, 133, 119, 0.08);
  }

  nav .nav-item a {
    font-size: 14px;
    text-align: center;
  }

  nav .nav-item a::after {
    left: 50%;
    transform: translateX(-50%);
  }

  nav .nav-item .nav-controls {
    grid-template-columns: auto auto;
    gap: 10px;
    justify-self: center;
  }

  nav .nav-item.active {
    transform: translateY(0);
  }

  nav .nav-hamburger {
    display: grid;
    gap: 5px;
  }

  nav .nav-hamburger span {
    width: 25px;
    height: 2.5px;
  }

  #home {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
    padding-top: 70px;
    padding-bottom: 40px;
  }

  .hero-content {
    padding: 0 10px;
  }

  .hero-badge {
    font-size: 11px;
    padding: 6px 16px;
    margin-block: 20px;
  }

  .hero-greeting {
    font-size: 18px;
  }

  .hero-name {
    font-size: 48px;
    line-height: 1.1;
    word-break: keep-all;
  }

  .hero-title {
    font-size: 22px;
    line-height: 1.3;
  }

  /* .hero-description {
    font-size: 15px;
    margin-bottom: 30px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    padding: 0 5px;
  } */

  .hero-cta {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 10px;
  }

  .btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
  }

  .hero-visual {
    height: 250px;
  }

  .hero-circle {
    width: 200px;
    height: 200px;
  }

  .floating-card {
    padding: 10px 15px;
  }

  .card-1 {
    top: 2%;
    right: 15%;
  }

  .card-2 {
    bottom: 5%;
    right: 2%;
  }

  .card-3 {
    top: 50%;
    left: 5%;
  }

  .card-4,
  .card-5,
  .card-6 {
    display: none;
  }

  .floating-card i {
    font-size: 18px;
  }

  .floating-card span {
    font-size: 12px;
  }

  .section-label {
    font-size: 10px;
    padding: 4px 10px;
  }

  .section-title {
    font-size: 28px;
  }

  .section-description {
    font-size: 15px;
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .team-card {
    padding: 20px;
  }

  .team-photo {
    width: 100px;
    height: 100px;
  }

  .team-info h3 {
    font-size: 24px;
  }

  .team-role {
    font-size: 14px;
  }

  .expertise-card {
    padding: 25px;
  }

  .expertise-title {
    font-size: 20px;
    margin-bottom: 18px;
  }

  .expertise-text p {
    font-size: 14px;
    line-height: 1.6;
  }

  .about-stats {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .stat-item {
    padding: 20px;
  }

  .stat-number {
    font-size: 36px;
  }

  .stat-label {
    font-size: 13px;
  }

  #about,
  #projects,
  #contact {
    margin: 0 15px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .service-card {
    padding: 25px;
    min-height: auto;
  }

  .service-icon {
    width: 60px;
    height: 60px;
  }

  .service-icon i {
    font-size: 28px;
  }

  .service-card h3 {
    font-size: 20px;
    min-height: auto;
  }

  .service-card p {
    font-size: 14px;
    min-height: auto;
  }

  .service-features li {
    font-size: 13px;
  }

  .project-filters {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 30px;
  }

  .filter-btn {
    padding: 8px 14px;
    font-size: 12px;
  }

  .filter-btn i {
    font-size: 12px;
  }

  .projects-wrapper {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .project-item {
    padding: 25px;
  }

  .project-header {
    gap: 12px;
  }

  .project-icon {
    width: 60px;
    height: 60px;
  }

  .project-title-large {
    font-size: 24px;
  }

  .project-title {
    font-size: 16px;
  }

  .project-category {
    font-size: 10px;
    padding: 5px 12px;
  }

  .project-description {
    font-size: 14px;
  }

  .project-tech {
    font-size: 12px;
  }

  .overlay-detail-project {
    padding: 10px;
  }

  .overlay-detail-project .detail {
    padding: 20px 12px;
  }

  .overlay-detail-project .close {
    width: 40px;
    height: 40px;
    top: 15px;
    right: 15px;
  }

  .overlay-detail-project .close i {
    font-size: 16px;
  }

  .overlay-detail-project .scroll {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .overlay-detail-project .right h1 {
    font-size: 24px;
  }

  .overlay-detail-project .right p {
    font-size: 14px;
  }

  .overlay-detail-project .right a {
    padding: 12px 24px;
    font-size: 14px;
  }

  .skills-wrapper {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    padding: 0 15px;
  }

  .skill-box {
    width: 100px;
    height: 100px;
  }

  .skill-label {
    font-size: 13px;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .contact-item {
    padding: 20px;
    gap: 18px;
  }

  .contact-icon {
    width: 55px;
    height: 55px;
  }

  .contact-icon i {
    font-size: 26px;
  }

  .contact-label {
    font-size: 13px;
  }

  .contact-value {
    font-size: 15px;
  }

  footer {
    padding: 30px 15px 15px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 15px;
  }

  .footer-brand h3 {
    font-size: 24px;
  }

  .footer-brand p {
    font-size: 13px;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-social a {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .footer-bottom p {
    font-size: 12px;
  }

  .scroll-to-top {
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
  }

  .scroll-to-top i {
    font-size: 16px;
  }
}
