/* LIFE AUDIT SYSTEM SHARED STYLESHEET */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ---- Variables ---- */
:root {
  --black:    #0a0a0a;
  --white:    #ffffff;
  --gray-50:  #fafafa;
  --gray-100: #f3f3f3;
  --gray-200: #e5e5e5;
  --gray-300: #d0d0d0;
  --gray-500: #888888;
  --gray-700: #444444;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.09);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.13);
  --transition: 0.18s ease;
  --page-padding: 14px;
  --section-padding: 20px 18px;
  --hero-padding: 36px 22px;
  --header-padding: 20px 22px;
  --title-size: clamp(2rem, 6vw, 52px);
  --section-title-size: clamp(1.4rem, 4vw, 30px);
}

@media (min-width: 768px) {
  :root {
    --page-padding: 24px;
    --section-padding: 32px 36px;
    --hero-padding: 60px 48px;
    --header-padding: 28px 36px;
  }
}

/* ---- Reset ---- */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

/* ---- Base ---- */
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--gray-100);
  color: var(--black);
  min-height: 100vh;
  padding: var(--page-padding);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  line-height: 1.15;
}

a { color: inherit; }

/* ---- Containers ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
}

body.page-profile {
  display: flex;
  align-items: center;
  justify-content: center;
}

body.page-profile .container {
  max-width: 700px;
  width: 100%;
}

body.page-index {
  display: flex;
  align-items: center;
  justify-content: center;
}

body.page-index .container {
  max-width: 920px;
}


.header {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--header-padding);
  margin-bottom: 20px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.header h1 {
  font-size: 32px;
  color: var(--black);
  margin-bottom: 4px;
}

.user-greeting,
.user-info {
  color: var(--gray-500);
  font-size: 15px;
  margin-bottom: 16px;
  font-style: italic;
  font-family: 'DM Serif Display', serif;
}

.nav-buttons,
.header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}


.btn, button {
  padding: 9px 18px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: inline-block;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.btn-primary,
button.btn-primary {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.btn-primary:hover,
button.btn-primary:hover {
  background: var(--gray-700);
  border-color: var(--gray-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-secondary,
button.btn-secondary {
  background: var(--white);
  color: var(--black);
  border-color: var(--gray-300);
}

.btn-secondary:hover,
button.btn-secondary:hover {
  background: var(--gray-100);
  border-color: var(--black);
}

/* Larger CTA buttons */
.btn-lg {
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
}

.cta-button {
  display: inline-block;
  padding: 16px 44px;
  background: var(--black);
  color: var(--white) !important;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--transition);
}

.cta-button:hover {
  background: var(--gray-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.button-group {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.button-group .btn,
.button-group button {
  flex: 1;
  text-align: center;
  padding: 13px 24px;
  font-size: 14px;
  font-weight: 600;
}

.form-section {
  margin-bottom: 32px;
}

.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  color: var(--black);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--gray-200);
  font-weight: 400;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  color: var(--gray-700);
  font-weight: 500;
  margin-bottom: 7px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--black);
  transition: border-color var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--black);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Goal form container */
.goal-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--section-padding);
  margin-bottom: 20px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.goal-form h2, .add-goal-section h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  margin-bottom: 20px;
}


.overall-progress,
.category-section,
.export-section,
.preview-section,
.add-goal-section,
.insights-section,
.filter-section,
.calendar-section,
.upcoming-section,
.current-stage,
.recommendations-section,
.timeline-section,
.level-section-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--section-padding);
  margin-bottom: 20px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.overall-progress h2,
.export-section h2,
.preview-section h2,
.insights-section h2,
.filter-section h3,
.calendar-section h2,
.upcoming-section h2,
.recommendations-section h2,
.timeline-section h2,
.category-section h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: var(--black);
  margin-bottom: 20px;
  font-weight: 400;
}

/* STAT CARDS */
.stats-summary,
.stats-row,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card,
.stat-box {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  border: 1px solid var(--gray-200);
  transition: box-shadow var(--transition);
}

.stat-card:hover, .stat-box:hover {
  box-shadow: var(--shadow-md);
}

.stat-number,
.stat-value {
  font-family: 'DM Serif Display', serif;
  font-size: 36px;
  color: var(--black);
  display: block;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 11px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 500;
}

.stat-icon {
  display: none;
}

/* PROGRESS BARS */
.progress-bar,
.xp-bar {
  background: var(--gray-200);
  border-radius: 3px;
  height: 7px;
  overflow: hidden;
}

.progress-fill,
.xp-fill {
  height: 100%;
  background: var(--black);
  border-radius: 3px;
  transition: width 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 5px;
  font-size: 9px;
  color: var(--white);
  font-weight: 700;
}

/* progress category bars */
.progress-bar-container {
  background: var(--gray-200);
  border-radius: 3px;
  height: 8px;
  overflow: hidden;
  flex: 1;
}

.progress-bar-fill {
  height: 100%;
  background: var(--black);
  border-radius: 3px;
  transition: width 0.6s ease;
  font-size: 9px;
  color: var(--white);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 4px;
}

/* monochromatic fill for all categories */
.progress-bar-career,
.progress-bar-health,
.progress-bar-finance,
.progress-bar-relationships,
.progress-bar-hobbies { background: var(--black); }

/* others*/
.category-career        { background: var(--black); color: var(--white); }
.category-health        { background: #2a2a2a; color: var(--white); }
.category-finance       { background: #444; color: var(--white); }
.category-relationships { background: #666; color: var(--white); }
.category-hobbies       { background: #999; color: var(--white); }

.category-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

/* dash to replace emojis in section, had overused them a bit */
.category-icon {
  width: 44px;
  height: 44px;
  background: var(--black);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0; /* hide emoji */
  flex-shrink: 0;
}

.category-icon::after {
  content: '—';
  font-size: 18px;
  color: var(--white);
  font-family: 'DM Serif Display', serif;
}

.category-title h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  font-weight: 400;
}

.category-count {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

/* GOAL CARDS */
.goal-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  border: 1px solid var(--gray-200);
  margin-bottom: 10px;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.goal-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.goal-card.completed {
  opacity: 0.5;
}

.goal-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.goal-description {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 10px;
}

.goal-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* FILTER BUTTONS */
.filter-section {
  padding: var(--section-padding);
}

.filter-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: 3px;
  background: var(--white);
  color: var(--gray-700);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all var(--transition);
  font-family: 'DM Sans', sans-serif;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* CALENDAR */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.calendar-title {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  font-weight: 400;
}

.calendar-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.current-month {
  font-weight: 600;
  font-size: 14px;
  min-width: 140px;
  text-align: center;
}

.nav-btn {
  padding: 7px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'DM Sans', sans-serif;
}

.nav-btn:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.calendar-day-header {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 8px 0;
}

.calendar-day {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  min-height: 68px;
  padding: 6px;
  transition: background var(--transition);
}

.calendar-day:hover { background: var(--gray-50); }

.calendar-day.today {
  border-color: var(--black);
  border-width: 2px;
}

.calendar-day.other-month {
  opacity: 0.25;
  background: transparent;
}

.day-number {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 3px;
}

.calendar-goal {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 2px;
  margin-bottom: 2px;
  background: var(--black);
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
}

.calendar-goal.overdue {
  background: var(--gray-300);
  color: var(--gray-700);
  text-decoration: line-through;
}

.upcoming-section h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  margin-bottom: 16px;
}

.upcoming-goal {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-200);
}

.upcoming-goal:last-child { border-bottom: none; }

.upcoming-date {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  line-height: 1;
  min-width: 44px;
  color: var(--black);
}

.upcoming-goal-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 3px;
}

/* TIMELINE */
.timeline-section h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  margin-bottom: 24px;
}

.timeline-item {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-200);
  align-items: flex-start;
}

.timeline-item:last-child { border-bottom: none; }

.timeline-age {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--black);
  min-width: 56px;
  line-height: 1;
}

.timeline-content .timeline-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.timeline-content .timeline-description {
  font-size: 13px;
  color: var(--gray-500);
}

.timeline-item.past .timeline-age { color: var(--gray-300); }
.timeline-item.current .timeline-age { color: var(--black); }

.current-stage {
  text-align: center;
  padding: 40px;
}

/* Hide emoji stage icon */
.stage-icon { display: none; }

.current-stage h2 {
  font-size: var(--section-title-size);
  margin-bottom: 10px;
}

.stage-description {
  color: var(--gray-500);
  font-size: 15px;
  margin-bottom: 16px;
  font-style: italic;
  font-family: 'DM Serif Display', serif;
}

.age-range {
  display: inline-block;
  border: 1.5px solid var(--gray-300);
  padding: 4px 16px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-700);
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.recommendation-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: all var(--transition);
}

.recommendation-item:hover {
  border-color: var(--black);
  box-shadow: var(--shadow-sm);
}

/* ACHIEVEMENTS */
.level-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--section-padding);
  margin-bottom: 20px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 24px;
}

.level-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0; /* hide emoji */
  flex-shrink: 0;
  position: relative;
}

/* Show level number */
.level-badge::after {
  content: attr(data-level);
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  color: var(--white);
  position: absolute;
}

.level-info {
  flex: 1;
}

.level-info h2 {
  font-size: 26px;
  margin-bottom: 4px;
}

.level-title {
  color: var(--gray-500);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 12px;
}

.xp-bar-container { width: 100%; }

.xp-info {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--gray-500);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.achievement-card {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  transition: all var(--transition);
}

.achievement-card.earned {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
}

.achievement-icon { display: none; }

.achievement-name {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.achievement-desc {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 5px;
  line-height: 1.4;
}

.achievement-card.earned .achievement-desc {
  color: rgba(255,255,255,0.55);
}

/* EXPORT PAGE */
.export-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.export-card {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.export-card:hover {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
}

.export-icon { display: none; }

.export-title {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 8px;
}

.export-description {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.5;
}

.export-card:hover .export-description {
  color: rgba(255,255,255,0.6);
}

.preview-section {
  padding: var(--section-padding);
}

/* RECOMMENDATIONS PAGE */
.insight-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.insight-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: box-shadow var(--transition);
}

.insight-card:hover { box-shadow: var(--shadow-md); }

.insight-icon { display: none; }

.insight-text {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.5;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.resource-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all var(--transition);
}

.resource-card:hover {
  border-color: var(--black);
  box-shadow: var(--shadow-sm);
}

.resource-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}

.resource-type {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gray-500);
  font-weight: 600;
}

.resource-description {
  font-size: 13px;
  color: var(--gray-700);
  margin-top: 8px;
  line-height: 1.5;
}

.favorite-btn {
  background: none;
  border: 1.5px solid var(--gray-300);
  color: var(--gray-500);
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 3px;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 10px;
}

.favorite-btn:hover,
.favorite-btn.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* INDEX / HERO SECTION */
.hero {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--hero-padding);
  text-align: center;
  border: 1px solid var(--gray-200);
  margin-bottom: 24px;
}

.logo {
  font-size: 0;
  display: block;
  margin-bottom: 20px;
}

.logo::after {
  content: '◎';
  font-size: 52px;
  font-family: 'DM Serif Display', serif;
  color: var(--black);
  display: block;
  line-height: 1;
}

.hero h1 {
  font-size: var(--title-size);
  color: var(--black);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.tagline {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: 20px;
  color: var(--gray-500);
  margin-bottom: 20px;
}

.description {
  font-size: 15px;
  color: var(--gray-700);
  line-height: 1.65;
  max-width: 520px;
  margin: 0 auto 36px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.feature-card {
  background: var(--white);
  padding: 26px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
  text-align: left;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--black);
}

/* Hide feature emoji icon */
.feature-icon { display: none; }

.feature-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--black);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.feature-description {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.5;
}

.quick-links {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--gray-200);
  margin-bottom: 24px;
}

.quick-links h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  margin-bottom: 20px;
  font-weight: 400;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.link-card {
  padding: 14px 16px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--black);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--gray-200);
}

.link-card:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
  transform: translateX(3px);
}

.link-icon { display: none; }

.link-text {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* LIFE AUDIT / PROFILE PAGE */
.profile-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 44px;
  border: 1px solid var(--gray-200);
}

.profile-container h1 {
  font-size: 30px;
  margin-bottom: 6px;
}

.subtitle {
  color: var(--gray-500);
  font-size: 14px;
  font-style: italic;
  font-family: 'DM Serif Display', serif;
  margin-bottom: 28px;
}

/* Welcome banner */
.welcome-banner {
  background: var(--black);
  color: var(--white);
  padding: 16px 22px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  display: none;
  position: relative;
  animation: slideDown 0.35s ease;
}

.welcome-banner.show { display: block; }

#welcomeText {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: 16px;
  font-weight: 400;
  display: block;
  padding-right: 32px;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(255,255,255,0.12);
  color: var(--white);
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  padding: 0;
}

.close-btn:hover { background: rgba(255,255,255,0.22); }

/* Success / alert messages */
.success-message {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #000;
  color: #fff;
  padding: 12px 20px;
  border-radius: 4px;
  z-index: 1000;
  animation: slideUp 0.3s ease;
}

.success-message.show {
  display: block;
}

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

.success-message.show { display: block; }

/* Next / nav link at bottom of profile */
.next-link {
  margin-top: 24px;
  text-align: center;
}

/* DASHBOARD */
.dashboard-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

/* SVG progress ring */
.circular-progress {
  position: relative;
  display: inline-block;
  margin-bottom: 28px;
}

.progress-ring circle { fill: none; }

.progress-ring-circle,
#progressCircle {
  stroke: var(--black) !important; 
}

.progress-ring-bg { stroke: var(--gray-200); }

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -56%);
  font-family: 'DM Serif Display', serif;
  font-size: 38px;
  color: var(--black);
  line-height: 1;
}

.progress-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 40%);
  font-size: 11px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
}

.category-chart-bar {
  height: 10px;
  background: var(--black);
  border-radius: 2px;
  transition: width 0.6s ease;
}

/* LOADING OVERLAY */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  flex-direction: column;
  gap: 14px;
}

.loading-overlay.show { display: flex; }

.spinner {
  width: 32px;
  height: 32px;
  border: 2.5px solid var(--gray-200);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.loading-content { text-align: center; }

.loading-text {
  font-size: 13px;
  color: var(--gray-700);
  letter-spacing: 0.04em;
  font-weight: 500;
  text-transform: uppercase;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--gray-500);
}

.empty-icon { display: none; }

.empty-state > div:last-child {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: 16px;
}

.footer {
  text-align: center;
  color: var(--gray-500);
  margin-top: 28px;
  font-size: 12px;
  letter-spacing: 0.03em;
}

/* ANIMATIONS */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

@media (max-width: 768px) {

  .form-row,
  .export-options,
  .features,
  .recommendation-grid,
  .resources-grid,
  .links-grid,
  .achievements-grid {
    grid-template-columns: 1fr;
  }

  .stats-row,
  .stats-summary,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .button-group {
    flex-direction: column;
  }

  .calendar-grid {
    gap: 2px;
  }

  .calendar-day {
    min-height: 56px;
    padding: 4px;
  }

  .calendar-goal {
    font-size: 8px;
    padding: 1px 3px;
  }

  .timeline-item {
    gap: 12px;
  }

  .timeline-age {
    min-width: 42px;
    font-size: 22px;
  }

  .level-section {
    flex-direction: column;
    text-align: center;
  }

  .profile-container {
    padding: 24px 18px;
  }
}
/* Global Navigation */

.global-nav {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: var(--black);
  border-radius: 16px;

  margin: 0 auto 20px;
  max-width: 1200px;

  overflow-x: auto;
  overflow-y: hidden;

  box-shadow: var(--shadow-md);
}

.global-nav-inner {
  display: flex;
  flex-direction: row;

  align-items: center;
  justify-content: flex-start;

  min-width: max-content;
}

.global-nav-link {
  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  padding: 12px 18px;

  text-decoration: none;
  color: rgba(255,255,255,0.7);

  white-space: nowrap;

  transition: all 0.2s ease;

  flex-shrink: 0;
}

.global-nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: white;
}

.global-nav-link.active {
  color: white;
  border-bottom: 2px solid white;
}

.nav-label {
  font-size: 11px;
}

.nav-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;   /* inherits the link's color automatically */
  stroke-width: 1.75;
  fill: none;
  display: block;
  margin-bottom: 3px;
}

/* Mobile compatibility fixes. Will try to improve section more*/
@media (max-width: 768px) {

  .global-nav {
    border-radius: 0;
    margin-left: -14px;
    margin-right: -14px;
  }

  .global-nav-link {
    padding: 10px 14px;
  }

}
img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

* {
  min-width: 0;
}