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

:root {
  --primary: #57d4b5;
  --primary-dark: #3fb99c;
  --secondary: #86c0ff;
  --danger: #ff8a98;
  --warning: #ffbd78;
  --bg: #101523;
  --card-bg: rgba(255, 255, 255, 0.08);
  --text: #f4f6fb;
  --text-light: rgba(244, 246, 251, 0.72);
  --border: rgba(255, 255, 255, 0.16);
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 540px at 8% 10%, rgba(87, 212, 181, 0.16), transparent 62%),
    radial-gradient(780px 520px at 92% 0%, rgba(134, 192, 255, 0.14), transparent 58%),
    linear-gradient(180deg, #10131c, #171c2a);
  color: var(--text);
  line-height: 1.6;
}

.app {
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navigation */
.nav {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  padding: 1rem;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.nav-header h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.nav-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.tab {
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.tab:hover {
  background: rgba(255,255,255,0.2);
}

.tab.active {
  background: linear-gradient(130deg, var(--primary), var(--secondary));
  color: #0f1726;
  font-weight: 600;
}

/* Person Selector */
.person-selector {
  background: rgba(255, 255, 255, 0.07);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.person-selector label {
  font-weight: 600;
  color: var(--text-light);
}

#person-select {
  background: rgba(10, 14, 23, 0.62);
  color: var(--text);
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}

/* Main Content */
.content {
  flex: 1;
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 12px 28px rgba(0,0,0,0.28);
  backdrop-filter: blur(8px);
}

.card h2 {
  margin-bottom: 1rem;
  color: var(--primary);
}

/* Loading State */
.loading {
  color: var(--text-light);
  font-style: italic;
}

/* Buttons */
button {
  cursor: pointer;
  font-family: inherit;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.button-grid button {
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.button-grid button:hover {
  background: var(--primary-dark);
}

/* View Toggle */
.view-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.toggle-btn {
  flex: 1;
  padding: 0.75rem;
  background: rgba(255,255,255,0.1);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s;
}

.toggle-btn.active {
  background: linear-gradient(130deg, var(--primary), var(--secondary));
  color: #0f1726;
  border-color: transparent;
}

/* Resource Grid */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.resource-card {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: left;
  transition: all 0.2s;
}

.resource-card:hover {
  border-color: rgba(87, 212, 181, 0.42);
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(0,0,0,0.32);
}

.resource-card h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.resource-card p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Back Button */
.back-btn {
  background: var(--text-light);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* Profile Content */
.profile-section {
  margin-bottom: 1.5rem;
}

.profile-section h3 {
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.profile-list {
  list-style: none;
}

.profile-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.profile-list li:last-child {
  border-bottom: none;
}

/* Stats Display */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.stat-item {
  background: var(--bg);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary);
  display: block;
}

.stat-label {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Case Study */
.case-study {
  background: var(--bg);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.case-study h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.case-study .severity {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.severity.critical {
  background: var(--danger);
  color: white;
}

.severity.high {
  background: var(--warning);
  color: white;
}

.severity.moderate {
  background: var(--secondary);
  color: white;
}

/* Skills List */
.skill-category {
  margin-bottom: 1.5rem;
}

.skill-category h4 {
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.skill-item {
  background: var(--bg);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.skill-item h5 {
  margin-bottom: 0.5rem;
}

.skill-steps {
  list-style: decimal;
  margin-left: 1.5rem;
}

.skill-steps li {
  margin-bottom: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
  .content {
    padding: 0.5rem;
  }

  .card {
    padding: 1rem;
  }

  .nav-header h1 {
    font-size: 1.25rem;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: 1rem;
}

.mb-1 {
  margin-bottom: 1rem;
}

.text-muted {
  color: var(--text-light);
}

.text-danger {
  color: var(--danger);
}

.text-success {
  color: var(--secondary);
}

.text-primary {
  color: var(--primary);
}
