/* CSS Custom Properties for Theming */
:root {
  /* Light Theme Colors */
  --background: hsl(0, 0%, 100%);
  --foreground: hsl(222.2, 84%, 4.9%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(222.2, 84%, 4.9%);
  --popover: hsl(0, 0%, 100%);
  --popover-foreground: hsl(222.2, 84%, 4.9%);
  --primary: hsl(221.2, 83.2%, 53.3%);
  --primary-foreground: hsl(210, 40%, 98%);
  --secondary: hsl(210, 40%, 96%);
  --secondary-foreground: hsl(222.2, 84%, 4.9%);
  --muted: hsl(210, 40%, 96%);
  --muted-foreground: hsl(215.4, 16.3%, 46.9%);
  --accent: hsl(210, 40%, 96%);
  --accent-foreground: hsl(222.2, 84%, 4.9%);
  --destructive: hsl(0, 84.2%, 60.2%);
  --destructive-foreground: hsl(210, 40%, 98%);
  --border: hsl(214.3, 31.8%, 91.4%);
  --input: hsl(214.3, 31.8%, 91.4%);
  --ring: hsl(221.2, 83.2%, 53.3%);
  --radius: 0.5rem;
}

/* Dark Theme Colors */
.dark-theme {
  --background: hsl(222.2, 84%, 4.9%);
  --foreground: hsl(210, 40%, 98%);
  --card: hsl(222.2, 84%, 4.9%);
  --card-foreground: hsl(210, 40%, 98%);
  --popover: hsl(222.2, 84%, 4.9%);
  --popover-foreground: hsl(210, 40%, 98%);
  --primary: hsl(217.2, 91.2%, 59.8%);
  --primary-foreground: hsl(222.2, 84%, 4.9%);
  --secondary: hsl(217.2, 32.6%, 17.5%);
  --secondary-foreground: hsl(210, 40%, 98%);
  --muted: hsl(217.2, 32.6%, 17.5%);
  --muted-foreground: hsl(215, 20.2%, 65.1%);
  --accent: hsl(217.2, 32.6%, 17.5%);
  --accent-foreground: hsl(210, 40%, 98%);
  --destructive: hsl(0, 62.8%, 30.6%);
  --destructive-foreground: hsl(210, 40%, 98%);
  --border: hsl(217.2, 32.6%, 17.5%);
  --input: hsl(217.2, 32.6%, 17.5%);
  --ring: hsl(224.3, 76.3%, 94.0%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Utility Classes */
.text-primary {
  color: var(--primary);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Buttons */
.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  border: none;
  font-size: 0.875rem;
  padding: 0.75rem 1.5rem;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-outline {
  border: 1px solid var(--border);
  background-color: var(--background);
  color: var(--foreground);
}

.btn-outline:hover {
  background-color: var(--muted);
}

/* Header */
.header {
  background-color: var(--background);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
}

.header-container {
  padding: 1rem 1.5rem;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
}

.nav-desktop {
  display: none;
  gap: 2rem;
}

.nav-desktop a {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-desktop a:hover {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  background-color: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  background-color: var(--muted);
}

.theme-toggle .sun-icon {
  display: block;
}

.theme-toggle .moon-icon {
  display: none;
}

.dark-theme .theme-toggle .sun-icon {
  display: none;
}

.dark-theme .theme-toggle .moon-icon {
  display: block;
}

.header-cta {
  display: none;
}

.mobile-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--foreground);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-btn .close-icon {
  display: none;
}

.mobile-menu-btn.active .menu-icon {
  display: none;
}

.mobile-menu-btn.active .close-icon {
  display: block;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.mobile-menu.active {
  display: block;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-nav a {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s ease;
}

.mobile-nav a:hover {
  color: var(--primary);
}

.mobile-theme-toggle {
  padding: 0.5rem 0;
}

.mobile-cta {
  margin-top: 1rem;
  width: 100%;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--muted) 0%, var(--background) 100%);
  padding: 5rem 1.5rem;
  width: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.typewriter-container {
  height: 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 600;
}

.typewriter-text {
  color: var(--primary);
}

.cursor {
  color: var(--primary);
  animation: blink 1s infinite;
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

.hero-description {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.hero-subtitle {
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Stats Card */
.stats-card {
  background-color: var(--card);
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  padding: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.stat-item {
  text-align: center;
}

.stat-icon {
  color: var(--primary);
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: center;
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--foreground);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Sections */
.animate-section {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-section.animate-on-scroll {
  opacity: 1;
  transform: translateY(0);
}

.services-section,
.testimonials-section,
.contact-section {
  background-color: var(--muted);
}

.skills-section,
.projects-section {
  background-color: var(--background);
}

.services-section,
.skills-section,
.projects-section,
.testimonials-section,
.contact-section {
  padding: 5rem 1.5rem;
  width: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-description {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 48rem;
  margin: 0 auto;
}

/* Cards */
.card {
  background-color: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-content {
  padding: 1.5rem;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.service-card .card-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.service-icon {
  color: var(--primary);
  margin-right: 1rem;
}

.service-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.service-description {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.service-features {
  list-style: none;
  margin-bottom: 1.5rem;
}

.service-features li {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.service-features li svg {
  color: var(--primary);
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.service-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.service-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.service-timeline {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 64rem;
  margin: 0 auto;
}

.skill-item {
  margin-bottom: 0.5rem;
}

.skill-header {
  display: flex;
  justify-content: between;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.skill-name {
  font-weight: 500;
}

.skill-level {
  color: var(--muted-foreground);
}

.progress-bar {
  width: 100%;
  height: 0.5rem;
  background-color: var(--muted);
  border-radius: var(--radius);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--primary);
  transition: width 0.5s ease;
  width: 0%;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.project-card {
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-image-container {
  position: relative;
  overflow: hidden;
}

.project-image {
  width: 100%;
  height: 12rem;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.project-category {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.project-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.project-description {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background-color: var(--muted);
  color: var(--muted-foreground);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
}

.project-view-button {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 500;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  transition: gap 0.2s ease;
  margin-top: auto;
}

.project-view-button:hover {
  gap: 0.5rem;
}

/* Testimonials Grid */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.testimonial-card .card-content {
  padding: 1.5rem;
}

.testimonial-rating {
  display: flex;
  color: #eab308;
  margin-bottom: 1rem;
}

.testimonial-text {
  color: var(--muted-foreground);
  font-style: italic;
  margin-bottom: 1rem;
}

.testimonial-author {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.testimonial-name {
  font-weight: 500;
}

.testimonial-role {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.testimonial-company {
  font-size: 0.75rem;
  color: var(--primary);
  margin-top: 0.25rem;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
}

.contact-icon {
  color: var(--primary);
  margin-right: 1rem;
}

.contact-label {
  font-weight: 500;
}

.contact-value {
  color: var(--muted-foreground);
}

.contact-btn {
  margin-top: 2rem;
  align-self: flex-start;
}

/* Contact Form */
.contact-form-container {
  background-color: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--background);
  color: var(--foreground);
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

#submit-btn {
  width: 100%;
  position: relative;
}

.loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary-foreground);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.form-status {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  display: none;
}

.form-status.success {
  background-color: #dcfce7;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  display: block;
}

.form-status.error {
  background-color: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  display: block;
}

/* Footer */
.footer {
  background-color: var(--foreground);
  color: var(--background);
  padding: 3rem 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-tagline {
  color: var(--muted-foreground);
}

.footer-description {
  color: var(--muted-foreground);
  margin-top: 0.5rem;
}

.footer-links-title,
.footer-connect-title {
  font-weight: 500;
  margin-bottom: 1rem;
}

.footer-links-list,
.footer-connect-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links-list a,
.footer-connect-list a {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links-list a:hover,
.footer-connect-list a:hover {
  color: var(--background);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding-top: 2rem;
  text-align: center;
}

.footer-bottom p {
  color: var(--muted-foreground);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background-color: var(--card);
  border-radius: var(--radius);
  max-width: 64rem;
  max-height: 90vh;
  overflow-y: auto;
  width: 100%;
  margin: 2rem;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2rem 2rem 0;
  margin-bottom: 1.5rem;
}

.modal-project-category {
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.modal-project-title {
  font-size: 1.875rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted-foreground);
  padding: 0.5rem;
  border-radius: var(--radius);
  transition: background-color 0.2s ease;
}

.modal-close:hover {
  background-color: var(--muted);
}

.modal-body {
  padding: 0 2rem 2rem;
}

.modal-image-container {
  margin-bottom: 1.5rem;
}

.modal-project-image {
  width: 100%;
  height: 16rem;
  object-fit: cover;
  border-radius: var(--radius);
}

.modal-details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.modal-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.modal-project-description {
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

.modal-features-list {
  list-style: none;
  margin-bottom: 1.5rem;
}

.modal-features-list li {
  display: flex;
  align-items: center;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.modal-features-list li svg {
  color: var(--primary);
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.modal-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.modal-tech-tag {
  background-color: var(--muted);
  color: var(--muted-foreground);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.modal-info-card {
  background-color: var(--muted);
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.modal-info-title {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.modal-info-text {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Responsive Design */
@media (min-width: 640px) {
  .hero-actions {
    flex-direction: row;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }

  .header-cta {
    display: inline-flex;
  }

  .mobile-menu-btn {
    display: none;
  }

  .hero-grid {
    grid-template-columns: 2fr 1fr;
  }

  .hero-title {
    font-size: 4rem;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .modal-details-grid {
    grid-template-columns: 2fr 1fr;
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .hero-title {
    font-size: 5rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .animate-section {
    opacity: 1;
    transform: none;
  }
}

/* Focus styles */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Loading Animation */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.project-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: 0.3s;
}

.project-card:hover {
  transform: translateY(-5px);
}

/* ============================================================
   Blogs Section – Carousel
   Responsive breakpoints: mobile / tablet / laptop / desktop
   ============================================================ */
.blogs-section {
  padding: 5rem 1.5rem 1rem;
  background-color: var(--muted);
}

.carousel-container {
  display: flex;
  align-items: stretch;
  position: relative;
  gap: 0.75rem;
}

.carousel-viewport {
  overflow: hidden;
  width: 100%;
}

.blogs-grid {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Desktop (≥1280px): 3 cards, 2 gaps of 1.5rem ── */
.blogs-grid>.project-card {
  flex: 0 0 calc((100% - 3rem) / 3);
  min-width: calc((100% - 3rem) / 3);
  margin-bottom: 6px;
  /* prevent box-shadow clipping */
}

/* ── Laptop (1024px – 1279px): 3 cards ── */
@media (max-width: 1279px) {
  .blogs-grid>.project-card {
    flex: 0 0 calc((100% - 3rem) / 3);
    min-width: calc((100% - 3rem) / 3);
  }
}

/* ── Tablet (768px – 1023px): 2 cards ── */
@media (max-width: 1023px) {
  .blogs-section {
    padding: 4rem 1.25rem 1rem;
  }

  .blogs-grid {
    gap: 1.25rem;
  }

  .blogs-grid>.project-card {
    flex: 0 0 calc((100% - 1.25rem) / 2);
    min-width: calc((100% - 1.25rem) / 2);
  }
}

/* ── Carousel nav buttons ── */
.carousel-btn {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  min-width: 44px;
  /* prevent shrink */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  flex-shrink: 0;
  transition: opacity 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
  align-self: center;
}

.carousel-btn:hover:not(:disabled) {
  opacity: 0.85;
  transform: scale(1.08);
}

.carousel-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* ── Mobile (< 768px): 1 card, full width, no nav buttons ── */
@media (max-width: 767px) {
  .blogs-section {
    padding: 3rem 1rem 0.5rem;
  }

  /* Hide nav buttons – swipe handles navigation instead */
  .carousel-btn {
    display: none;
  }

  /* Remove the gap that was reserved for the hidden buttons */
  .carousel-container {
    gap: 0;
  }

  .blogs-grid {
    gap: 1rem;
  }

  .blogs-grid>.project-card {
    flex: 0 0 100%;
    min-width: 100%;
  }

  /* Comfortable image height on mobile */
  .blogs-grid>.project-card .project-image {
    height: 190px;
    object-fit: cover;
  }
}

/* ============================================================
   Single Blog Post Page (blog.html)
   ============================================================ */

/* Reduce title font-size on small screens */
@media (max-width: 767px) {
  #blog-title {
    font-size: 1.75rem !important;
  }

  #blog-body {
    font-size: 1rem !important;
  }

  #blog-cover-image {
    max-height: 220px !important;
    object-fit: cover;
  }
}

@media (max-width: 1023px) and (min-width: 768px) {
  #blog-title {
    font-size: 2rem !important;
  }

  #blog-cover-image {
    max-height: 360px !important;
  }
}

/* ============================================================
   Skeleton Loader
   ============================================================ */
.skeleton {
  background: #eee;
  background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
  border-radius: 5px;
  background-size: 200% 100%;
  animation: 1.5s shine linear infinite;
}

@keyframes shine {
  to {
    background-position-x: -200%;
  }
}

.skeleton-image {
  width: 100%;
  height: 12rem;
  border-radius: 12px 12px 0 0;
}

.skeleton-title {
  height: 1.5rem;
  width: 80%;
  margin-bottom: 1rem;
}

.skeleton-text {
  height: 1rem;
  width: 100%;
  margin-bottom: 0.5rem;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-category {
  height: 1.25rem;
  width: 4rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.skeleton-footer {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1rem;
}

.skeleton-btn {
  height: 2.5rem;
  width: 6rem;
  border-radius: 8px;
}