:root {
  /* Dark Mode variables (default) */
  --bg: #06060a;
  --bg2: #0e0e14;
  --bg3: #13131c;
  --border: rgba(255, 255, 255, 0.06);
  --border2: rgba(255, 255, 255, 0.12);
  --text: #f3f3fb;
  --muted: #8e8ea6;
  --accent: #4f8cff;
  --accent2: #7c5cfc;
  --teal: #22d3b0;
  --emerald: #10b981;
  --amber: #f5a623;
  --pink: #f472b6;
  --green: #4ade80;
  --card-shadow: rgba(0, 0, 0, 0.4);
  --nav-bg: rgba(6, 6, 10, 0.85);
}

:root.light-mode {
  /* Light Mode variables */
  --bg: #f8f9fa;
  --bg2: #ffffff;
  --bg3: #f1f3f5;
  --border: rgba(0, 0, 0, 0.08);
  --border2: rgba(0, 0, 0, 0.15);
  --text: #212529;
  --muted: #6c757d;
  --accent: #1971c2;
  --accent2: #5c3eaf;
  --teal: #087f5b;
  --emerald: #059669;
  --amber: #d9480f;
  --pink: #c2255c;
  --green: #2b8a3e;
  --card-shadow: rgba(0, 0, 0, 0.04);
  --nav-bg: rgba(248, 249, 250, 0.85);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* glow blobs */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}
.blob-1 { width: 600px; height: 600px; background: var(--accent2); top: -200px; right: -200px; }
.blob-2 { width: 500px; height: 500px; background: var(--accent); bottom: 100px; left: -200px; }

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: none;
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent);
}
:root.light-mode .theme-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}
.sun-icon { display: none; }
.moon-icon { display: block; }
:root.light-mode .sun-icon { display: block; }
:root.light-mode .moon-icon { display: none; }

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.nav-cta {
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid var(--border2);
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.nav-cta:hover { background: rgba(255,255,255,0.06); border-color: var(--accent); }

main { position: relative; z-index: 1; }

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  padding: 8rem 2.5rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-content {
  flex: 1.2;
  display: flex;
  flex-direction: column;
}

.hero-image-wrapper {
  position: relative;
  width: 320px;
  height: 320px;
  flex: 0.8;
  max-width: 340px;
  aspect-ratio: 1/1;
  opacity: 0;
  animation: fadeUp 0.8s 0.3s forwards;
}

.hero-image-glow {
  position: absolute;
  inset: -8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  filter: blur(20px);
  opacity: 0.3;
  border-radius: 30px;
  z-index: 0;
  animation: rotateGlow 12s linear infinite;
}

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

.hero-image-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  border: 2px solid var(--border2);
  background: var(--bg2);
  box-shadow: 0 20px 40px var(--card-shadow);
  z-index: 1;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.hero-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-image-wrapper:hover .hero-image-frame {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--accent);
}

.hero-image-wrapper:hover .hero-image-frame img {
  transform: scale(1.05);
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.1s forwards;
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.eyebrow-text {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(52px, 8vw, 96px);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.2s forwards;
}

.hero-title .line2 {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.3);
}

.hero-title .accent { color: var(--accent); }

.hero-sub {
  font-size: 18px;
  font-weight: 300;
  color: var(--muted);
  max-width: 540px;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.3s forwards;
}

.hero-sub strong { color: var(--text); font-weight: 400; }

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s 0.4s forwards;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}

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

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.btn-ghost:hover { background: rgba(255,255,255,0.05); border-color: var(--border2); transform: translateY(-1px); }

.hero-scroll {
  margin-top: 5rem;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  opacity: 0;
  animation: fadeUp 0.6s 0.6s forwards;
}

.scroll-line {
  width: 40px;
  height: 1px;
  background: var(--border2);
}

/* PLATFORMS */
.platforms-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 2.5rem;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  position: relative;
  z-index: 1;
}

.platform-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 2rem;
  border-right: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.platform-item:first-child { padding-left: 0; }

.platform-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
}

/* SECTIONS */
section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 2.5rem;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 3.5rem;
}

.section-num {
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* STATS */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 5rem;
}

.stat-cell {
  background: var(--bg2);
  padding: 2.5rem 2rem;
  text-align: center;
}

.stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.stat-unit { color: var(--accent); }

.stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* PROJECTS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, rgba(79,140,255,0.04), transparent 60%);
  pointer-events: none;
}

.project-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
}

.project-card.featured {
  border-color: rgba(79,140,255,0.25);
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.project-card.featured::before {
  background: radial-gradient(ellipse at top left, rgba(79,140,255,0.08), transparent 60%);
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 4px 10px;
  background: rgba(79,140,255,0.12);
  color: var(--accent);
  border-radius: 6px;
  border: 1px solid rgba(79,140,255,0.2);
  margin-bottom: 1rem;
}

.project-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 1rem;
}

.project-name {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.project-type {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 1rem;
}

.project-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  border: 1px solid var(--border);
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  margin-left: auto;
  font-weight: 500;
}

.pill-android { background: rgba(74,222,128,0.1); color: var(--green); }
.pill-windows { background: rgba(79,140,255,0.1); color: var(--accent); }
.pill-web { background: rgba(124,92,252,0.1); color: var(--accent2); }
.pill-multi { background: rgba(245,166,35,0.1); color: var(--amber); }

.project-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.featured-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-highlight {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.highlight-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.highlight-value {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.skill-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
}

.skill-card-icon {
  font-size: 22px;
  margin-bottom: 1rem;
}

.skill-card-title {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.skill-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-list li {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-list li::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* CERTIFICATIONS & DIPLOMAS */
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.cert-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 30px var(--card-shadow);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, box-shadow 0.35s ease;
}

.cert-card:hover {
  transform: translateY(-6px);
  border-color: var(--border2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

:root.light-mode .cert-card:hover {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
}

.cert-card-media {
  position: relative;
  background: var(--bg3);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.cert-img-wrapper {
  position: relative;
  aspect-ratio: 16 / 10.5;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}

:root.light-mode .cert-img-wrapper {
  background: rgba(0, 0, 0, 0.03);
}

.cert-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cert-card:hover .cert-img-wrapper img {
  transform: scale(1.03);
}

.cert-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 10, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cert-card:hover .cert-overlay {
  opacity: 1;
}

.cert-zoom-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  padding: 8px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(79, 140, 255, 0.4);
  transform: translateY(8px);
  transition: transform 0.3s ease;
}

.cert-card:hover .cert-zoom-btn {
  transform: translateY(0);
}

.cert-card-content {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.cert-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  gap: 8px;
}

.cert-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid;
  letter-spacing: 0.02em;
}

.cert-date {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.cert-title {
  font-family: 'Syne', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}

.cert-issuer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 0.95rem;
}

.cert-issuer strong {
  color: var(--text);
}

.cert-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1.35rem;
  flex-grow: 1;
}

.cert-skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.cert-tag {
  font-size: 11.5px;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
}

:root.light-mode .cert-tag {
  background: rgba(0, 0, 0, 0.03);
}

/* CONTACT */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
}

.contact-card.main {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(79,140,255,0.08), rgba(124,92,252,0.06));
  border-color: rgba(79,140,255,0.2);
}

.contact-title {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.contact-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s, border-color 0.2s;
  background: rgba(255,255,255,0.03);
}

.contact-link:hover { background: rgba(255,255,255,0.07); border-color: var(--border2); }

.contact-link-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.contact-link-label { color: var(--muted); font-size: 12px; }
.contact-link-value { font-size: 13px; color: var(--text); }

.contact-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  flex: 1;
}

.side-card-title {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.avail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.avail-dot { width: 8px; height: 8px; border-radius: 50%; }

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  position: relative;
  z-index: 1;
}

.footer-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}

.footer-logo span { color: var(--accent); }

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* SVG ICONS inline */
.icon { display: inline-block; vertical-align: middle; }

/* RESPONSIVE */
@media (max-width: 768px) {
  nav { padding: 1rem 1.25rem; }
  .nav-links { display: none; }
  section { padding: 4rem 1.25rem; }
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    gap: 2.5rem;
    padding: 6rem 1.25rem 3rem;
    min-height: auto;
  }
  .hero-content {
    align-items: center;
  }
  .hero-eyebrow, .hero-actions, .hero-scroll {
    justify-content: center;
  }
  .hero-title { font-size: 42px; }
  .hero-sub {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
  }
  .hero-image-wrapper {
    width: 240px;
    height: 240px;
    margin: 0 auto;
  }
  .stats-row { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card.featured { grid-column: span 1; grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .certifications-grid { grid-template-columns: 1fr; }
  .contact-wrapper { grid-template-columns: 1fr; }
  .platforms-bar { padding: 1rem 1.25rem; }
  footer { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
}

/* GALLERY & TAB STYLES */
.gallery-tabs {
  display: flex;
  gap: 8px;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.gallery-tabs::-webkit-scrollbar {
  display: none;
}
.gallery-tab {
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.gallery-tab:hover {
  color: var(--text);
}
.gallery-tab.active {
  color: var(--accent);
}
.gallery-tab.active::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.project-card.theme-emerald .gallery-tab.active {
  color: var(--emerald);
}
.project-card.theme-emerald .gallery-tab.active::after {
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}

.gallery-container {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}
.gallery-container.active {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

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

.gallery-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, border-color 0.3s ease;
  cursor: zoom-in;
  display: flex;
  flex-direction: column;
}
.gallery-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.gallery-card-img-container {
  position: relative;
  background: #13131a;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.gallery-card-img-container img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: contain;
  transition: transform 0.5s ease;
}
.gallery-card:hover .gallery-card-img-container img {
  transform: scale(1.03);
}

/* LIGHTBOX MODAL STYLES */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 2rem;
}
.lightbox-modal.active {
  opacity: 1;
  pointer-events: all;
}
.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}
.lightbox-modal.active .lightbox-content {
  transform: scale(1);
}
.lightbox-img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  border: 1px solid var(--border2);
  object-fit: contain;
}
.lightbox-caption {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--text);
  max-width: 600px;
}
.lightbox-title {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.lightbox-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}
.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
  transition: color 0.2s;
}
.lightbox-close:hover {
  color: var(--accent);
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.lightbox-nav:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.lightbox-prev {
  left: -70px;
}
.lightbox-next {
  right: -70px;
}

@media (max-width: 900px) {
  .lightbox-prev {
    left: 10px;
    top: auto;
    bottom: -60px;
    transform: none;
  }
  .lightbox-next {
    right: 10px;
    top: auto;
    bottom: -60px;
    transform: none;
  }
  .lightbox-caption {
    margin-top: 1rem;
    margin-bottom: 2rem;
  }
  .lightbox-close {
    right: 10px;
    top: -35px;
  }
}

/* REVEAL TRANSITIONS */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* QURAN AUDIO PLAYER CARD IN HERO */
.hero-player-container {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 1.75rem;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  animation: fadeUp 0.6s 0.35s forwards;
  position: relative;
  z-index: 5;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
:root.light-mode .hero-player-container {
  background: rgba(0, 0, 0, 0.02);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

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

.hp-title-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hp-icon-wrapper {
  font-size: 20px;
  background: rgba(79, 140, 255, 0.1);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.hp-meta {
  text-align: left;
}

.hp-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  font-family: 'Syne', sans-serif;
}

.hp-reciter {
  font-size: 11px;
  color: var(--muted);
}

.hp-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hp-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, opacity 0.2s;
  flex-shrink: 0;
}

.hp-play-btn:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.hp-progress-wrapper {
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hp-time {
  font-size: 10px;
  color: var(--muted);
  font-family: monospace;
  width: 30px;
  text-align: center;
}

.hp-slider-container {
  flex-grow: 1;
  height: 6px;
  background: var(--border2);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}

.hp-slider-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0%;
}

.hp-volume-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hp-vol-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.hp-vol-btn:hover {
  opacity: 1;
}

.hp-vol-slider-container {
  width: 60px;
  height: 4px;
  background: var(--border2);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}

.hp-vol-slider-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 50%;
}

/* Live Link Buttons & Web Badges */
.project-live-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--border2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  margin-top: 0.5rem;
}

.project-live-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: rgba(79, 140, 255, 0.1);
  box-shadow: 0 6px 20px rgba(79, 140, 255, 0.2);
  color: #fff;
}

:root.light-mode .project-live-btn {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text);
}

:root.light-mode .project-live-btn:hover {
  background: rgba(25, 113, 194, 0.1);
  color: var(--accent);
}

/* ==========================================================================
   MODERN SHOWCASE GRID & FILTER CHIPS
   ========================================================================== */

.project-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 2rem 0 3rem 0;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg2);
  border: 1px solid var(--border2);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.filter-chip:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(79, 140, 255, 0.06);
  transform: translateY(-2px);
}

.filter-chip.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  border-color: transparent;
  box-shadow: 0 8px 25px rgba(79, 140, 255, 0.35);
  transform: translateY(-2px);
}

:root.light-mode .filter-chip.active {
  color: #ffffff;
}

.filter-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
}

:root.light-mode .filter-chip:not(.active) .filter-badge {
  background: rgba(0, 0, 0, 0.08);
}

/* Modern Showcase Grid */
.modern-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 28px;
}

.showcase-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px var(--card-shadow);
}

.showcase-card.hidden-by-filter {
  display: none !important;
}

.showcase-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  padding: 1.5px;
  background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.08) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: all 0.4s ease;
}

.showcase-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 22px 50px rgba(79, 140, 255, 0.16);
}

.showcase-card.theme-blue:hover {
  border-color: rgba(79, 140, 255, 0.5);
  box-shadow: 0 22px 50px rgba(79, 140, 255, 0.18);
}

.showcase-card.theme-emerald:hover {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 22px 50px rgba(16, 185, 129, 0.18);
}

.showcase-card.theme-teal:hover {
  border-color: rgba(34, 211, 176, 0.5);
  box-shadow: 0 22px 50px rgba(34, 211, 176, 0.18);
}

.showcase-card.theme-purple:hover {
  border-color: rgba(124, 92, 252, 0.5);
  box-shadow: 0 22px 50px rgba(124, 92, 252, 0.18);
}

.showcase-card.theme-orange:hover {
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: 0 22px 50px rgba(249, 115, 22, 0.18);
}

.showcase-card.theme-astro:hover {
  border-color: rgba(255, 93, 1, 0.55);
  box-shadow: 0 22px 50px rgba(255, 93, 1, 0.2);
}

/* Showcase Teaser Mockup Window */
.showcase-preview-frame {
  position: relative;
  width: 100%;
  height: 240px;
  background: #09090f;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

:root.light-mode .showcase-preview-frame {
  background: #e9ecef;
}

.showcase-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

.showcase-card:hover .showcase-preview-img {
  transform: scale(1.05);
}

.showcase-preview-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(6, 6, 10, 0.85) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 1.25rem;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.showcase-card:hover .showcase-preview-overlay {
  opacity: 1;
}

.showcase-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 30px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.badge-blue { background: rgba(79, 140, 255, 0.25); color: #8ec5fc; border: 1px solid rgba(79, 140, 255, 0.4); }
.badge-emerald { background: rgba(16, 185, 129, 0.25); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-teal { background: rgba(34, 211, 176, 0.25); color: #5eead4; border: 1px solid rgba(34, 211, 176, 0.4); }
.badge-purple { background: rgba(124, 92, 252, 0.25); color: #c4b5fd; border: 1px solid rgba(124, 92, 252, 0.4); }
.badge-orange { background: rgba(249, 115, 22, 0.25); color: #fdba74; border: 1px solid rgba(249, 115, 22, 0.4); }
.badge-astro { background: rgba(255, 93, 1, 0.25); color: #ffb088; border: 1px solid rgba(255, 93, 1, 0.45); }

.showcase-quick-explore-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  transform: translateY(4px);
  opacity: 0.85;
  transition: all 0.3s ease;
}

.showcase-card:hover .showcase-quick-explore-hint {
  transform: translateY(0);
  opacity: 1;
  background: var(--accent);
  box-shadow: 0 4px 15px rgba(79, 140, 255, 0.4);
}

/* Showcase Card Body */
.showcase-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.showcase-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.75rem;
}

.showcase-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.showcase-title-area {
  flex-grow: 1;
}

.showcase-title {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 2px;
}

.showcase-subtitle {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}

.showcase-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0.75rem 0 1.25rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Key Highlights Row */
.showcase-highlights {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 1.5rem;
  background: var(--bg3);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.showcase-highlight-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.4;
}

.showcase-highlight-item svg {
  flex-shrink: 0;
}

/* Showcase Tags */
.showcase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  margin-bottom: 1.5rem;
}

.showcase-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg3);
  color: var(--muted);
  border: 1px solid var(--border);
}

/* Card Action Footer */
.showcase-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.btn-explore-case-study {
  flex-grow: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Syne', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 20px rgba(79, 140, 255, 0.25);
}

.btn-explore-case-study:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(79, 140, 255, 0.4);
}

.btn-card-external {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-card-external:hover {
  border-color: var(--accent);
  background: rgba(79, 140, 255, 0.1);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-card-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
  text-decoration: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-card-live:hover {
  background: rgba(34, 197, 94, 0.22);
  border-color: #4ade80;
  color: #86efac;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.25);
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: livePulse 2s infinite;
}

@keyframes livePulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* ==========================================================================
   DEDICATED CASE STUDY MODAL EXPERIENCE
   ========================================================================== */

.case-study-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(4, 4, 8, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s allow-discrete;
}

:root.light-mode .case-study-overlay {
  background: rgba(240, 243, 246, 0.88);
}

.case-study-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.case-study-dialog {
  width: 100%;
  max-width: 1180px;
  max-height: 90vh;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
  transform: translateY(35px) scale(0.97);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

:root.light-mode .case-study-dialog {
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.15);
}

.case-study-overlay.active .case-study-dialog {
  transform: translateY(0) scale(1);
}

/* Sticky Modal Header */
.case-study-navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.case-study-nav-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.case-study-nav-icon {
  font-size: 20px;
}

.case-study-nav-title {
  font-family: 'Syne', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.case-study-nav-counter {
  font-size: 12px;
  color: var(--muted);
  font-family: monospace;
  background: var(--bg3);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.case-study-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg3);
  border: 1px solid var(--border2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-nav-btn:hover {
  border-color: var(--accent);
  background: rgba(79, 140, 255, 0.1);
  color: var(--accent);
}

.modal-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #ff5f56;
  border-color: #ff5f56;
  color: #ffffff;
  transform: rotate(90deg);
}

/* Modal Content Scroll Area */
.case-study-scroll-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 2.5rem;
  scroll-behavior: smooth;
}

/* Custom Scrollbar for Modal Body */
.case-study-scroll-body::-webkit-scrollbar {
  width: 8px;
}

.case-study-scroll-body::-webkit-scrollbar-track {
  background: var(--bg);
}

.case-study-scroll-body::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px;
}

.case-study-scroll-body::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* Individual Case Study Views */
.case-study-article {
  display: none;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.case-study-article.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Case Study Hero Section */
.case-study-hero-banner {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.case-study-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.case-study-main-title {
  font-family: 'Syne', sans-serif;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 8px;
}

.case-study-main-type {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.case-study-platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  margin-bottom: 1.25rem;
}

.case-study-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1rem;
}

/* Next Project Transition Card at bottom of Modal */
.case-study-next-project-banner {
  margin-top: 4rem;
  padding: 2.5rem;
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
  border: 1px solid var(--border2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}

.next-project-eyebrow {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.next-project-name {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
}

.btn-next-project {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 12px;
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(79, 140, 255, 0.3);
  flex-shrink: 0;
}

.btn-next-project:hover {
  transform: translateX(4px);
  box-shadow: 0 10px 28px rgba(79, 140, 255, 0.45);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .modern-showcase-grid {
    grid-template-columns: 1fr;
  }

  .case-study-dialog {
    max-height: 95vh;
    border-radius: 18px;
  }

  .case-study-scroll-body {
    padding: 1.5rem;
  }

  .case-study-main-title {
    font-size: 26px;
  }

  .case-study-next-project-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.75rem;
  }

  .btn-next-project {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .case-study-overlay {
    padding: 0.5rem;
  }

  .case-study-navbar {
    padding: 0.75rem 1rem;
  }

  .case-study-nav-title {
    font-size: 14px;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .modal-nav-btn span {
    display: none;
  }

  .showcase-footer {
    flex-direction: column;
  }

  .btn-explore-case-study {
    width: 100%;
  }

  .btn-card-external {
    width: 100%;
  }
}

