:root {
  --bg: #090713;
  --card: rgba(24, 20, 36, 0.76);
  --card-strong: rgba(31, 25, 45, 0.92);
  --text: #fff7ff;
  --muted: rgba(255, 247, 255, 0.68);
  --accent: #ff4fbd;
  --secondary: #8b5cf6;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: rgba(0, 0, 0, 0.32);
  --radius: 28px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* BACKGROUND */
#backgroundLayer {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(rgba(4, 5, 12, var(--bg-darkness, 0.48)), rgba(4, 5, 12, var(--bg-darkness, 0.48))),
    var(--site-bg-image),
    radial-gradient(circle at top left, rgba(139, 92, 246, 0.24), transparent 36%),
    radial-gradient(circle at bottom right, rgba(255, 79, 189, 0.22), transparent 40%),
    #080713;
  background-size: cover;
  background-position: center;
}

#backgroundLayer::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(5, 7, 18, 0.24), rgba(5, 7, 18, 0.84)),
    radial-gradient(circle at center, transparent 0 30%, rgba(0, 0, 0, 0.42));
}

#particleLayer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.72);
  animation: floatParticle linear infinite;
}

@keyframes floatParticle {
  0% {
    transform: translate3d(0, 110vh, 0) scale(0.8);
    opacity: 0;
  }
  10%, 80% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--x-drift), -20vh, 0) scale(1.2);
    opacity: 0;
  }
}

/* INTRO */
.intro-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.enter-button {
  border: 0;
  color: white;
  font-weight: 800;
  font-size: clamp(22px, 4vw, 42px);
  background: transparent;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.34);
  animation: introPulse 2.2s ease-in-out infinite;
}

@keyframes introPulse {
  0%, 100% {
    opacity: 0.72;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

/* LAYOUT */
.app {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 50px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(12, 10, 22, 0.66);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  box-shadow: 0 0 24px rgba(255, 79, 189, 0.35);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a,
.small-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  text-decoration: none;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  transition: 0.2s ease;
}

.nav a:hover,
.small-button:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.admin-button {
  background: linear-gradient(135deg, rgba(255, 79, 189, 0.25), rgba(139, 92, 246, 0.25));
}

.section-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  padding: clamp(18px, 3vw, 32px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent),
    var(--card);
  backdrop-filter: blur(18px);
  box-shadow: 0 22px 50px var(--shadow);
}

.section-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 16%, rgba(255, 255, 255, 0.09), transparent 14%),
    radial-gradient(circle at 82% 20%, rgba(255, 79, 189, 0.08), transparent 20%);
}

/* HERO */
.hero {
  padding: 0;
}

.hero-banner {
  height: clamp(150px, 26vw, 270px);
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.05), rgba(10, 8, 20, 0.72)),
    var(--banner-image),
    radial-gradient(circle at top left, var(--accent), transparent 42%),
    radial-gradient(circle at bottom right, var(--secondary), transparent 42%);
  background-size: cover;
  background-position: center;
}

.profile-row {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 22px;
  align-items: flex-end;
  padding: 0 clamp(18px, 3vw, 32px) clamp(18px, 3vw, 32px);
  margin-top: -56px;
}

.avatar-wrap {
  position: relative;
  flex: 0 0 auto;
}

.avatar {
  width: clamp(112px, 16vw, 160px);
  height: clamp(112px, 16vw, 160px);
  object-fit: cover;
  border-radius: 999px;
  border: 5px solid rgba(255, 255, 255, 0.88);
  box-shadow:
    0 0 0 6px rgba(255, 79, 189, 0.18),
    0 20px 42px rgba(0, 0, 0, 0.35);
}

.status-dot {
  position: absolute;
  right: 10px;
  bottom: 12px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffcf5c, #8b5cf6);
  border: 4px solid rgba(20, 16, 30, 0.96);
}

.profile-main {
  min-width: 0;
}

.name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 0.95;
}

.username-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--muted);
}

.tagline {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 800;
}

.bio {
  max-width: 720px;
  color: var(--muted);
  margin-bottom: 12px;
}

.badge-list,
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge,
.pill {
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.social-icon-row {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 clamp(18px, 3vw, 32px) clamp(20px, 3vw, 34px);
}

.social-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: white;
  text-decoration: none;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(255, 79, 189, 0.88), rgba(139, 92, 246, 0.82));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  transition: 0.2s ease;
  font-weight: 900;
}

.social-icon:hover {
  transform: translateY(-4px) rotate(-2deg);
}

/* HEADINGS */
.section-heading {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--accent);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
}

h2 {
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: 0;
}

.section-sparkle {
  font-size: 30px;
  color: var(--accent);
  animation: sparkleSpin 4s ease-in-out infinite;
}

@keyframes sparkleSpin {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(16deg) scale(1.15);
  }
}

/* LINKS */
.featured-links,
.link-grid {
  position: relative;
  z-index: 2;
}

.featured-links {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.featured-link {
  min-height: 96px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  color: white;
  text-decoration: none;
  background:
    linear-gradient(135deg, rgba(255, 79, 189, 0.28), rgba(139, 92, 246, 0.22)),
    rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.13);
  transition: 0.2s ease;
}

.featured-link:hover,
.link-button:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.28);
}

.link-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  font-weight: 900;
}

.link-title {
  font-weight: 900;
  font-size: 18px;
  margin-bottom: 4px;
}

.link-desc {
  color: var(--muted);
  font-size: 14px;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.link-button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 14px;
  border-radius: 22px;
  color: white;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: 0.2s ease;
}

/* ABOUT */
.about-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mini-card {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-card h3 {
  color: var(--accent);
  margin-bottom: 12px;
}

.mini-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mini-card li {
  margin-bottom: 8px;
  color: var(--text);
}

.words-grid {
  display: grid;
  gap: 12px;
}

.word-group strong {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
}

/* PROJECTS */
.project-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.project-card {
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent),
    rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card h3 {
  color: var(--accent);
}

.project-card p {
  color: var(--muted);
}

.skill-box {
  position: relative;
  z-index: 2;
  margin-top: 16px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.skill {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.075);
  text-align: center;
}

/* GALLERY */
.gallery-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.gallery-item {
  overflow: hidden;
  border-radius: 22px;
  min-height: 170px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.gallery-item p {
  padding: 12px;
  margin: 0;
  color: var(--muted);
}

/* FOOTER */
.footer {
  text-align: center;
  color: var(--muted);
  padding: 16px;
}

/* ADMIN */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(14px);
}

.admin-card {
  width: min(760px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(18, 16, 30, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
}

.admin-header h2 {
  font-size: 28px;
}

.admin-header p {
  color: var(--muted);
  margin: 4px 0 0;
}

.circle-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: white;
  font-size: 24px;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0 22px 14px;
}

.admin-tab {
  border: 0;
  color: white;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.admin-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
}

.admin-scroll {
  overflow-y: auto;
  padding: 0 22px 22px;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: grid;
  gap: 14px;
}

.admin-panel label {
  display: grid;
  gap: 8px;
  color: white;
  font-weight: 800;
}

.admin-panel input,
.admin-panel textarea,
.admin-panel select {
  width: 100%;
  color: white;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 13px;
  outline: none;
}

.admin-panel textarea {
  min-height: 110px;
  resize: vertical;
}

.toggle-label {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

.toggle-label input {
  width: auto;
}

.admin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-action,
.admin-danger,
.admin-save button {
  border: 0;
  color: white;
  padding: 12px 16px;
  border-radius: 16px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
}

.admin-danger {
  background: linear-gradient(135deg, #ef4444, #991b1b);
}

.admin-save {
  padding: 16px 22px 22px;
}

.admin-save button {
  width: 100%;
}

.link-editor-list {
  display: grid;
  gap: 12px;
}

.link-editor-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.link-editor-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.data-editor {
  min-height: 300px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.admin-note {
  color: var(--muted);
}

/* THEME VARIANTS */
body[data-theme-style="night"] {
  --accent: #83b7ff;
  --secondary: #6d5dfc;
}

body[data-theme-style="rose"] {
  --accent: #ff6fae;
  --secondary: #b45373;
}

body[data-theme-style="terminal"] {
  --accent: #ff2020;
  --secondary: #7f1d1d;
}

body[data-theme-style="soft"] {
  --accent: #f0a6ca;
  --secondary: #a7c7e7;
}

/* RESPONSIVE */
@media (max-width: 760px) {
  .app {
    width: min(100% - 18px, 1120px);
    padding-top: 10px;
  }

  .topbar {
    align-items: flex-start;
    border-radius: 24px;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
  }

  .nav a,
  .small-button {
    font-size: 13px;
    padding: 8px 10px;
  }

  .profile-row {
    align-items: flex-start;
    flex-direction: column;
    margin-top: -46px;
  }

  .avatar {
    width: 112px;
    height: 112px;
  }

  .link-grid,
  .about-grid,
  .project-grid,
  .skill-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item {
    min-height: auto;
  }

  .admin-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .link-editor-row {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   SETTINGS UI POLISH
   Better dropdowns, color pickers, buttons
   ========================================================= */

.admin-panel select,
.admin-panel input,
.admin-panel textarea {
  color: #fff !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04)),
    rgba(28, 25, 42, 0.98) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 8px 18px rgba(0,0,0,0.18);
}

.admin-panel select {
  color-scheme: dark;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.85) 50%),
    linear-gradient(135deg, rgba(255,255,255,0.85) 50%, transparent 50%),
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04)) !important;
  background-position:
    calc(100% - 22px) 50%,
    calc(100% - 15px) 50%,
    center !important;
  background-size:
    7px 7px,
    7px 7px,
    cover !important;
  background-repeat: no-repeat !important;
  padding-right: 48px !important;
}

.admin-panel select option {
  background: #171421 !important;
  color: #ffffff !important;
}

.admin-panel select option:hover,
.admin-panel select option:checked {
  background: var(--accent) !important;
  color: white !important;
}

.admin-panel input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  width: 96px !important;
  height: 52px !important;
  padding: 5px !important;
  border-radius: 16px !important;
  cursor: pointer;
  overflow: hidden;
}

.admin-panel input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.admin-panel input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 12px;
}

.admin-panel input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 12px;
}

.admin-panel input[type="range"] {
  accent-color: var(--accent);
  height: 40px;
}

.admin-save button,
.admin-action,
.small-button,
.enter-button {
  position: relative;
  overflow: hidden;
}

.admin-save button::before,
.admin-action::before,
.small-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.22),
    transparent
  );
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.admin-save button:hover::before,
.admin-action:hover::before,
.small-button:hover::before {
  transform: translateX(120%);
}

.admin-save button,
.admin-action {
  box-shadow:
    0 12px 24px rgba(0,0,0,0.25),
    0 0 24px rgba(255, 79, 189, 0.18);
  transition: 0.2s ease;
}

.admin-save button:hover,
.admin-action:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.nav a,
.small-button {
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 8px 18px rgba(0,0,0,0.16);
}

.link-button,
.featured-link,
.project-card,
.mini-card,
.gallery-item {
  position: relative;
  overflow: hidden;
}

.link-button::after,
.featured-link::after,
.project-card::after,
.mini-card::after,
.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,0.12), transparent 22%),
    linear-gradient(120deg, transparent, rgba(255,255,255,0.05), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.link-button:hover::after,
.featured-link:hover::after,
.project-card:hover::after,
.mini-card:hover::after,
.gallery-item:hover::after {
  opacity: 1;
}

/* =========================================================
   MORE THEME STYLES
   ========================================================= */

body[data-theme-style="dreamy"] {
  --bg: #090713;
  --card: rgba(24, 20, 36, 0.76);
  --card-strong: rgba(31, 25, 45, 0.92);
  --accent: #ff4fbd;
  --secondary: #8b5cf6;
}

body[data-theme-style="darkrose"] {
  --bg: #120711;
  --card: rgba(38, 18, 32, 0.78);
  --card-strong: rgba(48, 22, 39, 0.94);
  --accent: #ff72b6;
  --secondary: #9d4edd;
}

body[data-theme-style="midnight"] {
  --bg: #050918;
  --card: rgba(13, 22, 43, 0.80);
  --card-strong: rgba(16, 28, 55, 0.95);
  --accent: #83b7ff;
  --secondary: #6d5dfc;
}

body[data-theme-style="sakura"] {
  --bg: #110812;
  --card: rgba(41, 22, 38, 0.78);
  --card-strong: rgba(55, 27, 48, 0.94);
  --accent: #ff9ccc;
  --secondary: #d86ba9;
}

body[data-theme-style="candy"] {
  --bg: #120818;
  --card: rgba(38, 22, 50, 0.78);
  --card-strong: rgba(48, 28, 61, 0.94);
  --accent: #ff82dc;
  --secondary: #a78bfa;
}

body[data-theme-style="forest"] {
  --bg: #06110d;
  --card: rgba(12, 32, 25, 0.80);
  --card-strong: rgba(15, 43, 33, 0.94);
  --accent: #7ee7aa;
  --secondary: #4ade80;
}

body[data-theme-style="ocean"] {
  --bg: #031018;
  --card: rgba(8, 32, 48, 0.80);
  --card-strong: rgba(10, 43, 62, 0.94);
  --accent: #67e8f9;
  --secondary: #38bdf8;
}

body[data-theme-style="sunset"] {
  --bg: #150a12;
  --card: rgba(48, 25, 38, 0.80);
  --card-strong: rgba(61, 31, 45, 0.94);
  --accent: #fb7185;
  --secondary: #f59e0b;
}

body[data-theme-style="terminal"] {
  --bg: #090303;
  --card: rgba(36, 8, 8, 0.80);
  --card-strong: rgba(50, 10, 10, 0.95);
  --accent: #ff2525;
  --secondary: #7f1d1d;
}

body[data-theme-style="mono"] {
  --bg: #050505;
  --card: rgba(20, 20, 22, 0.82);
  --card-strong: rgba(28, 28, 32, 0.95);
  --accent: #e5e7eb;
  --secondary: #71717a;
}

body[data-theme-style="aurora"] {
  --bg: #061019;
  --card: rgba(12, 25, 42, 0.80);
  --card-strong: rgba(14, 32, 55, 0.94);
  --accent: #76f7d1;
  --secondary: #c084fc;
}

body[data-theme-style="cozy"] {
  --bg: #100907;
  --card: rgba(43, 27, 22, 0.80);
  --card-strong: rgba(57, 34, 26, 0.94);
  --accent: #f6b36d;
  --secondary: #c084fc;
}

/* theme-specific background glow */
body[data-theme-style="darkrose"] #backgroundLayer::after,
body[data-theme-style="sakura"] #backgroundLayer::after {
  background:
    radial-gradient(circle at 70% 20%, rgba(255, 120, 190, 0.18), transparent 30%),
    linear-gradient(to bottom, rgba(5, 7, 18, 0.18), rgba(5, 7, 18, 0.82));
}

body[data-theme-style="midnight"] #backgroundLayer::after,
body[data-theme-style="ocean"] #backgroundLayer::after {
  background:
    radial-gradient(circle at 30% 20%, rgba(80, 160, 255, 0.18), transparent 32%),
    linear-gradient(to bottom, rgba(5, 7, 18, 0.18), rgba(5, 7, 18, 0.84));
}

body[data-theme-style="terminal"] #backgroundLayer::after {
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 0, 0, 0.035) 0,
      rgba(255, 0, 0, 0.035) 1px,
      transparent 1px,
      transparent 4px
    ),
    linear-gradient(to bottom, rgba(10, 0, 0, 0.20), rgba(0, 0, 0, 0.88));
}

/* =========================================================
   BETTER PARTICLES
   ========================================================= */

.particle {
  position: absolute;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.78);
  text-shadow:
    0 0 10px rgba(255,255,255,0.65),
    0 0 22px rgba(255,255,255,0.22);
  animation: floatParticle linear infinite;
  user-select: none;
}

.particle-stars {
  color: rgba(255, 255, 255, 0.82);
}

.particle-sakura {
  color: rgba(255, 175, 215, 0.85);
  text-shadow:
    0 0 10px rgba(255, 120, 190, 0.5),
    0 0 22px rgba(255, 120, 190, 0.22);
  animation-name: floatPetal;
}

.particle-hearts {
  color: rgba(255, 115, 190, 0.82);
  text-shadow:
    0 0 10px rgba(255, 85, 180, 0.6),
    0 0 22px rgba(255, 85, 180, 0.25);
}

.particle-snow {
  color: rgba(235, 245, 255, 0.84);
  text-shadow:
    0 0 10px rgba(180, 220, 255, 0.55),
    0 0 22px rgba(180, 220, 255, 0.25);
  animation-name: floatSnow;
}

.particle-bubbles {
  color: rgba(180, 230, 255, 0.72);
  text-shadow:
    0 0 10px rgba(120, 220, 255, 0.55),
    0 0 22px rgba(120, 220, 255, 0.25);
  animation-name: floatBubble;
}

.particle-fireflies {
  color: rgba(255, 238, 150, 0.9);
  text-shadow:
    0 0 10px rgba(255, 220, 80, 0.8),
    0 0 24px rgba(255, 180, 40, 0.35);
  animation-name: floatFirefly;
}

@keyframes floatPetal {
  0% {
    transform: translate3d(0, 110vh, 0) rotate(0deg);
    opacity: 0;
  }

  10%, 80% {
    opacity: 1;
  }

  100% {
    transform: translate3d(var(--x-drift), -20vh, 0) rotate(var(--spin));
    opacity: 0;
  }
}

@keyframes floatSnow {
  0% {
    transform: translate3d(0, -10vh, 0);
    opacity: 0;
  }

  10%, 85% {
    opacity: 0.85;
  }

  100% {
    transform: translate3d(var(--x-drift), 110vh, 0);
    opacity: 0;
  }
}

@keyframes floatBubble {
  0% {
    transform: translate3d(0, 108vh, 0) scale(0.7);
    opacity: 0;
  }

  20%, 75% {
    opacity: 0.8;
  }

  100% {
    transform: translate3d(var(--x-drift), -20vh, 0) scale(1.25);
    opacity: 0;
  }
}

@keyframes floatFirefly {
  0% {
    transform: translate3d(0, 105vh, 0) scale(0.7);
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  50% {
    transform: translate3d(calc(var(--x-drift) / 2), 50vh, 0) scale(1.2);
    opacity: 0.55;
  }

  100% {
    transform: translate3d(var(--x-drift), -10vh, 0) scale(0.8);
    opacity: 0;
  }
}

.admin-card {
  max-height: min(92vh, 900px) !important;
}

.admin-scroll {
  max-height: 62vh !important;
  overflow-y: auto !important;
  padding-right: 8px !important;
}

.admin-scroll::-webkit-scrollbar {
  width: 10px;
}

.admin-scroll::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
}

.admin-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--accent), var(--secondary));
  border-radius: 999px;
}

.link-editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 4px;
}

.editor-button-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-mini-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  color: white;
  text-decoration: none;
  font-weight: 900;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06)),
    rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  transition: 0.2s ease;
}

.admin-mini-link:hover {
  transform: translateY(-1px);
  background:
    linear-gradient(135deg, var(--accent), var(--secondary));
}

.small-danger {
  padding: 8px 12px !important;
  border-radius: 999px !important;
}

@media (max-width: 760px) {
  .link-editor-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .editor-button-row {
    width: 100%;
  }

  .admin-mini-link,
  .small-danger {
    flex: 1;
  }
}

.admin-tabs {
  grid-template-columns: repeat(4, 1fr) !important;
}

@media (max-width: 760px) {
  .admin-tabs {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

.admin-panel h3 {
  margin: 4px 0 4px;
  color: var(--accent);
}

.link-editor-item textarea {
  min-height: 90px;
}

/* =========================================================
   CLEAN PARTICLES - NO BOXED FONT SYMBOLS
   ========================================================= */

#particleLayer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  overflow: hidden;
}

.particle {
  position: absolute;
  display: block;
  width: var(--size, 8px) !important;
  height: var(--size, 8px) !important;
  background: transparent !important;
  border-radius: 999px;
  opacity: 0;
  user-select: none;
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

/* soft star */
.particle-stars {
  animation: particleFloatUp linear infinite;
}

.particle-stars::before,
.particle-stars::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 100%;
  height: 22%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.85),
    0 0 18px rgba(255, 255, 255, 0.35);
}

.particle-stars::after {
  transform: rotate(90deg);
}

/* sakura petal */
.particle-sakura {
  width: calc(var(--size, 8px) * 1.4) !important;
  height: var(--size, 8px) !important;
  border-radius: 80% 20% 80% 30%;
  background: rgba(255, 170, 215, 0.82) !important;
  box-shadow:
    0 0 10px rgba(255, 120, 190, 0.45),
    0 0 18px rgba(255, 120, 190, 0.18) !important;
  animation: particlePetalFall linear infinite;
}

/* heart made with CSS */
.particle-hearts {
  width: var(--size, 9px) !important;
  height: var(--size, 9px) !important;
  background: rgba(255, 100, 185, 0.82) !important;
  transform: rotate(-45deg);
  border-radius: 2px;
  box-shadow:
    0 0 10px rgba(255, 90, 180, 0.48),
    0 0 20px rgba(255, 90, 180, 0.22) !important;
  animation: particleHeartFloat linear infinite;
}

.particle-hearts::before,
.particle-hearts::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: inherit;
  border-radius: 999px;
}

.particle-hearts::before {
  top: -50%;
  left: 0;
}

.particle-hearts::after {
  top: 0;
  left: 50%;
}

/* snow */
.particle-snow {
  width: calc(var(--size, 7px) * 0.75) !important;
  height: calc(var(--size, 7px) * 0.75) !important;
  background: rgba(235, 245, 255, 0.86) !important;
  border-radius: 999px;
  box-shadow:
    0 0 8px rgba(180, 220, 255, 0.65),
    0 0 18px rgba(180, 220, 255, 0.25) !important;
  animation: particleSnowFall linear infinite;
}

/* bubble */
.particle-bubbles {
  border: 1.5px solid rgba(165, 230, 255, 0.58);
  background: rgba(165, 230, 255, 0.08) !important;
  border-radius: 999px;
  box-shadow:
    0 0 10px rgba(120, 220, 255, 0.35),
    inset 0 0 8px rgba(255,255,255,0.16) !important;
  animation: particleBubbleRise linear infinite;
}

/* firefly */
.particle-fireflies {
  width: calc(var(--size, 7px) * 0.65) !important;
  height: calc(var(--size, 7px) * 0.65) !important;
  background: rgba(255, 238, 140, 0.95) !important;
  border-radius: 999px;
  box-shadow:
    0 0 10px rgba(255, 230, 100, 0.85),
    0 0 24px rgba(255, 180, 40, 0.45) !important;
  animation: particleFireflyDrift linear infinite;
}

/* animations */
@keyframes particleFloatUp {
  0% {
    transform: translate3d(0, 110vh, 0) rotate(0deg) scale(0.7);
    opacity: 0;
  }

  12%, 82% {
    opacity: 0.9;
  }

  100% {
    transform: translate3d(var(--x-drift), -20vh, 0) rotate(var(--spin)) scale(1.1);
    opacity: 0;
  }
}

@keyframes particlePetalFall {
  0% {
    transform: translate3d(0, -15vh, 0) rotate(0deg);
    opacity: 0;
  }

  12%, 84% {
    opacity: 0.85;
  }

  100% {
    transform: translate3d(var(--x-drift), 115vh, 0) rotate(var(--spin));
    opacity: 0;
  }
}

@keyframes particleHeartFloat {
  0% {
    transform: translate3d(0, 110vh, 0) rotate(-45deg) scale(0.75);
    opacity: 0;
  }

  15%, 80% {
    opacity: 0.88;
  }

  100% {
    transform: translate3d(var(--x-drift), -15vh, 0) rotate(calc(var(--spin) - 45deg)) scale(1.05);
    opacity: 0;
  }
}

@keyframes particleSnowFall {
  0% {
    transform: translate3d(0, -10vh, 0);
    opacity: 0;
  }

  10%, 88% {
    opacity: 0.82;
  }

  100% {
    transform: translate3d(var(--x-drift), 112vh, 0);
    opacity: 0;
  }
}

@keyframes particleBubbleRise {
  0% {
    transform: translate3d(0, 110vh, 0) scale(0.6);
    opacity: 0;
  }

  18%, 78% {
    opacity: 0.75;
  }

  100% {
    transform: translate3d(var(--x-drift), -20vh, 0) scale(1.3);
    opacity: 0;
  }
}

@keyframes particleFireflyDrift {
  0% {
    transform: translate3d(0, 105vh, 0) scale(0.7);
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  50% {
    transform: translate3d(calc(var(--x-drift) / 2), 50vh, 0) scale(1.25);
    opacity: 0.45;
  }

  100% {
    transform: translate3d(var(--x-drift), -10vh, 0) scale(0.75);
    opacity: 0;
  }
}

/* =========================================================
   CLICKABLE PROJECTS + SKILLS
   ========================================================= */

.project-card {
  color: var(--text);
  text-decoration: none;
}

.clickable-card,
.clickable-skill {
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.clickable-card:hover,
.clickable-skill:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 60%, white 20%);
  box-shadow:
    0 18px 35px rgba(0, 0, 0, 0.28),
    0 0 24px color-mix(in srgb, var(--accent) 28%, transparent);
  filter: brightness(1.08);
}

.card-open-hint {
  display: inline-flex;
  margin-top: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
}

.skill {
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
}

.field-help {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin-top: -4px;
}

/* =========================================================
   EXTRA THEME STYLES
   ========================================================= */

body[data-theme-style="vampire"] {
  --bg: #0d0208;
  --card: rgba(34, 8, 18, 0.82);
  --card-strong: rgba(48, 10, 25, 0.95);
  --accent: #ff3366;
  --secondary: #7f1d45;
}

body[data-theme-style="cyber"] {
  --bg: #060510;
  --card: rgba(24, 14, 40, 0.82);
  --card-strong: rgba(31, 18, 55, 0.95);
  --accent: #ff4fd8;
  --secondary: #00e5ff;
}

body[data-theme-style="witch"] {
  --bg: #090613;
  --card: rgba(21, 15, 36, 0.82);
  --card-strong: rgba(29, 20, 49, 0.95);
  --accent: #b4ff72;
  --secondary: #9d4edd;
}

body[data-theme-style="lavender"] {
  --bg: #100d19;
  --card: rgba(31, 26, 48, 0.82);
  --card-strong: rgba(41, 34, 61, 0.95);
  --accent: #d8b4fe;
  --secondary: #f0abfc;
}

body[data-theme-style="strawberry"] {
  --bg: #14070d;
  --card: rgba(44, 20, 31, 0.82);
  --card-strong: rgba(59, 25, 38, 0.95);
  --accent: #fb7185;
  --secondary: #f9a8d4;
}

body[data-theme-style="space"] {
  --bg: #020617;
  --card: rgba(10, 15, 35, 0.84);
  --card-strong: rgba(12, 18, 45, 0.96);
  --accent: #93c5fd;
  --secondary: #c084fc;
}

body[data-theme-style="gold"] {
  --bg: #100b04;
  --card: rgba(43, 31, 15, 0.82);
  --card-strong: rgba(61, 43, 19, 0.95);
  --accent: #facc15;
  --secondary: #fb923c;
}

/* =========================================================
   EXTRA PARTICLES
   ========================================================= */

.particle-moons {
  width: calc(var(--size, 10px) * 1.2) !important;
  height: calc(var(--size, 10px) * 1.2) !important;
  border-radius: 999px;
  background: rgba(255, 244, 210, 0.86) !important;
  box-shadow:
    inset -4px 0 0 rgba(10, 10, 25, 0.55),
    0 0 12px rgba(255, 244, 210, 0.58) !important;
  animation: particleFloatUp linear infinite;
}

.particle-diamonds {
  width: var(--size, 8px) !important;
  height: var(--size, 8px) !important;
  background: rgba(255, 255, 255, 0.78) !important;
  transform: rotate(45deg);
  border-radius: 2px;
  box-shadow:
    0 0 10px rgba(255,255,255,0.7),
    0 0 22px rgba(255,255,255,0.28) !important;
  animation: particleDiamondDrift linear infinite;
}

.particle-leaves {
  width: calc(var(--size, 8px) * 1.5) !important;
  height: var(--size, 8px) !important;
  border-radius: 80% 10% 80% 20%;
  background: rgba(125, 231, 170, 0.76) !important;
  box-shadow:
    0 0 12px rgba(74, 222, 128, 0.42) !important;
  animation: particlePetalFall linear infinite;
}

.particle-embers {
  width: calc(var(--size, 7px) * 0.7) !important;
  height: calc(var(--size, 7px) * 0.7) !important;
  border-radius: 999px;
  background: rgba(255, 173, 80, 0.94) !important;
  box-shadow:
    0 0 10px rgba(255, 140, 40, 0.85),
    0 0 24px rgba(255, 80, 20, 0.35) !important;
  animation: particleBubbleRise linear infinite;
}

.particle-rain {
  width: 2px !important;
  height: 18px !important;
  border-radius: 999px;
  background: linear-gradient(to bottom, transparent, rgba(150, 210, 255, 0.72)) !important;
  box-shadow: 0 0 10px rgba(120, 180, 255, 0.3) !important;
  animation: particleRainFall linear infinite;
}

.particle-pixels {
  width: var(--size, 6px) !important;
  height: var(--size, 6px) !important;
  border-radius: 2px;
  background: color-mix(in srgb, var(--accent) 70%, white 20%) !important;
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 50%, transparent) !important;
  animation: particlePixelFloat linear infinite;
}

@keyframes particleDiamondDrift {
  0% {
    transform: translate3d(0, 110vh, 0) rotate(45deg) scale(0.7);
    opacity: 0;
  }
  15%, 80% {
    opacity: 0.86;
  }
  100% {
    transform: translate3d(var(--x-drift), -20vh, 0) rotate(calc(var(--spin) + 45deg)) scale(1.1);
    opacity: 0;
  }
}

@keyframes particleRainFall {
  0% {
    transform: translate3d(0, -20vh, 0) rotate(12deg);
    opacity: 0;
  }
  12%, 80% {
    opacity: 0.65;
  }
  100% {
    transform: translate3d(var(--x-drift), 120vh, 0) rotate(12deg);
    opacity: 0;
  }
}

@keyframes particlePixelFloat {
  0% {
    transform: translate3d(0, 110vh, 0) scale(0.8);
    opacity: 0;
  }
  20%, 80% {
    opacity: 0.75;
  }
  100% {
    transform: translate3d(var(--x-drift), -20vh, 0) scale(1.2);
    opacity: 0;
  }
}

/* =========================================================
   CURSOR TRAILS
   ========================================================= */

.cursor-trail {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;
  width: 10px;
  height: 10px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: cursorTrailFade 0.85s ease-out forwards;
}

.cursor-sparkle,
.cursor-stars {
  background: white;
  clip-path: polygon(
    50% 0%,
    61% 38%,
    100% 50%,
    61% 62%,
    50% 100%,
    39% 62%,
    0% 50%,
    39% 38%
  );
  box-shadow:
    0 0 10px white,
    0 0 20px var(--accent);
}

.cursor-sakura {
  content: "❀";
  color: #ffc4f0;
  font-size: 18px;
  text-shadow: 0 0 14px rgba(255, 120, 210, 0.8);
}

.cursor-hearts {
  width: 10px;
  height: 10px;
  background: var(--accent);
  transform: translate(-50%, -50%) rotate(-45deg);
  border-radius: 2px;
  box-shadow: 0 0 16px var(--accent);
}

.cursor-hearts::before,
.cursor-hearts::after {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  border-radius: 999px;
}

.cursor-hearts::before {
  top: -50%;
}

.cursor-hearts::after {
  left: 50%;
}

.cursor-bubbles {
  border-radius: 999px;
  border: 1.5px solid rgba(170, 230, 255, 0.75);
  background: rgba(170, 230, 255, 0.12);
  box-shadow: 0 0 12px rgba(120, 220, 255, 0.5);
}

.cursor-fireflies {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 238, 140, 0.96);
  box-shadow:
    0 0 12px rgba(255, 230, 100, 0.9),
    0 0 26px rgba(255, 180, 40, 0.45);
}

@keyframes cursorTrailFade {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(-18px) scale(0.2);
  }
}

/* Hide admin from normal visitors */
.admin-button {
  display: none !important;
}

body.owner-mode .admin-button {
  display: inline-flex !important;
}

/* =========================================================
   MUSIC VOLUME HOVER CONTROL
   ========================================================= */

.music-control {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.volume-popover {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 220px;
  padding: 18px 14px 14px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04)),
    rgba(18, 16, 30, 0.96);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow:
    0 18px 40px rgba(0,0,0,0.38),
    0 0 22px color-mix(in srgb, var(--accent) 18%, transparent);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(-4px) scale(0.96);
  pointer-events: none;
  transition: 0.18s ease;
  z-index: 100;
}

.volume-popover::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 18px;
}

.music-control:hover .volume-popover,
.music-control:focus-within .volume-popover {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.volume-popover label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.volume-popover input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

#musicVolumeText {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

@media (max-width: 760px) {
  .volume-popover {
    left: 0;
    right: auto;
  }
}

/* =========================================================
   CUSTOM CARD OPACITY + NAME COLOR
   ========================================================= */

:root {
  --card-opacity: 0.76;
  --name-color: #fff7ff;
}

.section-card,
.admin-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent),
    rgba(24, 20, 36, var(--card-opacity)) !important;
}

.mini-card,
.project-card,
.skill-box,
.gallery-item,
.link-button,
.featured-link {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), transparent),
    rgba(255, 255, 255, calc(var(--card-opacity) * 0.11)) !important;
}

#displayName {
  color: var(--name-color) !important;
  text-shadow:
    0 0 18px color-mix(in srgb, var(--name-color) 32%, transparent),
    0 3px 18px rgba(0,0,0,0.34);
}

/* =========================================================
   PROFILE PICTURE DECOR
   ========================================================= */

.avatar-wrap::before,
.avatar-wrap::after {
  pointer-events: none;
}

body[data-avatar-decor="none"] .avatar-wrap::before,
body[data-avatar-decor="none"] .avatar-wrap::after {
  display: none !important;
}

body[data-avatar-decor="softRing"] .avatar {
  border-color: color-mix(in srgb, var(--accent) 45%, white 55%) !important;
  box-shadow:
    0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent),
    0 0 28px color-mix(in srgb, var(--accent) 28%, transparent),
    0 20px 42px rgba(0,0,0,0.35) !important;
}

body[data-avatar-decor="moon"] .avatar-wrap::after {
  content: "☾";
  position: absolute;
  right: -2px;
  bottom: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff7d6;
  font-size: 25px;
  background: rgba(18, 16, 30, 0.88);
  border: 3px solid color-mix(in srgb, var(--accent) 45%, white 30%);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 40%, transparent);
}

body[data-avatar-decor="cat"] .avatar-wrap::before {
  content: "";
  position: absolute;
  left: 18px;
  top: -11px;
  width: 32px;
  height: 32px;
  background: color-mix(in srgb, var(--accent) 72%, white 20%);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  filter: drop-shadow(72px 0 0 color-mix(in srgb, var(--accent) 72%, white 20%));
  z-index: 3;
}

body[data-avatar-decor="stars"] .avatar-wrap::before {
  content: "✦ ✧ ✦";
  position: absolute;
  left: -15px;
  right: -15px;
  top: -24px;
  text-align: center;
  color: color-mix(in srgb, var(--accent) 70%, white 30%);
  font-size: 22px;
  letter-spacing: 16px;
  text-shadow:
    0 0 12px color-mix(in srgb, var(--accent) 60%, transparent),
    0 0 28px color-mix(in srgb, var(--accent) 30%, transparent);
  animation: avatarStarsFloat 2.2s ease-in-out infinite;
}

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

body[data-avatar-decor="sakura"] .avatar-wrap::before {
  content: "✿";
  position: absolute;
  left: -8px;
  top: 8px;
  color: #ffaad7;
  font-size: 30px;
  text-shadow:
    94px 8px #ffd1e8,
    76px 92px #ff9ccc,
    4px 86px #ffd1e8,
    0 0 16px rgba(255, 120, 190, 0.55);
  animation: avatarSakuraSpin 5s linear infinite;
}

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

body[data-avatar-decor="crown"] .avatar-wrap::before {
  content: "♛";
  position: absolute;
  left: 50%;
  top: -34px;
  transform: translateX(-50%) rotate(-8deg);
  color: #ffe58a;
  font-size: 42px;
  text-shadow:
    0 0 12px rgba(255, 218, 90, 0.75),
    0 0 28px rgba(255, 180, 40, 0.34);
  z-index: 4;
}

.gallery-item {
  position: relative;
  color: var(--text);
  text-decoration: none;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 55%, white 20%);
  box-shadow:
    0 18px 35px rgba(0,0,0,0.26),
    0 0 24px color-mix(in srgb, var(--accent) 25%, transparent);
}

.gallery-open {
  position: absolute;
  right: 12px;
  bottom: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  opacity: 0;
  transform: translateY(4px);
  transition: 0.18s ease;
}

.gallery-item:hover .gallery-open {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   PROFILE HEADER POSITION FIX
   ========================================= */

.profile-main {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  position: relative;
}

.profile-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 26px;
  transform: translateY(14px);
}

#displayName {
  margin: 0;
  line-height: 0.9;
}

.profile-tagline,
.profile-bio,
.profile-tags,
.profile-socials {
  position: relative;
  top: 4px;
}

@media (max-width: 900px) {
  .profile-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-copy {
    transform: translateY(0);
    padding-top: 10px;
  }
}
/* PROFILE TEXT POSITION FIX */
.profile-row {
  align-items: center !important;
  margin-top: -38px !important;
}

.profile-main {
  padding-top: 52px !important;
  transform: translateY(18px);
}

.name-row {
  align-items: center !important;
}

#displayName {
  line-height: 0.95 !important;
  margin-bottom: 6px !important;
}

@media (max-width: 760px) {
  .profile-row {
    margin-top: -30px !important;
  }

  .profile-main {
    padding-top: 14px !important;
    transform: translateY(0);
  }
}

/* AVATAR BUBBLE CUSTOMIZATION */
:root {
  --avatar-bubble-color: #f3ff88;
}

.avatar-bubble {
  position: absolute;
  right: -2px;
  bottom: 12px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  z-index: 20;
  border: 4px solid #24192f;
  background: var(--avatar-bubble-color);
  box-shadow:
    0 0 0 2px rgba(255,255,255,0.12),
    0 10px 18px rgba(0,0,0,0.35);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.avatar-bubble::before {
  font-size: 13px;
  color: white;
  line-height: 1;
  z-index: 2;
}

body[data-avatar-bubble-icon="none"] .avatar-bubble::before { content: ""; }
body[data-avatar-bubble-icon="moon"] .avatar-bubble::before { content: "☾"; }
body[data-avatar-bubble-icon="heart"] .avatar-bubble::before { content: "♥"; }
body[data-avatar-bubble-icon="star"] .avatar-bubble::before { content: "★"; }
body[data-avatar-bubble-icon="flower"] .avatar-bubble::before { content: "✿"; }
body[data-avatar-bubble-icon="sparkle"] .avatar-bubble::before { content: "✦"; }
body[data-avatar-bubble-icon="music"] .avatar-bubble::before { content: "♪"; }

body[data-avatar-bubble-style="none"] .avatar-bubble {
  display: none !important;
}

body[data-avatar-bubble-style="gradient"] .avatar-bubble {
  background: linear-gradient(135deg, var(--avatar-bubble-color), var(--secondary));
}

body[data-avatar-bubble-style="glossy"] .avatar-bubble {
  background: linear-gradient(180deg, #fff6ff, var(--avatar-bubble-color));
}

body[data-avatar-bubble-style="glossy"] .avatar-bubble::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 5px;
  width: 14px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.46);
}

body[data-avatar-bubble-style="pearl"] .avatar-bubble {
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.95), transparent 42%),
    linear-gradient(135deg, #ffe9ff, var(--avatar-bubble-color));
}

body[data-avatar-bubble-style="moon"] .avatar-bubble {
  background: linear-gradient(135deg, #2a2235, #7e68c8);
}

body[data-avatar-bubble-style="flower"] .avatar-bubble {
  background: linear-gradient(135deg, #ffb7dc, #ff7ac3);
}

body[data-avatar-bubble-style="heart"] .avatar-bubble {
  background: linear-gradient(135deg, #ff6ea8, #ffb0df);
}

body[data-avatar-bubble-style="spark"] .avatar-bubble {
  background: linear-gradient(135deg, #8f6fff, #f4c2ff);
  box-shadow:
    0 0 0 2px rgba(255,255,255,0.12),
    0 0 16px rgba(180,130,255,0.62),
    0 10px 18px rgba(0,0,0,0.35);
}

body[data-avatar-bubble-style="miniRing"] .avatar-bubble {
  background: #21162d;
  border-color: color-mix(in srgb, var(--accent) 55%, white 20%);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent),
    0 10px 18px rgba(0,0,0,0.35);
}

/* EXTRA AVATAR FRAMES USING YOUR EXISTING avatarDecor NAME */
body[data-avatar-decor="ribbon"] .avatar {
  border: 8px double rgba(255, 230, 245, 0.9) !important;
  box-shadow:
    0 0 0 7px rgba(255, 180, 220, 0.12),
    0 16px 30px rgba(0,0,0,0.35) !important;
}

body[data-avatar-decor="cloud"] .avatar-wrap::before {
  content: "☁";
  position: absolute;
  font-size: 32px;
  color: #f8f6ff;
  left: -10px;
  bottom: 10px;
  text-shadow:
    94px 10px #f8f6ff,
    50px -100px #f1ebff;
  z-index: 10;
}

body[data-avatar-decor="pixel"] .avatar {
  border: 8px solid #f1d8ff !important;
  box-shadow:
    0 0 0 4px #52326b,
    0 0 0 8px #f1d8ff,
    0 16px 30px rgba(0,0,0,0.35) !important;
}

body[data-avatar-decor="rose"] .avatar-wrap::before {
  content: "✦";
  position: absolute;
  left: -6px;
  top: 8px;
  font-size: 24px;
  color: #a01448;
  text-shadow:
    100px 12px #a01448,
    5px 104px #55001d,
    95px 96px #c11b5c;
  z-index: 10;
}

body[data-avatar-decor="rose"] .avatar {
  border: 6px solid #5d2840 !important;
  box-shadow:
    0 0 0 7px rgba(180, 40, 90, 0.12),
    0 0 22px rgba(180, 40, 90, 0.3),
    0 16px 30px rgba(0,0,0,0.35) !important;
}

body[data-avatar-decor="orbit"] .avatar-wrap::before {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 999px;
  border: 2px dashed color-mix(in srgb, var(--accent) 65%, white 10%);
  animation: orbitSpin 8s linear infinite;
  z-index: 10;
}

body[data-avatar-decor="orbit"] .avatar {
  border: 6px solid rgba(255,255,255,0.65) !important;
  box-shadow:
    0 0 0 7px rgba(255, 90, 180, 0.12),
    0 0 22px rgba(255, 90, 180, 0.35),
    0 16px 30px rgba(0,0,0,0.35) !important;
}

body[data-avatar-decor="pearl"] .avatar {
  border: 7px solid #fff3ff !important;
  box-shadow:
    inset 0 0 18px rgba(255,255,255,0.2),
    0 0 0 7px rgba(255,255,255,0.13),
    0 0 24px rgba(255,220,255,0.35),
    0 16px 30px rgba(0,0,0,0.35) !important;
}

body[data-avatar-decor="double"] .avatar {
  border: 5px solid rgba(255,255,255,0.86) !important;
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--accent) 34%, transparent),
    0 0 0 11px color-mix(in srgb, var(--secondary) 20%, transparent),
    0 16px 30px rgba(0,0,0,0.35) !important;
}

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

/* =========================================================
   HERO PROFILE LAYOUT - LESS CRAMPED
   name left, username under it, tagline + bio middle,
   badges on the right
   ========================================================= */

.profile-row {
  align-items: center !important;
  gap: 22px !important;
  margin-top: -42px !important;
  padding-bottom: 26px !important;
}

.profile-main {
  flex: 1 1 auto !important;
  min-width: 0 !important;

  display: grid !important;
  grid-template-columns: minmax(190px, 260px) auto minmax(260px, 1fr) minmax(230px, auto);
  grid-template-areas:
    "name name name badges"
    "username tagline bio badges";
  column-gap: 12px;
  row-gap: 8px;

  align-items: center;
  padding-top: 34px !important;
  transform: translateY(8px) !important;
}

.name-row {
  display: contents !important;
}

#displayName {
  grid-area: name;
  margin: 0 !important;
  line-height: 0.95 !important;
  white-space: nowrap;
}

#usernameBadge {
  grid-area: username;
  width: fit-content;
  max-width: 220px;
  margin-top: 2px;
}

.tagline {
  grid-area: tagline;
  width: fit-content;
  max-width: 150px;
  margin: 0 !important;
  padding: 8px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, white 8%);
  line-height: 1.05;
  text-align: center;
}

.bio {
  grid-area: bio;
  max-width: 360px !important;
  margin: 0 !important;
  line-height: 1.45;
}

.badge-list {
  grid-area: badges;
  justify-self: end;
  align-self: center;

  display: grid !important;
  grid-template-columns: repeat(3, max-content);
  gap: 9px;
  max-width: 310px;
}

.badge {
  white-space: nowrap;
  text-align: center;
}

/* keep social buttons below and not pushed weirdly */
.social-icon-row {
  padding-top: 2px !important;
  padding-left: clamp(18px, 3vw, 32px) !important;
}

/* tablet fallback */
@media (max-width: 980px) {
  .profile-main {
    grid-template-columns: minmax(180px, auto) 1fr;
    grid-template-areas:
      "name name"
      "username username"
      "tagline bio"
      "badges badges";
    padding-top: 16px !important;
  }

  .badge-list {
    justify-self: start;
    grid-template-columns: repeat(3, max-content);
  }

  .bio {
    max-width: 100% !important;
  }
}

/* phone fallback */
@media (max-width: 760px) {
  .profile-row {
    margin-top: -34px !important;
    align-items: flex-start !important;
  }

  .profile-main {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    transform: none !important;
    padding-top: 8px !important;
  }

  .name-row {
    display: flex !important;
  }

  #displayName,
  #usernameBadge,
  .tagline,
  .bio,
  .badge-list {
    grid-area: unset;
  }

  .badge-list {
    display: flex !important;
    justify-self: start;
    max-width: 100%;
  }
}

/* =========================================================
   HERO CLEAN LAYOUT: bio above, badges beside socials
   ========================================================= */

.profile-row {
  align-items: center !important;
  margin-top: -46px !important;
  padding-bottom: 10px !important;
}

.profile-main {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(180px, auto) 1fr;
  grid-template-areas:
    "name name"
    "tagline bio";
  column-gap: 18px;
  row-gap: 8px;
  align-items: center !important;
  padding-top: 32px !important;
  transform: translateY(6px) !important;
}

.name-row {
  grid-area: name;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

#displayName {
  margin: 0 !important;
  line-height: 0.95 !important;
}

#usernameBadge {
  transform: translateY(4px);
}

.tagline {
  grid-area: tagline;
  width: fit-content;
  max-width: 145px;
  margin: 0 !important;
  padding: 8px 12px;
  border-radius: 999px;
  text-align: center;
  line-height: 1.1;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, white 8%);
}

.bio {
  grid-area: bio;
  max-width: 420px !important;
  margin: 0 !important;
  line-height: 1.45;
}

.profile-lower-row {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 0 clamp(18px, 3vw, 32px) 26px;
  margin-left: calc(clamp(112px, 16vw, 160px) + 22px);
}

.profile-lower-row .social-icon-row {
  padding: 0 !important;
}

.profile-lower-row .badge-list {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 520px;
}

.profile-lower-row .badge {
  white-space: nowrap;
}

/* Tablet */
@media (max-width: 980px) {
  .profile-main {
    grid-template-columns: 1fr;
    grid-template-areas:
      "name"
      "tagline"
      "bio";
    padding-top: 16px !important;
  }

  .profile-lower-row {
    margin-left: 0;
  }
}

/* Phone */
@media (max-width: 760px) {
  .profile-row {
    margin-top: -36px !important;
  }

  .profile-main {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start !important;
    transform: none !important;
    padding-top: 10px !important;
  }

  .name-row {
    flex-wrap: wrap;
  }

  .profile-lower-row {
    margin-left: 0;
    padding-top: 8px;
  }
}

/* PERFORMANCE HELPERS */
.particle,
.cursor-trail {
  will-change: transform, opacity;
}

@media (max-width: 760px) {
  .section-card,
  .topbar,
  .admin-card {
    backdrop-filter: blur(8px) !important;
  }

  .particle {
    animation-duration: 18s !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .particle,
  .cursor-trail,
  .section-sparkle {
    animation: none !important;
  }
}

/* EXTRA CURSOR TRAILS */
.cursor-butterflies::before {
  content: "ʚɞ";
  color: #ffc4f0;
  font-size: 18px;
  text-shadow: 0 0 14px rgba(255, 120, 210, 0.8);
}

.cursor-music::before {
  content: "♪";
  color: var(--accent);
  font-size: 18px;
  text-shadow: 0 0 14px color-mix(in srgb, var(--accent) 70%, transparent);
}

.cursor-paw::before {
  content: "🐾";
  font-size: 14px;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.4));
}

.cursor-candy::before {
  content: "●";
  color: #ff9ad8;
  font-size: 13px;
  text-shadow:
    8px 0 #9ad8ff,
    -8px 0 #fff28a,
    0 0 14px rgba(255,255,255,0.6);
}

.cursor-clouds::before {
  content: "☁";
  color: #f7f2ff;
  font-size: 18px;
  text-shadow: 0 0 14px rgba(210, 200, 255, 0.7);
}

/* CHANGELOGS */
.changelog-list {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 12px;
}

.changelog-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), transparent),
    rgba(255,255,255, calc(var(--card-opacity) * 0.10));
  border: 1px solid rgba(255,255,255,0.12);
}

.changelog-date {
  width: fit-content;
  height: fit-content;
  padding: 8px 10px;
  border-radius: 999px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
}

.changelog-item h3 {
  margin: 0 0 6px;
  color: var(--accent);
}

.changelog-item p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 760px) {
  .changelog-item {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   ABOUT INTRO BOX
   ========================================================= */

.about-intro-card {
  position: relative;
  z-index: 2;
  margin-bottom: 14px;
  padding: 18px 20px;
  border-radius: 24px;
  color: var(--text);
  line-height: 1.55;
  font-weight: 700;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.10), transparent),
    rgba(255, 255, 255, calc(var(--card-opacity, 0.76) * 0.11));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.about-intro-card:empty {
  display: none;
}

/* =========================================================
   BETTER SAKURA CURSOR TRAIL
   ========================================================= */

.cursor-sakura {
  width: 18px !important;
  height: 18px !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: translate(-50%, -50%) rotate(var(--sakura-rot, 0deg)) !important;
}

.cursor-sakura::before,
.cursor-sakura::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 7px;
  border-radius: 90% 10% 90% 25%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.75), transparent 34%),
    linear-gradient(135deg, #ffd2e8, #ff8ec8);
  box-shadow:
    0 0 8px rgba(255, 130, 200, 0.65),
    0 0 18px rgba(255, 90, 180, 0.25);
}

.cursor-sakura::before {
  left: 2px;
  top: 4px;
  transform: rotate(-28deg);
}

.cursor-sakura::after {
  right: 1px;
  bottom: 3px;
  transform: rotate(38deg);
}

.cursor-sakura {
  animation: sakuraCursorFade 0.9s ease-out forwards !important;
}

@keyframes sakuraCursorFade {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0) rotate(0deg) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(22px) rotate(70deg) scale(0.25);
  }
}