/* ====== Global Styles & Variables ====== */
:root {
  --color-primary: #0f6fc6;
  --color-primary-dark: #0b425f;
  --color-accent: #ffb703;
  --color-bg: #f4f8fc;
  --color-bg-alt: #ffffff;
  --color-text: #102a43;
  --color-muted: #6b7280;
  --radius-lg: 1.25rem;
  --radius-md: 0.75rem;
  --shadow-soft: 0 10px 25px rgba(15, 111, 198, 0.12);
  --shadow-subtle: 0 4px 12px rgba(15, 111, 198, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top left, #e0f0ff 0, var(--color-bg) 45%, #eaf3ff 100%);
  color: var(--color-text);
  line-height: 1.6;
}

/* Remove default margins */
h1, h2, h3, h4, h5, h6, p {
  margin: 0;
}

/* ====== Layout Helpers ====== */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  padding-top: 5.5rem; /* space for header */
}

/* Spacing utilities */
.section {
  padding: 3.5rem 0;
}

.section--light {
  background: var(--color-bg);
}

.section--white {
  background: var(--color-bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: clamp(1.8rem, 2.2vw, 2.25rem);
  color: var(--color-primary-dark);
  margin-bottom: 0.4rem;
}

.section-subtitle {
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* ====== Header & Navigation ====== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 248, 252, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15, 111, 198, 0.07);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #ffffff, #0f6fc6);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  color: #fff;
  font-weight: 700;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text span:first-child {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
}

.logo-text span:last-child {
  font-size: 0.75rem;
  color: var(--color-muted);
}

.nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.nav a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--color-muted);
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.nav a:hover {
  background: rgba(15, 111, 198, 0.08);
  color: var(--color-primary-dark);
  transform: translateY(-1px);
}

.nav a.nav-active {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 111, 198, 0.35);
}

/* Mobile nav: simple wrap */
@media (max-width: 640px) {
  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

/* ====== Buttons ====== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: none;
  padding: 0.6rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease,
    color 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #0f6fc6, #0b425f);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(15, 111, 198, 0.35);
}

.btn-outline {
  background: rgba(15, 111, 198, 0.03);
  border: 1px solid rgba(15, 111, 198, 0.2);
  color: var(--color-primary-dark);
}

.btn-outline:hover {
  background: rgba(15, 111, 198, 0.07);
}

/* ====== Hero (Home) ====== */

.hero {
  padding: 3.5rem 0 3rem;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 800px) {
  .hero-grid {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
  }
}

.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 183, 3, 0.12);
  color: #8a5a00;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.hero-tagline span {
  font-size: 1rem;
}

.hero-title {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: clamp(2rem, 3vw, 2.6rem);
  color: var(--color-primary-dark);
  margin-bottom: 0.75rem;
}

.hero-title span {
  color: var(--color-primary);
}

.hero-text {
  color: var(--color-muted);
  font-size: 0.98rem;
  margin-bottom: 1.25rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.6rem;
  font-size: 0.85rem;
}

.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-subtle);
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  min-height: 230px;
}

.hero-bubble {
  position: absolute;
  inset: 0;
  border-radius: 1.75rem;
  background: radial-gradient(circle at 20% 0, #ffffff, #d9ebff 40%, #0f6fc6 100%);
  box-shadow: 0 20px 45px rgba(15, 111, 198, 0.4);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-bubble-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.hero-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}

.hero-bubble-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
  color: #ffffff;
}

.hero-bubble-subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.92);
  max-width: 12rem;
}

.hero-bubble-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  font-size: 0.75rem;
}

.hero-stat-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 0.9rem;
  padding: 0.55rem;
}

.hero-stat-label {
  font-size: 0.7rem;
  color: var(--color-muted);
}

.hero-stat-value {
  font-weight: 600;
  color: var(--color-primary-dark);
}

/* ====== Generic Cards & Grids ====== */

.card-grid {
  display: grid;
  gap: 1.4rem;
}

@media (min-width: 768px) {
  .card-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.25rem;
  box-shadow: var(--shadow-subtle);
  border: 1px solid rgba(15, 111, 198, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(15, 111, 198, 0.23);
}

.card-title {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--color-primary-dark);
}

.card-text {
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* Tags */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(15, 111, 198, 0.06);
  color: var(--color-primary-dark);
}

/* ====== About Page ====== */

.about-layout {
  display: grid;
  gap: 2rem;
  align-items: flex-start;
}

@media (min-width: 800px) {
  .about-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
  }
}

.about-intro {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-subtle);
}

.about-intro p {
  margin-bottom: 0.7rem;
  font-size: 0.95rem;
}

.about-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.pill {
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 111, 198, 0.06);
  color: var(--color-primary-dark);
}

/* ====== Project Page ====== */

.project-hero {
  margin-bottom: 2.5rem;
}

.project-highlight {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--color-muted);
}

.project-title {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: clamp(1.9rem, 2.4vw, 2.2rem);
  color: var(--color-primary-dark);
  margin-bottom: 0.7rem;
}

.project-lead {
  font-size: 0.97rem;
  color: var(--color-muted);
  max-width: 40rem;
}

.project-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .project-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
  }
}

.project-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.project-step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 0.8rem;
  align-items: flex-start;
}

.step-index {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-body h3 {
  font-size: 1rem;
  margin-bottom: 0.15rem;
  color: var(--color-primary-dark);
}

.step-body p {
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* Timeline */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px dashed rgba(15, 111, 198, 0.3);
}

.timeline-item {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 1.1rem;
}

.timeline-dot {
  position: absolute;
  left: -6px;
  top: 0.25rem;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(255, 183, 3, 0.3);
}

.timeline-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-bottom: 0.1rem;
}

.timeline-text {
  font-size: 0.86rem;
  color: var(--color-muted);
}

/* ====== Contact Page ====== */

.contact-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 800px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  }
}

.form-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-subtle);
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: var(--color-primary-dark);
}

.form-help {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-top: 0.15rem;
}

.input,
.textarea,
select {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(15, 111, 198, 0.18);
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.96);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.input:focus,
.textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(15, 111, 198, 0.2);
  background: #ffffff;
}

.textarea {
  min-height: 140px;
  resize: vertical;
}

/* ====== Footer ====== */

.site-footer {
  padding: 1.5rem 0 1.2rem;
  font-size: 0.8rem;
  color: var(--color-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(15, 111, 198, 0.12);
  padding-top: 0.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--color-muted);
}

.footer-links a:hover {
  color: var(--color-primary-dark);
}

/* ====== Accessibility Helpers ====== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(15, 111, 198, 0.7);
  outline-offset: 2px;
}

/* Small back-to-top link */
.back-to-top {
  text-align: right;
  margin-top: 1.5rem;
  font-size: 0.85rem;
}

.back-to-top a {
  color: var(--color-primary);
  text-decoration: none;
}

.back-to-top a:hover {
  text-decoration: underline;
}

/* ====== Courses & FinPro extra helpers ====== */

.projects-intro-text {
  max-width: 42rem;
  margin: 0 auto 2rem;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.projects-tagline {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}

.course-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .course-layout {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
  }
}

.course-meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.course-meta-list li {
  margin-bottom: 0.4rem;
}

.auth-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

/* ====== Auth (login) ====== */

.auth-layout {
  max-width: 950px;
  margin: 0 auto;
}

.auth-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .auth-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ====== Dashboards (student & admin) ====== */

.dashboard-shell {
  display: grid;
  gap: 1.6rem;
}

@media (min-width: 960px) {
  .dashboard-shell {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1.1fr);
  }
}

/* Progress bar */
.progress-wrapper {
  margin-top: 1rem;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 0.4rem;
}

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 111, 198, 0.12);
  overflow: hidden;
}

.progress-bar-inner {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f6fc6, #0b425f);
}

/* Module / list items reused for dashboards */
.module-list {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  display: grid;
  gap: 0.7rem;
}

.module-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(15, 111, 198, 0.02);
}

.module-item p {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.module-status {
  align-self: center;
  font-size: 0.8rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 111, 198, 0.06);
  color: var(--color-primary-dark);
  white-space: nowrap;
}

.module-item--done {
  background: rgba(46, 204, 113, 0.07);
}

.module-item--done .module-status {
  background: rgba(46, 204, 113, 0.16);
  color: #146b3d;
}

.module-item--active {
  background: rgba(255, 183, 3, 0.08);
}

.module-item--active .module-status {
  background: rgba(255, 183, 3, 0.18);
  color: #8a5a00;
}

/* Metrics (admin) */
.metrics-grid {
  display: grid;
  gap: 0.9rem;
  margin-top: 0.9rem;
}

@media (min-width: 700px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.metric {
  padding: 0.7rem 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(15, 111, 198, 0.02);
}

.metric-label {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.metric-value {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-primary-dark);
}

/* Badges (student dashboard) */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.badge-chip {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 111, 198, 0.04);
  color: var(--color-primary-dark);
}

.badge-chip--earned {
  background: rgba(46, 204, 113, 0.18);
  color: #146b3d;
}
