/* =============================================
   AMITA Profile Page CSS - Updated
   ============================================= */

/* CSS Variables */
:root {
  --primary-dark: #142320;
  --primary-medium: #2D4A44;
  --primary-light: #1A2E2A;
  --accent-green: #93D5B8;
  --accent-green-light: #A8E6CE;
  --accent-green-dark: #7BC4A3;
  --white: #FFFFFF;
  --off-white: #E8F1EF;
  --gray-light: #F7F8F9;
  --gray-medium: #475569;
  --border-color: rgba(147, 213, 184, 0.2);
  --text-primary: #E8F1EF;
  --text-secondary: rgba(232, 241, 239, 0.7);
  --error: #F97066;
  --warning: #FDB022;
  --success: #7BC4A3;
}

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

/* Hidden Elements */
[hidden] {
  display: none !important;
}

.skip-link {
  display: none !important;
}

/* Body */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #0E1F1C 0%, #142320 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(20, 35, 32, 0.95);
  backdrop-filter: saturate(120%) blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 12px;
}

/* Logo - Fixed at 40px */
.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.logo-container:hover {
  transform: translateY(-1px);
}

.logo {
  width: 40px !important;
  height: 40px !important;
  object-fit: contain;
  border-radius: 8px;
}

.logo-text {
  color: var(--accent-green);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: 'Space Grotesk', sans-serif;
}

/* Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-green);
  transform: translateX(-50%);
  transition: width 0.2s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 80%;
}

.nav-links a:hover {
  color: var(--accent-green);
  background: rgba(147, 213, 184, 0.05);
}

/* Navigation Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: rgba(147, 213, 184, 0.05);
  border-radius: 24px;
  border: 1px solid var(--border-color);
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent-green), var(--accent-green-dark));
  color: var(--primary-dark);
  font-weight: 700;
  overflow: hidden;
}

.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-name {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  border: none;
  background: transparent;
}

.btn-logout {
  background: rgba(147, 213, 184, 0.1);
  border: 1px solid var(--border-color);
  color: var(--accent-green);
}

.btn-logout:hover {
  background: rgba(147, 213, 184, 0.2);
  border-color: var(--accent-green);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  background: rgba(147, 213, 184, 0.1);
  color: var(--accent-green);
  border-color: var(--border-color);
}

.btn-login,
.btn-signup {
  background: linear-gradient(135deg, var(--accent-green), var(--accent-green-dark));
  color: var(--primary-dark);
}

.btn-login:hover,
.btn-signup:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(147, 213, 184, 0.3);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}

/* Main Container */
.main-container {
  padding: 28px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Profile Grid Layout */
.profile-grid {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 24px;
  align-items: start;
}

.left-rail {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 100px;
}

.content-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Cards */
.card {
  background: linear-gradient(135deg, rgba(20, 35, 32, 0.9), rgba(20, 35, 32, 0.8));
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  padding: 20px;
  backdrop-filter: blur(10px);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Profile Card */
.profile-card {
  padding: 0;
  overflow: hidden;
}

.profile-cover {
  height: 120px;
  background: linear-gradient(135deg, #2D4A44 0%, #1A2E2A 100%);
  position: relative;
  overflow: hidden;
}

.profile-cover::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(147, 213, 184, 0.1), transparent);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.profile-avatar-wrap {
  display: flex;
  justify-content: center;
  margin-top: -50px;
  position: relative;
  z-index: 1;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-medium), var(--primary-light));
  border: 4px solid var(--primary-dark);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  font-size: 2.5rem;
  color: var(--accent-green);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.profile-avatar:hover {
  transform: scale(1.05);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-meta {
  padding: 20px;
  text-align: center;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 10px 0 5px;
  color: var(--text-primary);
}

.profile-title {
  color: var(--accent-green);
  margin: 5px 0;
  font-size: 1rem;
}

.profile-location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-secondary);
  margin: 10px 0;
  font-size: 0.95rem;
}

/* Profile stats completely removed */
.profile-stats {
  display: none !important;
}

.profile-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Contact Section - Enhanced */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(147, 213, 184, 0.08), rgba(147, 213, 184, 0.03));
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.contact-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(147, 213, 184, 0.15), transparent);
  transition: width 0.3s ease;
}

.contact-link:hover::before {
  width: 100%;
}

.contact-link:hover {
  background: linear-gradient(135deg, rgba(147, 213, 184, 0.12), rgba(147, 213, 184, 0.05));
  border-color: rgba(147, 213, 184, 0.4);
  transform: translateX(3px);
}

.contact-link i {
  width: 24px;
  color: var(--accent-green);
  text-align: center;
  font-size: 1.1rem;
  z-index: 1;
}

.contact-link span {
  flex: 1;
  font-size: 0.95rem;
  word-break: break-word;
  z-index: 1;
}

/* Content Sections - Enhanced with AMITA Theme */
.content-section {
  background: linear-gradient(135deg, rgba(20, 35, 32, 0.9), rgba(20, 35, 32, 0.7));
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.content-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(147, 213, 184, 0.1), transparent);
  pointer-events: none;
}

.content-section:hover {
  border-color: rgba(147, 213, 184, 0.3);
  box-shadow: 0 12px 40px rgba(147, 213, 184, 0.15);
}

.section-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(147, 213, 184, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, rgba(147, 213, 184, 0.08), transparent);
  position: relative;
  z-index: 1;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent-green);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(147, 213, 184, 0.1);
  border: 1px solid rgba(147, 213, 184, 0.3);
  border-radius: 8px;
  color: var(--accent-green);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.edit-btn:hover {
  background: rgba(147, 213, 184, 0.2);
  border-color: var(--accent-green);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(147, 213, 184, 0.2);
}

/* Section Content */
#aboutContent, 
#experienceContent, 
#skillsContent,
#activityContent {
  padding: 24px;
  min-height: 120px;
  position: relative;
  z-index: 1;
}

.about-text {
  line-height: 1.7;
  color: var(--text-primary);
  margin: 0;
  font-size: 1.05rem;
}

/* Skills Grid */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-tag {
  display: inline-block;
  padding: 10px 18px;
  background: linear-gradient(135deg, rgba(147, 213, 184, 0.2), rgba(147, 213, 184, 0.1));
  border: 1px solid rgba(147, 213, 184, 0.4);
  border-radius: 25px;
  color: var(--accent-green-light);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.skill-tag::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(147, 213, 184, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

.skill-tag:hover::before {
  width: 100px;
  height: 100px;
}

.skill-tag:hover {
  background: linear-gradient(135deg, rgba(147, 213, 184, 0.3), rgba(147, 213, 184, 0.15));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(147, 213, 184, 0.25);
  color: var(--white);
}

/* Experience Item */
.experience-item {
  padding: 16px;
  background: rgba(147, 213, 184, 0.05);
  border-radius: 10px;
  border-left: 4px solid var(--accent-green);
}

.experience-title {
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.experience-company {
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-top: 4px;
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 3rem;
  color: rgba(147, 213, 184, 0.3);
  margin-bottom: 16px;
}

.empty-state p {
  margin: 8px 0;
  font-size: 1rem;
}

.empty-state .sub-text {
  font-size: 0.9rem;
  color: rgba(232, 241, 239, 0.4);
}

/* Completion Banner */
.completion-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(147, 213, 184, 0.1), rgba(147, 213, 184, 0.05));
  border: 1px solid var(--border-color);
  border-radius: 16px;
}

.completion-icon i {
  font-size: 2rem;
  color: var(--warning);
}

.completion-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.completion-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.completion-progress {
  margin-top: 8px;
}

.progress-bar {
  height: 8px;
  background: rgba(147, 213, 184, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-green-dark));
  border-radius: 10px;
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Loading States */
.loading-container {
  display: grid;
  place-items: center;
  gap: 16px;
  padding: 60px 20px;
  min-height: 400px;
}

.loading-text {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(147, 213, 184, 0.2);
  border-top-color: var(--accent-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Error State */
.error-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 20px;
  text-align: center;
}

.error-message i {
  font-size: 3rem;
  color: var(--error);
}

.error-message p {
  color: var(--text-primary);
  font-size: 1.1rem;
}

.retry-btn {
  padding: 12px 24px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: rgba(147, 213, 184, 0.1);
  color: var(--accent-green);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.retry-btn:hover {
  background: rgba(147, 213, 184, 0.2);
  transform: translateY(-1px);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  max-width: 520px;
  width: 90%;
  margin: 20px;
  background: linear-gradient(135deg, rgba(20, 35, 32, 0.98), rgba(20, 35, 32, 0.95));
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
}

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

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-green);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--accent-green);
}

.modal-body {
  padding: 12px 0;
}

.modal-body .coming-soon {
  font-weight: 700;
  font-size: 1.5rem;
  margin: 0 0 12px;
  color: var(--text-primary);
}

.modal-body .muted {
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* Responsive Design */
@media (max-width: 980px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
  
  .left-rail {
    position: static;
    order: 2;
  }
  
  .content-area {
    order: 1;
  }
  
  .nav-links {
    display: none;
  }
  
  .main-container {
    padding: 16px;
  }
}

@media (max-width: 640px) {
  .nav-container {
    padding: 10px 16px;
  }
  
  .profile-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .profile-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .completion-banner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .section-header {
    flex-direction: column;
    gap: 12px;
  }
  
  .modal-panel {
    margin: 10px;
    padding: 20px;
  }
}

/* Accessibility */
*:focus {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

/* Print Styles */
@media print {
  .navbar,
  .btn,
  .edit-btn,
  .profile-actions,
  .completion-banner {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}