/* ==========================================
   PROFILE PAGE - NEW DESIGN
   ========================================== */

/* Main Layout */
.profile-page .layout-wrapper {
  gap: 20px;
  max-width: 1800px;
  width: 90vw;
  margin: 0 auto;
}

.profile-page .sidebar {
  width: 400px;
  min-width: 400px;
  height: 85vh;
}

.profile-page .container {
  height: 85vh;
  overflow-y: auto;
}

/* Profile Hero Section */
.profile-hero {
  position: relative;
  margin-bottom: 24px;
  min-height: 470px;
  background: linear-gradient(135deg, rgba(61, 40, 23, 0.72) 0%, rgba(92, 61, 46, 0.65) 50%, rgba(61, 40, 23, 0.72) 100%);
  background-image: var(--leather-panel-grad, linear-gradient(135deg, rgba(61, 40, 23, 0.72) 0%, rgba(92, 61, 46, 0.65) 50%, rgba(61, 40, 23, 0.72) 100%)), var(--leather-seamless);
  background-size: 100% 100%, var(--leather-tile-size, 168px) var(--leather-tile-size, 168px);
  background-repeat: no-repeat, repeat;
  border: 3px solid var(--hero-leather-border, #2a1810);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.15), inset 0 -2px 0 rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.profile-banner-wrapper {
  position: relative;
  margin: -32px -32px 24px -32px;
  height: 200px;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.profile-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #3d2817 0%, #5c3d2e 50%, #3d2817 100%);
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 16px;
}

.banner-edit-btn {
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  backdrop-filter: blur(4px);
}

/* Profile Hero Content */
.profile-hero-content {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.profile-avatar-section {
  flex-shrink: 0;
  position: relative;
  margin-top: -80px;
}

.profile-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--leather-stitch-gold, rgba(218, 165, 32, 0.4));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.2);
  background: var(--leather-panel-base, #3d2817);
}

.avatar-container {
  position: relative;
  cursor: pointer;
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-edit-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.avatar-container:hover .avatar-edit-overlay {
  opacity: 1;
}

.banner-edit-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
  cursor: pointer;
}

#banner-wrapper-hover:hover .banner-edit-overlay {
  opacity: 1;
}

#banner-wrapper-hover {
  cursor: pointer;
}

/* Profile Quick Info */
.profile-quick-info {
  flex: 1;
  min-width: 0;
}

.profile-username {
  font-size: 2.2rem;
  font-weight: 700;
  color: #fffef9;
  margin: 0 0 8px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  font-family: 'Shrikhand', system-ui, sans-serif;
}

.profile-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.status-icon {
  font-size: 1.1rem;
  color: #fbbf24;
}

#profile-badge-text {
  font-size: 0.9rem;
  color: rgba(255, 254, 249, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Stats Bar */
.profile-stats-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: #fffef9;
  font-size: 0.9rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.stat-pill .material-icons {
  font-size: 18px;
  color: #fbbf24;
}

/* Action Buttons */
.profile-actions-bar {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.primary-action {
  background: linear-gradient(145deg, #22c55e, #16a34a) !important;
  border-color: #15803d !important;
  color: white !important;
}

/* Tab Navigation */
.profile-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
  padding: 12px 24px;
  border: none;
  background: transparent;
  color: rgba(255, 254, 249, 0.7);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fffef9;
}

.tab-btn.active {
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.tab-btn .material-icons {
  font-size: 20px;
}

/* Tab Content */
.tab-content {
  min-height: 400px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Content Header */
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.content-header h2 {
  font-size: 1.5rem;
  color: #fffef9;
  margin: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Project Card - Explore Style */
.project-card {
  background-color: transparent;
  padding: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: visible;
  text-decoration: none;
  color: #1e293b;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  cursor: pointer;
}

.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 85% 55% at 30% 18%, rgba(255, 255, 255, 0.16) 0%, transparent 58%);
  pointer-events: none;
  z-index: 1;
}

.project-card > * {
  position: relative;
  z-index: 2;
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-thumb {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  margin: 0;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(60, 42, 28, 0.35), rgba(40, 28, 18, 0.45));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  border: 2px solid #5a3a24;
  border-bottom: 3px solid #6b4a30;
  flex-shrink: 0;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-thumb-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%);
  color: white;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.project-thumb-overlay h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    0 0 6px rgba(0, 0, 0, 0.8) !important;
  line-height: 1.2;
}

.project-thumb-overlay p {
  font-size: 0.85rem;
  margin: 0 0 6px 0;
  opacity: 0.9;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Category Badge */
.category-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
  width: fit-content;
}

.category-badge.art {
  background: rgba(236, 72, 153, 0.8);
  color: white;
}

.category-badge.music {
  background: rgba(139, 92, 246, 0.8);
  color: white;
}

.category-badge.game {
  background: rgba(34, 197, 94, 0.8);
  color: white;
}

.category-badge.gallery {
  background: rgba(249, 115, 22, 0.8);
  color: white;
}

.category-badge.jam {
  background: rgba(59, 130, 246, 0.8);
  color: white;
}

.category-badge.article {
  background: rgba(234, 179, 8, 0.8);
  color: white;
}

/* About Section */
.about-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card {
  background: linear-gradient(135deg, rgba(61, 40, 23, 0.72) 0%, rgba(92, 61, 46, 0.65) 50%, rgba(61, 40, 23, 0.72) 100%);
  background-image: var(--leather-panel-grad), var(--leather-seamless);
  background-size: 100% 100%, var(--leather-tile-size) var(--leather-tile-size);
  background-repeat: no-repeat, repeat;
  border: 2px solid var(--hero-leather-border, #2a1810);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.15);
}

.info-card h3 {
  font-size: 1.3rem;
  color: #fffef9;
  margin: 0 0 16px 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-card h3 .material-icons {
  color: #fbbf24;
  font-size: 24px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-item .material-icons {
  color: rgba(255, 254, 249, 0.6);
  font-size: 20px;
}

.info-item span {
  font-size: 0.85rem;
  color: rgba(255, 254, 249, 0.6);
}

.info-item strong {
  font-size: 1rem;
  color: #fffef9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Achievements Grid */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
}

/* Activity Feed */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all 0.2s;
}

.activity-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-icon .material-icons {
  color: white;
  font-size: 20px;
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-text {
  font-size: 0.95rem;
  color: #fffef9;
  margin: 0 0 4px 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.activity-time {
  font-size: 0.8rem;
  color: rgba(255, 254, 249, 0.5);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .profile-hero-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .profile-stats-bar {
    justify-content: center;
  }
  
  .profile-actions-bar {
    justify-content: center;
  }
  
  .profile-avatar-section {
    margin-top: -60px;
  }
  
  .profile-avatar {
    width: 120px;
    height: 120px;
  }
}

@media (max-width: 768px) {
  .profile-page .layout-wrapper {
    flex-direction: column;
  }
  
  .profile-page .sidebar {
    width: 100%;
    min-width: auto;
    height: auto;
  }
  
  .profile-page .container {
    height: auto;
  }
  
  .profile-hero {
    padding: 20px;
  }
  
  .profile-banner-wrapper {
    height: 150px;
  }
  
  .profile-username {
    font-size: 1.8rem;
  }
  
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}
