/* ---------- Colors & basics (change the accent colors here) ---------- */
:root {
  --bg: #0b0f1a;
  --bg-2: #111727;
  --surface: #151c2e;
  --surface-2: #1b2439;
  --line: #26304a;
  --text: #e8ecf5;
  --muted: #8f9bb6;
  --accent: #ff8a1f;      /* orange */
  --accent-2: #3dd6f5;    /* cyan */
  --donate: #ff5d7a;
  --ok: #3ddc97;
  --radius: 14px;
  --head: "Chakra Petch", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(61, 214, 245, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(255, 138, 31, .10), transparent 60%);
  background-repeat: no-repeat;
  color: var(--text);
  font: 16px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
svg { width: 1.1em; height: 1.1em; flex: none; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 760px; }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }
.eyebrow {
  font-family: var(--head); text-transform: uppercase; letter-spacing: .18em;
  font-size: .78rem; color: var(--accent-2); margin-bottom: .8em;
}

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 26, .78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: .55em; font-family: var(--head); font-weight: 700; font-size: 1.15rem; }
.logo svg { color: var(--accent); width: 26px; height: 26px; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a {
  display: inline-flex; align-items: center; gap: .4em;
  padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 500;
  transition: color .15s, background .15s;
}
.nav a:hover, .nav a.active { color: var(--text); background: var(--surface); }
.nav a.nav-donate { color: var(--donate); }
.nav a.nav-donate:hover, .nav a.nav-donate.active { background: rgba(255, 93, 122, .12); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: transform .2s; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px; display: none;
  }
  .nav-open .nav { display: flex; }
  .nav a { padding: 12px 14px; }
  .nav-open .nav-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav-open .nav-toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
}

/* ---------- Buttons & pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: 11px 20px; border-radius: 12px; font-weight: 600; font-size: .98rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #1a0e00; }
.btn-primary:hover { background: #ff9c42; }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent-2); }
.btn-donate { background: var(--donate); color: #2a0009; }
.btn-lg { padding: 15px 22px; font-size: 1.05rem; width: 100%; }
.btn-sm { padding: 7px 14px; font-size: .9rem; }
.btn.is-disabled { opacity: .45; cursor: not-allowed; transform: none; }

.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: .5em;
  padding: 7px 14px; border-radius: 999px; font-size: .9rem; font-weight: 500;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  transition: color .15s, border-color .15s;
}
.pill:hover { color: var(--text); border-color: var(--accent-2); }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 64px; }
.hero-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 24px; }
.hero-side { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.avatar-ring {
  width: min(260px, 70vw); aspect-ratio: 1; border-radius: 50%; padding: 6px;
  background: conic-gradient(from 200deg, var(--accent), var(--accent-2), var(--accent));
  box-shadow: 0 20px 80px -20px rgba(255, 138, 31, .45);
}
.avatar-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 6px solid var(--bg); background: var(--surface); }
.featured {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center;
  width: 100%; max-width: 360px; padding: 16px 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); transition: border-color .15s;
}
.featured:hover { border-color: var(--accent); }
.featured-label { grid-column: 1 / -1; font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.featured strong { font-family: var(--head); font-size: 1.1rem; }
.featured .badge { justify-self: end; }
.featured-go { grid-column: 1 / -1; color: var(--accent); font-weight: 600; font-size: .9rem; }

@media (max-width: 860px) {
  .hero { padding: 48px 0 32px; }
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-side { order: -1; }
  .avatar-ring { width: 170px; }
}

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.page-top { padding-top: 48px; min-height: 70vh; }
.section-title { display: flex; align-items: baseline; gap: .6em; font-size: 1.8rem; margin-bottom: 28px; }
.section-title span { font-size: .9rem; color: var(--accent); letter-spacing: .1em; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head .section-title { margin: 0; }
.prose p { font-size: 1.08rem; color: #c9d1e3; }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 18px 40px -20px rgba(255, 138, 31, .4); }
.card-art { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.card-art img { width: 100%; height: 100%; object-fit: cover; }
.card-art-fallback {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background:
    linear-gradient(135deg, rgba(255, 138, 31, .18), rgba(61, 214, 245, .12)),
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(255, 255, 255, .04) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(255, 255, 255, .04) 23px 24px);
  font-family: var(--head); font-weight: 600; color: var(--muted); text-align: center; padding: 16px;
}
.card-art-fallback svg { width: 44px; height: 44px; color: var(--accent); }
.card-body { padding: 18px 20px 22px; }
.card-body p { color: var(--muted); font-size: .96rem; }
.card-top { margin-bottom: 10px; }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  border: 1px solid currentColor;
}
.badge-released { color: var(--ok); }
.badge-in-progress { color: var(--accent); }
.badge-planned { color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: .78rem; padding: 3px 9px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }

/* ---------- Videos ---------- */
.videos { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.video { display: flex; flex-direction: column; gap: 10px; }
.video-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.video:hover .video-thumb img { transform: scale(1.05); }
.play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0, 0, 0, .25); opacity: 0; transition: opacity .2s;
}
.play svg { width: 54px; height: 54px; color: #fff; }
.video:hover .play { opacity: 1; }
.video-title { font-weight: 500; font-size: .95rem; line-height: 1.4; }
.video:hover .video-title { color: var(--accent); }

/* ---------- Project page ---------- */
.back { display: inline-block; color: var(--muted); margin-bottom: 24px; }
.back:hover { color: var(--accent); }
.project-head { margin-bottom: 36px; }
.project-head .badge { margin-bottom: 14px; }
.project-head .lead { max-width: 60ch; }
.project-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.project-main, .project-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.project-side { position: sticky; top: 84px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.panel h2 { font-size: 1.1rem; margin-bottom: .8em; }
.panel p:last-child { margin-bottom: 0; }
.download-panel { display: flex; flex-direction: column; gap: 10px; border-color: rgba(255, 138, 31, .45); }
.dl-note { text-align: center; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist li { position: relative; padding-left: 28px; color: #c9d1e3; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 14px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--accent);
}
.embed { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.embed iframe { width: 100%; height: 100%; border: 0; }
.project-image { border-radius: var(--radius); border: 1px solid var(--line); }
.support-panel .btn { width: 100%; }

@media (max-width: 860px) {
  .project-layout { grid-template-columns: 1fr; }
  .project-side { position: static; }
}

/* ---------- Donate page ---------- */
.donate { text-align: center; }
.donate .lead { margin: 0 auto 36px; max-width: 56ch; }
.donate-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; text-align: left; }
.donate-option {
  display: flex; flex-direction: column; gap: 8px; padding: 22px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  border-top: 4px solid var(--c, var(--accent)); transition: transform .2s, box-shadow .2s;
}
.donate-option strong { font-family: var(--head); font-size: 1.25rem; }
.donate-option span { color: var(--muted); font-size: .92rem; flex: 1; }
.donate-option em { font-style: normal; font-weight: 600; color: var(--c, var(--accent)); }
a.donate-option:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -20px var(--c); }
.donate-option.is-disabled { opacity: .5; }
.donate-option.kofi { --c: #ff5e5b; }
.donate-option.paypal { --c: #3d95ff; }
.donate-option.ghs { --c: #db61a2; }
.donate-free .pills { justify-content: center; margin-top: 14px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 36px 0 44px; margin-top: 40px; background: var(--bg-2); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.footer-brand { display: flex; align-items: center; gap: .5em; font-family: var(--head); font-weight: 700; }
.footer-brand svg { color: var(--accent); width: 22px; height: 22px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-link { display: inline-flex; align-items: center; gap: .4em; color: var(--muted); font-size: .92rem; }
.footer-link:hover { color: var(--text); }
.footer-note { width: 100%; margin: 0; font-size: .82rem; color: var(--muted); }

/* ---------- Project logos & subtitles ---------- */
.card-art-logo { background: #000; display: grid; place-items: center; }
.card-art-logo img { object-fit: contain; padding: 6% 8%; transition: transform .3s; }
.card:hover .card-art-logo img { transform: scale(1.04); }
.subtitle { color: var(--accent-2); font-weight: 500; margin: -.2em 0 .6em; }
.card-body .subtitle { font-size: .9rem; color: var(--accent-2); }
.project-head .subtitle { font-size: 1.15rem; }
.project-image.is-logo { background: #000; padding: 32px 8%; }
.featured strong small { display: block; font-family: var(--body); font-weight: 500; font-size: .85rem; color: var(--muted); margin-top: 2px; }

/* ---------- Donate buttons & QR ---------- */
.donate-options.is-single { grid-template-columns: minmax(0, 340px); justify-content: center; }
.donate-btn { background: var(--c, var(--accent)); color: #fff; margin-top: 4px; }
.donate-btn:hover { filter: brightness(1.1); }
.donate-qr { margin: 8px 0 0; text-align: center; }
.donate-qr img { width: 100%; max-width: 220px; margin: 0 auto; border-radius: 12px; background: #fff; padding: 6px; }
.donate-qr figcaption { font-size: .82rem; color: var(--muted); margin-top: 8px; }

/* Video without a saved thumbnail */
.video-thumb.no-thumb { background: linear-gradient(135deg, rgba(255, 138, 31, .18), rgba(61, 214, 245, .12)), var(--surface); }
.video-thumb.no-thumb .play { opacity: 1; background: none; }

/* Ko-fi donation form shown on the page */
button.donate-btn { font: inherit; font-weight: 600; width: 100%; }
.donate-alt-link { text-align: center; font-size: .88rem; color: var(--muted); }
.donate-alt-link:hover { color: var(--text); }
.donate-note { text-align: center; font-size: .78rem; color: var(--muted); opacity: .8; }
.donate-options.is-single:has(.is-embedded) { grid-template-columns: minmax(0, 440px); }
.kofi-frame { width: 100%; border: 0; border-radius: 12px; background: #f9f9f9; padding: 4px; margin-top: 4px; }

/* ---------- Social icons in the top bar ---------- */
.nav-sep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }
.nav a.nav-social { padding: 8px 9px; }
.nav a.nav-social svg { width: 19px; height: 19px; }
.nav a.nav-social span { display: none; }
@media (max-width: 720px) {
  .nav-sep { width: auto; height: 1px; margin: 8px 0; }
  .nav a.nav-social { padding: 12px 14px; }
  .nav a.nav-social span { display: inline; }
}
