:root {
  --bg: #f5f7f1;
  --surface: #ffffff;
  --ink: #10120f;
  --muted: #686d63;
  --line: #dfe3d8;
  --soft: #edf0e7;
  --accent: #b8ff66;
  --accent-strong: #77cc1f;
  --shadow: 0 18px 50px rgba(40, 52, 30, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-header,
main {
  width: min(1720px, calc(100% - 48px));
  margin: 0 auto;
}

.site-footer {
  display: flex;
  width: min(1720px, calc(100% - 48px));
  margin: 34px auto 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  gap: 16px;
  justify-content: center;
}

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

.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 24px 0 18px;
}

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

.brand-mark {
  display: grid;
  width: 56px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 14px;
  background: var(--accent);
  font-weight: 900;
}

.brand-mark img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

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

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

.nav-links {
  display: flex;
  gap: 8px;
  justify-self: center;
  max-width: 100%;
  overflow-x: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a,
.ghost-button,
.chip,
.mode-switch button,
.primary-button,
.secondary-button {
  min-height: 42px;
  border-radius: 999px;
  white-space: nowrap;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  color: #343830;
  font-weight: 700;
}

.nav-links a:hover {
  background: var(--soft);
}

.ghost-button,
.secondary-button,
.link-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
}

.ghost-button {
  padding: 0 22px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(380px, 0.9fr) minmax(560px, 1.1fr);
  gap: 42px;
  align-items: start;
  min-height: 0;
  padding: 36px 0 38px;
  border-top: 1px solid var(--line);
}

.hero-copy {
  position: sticky;
  top: 104px;
  padding-top: 38px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(48px, 5.1vw, 78px);
  line-height: 1.04;
  font-weight: 950;
}

.hero-text {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

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

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  padding: 0 14px;
  color: #3d4237;
  font-weight: 850;
}

.hero-stats strong {
  color: var(--ink);
  font-size: 18px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0 24px;
  font-weight: 900;
}

.primary-button {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
}

.secondary-button {
  border: 1px solid var(--line);
}

.hero-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto auto;
  gap: 18px;
  align-content: start;
  min-height: 0;
}

.feature-card,
.content-card {
  overflow: hidden;
  border: 1px solid #111;
  border-radius: 22px;
  background: var(--surface);
}

.feature-card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  min-height: 0;
  color: inherit;
  background: #10120f;
  box-shadow: 0 22px 60px rgba(34, 44, 24, 0.14);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.feature-card img {
  object-fit: cover;
  background: #10120f;
}

.feature-card:hover {
  box-shadow: 0 26px 72px rgba(34, 44, 24, 0.2);
  transform: translateY(-3px);
}

.feature-card div {
  display: none;
}

.feature-card span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.feature-card h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.18;
}

.large-card {
  grid-column: 1 / -1;
  grid-row: span 1;
}

.offset {
  transform: none;
}

.offset:hover {
  transform: translateY(-3px);
}

.control-panel {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(310px, 420px);
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 244, 0.92);
  backdrop-filter: blur(18px);
}

.topic-grid h3 {
  margin: 18px 0 0;
  font-size: 24px;
  line-height: 1.18;
}

.topic-grid p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.mode-switch {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.mode-switch button,
.chip {
  border: 0;
  padding: 0 17px;
  background: #e5e7e2;
  color: #1d2119;
  font-weight: 850;
}

.mode-switch .active,
.chip.active {
  background: var(--accent);
}

.chip-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.search-box span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.search-box input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 54px 0 24px;
}

.section-head h2,
.tutorial-band h2,
.submit-panel h2 {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 52px);
  line-height: 1;
}

.text-link {
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.content-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: #fff;
  border-radius: 20px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.content-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.content-card.is-hidden {
  display: none;
}

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 220px;
  overflow: hidden;
  flex: none;
  border-right: 0;
  border-bottom: 1px solid var(--line);
  background: #10120f;
}

.thumb img {
  object-fit: cover;
}

.label {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #ff7a3c;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 18px 20px 20px;
}

.card-body h3 {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  font-size: 22px;
  line-height: 1.24;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-body p {
  margin: 10px 0 0;
  color: var(--muted);
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 18px;
}

.meta span {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #3a3f34;
  font-size: 13px;
  font-weight: 800;
}

.card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: auto;
  border: 0;
  border-radius: 999px;
  background: #f2f3ef;
  color: var(--ink);
  font-weight: 900;
}

.card-action:hover {
  background: var(--accent);
}

.tutorial-band,
.topic-board,
.tool-panel,
.portfolio-panel,
.submit-panel {
  margin-top: 56px;
  border: 1px solid #111;
  border-radius: 24px;
  background: var(--surface);
}

.tutorial-band {
  padding: 0 28px 28px;
}

.topic-board {
  padding: 0 28px 28px;
}

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

.topic-grid article {
  display: grid;
  align-content: start;
  min-height: 210px;
  border-top: 1px solid var(--line);
  padding: 22px 0 0;
}

.topic-grid span {
  justify-self: start;
  border-radius: 999px;
  background: var(--soft);
  padding: 7px 11px;
  color: #3a3f34;
  font-size: 13px;
  font-weight: 900;
}

.tool-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(360px, 1fr) minmax(320px, 0.95fr);
  gap: 24px;
  align-items: start;
  padding: 28px;
}

.tool-copy p:not(.eyebrow) {
  max-width: 460px;
  color: var(--muted);
  line-height: 1.7;
}

.tool-copy h2,
.portfolio-panel h2 {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 52px);
  line-height: 1;
}

.framework-form {
  display: grid;
  gap: 12px;
}

.framework-form label {
  display: grid;
  gap: 8px;
}

.framework-form span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.framework-form input,
.framework-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: #f7f8f4;
  padding: 13px 14px;
}

.framework-form textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.65;
}

.framework-form .long-field {
  min-height: 260px;
}

.framework-result {
  min-height: 360px;
  max-height: 680px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #10120f;
  color: #f7f8f4;
  padding: 18px;
}

.framework-result p {
  margin: 0 0 14px;
  line-height: 1.75;
}

.portfolio-panel {
  padding: 0 28px 28px;
}

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

.work-card {
  overflow: hidden;
  border: 1px solid #111;
  border-radius: 20px;
  background: #fff;
}

.work-cover {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
}

.work-card img {
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--line);
}

.work-card div {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.work-card span {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 950;
}

.work-card h3,
.work-card p {
  margin: 0;
}

.work-card h3 {
  font-size: 22px;
  line-height: 1.25;
}

.work-card p {
  color: var(--muted);
  line-height: 1.55;
}

.work-card a,
.work-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  padding: 0 14px;
  color: var(--ink);
  font-weight: 900;
}

.work-action:hover,
.work-cover:hover + div .work-action {
  background: #10120f;
  color: #fff;
}

.compact {
  padding-top: 28px;
}

.tutorial-list {
  display: grid;
  gap: 14px;
}

.tutorial-list article {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.tutorial-list span {
  color: var(--accent-strong);
  font-size: 28px;
  font-weight: 950;
}

.tutorial-list h3 {
  margin: 0;
  font-size: 22px;
}

.tutorial-list p {
  margin: 7px 0 0;
  color: var(--muted);
}

.tutorial-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--accent);
  font-weight: 900;
}

.tutorial-list button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  padding: 0 16px;
  font-weight: 900;
}

.tutorial-list h3 em {
  display: inline-flex;
  margin-left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ff7a3c;
  color: #fff;
  font-size: 12px;
  font-style: normal;
  vertical-align: middle;
}

.submit-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  margin-bottom: 54px;
  padding: 34px;
  background: var(--ink);
  color: #fff;
}

.submit-panel p {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
}

.submit-panel form {
  display: grid;
  gap: 12px;
}

.submit-panel input,
.submit-panel select,
.submit-panel textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  outline: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.submit-panel input,
.submit-panel select {
  min-height: 48px;
  padding: 0 16px;
}

.submit-panel select option {
  color: var(--ink);
}

.submit-panel textarea {
  min-height: 140px;
  resize: vertical;
  padding: 14px 16px;
}

.submit-panel .primary-button {
  background: var(--accent);
  color: var(--ink);
  box-shadow: none;
}

.submit-actions {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 14px;
}

.submit-actions span {
  color: rgba(255, 255, 255, 0.62);
  font-weight: 800;
}

.prompt-dialog,
.editor-dialog,
.reader-dialog,
.video-dialog {
  width: min(720px, calc(100% - 34px));
  max-height: calc(100dvh - 34px);
  overflow-y: auto;
  border: 1px solid #111;
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.prompt-dialog[open],
.editor-dialog[open],
.reader-dialog[open],
.video-dialog[open] {
  display: grid;
  gap: 16px;
}

.prompt-dialog::backdrop,
.editor-dialog::backdrop,
.reader-dialog::backdrop,
.video-dialog::backdrop {
  background: rgba(10, 12, 10, 0.42);
  backdrop-filter: blur(4px);
}

.prompt-dialog h2,
.editor-dialog h2,
.reader-dialog h2,
.video-dialog h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
}

.video-dialog {
  width: min(1100px, calc(100% - 34px));
  background: #10120f;
  color: #fff;
}

.video-dialog .eyebrow {
  margin-bottom: 0;
}

.video-dialog video {
  width: 100%;
  max-height: min(72dvh, 720px);
  border-radius: 18px;
  background: #000;
}

.prompt-dialog p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.8;
}

.editor-dialog form {
  display: grid;
  gap: 14px;
}

.editor-dialog label {
  display: grid;
  gap: 8px;
}

.editor-dialog label span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.editor-dialog input,
.editor-dialog select,
.editor-dialog textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: #f7f8f4;
  padding: 13px 14px;
}

.editor-dialog textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.65;
}

.editor-dialog .long-field {
  min-height: 230px;
}

.reader-content {
  display: grid;
  gap: 14px;
}

.reader-content p {
  margin: 0;
  color: #252922;
  font-size: 17px;
  line-height: 1.85;
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f0f2eb;
  font-size: 24px;
  line-height: 1;
}

.close-button:hover {
  background: var(--accent);
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    position: static;
    padding-top: 16px;
  }

  .hero-board {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    min-height: auto;
  }

  .feature-card {
    aspect-ratio: 16 / 9;
  }

  .large-card {
    grid-row: span 1;
  }

  .offset,
  .offset:hover {
    transform: none;
  }

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

  .content-card {
    grid-template-columns: 1fr;
  }

  .thumb {
    aspect-ratio: 16 / 9;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .control-panel,
  .tool-panel,
  .submit-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .site-header,
  main {
    width: min(100% - 28px, 1720px);
  }

  .topbar {
    gap: 14px;
    padding-top: 16px;
  }

  .ghost-button {
    display: none;
  }

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

  .hero h1 {
    font-size: clamp(36px, 11vw, 42px);
    line-height: 1.03;
  }

  .hero-board {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .feature-card {
    min-height: 0;
  }

  .large-card {
    grid-row: span 1;
  }

  .offset {
    transform: none;
  }

  .control-panel {
    position: static;
    gap: 12px;
  }

  .prompt-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .section-head h2,
  .tutorial-band h2,
  .submit-panel h2 {
    line-height: 1.08;
  }

  .tutorial-list article {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tutorial-band,
  .topic-board,
  .tool-panel,
  .portfolio-panel,
  .submit-panel {
    border-radius: 18px;
    padding: 20px;
  }

  .portfolio-grid,
  .topic-grid {
    grid-template-columns: 1fr;
  }

  .prompt-dialog,
  .editor-dialog,
  .reader-dialog {
    padding: 22px;
  }

  .prompt-dialog h2,
  .editor-dialog h2,
  .reader-dialog h2 {
    padding-right: 34px;
    font-size: 28px;
  }
}

/* Featured course cards: keep covers and text in separate, equal-size blocks. */
.prompt-grid[data-card-grid] {
  grid-auto-rows: 1fr;
}

.prompt-grid[data-card-grid] > .content-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.prompt-grid[data-card-grid] > .content-card .thumb {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  border-right: 0;
  border-bottom: 1px solid var(--line);
}

.prompt-grid[data-card-grid] > .content-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prompt-grid[data-card-grid] > .content-card .card-body {
  min-height: 210px;
}
