/* === Reset === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === Custom Properties === */
:root {
  --bg: #0a0a0a;
  --text: #e0e0e0;
  --text-secondary: #666666;
  --accent: #ffffff;
  --font: 'Inter', sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 11px;
  --fs-base: 11px;
  --fs-lg: 1.5rem;
  --fs-xl: 2.5rem;
  --fs-2xl: 4rem;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  --max-width: 1200px;
}

/* === Fonts === */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../assets/fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../assets/fonts/JetBrainsMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* === Base === */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.15em;
  word-spacing: 0.5em;
  color: var(--text);
  background-color: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  text-transform: uppercase;
}

main {
  flex: 1;
  width: 100%;
  padding: var(--space-lg) var(--space-md);
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.1;
}

h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 0.5px solid transparent;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

a:hover {
  color: #ffffff;
  opacity: 1;
  border-bottom-color: currentColor;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* === Film Grain === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 180px;
  opacity: 0.08;
}

/* === Hero Header / Navigation === */
#nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(to right, var(--bg) 55%, transparent 75%);
}

.hero-header {
  padding: var(--space-sm) var(--space-md);
  position: relative;
}

/* === Hero Video === */
.hero-video-wrap {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: -1;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
}


.hero-name {
  display: block;
  position: relative;
  font-family: 'Inter', sans-serif;
  font-size: clamp(60px, 19.5vw, 220px);
  font-weight: 900;
  line-height: 0.85;
  overflow: hidden;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: transparent;
  background:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E") repeat 0 0 / 180px,
    #1a1a1a;
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-name:hover {
  background: #ffffff;
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 1;
}

.hero-nav {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  padding-left: 3vw;
}

.hero-nav a,
.nav-overlay-links a {
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.nav-dot {
  color: var(--text-secondary);
  opacity: 0.4;
  font-size: var(--fs-xs);
}

.hero-nav a:hover,
.nav-overlay-links a:hover {
  color: #ffffff;
  opacity: 1;
}

.hero-nav a.active,
.nav-overlay-links a.active {
  color: var(--accent);
}

/* === Hamburger Toggle === */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* === Mobile Overlay === */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.open {
  opacity: 1;
  visibility: visible;
}

.nav-overlay-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.nav-overlay-links a {
  font-size: var(--fs-lg);
}

/* === Footer === */
.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-md);
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--fs-xs);
}

/* === Home === */
.home {
  min-height: 0;
}


/* === Card Grid === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.card {
  padding: var(--space-md);
  border-bottom: 1px solid #1a1a1a;
}

.card h3 {
  font-size: var(--fs-base);
  margin-bottom: var(--space-xs);
}

.card p {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-sm);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.tags span {
  font-size: var(--fs-xs);
  color: var(--accent);
  opacity: 0.7;
}

/* === Page Intro === */
.page-intro {
  color: var(--text-secondary);
  margin-top: var(--space-sm);
  max-width: 600px;
}

/* === Gallery === */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.gallery-item {
  overflow: hidden;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.gallery-item:hover {
  opacity: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1;
}

/* === Lightbox === */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--text);
  font-size: var(--fs-xl);
  cursor: pointer;
  padding: var(--space-sm);
  opacity: 0.5;
  transition: opacity 0.2s;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-close { top: var(--space-sm); right: var(--space-sm); }
.lightbox-prev { left: var(--space-sm); }
.lightbox-next { right: var(--space-sm); }

/* === Music === */
.music-list {
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.music-item h3 {
  font-size: var(--fs-base);
  margin-bottom: var(--space-xs);
}

.music-item p {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-sm);
}

.music-item iframe {
  width: 400px;
  max-width: 100%;
  border: none;
}

.embed-placeholder {
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  padding: var(--space-md);
  border: 1px dashed #333;
  text-align: center;
}

/* === Spotify Input === */
.spotify-input-wrap {
  margin-bottom: var(--space-md);
}

.spotify-url-input {
  width: 100%;
  max-width: 400px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: #ccc;
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 20px 16px;
  outline: none;
  transition: border-color 0.2s;
  text-transform: none;
}

.spotify-url-input:focus {
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}

.spotify-url-input::placeholder {
  color: #555;
  text-transform: uppercase;
}

#user-playlist {
  margin-bottom: var(--space-md);
  max-width: 400px;
}

#user-playlist iframe {
  border: none;
}

/* === Music Light Effects === */
.music-circle {
  position: fixed;
  top: calc(50% + 70px);
  left: 50%;
  transform: translate(-50%, -50%);
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: none;
  background: none;
  pointer-events: none;
  z-index: 3;
}

#gl-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2;
  pointer-events: none;
}

#fluid-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#arc-controls {
  position: fixed;
  top: calc(50% + 70px);
  left: 50%;
  transform: translate(-50%, -50%);
  width: 440px;
  height: 440px;
  z-index: 10;
  pointer-events: auto;
  cursor: pointer;
}

.arc-center-buttons {
  position: fixed;
  top: calc(50% + 70px);
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  z-index: 11;
}

.gl-auto-btn,
.gl-off-btn,
.gl-mic-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  color: #999;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  padding: 10px 24px;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.gl-auto-btn:hover,
.gl-off-btn:hover,
.gl-mic-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.3);
}

.gl-auto-btn:active,
.gl-off-btn:active,
.gl-mic-btn:active {
  transform: scale(0.95);
}

.gl-auto-btn.active {
  color: #fff;
  background: rgba(232, 160, 32, 0.15);
  border-color: rgba(232, 160, 32, 0.5);
  box-shadow: 0 0 20px rgba(232, 160, 32, 0.15);
}

.gl-mic-btn.active {
  color: #fff;
  background: rgba(220, 50, 50, 0.15);
  border-color: rgba(220, 50, 50, 0.5);
  box-shadow: 0 0 20px rgba(220, 50, 50, 0.15);
}


#bass-beams {
  display: none;
  pointer-events: none;
}

/* === Room Flash Images === */
.room-flash-img {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.08s ease-in;
  display: flex;
  align-items: center;
  justify-content: center;
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(circle 220px at 50% 50%, transparent 100%, black 100%);
  mask-image: radial-gradient(circle 220px at 50% 50%, transparent 100%, black 100%);
}

.room-flash-img img {
  filter: grayscale(1) contrast(4) brightness(1.5);
  opacity: 0.5;
}


.room-flash-img.flash {
  opacity: 1;
  transition: opacity 0.05s ease-in;
}


/* === Text Pages === */
.text-page .text-content {
  max-width: 600px;
  margin-top: var(--space-md);
}

.text-page .text-content p {
  margin-bottom: var(--space-sm);
  line-height: 1.8;
}

.contact-links {
  list-style: none;
  margin-top: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* === Responsive === */
@media (max-width: 768px) {
  h1 { font-size: var(--fs-xl); }
  h2 { font-size: var(--fs-lg); }
  main { padding: var(--space-md) var(--space-sm); }
  .hero-nav { gap: var(--space-md); flex-wrap: wrap; }
  .hero-nav { display: none; }
  .nav-toggle { display: flex; }
}
