/* Root Variables */
:root {
  /* Color Palette */
  --midnight: #f2efe9; /* Main background (Very light off-white/beige) */
  --midnight-rgb: 242, 239, 233; /* RGB for midnight */
  --arctic: #262626; /* Primary text color (Dark gray) */
  --apres-ski: #8c8c8c; /* Muted/secondary text (Mid gray) */
  --slopes: #bfbfbd; /* Lighter gray for subtle elements/text/borders (Light-mid gray) */
  --mountainside: #e9e5dc; /* Secondary light background / Sections (Light beige/gray) */
  --mountainside-rgb: 233, 229, 220; /* RGB for --mountainside */

  /* Accent colors */
  --glow-color: #002366; /* Primary accent - US Navy Blue */
  --glow-color-rgb: 0, 35, 102; /* RGB version for US Navy Blue */
  --accent-color: #8c8c8c; /* Using a new palette gray for other accents/text */
  --hover-color: #001a4d; /* Darker Navy Blue for hover */
  --highlight-color: #f5a623; /* Warm accent for highlights */

  /* Helper variables */
  --border-color-light: #bfbfbd; /* Using --slopes */
  --card-bg-light: #ffffff; /* Pure white for cards */
  --card-bg-subtle-light: #f2efe9; /* For less prominent cards */
  --shadow-color-light: rgba(38, 38, 38, 0.08); /* Subtle shadow using --arctic as base */
  --shadow-color-medium: rgba(38, 38, 38, 0.15); /* Medium shadow */

  /* Functional colors */
  --success-color: #228b22;
  --warning-color: #daa520;
  --danger-color: #dc143c;

  /* Layout variables */
  --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  --transition-speed: 0.3s;
  --section-spacing: 2rem;
  --sidebar-width: 250px;
}

/* Profile Header */
.profile-header {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  margin-bottom: 2rem;
}

.profile-cover {
  height: 200px;
  background: linear-gradient(135deg, rgba(var(--glow-color-rgb), 0.3), rgba(var(--glow-color-rgb), 0.1));
  position: relative;
}

.profile-cover::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='rgba(255,255,255,.1)' fill-rule='evenodd'/%3E%3C/svg%3E")
    center center;
  opacity: 0.5;
}

.profile-info {
  padding: 2rem;
  text-align: center;
  position: relative;
}

.profile-info h1 {
  font-size: 2rem;
  color: var(--arctic);
  margin-bottom: 0.5rem;
  font-family: "Playfair Display", "Inter", system-ui, -apple-system, sans-serif;
  letter-spacing: 0.5px;
  position: relative;
  display: inline-block;
}

.profile-info h1::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--glow-color);
  transform: scaleX(0.7);
  transition: transform 0.4s ease;
}

.profile-info:hover h1::after {
  transform: scaleX(1);
}

.profile-info p {
  color: var(--apres-ski);
  font-size: 1.1rem;
  font-family: "Source Sans 3", "Inter", system-ui, -apple-system, sans-serif;
  letter-spacing: 0.2px;
}

.member-since {
  margin-top: 1rem;
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(var(--glow-color-rgb), 0.1);
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--glow-color);
  font-family: "Source Sans 3", "Inter", system-ui, -apple-system, sans-serif;
}

/* Profile Details */
.profile-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.detail-item {
  background: var(--card-bg-light);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 5px 15px var(--shadow-color-light);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid var(--border-color-light);
  position: relative;
  overflow: hidden;
}

.detail-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(var(--glow-color-rgb), 0.08), rgba(var(--glow-color-rgb), 0.02), transparent);
  transform: rotate(45deg);
  z-index: 0;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.detail-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 28px var(--shadow-hover);
  border-color: var(--glow-color);
}

.detail-item:hover::before {
  transform: rotate(45deg) translateX(10%) translateY(-10%);
}

.detail-label {
  display: block;
  font-size: 0.9rem;
  color: var(--apres-ski);
  margin-bottom: 0.5rem;
  font-family: "Source Sans 3", "Inter", system-ui, -apple-system, sans-serif;
  letter-spacing: 0.2px;
  position: relative;
  z-index: 1;
}

.detail-value {
  font-size: 1.2rem;
  color: var(--arctic);
  font-weight: 500;
  font-family: "Playfair Display", "Inter", system-ui, -apple-system, sans-serif;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
}

/* Loading State */
.loading-state {
  color: var(--slopes);
  font-style: italic;
  position: relative;
}

.loading-state::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--slopes), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Error Message */
.error-message {
  background: rgba(220, 53, 69, 0.08);
  color: #dc3545;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  animation: fadeIn 0.5s ease;
  border-left: 3px solid #dc3545;
}

.error-message i {
  font-size: 1.1rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Font Faces */
@font-face {
  font-family: "Playfair Display";
  src: url("static/fonts/PlayfairDisplay-VariableFont_wght.ttf") format("truetype"),
       url("static/fonts/PlayfairDisplay-Italic-VariableFont_wght.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("static/fonts/SourceSans3-VariableFont_wght.ttf") format("truetype"),
       url("static/fonts/SourceSans3-Italic-VariableFont_wght.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

/* Responsive Design */
@media (max-width: 768px) {
  .profile-details {
    grid-template-columns: 1fr;
  }
}
