:root {
  --bg: #101013;
  --accent: #74000e;
  --fg: #ffffff;
  --card-bg: rgba(0, 0, 0, 0.6);
  --card-blur: 10px;
  --card-border: rgba(255, 255, 255, 0.08);
  --border-width: 2px;
  --border-radius: 0.3rem;
  --glow: 0 0 24px rgba(116, 0, 14, 0.55);
  --glow-strong: 0 0 36px rgba(116, 0, 14, 0.8);
  --font: "Mali", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --cursor-size: 48px;
}

*, *::before, *::after { cursor: none !important; }

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--cursor-size);
  height: var(--cursor-size);
  pointer-events: none;
  z-index: 300;
  opacity: 0;
  transition: opacity 180ms ease-out;
  will-change: transform;
}

.custom-cursor.visible { opacity: 1; }

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

html {
  width: 100%;
  height: 100%;
  background: var(--bg);
}

body {
  width: 100%;
  height: 100%;
  background: transparent;
  color: var(--fg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

::selection { background: var(--bg); color: var(--accent); }

#background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(12px);
  z-index: 0;
}

.sparkles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

#app {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  opacity: 0;
  transition: opacity 500ms ease-out;
  z-index: 2;
  perspective: 1400px;
}

#app.visible { opacity: 1; }
#app[hidden] { display: none; }

/* ---- splash ---- */

#splash {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: pointer;
  transition: opacity 400ms ease-out;
}

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

.splash-text {
  font-family: var(--font);
  font-size: 2rem;
  font-weight: 600;
  color: var(--fg);
  text-shadow: 0 0 18px rgba(116, 0, 14, 0.55);
  animation: splash-pulse 3s ease-in-out infinite;
  text-align: center;
  padding: 0 24px;
}

@keyframes splash-pulse {
  0%, 100% { opacity: 0.85; text-shadow: 0 0 14px rgba(116, 0, 14, 0.4); }
  50%      { opacity: 1;    text-shadow: 0 0 28px rgba(116, 0, 14, 0.75); }
}

/* ---- tilt group (wraps card-stack + music-player so they tilt together) ---- */

.tilt-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 420px;
  transform-style: preserve-3d;
  transition: transform 120ms ease-out;
}

/* ---- card-stack and faces (3D flip, nested inside tilt-group) ---- */

.card-stack {
  position: relative;
  width: 100%;
  max-width: 420px;
  perspective: 1600px;
  transform-style: preserve-3d;
  transition: transform 0.7s ease-in-out;
}

.card-stack.flipped-projects { transform: rotateY(180deg); }
.card-stack.flipped-crypto   { transform: rotateY(-180deg); }

.face {
  display: flex;
  flex-direction: column;
  gap: 10px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.face.back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
}

/* ---- card base style (shared) ---- */

.profile-card,
.discord-card,
.projects-card,
.crypto-card,
.music-player {
  background: var(--card-bg);
  backdrop-filter: blur(var(--card-blur));
  -webkit-backdrop-filter: blur(var(--card-blur));
  border: var(--border-width) solid var(--card-border);
  border-radius: var(--border-radius);
  box-shadow: var(--glow);
  color: var(--fg);
  transition: box-shadow 300ms ease-out;
}

.profile-card:hover,
.discord-card:hover,
.projects-card:hover,
.crypto-card:hover,
.music-player:hover {
  box-shadow: var(--glow-strong);
}

/* ---- profile card ---- */

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0 16px;
  overflow: hidden;
}

.profile-card .banner {
  width: 100%;
  height: 116px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.profile-card .pfp {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
  margin-top: -52px;
  box-shadow: 0 0 18px rgba(116, 0, 14, 0.55);
}

.name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 1.6rem;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(116, 0, 14, 0.7);
}

.bio {
  margin-top: 4px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.82);
  min-height: 1.3em;
}

.bio .cursor {
  display: inline-block;
  margin-left: 2px;
  animation: blink 1s steps(2) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.socials {
  display: flex;
  gap: 14px;
  margin-top: 12px;
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg);
  transition: background 200ms, transform 200ms, box-shadow 200ms;
}

.socials a:hover {
  background: rgba(116, 0, 14, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(116, 0, 14, 0.7);
}

.socials svg {
  width: 18px;
  height: 18px;
}

.flip-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 16px;
  margin-top: 14px;
}

.flip-link {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color 200ms;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.flip-link:hover { color: var(--accent); }

.flip-icon {
  width: 14px;
  height: 14px;
}

/* ---- music player ---- */

.music-player {
  width: 100%;
  max-width: 420px;
  padding: 10px 14px;
}

.song-title {
  font-size: 0.95rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  padding: 2px 0 8px;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-controls button {
  background: transparent;
  border: none;
  color: var(--fg);
  cursor: pointer;
  font-size: 1rem;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 200ms, box-shadow 200ms;
}

.player-controls button:hover {
  background: rgba(116, 0, 14, 0.35);
  box-shadow: 0 0 12px rgba(116, 0, 14, 0.6);
}

.progress-wrap {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(116, 0, 14, 0.8);
  transition: width 100ms linear;
}

.time-display {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.65);
  min-width: 70px;
  text-align: right;
}

/* ---- discord card ---- */

.discord-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  min-height: 62px;
}

.discord-placeholder {
  width: 100%;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

.discord-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.discord-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.discord-tag {
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #3ccf60;  /* green text for the handle — matches the reference screenshot */
}

.discord-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}

.discord-activity {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discord-button {
  flex-shrink: 0;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fg);
  background: transparent;
  border: 1px solid rgba(116, 0, 14, 0.6);
  border-radius: 4px;
  text-decoration: none;
  transition: background 200ms, box-shadow 200ms, border-color 200ms;
}

.discord-button:hover {
  background: rgba(116, 0, 14, 0.35);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(116, 0, 14, 0.7);
}

/* ---- projects card ---- */

.projects-card {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  min-height: 160px;
}

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

.projects-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.projects-list::-webkit-scrollbar { width: 4px; }
.projects-list::-webkit-scrollbar-thumb { background: rgba(116, 0, 14, 0.5); border-radius: 2px; }

.project-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  color: var(--fg);
  text-decoration: none;
  transition: background 200ms, border-color 200ms, box-shadow 200ms;
}

.project-tile:hover {
  background: rgba(116, 0, 14, 0.25);
  border-color: rgba(116, 0, 14, 0.6);
  box-shadow: 0 0 12px rgba(116, 0, 14, 0.5);
}

.project-tile-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.project-tile-desc {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.35;
}

/* ---- crypto card ---- */

.crypto-card {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  min-height: 160px;
}

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

.crypto-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.crypto-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.crypto-list::-webkit-scrollbar { width: 4px; }
.crypto-list::-webkit-scrollbar-thumb { background: rgba(116, 0, 14, 0.5); border-radius: 2px; }

.crypto-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  transition: background 200ms, border-color 200ms, box-shadow 200ms;
}

.crypto-tile:hover {
  background: rgba(116, 0, 14, 0.25);
  border-color: rgba(116, 0, 14, 0.6);
  box-shadow: 0 0 12px rgba(116, 0, 14, 0.5);
}

.crypto-tile-name {
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.crypto-tile-symbol {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 400;
}

.crypto-tile-address {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  font-family: monospace;
  word-break: break-all;
  line-height: 1.35;
  cursor: pointer;
  transition: color 200ms;
}

.crypto-tile-address:hover {
  color: rgba(255, 255, 255, 0.85);
}

.crypto-tile-copied {
  font-size: 0.7rem;
  color: var(--accent);
  opacity: 0;
  transition: opacity 200ms;
}

.crypto-tile-copied.show { opacity: 1; }

/* ---- flip interaction ---- */

.card-stack.is-flipping { pointer-events: none; }
.projects-card[hidden],
.crypto-card[hidden] { display: none !important; }

/* ---- responsive ---- */

@media (max-width: 480px) {
  .card-stack { max-width: calc(100% - 8px); }
  .music-player { max-width: calc(100% - 8px); }

  .profile-card .banner { height: 72px; }
  .profile-card .pfp { width: 76px; height: 76px; margin-top: -38px; }
  .name-row { font-size: 1.35rem; }

  .splash-text { font-size: 1.5rem; }

  .player-controls { gap: 8px; }
  .time-display { min-width: 58px; font-size: 0.7rem; }

  .discord-card { flex-wrap: wrap; }
  .discord-button { margin-left: auto; }
}
