@font-face {
  font-family: 'Eleganto';
  src: url('fonts/ElegantoSans-Thin.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Root variables for easy theming */
:root {
  --bg-color: #0a0c0f;
  --accent-color: #54c6f9;
  --text-color: #f7f7f7;
  --subtext-color: #eaeaea;
  --btn-bg: rgba(255, 255, 255, 0.1);
  --btn-bg-hover: rgba(255, 255, 255, 0.2);
}

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

html, body {
  height: 100%;
}

body {
  font-family: 'Eleganto', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  position: relative;
}

/* Ambient rotating gradient overlay */
body::before {
  content: "";
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(84, 198, 249, 0.15), rgba(84, 198, 249, 0) 70%);
  animation: rotate 60s linear infinite;
  z-index: -1;
}

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

body.loaded {
  opacity: 1;
}

/* Navigation bar styles */
nav {
  position: fixed;
  top: 20px;
  left: 20px;
  display: flex;
  gap: 24px;
  z-index: 50;
  font-size: 1rem;
}

nav a {
  text-decoration: none;
  color: var(--text-color);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s ease;
}

nav a:hover,
nav a:focus {
  color: var(--accent-color);
}

nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

nav a:hover::after,
nav a:focus::after {
  transform: scaleX(1);
}

/* Hero section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
  /* Keep scrambling characters contained within the hero */
  overflow: hidden;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 3vw, 2.0rem);
  color: var(--subtext-color);
  margin-bottom: 2rem;
  max-width: 600px;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  background: var(--btn-bg);
  color: var(--text-color);
  border: 1px solid var(--accent-color);
  backdrop-filter: blur(4px);
  transition: background 0.3s ease, color 0.3s ease;
  text-decoration: none;
  font-size: 1rem;
}

.btn:hover,
.btn:focus {
  background: var(--btn-bg-hover);
  color: var(--accent-color);
}

/* Preview section on home page */
.preview {
  padding: 4rem 1.5rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.preview h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.preview p {
  font-size: 1.5rem;
  color: var(--subtext-color);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.text-link {
  color: var(--accent-color);
  text-decoration: none;
  position: relative;
  font-size: 1.8rem;
  font-weight:bold;
}

.text-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--accent-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.text-link:hover::after,
.text-link:focus::after {
  transform: scaleX(1);
}

/* Works page styles */
.works-header {
  padding-top: 8rem;
  padding-bottom: 2rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.works-header h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.works-description {
  color: var(--subtext-color);
  font-size: 1.8rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

.tracks {
  max-width: 800px;
  margin: 2rem auto 4rem auto;
  padding: 0 1.5rem;
}

.track {
  margin-bottom: 2.5rem;
}

.track-title {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

audio {
  width: 100%;
  outline: none;
}

/* About page styles */
.about {
  padding: 8rem 1.5rem 4rem 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.about h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.about p {
  font-size: 1.4rem;
  line-height: 1.7;
  color: var(--subtext-color);
  margin-bottom: 1.5rem;
}

.about a {
  color: var(--accent-color);
  text-decoration: none;
}

.about a:hover,
.about a:focus {
  text-decoration: underline;
}

/* Footer styles */
footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
  color: var(--subtext-color);
}

/* Scramble effect styling: characters in transition */
.dud {
  opacity: 0.5;
  color: var(--accent-color);
}

/* === Parallax Background Layer === */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  filter: saturate(1.05) contrast(1.05);
  opacity: 1;
}
.bg-scene::before {
  content: "";
  position: absolute;
  inset: -4vh -4vw; /* bleed for subtle motion */
  background: var(--bg-image, radial-gradient(60% 60% at 50% 40%, #0c1b22 0%, #0a1216 60%, #080e12 100%)) no-repeat center/cover;
  transform: translate3d(var(--bg-x, 0px), var(--bg-y, 0px), 0) scale(1.03);
  transition: background-image 600ms ease;
  will-change: transform;
  filter: brightness(0.9);
}
.bg-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .15;
  background-image: radial-gradient(transparent 0, rgba(0,0,0,.35) 100%);
  mix-blend-mode: overlay;
}
