/* Self-hosted fonts (Rule 11: no external Google Fonts CDN in production) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/inter-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/assets/fonts/inter-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/inter-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/outfit-400.ttf') format('truetype');
}
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/outfit-700.ttf') format('truetype');
}
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('/assets/fonts/outfit-800.ttf') format('truetype');
}

:root {
  /* Premium Purple Theme */
  --clr-bg-dark: #0f0518;
  --clr-bg-card: rgba(30, 15, 45, 0.4);
  --clr-primary: #8a2be2;
  --clr-primary-glow: rgba(138, 43, 226, 0.5);
  --clr-secondary: #c084fc;
  --clr-accent: #e9d5ff;
  --clr-text: #f8fafc;
  --clr-text-muted: #cbd5e1;
  --clr-white: #ffffff;
  
  /* Gradients */
  --grad-primary: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
  --grad-text: linear-gradient(to right, var(--clr-accent), var(--clr-white));
  --grad-bg: radial-gradient(circle at top center, #2e0854, var(--clr-bg-dark) 70%);

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Effects */
  --glass-border: 1px solid rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(20, 10, 30, 0.6);
  --shadow-glow: 0 0 20px var(--clr-primary-glow);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  background: var(--clr-bg-dark);
  background-image: var(--grad-bg);
  background-attachment: fixed;
  color: var(--clr-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Global Background Pattern Layer */
.bg-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('assets/bg.png');
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  z-index: -1;
  pointer-events: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

a {
  color: var(--clr-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--clr-accent);
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 1, 24, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 110px;
}

.mobile-menu-btn {
  display: none;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo img {
  max-height: 90px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--clr-text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

.nav-links a:hover {
  color: var(--clr-white);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--clr-secondary);
  transition: var(--transition-smooth);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--grad-primary);
  color: var(--clr-white);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(192, 132, 252, 0.6);
  color: var(--clr-white);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--clr-white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  color: var(--clr-white);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px; /* offset for navbar */
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text {
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(192, 132, 252, 0.1);
  border: 1px solid rgba(192, 132, 252, 0.3);
  border-radius: var(--radius-full);
  color: var(--clr-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(3rem, 5vw, 4.5rem);
  margin-bottom: 1.5rem;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--clr-text-muted);
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
}

.hero-visual {
  position: relative;
  z-index: 1;
}

.hero-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-glow);
  width: 100%;
  max-width: 864px;
  aspect-ratio: 864 / 1184;
  margin: 0 auto;
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Floating Elements */
.float-element {
  position: absolute;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

/* Sections General */
section {
  padding: 6rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--clr-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Feature Cards (Roles/About) */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.role-card {
  padding: 2rem;
  transition: var(--transition-smooth);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.role-card:hover {
  transform: translateY(-10px);
  background: rgba(40, 20, 60, 0.6);
  border-color: rgba(192, 132, 252, 0.4);
}

.role-icon {
  width: 50px;
  height: 50px;
  background: var(--grad-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: white;
}

.role-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.role-card p {
  color: var(--clr-text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

/* Media Showcase */
.media-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.media-content {
  order: 1;
}

.media-visual {
  order: 2;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: var(--glass-border);
}

.media-visual img {
  width: 100%;
  height: auto;
  display: block;
}

/* Social Connections */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  gap: 1rem;
  transition: var(--transition-smooth);
}

.social-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--clr-secondary);
}

.social-card svg {
  width: 40px;
  height: 40px;
  fill: var(--clr-secondary);
  transition: var(--transition-fast);
}

.social-card:hover svg {
  fill: var(--clr-white);
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.5));
}

.social-card span {
  font-weight: 600;
  color: var(--clr-text);
}

/* Footer */
footer {
  padding: 4rem 0 2rem;
  border-top: var(--glass-border);
  background: rgba(10, 3, 15, 0.8);
  margin-top: 4rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
}

.footer-logo img {
  max-height: 130px;
  width: auto;
  object-fit: contain;
}

.footer-copy {
  color: var(--clr-text-muted);
  font-size: 0.9rem;
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
  .hero-content, .media-showcase {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .media-content {
    order: 2;
  }
  
  .media-visual {
    order: 1;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    color: var(--clr-white);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(10, 1, 24, 0.98);
    backdrop-filter: blur(15px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: translateY(-150%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  section {
    padding: 4rem 0;
  }
}

/* Virtual Keyboard Styles */
#keyboard-container {
  position: relative;
  height: 260px;
  background: linear-gradient(180deg, #1a0533, #0d0118);
  border: 2px solid rgba(139, 92, 246, 0.2);
  border-radius: 1rem;
  padding: 1rem 1rem 2rem 1rem;
  box-shadow: var(--shadow-glow);
  margin-top: 2rem;
}

.piano-key {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  border-radius: 0 0 8px 8px;
  cursor: pointer;
  user-select: none;
  transition: all 0.05s ease;
}

.white-key {
  flex: 1;
  background: linear-gradient(180deg, #fff, #f3f4f6);
  border: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  z-index: 1;
  padding-bottom: 0.5rem;
}

.white-key:hover {
  background: linear-gradient(180deg, #f5f3ff, #ede9fe);
}

.white-key.active {
  background: linear-gradient(180deg, rgba(212,175,55,0.3), rgba(212,175,55,0.6));
  border-color: rgba(212,175,55,0.5);
  box-shadow: inset 0 2px 10px rgba(212,175,55,0.4);
  transform: scale(0.98);
}

.black-key {
  position: absolute;
  top: 0;
  height: 60%;
  background: linear-gradient(180deg, #1a0533, #0d0118);
  border: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 6px 10px rgba(0,0,0,0.4);
  z-index: 2;
  padding-bottom: 0.5rem;
}

.black-key:hover {
  background: linear-gradient(180deg, #3b0764, #2e054e);
}

.black-key.active {
  background: linear-gradient(180deg, #d4af37, #b8960f);
  box-shadow: 0 4px 15px rgba(212,175,55,0.5);
  transform: scale(0.97);
}

.note-label {
  font-size: 10px;
  font-weight: 600;
  color: #6b7280;
}

.white-key.active .note-label {
  color: var(--clr-primary);
}

.key-bind {
  font-size: 9px;
  font-family: monospace;
  background: #e5e7eb;
  color: #4b5563;
  padding: 2px 4px;
  border-radius: 4px;
  margin-top: 4px;
}

.white-key.active .key-bind {
  background: var(--clr-primary);
  color: var(--clr-secondary);
}

.key-bind-black {
  font-size: 8px;
  font-family: monospace;
  background: rgba(107, 33, 168, 0.6);
  color: #c084fc;
  padding: 2px 4px;
  border-radius: 4px;
}

.black-key.active .key-bind-black {
  background: var(--clr-primary);
  color: var(--clr-secondary);
}

.keyboard-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  background: rgba(45, 10, 78, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(139, 92, 246, 0.2);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-glow);
}

.control-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.control-label {
  font-size: 10px;
  font-weight: 700;
  color: #c084fc;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.control-select {
  background: #1a0533;
  color: #fff;
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  outline: none;
}

.control-select:focus {
  border-color: var(--clr-secondary);
}

.sustain-btn {
  background: rgba(107, 33, 168, 0.6);
  color: #d8b4fe;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sustain-btn.sustain-on {
  background: var(--clr-secondary);
  color: #1a0533;
  box-shadow: 0 0 15px rgba(212,175,55,0.4);
}
