/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Poppins:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@700;800;900&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  /* Fonts */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Montserrat', sans-serif;
  --font-display: 'Playfair Display', serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Light (default) */
  --bg-body: #f8f9fa;
  --bg-card: #ffffff;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --accent: #0d6efd;
  --border: #dee2e6;
  --shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.07);
}

[data-theme="dark"] {
  --bg-body: #121212;
  --bg-card: #1e1e1e;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --accent: #bb86fc;
  --border: #333;
  --shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.5);
}

[data-theme="sky"] {
  --bg-body: #e0f7fa;
  --bg-card: #ffffff;
  --text-primary: #004d40;
  --text-secondary: #006064;
  --accent: #00acc1;
  --border: #b2ebf2;
  --shadow: 0 0.25rem 0.75rem rgba(0, 188, 212, 0.2);
}

[data-theme="forest"] {
  --bg-body: #f1f8e9;
  --bg-card: #ffffff;
  --text-primary: #1b5e20;
  --text-secondary: #33691e;
  --accent: #43a047;
  --border: #c5e1a5;
  --shadow: 0 0.25rem 0.75rem rgba(67, 160, 71, 0.15);
}

[data-theme="midnight"] {
  --bg-body: #0f172a;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --accent: #ec4899;
  --border: #334155;
  --shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.4);
}

[data-theme="sunset"] {
  --bg-body: #1a0a00;
  --bg-card: #2d1200;
  --text-primary: #ffe0cc;
  --text-secondary: #ff9a6c;
  --accent: #ff6b2b;
  --border: #5c2a00;
  --shadow: 0 0.25rem 1rem rgba(255, 107, 43, 0.3);
}

[data-theme="crimson"] {
  --bg-body: #1a0005;
  --bg-card: #2d000c;
  --text-primary: #ffe0e6;
  --text-secondary: #ff7a90;
  --accent: #e8003b;
  --border: #5c0018;
  --shadow: 0 0.25rem 1rem rgba(232, 0, 59, 0.3);
}

[data-theme="golden"] {
  --bg-body: #1a1400;
  --bg-card: #2d2200;
  --text-primary: #fff8dc;
  --text-secondary: #d4ac3a;
  --accent: #f5c518;
  --border: #4a3800;
  --shadow: 0 0.25rem 1rem rgba(245, 197, 24, 0.3);
}

body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  transition: background-color 0.4s ease, color 0.4s ease;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.5px;
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
}

h3 {
  font-size: 1.5rem;
  font-weight: 700;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

h5 {
  font-size: 1rem;
  font-weight: 600;
}

h6 {
  font-size: 0.875rem;
  font-weight: 600;
}

/* Display text for hero sections */
.display-1,
.display-2,
.display-3,
.display-4 {
  font-family: var(--font-display);
  font-weight: 700;
}

.navbar {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--accent) !important;
  font-family: var(--font-heading);
  letter-spacing: -0.5px;
}

.nav-link {
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--accent);
}

.dropdown-item {
  color: var(--text-primary);
  transition: background-color 0.3s ease;
}

.dropdown-item:hover {
  background-color: var(--accent);
  color: var(--bg-card);
}

.theme-dropdown .btn {
  border: 2px solid var(--accent);
  color: var(--text-primary);
  background: var(--bg-card);
  transition: all 0.3s ease;
}

.theme-dropdown .btn:hover {
  background-color: var(--accent);
  color: var(--bg-card);
}

.theme-dropdown .dropdown-menu {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  box-shadow: var(--shadow);
}

.theme-dropdown .dropdown-item {
  color: var(--text-primary);
  transition: all 0.3s ease;
  border-bottom: 1px solid var(--border);
  background-color: var(--bg-body);
}

.theme-dropdown .dropdown-item:last-child {
  border-bottom: none;
}

.theme-dropdown .dropdown-item:hover,
.theme-dropdown .dropdown-item:focus {
  background-color: var(--accent);
  color: var(--bg-card);
}

/* Dark theme dropdown adjustments */
[data-theme="dark"] .theme-dropdown .dropdown-menu {
  background: var(--bg-card);
  border: 2px solid var(--accent);
}

/* Sky theme dropdown adjustments */
[data-theme="sky"] .theme-dropdown .dropdown-menu {
  border: 2px solid var(--accent);
}

/* Forest theme dropdown adjustments */
[data-theme="forest"] .theme-dropdown .dropdown-menu {
  border: 2px solid var(--accent);
}

/* Midnight theme dropdown adjustments */
[data-theme="midnight"] .theme-dropdown .dropdown-menu {
  border: 2px solid var(--accent);
}

/* Typography for specific elements */
code,
pre {
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

a {
  transition: color 0.3s ease;
}

/* Button text styling */
.btn {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Form labels */
label {
  font-family: var(--font-heading);
  font-weight: 500;
}

/* Navbar text */
.nav-link {
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* Small text and captions */
small,
.small,
caption {
  font-family: var(--font-body);
  font-weight: 400;
}

/* Quote/blockquote styling */
blockquote {
  font-family: var(--font-display);
  font-style: italic;
}

.project-card {
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.card-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

hr {
  border-top: 2px solid var(--accent);
  opacity: 1;
}

.profile-picture {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border: 4px solid var(--accent);
  border-radius: 50%;
}

.filter-btn {
  border: 2px solid var(--accent);
  color: var(--text-primary);
}

.filter-btn.active,
.filter-btn:hover {
  background-color: var(--accent);
  color: white;
}

.sub-pill {
  background: var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
}

/* Pro Animated Loader - Atomic Neon */
.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  width: 100%;
  background: rgba(var(--bg-card-rgb), 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid var(--border);
  margin-top: 2rem;
  transition: all 0.3s ease;
}

[data-theme="dark"] .loader-container,
[data-theme="midnight"] .loader-container,
[data-theme="sunset"] .loader-container,
[data-theme="crimson"] .loader-container,
[data-theme="golden"] .loader-container {
  background: rgba(30, 41, 59, 0.4);
}

.pro-loader {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 2rem;
}

.loader-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: var(--accent);
  animation: spin 2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.loader-ring:nth-child(2) {
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  border-top-color: var(--text-primary);
  animation-duration: 1.5s;
  animation-direction: reverse;
  opacity: 0.8;
}

.loader-ring:nth-child(3) {
  width: 60%;
  height: 60%;
  top: 20%;
  left: 20%;
  border-top-color: var(--accent);
  animation-duration: 3s;
  opacity: 0.6;
}

.loader-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 15px;
  height: 15px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--accent);
  animation: pulse 1.5s ease-in-out infinite;
}

.no-projects-text {
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.9;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.6;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
    box-shadow: 0 0 30px var(--accent);
  }

  100% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.6;
  }
}

/* ===== Clients Section ===== */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

/* Tablet and up: 3 columns */
@media (min-width: 768px) {
  .clients-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

/* Desktop: 4 columns */
@media (min-width: 992px) {
  .clients-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Large Desktop: 6 columns (optional, for very wide screens) */
@media (min-width: 1400px) {
  .clients-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.client-card {
  position: relative;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
}

.client-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.client-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15);
}

.client-card:hover::before {
  transform: scaleX(1);
}

.client-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  margin-bottom: 1rem;
}

.client-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.4s ease;
}

.client-card:hover .client-logo {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

/* Logo Placeholder (when no logo image exists) */
.client-logo-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--text-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
}

.client-card:hover .client-logo-placeholder {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
}

.client-initials {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: white;
  letter-spacing: 2px;
}

.client-name {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
  margin: 0;
  transition: color 0.3s ease;
  letter-spacing: 0.3px;
  line-height: 1.4;
}

.client-card:hover .client-name {
  color: var(--accent);
}

/* Empty State for Clients */
#clients .loader-container {
  max-width: 600px;
  margin: 0 auto;
}

/* Theme-specific adjustments */
[data-theme="dark"] .client-card,
[data-theme="midnight"] .client-card {
  background: var(--bg-card);
  border-color: var(--border);
}

[data-theme="dark"] .client-card:hover,
[data-theme="midnight"] .client-card:hover {
  box-shadow: 0 1rem 2rem rgba(187, 134, 252, 0.2);
}

[data-theme="sky"] .client-card:hover {
  box-shadow: 0 1rem 2rem rgba(0, 172, 193, 0.2);
}

[data-theme="forest"] .client-card:hover {
  box-shadow: 0 1rem 2rem rgba(67, 160, 71, 0.2);
}

[data-theme="sunset"] .client-card:hover {
  box-shadow: 0 1rem 2rem rgba(255, 107, 43, 0.25);
}

[data-theme="crimson"] .client-card:hover {
  box-shadow: 0 1rem 2rem rgba(232, 0, 59, 0.25);
}

[data-theme="golden"] .client-card:hover {
  box-shadow: 0 1rem 2rem rgba(245, 197, 24, 0.25);
}

/* Responsive Adjustments */
@media (max-width: 576px) {
  .client-card {
    padding: 1.5rem 1rem;
  }

  .client-logo-wrapper {
    height: 80px;
  }

  .client-logo-placeholder {
    width: 80px;
    height: 80px;
  }

  .client-initials {
    font-size: 1.5rem;
  }

  .client-name {
    font-size: 0.85rem;
  }
}