:root {
  --bg: #0b0d13;
  --surface: rgba(255, 255, 255, 0.06);
  --text: #eef2ff;
  --muted: #a5b4fc;
  --brand: #ff4d4d;
  --brand2: #ffb703;
  --accent: #7c3aed;
  --glow: 0 0 30px rgba(124, 58, 237, 0.45), 0 0 60px rgba(255, 77, 77, 0.25);
}
* {
  box-sizing: border-box;
}

/* Prevent horizontal scrolling */
html,
body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}
html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(
      1200px 600px at 80% -20%,
      rgba(124, 58, 237, 0.25),
      transparent 60%
    ),
    linear-gradient(160deg, #0b0d13 0%, #0b0d13 40%, #0f1220 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    Helvetica, Arial;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
  width: 100%;
  height: auto;
  box-sizing: border-box;
  transition: opacity 0.3s ease;
}

/* Prevent layout shifts during lazy loading */
img[loading="lazy"] {
  min-height: 1px;
  background: rgba(255, 255, 255, 0.05);
}

/* Specific image types */
.logo {
  width: auto;
  height: auto;
  max-width: 90px;
}

.hero-logo-enhanced {
  width: 120px !important;
  height: auto;
}

.banner-logo-img,
.banner-kumari-img {
  width: auto;
  height: auto;
  max-width: 100%;
}

.architecture-diagram,
.flow-diagram,
.sequence-diagram {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  width: 100%;
  box-sizing: border-box;
}
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: linear-gradient(
    180deg,
    rgba(11, 13, 19, 0.85),
    rgba(11, 13, 19, 0.65)
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
  width: 100%;
  box-sizing: border-box;
}
.banner img {
  max-width: 100%;
  display: block;
  width: 100%;
  height: auto;
  box-sizing: border-box;
  border-radius: 10px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(1) contrast(1);
  transform: scale(1);
}

.banner img:hover {
  filter: brightness(1.1) contrast(1.05)
    drop-shadow(0 0 15px rgba(255, 77, 77, 0.3));
  animation: bannerGlow 2s ease-in-out infinite alternate;
}

@keyframes bannerGlow {
  0% {
    filter: brightness(1.1) contrast(1.05)
      drop-shadow(0 0 15px rgba(255, 77, 77, 0.3));
  }
  100% {
    filter: brightness(1.15) contrast(1.1)
      drop-shadow(0 0 20px rgba(255, 77, 77, 0.4));
  }
}
/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  background: var(--surface);
}

.mobile-menu-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
  margin: 2px 0;
  transition: all 0.3s ease;
  border-radius: 1px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}
.brand {
  display: flex;
  align-items: center;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.brand img.logo {
  width: 90px;
  filter: drop-shadow(0 0 10px rgba(255, 77, 77, 0.45)) brightness(1.1);
  transition: all 0.3s ease;
  border-radius: 13px;
}

.brand img.logo:hover {
  transform: scale(1.1) rotate(2deg);
  filter: drop-shadow(0 0 15px rgba(255, 77, 77, 0.6)) brightness(1.2);
}
/* Brand word image removed - logo only navigation */
.nav a.link {
  opacity: 0.85;
  padding: 10px 14px;
  border-radius: 10px;
}
.nav a.link:hover {
  background: var(--surface);
  box-shadow: var(--glow);
}
.btn {
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(255, 77, 77, 0.28);
}
.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.hero {
  position: relative;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  align-items: center;
  padding: 72px 24px;
  width: 100%;
  box-sizing: border-box;
}
.hero h1 {
  font-size: clamp(32px, 4.6vw, 64px);
  margin: 0 0 10px;
  line-height: 1.05;
}
.hero h1 .accent {
  background: linear-gradient(90deg, #ffd6d6, #ffe29a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(255, 77, 77, 0.35);
}
.sub {
  color: var(--muted);
  max-width: 60ch;
}
.card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.04)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--glow);
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;

}

.grid {
  display: grid;
  gap: 18px;
  width: 100%;
  box-sizing: border-box;
}
.grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }
  .grid.cols-3 {
    grid-template-columns: 1fr;
  }
  .grid.cols-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero .wrap {
    padding: 32px 16px;
  }

  .hero h1 {
    font-size: clamp(24px, 6vw, 36px);
  }

  .sub {
    font-size: 16px;
    line-height: 1.6;
  }

  .btn {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    text-align: center;
  }

  .btn + .btn {
    margin-bottom: 0;
  }

  /* Mobile footer styles */
  .footer {
    margin: 30px 0 0 0;
    padding: 12px 16px;
  }

  .footer-content {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .social-links {
    gap: 6px;
  }

  .social-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
  }

  .social-icon svg {
    width: 12px;
    height: 12px;
  }

  .footer-copyright {
    font-size: 10px;
  }
}
.kb {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.kb:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 77, 77, 0.2);
}
.badge {
  display: inline-flex;
  margin-bottom: 10px;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}
.footer {
  margin: 40px 0 0 0;
  padding: 16px 24px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.social-icon::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 77, 77, 0.1),
    rgba(255, 183, 3, 0.1)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.social-icon:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(255, 77, 77, 0.2);
}

.social-icon:hover::before {
  opacity: 1;
}

.social-icon svg {
  width: 14px;
  height: 14px;
  fill: var(--text);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.social-icon:hover svg {
  fill: var(--brand);
  transform: scale(1.05);
}

/* Individual social media brand colors on hover */
.social-icon.twitter:hover {
  border-color: #1da1f2;
  box-shadow: 0 8px 25px rgba(29, 161, 242, 0.3);
}

.social-icon.twitter:hover svg {
  fill: #1da1f2;
}

.social-icon.facebook:hover {
  border-color: #1877f2;
  box-shadow: 0 8px 25px rgba(24, 119, 242, 0.3);
}

.social-icon.facebook:hover svg {
  fill: #1877f2;
}

.social-icon.linkedin:hover {
  border-color: #0a66c2;
  box-shadow: 0 8px 25px rgba(10, 102, 194, 0.3);
}

.social-icon.linkedin:hover svg {
  fill: #0a66c2;
}

.social-icon.instagram:hover {
  border-color: #e4405f;
  box-shadow: 0 8px 25px rgba(228, 64, 95, 0.3);
}

.social-icon.instagram:hover svg {
  fill: #e4405f;
}

.social-icon.x:hover {
  border-color: #000;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.social-icon.x:hover svg {
  fill: var(--text);
}

.social-icon.tiktok:hover {
  border-color: #ff0050;
  box-shadow: 0 8px 25px rgba(255, 0, 80, 0.3);
}

.social-icon.tiktok:hover svg {
  fill: #ff0050;
}

.social-icon.threads:hover {
  border-color: #000;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.social-icon.threads:hover svg {
  fill: var(--text);
}

.footer-copyright {
  font-size: 11px;
  opacity: 0.6;
  margin: 0;
  font-weight: 400;
}
.blog-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.blog-card img {
  border-radius: 12px;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.blog-card .meta {
  opacity: 0.8;
  font-size: 14px;
}
.post-hero {
  aspect-ratio: 16/6;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  transition: all 0.3s ease;
  background: transparent !important;
}

.post-hero::before,
.post-hero::after {
  display: none !important;
  background: none !important;
}

.post-hero > *:not(img) {
  background: transparent !important;
}

.post-hero:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow);
  background: transparent !important;
}

.post-hero img {
  transition: all 0.3s ease;
  filter: brightness(1.1) drop-shadow(0 0 20px rgba(255, 77, 77, 0.4));
  border-radius: 8px;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.post-hero img:hover {
  transform: scale(1.05);
  filter: brightness(1.2) drop-shadow(0 0 30px rgba(255, 77, 77, 0.6));
}
.post {
  max-width: 900px;
  margin: 40px auto;
  width: 100%;
  box-sizing: border-box;
}
.post h1 {
  font-size: clamp(28px, 4vw, 48px);
  margin-bottom: 12px;
}
.post h2 {
  margin-top: 48px;
  margin-bottom: 24px;
}
.post h3 {
  margin-top: 40px;
  margin-bottom: 20px;
}
.post h4 {
  margin-top: 32px;
  margin-bottom: 16px;
}
.post p {
  margin-bottom: 16px;
  line-height: 1.7;
  text-align: justify;
}
.post ul,
.post ol {
  margin-bottom: 16px;
  line-height: 1.7;
  text-align: justify;
}
.post li {
  margin-bottom: 8px;
  text-align: justify;
}
.post img.full {
  border-radius: 16px;
  margin: 18px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  z-index: 100;
}
.modal .panel {
  width: min(840px, 92vw);
  padding: 22px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
}
.modal.show {
  display: flex;
}
.input,
textarea,
select {
  width: 100%;
  background: #0e1320;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  margin-top: 3px;
  margin-bottom: 4px;
  transition: all 0.3s ease;
}

select {
  padding-right: 50px;
  position: relative;
  background: #0e1320;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 8.825L1.175 4 2.238 2.938 6 6.7l3.763-3.762L10.825 4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 12px;
}

.input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.1);
  transform: translateY(-1px);
}

.input:hover,
textarea:hover,
select:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: #0f1420;
}

/* Form styling improvements */
form {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

form label {
  font-weight: 600;
  color: var(--text);
  font-size: 12px;
  margin-bottom: 2px;
  display: block;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

form label:hover {
  color: var(--brand);
  opacity: 1;
}

/* Remove the inline spacing divs since we're using CSS */
form div[style*="height"] {
  display: none;
}

/* Contact form specific improvements */
#contactForm {
  padding: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#contactForm .btn {
  margin-top: 2px;
  align-self: flex-start;
  min-width: 140px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Contact Banner */
.contact-banner {
  margin-bottom: 32px;
  text-align: center;
}

.banner-content {
  display: inline-flex;
  align-items: center;
}

.banner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.banner-logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: brightness(1.1);
}

.banner-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.banner-subtitle {
  font-size: 26px;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.8px;
}

.banner-kumari-img {
  width: auto;
  font-size: 26px;
  font-weight: 900;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(1) contrast(1);
  transform: scale(1);
}

.banner-kumari-img:hover {
  transform: scale(1.15) rotate(2deg);
  filter: brightness(1.2) contrast(1.1)
    drop-shadow(0 0 8px rgba(255, 77, 77, 0.4));
  animation: kumariGlow 2s ease-in-out infinite alternate;
}

@keyframes kumariGlow {
  0% {
    filter: brightness(1.2) contrast(1.1)
      drop-shadow(0 0 8px rgba(255, 77, 77, 0.4));
  }
  100% {
    filter: brightness(1.3) contrast(1.2)
      drop-shadow(0 0 12px rgba(255, 77, 77, 0.6));
  }
}

.combined-contact-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  max-width: 800px;
  margin: 0 auto;
}

.combined-contact-card .contact-banner {
  background: transparent;
  border: none;
  padding: 0 0 16px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.combined-contact-card .contact-form-section {
  margin-bottom: 0;
}

/* Popup styles */
.contact-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #0e1320;
  border: 2px solid #3b82f6;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 1001;
  max-width: 400px;
  text-align: center;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.contact-popup.show {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.contact-popup h3 {
  color: #ffffff;
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 600;
}

.contact-popup p {
  color: #e5e7eb;
  margin-bottom: 16px;
  font-size: 16px;
}

.contact-popup .btn {
  background: linear-gradient(90deg, #ff4d4d, #ff6b6b);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.contact-popup .btn:hover {
  background: linear-gradient(90deg, #ff6b6b, #ff4d4d);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 77, 77, 0.3);
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.popup-overlay.show {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}
/* Form controls */
/* Base input and select styles */
input[type="text"],
input[type="email"],
select,
textarea {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  width: 100%;
  padding: 12px;
  margin: 6px 0 16px 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95em;
  line-height: 1.5;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

/* Textarea specific */
textarea {
  min-height: 140px;
  max-height: 400px;
  resize: vertical;
  overflow-y: auto;
}

/* Select specific */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
  cursor: pointer;
}

/* Focus states */
input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
  outline: none;
}

/* Hover states */
input[type="text"]:hover,
input[type="email"]:hover,
select:hover,
textarea:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

/* Placeholder text */
::placeholder {
  color: rgba(255, 255, 255, 0.4);
  opacity: 1;
}

/* Custom scrollbar for textarea */
textarea::-webkit-scrollbar {
  width: 6px;
}

textarea::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

textarea::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

textarea::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Form Elements */
.input, select.input, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}

.input:focus, select.input:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(255, 77, 77, 0.2);
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a5b4fc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

/* Form labels */
label {
  display: block;
  margin: 8px 0 4px 0;
  font-size: 0.9em;
  color: var(--muted);
  font-weight: 500;
}
.fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  color: #111;
  box-shadow: var(--glow);
  cursor: pointer;
}
figcaption {
  opacity: 0.8;
  font-size: 13px;
  margin-top: 6px;
}

/* Enhanced Blog Post Styling */
.post .meta {
  color: var(--muted);
  font-style: italic;
  margin-bottom: 24px;
  border-left: 3px solid var(--brand);
  padding-left: 16px;
}

.post .intro {
  font-size: 1.1em;
  line-height: 1.7;
  color: var(--text);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.04)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0;
  position: relative;
  overflow: hidden;
  text-align: justify;
}

.post .intro::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--brand), var(--brand2));
}

/* Enhanced Lists */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.feature-list li {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 12px 0;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
}

.feature-list li:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--brand);
  transform: translateX(8px);
  box-shadow: var(--glow);
}

.feature-list li::before {
  content: "→";
  color: var(--brand);
  font-weight: bold;
  margin-right: 12px;
  transition: transform 0.3s ease;
}

.feature-list li:hover::before {
  transform: translateX(4px);
}

.feature-item ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-item li {
  list-style: none;
  list-style-type: none;
  margin-bottom: 12px;
  line-height: 1.5;
  color: #e6e6e6;
  font-size: 14px;
}

.feature-item li:last-child {
  margin-bottom: 0;
}

.feature-item li strong {
  color: var(--brand);
  font-weight: 600;
}

.decision-tree {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.1),
    rgba(255, 77, 77, 0.1)
  );
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0;
  counter-reset: step-counter;
}

.decision-tree li {
  counter-increment: step-counter;
  margin: 16px 0;
  padding-left: 40px;
  position: relative;
  transition: all 0.3s ease;
  list-style: none;
}

.decision-tree li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  background: linear-gradient(45deg, var(--brand), var(--brand2));
  color: #111;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}

.decision-tree li:hover {
  color: var(--brand2);
  transform: translateX(8px);
}

.future-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.future-list li {
  list-style: none;
  list-style-type: none;
}

.future-list li {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.04)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.future-list li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.future-list li:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

.future-list li:hover::before {
  transform: scaleX(1);
}

/* Code Blocks */
.code-block {
  background: #0a0c14;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  margin: 24px 0;
  padding: 24px;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
}

.code-block:hover {
  border-color: var(--brand);
  box-shadow: 0 0 20px rgba(255, 77, 77, 0.2);
}

.code-block::before {
  content: "Python";
  position: absolute;
  top: 12px;
  right: 16px;
  background: var(--brand);
  color: #111;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
}

.code-block pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 14px;
  line-height: 1.6;
}

.code-block code {
  color: #e6e6e6;
}

.code-block h4 {
  margin: 0 0 16px 0;
  color: var(--brand);
  font-size: 1.2em;
  font-weight: 600;
}

.code-block p {
  margin: 0;
  line-height: 1.6;
  color: #e6e6e6;
}

/* Simple Diagrams (No Background) */
.diagram-simple {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px 0;
  text-align: center;
}

.diagram-simple img {
  max-width: 100%;
  height: auto;
  transition: transform 0.3s ease;
  border-radius: 8px;
}

.diagram-simple img:hover {
  transform: scale(1.02);
}

/* Diagram Cards */
.diagram-card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.04)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 24px;
  margin: 40px 0;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Specific diagram card styles */
.diagram-card.architecture-overview {
  margin: 48px 0;
  padding: 32px;
  border: 2px solid rgba(255, 77, 77, 0.3);
  background: linear-gradient(
    135deg,
    rgba(255, 77, 77, 0.1),
    rgba(255, 183, 3, 0.05)
  );
}

.diagram-card.domain-classification {
  border-left: 4px solid var(--brand);
}

.diagram-card.cost-optimization {
  border-left: 4px solid #22c55e;
}

.diagram-card.performance-optimization {
  border-left: 4px solid #3b82f6;
}

.diagram-card.request-flow {
  margin: 48px 0;
  padding: 32px;
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.1),
    rgba(255, 77, 77, 0.05)
  );
}

.diagram-card.multi-provider {
  background: linear-gradient(
    135deg,
    rgba(255, 183, 3, 0.1),
    rgba(124, 58, 237, 0.05)
  );
}

.diagram-card.performance-monitoring {
  border-left: 4px solid #f59e0b;
}

.diagram-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 77, 77, 0.1) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.diagram-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: var(--glow);
}

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

.diagram-card img {
  max-width: 100%;
  border-radius: 8px;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.diagram-card:hover img {
  transform: scale(1.02);
}

.diagram-card.full-width {
  margin: 40px -20px;
}

.architecture-diagram {
  max-height: 500px;
  object-fit: contain;
}

.flow-diagram {
  max-height: 400px;
  object-fit: contain;
}

.sequence-diagram {
  max-height: 600px;
  object-fit: contain;
}

/* Provider Grid */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.provider-card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.04)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.provider-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.provider-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: 0 10px 30px rgba(255, 77, 77, 0.2);
}

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

.provider-card h4 {
  margin: 0 0 6px 0;
  color: var(--brand2);
}

.provider-card p {
  margin: 0;
  line-height: 1.1;
  font-size: 14px;
  opacity: 0.9;
}

.provider-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.provider-card li {
  font-size: 14px;
  opacity: 0.9;
  margin: 4px 0;
}

/* Tech Stack */
.tech-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin: 32px 0;
  list-style: none;
  padding: 0;
}

.tech-stack li {
  list-style: none;
  list-style-type: none;
}

.tech-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
  position: relative;
  text-align: left;
  line-height: 1.5;
}

.tech-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--brand), var(--brand2));
  border-radius: 2px 0 0 2px;
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.tech-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--brand);
  transform: translateX(8px);
}

.tech-item:hover::before {
  transform: scaleY(1);
}

.tech-item h3,
.tech-item h4 {
  margin: 0 0 16px 0;
  font-size: 1.2em;
  font-weight: 600;
  color: var(--brand);
  position: relative;
  z-index: 1;
}

.tech-item strong {
  color: var(--brand);
  font-weight: 600;
}

.tech-item ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tech-item li {
  margin-bottom: 12px;
  line-height: 1.5;
  color: #e6e6e6;
  font-size: 14px;
}

.tech-item li:last-child {
  margin-bottom: 0;
}

.tech-item li strong {
  color: var(--brand);
  font-weight: 600;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 40px 0;
  align-items: stretch;
}

.metric-card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.04)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 20px;
  text-align: left;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  line-height: 1.4;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
}

.metric-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 183, 3, 0.1) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.metric-card:hover {
  transform: translateY(-8px) scale(1.05);
  border-color: var(--brand2);
  box-shadow: 0 20px 40px rgba(255, 183, 3, 0.3);
}

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

.metric-card h3,
.metric-card h4 {
  margin: 0 0 4px 0;
  font-size: 1.2em;
  font-weight: 600;
  color: var(--brand);
  position: relative;
  z-index: 1;
}

.metric-value {
  font-size: 2.5em;
  font-weight: bold;
  background: linear-gradient(45deg, var(--brand), var(--brand2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.metric-label {
  color: var(--muted);
  font-size: 14px;
  position: relative;
  z-index: 1;
}

.metric-card ul {
  margin: 0;
  padding-left: 20px;
  list-style: none;
  flex: 1;
}

.metric-card li {
  margin-bottom: 8px;
  line-height: 1.4;
  color: #e6e6e6;
  font-size: 14px;
}

.metric-card li:last-child {
  margin-bottom: 0;
}

.metric-card li strong {
  color: var(--brand);
  font-weight: 600;
}

/* Differentiator Grid */
.differentiator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin: 40px 0;
  align-items: stretch;
}

.diff-card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.04)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-align: left;
  line-height: 1.6;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  justify-content: flex-start;
}

.diff-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.1),
    rgba(255, 77, 77, 0.1)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.diff-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 15px 35px rgba(124, 58, 237, 0.3);
}

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

.diff-card h4 {
  margin: 0 0 16px 0;
  font-size: 1.2em;
  font-weight: 600;
  position: relative;
  z-index: 1;
  color: var(--brand);
}

.diff-card p {
  margin: 0;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.diff-card ul {
  margin: 0;
  padding-left: 20px;
  list-style: none;
  flex: 1;
}

.diff-card li {
  margin-bottom: 12px;
  line-height: 1.5;
  color: #e6e6e6;
  font-size: 14px;
}

.diff-card li:last-child {
  margin-bottom: 0;
}

.diff-card li strong {
  color: var(--brand);
  font-weight: 600;
}

/* Section Divider */
.section-divider {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  margin: 48px 0;
  opacity: 0.6;
}

.footer-note {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 16px;
  font-style: italic;
  text-align: justify;
  margin: 16px 0 0 0;
  line-height: 1.4;
}

.footer-note a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-note a:hover {
  color: var(--brand2);
  text-decoration: underline;
}

/* Table of Contents */
.table-of-contents {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.04)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 24px;
  margin: 32px 0;
  position: sticky;
  top: 100px;
  z-index: 10;
}

.table-of-contents h4 {
  margin: 0 0 16px 0;
  color: var(--brand);
  font-size: 1.1em;
}

.table-of-contents ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.table-of-contents li {
  margin: 8px 0;
}

.table-of-contents li.h3 {
  padding-left: 20px;
  font-size: 0.9em;
}

.table-of-contents a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  display: block;
  transition: all 0.3s ease;
  opacity: 0.8;
}

.table-of-contents a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--brand);
  opacity: 1;
  transform: translateX(4px);
}

/* Reading Progress Bar */
.reading-progress {
  box-shadow: 0 0 10px rgba(255, 77, 77, 0.5);
}

/* Logo Responsive Enhancements */
.hero-logo-enhanced {
  position: relative;
  display: inline-block;
}

.hero-logo-enhanced::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: radial-gradient(
    circle,
    rgba(255, 77, 77, 0.2) 0%,
    transparent 70%
  );
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.hero-logo-enhanced:hover::before {
  opacity: 1;
  animation: pulse 2s infinite;
}

/* Card logos enhancement */
.card img {
  transition: all 0.4s ease;
}

.card:hover img {
  transform: scale(1.08) rotate(1deg);
  filter: brightness(1.15) drop-shadow(0 0 25px rgba(255, 77, 77, 0.5));
}

/* Blog card logo enhancement */
.blog-card img {
  transition: all 0.3s ease;
}

.blog-card:hover img {
  transform: scale(1.03);
  filter: brightness(1.1);
}

/* Performance Table */
.performance-table {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0;
  -webkit-overflow-scrolling: touch;
}

.performance-table table {
  width: 100%;
  min-width: 600px; /* Ensures table doesn't get too narrow */
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  overflow: hidden;
}

.performance-table th,
.performance-table td {
  padding: 12px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.performance-table th {
  background: rgba(255, 255, 255, 0.1);
  font-weight: 600;
  white-space: nowrap;
}

.performance-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.performance-table tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Responsive Enhancements */
@media (max-width: 768px) {
  .performance-table {
    margin: 16px -16px;
    width: calc(100% + 32px);
    padding: 0 16px;
  }
  
  .performance-table table {
    font-size: 14px;
  }
  
  .performance-table th,
  .performance-table td {
    padding: 8px 10px;
  }
  .metrics-grid,
  .differentiator-grid {
    gap: 16px;
    margin: 24px 0;
  }

  .metric-card {
    min-height: auto;
    height: auto;
    padding: 16px;
  }

  .diff-card {
    min-height: auto;
    height: auto;
    padding: 16px;
  }

  .container {
    padding: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .nav-inner {
    padding: 12px 16px;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .brand img.logo {
    width: 40px;
  }

  /* Mobile navigation */
  .mobile-menu-toggle {
    display: flex;
  }

  .nav nav {
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(
      180deg,
      rgba(11, 13, 19, 0.95),
      rgba(11, 13, 19, 0.9)
    );
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-direction: column;
    gap: 0 !important;
    padding: 20px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .nav nav.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav a.link {
    padding: 16px 20px;
    font-size: 16px;
    border-radius: 12px;
    margin: 4px 0;
    text-align: center;
    transition: all 0.3s ease;
  }

  .nav a.link:hover {
    background: var(--surface);
    transform: translateX(8px);
  }

  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 48px 16px;
  }

  .hero h1 {
    font-size: clamp(28px, 5vw, 48px);
  }

  .hero .card {
    padding: 20px 16px;
  }

  .hero .card img {
    width: 80px !important;
  }

  .sub {
    max-width: 100%;
    font-size: 16px;
  }

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

  .grid.cols-3 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .grid.cols-2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card {
    padding: 18px;
  }

  .post {
    margin: 24px auto;
    padding: 0 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .post h1 {
    font-size: clamp(24px, 4.5vw, 36px);
  }

  .post-hero {
    aspect-ratio: 16/9;
    margin: 0 0 24px 0;
    border-radius: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .post-hero img {
    max-width: 100%;
    height: auto;
    width: auto !important;
    object-fit: cover;
  }

  .provider-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
  }

  .kb {
    padding: 6px 10px;
    font-size: 12px;
  }

  .footer {
    padding: 20px 16px;
    margin: 40px 0 0 0;
  }

  .footer-content {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .social-links {
    gap: 10px;
    order: 2;
  }

  .social-icon {
    width: 30px;
    height: 30px;
  }

  .social-icon svg {
    width: 14px;
    height: 14px;
  }

  .footer-copyright {
    font-size: 11px;
    order: 1;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .tech-stack {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .differentiator-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .metric-card,
  .tech-item,
  .diff-card {
    padding: 16px;
    min-height: auto;
  }

  .diagram-card.full-width {
    margin: 16px 0;
  }

  .diagram-card.architecture-overview,
  .diagram-card.request-flow {
    margin: 24px 0;
    padding: 20px;
  }

  .diagram-card {
    margin: 20px 0;
    padding: 16px;
  }

  .code-block pre {
    font-size: 12px;
    padding: 16px;
  }

  .table-of-contents {
    position: static;
    margin: 16px 0;
    padding: 20px;
  }

  .post .intro {
    padding: 16px;
    font-size: 16px;
  }

  .metric-value {
    font-size: 1.8em;
  }

  .decision-tree li {
    padding-left: 30px;
  }

  .decision-tree li::before {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .blog-card {
    padding: 16px;
  }

  .blog-card img {
    aspect-ratio: 16/9;
  }

  /* Contact form mobile improvements */
  .grid.cols-2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .input,
  textarea,
  select {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  /* Contact form mobile improvements */
  form {
    gap: 3px;
  }

  form label {
    font-size: 11px;
    margin-bottom: 1px;
  }

  #contactForm .btn {
    width: 100%;
    min-width: auto;
  }

  /* Contact form mobile constraints */
  #contactForm {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  form {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Contact banner mobile */
  .contact-banner {
    margin-bottom: 24px;
  }

  .banner-content {
    gap: 12px;
  }

  .banner-logo {
    width: 36px;
    height: 36px;
  }

  .banner-logo-img {
    width: 36px;
    height: 36px;
  }

  .banner-subtitle {
    font-size: 20px;
  }



  .banner-kumari-img:hover {
    transform: scale(1.1) rotate(1deg);
    filter: brightness(1.15) contrast(1.05)
      drop-shadow(0 0 6px rgba(255, 77, 77, 0.3));
  }

  .banner img:hover {
    filter: brightness(1.08) contrast(1.02)
      drop-shadow(0 0 8px rgba(255, 77, 77, 0.25));
  }

  .combined-contact-card {
    padding: 2px;
    margin: 0 16px;
  }

  .combined-contact-card .contact-banner {
    padding: 0 0 12px 0;
    margin-bottom: 12px;
  }

  .combined-contact-card .contact-form-section {
    margin-bottom: 0;
  }

  .contact-popup {
    padding: 20px;
    margin: 0 16px;
  }

  .card img {
    width: 80px !important;
    margin-top: 16px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .nav-inner {
    padding: 10px 12px;
  }

  .brand img.logo {
    width: 36px;
  }

  .nav a.link {
    padding: 6px 8px;
    font-size: 13px;
  }

  .hero .wrap {
    padding: 32px 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .hero h1 {
    font-size: clamp(24px, 6vw, 32px);
  }

  .hero .card img {
    width: 60px !important;
  }

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

  .card {
    padding: 16px;
  }

  .post {
    padding: 0 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .post-hero {
    margin: 0 0 20px 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .provider-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
  }

  .kb {
    padding: 4px 8px;
    font-size: 11px;
  }

  .footer {
    padding: 16px 12px;
  }

  .social-icon {
    width: 28px;
    height: 28px;
  }

  .social-icon svg {
    width: 12px;
    height: 12px;
  }

  /* Contact form improvements for very small screens */
/*   .card {
    padding: 12px;
  } */

  .input,
  textarea,
  select {
    padding: 10px 12px;
  }

  .btn {
    width: 100%;
    margin-top: 8px;
  }

  /* Contact form smallest screen constraints */
  #contactForm {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  form {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

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

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Additional hover effects */
.nav .link:hover {
  animation: pulse 0.6s ease-in-out;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(255, 77, 77, 0.4);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Enhanced focus states for accessibility */
.btn:focus,
.nav .link:focus,
.table-of-contents a:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Loading Animation */
.loading-skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06) 25%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.06) 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Enhanced Scroll Behavior */
html {
  scroll-behavior: smooth;
}

/* Page Transition Effects */
.page-enter {
  animation: fadeInUp 0.6s ease-out;
}

/* Enhanced Card Interactions */
.card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px rgba(255, 77, 77, 0.3);
}

/* Interactive Elements Enhancement */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::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;
}

.btn:hover::before {
  left: 100%;
}

/* Enhanced Navigation */
.nav {
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 13, 19, 0.9),
    rgba(11, 13, 19, 0.7)
  );
  z-index: -1;
}

/* Content Reveal Animation */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced Focus States */
*:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Dark Mode Preparation */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d13;
    --surface: rgba(255, 255, 255, 0.06);
    --text: #eef2ff;
  }
}

/* Diagram Modal Overlay */
.diagram-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.diagram-modal.show {
  display: flex;
}

.diagram-modal-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.diagram-modal-image {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  transition: transform 0.3s ease;
  cursor: grab;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.diagram-modal-image:active {
  cursor: grabbing;
}

.diagram-modal-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 10000;
}

.diagram-modal-btn {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: white;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.diagram-modal-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.diagram-modal-zoom-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  background: rgba(0, 0, 0, 0.7);
  padding: 12px 20px;
  border-radius: 25px;
  backdrop-filter: blur(10px);
}

.diagram-modal-zoom-btn {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: white;
  font-size: 20px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.diagram-modal-zoom-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: var(--brand);
  color: var(--brand);
}

.diagram-modal-zoom-level {
  color: white;
  font-size: 14px;
  display: flex;
  align-items: center;
  margin: 0 10px;
  min-width: 50px;
  text-align: center;
}

.diagram-clickable {
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.diagram-clickable::after {
  content: "🔍";
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.diagram-clickable:hover::after {
  opacity: 1;
}

.diagram-clickable:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(255, 77, 77, 0.2);
}

/* Lazy Loading Styles */
.lazy-loading {
  opacity: 0.3;
  transition: opacity 0.3s ease;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.1) 25%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.1) 75%
  );
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
}

.lazy-loaded {
  opacity: 1;
  animation: fade-in 0.5s ease;
}

.lazy-error {
  opacity: 0.5;
  filter: grayscale(1);
}

@keyframes loading-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Print styles */
@media print {
  .nav,
  .footer,
  .reading-progress,
  .table-of-contents,
  .diagram-modal {
    display: none;
  }

  .post {
    max-width: none;
    margin: 0;
  }

  .diagram-card,
  .code-block {
    break-inside: avoid;
  }
}
