/* ==========================================================================
   PHILIPP STRAUB - BENTO GRID PORTAL DESIGN SYSTEM
   ========================================================================== */

:root {
  /* Soft Slate Dark Theme */
  --bg-dark: #0b0c10;
  --bg-card: #15161e;
  --color-border: rgba(255, 255, 255, 0.08);

  /* Curated Professional Accents (No Pink) */
  --color-neon-cyan: #00f0ff;
  --color-neon-blue: #1a66ff;
  --color-neon-mid: #00aaff;

  /* Highly Readable Typography Colors */
  --color-text-main: #e8e8f0;
  --color-text-muted: #9fa0b5;
  --color-text-highlight: #ffffff;

  --font-header: 'Syncopate', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;

  --transition-ultra: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Basics */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  background-color: var(--bg-dark);
  background-image: url('img/black_wave_pattern.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  color: var(--color-text-main);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  min-height: 100%;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('img/phil_gazometer.png');
  background-size: cover;
  background-position: center;
  opacity: 0.08;
  filter: blur(40px) saturate(130%);
  z-index: -1;
  pointer-events: none;
  animation: bgPulse 25s infinite alternate ease-in-out;
}

@keyframes bgPulse {
  0% {
    transform: scale(1.02) rotate(0deg);
  }

  100% {
    transform: scale(1.08) rotate(1deg);
  }
}

/* Custom Scrollbar */
.scrollable::-webkit-scrollbar {
  width: 4px;
}

.scrollable::-webkit-scrollbar-track {
  background: transparent;
}

.scrollable::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.scrollable::-webkit-scrollbar-thumb:hover {
  background: var(--color-neon-cyan);
}

/* Background Ambient Glows */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  filter: blur(140px);
}

.glow-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(26, 102, 255, 0.05) 0%, rgba(0, 0, 0, 0) 70%);
}

.glow-2 {
  bottom: -10%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.04) 0%, rgba(0, 0, 0, 0) 70%);
}

/* Main App Layout */
#app-container {
  position: relative;
  z-index: 10;
  max-width: 1300px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 40px;
}

/* ==========================================================================
   DESKTOP SCREEN LAYOUT TWEAKS (min-width: 769px)
   ========================================================================== */
@media (min-width: 769px) {
  .lang-switcher {
    padding: 3px 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-inline-end: 16px;
  }
  .lang-select {
    height: 18px;
    line-height: 18px;
    margin: 0;
    padding: 0 16px 0 4px;
    font-size: 9px;
    letter-spacing: 0.5px;
  }
  [dir="rtl"] .lang-select {
    padding: 0 4px 0 16px;
  }
}

/* ==========================================================================
   1. MAIN HEADER
   ========================================================================== */

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  background: rgba(11, 12, 16, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
}

.header-logo {
  padding-inline-start: 16px;
}

.brand-logo {
  height: 22px;
  width: auto;
  display: block;
}

.header-nav {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px;
  border-radius: 30px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: var(--transition-smooth);
  position: relative;
}

.header-nav:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.nav-link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--color-text-muted);
  padding: 8px 18px;
  border-radius: 20px;
  transition: var(--transition-fast);
  text-decoration: none;
  display: inline-block;
}

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

.nav-link.active {
  color: var(--color-neon-cyan);
  background: rgba(0, 240, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(0, 240, 255, 0.15);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

.menu-toggle {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lang-select {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 1px;
  cursor: pointer;
  outline: none;
  padding: 2px 18px 2px 4px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239fa0b5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 8px;
  transition: var(--transition-fast);
}

.lang-select:hover {
  color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.lang-select option {
  background: var(--bg-card);
  color: var(--color-text-main);
  border: none;
  font-size: 12px;
  padding: 6px;
}

.sys-info {
  font-family: monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sys-info .indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #27c93f;
  box-shadow: 0 0 8px #27c93f;
  animation: pulseLed 2s infinite;
}

@keyframes pulseLed {
  0% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.4;
  }
}

/* ==========================================================================
   2. BENTO DASHBOARD GRID
   ========================================================================== */

.bento-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 24px;
  padding: 40px 0;
}

/* Base Bento Card (Glassmorphism Concept) */
.bento-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%), rgba(21, 22, 30, 0.55);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

.bento-card:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%), rgba(21, 22, 30, 0.65);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.card-content {
  padding: 32px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 5;
}

.label-badge {
  font-family: monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--color-neon-cyan);
  margin-bottom: 20px;
  display: block;
}

.bento-card h2 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 2px;
  margin-bottom: 12px;
  color: var(--color-text-highlight);
  text-transform: uppercase;
}

.section-intro {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Legible Text Class to avoid harsh contrast */
.legible-text {
  color: var(--color-text-main);
  font-size: 15px;
  line-height: 1.8;
  font-weight: 400;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   3. BENTO CARD IMAGE BG & SUBTLE KEN BURNS ANIMATION
   ========================================================================== */

.card-bg-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: 12px;
}

.card-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 8s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(1.03);
  filter: brightness(0.7) contrast(100%) saturate(115%);
  will-change: transform; /* Hint browser to optimize compositing for animation performance */
}

.bento-card:hover .card-bg-image {
  transform: scale(1.08) translate(-0.3%, -0.3%);
}

/* ==========================================================================
   4. INDIVIDUAL BENTO CARDS STYLING
   ========================================================================== */

/* Card 1: Profile & Bio */
.card-profile {
  grid-column: span 2;
  grid-row: span 2;
}

.card-profile::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(11, 12, 16, 0.95) 0%, rgba(11, 12, 16, 0.8) 50%, rgba(11, 12, 16, 0.1) 100%);
  z-index: 2;
  pointer-events: none;
}

.profile-header {
  display: flex;
  gap: 32px;
  align-items: center;
  margin-bottom: 24px;
}

.portrait-container {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-title h1 {
  font-family: var(--font-header);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 4px;
  line-height: 1.1;
  margin-bottom: 8px;
  color: var(--color-text-highlight);
}

.role-subtitle {
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--color-neon-cyan);
  text-transform: uppercase;
  font-weight: 600;
}

.profile-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.profile-body p {
  margin-bottom: 24px;
}

.action-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-text-main);
  padding: 12px 24px;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 2px;
  font-size: 11px;
  cursor: pointer;
  align-self: flex-start;
  transition: var(--transition-fast);
  border-radius: 20px;
}

.action-btn:hover {
  border-color: var(--color-neon-cyan);
  background: var(--color-neon-cyan);
  color: #000;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.modal-socials-section {
  margin-top: 40px;
  border-top: 1px solid var(--color-border);
  padding-top: 30px;
}

/* Card 2: Music Hub */
.card-music {
  grid-column: span 1;
  grid-row: span 2;
}

.soundcloud-embed-container {
  margin: 18px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: rgba(0, 0, 0, 0.2);
  height: 280px;
}

.soundcloud-embed-container iframe {
  display: block;
}

.platform-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.platform-btn {
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  text-align: center;
  font-size: 9px;
  font-family: monospace;
  letter-spacing: 1px;
  padding: 10px 0;
  border-radius: 4px;
  transition: var(--transition-fast);
}

.platform-btn:hover {
  border-color: var(--color-neon-cyan);
  color: var(--color-neon-cyan);
  background: rgba(0, 240, 255, 0.02);
}

/* Card 3: Consulting */
.card-consulting {
  grid-column: span 2;
  grid-row: span 1;
}

.card-consulting::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(11, 12, 16, 0.95) 0%, rgba(11, 12, 16, 0.8) 60%, rgba(11, 12, 16, 0.1) 100%);
  z-index: 2;
  pointer-events: none;
}

.consulting-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 24px;
}

.consulting-item h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  color: var(--color-text-highlight);
  margin-bottom: 4px;
}

.consult-role {
  font-size: 10px;
  font-family: monospace;
  color: var(--color-neon-cyan);
  display: block;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

/* Card 4: Tour dates */
.card-gigs {
  grid-column: span 1;
  grid-row: span 1;
}

.gigs-table-container {
  margin-top: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.gigs-table {
  width: 100%;
  border-collapse: collapse;
}

.gigs-table th {
  text-align: left;
  font-family: monospace;
  font-size: 9px;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 12px;
  letter-spacing: 1px;
}

.gigs-table td {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.gig-date {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  color: var(--color-neon-cyan);
}

.gig-venue {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-main);
}

.gig-loc {
  font-size: 11px;
  color: var(--color-text-muted);
}

.status-pill {
  font-family: monospace;
  font-size: 8px;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 20px;
  text-align: center;
  display: inline-block;
  font-weight: bold;
}

.status-pill.active {
  background: rgba(0, 240, 255, 0.08);
  color: var(--color-neon-cyan);
  border: 1px solid rgba(0, 240, 255, 0.2);
}

/* Card 5: Downloads */
.card-downloads {
  grid-column: span 1;
  grid-row: span 1;
}

.downloads-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.download-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: left;
  width: 100%;
}

.download-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(0, 240, 255, 0.3);
}

.download-btn .icon {
  font-family: monospace;
  font-size: 18px;
  color: var(--color-neon-cyan);
  background: rgba(0, 240, 255, 0.05);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.download-btn:hover .icon {
  background: var(--color-neon-cyan);
  color: #000;
  box-shadow: 0 0 10px var(--color-neon-cyan);
}

.btn-info {
  display: flex;
  flex-direction: column;
}

.btn-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--color-text-highlight);
}

.btn-meta {
  font-size: 10px;
  color: var(--color-text-muted);
}

/* Card 6: Contact */
.card-contact {
  grid-column: span 1;
  grid-row: span 1;
}

.bento-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  flex: 1;
}

.bento-form .form-row {
  display: flex;
  gap: 12px;
}

.bento-form input,
.bento-form textarea {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: #fff;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  width: 100%;
  outline: none;
  transition: var(--transition-fast);
}

.bento-form input:focus,
.bento-form textarea:focus {
  border-color: var(--color-neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.bento-form textarea {
  height: 48px;
  resize: none;
}

.submit-row {
  display: flex;
  justify-content: flex-start;
}

.submit-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-text-main);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 2px;
  padding: 12px 24px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
  align-self: flex-start;
}

.submit-btn:hover {
  background: var(--color-neon-cyan);
  color: #000;
  border-color: transparent;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.form-success-text {
  font-family: monospace;
  font-size: 10px;
  color: #27c93f;
  text-align: center;
  margin-top: 4px;
}

.form-success-text.hidden {
  display: none;
}

/* Card 7: Socials Hub */
.card-socials {
  grid-column: span 1;
  grid-row: span 1;
}

.social-logos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: auto;
  margin-bottom: auto;
  padding: 16px 0;
  justify-items: center;
  align-items: center;
}

.social-logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--color-text-highlight);
  transition: var(--transition-fast);
}

.social-logo-item:hover {
  color: #000;
  background: var(--color-neon-cyan);
  border-color: var(--color-neon-cyan);
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.social-svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* ==========================================================================
   4A. BENTO CARD BACKGROUND IMAGE EFFECTS
   ========================================================================== */

/* Shared properties for card background pseudo-elements */
.card-music::before,
.card-gigs::before,
.card-downloads::before,
.card-contact::before,
.card-socials::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  z-index: 1;
  opacity: 0.45; /* Increased opacity to ensure the fine wave lines are clearly visible */
  transition: transform 8s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(1.03);
  pointer-events: none;
  will-change: transform; /* Optimize compositing layers for fluid Ken Burns scale effect */
}

/* Individual Background Image assignments */
.card-music::before {
  background-image: url('img/music_card_bg.png');
}
.card-gigs::before {
  background-image: url('img/gigs_card_bg.png');
}
.card-downloads::before {
  background-image: url('img/downloads_card_bg.png');
}
.card-contact::before {
  background-image: url('img/contact_card_bg.png');
}
.card-socials::before {
  background-image: url('img/socials_card_bg.png');
}

/* Hover scale animations */
.card-music:hover::before,
.card-gigs:hover::before,
.card-downloads:hover::before,
.card-contact:hover::before,
.card-socials:hover::before {
  transform: scale(1.08) translate(-0.3%, -0.3%);
}

/* Readability overlays (z-index: 2, below content but above background image) */
.card-music::after,
.card-gigs::after,
.card-downloads::after,
.card-contact::after,
.card-socials::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  pointer-events: none;
}

.card-music::after {
  background: linear-gradient(180deg, rgba(21, 22, 30, 0.65) 0%, rgba(21, 22, 30, 0.2) 100%);
}
.card-gigs::after {
  background: linear-gradient(180deg, rgba(21, 22, 30, 0.65) 0%, rgba(21, 22, 30, 0.3) 100%);
}
.card-downloads::after {
  background: linear-gradient(135deg, rgba(21, 22, 30, 0.65) 0%, rgba(21, 22, 30, 0.2) 100%);
}
.card-contact::after {
  background: linear-gradient(180deg, rgba(21, 22, 30, 0.6) 0%, rgba(21, 22, 30, 0.2) 100%);
}
.card-socials::after {
  background: radial-gradient(circle at center, rgba(21, 22, 30, 0.45) 0%, rgba(21, 22, 30, 0.15) 100%);
}

/* ==========================================================================
   5. INTERACTIVE VERCEL-STYLE MOUSE BORDER GLOW
   ========================================================================== */

/* The card overlay that draws the mouse tracking radial glow on the border */
.card-border-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  border-radius: 12px;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.5s ease;
  border: 1px solid transparent;
  background: radial-gradient(300px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
      rgba(255, 255, 255, 0.12),
      transparent 40%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
}

/* Clean Cyan-Blue glows across all dashboard cards */
.bento-card .card-border-glow {
  background: radial-gradient(250px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
      rgba(0, 240, 255, 0.25) 0%,
      rgba(26, 102, 255, 0.15) 50%,
      transparent 100%);
}

.bento-card:hover .card-border-glow {
  opacity: 1;
}

/* ==========================================================================
   6. BIOGRAPHY MODAL (DRAWER OVERLAY WITH CANVAS)
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 3, 5, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 999;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s;
  direction: ltr;
}

.modal-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('img/phil_gazometer.png');
  background-size: cover;
  background-position: center;
  opacity: 0.12;
  filter: blur(20px) saturate(120%);
  z-index: 0;
  pointer-events: none;
}

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

/* Left area background canvas animation when drawer is open */
#modal-canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(100% - 500px);
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open #modal-canvas {
  opacity: 1;
}

.modal-wrapper {
  width: 500px;
  max-width: 100%;
  height: 100%;
  background: rgba(15, 16, 21, 0.78);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid var(--color-border);
  position: relative;
  z-index: 10;
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 40px rgba(0, 0, 0, 0.6);
}

.modal-overlay.open .modal-wrapper {
  transform: translateX(0);
}

.close-modal-btn {
  position: absolute;
  top: 30px;
  right: 30px;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 32px;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 15;
}

.close-modal-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 60px 40px;
  overflow-y: auto;
  flex: 1;
}

.modal-badge {
  font-family: monospace;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--color-neon-cyan);
  display: block;
  margin-bottom: 15px;
}

.modal-body h2 {
  font-family: var(--font-header);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 30px;
  color: var(--color-text-highlight);
}

.modal-image {
  width: 100%;
  height: 240px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 30px;
  border: 1px solid var(--color-border);
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-text p {
  margin-bottom: 20px;
}

/* ==========================================================================
   7. FOOTER & RESPONSIVE DESIGN (MOBILE-FIRST ANPASSUNGEN)
   ========================================================================== */

.main-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  border-top: 1px solid var(--color-border);
  font-family: monospace;
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 40px;
}

.main-footer a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
}

.main-footer a:hover {
  color: var(--color-neon-cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

/* Tablet Layouts */
@media (max-width: 1200px) {
  #app-container {
    padding: 0 24px;
  }

  .bento-grid {
    grid-template-columns: 1fr 1fr;
  }

  .card-profile {
    grid-column: span 2;
  }

  .card-music {
    grid-column: span 1;
    grid-row: span 1;
  }

  .card-consulting {
    grid-column: span 1;
  }

  .card-gigs {
    grid-column: span 1;
    grid-row: span 1;
  }

  .card-downloads {
    grid-column: span 1;
  }

  .card-contact {
    grid-column: span 1;
  }

  .card-socials {
    grid-column: span 1;
  }

  #modal-canvas {
    width: calc(100% - 450px);
  }

  .modal-wrapper {
    width: 450px;
  }
}

/* MOBILE FIRST PREFERENCE: Mobile Layouts (< 768px) */
@media (max-width: 768px) {
  #app-container {
    padding: 0 16px;
  }

  .main-header {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 70px !important;
    padding: 0 16px !important;
    position: sticky;
    top: 0;
    background: rgba(11, 12, 16, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
  }

  .header-logo {
    text-align: left !important;
    padding-inline-start: 8px;
  }

  .brand-logo {
    height: 16px !important;
    margin: 0 !important;
  }

  .header-actions {
    gap: 16px !important;
  }

  /* Hamburger Menu Toggle Button */
  .menu-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 101;
    padding: 0;
    outline: none;
  }

  .hamburger-bar {
    width: 100%;
    height: 2px;
    background-color: var(--color-text-main);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .menu-toggle.open .hamburger-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .menu-toggle.open .hamburger-bar:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.open .hamburger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Mobile Dropdown Menu Drawer Overlay */
  .header-nav {
    position: fixed !important;
    top: 70px !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: calc(100vh - 70px) !important;
    background: rgba(11, 12, 16, 0.98) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 24px !important;
    padding: 40px 0 !important;
    border: none !important;
    border-top: 1px solid var(--color-border) !important;
    transform: translateY(-100%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s, visibility 0.5s !important;
    z-index: 99 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    overflow-x: hidden !important;
  }

  .header-nav.open {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .nav-link {
    font-size: 18px !important;
    letter-spacing: 3px !important;
    padding: 12px 24px !important;
    width: auto !important;
    text-align: center !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    white-space: normal !important;
    transition: var(--transition-fast) !important;
  }

  .nav-link.active {
    color: var(--color-neon-cyan) !important;
    background: transparent !important;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.4) !important;
    box-shadow: none !important;
  }

  .sys-info {
    display: none;
    /* Hide systems timestamp in header on mobile to avoid clutter */
  }

  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 16px;
    padding: 24px 0;
  }

  .bento-card {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }

  .card-profile::after,
  .card-consulting::after {
    background: linear-gradient(180deg, rgba(11, 12, 16, 0.95) 0%, rgba(11, 12, 16, 0.8) 60%, rgba(11, 12, 16, 0.2) 100%) !important;
  }

  .card-content {
    padding: 20px;
    /* Smaller padding on mobile to save space */
  }

  .bento-card h2 {
    font-size: 18px;
    margin-bottom: 10px;
  }

  /* Profile card mobile adjustments */
  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    margin-bottom: 20px;
  }

  .portrait-container {
    width: 100px;
    height: 100px;
  }

  .profile-title h1 {
    font-size: 26px;
    letter-spacing: 2.5px;
  }

  .role-subtitle {
    font-size: 11px;
  }

  .profile-body p {
    font-size: 13.5px;
    margin-bottom: 16px;
    text-align: center;
  }

  .action-btn {
    align-self: center;
  }

  /* SoundCloud Player Mobile Height */
  .soundcloud-embed-container {
    height: 220px;
  }

  .soundcloud-embed-container iframe {
    height: 220px;
  }

  /* Consulting grid mobile stacking */
  .consulting-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 18px;
  }

  /* Gigs Table Mobile scroll */
  .gigs-table-container {
    overflow-x: auto;
    margin-top: 16px;
  }

  .gigs-table td,
  .gigs-table th {
    padding: 12px 6px;
  }

  /* B2B form styling mobile */
  .bento-form .form-row {
    flex-direction: column;
    gap: 10px;
  }

  /* MOBILE DRAWER: Slides up from bottom instead of right side */
  .modal-wrapper {
    width: 100%;
    height: 85%;
    bottom: 0;
    top: auto;
    right: auto;
    left: 0;
    transform: translateY(100%);
    border-left: none;
    border-top: 1px solid var(--color-border);
    border-radius: 20px 20px 0 0;
  }

  .modal-overlay.open .modal-wrapper {
    transform: translateY(0);
  }

  .modal-body {
    padding: 40px 20px;
  }

  .modal-body h2 {
    font-size: 26px;
    margin-bottom: 20px;
  }

  .modal-image {
    height: 180px;
    margin-bottom: 20px;
  }

  .close-modal-btn {
    top: 20px;
    right: 20px;
    font-size: 28px;
  }

  /* Top 15% empty screen area on mobile modal displays canvas waves */
  #modal-canvas {
    width: 100%;
    height: 15%;
    left: 0;
    top: 0;
  }

  /* Footer mobile */
  .main-footer {
    flex-direction: column;
    height: auto;
    padding: 24px 0;
    gap: 12px;
    text-align: center;
  }

  /* Responsive link grids on mobile */
  .platform-links {
    gap: 8px;
  }

  .social-logos-grid {
    gap: 14px !important;
    padding: 10px 0 !important;
  }

  .social-logo-item {
    width: 50px !important;
    height: 50px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
  }

  .social-svg {
    width: 22px !important;
    height: 22px !important;
  }
}

/* ==========================================================================
   8. RIGHT-TO-LEFT (RTL) LAYOUT OVERRIDES
   ========================================================================== */

[dir="rtl"] .lang-select {
  padding: 2px 4px 2px 18px;
  background-position: left 4px center;
}

[dir="rtl"] .gigs-table th {
  text-align: right;
}

[dir="rtl"] .download-btn {
  text-align: right;
  flex-direction: row-reverse;
}

[dir="rtl"] .download-btn .btn-info {
  align-items: flex-start;
}

[dir="rtl"] .close-modal-btn {
  right: auto;
  left: 30px;
}

[dir="rtl"] .modal-body {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .bento-form input,
[dir="rtl"] .bento-form textarea {
  text-align: right;
}

[dir="rtl"] .card-profile::after {
  background: linear-gradient(-90deg, rgba(11, 12, 16, 0.95) 0%, rgba(11, 12, 16, 0.8) 50%, rgba(11, 12, 16, 0.1) 100%) !important;
}

[dir="rtl"] .card-consulting::after {
  background: linear-gradient(-90deg, rgba(11, 12, 16, 0.95) 0%, rgba(11, 12, 16, 0.8) 60%, rgba(11, 12, 16, 0.1) 100%) !important;
}

[dir="rtl"] .card-downloads::after {
  background: linear-gradient(225deg, rgba(21, 22, 30, 0.65) 0%, rgba(21, 22, 30, 0.2) 100%) !important;
}

/* Mobile RTL Adjustments */
@media (max-width: 768px) {
  [dir="rtl"] .header-logo {
    text-align: right !important;
  }

  [dir="rtl"] .close-modal-btn {
    right: auto;
    left: 20px;
  }
}