:root {
  color-scheme: light;
  --blue: #3442a8;
  --blue-dark: #253179;
  --sky: #eaf7ff;
  --sky-strong: #d7ecfb;
  --green: #4fb35c;
  --ink: #141720;
  --muted: #565b70;
  --paper: #ffffff;
  --line: #d8e5f1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", "Montserrat", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(100deg, rgba(218, 237, 253, 0.86) 0%, rgba(255, 255, 255, 0.95) 48%, rgba(232, 244, 255, 0.9) 100%),
    var(--sky);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1160px, calc(100% - 36px));
  margin: 18px auto 0;
  padding: 12px 16px;
  border: 1px solid rgba(52, 66, 168, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 50px rgba(52, 66, 168, 0.1);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blue);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 900;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  color: var(--blue-dark);
  font-size: 0.95rem;
  font-weight: 800;
}

.nav a {
  padding: 8px 0;
}

.section {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  min-height: calc(78vh - 82px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(280px, 29vw, 350px);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: 52px 0 40px;
}

.hero-portrait {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
  object-position: center 38%;
  border: 8px solid #fff;
  border-radius: 50%;
  box-shadow: 0 22px 54px rgba(54, 70, 178, 0.18);
}

.hero-portrait-mobile {
  display: none;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--blue);
  font-family: "Montserrat", Arial, sans-serif;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(3.1rem, 8vw, 6.7rem);
  line-height: 0.95;
  font-weight: 900;
  overflow-wrap: anywhere;
}

h2 {
  max-width: 760px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1.02;
  font-weight: 900;
}

h3 {
  font-size: 1.45rem;
  line-height: 1.12;
  font-weight: 900;
}

.lead {
  max-width: 690px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1.55;
  font-weight: 700;
}

.hero-lead {
  max-width: 720px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 700;
}

.hero-lead p {
  margin: 0 0 12px;
  font-size: 1.16rem;
}

.hero-lead ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 1.25em;
}

.hero-lead li::marker {
  color: var(--green);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border: 2px solid var(--blue);
  border-radius: 8px;
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 900;
}

.button.primary {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 16px 34px rgba(52, 66, 168, 0.22);
}

.button.ghost {
  color: var(--blue);
  background: rgba(255, 255, 255, 0.6);
}

.section-head {
  margin-bottom: 28px;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.course-card {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid rgba(52, 66, 168, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.tag {
  width: fit-content;
  margin: 0 0 18px;
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--blue);
  background: var(--sky-strong);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 0.84rem;
  font-weight: 900;
}

.course-card p:not(.tag) {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.5;
  font-weight: 700;
}

.course-card a {
  margin-top: auto;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 0.9rem;
  line-height: 1.3;
  text-align: center;
  font-weight: 900;
}

#teachers {
  margin-top: 92px;
}

.teacher-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.teacher-card-link {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid rgba(52, 66, 168, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.teacher-card-avatar,
.teacher-avatar {
  display: block;
  flex: 0 0 auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 50%;
  border: 4px solid #fff;
  background: var(--sky-strong);
  box-shadow: 0 12px 32px rgba(52, 66, 168, 0.18);
}

.teacher-card-avatar {
  width: 150px;
}

.teacher-card-link strong {
  display: block;
  margin-top: 24px;
  color: var(--blue);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 1.55rem;
  font-weight: 900;
}

.teacher-card-link small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 800;
}

.teacher-facts {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.35;
  font-weight: 700;
}

.teacher-facts li {
  position: relative;
  padding-left: 16px;
}

.teacher-facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.teacher-hero {
  min-height: calc(72vh - 82px);
  display: flex;
  align-items: center;
  padding: 74px 0 54px;
}

.teacher-hero-content {
  width: min(100%, 960px);
}

.teacher-heading {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: center;
  gap: 42px;
}

.teacher-heading .eyebrow {
  margin-bottom: 10px;
}

.teacher-heading h1 {
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 5rem);
  overflow-wrap: normal;
  word-break: normal;
}

.teacher-avatar {
  width: 240px;
}

.teacher-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.teacher-stats div,
.teacher-panel,
.materials-section {
  border: 1px solid rgba(52, 66, 168, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.teacher-stats div {
  min-height: 96px;
  padding: 16px;
}

.teacher-stats strong {
  display: block;
  color: var(--blue);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.05;
  font-weight: 900;
}

.teacher-stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.25;
  font-weight: 800;
}

.teacher-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.teacher-panel {
  padding: 12px;
}

.teacher-panel.soft-panel {
  background: linear-gradient(110deg, rgba(216, 237, 252, 0.82), rgba(255, 255, 255, 0.92));
}

.teacher-panel .eyebrow {
  margin-bottom: 6px;
  font-size: 0.62rem;
}

.teacher-panel h2 {
  font-size: 1.05rem;
  line-height: 1.15;
}

.materials-section h2 {
  font-size: clamp(1.9rem, 3vw, 3.1rem);
}

.teacher-list {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
  line-height: 1.28;
  font-weight: 800;
}

.teacher-list li {
  position: relative;
  padding-left: 18px;
}

.teacher-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -2px;
  color: var(--green);
  font-size: 0.95rem;
  font-weight: 900;
}

.materials-section {
  margin-top: 36px;
  padding: 40px;
}

.section-note {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
  font-weight: 700;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.media-pill {
  min-height: 76px;
  padding: 14px;
  border-radius: 8px;
  color: var(--blue-dark);
  background: var(--sky-strong);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.media-pill span {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.media-split {
  display: grid;
  gap: 34px;
}

.media-split h3 {
  margin: 34px 0 16px;
  color: var(--blue);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: clamp(1.45rem, 2.6vw, 2.15rem);
  line-height: 1.1;
}

.dynamic-media-grid {
  display: grid;
  gap: 18px;
}

.video-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.image-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.media-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(52, 66, 168, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 44px rgba(52, 66, 168, 0.09);
}

.media-card video,
.media-card img {
  display: block;
  width: 100%;
  background: var(--sky);
}

.media-card video {
  height: auto;
}

.media-card img {
  height: auto;
}

.media-title {
  margin: 0;
  padding: 14px 16px 16px;
  color: var(--blue-dark);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 900;
}

.media-loading,
.media-error {
  margin: 0;
  padding: 18px;
  border-radius: 8px;
  background: var(--sky-strong);
  color: var(--muted);
  font-weight: 800;
}

.media-error {
  color: #8f3142;
  background: rgba(255, 230, 235, 0.88);
}

.contact-section p {
  max-width: 660px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.55;
  font-weight: 700;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 92px;
}

.results-section .stats {
  margin-top: 0;
}

.stats div {
  min-height: 170px;
  padding: 28px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
}

.stats strong {
  display: block;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  line-height: 1;
  font-weight: 900;
}

.stats .license-stat strong {
  font-size: clamp(1.55rem, 3vw, 2.6rem);
  line-height: 1.1;
}

.stats span {
  display: block;
  margin-top: 16px;
  font-size: 1.04rem;
  line-height: 1.35;
  font-weight: 800;
}

.results-featured {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.results-gallery {
  column-count: 3;
  column-gap: 18px;
  margin-top: 18px;
}

.results-featured a,
.results-gallery a {
  display: block;
  margin-bottom: 18px;
  break-inside: avoid;
}

.results-featured img,
.results-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid rgba(52, 66, 168, 0.14);
  border-radius: 8px;
  background: #fff;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 36px;
  align-items: center;
  margin-top: 92px;
  margin-bottom: 52px;
  padding: 48px;
  border: 1px solid rgba(52, 66, 168, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.contact-links {
  display: grid;
  gap: 12px;
}

.contact-links a {
  min-height: 68px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border: 2px solid rgba(52, 66, 168, 0.16);
  border-radius: 8px;
  color: var(--blue);
  background: var(--paper);
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.contact-links a strong {
  color: var(--blue-dark);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.contact-links a span {
  min-width: 0;
}

.contact-links a small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-family: "Nunito", Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
}

@media (max-width: 880px) {
  .site-header,
  .hero,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .site-header {
    align-items: flex-start;
  }

  .hero {
    min-height: auto;
    padding-top: 54px;
  }

  .hero-portrait-desktop {
    display: none;
  }

  .hero-portrait-mobile {
    width: min(190px, 52vw);
    display: block;
    margin: 26px auto 0;
  }

  .course-grid,
  .stats,
  .teacher-grid,
  .media-grid,
  .video-grid,
  .image-grid {
    grid-template-columns: 1fr;
  }

  .teacher-hero {
    min-height: auto;
    padding-top: 54px;
  }

  .teacher-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .teacher-stats div {
    min-height: 78px;
    padding: 10px 8px;
  }

  .teacher-stats strong {
    font-size: clamp(1rem, 4.5vw, 1.35rem);
  }

  .teacher-stats span {
    margin-top: 6px;
    font-size: 0.7rem;
    line-height: 1.2;
  }

  .teacher-content,
  .materials-section {
    margin-top: 22px;
  }

  .teacher-heading {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 26px;
  }

  .teacher-avatar {
    width: 180px;
  }

  .results-gallery {
    column-count: 2;
  }

  .results-featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .site-header,
  .section {
    width: min(100% - 24px, 1160px);
  }

  .nav {
    justify-content: flex-start;
  }

  h1 {
    font-size: clamp(2.75rem, 16vw, 4.2rem);
  }

  .teacher-hero h1 {
    font-size: clamp(2.25rem, 12vw, 3.25rem);
  }

  .teacher-heading {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .teacher-avatar {
    width: 160px;
    border-width: 3px;
  }

  .teacher-heading .eyebrow {
    font-size: 0.76rem;
  }

  .teacher-heading h1 {
    font-size: clamp(1.8rem, 9vw, 2.55rem);
  }

  .lead {
    font-size: 1.12rem;
  }

  .teacher-content {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .teacher-panel {
    padding: 12px;
  }

  .actions,
  .actions .button {
    width: 100%;
  }

  .course-card,
  .contact-section {
    padding: 24px;
  }

  #teachers {
    margin-top: 64px;
  }

  .results-gallery {
    column-count: 1;
  }

  .results-featured {
    grid-template-columns: 1fr;
  }
}

.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-x: hidden;
  background: linear-gradient(135deg, #f5fbff 0%, #ffffff 58%, #eef9f3 100%);
}

.error-shell {
  width: calc(100vw - 32px);
  max-width: 680px;
  min-width: 0;
  box-sizing: border-box;
  padding: clamp(28px, 6vw, 56px);
  border: 1px solid rgba(31, 41, 55, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.error-shell .brand {
  margin-bottom: clamp(40px, 8vw, 72px);
}

.error-code {
  margin: 0 0 14px;
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
}

.error-shell h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2.4rem, 8vw, 5rem);
  overflow-wrap: anywhere;
}

.error-shell p:not(.error-code) {
  max-width: 520px;
  margin: 18px 0 30px;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.55;
}

@media (max-width: 560px) {
  .error-page {
    padding: 16px;
  }

  .error-shell {
    width: min(330px, calc(100vw - 32px));
    padding: 28px;
  }

  .error-shell .brand {
    margin-bottom: 36px;
  }

  .error-shell h1 {
    max-width: 280px;
    font-size: clamp(2rem, 10vw, 2.55rem);
  }

  .error-shell .actions {
    width: auto;
    max-width: 280px;
    flex-direction: column;
    align-items: stretch;
  }

  .error-shell p:not(.error-code) {
    max-width: 280px;
  }

  .error-shell .button {
    width: 100%;
    max-width: 280px;
    box-sizing: border-box;
    text-align: center;
  }
}
