/* Font Import
   Imports Montserrat font with regular(400) and semi-bold(600) weights */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap");

/* Theme Variables
   Defines color schemes for both dark and light modes */
:root {
  --background-color: #1a1a1a;
  --text-color: #f0f0f0;
  --accent-color: #535030;
  --card-bg: #252525;
}

[data-theme="light"] {
  --background-color: #f5f5f5;
  --text-color: #1a1a1a;
  --accent-color: #847c4d;
  --card-bg: #f0f0f0;
}

/* Text Selection Styling
   Customizes how selected text appears */
::selection {
  background: var(--accent-color);
  color: var(--text-color);
}

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

/* Base Styles
   Reset and basic page setup */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  min-height: 100vh;
  padding: 2rem;
  transition: all 0.3s ease;
}

/* Layout Components
   Main container and structural elements */
.container {
  max-width: 680px;
  margin: 0 auto;
}

/* Theme Toggle Button
   Floating theme switch button styles */
.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--accent-color);
  border: none;
  padding: 12px;
  border-radius: 50%;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.theme-toggle:hover {
  transform: rotate(90deg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Link Cards
   Styles for interactive link buttons */
.link-card {
  background: var(--card-bg);
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-color);
  display: block;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.link-card:hover {
  transform: translateY(-3px) scale(1.01);
  background: var(--accent-color);
  border-color: var(--text-color);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.link-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: 0.5s;
}

.link-card:hover::before {
  left: 100%;
}

/* Disabled Link States
   Styles for non-interactive links */
.link-card.disabled {
  opacity: 0.7;
  cursor: not-allowed;
  position: relative;
  overflow: visible;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

.link-card.disabled:hover {
  transform: none !important;
  background: var(--card-bg);
  border-color: transparent;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.link-card.disabled::before {
  display: none;
}

/* Coming Soon Badge
   Floating label for upcoming features */
.coming-soon {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--accent-color);
  color: var(--text-color);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  animation: bounce 2s infinite;
}

/* Animation Keyframes
   Custom animations for various elements */
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* Interactive Elements
   Buttons, dropdowns, and other interactive components */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  background: var(--card-bg);
  margin-top: 0.5rem;
  border-radius: 10px;
  overflow: hidden;
}

.dropdown-content.active {
  display: block;
}

.dropdown-content .link-card {
  margin: 0.5rem;
  transform-origin: top;
}

/* Profile Section
   User profile image and information */
.profile {
  text-align: center;
  margin-bottom: 3rem;
  padding: 1.5rem;
  position: relative;
}

.profile::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 25%;
  width: 50%;
  height: 2px;
  background: var(--accent-color);
  border-radius: 50%;
  filter: blur(1px);
}

.profile img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin-bottom: 1.5rem;
  border: 4px solid var(--accent-color);
  padding: 5px;
  object-fit: cover;
  background: var(--card-bg);
  animation: breathing-border 3s infinite ease-in-out;
  transition: all 0.3s ease;
}

.profile img:hover {
  transform: scale(1.05) rotate(5deg);
  animation-duration: 1.5s;
}

.profile h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

@keyframes breathing-border {
  0% {
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(83, 80, 48, 0.3);
  }
  50% {
    border-color: var(--text-color);
    box-shadow: 0 0 30px var(--accent-color);
  }
  100% {
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(83, 80, 48, 0.3);
  }
}

/* Utility Components
   Progress bar, share buttons, tooltips */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent-color);
  z-index: 1000;
  transition: width 0.2s ease;
}

/* Share buttons */
.share-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.share-btn {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: none;
  background: var(--card-bg);
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.share-btn:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
}

/* Tooltips */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem;
  background: var(--card-bg);
  border-radius: 5px;
  font-size: 0.8rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  white-space: nowrap;
}

[data-tooltip]:hover:before {
  opacity: 1;
  visibility: visible;
  bottom: 120%;
}

/* View counter */
.view-counter {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 2rem;
  opacity: 0.7;
}

/* Loading Screen
   Initial page load animation */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.5s ease;
}

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

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid transparent;
  border-top: 3px solid var(--accent-color);
  border-right: 3px solid var(--accent-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  will-change: transform;
}

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

/* Custom Cursor
   Custom cursor styling and behavior */
.custom-cursor {
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent-color);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease, top 0.15s ease, left 0.15s ease;
  mix-blend-mode: difference;
  will-change: transform;
}

/* Particle System
   Background particle effect styling */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  will-change: transform;
}

/* Update particles opacity and color transition */
#particles-js canvas {
  opacity: 0.6 !important;
  transition: all 0.3s ease;
}

/* Music Player
   Audio player component styling */
.music-player {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 10px;
  margin: 2rem 0;
  text-align: center;
}

.music-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.music-btn {
  background: var(--accent-color);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.music-btn:hover {
  transform: scale(1.1);
}

/* Typography Animations
   Text animation effects */
.typing-text {
  border-right: 2px solid var(--accent-color);
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  animation: typing 1.5s steps(30, end) forwards,
    blink-caret 0.75s step-end infinite;
  margin: 0 auto;
  max-width: fit-content;
}

.typing-done {
  border-right: none;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: var(--accent-color);
  }
}

/* Click Effects
   Visual feedback for interactions */
.link-click {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: var(--accent-color);
  animation: click-effect 0.5s ease-out;
  opacity: 0.5;
}

@keyframes click-effect {
  from {
    transform: scale(0);
    opacity: 0.5;
  }
  to {
    transform: scale(2);
    opacity: 0;
  }
}
