:root {
  --ink: #071633;
  --muted: #5f6f89;
  --line: #dbe9ff;
  --paper: #ffffff;
  --sky: #f5fbff;
  --blue: #1769ff;
  --blue-dark: #0b45c6;
  --mint: #35cfa3;
  --green: #66c986;
  --yellow: #ffbd2e;
  --violet: #7c5cff;
  --coral: #ff6f61;
  --shadow: 0 20px 60px rgba(29, 76, 145, 0.12);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%, rgba(47, 128, 237, 0.1), transparent 28%),
    radial-gradient(circle at 88% 28%, rgba(53, 207, 163, 0.12), transparent 24%),
    linear-gradient(180deg, #fbfdff 0%, #f7fbff 46%, #ffffff 100%);
}

main {
  display: flex;
  flex-direction: column;
}

img {
  display: block;
  max-width: 100%;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(20px, 4vw, 64px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(203, 220, 246, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), #4aa3ff);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(23, 105, 255, 0.24);
}

.brand strong {
  display: block;
  font-size: 21px;
  line-height: 1.1;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  font-weight: 700;
}

.main-nav a {
  position: relative;
  padding: 24px 0 22px;
  color: #14213d;
}

.main-nav a::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  height: 3px;
  content: "";
  background: var(--blue);
  border-radius: 999px;
  opacity: 0;
  transform: scaleX(0.25);
  transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--blue);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  position: relative;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  border-radius: 999px;
  transition: transform 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.section-anchor {
  scroll-margin-top: 84px;
}

.hero {
  order: 1;
  position: relative;
  display: block;
  min-height: 640px;
  padding: clamp(40px, 5vw, 70px) clamp(20px, 4vw, 64px) 34px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(239, 247, 255, 0.94) 0%, rgba(247, 251, 255, 0.76) 25%, rgba(255, 255, 255, 0.08) 47%, rgba(255, 255, 255, 0) 64%),
    linear-gradient(180deg, #f8fcff 0%, #ffffff 100%);
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 96px;
  content: "";
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 660px;
  padding-top: clamp(18px, 2vw, 28px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 26px;
  max-width: 680px;
  font-size: clamp(54px, 5.65vw, 82px);
  line-height: 1.12;
  letter-spacing: 0;
}

h1 span {
  color: var(--blue);
}

.hero-lede {
  max-width: 540px;
  margin-bottom: 28px;
  color: #273855;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 30px;
  font-weight: 800;
  border-radius: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #4b9dff);
  box-shadow: 0 16px 34px rgba(23, 105, 255, 0.25);
}

.button.secondary {
  color: var(--blue);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 105, 255, 0.32);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-tags span,
.filter {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  color: #31506f;
  font-size: 14px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(205, 224, 249, 0.86);
  border-radius: 999px;
}

.hero-tags span:nth-child(2) {
  background: rgba(53, 207, 163, 0.13);
  color: #087b69;
}

.hero-tags span:nth-child(3) {
  background: rgba(124, 92, 255, 0.1);
  color: #5e48cc;
}

.hero-tags span:nth-child(4) {
  background: rgba(255, 189, 46, 0.16);
  color: #a36a00;
}

.hero-visual {
  position: absolute;
  top: 0;
  right: -150px;
  bottom: 0;
  z-index: 0;
  width: min(86vw, 1460px);
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border-bottom-left-radius: 110px;
  opacity: 0.98;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.38) 8%, #000 23%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.38) 8%, #000 23%);
}

.hero-visual img {
  width: 116%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: translateX(-14%);
}

.about-section,
.journey-section,
.topics-section,
.works-section,
.classroom-section,
.contact-section {
  padding: clamp(44px, 5.5vw, 72px) clamp(20px, 4vw, 64px);
}

.about-section {
  order: 2;
}

.works-section {
  order: 3;
}

.journey-section {
  order: 4;
}

.topics-section {
  order: 5;
}

.classroom-section {
  order: 6;
}

.contact-section {
  order: 7;
}

.section-heading {
  max-width: 860px;
  margin-bottom: 26px;
}

.about-section .section-heading {
  max-width: 1120px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.about-section {
  padding-bottom: clamp(36px, 4vw, 52px);
}

.journey-section {
  padding-top: clamp(36px, 4vw, 52px);
}

.topics-section,
.works-section,
.classroom-section {
  padding-top: clamp(40px, 5vw, 64px);
  padding-bottom: clamp(40px, 5vw, 64px);
}

.section-heading.centered {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading h2 {
  margin-bottom: 12px;
  font-size: clamp(32px, 3.5vw, 48px);
  line-height: 1.18;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: none;
  margin: 0 auto;
}

.about-grid article,
.classroom-list article {
  padding: 28px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(211, 227, 249, 0.9);
  border-radius: 22px;
  box-shadow: 0 10px 36px rgba(40, 86, 150, 0.08);
}

.about-grid strong,
.classroom-list strong {
  display: block;
  margin-bottom: 12px;
  font-size: 21px;
}

.about-grid p,
.classroom-list p,
.topic-card p,
.work-card p,
.contact-section p {
  color: var(--muted);
  line-height: 1.75;
}

.journey-section {
  background: linear-gradient(180deg, #fff, #f7fbff);
}

.journey-card {
  max-width: none;
  margin: 0 auto;
}

.journey-card > img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.journey-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: -44px;
  padding: 0 clamp(10px, 3vw, 36px);
}

.journey-steps article {
  position: relative;
  padding: 24px 22px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(205, 224, 249, 0.95);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(37, 82, 144, 0.1);
  backdrop-filter: blur(14px);
}

.journey-steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  color: #fff;
  font-weight: 900;
  background: var(--blue);
  border-radius: 14px;
}

.journey-steps article:nth-child(2) span {
  background: var(--mint);
}

.journey-steps article:nth-child(3) span {
  background: var(--violet);
}

.journey-steps article:nth-child(4) span {
  background: var(--coral);
}

.journey-steps strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.journey-steps p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.topic-card {
  min-height: 210px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.topic-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 34px;
  margin-bottom: 22px;
  padding: 0 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: var(--blue);
  border-radius: 12px;
}

.topic-card h3 {
  margin-bottom: 12px;
  font-size: 21px;
}

.topic-card.mint {
  border-color: rgba(53, 207, 163, 0.38);
  background: linear-gradient(180deg, rgba(53, 207, 163, 0.1), #fff);
}

.topic-card.violet {
  border-color: rgba(124, 92, 255, 0.32);
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.09), #fff);
}

.topic-card.blue {
  border-color: rgba(23, 105, 255, 0.28);
  background: linear-gradient(180deg, rgba(23, 105, 255, 0.09), #fff);
}

.topic-card.green {
  border-color: rgba(102, 201, 134, 0.34);
  background: linear-gradient(180deg, rgba(102, 201, 134, 0.1), #fff);
}

.topic-card.amber {
  border-color: rgba(255, 189, 46, 0.45);
  background: linear-gradient(180deg, rgba(255, 189, 46, 0.12), #fff);
}

.topic-card.coral {
  border-color: rgba(255, 111, 97, 0.35);
  background: linear-gradient(180deg, rgba(255, 111, 97, 0.1), #fff);
}

.topic-card.violet span {
  background: var(--violet);
}

.topic-card.green span {
  background: var(--green);
}

.topic-card.amber span {
  background: var(--yellow);
  color: #6b4300;
}

.topic-card.coral span {
  background: var(--coral);
}

.principles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 28px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

.principles article {
  padding: 24px;
  border-right: 1px solid var(--line);
}

.principles article:last-child {
  border-right: 0;
}

.principles strong {
  display: block;
  margin-bottom: 8px;
}

.principles p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.works-section {
  background:
    linear-gradient(180deg, rgba(247, 251, 255, 0.8), #fff),
    radial-gradient(circle at 16% 20%, rgba(255, 189, 46, 0.12), transparent 22%);
}

.works-section .section-heading {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.filter {
  cursor: pointer;
  min-height: 42px;
  color: #31415f;
  font-family: inherit;
}

.filter.active,
.filter:hover {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

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

.work-card {
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  border: 1px solid rgba(210, 226, 248, 0.95);
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(36, 81, 143, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.work-card[hidden] {
  display: none;
}

.work-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 44px rgba(36, 81, 143, 0.14);
}

.work-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.work-body {
  padding: 18px;
}

.work-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.badge {
  padding: 5px 9px;
  color: var(--blue);
  background: rgba(23, 105, 255, 0.1);
  border-radius: 999px;
}

.work-card h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

.work-card p {
  margin-bottom: 0;
  font-size: 14px;
}

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

.classroom-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  color: var(--blue);
  font-weight: 900;
  background: rgba(23, 105, 255, 0.1);
  border-radius: 14px;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 30px;
  align-items: center;
  margin: 0 clamp(20px, 4vw, 64px) 48px;
  padding: clamp(34px, 5vw, 56px);
  background: linear-gradient(135deg, #0d5df5, #38c9a5);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.contact-section,
.contact-section .eyebrow,
.contact-section p {
  color: #fff;
}

.contact-section h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 48px);
}

.contact-section p {
  max-width: 680px;
  margin-bottom: 0;
  opacity: 0.9;
}

.email-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  color: var(--blue-dark);
  font-weight: 900;
  background: #fff;
  border-radius: 16px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 4vw, 64px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 800;
  color: var(--blue);
}

.work-dialog {
  width: min(920px, calc(100vw - 32px));
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 0;
  border-radius: 26px;
  box-shadow: 0 30px 80px rgba(8, 29, 66, 0.24);
}

.work-dialog::backdrop {
  background: rgba(7, 22, 51, 0.36);
  backdrop-filter: blur(5px);
}

.work-dialog img {
  width: 100%;
  max-height: 430px;
  object-fit: cover;
}

.dialog-body {
  padding: 28px;
}

.dialog-body h3 {
  margin-bottom: 12px;
  font-size: 30px;
}

.dialog-body p,
.dialog-body dd {
  color: var(--muted);
  line-height: 1.75;
}

.dialog-body dl {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin: 24px 0 0;
}

.dialog-body dt {
  margin-bottom: 6px;
  font-weight: 900;
}

.dialog-body dd {
  margin: 0;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(210, 226, 248, 0.9);
  border-radius: 50%;
}

@media (max-width: 1120px) {
  .hero {
    padding-top: 38px;
  }

  .hero-copy {
    max-width: 620px;
  }

  .hero-visual {
    width: 86vw;
    min-height: 0;
    margin: 0;
    opacity: 0.82;
  }

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

  .journey-steps,
  .principles {
    grid-template-columns: repeat(2, 1fr);
  }

  .principles article:nth-child(2) {
    border-right: 0;
  }

  .principles article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 820px) {
  .site-header {
    min-height: 64px;
  }

  .brand strong {
    font-size: 18px;
  }

  .brand small {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 64px;
    right: 16px;
    left: 16px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .main-nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .menu-button[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .menu-button[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .menu-button[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .main-nav a {
    padding: 14px;
    border-radius: 12px;
  }

  .main-nav a::after {
    display: none;
  }

  .main-nav a:hover,
  .main-nav a.active {
    background: rgba(23, 105, 255, 0.08);
  }

  .hero {
    min-height: auto;
    padding-bottom: 24px;
  }

  h1 {
    font-size: clamp(44px, 13vw, 64px);
  }

  .hero-visual {
    position: relative;
    right: auto;
    left: auto;
    width: auto;
    min-height: 330px;
    margin: 26px calc(clamp(20px, 4vw, 64px) * -1) 0 0;
    border-bottom-left-radius: 52px;
    opacity: 1;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .hero-visual img {
    width: 100%;
    max-width: 100%;
    object-position: 62% center;
    transform: none;
  }

  .about-grid,
  .classroom-list,
  .topic-grid,
  .work-grid,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .journey-card > img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: center;
  }

  .journey-steps {
    grid-template-columns: 1fr;
    margin-top: 18px;
    padding: 0;
  }

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

  .principles article,
  .principles article:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .principles article:last-child {
    border-bottom: 0;
  }

  .contact-section {
    margin-right: 20px;
    margin-left: 20px;
  }

  .email-link {
    width: 100%;
    word-break: break-all;
    font-size: clamp(14px, 4.5vw, 18px);
    text-align: center;
  }

  .work-dialog[open] {
    max-height: 85vh;
    display: flex;
    flex-direction: column;
  }

  .work-dialog img {
    max-height: 220px;
    flex-shrink: 0;
  }

  .dialog-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
  }

  .dialog-body dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding-right: 16px;
    padding-left: 16px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .button {
    width: 100%;
  }

  .hero-tags span {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }

  .hero-visual {
    min-height: 280px;
  }

  .about-section,
  .journey-section,
  .topics-section,
  .works-section,
  .classroom-section,
  .contact-section {
    padding-right: 18px;
    padding-left: 18px;
  }

  .filter {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }
}
