@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.75);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --primary: #4f46e5;
  --primary-hover: #3730a3;
  --primary-light: #e0e7ff;
  --primary-glow: rgba(79, 70, 229, 0.1);
  
  --border-color: rgba(226, 232, 240, 0.8);
  --border-glow: rgba(79, 70, 229, 0.25);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 12px -2px rgba(148, 163, 184, 0.08), 0 2px 4px -1px rgba(148, 163, 184, 0.04);
  --shadow-lg: 0 10px 20px -4px rgba(148, 163, 184, 0.12), 0 3px 6px -2px rgba(148, 163, 184, 0.06);
  --shadow-xl: 0 15px 30px -10px rgba(148, 163, 184, 0.18), 0 5px 10px -5px rgba(148, 163, 184, 0.08);
  
  --font-sans: 'Inter', sans-serif;
  --font-display: 'Plus Jakarta Sans', sans-serif;
  
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.75rem;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Background decorative blobs */
.bg-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
  top: -10%;
  right: -5%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(224, 231, 255, 0.05) 70%);
}

.blob-2 {
  bottom: -15%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(209, 250, 229, 0.03) 70%);
  animation-delay: -5s;
}

.blob-3 {
  top: 30%;
  left: 25%;
  width: 35vw;
  height: 35vw;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, rgba(254, 243, 199, 0.02) 70%);
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(1%, 2%) scale(1.02); }
  100% { transform: translate(-1%, -1%) scale(0.98); }
}

.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  background-image: radial-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 0);
  background-size: 20px 20px;
}

/* Header */
header {
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.8rem 2rem;
  flex-shrink: 0;
}

.header-container {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

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

/* Main Layout: Viewport Lock */
main {
  flex: 1;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 2rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Top Hero Banner (Compact) */
.hero-slim {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.hero-slim-text h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

.hero-slim-text h1 span {
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-slim-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Controls Box (Slim) */
.controls-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-lg);
  padding: 0.6rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  flex-shrink: 0;
}

.search-box {
  position: relative;
  width: 320px;
}

.search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.search-box input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  font-family: var(--font-sans);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s ease;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.filter-tabs {
  display: flex;
  gap: 0.35rem;
}

.filter-tab {
  background: none;
  border: none;
  padding: 0.4rem 0.9rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.filter-tab:hover {
  background-color: rgba(148, 163, 184, 0.06);
  color: var(--text-primary);
}

.filter-tab.active {
  background-color: var(--primary);
  color: var(--bg-secondary);
  box-shadow: 0 3px 8px rgba(79, 70, 229, 0.2);
}

/* Viewport-filling grid */
.projects-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  overflow-y: auto;
  padding-right: 2px;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    overflow-y: hidden; /* Fully locked on desktop */
  }
}

/* Card Styling (Ultra-Compact) */
.project-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s ease,
              border-color 0.4s ease;
  cursor: pointer;
  position: relative;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 15px rgba(79, 70, 229, 0.08);
  border-color: var(--border-glow);
}

.card-preview {
  position: relative;
  height: 110px; /* Reduced height */
  background-color: #f1f5f9;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (min-width: 1400px) {
  .card-preview {
    height: 125px;
  }
}

.card-preview-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(12px) brightness(1.05);
  opacity: 0.12;
  transform: scale(1.1);
  transition: transform 0.5s ease;
}

.project-card:hover .card-preview-bg {
  transform: scale(1.15);
}

.card-illustration {
  z-index: 1;
  width: 90%;
  height: 85%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .card-illustration {
  transform: scale(1.03) translateY(-1px);
}

.card-illustration svg {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px -3px rgba(0,0,0,0.04);
}

.card-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.65rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: var(--shadow-sm);
}

.badge-embed { color: var(--accent-emerald, #10b981); }
.badge-link { color: var(--primary); }

.card-body {
  padding: 0.8rem 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
  justify-content: space-between;
}

.card-tags {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.card-tag {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  background-color: rgba(148, 163, 184, 0.08);
  color: var(--text-secondary);
}

.card-body h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-body p {
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.35;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.btn {
  flex-grow: 1;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-decoration: none;
}

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

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

.btn-secondary {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  flex-grow: 0;
  width: 2.2rem;
}

.btn-secondary:hover {
  background-color: rgba(148, 163, 184, 0.04);
  color: var(--text-primary);
}

/* Featured Card Styling (eltQuiz) */
.project-card.card-featured {
  border: 1px solid transparent;
  background-image: linear-gradient(var(--bg-card), var(--bg-card)), linear-gradient(135deg, var(--primary) 0%, #d946ef 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 10px 30px -10px rgba(79, 70, 229, 0.15);
  position: relative;
  display: flex;
  flex-direction: row !important;
  min-height: 180px;
}

.project-card.card-featured:hover {
  box-shadow: 0 15px 35px -5px rgba(79, 70, 229, 0.25), 0 0 20px rgba(217, 70, 239, 0.15);
  transform: translateY(-6px) scale(1.01) !important;
}

.card-featured .card-badge {
  background: linear-gradient(135deg, var(--primary) 0%, #d946ef 100%) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 0 10px rgba(79, 70, 229, 0.4);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(79, 70, 229, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

.project-card.card-featured .card-preview {
  width: 42% !important;
  height: 100% !important;
  min-height: 180px;
  border-bottom: none !important;
  border-right: 1px solid var(--border-color) !important;
}

.project-card.card-featured .card-body {
  width: 58% !important;
  padding: 0.9rem 1.1rem !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* eltQuiz Premium Promotional Elements */
.eltquiz-featured-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.1rem;
  margin-bottom: 0.4rem;
}

.eltquiz-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 32px;
}

.eltquiz-logo-wrapper img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

.eltquiz-promo-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.25;
  background: linear-gradient(135deg, var(--primary) 0%, #d946ef 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0.15rem 0;
  letter-spacing: -0.015em;
  animation: shimmer-text 3s infinite alternate;
}

.eltquiz-promo-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.btn-featured-glow {
  background: linear-gradient(135deg, var(--primary) 0%, #d946ef 100%) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
  position: relative;
  overflow: hidden;
}

.btn-featured-glow:hover {
  box-shadow: 0 6px 16px rgba(217, 70, 239, 0.35);
  transform: translateY(-1px);
}

@keyframes shimmer-text {
  0% { filter: hue-rotate(0deg) brightness(1); }
  100% { filter: hue-rotate(25deg) brightness(1.1); }
}

/* Featured Card Grid Placement (Tablet/Desktop) */
@media (min-width: 1024px) {
  .project-card.card-featured {
    grid-column: span 2;
  }
}

/* Modal Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  background-color: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  width: 95%;
  height: 92%;
  max-width: 1500px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.97) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 0.6rem 1.2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-secondary);
  flex-shrink: 0;
}

.modal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.modal-controls {
  display: flex;
  gap: 0.5rem;
}

.modal-btn {
  background: none;
  border: 1px solid var(--border-color);
  width: 1.8rem;
  height: 1.8rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.modal-btn:hover {
  background-color: rgba(148, 163, 184, 0.06);
  color: var(--text-primary);
}

.modal-btn-close:hover {
  background-color: #f43f5e;
  color: white;
  border-color: #f43f5e;
}

.modal-body {
  flex: 1;
  min-height: 0;
  position: relative;
  background-color: #f1f5f9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  z-index: 10;
  transition: opacity 0.25s ease;
}

.spinner {
  width: 2.2rem;
  height: 2.2rem;
  border: 3px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s infinite linear;
}

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

.modal-iframe {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border: none;
  display: block;
  object-fit: contain;
}

/* Footer (Slimmed) */
footer {
  border-top: 1px solid var(--border-color);
  padding: 0.6rem 2rem;
  background-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}

.footer-container {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.75rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.social-link:hover {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Splash Screen Overlay */
.splash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s ease;
}

.splash-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  position: relative;
  width: 55vw;
  height: 55vh;
  min-width: 320px;
  max-width: 900px;
  background-color: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(0.97) translateY(10px);
}

.splash-overlay:not(.fade-out) .splash-content {
  transform: scale(1) translateY(0);
}

.splash-overlay.fade-out .splash-content {
  transform: scale(0.95) translateY(15px);
}

.splash-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  z-index: 10005;
  transition: all 0.2s ease;
}

.splash-close-btn:hover {
  background: #f43f5e;
  border-color: #f43f5e;
  color: white;
  transform: scale(1.08);
}

.splash-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: #f1f5f9;
}

.splash-enter-btn {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary) 0%, #d946ef 100%);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
  border: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 10001;
  letter-spacing: 0.02em;
}

.splash-enter-btn:hover {
  transform: translateX(-50%) scale(1.05);
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
}

@media (max-width: 1024px) {
  .splash-content {
    width: 75vw;
    height: 55vh;
  }
}

@media (max-width: 768px) {
  /* Allow natural page scroll on mobile instead of locked viewport */
  body {
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .splash-content {
    width: 90vw;
    height: 50vh;
  }
  .splash-enter-btn {
    bottom: 1.5rem;
    padding: 0.6rem 1.6rem;
    font-size: 0.9rem;
  }
  
  /* Mobile padding layout adjustments */
  main {
    padding: 0.75rem 1rem 2rem 1rem !important;
    height: auto !important;
    overflow: visible !important;
  }
  
  header {
    padding: 0.8rem 1rem;
  }
  
  .controls-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
    padding: 0.75rem;
  }
  
  .search-box {
    width: 100%;
  }
  
  .filter-tabs {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    justify-content: flex-start;
  }
  
  .filter-tab {
    flex-shrink: 0;
  }

  /* Grid layout for mobile: 2 columns with natural scrolling */
  .projects-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
    height: auto !important;
    overflow-y: visible !important;
  }
  
  /* Make eltquiz (which has card-featured class) span across both columns and adjust row proportions */
  .project-card.card-featured {
    grid-column: span 2 !important;
    min-height: 150px !important;
  }

  .project-card.card-featured .card-preview {
    width: 36% !important;
    min-height: 150px !important;
    height: 100% !important;
  }

  .project-card.card-featured .card-body {
    width: 64% !important;
    padding: 0.6rem 0.8rem !important;
  }

  .eltquiz-promo-title {
    font-size: 0.95rem !important;
  }

  .eltquiz-logo-wrapper {
    height: 26px !important;
  }
  
  /* Adjust cards layout and sizing on mobile */
  .card-preview {
    height: 100px;
  }
  
  .card-body {
    padding: 0.6rem 0.75rem;
  }
  
  .card-body h3 {
    font-size: 0.95rem;
  }
  
  .card-body p {
    font-size: 0.75rem;
    margin-bottom: 0.6rem;
  }
  
  .card-tags {
    gap: 0.2rem;
    margin-bottom: 0.25rem;
  }
  
  .card-tag {
    font-size: 0.55rem;
    padding: 0.05rem 0.25rem;
  }
  
  .btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
  }
  
  .btn-secondary {
    width: 2rem;
  }
}

/* Styling adjustments for very small screens */
@media (max-width: 400px) {
  .projects-grid {
    gap: 0.5rem !important;
  }
  
  .card-body {
    padding: 0.5rem;
  }
  
  .card-body h3 {
    font-size: 0.85rem;
  }
  
  .card-body p {
    display: none;
  }
}
