*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
  -webkit-tap-highlight-color: transparent;
}

:focus { outline: none; }

body {
  visibility: hidden;
}
body.loaded {
  visibility: visible;
}

/* CSS Custom Properties */
:root {
  --bg: #0b0b0f;
  --surface: rgba(255,255,255,0.04);
  --surface-hover: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(178,137,239,0.4);
  --accent: #b289ef;
  --accent2: #9661ff;
  --accent3: #d4a8ff;
  --text: #f0edf7;
  --muted: rgba(240,237,247,0.45);
  --radius: 18px;
  --radius-sm: 12px;
  --glow: 0 0 40px rgba(178,137,239,0.15);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 1025px) {
  body {
    overflow: hidden;
    height: 100vh;
  }
}

/* Dynamic Lava Mesh System */
:root {
  --color-bg1: #050508; 
  --color-bg2: #0b0b0f;
  --color-interactive: 107, 33, 168;
  --blending: hard-light;
}

.gradient-bg {
  width: 100vw;
  height: 100vh;
  position: fixed;
  overflow: hidden;
  background: var(--color-bg1);
  top: 0;
  left: 0;
  z-index: 0;
}

.gradients-container {
  filter: url(#goo) blur(40px);
  width: 100%;
  height: 100%;
}

.bg-orb {
  position: absolute;
  mix-blend-mode: var(--blending);
  transform-origin: center center;
  animation: lavaRise var(--dur, 30s) var(--delay, 0s) ease-in-out infinite;
  will-change: transform, opacity, border-radius;
  opacity: 0;
}

.interactive {
  position: absolute;
  background: radial-gradient(circle at center, rgba(var(--color-interactive), 0.6) 0, rgba(var(--color-interactive), 0) 50%) no-repeat;
  mix-blend-mode: var(--blending);
  width: 100%;
  height: 100%;
  top: -50%;
  left: -50%;
  opacity: 0.5;
  will-change: transform;
}

/* Keyframes */
@keyframes lavaRise {
  0% {
    transform: translateY(100vh) scale(1) rotate(0deg);
    opacity: 0;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  }
  15% { opacity: 0.5; }
  50% {
    transform: translateY(40vh) scale(1.3) rotate(180deg);
    opacity: 0.7;
    border-radius: 60% 40% 30% 70% / 50% 30% 70% 50%;
  }
  85% { opacity: 0.4; }
  100% {
    transform: translateY(-20vh) scale(1) rotate(360deg);
    opacity: 0;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  }
}

@keyframes moveInCircle {
  0%   { transform: rotate(0deg);   }
  100% { transform: rotate(360deg); }
}

@media (max-width: 1024px), screen and (max-width: 1024px) {
  .interactive { 
    display: none !important; 
  }
}

body.is-mobile .interactive {
  display: none !important;
}

html { scroll-behavior: smooth; }
@media (max-width: 1024px) { html { scroll-behavior: auto !important; } }

/* Layout */
.wrapper {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 0 60px;
}

@media (min-width: 1025px) {
  .wrapper {
    max-width: 1000px;
    height: 100vh;
    display: grid;
    grid-template-columns: 358.4px 1fr;
    gap: 32px;
    padding: 30px 24px;
    align-items: stretch;
    box-sizing: border-box;
  }
  
  .sidebar-section {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding-bottom: 20px;
    overflow: hidden;
    width: 358.4px;
    height: 452.6px;
    flex: 1;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .playlist-is-expanded .sidebar-section .cover {
    height: 240px !important;
  }

  .playlist-is-expanded .sidebar-section .avatar-wrap {
    margin-top: 40px !important;
    opacity: 0;
  }

  .main-content {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 10px 0 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    height: calc(100vh - 60px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
  }

  .main-content::-webkit-scrollbar { width: 5px; }
  .main-content::-webkit-scrollbar-track { background: transparent; }
  .main-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
  }

  .cover {
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    border-bottom: 1px solid var(--border) !important;
    height: 180px !important;
  }
  
  .profile { padding: 0 20px !important; }
  .socials { margin: 20px 20px 0 !important; }
  .section-label { margin: 20px 24px 12px !important; }
  .bio-footer { margin-top: 30px !important; }
}

/* Cover */
.cover {
  position: relative;
  height: 220px;
  overflow: hidden;
  margin: 12px 12px 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.5) saturate(1.4);
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), filter 0.5s ease;
  transform-origin: left center;
  will-change: transform;
}
.playlist-is-expanded .cover-img {
  transform: scale(1.58) translateY(30px);
  transform-origin: left center;
  filter: brightness(0.9) saturate(1.6);
}
.cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(11,11,15,0) 0%,
    rgba(11,11,15,0.3) 60%,
    rgba(11,11,15,0.95) 100%
  );
}
.cover-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(178,137,239,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(178,137,239,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, transparent, black 40%, black 60%, transparent);
}

/* Profile */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px 0;
  margin-top: -56px;
  position: relative;
  container-type: inline-size;
}
.avatar-wrap {
  position: relative;
  width: 108px;
  height: 108px;
  margin-bottom: 16px;
  transition: margin-top 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s;
}
.avatar-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--accent), var(--accent2), #d4a8ff, var(--accent));
  animation: spin 6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.avatar-ring-mask {
  position: absolute;
  inset: 0px;
  border-radius: 50%;
  background: var(--bg);
}
.avatar-img {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  object-fit: cover;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
}
.avatar-status {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background: #22c55e;
  border: 3px solid var(--bg);
  border-radius: 50%;
  z-index: 2;
}
.avatar-status::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: inherit;
  opacity: 0;
  animation: statusPulse 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  z-index: -1;
}
@keyframes statusPulse {
  0%   { transform: translate(-50%, -50%) scale(1);   opacity: 0.8; }
  60%  { transform: translate(-50%, -50%) scale(2.2); opacity: 0;   }
  100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0;   }
}

.username {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(1.3rem, 8vw, 1.75rem);
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, var(--accent3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 4px;
  white-space: nowrap;
  max-width: 100%;
}
.handle {
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 12px;
}
.bio-text {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 320px;
  font-weight: 300;
}
.bio-text strong {
  color: var(--text);
  font-weight: 500;
}
.bio-text a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}
.bio-text a:hover {
  color: var(--accent3);
  text-shadow: 0 0 8px rgba(178,137,239,0.4);
}

/* Stats bar */
.stats-bar {
  display: flex;
  gap: 1px;
  margin: 20px 24px 0;
  background: var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px;
  background: var(--surface);
  gap: 2px;
  transition: background 0.2s;
}
.stat:hover { background: var(--surface-hover); }
.stat-val {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.stat-lbl {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stat-icon { font-size: 0.85rem; margin-bottom: 2px; }

/* Social icons */
.socials {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 24px 24px 0;
  flex-wrap: wrap;
}
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
  font-size: 1.05rem;
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
  overflow: hidden;
}
.social-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent2), var(--accent3));
  opacity: 0;
  transition: opacity 0.25s;
}
.social-btn:hover {
  transform: translateY(-3px) scale(1.08);
  border-color: var(--border-hover);
  color: white;
  box-shadow: 0 8px 24px rgba(150,97,255,0.3);
}
.social-btn:hover::before { opacity: 0.15; }
.social-btn svg { position: relative; z-index: 1; width: 18px; height: 18px; fill: currentColor; }

/* Section label */
.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 24px 12px;
  font-family: 'Syne', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Link cards */
.links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 24px;
}
.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.5s both;
}
.link-card:nth-child(1) { animation-delay: 0.05s; }
.link-card:nth-child(2) { animation-delay: 0.1s; }
.link-card:nth-child(3) { animation-delay: 0.15s; }
.link-card:nth-child(4) { animation-delay: 0.2s; }
.link-card:nth-child(5) { animation-delay: 0.25s; }
.link-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Section Divider */
.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 32px 24px;
  opacity: 0.8;
}
.section-divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    var(--border) 20%, 
    var(--border) 80%, 
    transparent
  );
}
.section-divider .divider-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  position: relative;
}
.section-divider .divider-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(178,137,239,0.2);
  border-radius: 50%;
}

.link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent2), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.link-card:hover {
  transform: translateX(4px);
  border-color: var(--border-hover);
  box-shadow: var(--glow), -4px 0 0 var(--accent);
  background: var(--surface-hover);
}
.link-card:hover::before { opacity: 0.06; }

.link-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.link-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
.link-icon-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.link-info {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.link-title {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.link-sub {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-arrow {
  position: relative;
  z-index: 1;
  color: var(--muted);
  opacity: 0;
  transition: all 0.2s;
  transform: translateX(-6px);
  flex-shrink: 0;
}
.link-card:hover .link-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent3);
}

/* Ko-fi card */
.kofi-card {
  margin: 8px 24px 0;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,94,91,0.25);
  background: linear-gradient(135deg, rgba(255,94,91,0.07) 0%, rgba(255,94,91,0.03) 100%);
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s;
  animation: fadeUp 0.5s 0.35s both;
}
.kofi-card:hover {
  border-color: rgba(255,94,91,0.5);
  box-shadow: 0 0 30px rgba(255,94,91,0.12);
  transform: translateY(-2px);
}
.kofi-icon { font-size: 1.6rem; }
.kofi-text strong {
  display: block;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
}
.kofi-text span {
  font-size: 0.75rem;
  color: var(--muted);
}

/* TikTok Profile Card */
.tiktok-card {
  margin: 20px 24px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
  animation: fadeUp 0.5s 0.1s both;
}
.tiktok-card:hover {
  border-color: rgba(105,185,242,0.35);
  box-shadow: 0 0 32px rgba(105,185,242,0.08);
}

.tiktok-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
}
.tiktok-card__logo {
  color: #fff;
  display: flex;
  align-items: center;
}
.tiktok-card__platform {
  font-family: 'Syne', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.tiktok-card__body {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 16px 14px;
}
.tiktok-card__avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(105,185,242,0.3);
  flex-shrink: 0;
}
.tiktok-card__info { flex: 1; min-width: 0; }
.tiktok-card__name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tiktok-card__handle {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.tiktok-card__stats {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tiktok-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.tiktok-stat__val {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tiktok-stat__lbl {
  font-size: 0.62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-top: 1px;
}
.tiktok-stat__sep {
  width: 1px;
  height: 28px;
  background: var(--border);
  align-self: center;
}


.tiktok-card__follow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  padding: 10px 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, #010101, #1a1a1a);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.tiktok-card__follow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #69b9f2, #ee1d52, #69b9f2);
  background-size: 200%;
  opacity: 0;
  transition: opacity 0.3s;
}
.tiktok-card__follow:hover::before { opacity: 0.12; background-position: 100%; }
.tiktok-card__follow:hover {
  border-color: rgba(105,185,242,0.4);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(105,185,242,0.15);
}
.tiktok-card__follow svg { position: relative; z-index: 1; }
.tiktok-card__follow span { position: relative; z-index: 1; }

/* Footer */
.bio-footer {
  margin-top: 40px;
  text-align: center;
  font-size: 0.7rem;
  color: rgba(240,237,247,0.2);
  letter-spacing: 0.06em;
}
.bio-footer a {
  color: var(--accent);
  text-decoration: none;
}

/* Sidebar Wrapper & Desktop Player */
.sidebar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 1025px) {
  .sidebar-wrapper {
    position: relative;
    height: 100%;
    max-height: calc(100vh - 60px);
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .sidebar-wrapper::-webkit-scrollbar { display: none; }
  .sidebar-section { position: relative !important; }
}

.player-container {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  padding: 20px 20px 18px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  display: none;
}

@media (min-width: 1025px) {
  .player-container { display: block; }
  .music-player { display: none; }
  
  /* --- Mini Player Mode (Desktop Expanding) --- */
  .music-player.mini-player-mode {
    display: flex !important;
    position: fixed;
    right: 14px;
    bottom: 24px;
    z-index: 1000;
    /* Collapsed state */
    width: 54px;
    min-height: 54px;
    max-height: 54px;
    border-radius: 50%;
    background: rgba(15, 15, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    padding: 0;
    flex-direction: column;
    justify-content: flex-end;
    transform-origin: bottom right;
    will-change: width, max-height, border-radius, padding;
    /* Collapse transition: ease-in-out so it doesn't snap */
    transition:
      width      0.55s cubic-bezier(0.4, 0, 0.2, 1),
      max-height 0.55s cubic-bezier(0.4, 0, 0.2, 1),
      border-radius 0.55s cubic-bezier(0.4, 0, 0.2, 1),
      padding    0.55s cubic-bezier(0.4, 0, 0.2, 1),
      border-color 0.4s ease,
      box-shadow 0.4s ease;
  }

  .music-player.mini-player-mode.expanded {
    width: 340px;
    height: auto;
    max-height: 560px;
    border-radius: 24px;
    padding: 24px;
    border-color: var(--accent);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 20px rgba(178, 137, 239, 0.2);
    /* Expand transition: overshoot spring feel */
    transition:
      width      0.6s cubic-bezier(0.34, 1.08, 0.64, 1),
      max-height 0.6s cubic-bezier(0.34, 1.08, 0.64, 1),
      border-radius 0.5s cubic-bezier(0.34, 1.08, 0.64, 1),
      padding    0.5s cubic-bezier(0.34, 1.08, 0.64, 1),
      border-color 0.4s ease,
      box-shadow 0.4s ease;
  }

  /* Strip internal styles to avoid double border/background */
  .mini-player-mode .mini-player-ui {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0;
    visibility: hidden;
    /* Content fades out fast so container can shrink cleanly */
    transition: opacity 0.15s ease, visibility 0s linear 0.15s;
    flex-grow: 1;
    width: 100%;
    display: flex !important;
    flex-direction: column;
  }

  .music-player.mini-player-mode.expanded .mini-player-ui {
    opacity: 1;
    visibility: visible;
    /* Content fades in after container has opened a bit */
    transition: opacity 0.35s ease 0.2s, visibility 0s linear 0s;
  }

  /* Hide mobile controls when in mini-player-mode on desktop */
  .music-player.mini-player-mode .mobile-controls {
    display: none !important;
  }

  .music-player.mini-player-mode:has(.music-toggle.playing):not(.expanded) {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(178, 137, 239, 0.4), inset 0 0 15px rgba(178, 137, 239, 0.2);
  }

  .music-player.mini-player-mode .music-toggle {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    position: absolute;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .music-player.mini-player-mode .music-toggle:hover {
    transform: scale(1.05);
  }

  .music-player.mini-player-mode.expanded .music-toggle {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.7);
  }
}

  @keyframes slideInUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }


.player-info { margin-bottom: 15px; }

.track-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-time {
  font-size: 0.7rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.player-progress {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  margin-bottom: 20px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  width: 0%;
  border-radius: 3px;
  transition: width 0.1s linear;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 15px;
}

.ctrl-group {
  display: flex;
  align-items: center;
  gap: 15px;
}

.ctrl-extra { display: flex; align-items: center; }

.volume-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.volume-slider {
  -webkit-appearance: none;
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.mini-btn svg {
  width: 16px !important;
  height: 16px !important;
}

/* Playlist area */
.player-playlist {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.4s ease, 
              margin-top 0.6s ease;
  pointer-events: none;
  margin-top: 0;
}

.player-playlist.expanded {
  max-height: 300px;
  opacity: 1;
  margin-top: 20px;
  pointer-events: auto;
}

.player-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-btn svg { width: 18px; height: 18px; }
.player-btn:hover { color: #fff; transform: scale(1.1); }

.player-btn.play-pause {
  width: 38px;
  height: 38px;
  background: var(--accent);
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 4px 15px rgba(178,137,239,0.3);
}

.player-btn.play-pause:hover {
  transform: scale(1.05);
  background: var(--accent2);
}

.player-btn.play-pause svg { width: 20px; height: 20px; }

.playlist-inner {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 5px;
}

.playlist-inner::-webkit-scrollbar { width: 4px; }
.playlist-inner::-webkit-scrollbar-track { background: transparent; }
.playlist-inner::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.playlist-item {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
  border: 1px solid transparent;
}

.playlist-item:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.playlist-item.active {
  background: rgba(178, 137, 239, 0.1);
  color: var(--accent);
  border-color: rgba(178, 137, 239, 0.2);
}

.player-playlist::-webkit-scrollbar { width: 4px; }
.player-playlist::-webkit-scrollbar-track { background: transparent; }
.player-playlist::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.playlist-item {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
  border: 1px solid transparent;
}

.playlist-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.playlist-item.active {
  background: rgba(178, 137, 239, 0.1);
  color: var(--accent);
  border-color: rgba(178, 137, 239, 0.2);
}

/* Music Player (Mobile Toggle) */
.music-player {
  position: fixed;
  bottom: 24px;
  right: 14px;
  z-index: 9999;
}

.mobile-controls {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: -1;
}

.mobile-ctrl {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(20, 20, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.5) translate(0, 0);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.mobile-ctrl svg { width: 18px; height: 18px; }

.music-player.expanded .mobile-ctrl {
  opacity: 1;
  pointer-events: auto;
}

.music-player.expanded #mobile-playlist   { transform: scale(1) translate(-85px, 0px);   transition-delay: 0.1s; }
.music-player.expanded #mobile-prev       { transform: scale(1) translate(-75px, -45px);  transition-delay: 0.15s; }
.music-player.expanded #mobile-play-pause { transform: scale(1) translate(-45px, -75px);  transition-delay: 0.2s; }
.music-player.expanded #mobile-next       { transform: scale(1) translate(0px, -85px);   transition-delay: 0.25s; }

.mobile-ctrl:active {
  transform: scale(0.9) !important;
  background: var(--accent);
  color: #fff;
}

.music-toggle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(25, 25, 30, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--accent3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  position: relative;
  padding: 0;
  outline: none;
  z-index: 2;
}

.music-player.expanded .music-toggle {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent2);
  transform: rotate(45deg);
}

.music-toggle:hover {
  transform: scale(1.1);
  background: rgba(178, 137, 239, 0.2);
  border-color: #b289ef;
  color: #fff;
  box-shadow: 0 0 25px rgba(178, 137, 239, 0.5);
}

.music-player.expanded .music-toggle:hover { transform: rotate(45deg) scale(1.1); }

.music-icon-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-waves {
  display: none;
  gap: 3.5px;
  height: 22px;
  align-items: center;
  justify-content: center;
}

.music-waves span {
  width: 3.5px;
  background: var(--accent);
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(178, 137, 239, 0.5);
  transform-origin: center;
}

.music-player.expanded .music-waves span { background: #fff; }

.music-waves span:nth-child(1) { height: 12px; animation: musicWaveInside 0.6s infinite alternate; }
.music-waves span:nth-child(2) { height: 22px; animation: musicWaveInside 0.8s infinite alternate 0.2s; }
.music-waves span:nth-child(3) { height: 16px; animation: musicWaveInside 0.7s infinite alternate 0.4s; }

@keyframes musicWaveInside {
  0%   { transform: scaleY(0.4); }
  100% { transform: scaleY(1);   }
}

.icon-muted {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  display: none;
}

.icon-muted .slash-line {
  stroke: var(--accent3);
  stroke-width: 2.5;
}

.music-player.expanded .icon-muted .slash-line { stroke: #fff; }

.music-toggle.playing {
  border-color: var(--accent);
  background: rgba(178, 137, 239, 0.12);
  color: #fff;
}
.music-toggle.playing .music-icon-wrap { filter: drop-shadow(0 0 5px var(--accent)); }
.music-toggle.playing .music-waves { display: flex; }
.music-toggle.playing .icon-muted  { display: none; }

.music-toggle.muted {
  border-color: rgba(255, 255, 255, 0.08);
  color: #b289ef;
}
.music-toggle.muted .music-waves { display: none; }
.music-toggle.muted .icon-muted  { display: block; }

@media (max-width: 480px) {
  .cover { height: 190px; }
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 24px;
  left: 14px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  background: rgba(15, 15, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  overflow: hidden;
  max-width: 54px;
  max-height: 54px;
}

body.is-mobile .bottom-nav,
body.is-mobile .music-toggle {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(20, 20, 25, 0.92) !important;
}

.bottom-nav.expanded {
  padding: 0 12px 0 0;
  max-width: 500px;
  max-height: 54px;
  gap: 8px;
}

.nav-toggle {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s;
  position: relative;
  z-index: 2;
}

.nav-toggle:hover { background: rgba(255, 255, 255, 0.08); }

.hamburger {
  width: 20px;
  height: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger span {
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav.expanded .hamburger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.bottom-nav.expanded .hamburger span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
.bottom-nav.expanded .hamburger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-items {
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translateX(-20px);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.bottom-nav.expanded .nav-items {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.nav-icon {
  display: none;
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.nav-item {
  color: var(--muted);
  text-decoration: none;
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 12px;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav-item.active { color: #b289ef; background: transparent; }

.nav-item.active .nav-icon {
  filter: drop-shadow(0 0 8px rgba(178, 137, 239, 0.8));
}

@media (min-width: 1025px) {
  .nav-item.active { position: relative; }
  .nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 2px;
    background: #e478ff;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(228, 120, 255, 0.6);
  }
}

@media (max-width: 1024px) {
  .bottom-nav {
    flex-direction: column-reverse;
    bottom: 24px;
    left: 14px;
  }
  
  .bottom-nav.expanded {
    max-width: 54px;
    max-height: 400px;
    padding: 0; 
    gap: 8px;
  }

  .nav-items {
    flex-direction: column;
    padding: 0;
    transform: translateY(20px);
    transform: translateX(0);
    gap: 10px;
    opacity: 0;
    align-items: center;
    width: 100%;
  }

  .bottom-nav.expanded .nav-items {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-text { display: none; }
  .nav-icon { display: block; width: 22px; height: 22px; }

  .nav-item {
    padding: 0;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

/* Mobile Playlist Modal */
.mobile-playlist-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

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

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: rgba(25, 25, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  transform: translateY(30px) scale(0.95);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.mobile-playlist-modal.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
}

.modal-header h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.modal-close {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.modal-close svg { width: 18px; height: 18px; }
.modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: rotate(90deg);
}

.modal-body {
  max-height: 400px;
  overflow-y: auto;
  padding: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.m-playlist-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 4px;
  border: 1px solid transparent;
}

.m-playlist-item:hover { background: rgba(255, 255, 255, 0.04); }
.m-playlist-item.active {
  background: rgba(178, 137, 239, 0.12);
  border-color: rgba(178, 137, 239, 0.2);
}

.m-item-index {
  font-family: 'Rubik', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  width: 20px;
}

.m-playlist-item.active .m-item-index { color: var(--accent); }

.m-item-info { flex: 1; min-width: 0; }

.m-item-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.m-item-artist {
  font-size: 0.72rem;
  color: var(--muted);
}

.m-playlist-item.active .m-item-name { color: var(--accent3); }

.m-item-playing {
  display: none;
  width: 12px;
  height: 12px;
}

.m-playlist-item.active .m-item-playing {
  display: block;
  color: var(--accent);
}

/* Page Loading Progress Bar */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent3));
  z-index: 10000;
  transition: width 0.4s cubic-bezier(0.1, 0.7, 1, 0.1);
  box-shadow: 0 0 10px var(--accent);
  pointer-events: none;
  width: 0%;
  opacity: 0;
}
.page-loader.loading {
  opacity: 1;
  width: 70%;
}
.page-loader.finished {
  width: 100% !important;
  transition: width 0.2s ease, opacity 0.3s 0.2s ease;
  opacity: 0;
}

/* --- Coming Soon Section (Info Page) --- */
.coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  width: 100%;
  text-align: center;
  padding: 20px;
  position: relative;
  z-index: 10;
  pointer-events: none;
}
.coming-soon h1 {
  font-family: 'Syne', sans-serif;
  font-size: 3rem;
  margin-bottom: 20px;
}

/* ── Projects Page Styles ── */

.projects-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
}

.projects-header {
  text-align: center;
  margin-bottom: 40px;
  animation: fadeUp 0.8s ease both;
}

.projects-header h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, var(--accent3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

/* ── Desktop Grid (Original 4 columns) ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  width: 100%;
  animation: fadeUp 0.8s 0.2s ease both;
}

.project-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 28px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
  height: 100%;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--accent) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.5s;
  z-index: 0;
}

.project-card:hover {
  transform: translateY(-12px);
  border-color: var(--border-hover);
  box-shadow: 0 30px 60px rgba(0,0,0,0.4), 0 0 20px rgba(178,137,239,0.15);
}

.project-card:hover::before {
  opacity: 0.08;
}

.platform-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
  transition: all 0.3s ease;
  cursor: default;
}

.platform-badge svg { width: 12px; height: 12px; fill: currentColor; }

.badge-android:hover {
  color: #3DDC84;
  background: rgba(61, 220, 132, 0.1);
  border-color: rgba(61, 220, 132, 0.3);
}
.badge-plugin:hover {
  color: #ff9f43;
  background: rgba(255, 159, 67, 0.1);
  border-color: rgba(255, 159, 67, 0.3);
}
.badge-proxy:hover {
  color: #fff;
  background: linear-gradient(90deg, rgba(0, 162, 211, 0.15), rgba(212, 160, 23, 0.15));
  border-color: rgba(255, 255, 255, 0.2);
}

.project-icon {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  z-index: 1;
}

.project-icon img {
  width: 90%;
  height: 90%;
  object-fit: cover;
  border-radius: 50%;
  border: none;
  display: block;
}

.icon-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  filter: blur(20px);
  opacity: 0.3;
  animation: morphGlow 8s linear infinite;
}

@keyframes morphGlow {
  0%, 100% { border-radius: 40% 60% 70% 30% / 40% 40% 60% 50%; }
  33% { border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%; }
  66% { border-radius: 40% 60% 30% 70% / 60% 30% 70% 40%; }
}

.glow-freesia { background: radial-gradient(circle, #fcd1d8, #ff69b4); }
.glow-ecolens { background: radial-gradient(circle, #d1ff98, #56ab2f); }
.glow-sudden  { background: radial-gradient(circle, #e0e0e0, #9370db); }
.glow-orbital { background: radial-gradient(circle, #ff3885, #ff1111); }

.project-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.project-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 300;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}

.lang-tag {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  background: rgba(178, 137, 239, 0.1);
  color: var(--accent);
  border-radius: 8px;
  border: 1px solid rgba(178, 137, 239, 0.15);
  transition: all 0.3s;
}

.repo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  color: #fff;
  text-decoration: none;
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.4s;
  position: relative;
  z-index: 1;
}

.repo-btn:hover {
  background: rgba(178, 137, 239, 0.12);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(178, 137, 239, 0.25);
  transform: scale(1.02);
  color: #fff;
}


/* ── Tablet View ── */
@media (max-width: 1200px) {
  .projects-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}

/* ── Mobile View (Slideshow) ── */
@media (max-width: 768px) {
  .projects-container {
    padding: 60px 0 100px;
    overflow-x: hidden;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .projects-header {
    padding: 0 32px;
    margin-bottom: 10px; 
    z-index: 10;
  }

  .projects-header h1 { font-size: 2.2rem; }

  .projects-grid {
    display: flex;
    overflow-x: hidden;
    scroll-snap-type: none;
    gap: 0;
    width: 100%;
    padding: 60px 0;
    margin-top: -40px;
    -webkit-overflow-scrolling: auto;
    scrollbar-width: none;
    transition: all 0.5s ease;
  }

  .project-card {
    flex: 0 0 68vw;
    margin: 0 16vw;
    scroll-snap-align: none;
    min-height: 360px; 
    max-height: 50vh;
    padding: 24px 20px 20px;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.5s ease;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.06) !important;
  }

  .project-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 12px;
  }

  .project-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
  }

  .project-desc {
    font-size: 0.82rem;
    margin-bottom: 12px;
    -webkit-line-clamp: 3;
    line-height: 1.4;
    color: rgba(240, 237, 247, 0.4);
  }

  .project-meta {
    justify-content: center;
    margin-bottom: 16px;
    gap: 6px;
  }

  .repo-btn {
    width: 100%;
    padding: 12px;
    font-size: 0.8rem;
    border-radius: 12px;
  }

  .platform-badge {
    top: 16px;
    right: 16px;
    font-size: 0.55rem;
    padding: 4px 10px;
  }

  /* ── Slider Controls ── */
  .slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: -20px;
    z-index: 20;
    animation: fadeIn 1s 0.4s ease both;
  }

  .slider-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  /* Optimization: Disable backdrop blur on mobile buttons */
  body.is-mobile .slider-btn {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.08) !important;
  }

  .slider-btn:active {
    transform: scale(0.9);
    background: rgba(178, 137, 239, 0.2);
    border-color: var(--accent);
  }

  .slider-btn svg {
    width: 20px;
    height: 20px;
    opacity: 0.8;
  }

  .pagination-dots {
    display: flex;
    gap: 10px;
    align-items: center;
  }

  .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  }

  .dot.active {
    background: var(--accent);
    transform: scale(1.4);
    box-shadow: 0 0 10px rgba(178, 137, 239, 0.5);
  }

  .icon-glow {
    animation: none !important;
    border-radius: 50% !important;
    opacity: 0.25;
  }
}

/* Hide controls on desktop */
@media (min-width: 769px) {
  .slider-controls { display: none; }
}

@media (max-width: 480px) {
  .projects-header h1 { font-size: 1.8rem; }
  .project-card { 
    flex: 0 0 70vw; 
    margin: 0 15vw; 
    padding: 24px 16px 16px;
    min-height: 340px;
  }
}
.coming-soon {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.coming-soon > * {
  pointer-events: auto;
}

/* ── Cyber Timer Styles ── */
.timer-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1.5rem;
  gap: 2.5rem;
  width: 100%;
  max-width: 800px;
  background: rgba(8, 8, 14, 0.4);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.timer-label-top {
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}

.timer-units {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  width: 100%;
}

.timer-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.timer-num {
  font-family: 'Space Mono', monospace;
  font-size: clamp(20px, 4.5vw, 48px);
  font-weight: 700;
  color: #fff;
  background: rgba(20, 20, 25, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  width: clamp(50px, 8vw, 86px);
  height: clamp(50px, 8vw, 86px);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  position: relative;
  overflow: hidden;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.timer-num::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
}

.timer-num.flash { 
  color: #d4a8ff; 
  border-color: rgba(212, 168, 255, 0.5);
  box-shadow: 0 0 20px rgba(212, 168, 255, 0.2);
}

.timer-unit-label {
  font-family: 'Syne', sans-serif;
  font-size: clamp(8px, 1.2vw, 11px);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  white-space: nowrap;
}

.timer-sep {
  font-family: 'Space Mono', monospace;
  font-size: clamp(20px, 4vw, 36px);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.1);
  padding: 0 clamp(2px, 0.5vw, 10px);
  margin-top: clamp(14px, 2.5vw, 24px);
  line-height: 1;
  flex-shrink: 0;
}

.timer-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.timer-total {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.timer-total-num {
  font-family: 'Space Mono', monospace;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.timer-total-label {
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.timer-progress-wrap {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timer-progress-bg {
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  overflow: hidden;
}

.timer-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #b289ef, #d4a8ff);
  box-shadow: 0 0 15px rgba(178, 137, 239, 0.5);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.timer-progress-meta {
  display: flex;
  justify-content: space-between;
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.06em;
}

@media (min-width: 769px) {
  .coming-soon {
    display: block; /* Disable flex for precise absolute positioning of child */
  }
  
  .timer-wrap {
    position: absolute;
    left: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(8, 8, 14, 0.3);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(10px);
    align-items: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.02);
    padding: 2.5rem;
    border-radius: 24px;
    padding-left: 2rem;
    max-width: 650px;
  }

  .timer-units {
    justify-content: flex-start;
  }

  .timer-label-top {
    text-align: left;
    width: 100%;
  }

  .timer-progress-wrap {
    max-width: 400px;
  }

  .timer-total {
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .timer-wrap {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0;
    background: transparent;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    gap: 1rem;
    width: 95%;
    max-width: 100%;
    align-items: center;
  }

  .timer-progress-wrap,
  .timer-divider,
  .timer-total {
    display: none;
  }

  .timer-label-top {
    font-size: 10px;
    letter-spacing: 0.15em;
    margin-bottom: -5px;
    opacity: 0.6;
    text-align: center;
  }

  .timer-units {
    gap: 0;
    justify-content: center;
  }

  .timer-unit {
    gap: 6px;
  }

  .timer-num {
    width: clamp(36px, 12vw, 42px);
    height: clamp(38px, 12vw, 46px);
    font-size: clamp(16px, 5vw, 22px);
    border-radius: 6px;
    background: rgba(20, 20, 25, 0.4);
    border-color: rgba(255, 255, 255, 0.05);
  }

  .timer-sep {
    font-size: clamp(14px, 4vw, 18px);
    padding: 0 1px;
    margin-top: clamp(12px, 4vw, 16px);
    opacity: 0.3;
  }

  .timer-unit-label {
    font-size: 8px;
    letter-spacing: 0.05em;
    opacity: 0.4;
  }
}
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

:root {
  --cp-purple: #b289ef;
  --cp-font: 'Share Tech Mono', monospace;
}

.cyber-settings-wrap {
  position: fixed;
  top: 24px;
  right: 14px;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52.400px;
  height: 52.400px;
  pointer-events: none;
}

.settings-toggle {
  width: 54px;
  height: 54px;
  background: rgba(25, 25, 30, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: #d4a8ff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  z-index: 2;
  padding: 0;
  overflow: hidden;
  pointer-events: auto;
}

.settings-toggle:hover {
  transform: scale(1.1);
  border-color: var(--cp-purple);
  color: #fff;
  box-shadow: 0 0 25px rgba(178, 137, 239, 0.3);
}

.settings-toggle.active {
  transform: rotate(90deg);
  color: #fff;
  border-color: var(--cp-purple);
  background: rgba(178, 137, 239, 0.2);
}

.settings-toggle svg {
  width: 26px;
  height: 26px;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.settings-menu {
  position: absolute;
  top: 0;
  right: 0;
  width: 54px;
  height: 54px;
  pointer-events: none;
}

.settings-item {
  position: absolute;
  right: 0;
  width: 40px;
  height: 40px;
  background: rgba(20, 20, 25, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(178, 137, 239, 0.4);
  border-radius: 20px;
  color: var(--cp-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  pointer-events: auto;
}

.cyber-settings-wrap.open .settings-item {
  opacity: 1;
  pointer-events: auto;
}

.settings-item.active {
  border-color: #fff;
  box-shadow: 0 0 12px rgba(212, 168, 255, 0.2);
  z-index: 10;
}

.settings-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.settings-slider-wrap {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, width 0.5s;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 0;
  overflow: hidden;
}

.settings-item.active .settings-slider-wrap {
  opacity: 1;
  pointer-events: auto;
  width: auto;
}

.s-slider {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  height: 2px;
  border-radius: 2px;
  outline: none;
  width: 80px;
}

.s-slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 5px rgba(212, 168, 255, 0.5);
}

.s-val {
  font-family: var(--cp-font);
  font-size: 10px;
  color: #fff;
  min-width: 25px;
  text-align: right;
}

/* ── Desktop Layout: Expand Left ── */
@media (min-width: 769px) {
  .cyber-settings-wrap.open #s-item-speed { transform: scale(1) translate(-85px, 10px); }
  .cyber-settings-wrap.open #s-item-brightness { transform: scale(1) translate(-70px, 70px); }
  .cyber-settings-wrap.open #s-item-distance { transform: scale(1) translate(-10px, 85px); }

  .settings-item.active {
    width: 180px;
    flex-direction: row; /* Normal flow: icon left, slider right */
    justify-content: flex-start;
    padding: 0 12px;
    transform-origin: right center; /* Crucial for expanding left when right: 0 is used */
    right: 0;
    /* If we use translate, we need to be careful. 
       Actually, if we want it to expand left, and it's already translated left,
       increasing width will expand it to the right unless we adjust translate or use right:0 anchor.
    */
  }

  /* To make it expand left correctly while maintaining the translated position:
     We keep the translate for the initial position.
     When active, we change the flex order and padding.
  */
  .settings-item.active {
    flex-direction: row-reverse; /* icon stays at right end of the expanded pill */
    justify-content: space-between;
  }
  
  .settings-item.active .settings-slider-wrap {
    margin-right: 10px;
  }
}

/* ── Mobile Layout: Bottom Center ── */
@media (max-width: 768px) {
  .cyber-settings-wrap {
    top: auto;
    bottom: 24px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 54px;
    height: 54px;
  }

  .settings-menu {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 54px;
    height: 54px;
  }

  .cyber-settings-wrap.open #s-item-speed { transform: scale(1) translate(-70px, -45px); }
  .cyber-settings-wrap.open #s-item-brightness { transform: scale(1) translate(0px, -90px); }
  .cyber-settings-wrap.open #s-item-distance { transform: scale(1) translate(70px, -45px); }

  .settings-item {
    right: 5px;
    bottom: 5px;
    width: 44px;
    height: 44px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .settings-item.active {
    height: 155px;
    width: 44px;
    flex-direction: column-reverse;
    padding: 12px 0;
    justify-content: space-between;
    align-items: center;
  }

  .settings-item svg {
    width: 20px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
  }

  .settings-slider-wrap {
    display: none;
    flex-direction: column-reverse;
    width: 100%;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
  }

  .settings-item.active .settings-slider-wrap {
    display: flex;
    height: 105px;
    opacity: 1;
  }

  .s-slider {
    width: 65px;
    height: 3px;
    transform: rotate(-90deg);
    margin: 32px 0; /* Align rotated slider */
    flex-shrink: 0;
  }

  .s-val {
    min-width: 0;
    text-align: center;
    width: 100%;
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 5px;
  }
}
