@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark: #050508;
  --bg-card: rgba(15, 22, 42, 0.4);
  --border-light: rgba(255, 255, 255, 0.05);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  
  --accent-blue: #38bdf8;
  --accent-cyan: #00f0ff;
  --accent-pink: #ff007f;
  --accent-purple: #a855f7;
  
  --glass-blur: blur(20px) saturate(180%);
  --shadow-premium: 0 15px 40px -10px rgba(0, 0, 0, 0.7);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Ambient Background Glows */
.bg-glow {
  position: fixed;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}

.glow-1 {
  top: -10%;
  left: -10%;
  background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
  animation: floatGlow 18s infinite alternate ease-in-out;
}

.glow-2 {
  bottom: -10%;
  right: -10%;
  background: radial-gradient(circle, var(--accent-pink) 0%, transparent 70%);
  animation: floatGlow 22s infinite alternate-reverse ease-in-out;
}

@keyframes floatGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(10%, 8%) scale(1.15); }
}

.overlay-vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.85);
}

/* Header Navbar */
header {
  position: sticky;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 5%;
  background: rgba(5, 5, 8, 0.45);
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  z-index: 100;
}

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

.logo-box {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(255, 0, 127, 0.3);
}

.logo-text {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.accent-text {
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.25s ease;
  letter-spacing: 0.5px;
}

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

.nav-github {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.nav-github:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: var(--accent-cyan);
}

/* Sections General */
main {
  position: relative;
  z-index: 2;
  max-width: 1300px;
  margin: 0 auto;
  padding: 40px 24px 80px 24px;
}

.section-header {
  margin-bottom: 28px;
}

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Hero Carousel Section */
.hero-section {
  margin-bottom: 80px;
}

.carousel-container {
  position: relative;
  width: 100%;
  min-height: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-premium);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  overflow: hidden;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 430px;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98) translateY(5px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
  z-index: 10;
}

/* Left side preview */
.slide-preview {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 380px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.8);
}

.iframe-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-secondary);
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.carousel-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Right side content card */
.slide-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 12px;
}

.card-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  margin-bottom: 16px;
  color: var(--accent-cyan);
  transition: color 0.3s;
}

.carousel-slide[data-theme="ecg"] .card-tag { color: var(--accent-pink); }
.carousel-slide[data-theme="silk"] .card-tag { color: var(--accent-purple); }
.carousel-slide[data-theme="caustics"] .card-tag { color: var(--accent-blue); }

.slide-card h3 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 16px;
}

.slide-card p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.55;
  margin-bottom: 32px;
}

.slide-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-primary {
  align-self: flex-start;
  padding: 12px 28px;
  background: var(--text-primary);
  color: #000;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.92rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(255,255,255,0.15);
  transition: all 0.25s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255,255,255,0.25);
}

.interaction-hint {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.5px;
}

/* Carousel Control Arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.carousel-arrow:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-color: var(--accent-cyan);
}

.carousel-arrow.prev { left: 40px; }
.carousel-arrow.next { right: 40px; }

/* Carousel Indicators */
.carousel-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 20;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--text-primary);
}

/* Gallery Section */
.gallery-section {
  margin-top: 20px;
}

/* Search Input Bar */
.search-container {
  position: relative;
  max-width: 500px;
  margin: 0 auto 24px auto;
  z-index: 5;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
  transition: color 0.2s ease;
}

#search-input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

#search-input:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

#search-input:focus {
  border-color: #38bdf8;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
}

#search-input:focus ~ .search-icon {
  color: #38bdf8;
}

/* Category Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.filter-btn.active {
  background: var(--text-primary);
  color: #000;
  border-color: #fff;
  box-shadow: 0 4px 15px rgba(255,255,255,0.1);
}

/* Cards Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
}

/* Card item */
.grid-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  color: inherit;
}

.grid-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color, var(--accent-cyan));
  box-shadow: 0 12px 35px -5px rgba(var(--accent-rgb, 0, 240, 255), 0.18);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.tag-pill {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-color, var(--accent-cyan));
}

.grid-card h4 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin-bottom: 8px;
  color: #fff;
}

.grid-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.48;
  margin-bottom: 24px;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-color, var(--accent-cyan));
}

.card-footer svg {
  transition: transform 0.25s ease;
}

.grid-card:hover .card-footer svg {
  transform: translateX(4px);
}

/* Footer styling */
footer {
  text-align: center;
  padding: 60px 24px 40px 24px;
  border-top: 1px solid var(--border-light);
  margin-top: 80px;
}

footer p {
  color: rgba(255,255,255,0.25);
  font-size: 0.82rem;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .carousel-slide {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .slide-preview {
    min-height: 300px;
    height: 300px;
  }
  
  .slide-card {
    padding-bottom: 20px;
  }
  
  .slide-card h3 {
    font-size: 1.8rem;
  }
}

@media (max-width: 768px) {
  header {
    padding: 16px 20px;
  }
  
  nav {
    gap: 16px;
  }
  
  .carousel-arrow {
    display: none; /* Hide arrows on mobile, swipe or dot click instead */
  }
  
  .section-header h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  nav a {
    display: none; /* simple logo only on very small screens */
  }
  
  nav .nav-github {
    display: flex;
  }
  
  .carousel-container {
    padding: 16px;
  }
  
  .slide-preview {
    height: 220px;
    min-height: 220px;
  }
  
  .slide-card h3 {
    font-size: 1.5rem;
  }
  
  .slide-card p {
    margin-bottom: 20px;
  }
  
  .filter-bar {
    gap: 6px;
  }
  
  .filter-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}
