/* --- Global Reset & Variables --- */
:root {
  --bg-primary: #080c10;
  --bg-secondary: #0d131a;
  --bg-card: rgba(17, 24, 32, 0.7);
  --border-color: rgba(48, 54, 61, 0.6);
  --accent: #7c4dff;
  --accent-glow: rgba(124, 77, 255, 0.35);
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #484f58;
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
}

body {
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* --- Ambient Glow Backgrounds --- */
.glow-bg {
  position: absolute;
  width: 45vw;
  height: 45vw;
  border-radius: 50%;
  filter: blur(150px);
  pointer-events: none;
  opacity: 0.12;
  z-index: -10;
  will-change: transform;
}
.glow-1 {
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -10vw;
  right: -5vw;
  animation: float-glow-1 20s ease-in-out infinite;
}
.glow-2 {
  background: radial-gradient(circle, #e040fb 0%, transparent 70%);
  top: 40vw;
  left: -10vw;
  animation: float-glow-2 25s ease-in-out infinite;
}

@keyframes float-glow-1 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-10%, 15%) scale(1.1);
  }
}
@keyframes float-glow-2 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(15%, -10%) scale(0.9);
  }
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #21262d;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

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

/* --- Header / Navigation --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(8, 12, 16, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
}
header.scrolled {
  background: rgba(8, 12, 16, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.logo {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.3px;
  display: inline-flex;
  align-items: center;
}
.logo-accent {
  color: var(--accent);
}
.logo-e {
  display: inline-block;
  transform: rotate(10deg) translateY(-0.5px); /* Tilted right (clockwise) and aligned */
  transform-origin: center;
}
.logo-bit {
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 0.9em; /* Scaled to align with Outfit line height */
  font-weight: 700;
  letter-spacing: -0.2px;
  margin: 0 1px;
  display: inline-block;
  transform: translateY(1.2px); /* Shifted down to align baseline with standard letters */
}
.footer-logo {
  font-size: 24px;
}
nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: var(--transition-smooth);
}
nav a:hover {
  color: var(--text-primary);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 30px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-primary {
  background-color: var(--accent);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover {
  background-color: #9266ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 77, 255, 0.5);
}
.btn-secondary {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background-color: #1c2635;
  border-color: #8b949e;
  transform: translateY(-2px);
}
.nav-btn {
  padding: 8px 16px;
  font-size: 13px;
}
.nav-mobile-only {
  display: none !important;
}
.heart-icon {
  width: 16px;
  height: 16px;
}
.btn-kofi {
  background-color: #ff5f5f;
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 4px 14px rgba(255, 95, 95, 0.35);
}
.btn-kofi:hover {
  background-color: #ff7d7d;
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 95, 95, 0.5);
}
.kofi-icon {
  width: 16px;
  height: 16px;
}

/* --- Hero Section --- */
.hero-section {
  padding: 180px 0 100px;
  text-align: center;
  position: relative;
}
.badge-pill {
  display: inline-block;
  background: rgba(124, 77, 255, 0.08);
  border: 1px solid rgba(124, 77, 255, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 28px;
  color: #a380ff;
  animation: fadeIn 0.8s ease-out;
}
.hero-section h1 {
  font-family: var(--font-title);
  font-size: clamp(32px, 7vw, 68px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
  animation: slideUp 0.8s ease-out;
}
.text-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, #e040fb 35%, #7c4dff 70%, #e040fb 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: text-shine 6s linear infinite;
}

@keyframes text-shine {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.hero-sub {
  font-size: clamp(16px, 2.5vw, 19px);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 40px;
  animation: slideUp 1s ease-out;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  animation: slideUp 1.2s ease-out;
}

/* --- Projects Section --- */
.projects-section {
  padding: 80px 0;
}
.section-header {
  text-align: center;
  margin-bottom: 50px;
}
.section-header h2 {
  font-family: var(--font-title);
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 12px;
}
.section-header p {
  color: var(--text-secondary);
  font-size: 16px;
}
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}
.tab-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: 20px;
  font-family: var(--font-title);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.tab-btn:hover, .tab-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.project-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: opacity 0.3s var(--transition-smooth), transform 0.3s var(--transition-smooth), border-color 0.3s, box-shadow 0.3s;
}
.project-card.filtered-out {
  opacity: 0;
  transform: scale(0.9) translateY(10px);
  pointer-events: none;
}
.project-card.filtered-in {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 77, 255, 0.4);
  box-shadow: 0 12px 30px rgba(124, 77, 255, 0.15);
}
.card-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--accent-glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 1;
}
.project-card:hover .card-glow, .media-card:hover .card-glow {
  opacity: 1;
}
.card-content {
  padding: 30px;
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.project-type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
}
.project-card h3 {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}
.project-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
  flex-grow: 1;
}
.project-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}
.stat-item {
  display: flex;
  flex-direction: column;
}
.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.stat-val {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}
.card-link {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition-smooth);
}
.card-link:hover {
  color: #fff;
}

/* --- In Development Cards --- */
.project-card.in-development {
  border-style: dashed;
}
.card-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(124, 77, 255, 0.15);
  color: #a380ff;
  border: 1px solid rgba(124, 77, 255, 0.3);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
}

/* --- Philosophy Section --- */
.philosophy-section {
  padding: 100px 0;
  background-color: var(--bg-secondary);
  position: relative;
}
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}
.phil-card {
  background: rgba(8, 12, 16, 0.5);
  border: 1px solid var(--border-color);
  padding: 40px;
  border-radius: 16px;
  transition: var(--transition-smooth);
}
.phil-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}
.phil-icon {
  font-size: 32px;
  margin-bottom: 20px;
}
.phil-card h3 {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}
.phil-card p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* --- Sponsors Section --- */
.sponsors-section {
  padding: 100px 0;
  text-align: center;
}
.sponsors-marquee-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 20px 0;
  max-width: 800px;
  margin: 0 auto 50px;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
  position: relative;
  mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
}
.sponsors-marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 25s linear infinite;
}
.sponsors-marquee-list {
  display: flex;
  align-items: center;
  gap: 48px;
  padding-right: 48px;
}
@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
.sponsors-marquee-container:hover .sponsors-marquee-track {
  animation-play-state: paused;
}
.sponsor-name {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
}
.sponsor-name a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-smooth);
}
.sponsor-name a:hover {
  color: var(--accent);
}
.sponsor-name.anonymous {
  color: var(--text-secondary);
}
.sponsors-cta p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.sponsors-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Footer --- */
footer {
  background: #05080c;
  padding: 80px 0;
  border-top: 1px solid var(--border-color);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}
.footer-brand {
  max-width: 320px;
}
.footer-brand h3 {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}
.footer-brand p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}
.copyright {
  font-size: 12px;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links h4 {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition-smooth);
}
.footer-links a:hover {
  color: var(--accent);
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Featured Media Section --- */
.featured-section {
  padding: 100px 0;
}
.media-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 40px;
}
@media (min-width: 768px) {
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1200px) {
  .media-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.media-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition-smooth);
}
.media-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}
@media (min-width: 576px) {
  .media-link {
    flex-direction: row;
  }
}
.thumbnail-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background-color: #000;
  width: 100%;
}
@media (min-width: 576px) {
  .thumbnail-wrapper {
    width: 160px;
    flex-shrink: 0;
  }
}
.media-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition-smooth);
}
.play-icon {
  width: 44px;
  height: 44px;
  padding: 10px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 0 15px var(--accent-glow);
  transition: var(--transition-smooth);
}
.duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(8, 12, 16, 0.85);
  backdrop-filter: blur(4px);
  color: var(--text-primary);
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}
.media-details {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
}
.media-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.media-author {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}
.media-card h3 {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0px;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}
.media-card p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}
.media-tags {
  display: flex;
  gap: 8px;
}
.media-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* --- Hover Effects --- */
.media-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 77, 255, 0.4);
  box-shadow: 0 12px 30px rgba(124, 77, 255, 0.15);
}
.media-card:hover .media-thumbnail {
  transform: scale(1.05);
}
.media-card:hover .play-overlay {
  opacity: 1;
}
.media-card:hover h3 {
  color: var(--accent);
}

/* --- Hamburger Menu Toggle --- */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  cursor: pointer;
  z-index: 120;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.mobile-menu-toggle:hover {
  background: rgba(124, 77, 255, 0.1);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}
.mobile-menu-toggle .bar {
  width: 18px;
  height: 2px;
  background-color: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-menu-toggle:hover .bar {
  background-color: var(--text-primary);
}

/* --- Responsive Media Queries --- */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  /* Hamburger to X animation */
  .mobile-menu-toggle.active {
    transform: rotate(90deg);
    background: rgba(255, 95, 95, 0.1);
    border-color: rgba(255, 95, 95, 0.3);
    box-shadow: 0 0 12px rgba(255, 95, 95, 0.2);
  }
  .mobile-menu-toggle.active .bar {
    background-color: #ff5f5f;
  }
  .mobile-menu-toggle.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .mobile-menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
    transform: scale(0);
  }
  .mobile-menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  nav {
    position: fixed;
    top: 60px;
    right: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: rgba(8, 12, 16, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  nav::before {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(124, 77, 255, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
  }
  nav.active {
    transform: translateX(0);
  }
  nav > a, nav > .nav-actions {
    opacity: 0;
    transform: translateX(25px);
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--nav-item-idx) * 0.06s);
  }
  nav.active > a, nav.active > .nav-actions {
    opacity: 1;
    transform: translateX(0);
  }
  nav a:not(.btn) {
    font-size: 18px;
    font-family: var(--font-title);
    font-weight: 600;
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    width: 80%;
    max-width: 320px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  nav a:not(.btn):hover, nav a:not(.btn):active {
    background: rgba(124, 77, 255, 0.08);
    border-color: rgba(124, 77, 255, 0.3);
    color: var(--text-primary);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(124, 77, 255, 0.15);
  }
  .nav-actions {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    width: 80%;
    max-width: 320px;
    justify-content: center;
  }
  .nav-mobile-only {
    display: inline-flex !important;
  }
  .nav-actions .nav-btn {
    flex: 1;
    font-size: 14px;
    padding: 10px 16px;
    border-radius: 24px;
    text-align: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .nav-actions .nav-btn:hover, .nav-actions .nav-btn:active {
    transform: scale(1.05) translateY(-1px);
    box-shadow: 0 4px 15px rgba(124, 77, 255, 0.2);
  }
  .nav-cta {
    display: none !important;
  }
  
  .hero-section {
    padding: 140px 0 70px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
  }
  .footer-grid {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  .hero-section {
    padding: 120px 0 50px;
  }
  .projects-grid, .philosophy-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .phil-card {
    padding: 24px;
  }
  .media-details {
    padding: 16px;
  }
  .sponsors-marquee-container {
    padding: 12px 20px;
    margin-bottom: 30px;
  }
  .sponsor-name {
    font-size: 16px;
  }
}

/* --- Scroll-Driven Reveal Animations & Fallbacks --- */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes fade-slide-up {
      from {
        opacity: 0;
        transform: translateY(40px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .projects-grid > *, 
    .media-card, 
    .phil-card, 
    .section-header {
      animation: fade-slide-up auto linear cubic-bezier(0.16, 1, 0.3, 1) both;
      animation-timeline: view();
      animation-range: entry 10% cover 30%;
    }
  }
}

/* IntersectionObserver Fallback styling */
.scroll-hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.scroll-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* --- Card Actions & Screenshots Preview --- */
.card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  gap: 12px;
}
.btn-screenshot {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-screenshot:hover {
  background: rgba(124, 77, 255, 0.1);
  border-color: var(--accent);
  color: var(--text-primary);
}

/* Inline Screenshot Preview Overlay */
.screenshot-preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 12, 16, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(15px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.screenshot-preview-overlay.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.screenshot-img-wrapper {
  position: relative;
  width: 100%;
  height: calc(100% - 30px);
  display: flex;
  justify-content: center;
  align-items: center;
}
.screenshot-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  transition: opacity 0.2s ease;
}
.screenshot-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  z-index: 12;
  transition: var(--transition-smooth);
}
.screenshot-close-btn:hover {
  background: rgba(124, 77, 255, 0.3);
  border-color: var(--accent);
}
.screenshot-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 11;
  font-size: 20px;
  transition: var(--transition-smooth);
}
.screenshot-nav-btn:hover {
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 0 12px var(--accent-glow);
}
.screenshot-nav-prev {
  left: 4px;
}
.screenshot-nav-next {
  right: 4px;
}
.screenshot-indicators {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.screenshot-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: var(--transition-smooth);
}
.screenshot-indicator-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

/* Loading Spinner */
.screenshot-spinner {
  position: absolute;
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin-loader 0.8s linear infinite;
  z-index: 9;
}
@keyframes spin-loader {
  to { transform: rotate(360deg); }
}

/* Expand Button inside Card Preview */
.screenshot-expand-btn {
  position: absolute;
  top: 16px;
  right: 52px; /* Placed next to the close button */
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
  z-index: 12;
  transition: var(--transition-smooth);
}
.screenshot-expand-btn:hover {
  background: rgba(124, 77, 255, 0.3);
  border-color: var(--accent);
}

/* Fullscreen Lightbox Modal */
.screenshot-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 8, 12, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.screenshot-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}
.screenshot-lightbox-img {
  max-width: 90%;
  max-height: 85%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.8);
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.screenshot-lightbox.active .screenshot-lightbox-img {
  transform: scale(1);
}
.screenshot-lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  z-index: 2012;
  transition: var(--transition-smooth);
}
.screenshot-lightbox-close:hover {
  background: rgba(255, 95, 95, 0.3);
  border-color: #ff5f5f;
}

/* Fullscreen Lightbox Navigation Controls */
.screenshot-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 2011;
  font-size: 32px;
  line-height: 1;
  transition: var(--transition-smooth);
}
.screenshot-lightbox-nav:hover {
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 0 16px var(--accent-glow);
}
.screenshot-lightbox-nav-prev {
  left: 24px;
}
.screenshot-lightbox-nav-next {
  right: 24px;
}

/* --- Card Action Buttons Layout --- */
.card-buttons {
  display: flex;
  gap: 8px;
}
.btn-features {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-features:hover {
  background: rgba(124, 77, 255, 0.1);
  border-color: var(--accent);
  color: var(--text-primary);
}

/* Inline Features Preview Overlay */
.features-preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 12, 16, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10;
  display: flex;
  flex-direction: column;
  padding: 42px 20px 24px; /* padding-top fits header close buttons */
  opacity: 0;
  pointer-events: none;
  transform: translateY(15px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 16px;
}
.features-preview-overlay.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.features-title {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-left: 4px;
}
.features-viewport {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  -ms-overflow-style: none; /* Hide scrollbar for IE/Edge */
  scroll-behavior: smooth;
  position: relative;
  padding: 12px 4px;
}
.features-viewport::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari/Opera */
}
.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.features-list li {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 8px;
}
.features-list li strong {
  color: var(--text-primary);
}
.features-list li a {
  color: var(--accent);
  text-decoration: none;
}
.features-list li a:hover {
  text-decoration: underline;
}

/* Scroll Buttons for Card Overlay */
.features-scroll-btn {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 12;
  font-size: 10px;
  transition: var(--transition-smooth);
}
.features-scroll-btn:hover {
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 0 8px var(--accent-glow);
}
.features-scroll-up {
  top: 8px; /* Safe padding spacing */
}
.features-scroll-down {
  bottom: 8px;
}

/* Fullscreen Features Lightbox */
.features-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 8, 12, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.features-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}
.features-lightbox-content {
  width: 90%;
  max-width: 650px;
  height: 65%;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  padding: 40px 30px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.8);
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.features-lightbox.active .features-lightbox-content {
  transform: scale(1);
}
.features-lightbox-content::-webkit-scrollbar {
  display: none;
}
.features-lightbox-title {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}
.features-lightbox-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.features-lightbox-list li {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 12px;
}
.features-lightbox-list li strong {
  color: var(--text-primary);
}
.features-lightbox-list li a {
  color: var(--accent);
  text-decoration: none;
}
.features-lightbox-list li a:hover {
  text-decoration: underline;
}

/* Lightbox Scroll Buttons (Floating at top-center and bottom-center) */
.features-lightbox-scroll {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 2011;
  font-size: 16px;
  transition: var(--transition-smooth);
}
.features-lightbox-scroll:hover {
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 0 16px var(--accent-glow);
}
.features-lightbox-scroll-up {
  top: 8%; /* Safe viewport heights */
}
.features-lightbox-scroll-down {
  bottom: 8%;
}
.features-lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  z-index: 2012;
  transition: var(--transition-smooth);
}
.features-lightbox-close:hover {
  background: rgba(255, 95, 95, 0.3);
  border-color: #ff5f5f;
}
