/* ============================================
   SNFX â€” Joris Haverkort
   Futuristic 3D Digital Experience
   ============================================ */

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

:root {
  --bg: #050508;
  --bg2: #0a0a12;
  --text: #e8e6e3;
  --accent: #6c63ff;
  --accent2: #00d4aa;
  --accent3: #ff6b9d;
  --muted: #555;
  --card-bg: rgba(15, 15, 25, 0.8);
  --border: rgba(108, 99, 255, 0.15);
  --font: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --glow: 0 0 40px rgba(108, 99, 255, 0.3);
}

html {
  font-size: 16px;
}

/* ---- LIGHT MODE ---- */
[data-theme="light"] {
  --bg: #f0f0f5;
  --bg2: #e4e4ec;
  --text: #1a1a2e;
  --muted: #777;
  --card-bg: rgba(255, 255, 255, 0.85);
  --border: rgba(108, 99, 255, 0.2);
  --glow: 0 0 40px rgba(108, 99, 255, 0.15);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; cursor: none; }
button { cursor: none; }

/* ---- LOADER ---- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, backdrop-filter 0.8s ease;
}

#loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.loader-fox {
  font-size: 48px;
  animation: foxPulse 1.5s ease-in-out infinite;
}

@keyframes foxPulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.1); filter: brightness(1.3); }
}

.loader-bar {
  width: 280px;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

[data-theme="light"] .loader-bar {
  background: rgba(0,0,0,0.08);
}

.loader-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 3px;
  transition: width 0.3s ease-out;
}

.loader-text {
  font-size: 10px;
  letter-spacing: 8px;
  color: var(--muted);
  font-family: var(--font);
  transition: opacity 0.2s ease;
}

/* ---- CANVAS ---- */
#webgl {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ---- CURSOR ---- */
#cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  pointer-events: none;
  mix-blend-mode: difference;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.cursor-ring {
  width: 44px;
  height: 44px;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  position: absolute;
  top: -19px;
  left: -19px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
}

[data-theme="light"] .cursor-ring {
  border-color: rgba(0,0,0,0.3);
}

body.cursor-hover .cursor-ring {
  transform: scale(2);
  opacity: 0.3;
}

/* ---- NAV ---- */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 48px;
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(5, 5, 15, 0.7) 0%, rgba(5, 5, 12, 0.3) 100%);
  border-bottom: 1px solid rgba(108, 99, 255, 0.08);
}

[data-theme="light"] #nav {
  background: linear-gradient(180deg, rgba(240, 240, 245, 0.85) 0%, rgba(240, 240, 245, 0.5) 100%);
  border-bottom-color: rgba(108, 99, 255, 0.12);
}

#nav::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(108, 99, 255, 0.3) 20%,
    rgba(0, 212, 170, 0.4) 50%,
    rgba(108, 99, 255, 0.3) 80%,
    transparent 100%
  );
}

.nav-glow {
  position: absolute;
  bottom: -40px;
  left: 0;
  width: 100%;
  height: 60px;
  background: radial-gradient(ellipse 60% 100% at 50% 0%,
    rgba(108, 99, 255, 0.08) 0%,
    rgba(0, 212, 170, 0.04) 40%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 99;
}

#nav-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 120px;
  z-index: 99;
  pointer-events: none;
}

.nav-logo {
  font-family: var(--font);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  border: 1px solid rgba(108, 99, 255, 0.35);
  border-radius: 14px;
  padding: 10px 20px 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.5),
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 -2px 0 rgba(0, 0, 0, 0.3) inset,
    0 0 24px rgba(108, 99, 255, 0.2);
  background-color: rgba(108, 99, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

/* Raised bevel highlight */
.nav-logo::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.02) 40%,
    transparent 60%,
    rgba(0, 0, 0, 0.1) 100%
  );
  pointer-events: none;
}

.nav-logo:hover {
  border-color: rgba(108, 99, 255, 0.6);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.6),
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 -2px 0 rgba(0, 0, 0, 0.4) inset,
    0 0 36px rgba(108, 99, 255, 0.35);
  transform: translateY(-1px);
}

.nav-logo:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 -1px 0 rgba(0, 0, 0, 0.2) inset,
    0 0 12px rgba(108, 99, 255, 0.1);
}

[data-theme="light"] .nav-logo {
  border-color: rgba(108, 99, 255, 0.25);
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 -2px 0 rgba(0, 0, 0, 0.06) inset,
    0 0 20px rgba(108, 99, 255, 0.1);
}

.nav-logo-fox {
  font-size: 18px;
  -webkit-text-fill-color: initial;
  animation: foxPulseNav 3s ease-in-out infinite;
}

.nav-logo-fox.hidden {
  display: none;
}

@keyframes foxPulseNav {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ---- User Dropdown ---- */
.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 20px;
  min-width: 220px;
  background: rgba(20, 20, 35, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(108, 99, 255, 0.25);
  border-radius: 14px;
  padding: 16px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(108, 99, 255, 0.15);
  z-index: 1001;
  animation: dropdownSlideIn 0.2s ease;
}

.nav-user-dropdown.hidden {
  display: none;
}

@keyframes dropdownSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-user-dropdown-status {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: 0.5px;
}

.nav-user-dropdown-status strong {
  color: var(--accent2);
}

.nav-user-dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font);
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-user-dropdown-item:hover {
  background: rgba(108, 99, 255, 0.15);
  color: #fff;
}

.nav-user-dropdown-logout {
  color: #ff6b6b;
  margin-top: 4px;
}

.nav-user-dropdown-logout:hover {
  background: rgba(255, 107, 107, 0.12);
  color: #ff6b6b;
}

[data-theme="light"] .nav-user-dropdown {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(108, 99, 255, 0.15);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 0 20px rgba(108, 99, 255, 0.08);
}

[data-theme="light"] .nav-user-dropdown-status {
  color: rgba(0, 0, 0, 0.45);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .nav-user-dropdown-item {
  color: rgba(0, 0, 0, 0.75);
}

[data-theme="light"] .nav-user-dropdown-item:hover {
  background: rgba(108, 99, 255, 0.1);
  color: #000;
}

.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
  margin-left: 48px;
}

.nav-links a {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.5;
  transition: opacity 0.4s, text-shadow 0.4s;
  font-family: var(--font);
  position: relative;
}

.nav-links a:hover {
  opacity: 1;
  text-shadow: 0 0 20px rgba(108, 99, 255, 0.5), 0 0 40px rgba(108, 99, 255, 0.2);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.3s ease, left 0.3s ease;
  box-shadow: 0 0 8px rgba(108, 99, 255, 0.4);
}

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

.nav-admin {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  opacity: 0.8 !important;
  transition: all 0.3s ease !important;
}

.nav-admin:hover {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.1);
}

.nav-admin.hidden, .mobile-admin.hidden { display: none; }

/* ---- MUSIC TOGGLE ---- */
/* ---- NAV CONTROLS (jellyfish toggle etc.) ---- */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 8px;
}

.jelly-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.3s ease;
  padding: 0;
}

.jelly-toggle.active {
  color: var(--accent2);
  border-color: rgba(0, 212, 170, 0.3);
}

.jelly-toggle:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(108, 99, 255, 0.08);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.3s ease;
  padding: 0;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(108, 99, 255, 0.08);
}

.bubble-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.3s ease;
  padding: 0;
}

.bubble-toggle.active {
  color: var(--accent);
  border-color: rgba(108, 99, 255, 0.3);
}

.bubble-toggle:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(108, 99, 255, 0.08);
}

.music-wrapper {
  position: relative;
  margin-left: 12px;
}

.music-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 6px 12px;
  color: var(--text);
  font-size: 0;
  transition: all 0.3s ease;
}

[data-theme="light"] .music-toggle {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
}

.music-toggle:hover {
  background: rgba(108, 99, 255, 0.15);
  border-color: var(--accent);
}

.music-toggle .music-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.music-toggle .music-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.music-toggle .music-bars .bar {
  display: block;
  width: 3px;
  background: var(--accent2);
  border-radius: 1px;
  height: 4px;
  transition: height 0.2s ease;
}

.music-toggle.playing .music-icon--play { display: none; }
.music-toggle.playing .music-icon--pause { display: block !important; }
.music-toggle:not(.playing) .music-icon--play { display: block; }
.music-toggle:not(.playing) .music-icon--pause { display: none !important; }

.music-toggle.playing .music-bars .bar {
  animation: barBounce 0.8s ease-in-out infinite alternate;
}
.music-toggle.playing .music-bars .bar:nth-child(1) { animation-delay: 0s; }
.music-toggle.playing .music-bars .bar:nth-child(2) { animation-delay: 0.15s; }
.music-toggle.playing .music-bars .bar:nth-child(3) { animation-delay: 0.3s; }
.music-toggle.playing .music-bars .bar:nth-child(4) { animation-delay: 0.45s; }

@keyframes barBounce {
  0% { height: 4px; }
  100% { height: 14px; }
}

/* ---- SONG SELECTOR ---- */
.song-selector {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  max-height: 320px;
  background: rgba(10, 14, 24, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(20px);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 1000;
}

[data-theme="light"] .song-selector {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
}

.song-selector.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.song-selector-header {
  padding: 10px 14px;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .song-selector-header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
.song-list {
  max-height: 270px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(108,99,255,0.3) transparent;
}
.song-list::-webkit-scrollbar { width: 4px; }
.song-list::-webkit-scrollbar-track { background: transparent; }
.song-list::-webkit-scrollbar-thumb { background: rgba(108,99,255,0.3); border-radius: 2px; }
.song-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  color: var(--text);
  font-size: 12px;
  font-family: var(--font);
}
.song-item:hover { background: rgba(108, 99, 255, 0.1); }
.song-item.active { background: rgba(108, 99, 255, 0.15); color: var(--accent); }
.song-item-icon {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  font-size: 10px;
  opacity: 0.5;
}
.song-item.active .song-item-icon { opacity: 1; }
.song-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-menu {
  display: none;
  background: none;
  border: none;
  width: 28px;
  height: 20px;
  position: relative;
  z-index: 200;
}

.nav-menu span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
  border-radius: 1px;
}

.nav-menu span:nth-child(1) { top: 2px; }
.nav-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-menu span:nth-child(3) { bottom: 2px; }

.nav-menu.active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.nav-menu.active span:nth-child(2) { opacity: 0; }
.nav-menu.active span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background: var(--bg2);
  z-index: 150;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 32px;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 1px solid var(--border);
}

.mobile-menu.active { right: 0; }

.mobile-menu a {
  font-family: var(--font);
  font-size: 18px;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.mobile-menu a:hover { opacity: 1; }

/* ---- SCROLL CONTAINER ---- */
#scroll-container {
  position: relative;
  z-index: 1;
}

/* ---- SECTIONS ---- */
.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 140px 80px 100px;
}

.section-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(20px);
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-label::after {
  content: '';
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.section-title {
  font-family: var(--font);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(30px);
}

/* ---- HERO ---- */
.section-hero {
  min-height: 100vh;
  justify-content: center;
  padding-top: 0;
}

.hero-main-title-content {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
}

.hero-main-title-content h1,
.hero-main-title-content h2,
.hero-main-title-content p {
  margin: 0;
}

.hero-title-content {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
}

.hero-title-content h1,
.hero-title-content h2,
.hero-title-content p {
  margin: 0;
}

.hero-title {
  font-family: var(--font);
  font-size: clamp(42px, 7vw, 100px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .word {
  display: inline-block;
  transform: translateY(120%);
  background: linear-gradient(135deg, var(--text) 0%, var(--muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title .line:first-child .word {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  margin-top: 24px;
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font);
}

.hero-sub p {
  margin: 0;
}

/* Gradient text (from WYSIWYG editor) */
.text-gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
}

.scroll-indicator span {
  font-size: 9px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ---- ABOUT ---- */
.about-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px;
  align-items: start;
}

.about-photo {
  opacity: 0;
  transform: translateY(40px);
}

.about-photo-frame {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: var(--glow);
}

.about-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(var(--accent), var(--accent2), var(--accent3), var(--accent));
  opacity: 0.3;
  z-index: -1;
  animation: rotateGlow 6s linear infinite;
}

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

.about-role {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.role-tag {
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 2px;
  padding: 4px 12px;
  border: 1px solid var(--accent);
  border-radius: 20px;
  color: var(--accent);
}

.role-company {
  font-size: 13px;
  color: var(--muted);
}

.about-text {
  opacity: 0;
  transform: translateY(40px);
}

.about-text p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  opacity: 0.75;
  margin-bottom: 20px;
}

.about-text p:first-child {
  font-size: 18px;
  color: var(--text);
  opacity: 0.9;
}

/* ---- BLOG ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 40px;
  perspective: 1200px;
}

.blog-card {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 36px;
  opacity: 0;
  transform-style: preserve-3d;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  overflow: hidden;
  cursor: none;
  transition: box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

/* Glass shimmer highlight layer */
.blog-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.06) 45%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.06) 55%,
    transparent 60%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* Glowing edge on hover */
.blog-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 21px;
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent2) 50%,
    var(--accent3) 100%
  );
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.blog-card:hover::before {
  opacity: 1;
}

.blog-card:hover::after {
  opacity: 0.35;
}

.blog-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow:
    0 20px 60px rgba(108, 99, 255, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Glass spotlight that follows cursor */
.blog-card .glass-spotlight {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.blog-card:hover .glass-spotlight {
  opacity: 1;
}

/* Light mode glass adjustments */
[data-theme="light"] .blog-card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.6) 0%,
    rgba(255, 255, 255, 0.3) 100%
  );
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .blog-card:hover {
  border-color: rgba(108, 99, 255, 0.3);
  box-shadow:
    0 20px 60px rgba(108, 99, 255, 0.12),
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.blog-card-date {
  position: relative;
  z-index: 2;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent2);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.blog-card h3 {
  position: relative;
  z-index: 2;
  font-family: var(--font);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.3;
}

.blog-card p {
  position: relative;
  z-index: 2;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

/* Blog card thumbnail */
.blog-card-thumb {
  position: relative;
  margin: -36px -36px 20px -36px;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  z-index: 2;
}

.blog-card-thumb img,
.blog-card-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(0, 0, 0, 0.4) 100%
  );
  pointer-events: none;
}

.blog-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.blog-card.has-thumb {
  padding-top: 0;
}

.blog-card.has-thumb .blog-card-body {
  padding: 0 36px 36px;
}

/* Reader body images and videos */
.blog-reader-body img {
  max-width: 100%;
  border-radius: 12px;
  margin: 24px 0;
  display: block;
}

.blog-reader-body video {
  max-width: 100%;
  border-radius: 12px;
  margin: 24px 0;
  display: block;
}

/* ---- SHOP ---- */
.section-shop {
  text-align: center;
}

.shop-coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  opacity: 0;
  transform: translateY(40px);
}

.shop-icon {
  font-size: 64px;
  filter: grayscale(0.5);
}

.shop-coming-soon h2 {
  font-family: var(--font);
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shop-coming-soon p {
  font-size: 16px;
  color: var(--muted);
  max-width: 400px;
}

/* ---- CONTACT ---- */
.section-contact {
  text-align: center;
}

.section-contact .section-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#contact-title-content {
  font-family: var(--font);
  font-size: clamp(32px, 5vw, 72px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -1px;
}

#contact-title-content h1,
#contact-title-content h2,
#contact-title-content p {
  margin: 0;
}

.contact-title {
  font-family: var(--font);
  font-size: clamp(32px, 5vw, 72px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -1px;
}

.contact-title .line {
  display: block;
  overflow: hidden;
}

.contact-title .word {
  display: inline-block;
  transform: translateY(120%);
}

.contact-title .accent .word {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-links {
  display: flex;
  gap: 24px;
  margin-top: 48px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
}

.contact-links a {
  font-family: var(--font);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 12px 28px;
  border: 1px solid var(--border);
  border-radius: 30px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.contact-links a svg {
  width: 16px;
  height: 16px;
  fill: white;
  flex-shrink: 0;
}

.contact-links a:hover {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.1);
  box-shadow: var(--glow);
}

/* ---- CUSTOM PAGES ---- */
.section-custom .custom-page-title {
  opacity: 0;
  transform: translateY(20px);
}

.section-custom .custom-page-body {
  opacity: 0;
  transform: translateY(20px);
}

/* Template: Text */
.section-custom--text .custom-page-title {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 40px;
}

.section-custom--text .custom-page-body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  opacity: 0.8;
  max-width: 700px;
}

.section-custom--text .custom-page-body p {
  margin-bottom: 20px;
}

/* Template: Highlight */
.section-custom--highlight .section-content {
  text-align: center;
}

.section-custom--highlight .custom-page-title {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 24px;
}

.section-custom--highlight .custom-page-title h1,
.section-custom--highlight .custom-page-title h2,
.section-custom--highlight .custom-page-title p {
  margin: 0;
}

.section-custom--highlight .custom-page-body {
  font-size: 18px;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Template: Split */
.section-custom--split .custom-page-title {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 40px;
}

.custom-body--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  opacity: 0.8;
}

.custom-body--split h3 {
  font-family: var(--font);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.custom-body--split hr {
  display: none;
}

/* Template: Cards */
.section-custom--cards .custom-page-title {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 40px;
  text-align: center;
}

.custom-body--cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.custom-body--cards h3 {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.custom-body--cards p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 24px;
}

/* Template: Gallery */
.section-custom--gallery .custom-page-title {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 40px;
  text-align: center;
}

.custom-body--gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.custom-body--gallery img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  aspect-ratio: 1;
}

/* Template: Timeline */
.section-custom--timeline .custom-page-title {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 40px;
}

.custom-body--timeline {
  position: relative;
  padding-left: 32px;
  border-left: 2px solid var(--border);
  font-family: 'Inter', sans-serif;
  max-width: 700px;
}

.custom-body--timeline h3 {
  font-family: var(--font);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
  position: relative;
}

.custom-body--timeline h3::before {
  content: '';
  position: absolute;
  left: -39px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.custom-body--timeline p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  opacity: 0.75;
  margin-bottom: 28px;
}

/* ---- LOGIN MODAL ---- */
.login-modal {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-modal.active {
  pointer-events: auto;
  opacity: 1;
}

.login-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

[data-theme="light"] .login-modal-backdrop {
  background: rgba(240, 240, 245, 0.75);
}

.login-modal-panel {
  position: relative;
  z-index: 1;
  width: 380px;
  max-width: 90vw;
  padding: 48px 40px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(32px) saturate(1.5);
  -webkit-backdrop-filter: blur(32px) saturate(1.5);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(30px) scale(0.95);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  opacity: 0;
  text-align: center;
}

.login-modal.active .login-modal-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

[data-theme="light"] .login-modal-panel {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.5) 100%);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.1);
}

.login-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.login-modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.login-modal-logo {
  font-family: var(--font);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.login-modal-title {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.login-modal-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
}

.login-modal-field {
  margin-bottom: 16px;
  text-align: left;
}

.login-modal-field label {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  font-family: var(--font);
}

.login-modal-field input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-body);
  transition: border-color 0.3s ease;
  outline: none;
}

[data-theme="light"] .login-modal-field input {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
}

.login-modal-field input:focus {
  border-color: var(--accent);
}

/* Password show/hide toggle */
.login-password-wrapper {
  position: relative;
}
.login-password-wrapper input {
  padding-right: 44px;
}
.login-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}
.login-password-toggle:hover {
  color: var(--text);
}

/* Microsoft login */
.login-modal-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.login-modal-divider::before,
.login-modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}
[data-theme="light"] .login-modal-divider::before,
[data-theme="light"] .login-modal-divider::after {
  background: rgba(0, 0, 0, 0.1);
}
.login-modal-ms-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.login-modal-ms-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
[data-theme="light"] .login-modal-ms-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .login-modal-ms-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.2);
}

.login-modal-btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 8px;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  text-align: center;
  text-decoration: none;
}

.login-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108, 99, 255, 0.3);
}

.login-modal-error {
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 12px;
  min-height: 20px;
}

.login-modal-loggedin {
  text-align: center;
}

.login-modal-loggedin p {
  color: var(--accent2);
  font-size: 14px;
  margin-bottom: 12px;
}

.login-modal-countdown {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.login-modal-countdown span {
  color: var(--accent);
  font-weight: 700;
}

.login-modal-loggedin.hidden {
  display: none;
}

.login-modal-logout {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 12px;
  background: rgba(255, 107, 107, 0.08);
  color: #ff6b6b;
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.login-modal-logout:hover {
  background: rgba(255, 107, 107, 0.15);
  border-color: rgba(255, 107, 107, 0.5);
}

/* ---- INFRASTRUCTURE SPINE SECTION ---- */
.section-infra.hidden {
  display: none !important;
}

.section-infra .section-content {
  max-width: 100%;
  padding: 0;
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-infra .section-label {
  padding-top: 0;
  margin-bottom: 4px;
}

.section-infra .section-title {
  margin-bottom: 12px;
}

.section-infra .section-label,
.section-infra .section-title {
  padding-left: 80px;
  padding-right: 80px;
  position: relative;
  z-index: 5;
}

.section-infra {
  padding: 0 !important;
  min-height: 100vh;
  overflow: hidden;
}

/* ---- 3D CAROUSEL SCENE ---- */
.infra-spine-wrapper {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 65vh;
}

/* Spine axis runs through the center */
.infra-spine-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--accent), var(--accent2), transparent);
  transform: translateX(-50%);
  opacity: 0;
  z-index: 0;
}

.infra-spine-line::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(108, 99, 255, 0.2), rgba(0, 212, 170, 0.15), transparent);
  filter: blur(6px);
}

.infra-spine-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 100%;
  background: linear-gradient(to bottom, transparent 10%, rgba(108, 99, 255, 0.06) 30%, rgba(0, 212, 170, 0.04) 70%, transparent 90%);
  filter: blur(16px);
}

/* Perspective scene — deep perspective for dramatic 3D */
.infra-cards-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1800px;
  perspective-origin: 50% 45%;
}

/* Rotating helix — the corkscrew container */
.infra-cylinder {
  position: relative;
  width: 420px;
  height: 280px;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Each face of the helix — corkscrew positioning */
.infra-card-face {
  position: absolute;
  width: 420px;
  height: 280px;
  backface-visibility: hidden;
  /* Corkscrew: rotateY around spine, translateZ outward, translateY helix offset, rotateX tilt */
  transform:
    rotateY(var(--face-angle))
    translateZ(var(--cylinder-radius))
    translateY(var(--helix-y, 0px))
    rotateX(var(--helix-tilt, 0deg));
  transition: opacity 0.3s ease;
  transform-style: preserve-3d;
}

/* ---- CARD LINK — MUST preserve 3D context ---- */
.infra-card-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
  transform-style: preserve-3d;
}

/* ---- GLASS CARD — 3D slab with visible depth ---- */
.infra-card-glass {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: none;
  overflow: visible;
  transform-style: preserve-3d;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

/* ---- 3D GLASS DEPTH PANELS ---- */
/* Shared edge style */
[class^="infra-card-depth-"] {
  pointer-events: none;
}

/* Right edge */
.infra-card-depth-right {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 28px;
  transform-origin: right center;
  transform: rotateY(90deg);
  background: linear-gradient(180deg,
    rgba(180, 180, 255, 0.22) 0%,
    rgba(108, 99, 255, 0.14) 30%,
    rgba(80, 70, 200, 0.12) 70%,
    rgba(60, 50, 150, 0.08) 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Left edge */
.infra-card-depth-left {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 28px;
  transform-origin: left center;
  transform: rotateY(-90deg);
  background: linear-gradient(180deg,
    rgba(150, 150, 220, 0.18) 0%,
    rgba(80, 70, 200, 0.12) 30%,
    rgba(60, 50, 150, 0.10) 70%,
    rgba(40, 30, 100, 0.06) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.20);
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Top edge */
.infra-card-depth-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  transform-origin: center top;
  transform: rotateX(90deg);
  background: linear-gradient(90deg,
    rgba(180, 180, 255, 0.20) 0%,
    rgba(160, 150, 255, 0.26) 50%,
    rgba(180, 180, 255, 0.20) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

/* Bottom edge */
.infra-card-depth-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  transform-origin: center bottom;
  transform: rotateX(-90deg);
  background: linear-gradient(90deg,
    rgba(40, 30, 80, 0.24) 0%,
    rgba(20, 15, 50, 0.30) 50%,
    rgba(40, 30, 80, 0.24) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

/* Back face — shifted behind front */
.infra-card-depth-back {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(25, 25, 50, 0.75) 0%, rgba(15, 15, 35, 0.55) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateZ(-28px);
  backface-visibility: hidden;
}

/* Front face highlight — inner glass refraction */
.infra-card-glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.0) 35%,
    rgba(255, 255, 255, 0.02) 65%,
    rgba(255, 255, 255, 0.10) 100%);
  pointer-events: none;
  z-index: 5;
  transform: translateZ(1px);
}

.infra-card-glass:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 100%);
}

/* ---- FLOATING 3D TITLE ---- */
.infra-card-title-float {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%) translateZ(60px);
  z-index: 10;
  text-align: center;
  pointer-events: none;
  transform-style: preserve-3d;
}

.infra-card-title-float .title-glass {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05);
  transform-style: preserve-3d;
  position: relative;
}

/* Glass depth — inner 3D layers */
.infra-card-title-float .title-glass::before {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 60%);
  pointer-events: none;
  transform: translateZ(4px);
}

.infra-card-title-float .title-glass::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.2), rgba(0, 212, 170, 0.1), transparent);
  z-index: -1;
  opacity: 0.5;
  filter: blur(8px);
  transform: translateZ(-4px);
}

.infra-card-title-float .title-name {
  font-family: var(--font);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  transform: translateZ(8px);
  display: block;
}

.infra-card-title-float .title-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 8px;
  transform: translateZ(12px);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.infra-card-title-float .title-domain {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 6px;
  transform: translateZ(6px);
  display: block;
}

/* Top shimmer sweep */
.infra-card-glass::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(255, 255, 255, 0.04) 10%, transparent 20%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
  animation: cardShimmerRotate 8s linear infinite;
  z-index: 2;
  border-radius: 20px;
}

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

.infra-card-glass:hover::before { opacity: 1; }

/* Mouse-following spotlight */
.glass-spotlight {
  position: absolute;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s;
}

.infra-card-glass:hover .glass-spotlight { opacity: 1; }

/* ---- CARD PREVIEW AREA (animated canvas — full card) ---- */
.infra-card-preview {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
  flex-shrink: 0;
  flex: 1;
}

.infra-card-preview canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.7;
}

/* Gradient overlay on preview */
.infra-card-preview::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, rgba(12, 12, 20, 0.95), transparent);
  pointer-events: none;
  z-index: 1;
}

/* Status indicator */
.infra-card-status {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #4ade80;
  z-index: 2;
  border: 1px solid rgba(74, 222, 128, 0.2);
}

.infra-card-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
  animation: statusBlink 2s ease-in-out infinite;
}

@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Card index badge */
.infra-card-index {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(108, 99, 255, 0.15);
  border: 1px solid rgba(108, 99, 255, 0.2);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  z-index: 2;
}

/* ---- CARD BODY (hidden — replaced by floating title) ---- */
.infra-card-body {
  display: none;
}

.infra-card-content {
  display: flex;
  align-items: center;
  gap: 18px;
}

.infra-card-icon {
  font-size: 32px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.15), rgba(0, 212, 170, 0.08));
  border-radius: 16px;
  border: 1px solid rgba(108, 99, 255, 0.12);
  flex-shrink: 0;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(108, 99, 255, 0.1);
}

.infra-card-glass:hover .infra-card-icon {
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.25), rgba(0, 212, 170, 0.15));
  border-color: rgba(108, 99, 255, 0.3);
  transform: scale(1.1) rotate(-3deg);
  box-shadow: 0 8px 24px rgba(108, 99, 255, 0.2);
}

.infra-card-info { flex: 1; }

.infra-card-name {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.infra-card-url {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
  opacity: 0.6;
}

.infra-card-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  color: var(--muted);
}

.infra-card-glass:hover .infra-card-arrow {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(108, 99, 255, 0.1);
  transform: translateX(6px);
  box-shadow: 0 0 16px rgba(108, 99, 255, 0.2);
}

/* Tags row under content */
.infra-card-tags {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.infra-card-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(108, 99, 255, 0.08);
  border: 1px solid rgba(108, 99, 255, 0.1);
  color: rgba(226, 224, 221, 0.6);
}

/* ---- CAROUSEL NAVIGATION ---- */
.infra-carousel-nav {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
}

.infra-nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.infra-nav-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(108, 99, 255, 0.5);
  transform: scale(1.3);
}

.infra-nav-dot:hover:not(.active) {
  background: rgba(255, 255, 255, 0.4);
}

.infra-carousel-counter {
  position: absolute;
  top: 40px;
  right: 60px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--muted);
  z-index: 10;
  opacity: 0.5;
}

.infra-carousel-counter .current {
  color: var(--accent);
  font-size: 32px;
  opacity: 1;
}

/* Scroll hint */
.infra-scroll-hint {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.4;
  z-index: 10;
  animation: infraScrollHintPulse 2s ease-in-out infinite;
}

@keyframes infraScrollHintPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.15; }
}

/* ---- LIGHT THEME ---- */
[data-theme="light"] .infra-card-glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.35) 100%);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

[data-theme="light"] .infra-card-preview::after {
  background: linear-gradient(to top, rgba(255, 255, 255, 0.95), transparent);
}

/* ---- FROST AI CHAT WIDGET ---- */

/* Breathing orb trigger — bottom-left, fixed */
.frost-orb {
  position: fixed;
  bottom: 32px;
  left: 32px;
  z-index: 9000;
  display: none; /* shown via JS when authenticated */
  cursor: pointer;
}

.frost-orb-cloud {
  position: relative;
  width: 64px;
  height: 64px;
}

.frost-orb-canvas {
  position: absolute;
  top: -20px;
  left: -20px;
  width: 104px;
  height: 104px;
  pointer-events: none;
}

.frost-orb-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  filter: drop-shadow(0 0 6px rgba(140, 180, 255, 0.8));
  z-index: 1;
}

.frost-orb:hover .frost-orb-cloud {
  transform: scale(1.1);
  transition: transform 0.3s ease;
}

.frost-orb-label {
  position: absolute;
  left: 72px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 6px 14px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  opacity: 0.7;
  pointer-events: none;
  animation: frostLabelPulse 5s ease-in-out infinite;
}

@keyframes frostLabelPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* Chat panel */
.frost-panel {
  position: fixed;
  bottom: 32px;
  left: 32px;
  width: 400px;
  height: 540px;
  z-index: 9001;
  display: none;
  flex-direction: column;
  border-radius: 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 60px rgba(108, 99, 255, 0.08);
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.frost-panel.open {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Header */
.frost-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.frost-header-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(108, 99, 255, 0.8), rgba(56, 189, 248, 0.6));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.frost-header-info {
  flex: 1;
  min-width: 0;
}

.frost-header-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.frost-header-status {
  font-size: 11px;
  color: var(--text-secondary);
}

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

.frost-model-select {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 11px;
  padding: 4px 8px;
  outline: none;
  cursor: pointer;
  max-width: 130px;
}

.frost-close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}
.frost-close-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}

/* Messages area */
.frost-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.frost-messages::-webkit-scrollbar { width: 4px; }
.frost-messages::-webkit-scrollbar-track { background: transparent; }
.frost-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }

.frost-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
  word-wrap: break-word;
}

.frost-msg-user {
  align-self: flex-end;
  background: rgba(108, 99, 255, 0.25);
  border: 1px solid rgba(108, 99, 255, 0.3);
  color: var(--text-primary);
  border-bottom-right-radius: 4px;
}

.frost-msg-assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.frost-msg-assistant code {
  background: rgba(0,0,0,0.3);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
}

.frost-msg-assistant pre {
  background: rgba(0,0,0,0.3);
  padding: 10px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 6px 0;
  font-size: 12px;
}

.frost-msg-search {
  align-self: flex-start;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.15);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 8px 12px;
}

.frost-msg-search a {
  color: var(--accent);
  text-decoration: none;
}

.frost-typing {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  align-self: flex-start;
}
.frost-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
  animation: frostDot 1.2s ease-in-out infinite;
}
.frost-typing span:nth-child(2) { animation-delay: 0.2s; }
.frost-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes frostDot {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

/* Input area */
.frost-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.frost-search-toggle {
  background: none;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 16px;
  padding: 6px 8px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.frost-search-toggle.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.frost-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  resize: none;
  min-height: 20px;
  max-height: 80px;
  font-family: inherit;
}
.frost-input::placeholder { color: var(--text-secondary); opacity: 0.5; }

.frost-send-btn {
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  padding: 8px 12px;
  cursor: pointer;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.frost-send-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Voice settings bar */
.frost-voice-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.15);
}

.frost-voice-bar.hidden {
  display: none;
}

.frost-voice-bar-label {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.frost-voice-select {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 11px;
  padding: 3px 6px;
  outline: none;
  cursor: pointer;
  max-width: 160px;
  flex: 1;
  min-width: 0;
}

.frost-voice-test-btn {
  background: none;
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 11px;
  padding: 3px 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.frost-voice-test-btn:hover {
  background: rgba(255,255,255,0.08);
}

.frost-voice-rate {
  width: 60px;
  accent-color: var(--accent);
}

.frost-tts-toggle-label {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  cursor: pointer;
}

.frost-tts-toggle {
  accent-color: var(--accent);
}

/* Voice settings button */
.frost-voice-settings-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  transition: background 0.2s;
}
.frost-voice-settings-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}

/* Mic button */
.frost-mic-btn {
  background: none;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 16px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.frost-mic-btn:hover {
  background: rgba(255,255,255,0.08);
}
.frost-mic-btn.active {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
  animation: frostMicPulse 1.2s ease-in-out infinite;
}

@keyframes frostMicPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* Light theme */
[data-theme="light"] .frost-panel {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12), 0 0 60px rgba(108, 99, 255, 0.05);
}

[data-theme="light"] .frost-msg-user {
  background: rgba(108, 99, 255, 0.12);
}

[data-theme="light"] .frost-msg-assistant {
  background: rgba(0, 0, 0, 0.03);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .section { padding: 120px 40px 80px; }
  .about-layout { grid-template-columns: 1fr; gap: 48px; }
  .about-photo { display: flex; flex-direction: column; align-items: center; }
}

@media (max-width: 768px) {
  .section { padding: 100px 24px 60px; }
  #nav { padding: 16px 24px; }
  .nav-links { display: none; }
  .nav-menu { display: block; }
  .blog-grid { grid-template-columns: 1fr; }
  #cursor { display: none; }
  body { cursor: auto; }
  a, button { cursor: pointer; }
  /* Infra carousel: stack vertically on mobile */
  .infra-spine-wrapper { height: auto; min-height: 0; perspective: none; }
  .infra-cards-container { perspective: none; display: flex; flex-direction: column; gap: 24px; padding: 40px 24px; }
  .infra-cylinder { transform-style: flat; width: 100%; height: auto; position: relative; display: flex; flex-direction: column; gap: 24px; }
  .infra-card-face { position: relative !important; width: 100% !important; height: auto !important; transform: none !important; backface-visibility: visible !important; }
  .infra-card-glass { height: auto; }
  .infra-card-link { height: auto; }
  .infra-spine-line { display: none; }
  .infra-card-preview { height: 140px; }
  .infra-carousel-nav { display: none; }
  .infra-carousel-counter { display: none; }
  .infra-scroll-hint { display: none; }
  .section-infra .section-label,
  .section-infra .section-title { padding: 0 24px; }
}

/* ---- SELECTION ---- */
::selection {
  background: var(--accent);
  color: #fff;
}

/* ---- BLOG POST CONTENT (hidden in card view) ---- */
.blog-card-content {
  display: none;
}

/* ---- BLOG READER OVERLAY ---- */
.blog-reader-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-reader-overlay.active {
  pointer-events: auto;
  opacity: 1;
}

.blog-reader-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

[data-theme="light"] .blog-reader-backdrop {
  background: rgba(240, 240, 245, 0.7);
}

.blog-reader-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  padding: 80px 24px 40px;
  overflow: hidden;
}

/* Glass panel for the post */
.blog-reader-panel {
  position: relative;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 24px;
  padding: 48px 56px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(32px) saturate(1.5);
  -webkit-backdrop-filter: blur(32px) saturate(1.5);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(40px) scale(0.95);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

.blog-reader-panel::-webkit-scrollbar {
  width: 4px;
}
.blog-reader-panel::-webkit-scrollbar-track {
  background: transparent;
}
.blog-reader-panel::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

[data-theme="light"] .blog-reader-panel {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.75) 0%,
    rgba(255, 255, 255, 0.45) 100%
  );
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.blog-reader-overlay.active .blog-reader-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Shimmer on the glass panel */
.blog-reader-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.04) 45%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 55%,
    transparent 60%
  );
  pointer-events: none;
}

/* Reader header (back button + date) */
.blog-reader-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  position: relative;
  z-index: 2;
}

.blog-reader-back {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 18px;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

[data-theme="light"] .blog-reader-back {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}

.blog-reader-back:hover {
  background: rgba(108, 99, 255, 0.15);
  border-color: var(--accent);
  transform: translateX(-4px);
}

.blog-reader-back svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.blog-reader-back:hover svg {
  transform: translateX(-3px);
}

.blog-reader-date {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent2);
  text-transform: uppercase;
}

/* Reader post content */
.blog-reader-title {
  font-family: var(--font);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 32px;
  position: relative;
  z-index: 2;
}

.blog-reader-body {
  position: relative;
  z-index: 2;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  opacity: 0.85;
}

.blog-reader-body p {
  margin-bottom: 20px;
}

.blog-reader-body h1,
.blog-reader-body h2,
.blog-reader-body h3 {
  font-family: var(--font);
  margin: 32px 0 16px;
}

.blog-reader-body img {
  max-width: 100%;
  border-radius: 12px;
  margin: 24px 0;
}

/* Navigation between posts */
.blog-reader-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 2;
}

/* LinkedIn embed section in blog reader */
.blog-reader-linkedin {
  margin-top: 40px;
  position: relative;
  z-index: 2;
}
.blog-reader-linkedin-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(10, 102, 194, 0.4), transparent);
  margin-bottom: 28px;
}
.blog-reader-linkedin-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: #0a66c2;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.blog-reader-linkedin-header svg {
  color: #0a66c2;
}
.blog-reader-linkedin iframe {
  width: 100%;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.blog-reader-linkedin-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 12px 24px;
  background: rgba(10, 102, 194, 0.12);
  border: 1px solid rgba(10, 102, 194, 0.25);
  border-radius: 12px;
  color: #4da3e8;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}
.blog-reader-linkedin-link:hover {
  background: rgba(10, 102, 194, 0.2);
  border-color: rgba(10, 102, 194, 0.5);
  color: #7bbfff;
  transform: translateX(4px);
}
[data-theme="light"] .blog-reader-linkedin-link {
  background: rgba(10, 102, 194, 0.08);
  border-color: rgba(10, 102, 194, 0.2);
  color: #0a66c2;
}
[data-theme="light"] .blog-reader-linkedin-link:hover {
  background: rgba(10, 102, 194, 0.15);
  color: #004182;
}

/* LinkedIn badge on blog card */
.blog-card-linkedin {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  color: #0a66c2;
  vertical-align: middle;
  opacity: 0.7;
}
.blog-card-linkedin svg {
  vertical-align: middle;
}

[data-theme="light"] .blog-reader-nav {
  border-top-color: rgba(0, 0, 0, 0.06);
}

.blog-reader-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 24px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

[data-theme="light"] .blog-reader-nav-btn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1a1a2e;
}

.blog-reader-nav-btn:hover {
  background: rgba(108, 99, 255, 0.12);
  border-color: var(--accent);
  transform: scale(1.02);
}

.blog-reader-nav-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.blog-reader-nav-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
}

.blog-reader-nav-btn svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

/* Post counter */
.blog-reader-counter {
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--text);
  opacity: 0.5;
  text-align: center;
}

/* Active card highlight in grid */
.blog-card.reader-active {
  border-color: var(--accent) !important;
  box-shadow: 0 0 40px rgba(108, 99, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

/* Disable 3D tilt when reader is open */
body.blog-reader-open .blog-card {
  pointer-events: none;
}

/* Mobile reader adjustments */
@media (max-width: 768px) {
  .blog-reader-container {
    padding: 70px 12px 24px;
  }
  .blog-reader-panel {
    padding: 32px 24px;
    border-radius: 20px;
  }
  .blog-reader-title {
    font-size: 24px;
  }
  .blog-reader-nav-btn {
    padding: 12px 16px;
  }
}
