/* 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; }