/* Base & Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: #e2e8f0;
  background-color: #121218;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.site-container {
  max-width: 960px;
  margin: 0 auto;
}

/* Header & Avatar Setup */
.header-card {
  background: rgba(30, 30, 42, 0.85);
  backdrop-filter: blur(10px);
  border: 2px solid #3a3a4c;
  border-radius: 12px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.profile-header-top {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid #f09ed0;
  box-shadow: 0 0 12px rgba(240, 158, 208, 0.3);
  flex-shrink: 0;
}

.profile-header-info {
  flex-grow: 1;
}

h1 {
  font-size: 2rem;
  color: #f09ed0;
  margin-bottom: 0.25rem;
  letter-spacing: -0.5px;
}

.tagline {
  color: #a0aec0;
  font-size: 0.95rem;
}

/* Owner Profile Additions */
.owner-username {
  font-size: 1.2rem;
  color: #718096;
  font-weight: 400;
  margin-left: 0.5rem;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.badge {
  background-color: rgba(30, 30, 42, 0.9);
  color: #cbd5e0;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  border: 1px solid #4a4a5e;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-pink {
  color: #f09ed0;
  border-color: rgba(240, 158, 208, 0.4);
  background-color: rgba(240, 158, 208, 0.1);
}

/* Discord Status Bar */
.discord-status-container {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  background: rgba(18, 18, 24, 0.7);
  border: 1px solid #4a4a5e;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #747f8d;
}

.status-dot.online { background-color: #43b581; box-shadow: 0 0 6px #43b581; }
.status-dot.idle { background-color: #faa61a; box-shadow: 0 0 6px #faa61a; }
.status-dot.dnd { background-color: #f04747; box-shadow: 0 0 6px #f04747; }
.status-dot.offline { background-color: #747f8d; }

.discord-username { color: #ffffff; font-weight: 600; }
.status-divider { color: #666; }
.discord-activity { color: #cbd5e0; }

/* Grid Sections Layout (Sketch Matching) */
.sections-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* Row 1 cards take 1 column each; Row 2+ take full width */
.grid-item-half { grid-column: span 1; }
.grid-item-full { grid-column: span 2; }

/* Fieldsets / Cards */
fieldset {
  border: 2px solid #3a3a4c;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  background: rgba(30, 30, 42, 0.75);
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

fieldset:hover {
  border-color: #f09ed0;
  transform: translateY(-2px);
}

legend {
  color: #f09ed0;
  font-weight: bold;
  font-size: 1.1rem;
  padding: 0 0.5rem;
}

.section-body {
  margin-top: 0.5rem;
}

/* Projects and Content */
.project {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed #3a3a4c;
}

.project:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

h3 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

code {
  font-family: 'Space Mono', monospace;
  background-color: #121218;
  border: 1px solid #4a4a5e;
  color: #f09ed0;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.825rem;
}

a {
  color: #f09ed0;
  text-decoration: none;
  border-bottom: 1px dashed #f09ed0;
  transition: color 0.2s ease;
}

a:hover {
  color: #ffffff;
  border-bottom-style: solid;
}

.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.link-separator {
  color: #4a4a5e;
}

/* Footer */
footer {
  margin-top: 2.5rem;
  padding: 1.5rem 0;
  text-align: center;
  color: #718096;
  font-size: 0.85rem;
}

/* Loading & Error Indicators */
#loading-indicator {
  position: fixed;
  inset: 0;
  background-color: #121218;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid #3a3a4c;
  border-top-color: #f09ed0;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.error-message {
  background: rgba(42, 26, 26, 0.9);
  border: 2px solid #e06c75;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .sections-grid {
    grid-template-columns: 1fr;
  }
  
  .grid-item-half, .grid-item-full {
    grid-column: span 1;
  }

  .profile-header-top {
    flex-direction: column;
    text-align: center;
  }

  .discord-status-container {
    justify-content: center;
  }
}