:root {
  color-scheme: light;
  --accent: #bc361e;
  --warm: #f28a44;
  --ink: #272019;
  --paper: #fff8f0;
  --muted: color-mix(in srgb, var(--ink) 76%, white);
  --line: color-mix(in srgb, var(--ink) 12%, var(--paper));
  --accent-on-paper: color-mix(in srgb, var(--accent) 88%, var(--ink));
  --gutter: clamp(20px, 5.5vw, 80px);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.65; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }

.container {
  width: min(1200px, calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 10px 14px;
  background: white;
  transform: translateY(-150%);
}

.skip-link:focus { transform: none; }
.load-message { padding: 24px var(--gutter); }
#main:focus { outline: none; }

.site-header { background: white; border-bottom: 1px solid var(--line); }
.header-inner {
  min-height: 84px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand { justify-self: start; display: block; font-size: 21px; font-weight: 800; }
.brand img { width: 166px; height: auto; }
.header-inner nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 30px; }
.header-inner nav a {
  padding-block: 8px;
  font-size: 14px;
  font-weight: 650;
  color: var(--muted);
}
.header-inner nav a:hover, .site-footer a:hover { color: var(--accent-on-paper); }

.button {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 21px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 720;
  font-size: 14px;
  white-space: nowrap;
}
.button-outline {
  justify-self: end;
  background: white;
  min-height: 42px;
  border-color: var(--line);
}
.button-outline:hover { border-color: var(--accent); color: var(--accent-on-paper); }
.button-primary { color: white; background: var(--accent-on-paper); }
.button-primary:hover { background: color-mix(in srgb, var(--accent) 72%, var(--ink)); }
.arrow-diagonal { font-size: 16px; line-height: 1; }
.arrow-right { font-size: 20px; line-height: 1; }

.hero {
  background:
    radial-gradient(ellipse at 92% 18%, color-mix(in srgb, var(--warm) 11%, var(--paper)), transparent 54%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(35px, 6vw, 94px);
  padding-block: clamp(56px, 6.2vw, 94px);
}
.hero-copy { min-width: 0; }
.hero-campus {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.13em;
}
.campus-dot { width: 9px; height: 9px; background: var(--accent); border-radius: 3px; }
.hero h1 {
  margin-block: 19px 22px;
  font-weight: 850;
  font-size: clamp(42px, 5.4vw, 77px);
  letter-spacing: -0.025em;
  line-height: 1.16;
  overflow-wrap: anywhere;
}
.hero-accent { display: block; color: var(--accent-on-paper); }
.hero-description {
  max-width: 27em;
  margin-bottom: 29px;
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.85;
  color: var(--muted);
}

.hero-visual {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1.34;
  container-type: inline-size;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--warm) 30%, var(--paper));
  border-radius: 25px;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--accent) 20%, transparent) 1px, transparent 1.5px) 0 0 / 16px 16px,
    linear-gradient(145deg, color-mix(in srgb, var(--warm) 8%, var(--paper)), color-mix(in srgb, var(--warm) 23%, var(--paper)));
}
.art-tile {
  position: absolute;
  aspect-ratio: 1;
  border-radius: 16%;
}
.tile-outline {
  left: 6%;
  top: 9%;
  width: 18%;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.tile-raised {
  right: 19%;
  top: 12%;
  width: 15%;
  background: color-mix(in srgb, var(--warm) 26%, white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}
.tile-accent {
  right: 9%;
  top: 7%;
  width: 12%;
  background: linear-gradient(150deg, var(--warm), var(--accent));
  box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 20%, transparent);
}
.tile-small {
  bottom: 12%;
  left: 12%;
  width: 6%;
  background: color-mix(in srgb, var(--warm) 59%, white);
}
.tile-outline-bottom {
  bottom: 8%;
  left: 21%;
  width: 8%;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
}
.editor-art {
  position: absolute;
  top: 16%;
  left: 10%;
  width: 61%;
  color: #fff7ed;
  background: #292420;
  border: 1px solid #473a32;
  border-radius: clamp(10px, 3cqw, 19px);
  box-shadow: 0 24px 50px #56231931, 0 2px 4px #5623192b;
  overflow: hidden;
}
.editor-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 4px;
  padding: 2.2cqw 3cqw;
  border-bottom: 1px solid #4d3f36;
  color: #ead9c8;
  font-size: clamp(9px, 2.1cqw, 13px);
  line-height: 1.25;
}
.window-dots { display: flex; gap: 0.85cqw; align-items: center; }
.window-dots i { width: 1.35cqw; aspect-ratio: 1; border-radius: 50%; background: #9a8171; }
.window-dots i:first-child { background: #f49365; }
.window-dots i:nth-child(2) { background: #e9b68d; }
.code-mark { justify-self: end; color: #ffc29a; font-family: ui-monospace, monospace; }
.editor-blocks {
  display: grid;
  justify-items: start;
  gap: 1.7cqw;
  padding: 4cqw 3.7cqw 5.2cqw;
}
.code-block {
  display: flex;
  align-items: center;
  gap: 1.25cqw;
  min-width: 33cqw;
  padding: 1.28cqw 2cqw;
  color: #3b241c;
  border-radius: 1.3cqw;
  box-shadow: inset 0 -2px #3b241c24;
  font-size: clamp(10px, 2.55cqw, 16px);
  font-weight: 750;
  line-height: 1.2;
}
.code-block b {
  font-family: "Consolas", monospace;
  padding: 0.28cqw 1.2cqw;
  border-radius: 0.85cqw;
  background: #fffdf4bb;
}
.block-repeat { background: color-mix(in srgb, var(--warm) 80%, white); }
.block-move { margin-left: 3cqw; background: color-mix(in srgb, var(--accent) 38%, white); }
.block-turn { margin-left: 3cqw; background: color-mix(in srgb, var(--warm) 32%, white); }
.output-art {
  position: absolute;
  right: 7%;
  bottom: 9%;
  width: 36%;
  padding: 2.1cqw;
  background: #fffdfa;
  border: 1px solid #fff;
  border-radius: clamp(10px, 2.65cqw, 17px);
  box-shadow: 0 16px 36px #56231923;
}
.output-toolbar {
  display: flex;
  align-items: center;
  gap: 1cqw;
  color: #523b30;
  font-size: clamp(9px, 2.1cqw, 13px);
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 1.9cqw;
}
.output-dot { width: 1.2cqw; height: 1.2cqw; border-radius: 50%; background: var(--accent); }
.output-grid {
  display: grid;
  place-items: center;
  aspect-ratio: 1.25;
  border: 1px solid #f3e2d4;
  border-radius: 1.25cqw;
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent calc(3cqw - 1px), #f4e3d6 calc(3cqw - 1px), #f4e3d6 3cqw),
    repeating-linear-gradient(90deg, #fffcf8 0, #fffcf8 calc(3cqw - 1px), #f4e3d6 calc(3cqw - 1px), #f4e3d6 3cqw);
}
.drawn-square {
  position: relative;
  width: 41%;
  aspect-ratio: 1;
  border: 2px dashed var(--accent);
  border-radius: 0.6cqw;
  background: color-mix(in srgb, var(--warm) 20%, transparent);
}
.drawn-square i {
  width: 1.35cqw;
  aspect-ratio: 1;
  position: absolute;
  border-radius: 26%;
  background: var(--accent);
}
.drawn-square i:nth-child(1) { top: 0; left: 0; transform: translate(-50%, -50%); }
.drawn-square i:nth-child(2) { top: 0; right: 0; transform: translate(50%, -50%); }
.drawn-square i:nth-child(3) { bottom: 0; left: 0; transform: translate(-50%, 50%); }
.drawn-square i:nth-child(4) { bottom: 0; right: 0; transform: translate(50%, 50%); }

.section { padding-block: clamp(42px, 5.1vw, 75px); border-bottom: 1px solid var(--line); }
.section h2 {
  font-size: clamp(29px, 3vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.24;
  overflow-wrap: anywhere;
}
.section-copy { max-width: 42em; color: var(--muted); font-size: 16px; line-height: 1.9; overflow-wrap: anywhere; }
.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--accent-on-paper);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
}
.section-label::before { content: ""; width: 18px; height: 2px; background: var(--accent); }
.about { background: white; }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: 20px 9%;
}
.about-photo { margin-top: 20px; }
.campus-photo { width: 100%; border-radius: 16px; }
.courses .section-copy { margin-top: 12px; }
.course-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  margin-top: 23px;
  padding: 18px 24px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 22%, white);
  border-radius: 14px;
  color: var(--muted);
}
.empty-mark {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  grid-template-columns: repeat(2, 6px);
  grid-template-rows: repeat(2, 6px);
  place-content: center;
  gap: 3px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--warm) 19%, white);
}
.empty-mark i { background: var(--accent); border-radius: 2px; }
.empty-mark i:nth-child(2) { opacity: 0.65; }
.empty-mark i:nth-child(3) { opacity: 0.45; }
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 265px), 1fr));
  gap: 18px;
  padding: 0;
  margin: 23px 0 0;
  list-style: none;
}
.course-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: white;
  overflow-wrap: anywhere;
}
.course-card-body { padding: 21px; }
.course-card h3 { font-size: 19px; line-height: 1.35; }
.course-card p { margin-top: 8px; color: var(--muted); }
.course-image { width: 100%; aspect-ratio: 1.85; object-fit: cover; }

.contact { background: white; }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr) auto;
  align-items: start;
  gap: 20px 6%;
}
.contact dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 18px; }
.contact dt { font-weight: 700; }
.contact dd { overflow-wrap: anywhere; color: var(--muted); }
.contact-visual { max-width: min(100%, 150px); height: auto; border-radius: 10px; }
.site-footer { background: white; color: var(--muted); }
.footer-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.footer-inner p { font-weight: 700; }
.footer-inner a { padding-block: 8px; font-size: 14px; }

@media (max-width: 850px) {
  .header-inner { gap: 16px; min-height: 76px; }
  .brand img { width: 143px; }
  .header-inner nav { gap: 6px 18px; }
  .hero-grid { gap: 30px; }
}

@media (max-width: 680px) {
  .header-inner { grid-template-columns: 1fr auto; gap: 0 12px; padding-block: 5px; }
  .header-inner nav {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 8px 23px;
    border-top: 1px solid var(--line);
  }
  .button-outline { padding-inline: 11px; gap: 7px; font-size: 13px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); padding-block: 34px 31px; }
  .hero h1 { font-size: clamp(40px, 10vw, 57px); margin-block: 15px 15px; }
  .hero-description { margin-bottom: 21px; }
  .hero-visual { border-radius: 18px; }
  .about-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .course-empty { min-height: 78px; padding: 14px 16px; }
}

@media (max-width: 360px) {
  .brand img { width: 125px; }
  .header-inner nav { gap: 6px 14px; }
}
