:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-glow: rgba(99, 102, 241, 0.4);
  --secondary: #a855f7;
  --secondary-light: #c084fc;
  --accent: #22d3ee;

  --bg-dark: #0a0a12;
  --bg-card: rgba(15, 15, 25, 0.8);
  --bg-card-hover: rgba(25, 25, 40, 0.9);

  --text-primary: #f0f0f8;
  --text-secondary: #9090a8;

  --border-glow: rgba(168, 85, 247, 0.3);
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
  font-family: "Space Grotesk", sans-serif;
  background: var(--bg-dark);
  min-height: 100vh;
  color: var(--text-primary);
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

body.loaded {
  opacity: 1;
}

.bg-gradient {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(168, 85, 247, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(34, 211, 238, 0.05) 0%, transparent 70%);
  z-index: -2;
  animation: bgPulse 15s ease-in-out infinite;
}

@keyframes bgPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.paws-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.paw {
  position: absolute;
  width: 30px;
  height: 30px;
  background: url("img/paw.svg") center/contain no-repeat;
  animation: pawFall linear infinite;
  opacity: 0;
}

@keyframes pawFall {
  0% {
    transform: translateY(-50px) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.15;
  }
  90% {
    opacity: 0.15;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

.paw:nth-child(1) { left: 5%; animation-duration: 12s; animation-delay: 0s; }
.paw:nth-child(2) { left: 15%; animation-duration: 15s; animation-delay: 2s; }
.paw:nth-child(3) { left: 25%; animation-duration: 10s; animation-delay: 4s; }
.paw:nth-child(4) { left: 35%; animation-duration: 14s; animation-delay: 1s; }
.paw:nth-child(5) { left: 45%; animation-duration: 11s; animation-delay: 3s; }
.paw:nth-child(6) { left: 55%; animation-duration: 13s; animation-delay: 5s; }
.paw:nth-child(7) { left: 65%; animation-duration: 16s; animation-delay: 0.5s; }
.paw:nth-child(8) { left: 75%; animation-duration: 9s; animation-delay: 2.5s; }
.paw:nth-child(9) { left: 85%; animation-duration: 12s; animation-delay: 4.5s; }
.paw:nth-child(10) { left: 92%; animation-duration: 14s; animation-delay: 1.5s; }
.paw:nth-child(11) { left: 10%; animation-duration: 17s; animation-delay: 6s; }
.paw:nth-child(12) { left: 50%; animation-duration: 18s; animation-delay: 7s; }

.main-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem 5rem;
  min-height: 100vh;
  gap: 1.2rem;
}

/* Spotify widget */
.spotify-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  z-index: 100;
  transform: translateX(120%);
  opacity: 0;
  transition:
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.5s ease;
  max-width: 320px;
  width: auto;
}

.spotify-widget.visible {
  transform: translateX(0);
  opacity: 1;
}

.spotify-widget.dismissed {
  transform: translateX(120%);
  opacity: 0;
}

.spotify-widget:hover {
  border-color: rgba(29, 185, 84, 0.5);
  box-shadow: 0 10px 50px rgba(29, 185, 84, 0.2);
}

.spotify-close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  background: var(--bg-dark);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  z-index: 2;
}

.spotify-close:hover {
  background: #ed4245;
  border-color: #ed4245;
  color: white;
}

#album-art {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.spotify-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
}

.spotify-label {
  font-size: 0.65rem;
  color: #1db954;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

#song-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

#artist-name {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-link {
  color: var(--text-secondary);
  font-size: 1rem;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
  text-decoration: none;
}

.spotify-link:hover {
  color: #1db954;
  background: rgba(29, 185, 84, 0.1);
}

/* Profile card */
.container {
  background: var(--bg-card);
  backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2.3rem 2rem;
  max-width: 440px;
  width: 100%;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.avatar-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 0.85rem;
}

.gradient-border {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--primary-light));
  background-size: 200% 200%;
  animation: borderGradient 3s ease infinite;
}

@keyframes borderGradient {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.profile-picture {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-dark);
}

.profile-buddy {
  position: absolute;
  bottom: -5px;
  left: -5px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-dark);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 5;
}

.profile-buddy:hover {
  transform: scale(1.12);
  box-shadow: 0 0 16px var(--primary-glow);
}

.discord-status-dot-avatar {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--bg-dark);
  background: #747f8d;
  cursor: pointer;
  transition: transform 0.2s ease;
  z-index: 5;
}

.discord-status-dot-avatar:hover {
  transform: scale(1.12);
}

.discord-status-dot-avatar.online {
  background: #3ba55c;
  box-shadow: 0 0 10px rgba(59, 165, 92, 0.55);
}

.discord-status-dot-avatar.idle {
  background: #faa61a;
  box-shadow: 0 0 10px rgba(250, 166, 26, 0.55);
}

.discord-status-dot-avatar.dnd {
  background: #ed4245;
  box-shadow: 0 0 10px rgba(237, 66, 69, 0.55);
}

.discord-status-dot-avatar.offline {
  background: #747f8d;
  box-shadow: none;
}

.status-tooltip {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 10;
}

.status-tooltip.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#discord-status-bubble {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.45rem 0.9rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  opacity: 0;
  max-height: 0;
  margin: 0 auto;
  overflow: hidden;
  transition:
    opacity 0.25s ease,
    max-height 0.25s ease,
    margin 0.25s ease;
}

#discord-status-bubble.visible {
  opacity: 1;
  max-height: 90px;
  margin: 0 auto 0.75rem;
}

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

.profile-name {
  text-align: center;
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0.1rem 0 0.35rem;
}

.animated-text {
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-bio {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.6rem;
  letter-spacing: 0.5px;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.link-row {
  display: flex;
  gap: 0.65rem;
}

.link-button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.link-button:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px var(--primary-glow);
}

.link-button i {
  font-size: 1.05rem;
  opacity: 0.8;
}

.link-button:hover i {
  opacity: 1;
}

/* Overlays */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 15, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1rem;
  overflow-y: auto;
}

.overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  max-width: 550px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.overlay.active .modal {
  transform: scale(1);
}

.modal h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.close-button {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 1.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
  line-height: 1;
}

.close-button:hover {
  color: var(--primary-light);
}

/* Friends */
.friends-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 1rem;
}

.friend-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--glass);
  border-radius: 12px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.friend-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  border-color: var(--border-glow);
}

.friend-card img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--glass-border);
}

.friend-card span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.75rem;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
  border: 1px solid transparent;
}

.gallery-item:hover {
  transform: scale(1.03);
  border-color: var(--border-glow);
}

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

.gallery-item[data-spoiler="true"]:not(.revealed) img {
  filter: blur(20px);
}

.gallery-item[data-spoiler="true"]:not(.revealed)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.spoiler-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--secondary-light);
  font-weight: 700;
  font-size: 1rem;
  z-index: 2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.gallery-item.revealed .spoiler-text {
  display: none;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
  transition: color 0.2s ease;
}

.lightbox-close:hover {
  color: var(--primary-light);
}

/* Events */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.event-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--glass);
  border-radius: 12px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
}

.event-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
}

.event-card img {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
}

.event-info h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.event-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.events-column h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.event-details-modal {
  max-width: 520px;
}

.event-details-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.event-details-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.event-details-label {
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.event-details-value {
  color: var(--text-primary);
  font-size: 0.9rem;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attended-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.event-tag {
  background: var(--glass);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  border: 1px solid var(--glass-border);
}

/* Easter egg */
@keyframes owoBounce {
  0%, 100% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(1.05) rotate(-3deg);
  }
  50% {
    transform: scale(1.08) rotate(3deg);
  }
  75% {
    transform: scale(1.05) rotate(-2deg);
  }
}

.owo-bounce {
  animation: owoBounce 0.45s ease-in-out;
}

.owo-glow {
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.04),
    0 0 26px var(--primary-glow) !important;
}

.glitter-paw {
  position: fixed;
  width: 22px;
  height: 22px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  background: url("img/paw.svg") center/contain no-repeat;
  animation: glitterFadeUp 1.4s ease-out forwards;
  filter: brightness(1.05);
}

@keyframes glitterFadeUp {
  0% {
    opacity: 0.18;
    transform: translateY(0) rotate(0deg) scale(0.9);
  }
  70% {
    opacity: 0.16;
  }
  100% {
    opacity: 0;
    transform: translateY(-34px) rotate(180deg) scale(0.75);
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Footer */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 0 14px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  user-select: none;
  background: linear-gradient(to top, var(--bg-dark) 60%, transparent);
  z-index: 10;
}

.footer-heart {
  font-size: 0.9rem;
}

.footer-github {
  color: var(--text-secondary);
  font-size: 1.1rem;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
}

.footer-github:hover {
  color: var(--text-primary);
  transform: scale(1.2);
}

/* Optional themes */
body.winter-theme .container {
  border-color: rgba(191, 219, 254, 0.35);
  box-shadow: 0 0 34px rgba(129, 140, 248, 0.28);
}

body.winter-theme .bg-gradient {
  background:
    radial-gradient(ellipse at 20% 10%, rgba(129, 140, 248, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(56, 189, 248, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(148, 163, 184, 0.08) 0%, transparent 75%);
}

body.winter-theme .gradient-border {
  background: linear-gradient(135deg, #e0f2fe, #bfdbfe, #a5b4fc);
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 2rem 1.5rem;
  }

  .modal {
    padding: 1.5rem;
    margin: 1rem;
  }

  .friends-list {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  }

  .link-row {
    flex-direction: column;
  }

  .link-button {
    width: 100%;
  }

  .site-footer {
    font-size: 0.78rem;
    padding: 8px 0 12px;
    gap: 8px;
  }

  .footer-github {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .spotify-widget {
    bottom: 1rem;
    right: 1rem;
    max-width: calc(100% - 2rem);
  }

  .profile-name {
    font-size: 1.6rem;
  }

  .profile-bio {
    font-size: 0.85rem;
  }

  .avatar-wrapper {
    width: 120px;
    height: 120px;
    margin-bottom: 0.7rem;
  }

  .profile-buddy {
    width: 42px;
    height: 42px;
  }

  .link-button {
    font-size: 0.85rem;
    padding: 0.75rem 0.85rem;
  }

  .site-footer {
    font-size: 0.72rem;
    padding: 7px 0 10px;
    gap: 6px;
    letter-spacing: 0.01em;
  }

  .footer-github {
    font-size: 0.95rem;
  }

  .footer-github:hover {
    transform: scale(1.1);
  }
}
