:root {
    --navbar-height: 64px; /* Tailwind default height */
}

/* Content section styling */
.content-section {
    background: rgba(0, 0, 0, 0.85); /* Semi-transparent black */
}

/* Navbar Background Animation */
#navbar {
    background: linear-gradient(45deg, #00FF00, #FF00FF, #00FFFF);
    background-size: 200% 200%;
    animation: gradientShift 1s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Scroll Effect */
#navbar.scrolled {
    box-shadow: 0 4px 8px #1a1a1a; /* Indigo-300 shadow */
}

/* Animated Underline for Nav Links */
.nav-link {
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #00FF00; /* Indigo-300 */
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

/* Active Link Styling */
.nav-link.active {
    color: #FF00FF; /* Indigo-300 */
}

.nav-link.active::after {
    width: 100%;
    left: 0;
}

/* Logo Pulse Animation */
.logo-pulse:hover {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1.1); }
}

/* Mobile Menu Slide-In */
#mobile-menu:not(.hidden) {
    transform: translateY(0);
    background: linear-gradient(45deg, #00FF00, #FF00FF, #00FFFF);
    background-size: 200% 200%;
    animation: gradientShift 1s ease infinite;
}


/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.modal-content {
    background: none; /* Dark gray */
    color: white;
    max-width: 800px;
    width: 90%;
    padding: 2rem;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #00FF00; /* Indigo-300 */
}

#search-modal:not(.hidden) {
    display: flex;
}

/* Image modal specific */
.modal img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.modal-caption {
    color: white;
    font-size: 1.25rem;
    margin-top: 1rem;
    text-align: center;
}

/* Video modal specific */
#videoModal .modal-content {
    position: relative;
    width: 100%;
    max-width: 1400px;
    aspect-ratio: 16 / 9;
    height: 80vh; /* Ensure large display */
}

#videoModal .modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

#videoModal .modal-close {
    top: -40px;
    right: 0;
}

/* Form inputs */
.form-input {
    background: #1a1a1a;
    border: 1px solid #00FF00; /* Gray-600 */
    color: white;
    padding: 10px;
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: #FF00FF; /* Indigo-300 */
}

/* Hero section (index.html) */
.hero-slide {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.active {
    display: block;
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 8rem;
}

/* Card hover effects */
.portfolio-card,
.preview-card,
.album-card,
.video-card,
.blog-card {
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.portfolio-card:hover,
.preview-card:hover,
.album-card:hover,
.video-card:hover,
.blog-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(165, 180, 252, 0.3); /* Indigo-300 shadow */
}

/* Video container (index.html) */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
}

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

/* Album card styles (music.html) */
.album-card img {
    width: 100%;
    height: auto;
}

/* Embed container (music.html) */
.embed-container {
    background: #1a1a1a;
    padding: 16px;
}

.embed-container iframe {
    width: 100%;
}

/* Video card styles (videos.html) */
.video-card img {
    width: 100%;
    height: auto;
}

.video-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.1);
    color: white;
    padding: 10px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-card:hover .video-title {
    opacity: 1;
}

/* Phyllotaxis canvas (code.html) */
#phyllotaxis-canvas {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: 100%;
    height: calc(100dvh - var(--navbar-height));
    z-index: -1; /* Ensure canvas is behind all content */
    pointer-events: none; /* Prevent canvas from capturing mouse events */
}

/* Ensure content is readable over canvas (code.html) */
.content-section.canvas-overlay {
    backdrop-filter: blur(4px); /* Subtle blur for modern look */
}

/* Glitch Effect */
.glitch {
  position: relative;
  color: #FFFFFF;
  font-family: 'VCR OSD Mono', monospace;
  animation: glitch 0.5s infinite alternate;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  color: #00FF00;
}
.glitch::before {
  left: 2px;
  text-shadow: -2px 0 #FF00FF;
  animation: glitch-top 0.25s infinite alternate;
}
.glitch::after {
  left: -2px;
  text-shadow: 2px 0 #00FFFF;
  animation: glitch-bottom 0.25s infinite alternate;
}
@keyframes glitch {
  0% { transform: translate(0); }
  100% { transform: translate(-2px, 2px); }
}
@keyframes glitch-top {
  0% { clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%); }
    0% { transform: translate(0); }
  100% { transform: translate(6px, -6px); }
  100% { clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%); }
}
@keyframes glitch-bottom {
  0% { clip-path: polygon(0 66%, 100% 66%, 100% 100%, 0 100%); }
  0% { transform: translate(0); }
  100% { transform: translate(-6px, 6px); }
  100% { clip-path: polygon(0 66%, 100% 66%, 100% 100%, 0 100%); }
}

/* Navbar Glitch Hover */
.nav-link:hover {
    animation: glitch-hover 0.3s ease-in-out;
}
@keyframes glitch-hover {
    0% { transform: translate(0); }
    50% { transform: translate(-2px, 2px); }
    100% { transform: translate(0); }
}

/* Neon Glow */
.glow {
  box-shadow: 0 0 10px #00FF00, 0 0 20px #00FF00;
}
.glow:hover {
  box-shadow: 0 0 20px #00FF00, 0 0 30px #00FF00;
}

h1, h2, .nav-link, .inline-block {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
}
h1 {
  font-size: 3.5rem;
  text-shadow: 0 0 5px #00FF00;
}
h2 {
  font-size: 2.5rem;
  text-shadow: 0 0 5px #00FF00;
}
.nav-link {
  font-size: 1.25rem;
}
.inline-block {
  font-size: 1.5rem;
}
p, .text-gray-400, .text-gray-300 {
  font-family: 'Roboto', sans-serif;
}

/* Navbar Glitch Hover */
.nav-link {
  position: relative;
}
.nav-link:hover {
  animation: glitch-hover 0.2s ease-in-out;
}
@keyframes glitch-hover {
  -50% { transform: translate(0); }
  -25% { transform: translate(-4px, 2px); }
  0% { transform: translate(0); }
  50% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}

/* Portfolio Card Hover */
.portfolio-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}
.portfolio-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px #00FF00;
}

.music-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}
.music-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px #00FF00;
}