@font-face {
  font-family: "Google Sans";
  src: url("assets/fonts/google-sans-light-grade.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.studio-document {
  --nav-courses-color: #f6dfa0;
  --nav-main-color: #cbbaff;
  --nav-editor-color: #a5e7ab;
  --bilibili-color: #6dd9f2;
  --youtube-color: #ff626c;
}

.studio-document[data-theme="light"] {
  color-scheme: light;
  --page: #f8f8fc;
  --ink: #212132;
  --muted: #555467;
  --line: #dad9e5;
  --surface: #fff;
  --accent: #5542a2;
  --on-accent: #fff;
  --nav-courses-color: #c4972d;
  --nav-main-color: #9076c7;
  --nav-editor-color: #4f965f;
  --bilibili-color: #0c7895;
  --youtube-color: #c62545;
}

.studio {
  --wrap: 1184px;
}

.studio-logo {
  width: 23px;
  height: 28px;
}

[data-theme="light"] .hero-logo {
  filter: brightness(0);
}

.studio-header .header-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
}

.studio-header .brand {
  min-width: 44px;
  min-height: 44px;
}

.studio-header .studio-nav {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
}

.studio-nav-main,
.studio-nav-social {
  display: flex;
  align-items: center;
  gap: clamp(15px, 2.8vw, 37px);
}

.studio-nav-main {
  justify-content: center;
}

.studio-nav-social {
  gap: clamp(12px, 2vw, 22px);
}

.studio-nav a {
  gap: 6px;
}

.nav-section-logo {
  flex: none;
  width: 15px;
  height: 18px;
  color: var(--section-mark);
}

.nav-courses { --section-mark: var(--nav-courses-color); }
.nav-main { --section-mark: var(--nav-main-color); }
.nav-editor { --section-mark: var(--nav-editor-color); }
.nav-github { --section-mark: #5798f2; }

.studio-nav-main a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--section-mark);
  text-underline-offset: 5px;
}

.studio-nav-social svg {
  flex: none;
  width: 17px;
  height: 17px;
}

.nav-bilibili svg {
  color: var(--bilibili-color);
}

.nav-youtube svg {
  color: var(--youtube-color);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.theme-toggle .theme-moon,
[data-theme="light"] .theme-toggle .theme-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .theme-moon {
  display: block;
}

.studio-intro {
  padding-top: clamp(39px, 5.6vw, 79px);
}

.studio-intro-copy {
  text-align: center;
}

.studio-intro h1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 1.4vw, 18px);
  font-family: "Google Sans", "Helvetica Neue", sans-serif;
  font-size: clamp(1.75rem, 3.2vw, 2.875rem);
  font-weight: 400;
  font-variation-settings: "GRAD" -50;
  line-height: 1.06;
  letter-spacing: .06em;
}

.hero-logo {
  width: auto;
  height: clamp(72px, 8.9vw, 114px);
}

.studio-credentials {
  margin-top: 20px;
  color: var(--ink);
  font-weight: 650;
}

.studio-credentials span {
  padding-inline: .26em;
  color: var(--accent);
}

.studio-lead {
  max-width: 41em;
  margin: 8px auto 0;
  color: var(--muted);
  text-wrap: pretty;
}

.course-mosaic {
  --shear: clamp(27px, 7.7vw, 108px);
  position: relative;
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 2px;
  aspect-ratio: 3.25;
  overflow: hidden;
  margin-top: clamp(25px, 3.35vw, 43px);
  border-radius: 10px;
  background: var(--page);
  isolation: isolate;
}

.mosaic-row {
  display: grid;
  grid-template-columns: repeat(var(--mosaic-columns, 5), minmax(0, 1fr));
  min-height: 0;
}

.mosaic-slice {
  position: relative;
  min-width: 0;
  margin-inline-end: calc(-1 * var(--shear));
  clip-path: polygon(var(--shear) 0, calc(100% - 2px) 0, calc(100% - var(--shear) - 2px) 100%, 0 100%);
}

.mosaic-slice:first-child {
  clip-path: polygon(0 0, calc(100% - 2px) 0, calc(100% - var(--shear) - 2px) 100%, 0 100%);
}

.mosaic-slice:last-child {
  clip-path: polygon(var(--shear) 0, 100% 0, 100% 100%, 0 100%);
}

.mosaic-row:last-child {
  --shear: clamp(17px, 5.6vw, 80px);
  transform: translateX(calc(-.42 * var(--shear)));
}

.mosaic-row:last-child .mosaic-slice:last-child {
  margin-inline-end: calc(-1.42 * var(--shear));
}

.mosaic-slice img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  object-position: var(--cover-x, 50%) center;
  transform: scale(1.2);
  transform-origin: var(--cover-x, 50%) center;
}

.project-stack {
  display: grid;
  gap: 22px;
  margin-top: clamp(39px, 6vw, 78px);
}

.project-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.37fr);
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color 180ms ease;
}

.project-link:hover {
  border-color: var(--accent);
}

.project-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(21px, 4vw, 55px);
}

.project-copy h2 {
  font-size: var(--heading);
  font-weight: 750;
  line-height: 1.22;
  letter-spacing: -.045em;
}

.project-copy p {
  margin-top: 10px;
  margin-bottom: 18px;
  color: var(--muted);
  max-width: 31em;
  text-wrap: pretty;
}

.project-copy .course-action {
  margin-top: 0;
}

.project-link:hover .course-action {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.project-visual {
  display: grid;
  place-items: center;
  align-self: center;
  width: 100%;
  aspect-ratio: 8 / 5;
  background:
    linear-gradient(90deg, var(--project-grid, #a7bfff0d) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(var(--project-grid, #a7bfff0d) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(ellipse at 44% 14%, var(--project-light, #242d43), var(--project-dark, #131821) 80%);
  border-radius: 0 9px 9px 0;
  overflow: hidden;
}

.project-frame {
  position: relative;
  width: 87%;
  aspect-ratio: 1320 / 784;
  border: 1px solid var(--project-frame-line, #414c65);
  border-radius: clamp(8px, 1.4vw, 15px);
  background: var(--page);
  overflow: hidden;
}

.project-frame > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-mosaic {
  --mosaic-columns: 3;
  --shear: clamp(25px, 4.2vw, 60px);
  margin-top: 0;
}

.project-mosaic .mosaic-row:last-child {
  --shear: clamp(18px, 3.5vw, 47px);
}

.project-main-preview {
  --project-tint: #8d6bbe;
  --project-grid: #bcabed0d;
  --project-light: #282038;
  --project-dark: #131019;
  --project-frame-line: #4d4357;
}

.project-theme-preview {
  --project-tint: #639f7a;
  --project-grid: #a4dfb10d;
  --project-light: #1a3228;
  --project-dark: #101915;
  --project-frame-line: #354a40;
}

/* The theme artwork includes 66px of side padding and 65px of vertical padding. */
.project-theme-frame > img {
  inset: -10.48% auto auto -6.18%;
  width: 112.36%;
  height: 120.97%;
  object-fit: fill;
}

.project-framework-preview {
  --project-tint: #5999a8;
  --project-grid: #87dfe20d;
  --project-light: #193437;
  --project-dark: #111a21;
  --project-frame-line: #37555e;
}

.studio-document[data-theme="light"] .project-visual {
  --project-grid: color-mix(in srgb, var(--project-tint, #738ec7) 18%, transparent);
  --project-light: color-mix(in srgb, var(--project-tint, #738ec7) 20%, white);
  --project-dark: color-mix(in srgb, var(--project-tint, #738ec7) 8%, white);
  --project-frame-line: color-mix(in srgb, var(--project-tint, #738ec7) 55%, white);
}

.studio-footer .footer-inner {
  padding-block: 25px;
}

.course-intro {
  padding-block: clamp(37px, 6vw, 78px) clamp(35px, 4vw, 58px);
}

.back-home {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 32px;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: var(--small);
  font-weight: 630;
}

.back-home:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.course-intro h1 {
  font-size: clamp(2.45rem, 6.25vw, 5.25rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.065em;
  text-wrap: balance;
}

.course-intro p {
  max-width: 37em;
  margin-top: 16px;
  color: var(--muted);
  text-wrap: pretty;
}

.large-course-list {
  display: grid;
  gap: 21px;
}

.studio-courses .featured-card {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.studio-courses .featured-card .course-cover {
  object-fit: contain;
}

.studio-courses .featured-card .course-description {
  max-width: 37em;
}

.studio-courses .course-meta span:first-child {
  color: inherit;
  font-weight: inherit;
}

@media (min-width: 721px) {
  .large-course-list > :nth-child(even) .featured-card {
    grid-template: "details cover" 1fr / minmax(0, 1fr) minmax(0, 1.2fr);
  }

  .large-course-list > :nth-child(even) .course-cover {
    grid-area: cover;
    border-radius: 0 9px 9px 0;
  }

  .large-course-list > :nth-child(even) .course-body {
    grid-area: details;
  }
}

@media (max-width: 720px) {
  .studio-header .header-inner {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0 11px;
  }

  .studio-header .brand {
    grid-area: 1 / 1;
    min-height: 52px;
    justify-self: start;
  }

  .studio-header .studio-nav {
    display: contents;
  }

  .studio-nav-main {
    grid-area: 2 / 1 / 3 / 3;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0 clamp(8px, 3.1vw, 25px);
    border-top: 1px solid var(--line);
  }

  .studio-nav-social {
    grid-area: 1 / 2;
  }

  .studio-intro > .course-mosaic {
    aspect-ratio: 2.45;
  }

  .project-link,
  .studio-courses .featured-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-courses .featured-card {
    grid-template-rows: auto 1fr;
  }

  .studio-courses .featured-card .course-cover {
    height: auto;
    border-radius: 9px 9px 0 0;
  }

  .project-visual {
    border-radius: 0 0 9px 9px;
  }

  .project-copy p {
    margin-bottom: 13px;
  }
}

@media (max-width: 375px) {
  .studio-nav-main { column-gap: 6px; }
  .studio-nav-main a { gap: 4px; font-size: .8rem; }
  .studio-nav-main .nav-section-logo { width: 13px; height: 16px; }
}

@media (max-width: 342px) {
  .studio-nav-social { gap: 10px; }
  .studio-nav-social svg { width: 15px; height: 15px; }
  .studio-credentials { font-size: var(--small); }
}
