/* ========================================================================
   Steal My Vibe Code — playful & bold
   ======================================================================== */

:root {
  --bg: #fffbf2;
  --ink: #241f31;
  --ink-soft: #5c5570;
  --card-bg: #ffffff;
  --radius: 20px;
  --shadow: 0 6px 0 rgba(36, 31, 49, 0.12);
  --shadow-pop: 0 10px 0 rgba(36, 31, 49, 0.16);

  /* Category accents — for FILLS, bars, and borders only.
     Always pair these with dark --ink text. White text on them lands
     between 2.4:1 and 3.9:1, which fails WCAG 2.1 AA. */
  --c-small-apps: #ff8a00;
  --c-games-and-fun: #f43fa4;
  --c-websites: #17b26a;
  --c-online-education: #5590ff;

  /* Darker siblings for coloured TEXT on light backgrounds (all ≥ 4.9:1). */
  --c-small-apps-ink: #a85700;
  --c-games-and-fun-ink: #b31463;
  --c-websites-ink: #0d6e41;
  --c-online-education-ink: #2b57b0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

a { color: inherit; }

/* ---------- header ---------- */

.site-header {
  background: var(--ink);
  color: #fff;
  padding: 1.1rem 0 0.9rem;
  border-bottom: 6px solid #ffd43b;
}

.site-logo {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-emoji { margin-right: 0.25rem; }
.logo-accent {
  background: linear-gradient(90deg, #ff8a00, #f43fa4, #5590ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.nav-tab {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid transparent;
  transition: transform 0.12s ease, background 0.12s ease;
}

.nav-tab:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.2); }

/* Active tabs use dark text on the bright fill — white would fail AA. */
.nav-tab.is-active { color: var(--ink); }
.nav-tab-page.is-active { background: #ffd43b; }   /* ink on yellow = 11.2:1 */
.nav-tab.is-active.cat-small-apps       { background: var(--c-small-apps); }
.nav-tab.is-active.cat-games-and-fun    { background: var(--c-games-and-fun); }
.nav-tab.is-active.cat-websites         { background: var(--c-websites); }
.nav-tab.is-active.cat-online-education { background: var(--c-online-education); }

/* ---------- hero (homepage) ---------- */

.hero {
  padding: 3.5rem 0 3rem;
  text-align: center;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 138, 0, 0.14), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(244, 63, 164, 0.14), transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(63, 125, 244, 0.12), transparent 45%);
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}

.hero p.lede {
  font-size: 1.25rem;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 auto 1.75rem;
}

.hero-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.hero-cat {
  text-decoration: none;
  font-weight: 800;
  padding: 0.7rem 1.4rem;
  border-radius: 14px;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.hero-cat:hover { transform: translateY(-3px); box-shadow: var(--shadow-pop); }

.hero-cat.cat-small-apps       { background: var(--c-small-apps); }
.hero-cat.cat-games-and-fun    { background: var(--c-games-and-fun); }
.hero-cat.cat-websites         { background: var(--c-websites); }
.hero-cat.cat-online-education { background: var(--c-online-education); }

/* ---------- category hero ---------- */

.category-hero { padding: 2.5rem 0 1.5rem; }
.category-hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
}
.category-hero .category-blurb { font-size: 1.15rem; color: var(--ink-soft); margin: 0; }

/* Headings are text, so they take the darker ink variants. */
.category-hero.cat-small-apps h1       { color: var(--c-small-apps-ink); }
.category-hero.cat-games-and-fun h1    { color: var(--c-games-and-fun-ink); }
.category-hero.cat-websites h1         { color: var(--c-websites-ink); }
.category-hero.cat-online-education h1 { color: var(--c-online-education-ink); }

/* ---------- skip link (jump to a sub-section) ---------- */

.skip-link {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.45rem 1.2rem;
  box-shadow: 0 4px 0 rgba(36, 31, 49, 0.2);
  transition: transform 0.12s ease;
}

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

/* ---------- branded sub-section (e.g. the UT example set) ---------- */

.section-block {
  scroll-margin-top: 1rem;
  padding-top: 2rem;
  margin-top: 1rem;
  border-top: 6px solid #ff8200;
  background: linear-gradient(180deg, rgba(255, 130, 0, 0.07), transparent 320px);
}

.section-intro { max-width: 760px; }

.section-kicker {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.25rem;
}

.section-intro h2 {
  font-size: clamp(1.6rem, 4.5vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.section-intro h3 {
  font-size: 1.15rem;
  font-weight: 900;
  margin: 1.75rem 0 0.5rem;
}

.section-lede { font-size: 1.1rem; color: var(--ink-soft); }

.section-download { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.25rem 0; }

.section-steps { padding-left: 1.3rem; }
.section-steps li { margin-bottom: 0.75rem; }

.section-intro code {
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: 5px;
  padding: 0.05em 0.35em;
  font-size: 0.9em;
}

.section-note {
  background: #fff;
  border: 2px solid var(--ink);
  border-left: 8px solid #ff8200;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-top: 1.5rem;
}

/* ---------- section headings on homepage ---------- */

.section-heading {
  font-size: 1.5rem;
  font-weight: 900;
  margin: 2.5rem 0 0.5rem;
}
.section-heading a { text-decoration: none; }
.section-heading .see-all {
  font-size: 0.95rem;
  font-weight: 700;
  margin-left: 0.75rem;
  color: var(--ink-soft);
}

/* ---------- project card ---------- */

.project-list { padding: 1.5rem 1.25rem 3rem; }

.project-card {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  background: var(--card-bg);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin-bottom: 2rem;
  position: relative;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 10px;
  border-radius: var(--radius) 0 0 var(--radius);
}

.project-card.cat-small-apps::before       { background: var(--c-small-apps); }
.project-card.cat-games-and-fun::before    { background: var(--c-games-and-fun); }
.project-card.cat-websites::before         { background: var(--c-websites); }
.project-card.cat-online-education::before { background: var(--c-online-education); }

.card-info { flex: 1 1 55%; min-width: 0; padding-left: 0.5rem; }

.card-title {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}

.card-purpose {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
}

.card-body { font-size: 0.98rem; }
.card-body p { margin: 0.5rem 0; }

.card-thumb { flex: 0 1 40%; max-width: 400px; }

.card-thumb img,
.thumb-placeholder {
  width: 100%;
  border: 3px solid var(--ink);
  border-radius: 14px;
  display: block;
  background: #f4f1fa;
}

.thumb-placeholder {
  aspect-ratio: 8 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border-style: dashed;
  color: var(--ink-soft);
}

/* coming soon */

.project-card.is-coming-soon {
  border-style: dashed;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.6);
}

.coming-soon-badge {
  display: inline-block;
  font-weight: 800;
  background: #ffd43b;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
}

/* ---------- buttons ---------- */

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
}

.btn {
  display: inline-block;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 3px 0 rgba(36, 31, 49, 0.25);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 rgba(36, 31, 49, 0.25); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(36, 31, 49, 0.25); }

.btn-primary { background: #ffd43b; }

.btn-helper { display: inline-flex; align-items: center; gap: 0.45rem; }
.icon-download { flex-shrink: 0; }

.cat-small-apps       .btn-primary { background: var(--c-small-apps); color: var(--ink); }
.cat-games-and-fun    .btn-primary { background: var(--c-games-and-fun); color: var(--ink); }
.cat-websites         .btn-primary { background: var(--c-websites); color: var(--ink); }
.cat-online-education .btn-primary { background: var(--c-online-education); color: var(--ink); }

/* ---------- style switcher (variants) ---------- */

.style-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0 1rem;
}

.style-switcher-label {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.style-btn {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  cursor: pointer;
  transition: transform 0.1s ease;
}

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

.cat-small-apps       .style-btn.is-active { background: var(--c-small-apps); color: var(--ink); }
.cat-games-and-fun    .style-btn.is-active { background: var(--c-games-and-fun); color: var(--ink); }
.cat-websites         .style-btn.is-active { background: var(--c-websites); color: var(--ink); }
.cat-online-education .style-btn.is-active { background: var(--c-online-education); color: var(--ink); }

/* ---------- code accordion ---------- */

.code-accordion {
  margin-top: 0.75rem;
  border: 2px solid var(--ink);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.code-accordion summary {
  cursor: pointer;
  font-weight: 800;
  padding: 0.65rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  list-style: none;
  user-select: none;
}

.code-accordion summary::-webkit-details-marker { display: none; }
.code-accordion summary::after { content: "▾"; transition: transform 0.15s ease; }
.code-accordion[open] summary::after { transform: rotate(180deg); }
.code-accordion summary:hover { background: #f7f3ff; }

.summary-file {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--ink-soft);
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-panel { border-top: 2px solid var(--ink); }

.code-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 1rem;
  background: #2d2a3a;
  color: #fff;
}

.code-filename {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  opacity: 0.8;
}

.btn-copy {
  font-size: 0.85rem;
  padding: 0.3rem 0.8rem;
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #fff;
}
.btn-copy:hover { background: rgba(255, 255, 255, 0.15); transform: none; box-shadow: none; }
.btn-copy.copied { background: var(--c-websites); border-color: var(--c-websites); color: var(--ink); }

.code-block {
  margin: 0;
  max-height: 480px;
  overflow: auto;
  font-size: 0.82rem;
  line-height: 1.5;
}

pre.code-block { padding: 1rem; background: #1d1b26 !important; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: #fff;
  padding: 2rem 0;
  margin-top: 3rem;
  text-align: center;
}

.site-footer .footer-small { font-size: 0.85rem; opacity: 0.7; }
.site-footer a { color: #ffd43b; }

.empty-note { color: var(--ink-soft); font-size: 1.1rem; }

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .project-card { flex-direction: column-reverse; }
  .card-thumb { max-width: 100%; flex-basis: auto; width: 100%; }
  .card-info { padding-left: 0; }
  .site-nav { gap: 0.4rem; }
  .nav-tab { font-size: 0.85rem; padding: 0.4rem 0.8rem; }
}
