/* soften & blend particles into the background */
#hero-particles canvas,
#hero-particles-now canvas { /* Target both particle containers */
  opacity: 0.5;               /* dial it up/down to taste */
  mix-blend-mode: screen;     /* or try 'lighten' */
  position: absolute; /* Ensure it stays within its container */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0; /* Behind hero content */
}

/* -------------------------------------------------------------------
   THEME VARIABLES & DARK MODE
   ------------------------------------------------------------------- */
:root {
  --bg-color-light: #ffffff;
  --text-color-light: #1f2937; /* gray-800 */
  --header-bg-light: #ffffff;
  --footer-bg-light: #f9fafb; /* gray-50 */
  --card-bg-light: #ffffff;
  --card-shadow-light: 0 5px 15px rgba(0, 0, 0, 0.1);
  --nav-link-hover-bg-light: #e0e7ff; /* indigo-100 */
  --nav-link-hover-text-light: #4f46e5; /* indigo-600 */
  --primary-accent: #4f46e5; /* indigo-600 */
  --secondary-accent: #6366f1; /* indigo-500 */
  --tech-badge-bg-light: rgba(99,102,241,0.1);
  --tech-badge-text-light: #4f46e5;
}

html.dark {
  --bg-color-dark: #111827; /* gray-900 */
  --text-color-dark: #d1d5db; /* gray-300 */
  --header-bg-dark: #1f2937; /* gray-800 */
  --footer-bg-dark: #1f2937; /* gray-800 */
  --card-bg-dark: #1f2937; /* gray-800 */
  --card-shadow-dark: 0 5px 15px rgba(0, 0, 0, 0.2);
  --nav-link-hover-bg-dark: #374151; /* gray-700 */
  --nav-link-hover-text-dark: #a5b4fc; /* indigo-300 */
  --primary-accent-dark: #818cf8; /* indigo-400 */
  --secondary-accent-dark: #a5b4fc; /* indigo-300 */
  --tech-badge-bg-dark: rgba(129, 140, 248, 0.15); /* indigo-400 @ 15% */
  --tech-badge-text-dark: #a5b4fc; /* indigo-300 */
}

body {
  background-color: var(--bg-color-light);
  color: var(--text-color-light);
  transition: background-color 0.3s ease, color 0.3s ease;
}

html.dark body {
  background-color: var(--bg-color-dark);
  color: var(--text-color-dark);
}

/* Header & Footer */
header {
  background-color: var(--header-bg-light);
  /* border-color will be handled by Tailwind's dark:border-gray-700 */
}
html.dark header {
  background-color: var(--header-bg-dark);
}

footer {
  background-color: var(--footer-bg-light);
}
html.dark footer {
  background-color: var(--footer-bg-dark);
}

/* Navigation Links - Tailwind handles most of this, but you can add specific overrides */
/* Example for an active link - you'd need JS to add an 'active' class */
/*
nav a.active {
  color: var(--primary-accent);
  font-weight: bold;
}
html.dark nav a.active {
  color: var(--primary-accent-dark);
}
*/

/* -------------------------------------------------------------------
   PROJECT CARD
   ------------------------------------------------------------------- */
.project-card-custom {
  background-color: var(--card-bg-light);
  border-radius: 0.75rem; /* Slightly more rounded */
  /* padding: 1.5rem; */ /* Padding is handled by Tailwind in the HTML */
  box-shadow: var(--card-shadow-light);
  /* transition: transform 0.3s ease, box-shadow 0.3s ease; */ /* Handled by Tailwind */
  /* border-top: 4px solid var(--primary); */ /* Removed, using aura effect from HTML */
}

html.dark .project-card-custom {
  background-color: var(--card-bg-dark);
  box-shadow: var(--card-shadow-dark);
  /* border-top-color: var(--primary-accent-dark); */
}

/* The hover effects for project-card-custom are defined in the HTML <style> block */

/* -------------------------------------------------------------------
   TECH BADGES
   ------------------------------------------------------------------- */
.tech-badge {
  display: inline-block;
  background-color: var(--tech-badge-bg-light);
  color: var(--tech-badge-text-light);
  font-size: 0.75rem; /* text-xs */
  font-weight: 500; /* font-medium */
  padding: 0.35rem 0.75rem; /* py-1.5 px-3 - adjusted to match HTML */
  border-radius: 9999px; /* rounded-full */
}

html.dark .tech-badge {
  background-color: var(--tech-badge-bg-dark);
  color: var(--tech-badge-text-dark);
}

/* Specific tech badges for 'now.html' if you want them different */
html.dark .tech-badge.bg-green-100 { /* Example for now.html specific badge */
  background-color: rgba(16, 185, 129, 0.15) !important; /* Adjust dark green badge */
  color: #34d399 !important; /* emerald-400 */
}
html.dark .tech-badge.bg-blue-100 { /* Example for now.html specific badge */
  background-color: rgba(59, 130, 246, 0.15) !important; /* Adjust dark blue badge */
  color: #93c5fd !important; /* blue-300 */
}


/* -------------------------------------------------------------------
   PROJECT ICONS
   ------------------------------------------------------------------- */
.project-icon img,
.project-icon lottie-player {
  filter: hue-rotate(200deg) saturate(1.2);
}
/* Example: To adjust project icons in dark mode, uncomment and customize the filter below */
/*
html.dark .project-icon img,
html.dark .project-icon lottie-player {
  filter: hue-rotate(200deg) saturate(1.0) brightness(0.9);
}
*/

/* -------------------------------------------------------------------
   OPTIONAL: HERO BACKGROUND PATTERN
   ------------------------------------------------------------------- */
.music-it-pattern {
  background-image: url("/static/images/music-it-pattern.svg");
  background-size: cover;
  opacity: 0.1;
}


/* Modal overlay hidden by default */
/* .modal-overlay {
  display: none;
} */

/* When active, show and fade in */
/* .modal-overlay.is-active {
  display: block;
  animation: fadeIn 0.3s ease forwards;
} */

/* Optional fadeIn keyframes */
/* @keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
} */

/* Ensure the modal content doesn’t overflow the viewport */
/* #project-detail-modal .shadow-xl {
  max-height: 90vh;
  overflow-y: auto;
} */

/* -------------------------------------------------------------------
   RESPONSIVE VIDEO (IFRAME) WRAPPER
   ------------------------------------------------------------------- */
.video-responsive-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio (9 / 16 = 0.5625) */
  height: 0; /* Collapse the div itself, padding-bottom provides the height */
}

.video-responsive-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Example: Add to your stylesheet for #modal-thumbnail-image */
#modal-thumbnail-image {
  image-rendering: auto; /* or try smooth if supported, though auto is often best for photos */
}

  /* list-view: full-width stacked rows, each card as a flex-row */
  #projects-grid.list-view {
    display: flex;
    flex-direction: column;
  }
  #projects-grid.list-view .project-card-custom {
    flex-direction: row !important;
    height: auto !important;
    margin-bottom: 1rem;
  }
  /* when #projects-grid has .list-view, force all thumbs to the same height */
  #projects-grid.list-view .card-img-wrapper {
    height: 12rem !important;  /* adjust 12rem to whatever fixed height you like */
  }
  /* ensure the img fills that box and is letterboxed rather than stretched */
  #projects-grid.list-view .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* or object-contain if you want all of the image visible */
  }
  /* content area takes remaining width */
  #projects-grid.list-view .project-card-custom > .p-6 {
    width: 70%;
  }

#carousel .carousel-card {
  min-width: 100%;
  flex-shrink: 0;
  padding: 0.25rem; /* Reduced padding to maximize image space in a short banner */
  box-sizing: border-box; /* Ensure padding is included in width/height calculations */
  height: 100%; /* Ensure card takes full height of the track item */
}
#carousel .carousel-card .card-inner {
  position: relative;
  width: 100%;
  height: 100%; /* Make card-inner fill the carousel-card height */
  overflow: hidden;
  border-radius: 0.375rem; /* Slightly smaller border-radius (md) */
  background-color: #2d3748; /* Dark background for letterboxing (Tailwind gray-800) */
  /* Removed fixed aspect-ratio to adapt to banner shape */
  box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Softened shadow */
  transition: transform 0.3s ease;
  display: flex; /* Added for centering the image if needed, works with object-fit */
  align-items: center; /* Vertically center image if letterboxed */
  justify-content: center; /* Horizontally center image if pillarboxed */
}

html.dark #carousel .carousel-card .card-inner {
  background-color: #1a202c; /* Even darker for dark mode (Tailwind gray-900) */
}

#carousel .carousel-card:hover .card-inner { transform:scale(1.01); } /* Reduced hover scale for subtlety */
#carousel .carousel-card img {
  /* position: absolute; */ /* Not needed if parent is flex centering */
  /* inset: 0; */
  max-width: 100%;  /* Ensure image does not exceed container width */
  max-height: 100%; /* Ensure image does not exceed container height */
  width: auto;      /* Allow image to scale width based on height and aspect ratio */
  height: auto;     /* Allow image to scale height based on width and aspect ratio */
  object-fit: contain; /* This ensures the whole image is visible without stretching, letterboxed if necessary */
  display: block; /* Remove extra space below image */
}
/* dots */
#carousel-dots button {
  width: 0.75rem; height: 0.75rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  transition:background 0.3s, transform 0.3s;
}
#carousel-dots button:hover { transform:scale(1.2); }
#carousel-dots button.active { background:rgba(255,255,255,1); }
/* spotlight flip animation */
@keyframes flipIn {
  from { transform: rotateX(90deg); opacity: 0; }
  to   { transform: rotateX(0); opacity: 1; }
}
#spotlight-grid .overflow-hidden {
  animation: flipIn 0.6s ease;
}

/* spotlight hover */
#spotlight-grid .spotlight-item {
  overflow:hidden; border-radius:0.5rem; box-shadow:0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
#spotlight-grid .spotlight-item:hover {
  transform:scale(1.03); box-shadow:0 6px 20px rgba(0,0,0,0.15);
}
#spotlight-grid .spotlight-item img {
  width:100%;
  height:8rem; /* Reduced from 12rem. Adjust this value as needed for desired compactness. Could be 6rem or 7rem. */
  object-fit: cover;
}

/* Masonry grid for photography page */
.masonry-grid {
  column-count: 2;
  column-gap: 0.5rem;
}
@media (min-width: 640px) { .masonry-grid { column-count: 3; } }
@media (min-width: 768px) { .masonry-grid { column-count: 4; } }
@media (min-width: 1024px) { .masonry-grid { column-count: 5; } }
@media (min-width: 1280px) { .masonry-grid { column-count: 6; } }
.photo-item { break-inside: avoid; margin-bottom: 0.5rem; }
.photo-item img { width: 100%; height: auto; display: block; }

/* -------------------------------------------------------------------
   PHOTOGRAPHY LANDING LAYOUT
   ------------------------------------------------------------------- */
.photo-hero-shell {
  background: radial-gradient(120% 120% at 18% 22%, #111a2a 0%, #0a101c 50%, #070b14 100%);
  color: #f6f7fb;
  padding: 4rem 1.5rem 2.75rem;
}

.photo-hero {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 1024px) {
  .photo-hero {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

.photo-kicker {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  line-height: 1;
  color: #cde7ff;
  margin-bottom: 0.35rem;
}

.photo-title {
  font-family: 'Playfair Display', serif;
  font-size: 3.4rem;
  line-height: 0.95;
  color: #3ea7ff;
  margin-bottom: 1rem;
}

.photo-title-dot {
  color: #5eead4;
}

.photo-subtitle {
  color: #cfd3dd;
  max-width: 32rem;
  line-height: 1.6;
  font-size: 1rem;
}

.photo-hero__filters {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1.05rem;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.filter-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #9ca3af;
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

.photo-filters-section {
  background: #0b0c11;
  padding: 2rem 1.5rem 1.5rem;
}

.filters-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.photo-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.photo-filter {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.photo-filter:hover {
  border-color: #3ea7ff;
  color: #ffffff;
}

.photo-filter.is-active {
  background: linear-gradient(135deg, #3ea7ff, #5eead4);
  border-color: transparent;
  color: #06101f;
  box-shadow: 0 14px 36px rgba(62, 167, 255, 0.3);
}

.photo-gallery {
  background: #0b0c11;
  padding: 2rem 1.5rem 1.5rem;
  position: relative;
}

.photo-see-more {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  padding: 1.1rem 1.2rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.see-more-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.see-more-kicker {
  color: #cde7ff;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.see-more-sub {
  color: #9fb6d3;
  font-size: 0.95rem;
}

.see-more-btn {
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #3ea7ff, #5eead4);
  color: #06101f;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 12px 28px rgba(62, 167, 255, 0.28);
}

.see-more-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(62, 167, 255, 0.32);
}

.see-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.see-more-btn.is-loading {
  position: relative;
  color: transparent;
}

.see-more-btn.is-loading::after {
  content: "";
  position: absolute;
  width: 1rem;
  height: 1rem;
  top: 50%;
  left: 50%;
  margin-left: -0.5rem;
  margin-top: -0.5rem;
  border: 2px solid rgba(6, 16, 31, 0.3);
  border-top-color: #06101f;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Loading overlay that appears during shuffle */
.photo-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 12, 17, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(3px);
  border-radius: 1rem;
}

.photo-loading-overlay.is-active {
  display: flex;
  animation: fadeInOverlay 0.3s ease-out;
}

.photo-loading-overlay.is-fading {
  animation: fadeOutOverlay 0.4s ease-out forwards;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOutOverlay {
  from { opacity: 1; }
  to { opacity: 0; }
}

.photo-loading-spinner {
  width: 3.5rem;
  height: 3.5rem;
  border: 3px solid rgba(62, 167, 255, 0.2);
  border-top-color: #3ea7ff;
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

.photo-card.fade-in {
  animation: fadeSlideIn 0.5s ease-out forwards;
}

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

.photo-masonry {
  column-count: 1;
  column-gap: 1.2rem;
  max-width: 1100px;
  margin: 0 auto;
}

@media (min-width: 640px) { .photo-masonry { column-count: 2; } }
@media (min-width: 900px) { .photo-masonry { column-count: 3; } }

.photo-card {
  break-inside: avoid;
  margin-bottom: 1.2rem;
  position: relative;
  border-radius: 1.1rem;
  overflow: hidden;
  background: linear-gradient(145deg, #11121a, #0c0d13);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.photo-card__media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 1rem;
  transition: transform 0.35s ease;
}

.photo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 28% 22%, rgba(62, 167, 255, 0.18), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.photo-card:hover img { transform: scale(1.03); }
.photo-card:hover::after { opacity: 1; }

.photo-empty {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  text-align: center;
  color: #9ca3af;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
}

.photo-info {
  background: #0b0c11;
  padding: 2rem 1.5rem 3rem;
}

.photo-info-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.info-card {
  background: #11121a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  padding: 1.35rem 1.25rem;
  color: #e5e7eb;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  position: relative;
  overflow: hidden;
}

.info-card--cta {
  background: linear-gradient(145deg, #0ea5e9, #22d3ee);
  color: #04101f;
  border-color: transparent;
  box-shadow: 0 18px 40px rgba(14, 165, 233, 0.32);
}

.info-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(62, 167, 255, 0.14);
  color: #3ea7ff;
  margin-bottom: 0.8rem;
}

.info-card--cta .info-icon {
  background: rgba(4, 16, 31, 0.16);
  color: #04101f;
}

.info-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.info-copy {
  color: #cfd3dd;
  line-height: 1.55;
  font-size: 0.95rem;
}

.info-card--cta .info-copy { color: #0c0e13; }

.info-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.95rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  font-weight: 800;
  color: #04101f;
  background: rgba(255, 255, 255, 0.9);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}