:root {
  --paper: #fffdf8;
  --paper-soft: #f8f5ec;
  --canvas: #edf7f3;
  --ink: #17352d;
  --ink-soft: #46635b;
  --ink-muted: #5e756d;
  --pine: #176b57;
  --pine-dark: #0f5142;
  --mint: #ccebdd;
  --mint-soft: #e7f5ee;
  --coral: #e87355;
  --coral-soft: #fff0e9;
  --sun: #efb840;
  --sun-soft: #fff7dc;
  --danger: #bd3e39;
  --border: #dce7df;
  --border-strong: #c8d9cf;
  --shadow-sm: 0 2px 8px rgba(25, 71, 59, 0.06);
  --shadow-md: 0 16px 40px rgba(25, 71, 59, 0.09);
  --transition: 200ms ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(23, 107, 87, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 107, 87, 0.035) 1px, transparent 1px),
    var(--canvas);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid rgba(232, 115, 85, 0.45);
  outline-offset: 3px;
}
.container { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }

/* Header */
.header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid rgba(200, 217, 207, 0.82);
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 13px 13px 13px 4px;
  background: var(--pine);
  box-shadow: 4px 4px 0 var(--mint);
}
.logo-mark svg {
  width: 23px;
  fill: none;
  stroke: white;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.logo-copy { display: flex; flex-direction: column; line-height: 1.15; }
.logo-copy strong { font-family: Lora, Georgia, serif; font-size: 1.08rem; }
.logo-copy small {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.badge {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-accent { border: 1px solid #f5d68e; background: var(--sun-soft); color: #76520a; }

/* Page heading */
.main { padding: 54px 0 80px; }
.page-intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 56px;
  align-items: end;
  margin-bottom: 70px;
  padding: 42px 48px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 32px 32px 32px 8px;
  background: var(--paper);
  box-shadow: var(--shadow-md);
}
.page-intro::before {
  position: absolute; top: 0; bottom: 0; left: 0; width: 8px; background: var(--coral); content: "";
}
.page-intro::after {
  position: absolute;
  width: 160px;
  height: 160px;
  right: -55px;
  top: -70px;
  border: 26px solid var(--mint-soft);
  border-radius: 50%;
  content: "";
}
.eyebrow, .section-kicker, .card-kicker {
  color: var(--pine);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.page-intro h1 {
  max-width: 760px;
  margin-top: 10px;
  font-family: Lora, Georgia, serif;
  font-size: clamp(2.5rem, 4.6vw, 4.15rem);
  letter-spacing: -0.045em;
  line-height: 1.08;
}
.page-intro h1 span { color: var(--pine); }
.intro-copy {
  max-width: 670px;
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.75;
}
.intro-status {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 174px;
  flex-direction: column;
  justify-content: center;
  border-radius: 22px 22px 22px 6px;
  padding: 24px;
  background: var(--pine);
  color: white;
}
.status-label {
  align-self: flex-start;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.intro-status strong { margin-top: 8px; font-family: Lora, Georgia, serif; font-size: 2.55rem; line-height: 1.2; }
.intro-status strong small { font-family: "Be Vietnam Pro", sans-serif; font-size: 0.78rem; font-weight: 500; opacity: 0.75; }
.intro-status > span:last-child { margin-top: 4px; color: #ccebdd; font-size: 0.75rem; }

/* Sections and cards */
.section { margin-bottom: 76px; scroll-margin-top: 100px; }
.section-header { display: flex; align-items: center; gap: 16px; margin-bottom: 25px; }
.section-number {
  width: 54px;
  height: 54px;
  display: grid;
  flex: 0 0 54px;
  place-items: center;
  border: 1px solid #f0cbbc;
  border-radius: 50%;
  background: var(--coral-soft);
  color: var(--coral);
  font-family: Lora, Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
}
.section-title {
  margin-top: 2px;
  font-family: Lora, Georgia, serif;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.student-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 24px; align-items: start; }
.card, .module-card { border: 1px solid var(--border); background: var(--paper); box-shadow: var(--shadow-sm); }
.card { border-radius: 24px 24px 24px 7px; padding: 30px; }

/* Profile */
.profile-card { display: flex; flex-direction: column; }
.profile-topline { display: flex; align-items: center; gap: 18px; padding-bottom: 28px; border-bottom: 1px dashed var(--border-strong); }
.avatar-circle {
  width: 76px;
  height: 76px;
  display: grid;
  flex: 0 0 76px;
  place-items: center;
  border: 5px solid white;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 2px #f0cbbc;
  color: white;
  font-family: Lora, Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
}
.profile-heading span { color: var(--ink-muted); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.profile-name { margin-top: 4px; font-family: Lora, Georgia, serif; font-size: 1.45rem; line-height: 1.3; }
.profile-details { display: grid; margin-top: 18px; }
.detail-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
  gap: 20px;
  align-items: baseline;
  min-width: 0;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: .96rem;
}
.detail-item:last-child { border-bottom: 0; }
.detail-label { color: var(--ink-muted); }
.detail-value { min-width: 0; color: var(--ink); font-weight: 600; text-align: right; overflow-wrap: anywhere; }

/* Skill chart */
.skills-card { display: flex; flex-direction: column; }
.skills-header, .progress-header, .modal-header, .modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card-title, .course-note h3 { margin-top: 3px; font-family: Lora, Georgia, serif; font-size: 1.32rem; }
.btn-edit {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 8px 13px;
  background: white;
  color: var(--pine);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 700;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.btn-edit svg { width: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.btn-edit:hover { border-color: var(--pine); background: var(--mint-soft); }
.chart-container { display: flex; align-items: center; justify-content: center; min-height: 292px; margin: 6px 0 12px; }
#skillsChart { display: block; max-width: 290px; max-height: 290px; }
.skills-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.skill-item {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 10px;
  padding: 9px 11px;
  background: var(--paper-soft);
  font-size: .84rem;
}
.skill-name { min-width: 0; color: var(--ink-soft); overflow-wrap: anywhere; }
.skill-score { flex: 0 0 auto; font-weight: 700; }
.skill-score.high { color: var(--pine); }
.skill-score.mid { color: #8b5f08; }
.skill-score.low { color: var(--danger); }

/* Course summary */
.course-note { margin-bottom: 20px; padding: 34px; }
.course-note-heading { display: grid; grid-template-columns: 1fr auto; gap: 36px; align-items: center; margin-bottom: 23px; }
.note-grid { display: flex; align-items: center; gap: 24px; }
.note-stat { min-width: 82px; text-align: center; }
.stat-number { display: block; color: var(--pine); font-family: Lora, Georgia, serif; font-size: 2.15rem; font-weight: 700; line-height: 1.15; }
.stat-label { color: var(--ink-muted); font-size: .82rem; font-weight: 600; }
.note-divider { width: 1px; height: 45px; background: var(--border-strong); }
.note-desc { max-width: 820px; color: var(--ink-soft); font-size: 1rem; line-height: 1.8; }
.note-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 21px; }
.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 5px 11px;
  background: var(--mint-soft);
  color: var(--pine-dark);
  font-size: .82rem;
  font-weight: 600;
}
.tag::before { width: 5px; height: 5px; flex: 0 0 5px; margin-right: 7px; border-radius: 50%; background: var(--pine); content: ""; }
.tag-warning { border-color: #f3d18c; background: var(--sun-soft); color: #76520a; }
.tag-warning::before { background: var(--sun); }
.progress-card { margin-bottom: 20px; border-color: #bcd9cc; padding: 22px 26px; background: #f6fcf8; }
.progress-label { font-size: .94rem; font-weight: 700; }
.progress-value { color: var(--pine); font-size: .88rem; font-weight: 700; }
.progress-bar { height: 9px; margin-top: 12px; overflow: hidden; border-radius: 999px; background: #dceae3; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--coral); transition: width 500ms ease-out; }

/* Curriculum */
.modules-list { display: flex; flex-direction: column; gap: 12px; }
.module-card { overflow: hidden; border-radius: 16px; transition: border-color var(--transition), box-shadow var(--transition); }
.module-card:hover, .module-card.open { border-color: #abcfc0; box-shadow: 0 8px 24px rgba(25, 71, 59, .07); }
.module-card.completed { border-color: #9ac8b4; background: #f8fdf9; }
.module-card.final-module { border-color: #eed18d; background: #fffdf5; }
.module-header {
  width: 100%;
  min-height: 96px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 18px;
  align-items: center;
  border: 0;
  padding: 20px 24px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
}
.module-header:hover { background: rgba(231, 245, 238, .55); }
.module-info { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 8px 20px; align-items: center; min-width: 0; }
.module-badge {
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--mint-soft);
  color: var(--pine-dark);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.module-badge.done { border: 1px solid #b4d9c8; background: white; color: var(--pine); text-transform: none; }
.module-badge.final { background: var(--sun-soft); color: #76520a; text-transform: none; }
.module-title { min-width: 0; font-family: Lora, Georgia, serif; font-size: 1.1rem; line-height: 1.45; }
.module-meta { color: var(--ink-muted); font-size: .8rem; font-weight: 500; white-space: nowrap; }
.module-chevron {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--pine);
  font-size: 1rem;
  transition: transform var(--transition), background var(--transition);
}
.module-card.open .module-chevron { transform: rotate(180deg); background: var(--mint-soft); }
.module-content { max-height: 0; overflow: hidden; transition: max-height 350ms ease-out; }
.module-card.open .module-content { max-height: 2200px; }
.session-list { display: flex; flex-direction: column; gap: 20px; margin: 0 24px; padding: 24px 0 26px 132px; border-top: 1px dashed var(--border-strong); }
.session { position: relative; display: flex; gap: 14px; }
.session-marker {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  margin-top: 7px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 1px var(--coral);
}
.session.done .session-marker { background: var(--pine); box-shadow: 0 0 0 1px var(--pine); }
.session:not(:last-child)::before { position: absolute; top: 22px; bottom: -20px; left: 5px; width: 1px; background: var(--border-strong); content: ""; }
.session-body { min-width: 0; flex: 1; }
.session-body h4 { margin-bottom: 8px; color: var(--ink); font-size: 1rem; font-weight: 700; }
.session-body ul { display: grid; gap: 5px; list-style: none; }
.session-body li { position: relative; padding-left: 16px; color: var(--ink-soft); font-size: .92rem; line-height: 1.65; }
.session-body li::before { position: absolute; top: .72em; left: 1px; width: 5px; height: 5px; border-radius: 50%; background: var(--mint); content: ""; }

/* Note, footer, modal */
.note-important { display: flex; gap: 16px; align-items: flex-start; margin-top: 20px; border-color: #f0d18f; background: var(--sun-soft); }
.note-important-icon { width: 42px; height: 42px; display: grid; flex: 0 0 42px; place-items: center; border-radius: 50%; background: white; color: #8d620c; }
.note-important-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }
.note-important h4 { color: #76520a; font-family: Lora, Georgia, serif; font-size: 1rem; }
.note-important p { margin-top: 5px; color: #654f23; font-size: .94rem; line-height: 1.7; }
.footer { border-top: 1px solid var(--border-strong); padding: 28px 0; background: var(--paper); }
.footer .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.footer-text, .footer-mentor { color: var(--ink-muted); font-size: .82rem; }
.footer-text span { margin: 0 6px; color: var(--coral); }
.footer-mentor strong { color: var(--ink); }

.modal-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(23, 53, 45, .55);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal {
  width: min(500px, 100%);
  max-height: min(760px, 90vh);
  overflow-y: auto;
  border: 1px solid var(--border-strong);
  border-radius: 24px 24px 24px 7px;
  background: var(--paper);
  box-shadow: 0 30px 80px rgba(15, 57, 46, .28);
  transform: translateY(16px);
  transition: transform var(--transition);
}
.modal-overlay.active .modal { transform: translateY(0); }
.modal-header { padding: 24px 26px; border-bottom: 1px solid var(--border); }
.modal-header h3 { margin-top: 3px; font-family: Lora, Georgia, serif; font-size: 1.2rem; }
.modal-close { width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid var(--border); border-radius: 50%; background: var(--paper-soft); color: var(--ink-soft); cursor: pointer; font-size: 1.45rem; line-height: 1; }
.modal-close:hover { background: var(--coral-soft); color: var(--coral); }
.modal-body { display: grid; gap: 17px; padding: 24px 26px; }
.form-group { display: grid; gap: 7px; }
.form-label { color: var(--ink-soft); font-size: .78rem; font-weight: 600; }
.form-input-row { display: flex; align-items: center; gap: 12px; }
.form-range {
  min-width: 0;
  height: 44px;
  flex: 1;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(#dceae3, #dceae3) center / 100% 7px no-repeat;
  cursor: pointer;
}
.form-range::-webkit-slider-thumb { width: 22px; height: 22px; border: 4px solid white; border-radius: 50%; appearance: none; -webkit-appearance: none; background: var(--pine); box-shadow: 0 0 0 1px var(--pine); }
.form-range::-moz-range-thumb { width: 15px; height: 15px; border: 4px solid white; border-radius: 50%; background: var(--pine); box-shadow: 0 0 0 1px var(--pine); }
.form-value { width: 42px; border-radius: 8px; padding: 6px; background: var(--mint-soft); color: var(--pine); font-size: .86rem; font-weight: 700; text-align: center; }
.modal-footer { padding: 0 26px 25px; }
.btn { min-height: 44px; border: 1px solid transparent; border-radius: 999px; padding: 9px 18px; cursor: pointer; font-size: .78rem; font-weight: 700; transition: background var(--transition), border-color var(--transition), color var(--transition); }
.btn-secondary { border-color: var(--border-strong); background: white; color: var(--ink-soft); }
.btn-secondary:hover { background: var(--paper-soft); }
.btn-primary { background: var(--pine); color: white; }
.btn-primary:hover { background: var(--pine-dark); }

/* Responsive */
@media (max-width: 900px) {
  .page-intro { grid-template-columns: 1fr; gap: 30px; }
  .intro-status { min-height: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 18px; align-items: center; }
  .intro-status strong { grid-row: span 2; margin: 0; }
  .student-grid { grid-template-columns: 1fr; }
  .module-info { grid-template-columns: 104px minmax(0, 1fr); }
  .module-meta { grid-column: 2; }
  .session-list { padding-left: 124px; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 32px), 1120px); }
  .header-inner { min-height: 68px; }
  .logo-mark { width: 38px; height: 38px; flex-basis: 38px; }
  .logo-copy small { display: none; }
  .badge { min-height: 34px; padding-inline: 11px; }
  .main { padding: 30px 0 56px; }
  .page-intro { margin-bottom: 52px; padding: 30px 24px 25px 28px; border-radius: 24px 24px 24px 7px; }
  .page-intro h1 { font-size: clamp(2.25rem, 11vw, 3.2rem); }
  .intro-copy { font-size: 1rem; }
  .intro-status { padding: 19px; }
  .section { margin-bottom: 54px; }
  .section-header { align-items: flex-start; }
  .section-number { width: 46px; height: 46px; flex-basis: 46px; font-size: .9rem; }
  .section-title { font-size: 1.55rem; }
  .card { border-radius: 20px 20px 20px 6px; padding: 22px; }
  .profile-topline { gap: 15px; }
  .avatar-circle { width: 64px; height: 64px; flex-basis: 64px; font-size: 1.25rem; }
  .profile-name { font-size: 1.3rem; }
  .detail-item { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 12px; }
  .btn-edit span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .btn-edit { width: 44px; justify-content: center; padding: 0; }
  .chart-container { min-height: 260px; }
  #skillsChart { max-width: 260px; max-height: 260px; }
  .skills-list { grid-template-columns: 1fr; }
  .course-note { padding: 24px 22px; }
  .course-note-heading { grid-template-columns: 1fr; gap: 22px; }
  .note-grid { justify-content: flex-start; }
  .note-tags { align-items: flex-start; flex-direction: column; }
  .tag { white-space: normal; }
  .progress-card { padding: 20px; }
  .module-header { min-height: 0; grid-template-columns: minmax(0, 1fr) 40px; gap: 12px; padding: 18px; }
  .module-info { grid-template-columns: 1fr; gap: 5px; }
  .module-badge { justify-self: start; }
  .module-meta { grid-column: 1; }
  .session-list { margin: 0 18px; padding: 20px 0 22px; }
  .note-important { padding: 21px; }
  .footer .container { align-items: flex-start; flex-direction: column; gap: 5px; }
  .footer-text span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
