:root {
  --bg: #0b0d12;
  --bg-2: #121722;
  --panel: #161c29;
  --line: #262f42;
  --text: #e8eaf0;
  --muted: #9aa3b5;
  --gold: #d4ae5a;
  --gold-2: #f1d58a;
  --gold-ink: #1a1408;
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
img { max-width: 100%; height: auto; }
a { color: var(--gold-2); }
a:hover { color: #fff; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: 1.5rem; margin-top: 1.6em; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.section { padding: 48px 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.15rem; color: #c9cfdb; }
.hidden { display: none; }

/* header and footer */
.site-header { border-bottom: 1px solid var(--line); background: rgba(11, 13, 18, .9); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(6px); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.site-header nav { display: flex; gap: 20px; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--gold-2); }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; margin-top: 48px; font-size: .9rem; }
.site-footer p { margin: .2em 0; }

/* hero */
.hero { background: radial-gradient(circle at 80% 30%, #1d2638 0%, var(--bg) 60%); border-bottom: 1px solid var(--line); }
.hero-row { display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; align-items: center; padding: 56px 16px; }
.hero-media { justify-self: center; width: 100%; max-width: 560px; }
.hero-media video { display: block; width: 100%; height: auto; border-radius: 20px;
  -webkit-mask-image: radial-gradient(ellipse 72% 78% at 50% 52%, #000 62%, transparent 100%);
          mask-image: radial-gradient(ellipse 72% 78% at 50% 52%, #000 62%, transparent 100%); }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* buttons */
.button, button { display: inline-block; background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--gold-ink); font-weight: 700; text-decoration: none; padding: 11px 20px; border-radius: 10px; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.button:hover, button:hover { filter: brightness(1.08); color: var(--gold-ink); }
.button-ghost { background: transparent; color: var(--gold-2); border: 1px solid var(--gold); }
.button-ghost:hover { background: rgba(212, 174, 90, .12); color: var(--gold-2); }

/* project cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--text); }
.card p { margin: 0; color: #c9cfdb; flex: 1; }
.card-head { display: flex; align-items: center; gap: 12px; }
.card-head h3 { margin: 0; font-size: 1.25rem; }
.p-icon { object-fit: contain; flex: none; }
img.p-icon { height: 56px; width: 48px; }
.project-head img.p-icon { height: 88px; width: 72px; }
.p-icon-letter { display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: var(--gold-ink); font-weight: 800; font-size: 1.4rem; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.badge { font-size: .78rem; padding: 3px 9px; border-radius: 999px; background: #222b3d; color: #c9cfdb; white-space: nowrap; }
.badge-open { background: #1f3d2c; color: #9fe0b5; }
.badge-request { background: #3d321a; color: var(--gold-2); }
.badge-soon { background: #1f2f4a; color: #9cc3f5; }

/* project page */
.crumbs { color: var(--muted); font-size: .9rem; }
.crumbs a { color: var(--muted); }
.project-head { display: flex; align-items: center; gap: 18px; margin: 12px 0; }
.project-head h1 { margin: 0; }
.project-head .lead { margin: .3em 0 0; }
.shot { margin: 28px 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-align: center; }
.shot img { border-radius: 8px; }
.project-body { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
.project-body ul { padding-left: 1.2em; }
.project-body li { margin: .35em 0; }
.notes li { color: #c9cfdb; }
.get-it { background: var(--panel); border: 1px solid var(--gold); border-radius: var(--radius); padding: 20px; position: sticky; top: 84px; margin-top: 1em; }
.get-it h2 { margin-top: 0; }

/* form */
.request-form { display: grid; gap: 14px; max-width: 640px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.request-form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.request-form input, .request-form select, .request-form textarea { font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; }
.request-form input:focus, .request-form select:focus, .request-form textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }
.request-form button { justify-self: start; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.about p { max-width: 720px; }

/* navigation helpers */
.site-header nav a[aria-current="page"] { color: var(--gold-2); }
.backbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; font-size: .92rem; }
.backbar .back { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--gold); border-radius: 999px; color: var(--gold-2); text-decoration: none; font-weight: 600; transition: background .15s, transform .15s; }
.backbar .back:hover { background: rgba(212, 174, 90, .14); transform: translateX(-3px); color: var(--gold-2); }
.backbar .crumb { color: var(--muted); text-decoration: none; }
.backbar .crumb:hover { color: var(--gold-2); }
.backbar .crumb[href="#"] { color: var(--text); pointer-events: none; }
.backbar .sep { color: var(--line); }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; margin-top: 48px; }
.pager a { display: grid; gap: 2px; padding: 14px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.pager a:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--text); }
.pager a:last-child { text-align: right; }
.pager-home { text-align: center; }
.pager small { color: var(--muted); }
.card-more { color: var(--gold); font-weight: 600; font-size: .9rem; opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .2s; }
.card:hover .card-more, .hub-card:hover .card-more { opacity: 1; transform: none; }
.section-head p { margin-top: -.3em; }
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer-nav { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.footer-nav .dot { color: var(--line); }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--gold-2); }

/* hero extras */
.stats { list-style: none; padding: 0; margin: 28px 0 0; display: flex; gap: 28px; flex-wrap: wrap; color: var(--muted); }
.stats strong { display: block; font-size: 1.8rem; color: var(--gold-2); line-height: 1.1; }

/* mascots with speech bubbles */
.mascot { position: relative; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; flex: none; }
.mascot img { height: 190px; width: auto; filter: drop-shadow(0 12px 22px #0009); animation: float 4.5s ease-in-out infinite; transform-origin: 50% 90%; cursor: pointer; }
.mascot:hover img { animation: wiggle .7s ease-in-out; }
.bubble { position: relative; max-width: 240px; background: #f6efe0; color: #1b1a17; padding: 10px 14px; border-radius: 14px; font-size: .92rem; font-weight: 600; line-height: 1.35; box-shadow: 0 8px 24px #0006; animation: pop .5s .4s both cubic-bezier(.3, 1.6, .5, 1); order: -1; }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -8px; margin-left: -8px; border: 8px solid transparent; border-top-color: #f6efe0; border-bottom: 0; }
.project-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.mascot-head img { height: 150px; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg); } 50% { transform: rotate(6deg); } 75% { transform: rotate(-3deg); } }
@keyframes pop { from { opacity: 0; transform: scale(.6) translateY(10px); } to { opacity: 1; transform: none; } }

/* fade in on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; transition-delay: var(--d, 0ms); }
.reveal.shown { opacity: 1; transform: none; }

/* AI Corner band on the home page */
.ai-band { background: linear-gradient(180deg, transparent, #111827 30%, #111827 70%, transparent); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ai-row { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
.ai-row h2 { margin-top: 0; }
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 22px; }
.mini { display: grid; gap: 4px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.mini:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--text); }
.mini strong { color: var(--gold-2); }
.mini span { color: #c9cfdb; font-size: .9rem; }

/* about */
.about-row { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: start; }
.about-row h2 { margin-top: 0; }
.facts { list-style: none; margin: 0; padding: 20px; display: grid; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.facts strong { display: block; color: var(--gold-2); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.facts span { color: #c9cfdb; }

/* AI Corner pages */
.hub-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 28px; }
.hub-head .lead { max-width: 640px; }
.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.hub-card { display: flex; flex-direction: column; gap: 6px; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.hub-card:hover { border-color: var(--gold); transform: translateY(-3px); color: var(--text); }
.hub-card img { height: 120px; width: auto; align-self: flex-start; margin-bottom: 6px; transition: transform .3s; }
.hub-card:hover img { transform: translateY(-6px) rotate(-4deg); }
.hub-card h2 { margin: 0; }
.hub-card p { margin: 0; color: #c9cfdb; }
.hub-card .hub-who { color: var(--gold); font-size: .9rem; flex: 1; }
.how { padding-left: 1.3em; color: #c9cfdb; }
.how li { margin: .3em 0; }
code { background: #222b3d; padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.prompt { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.prompt-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.prompt-head h2 { margin: 0 0 4px; font-size: 1.25rem; }
.prompt-head p { margin: 0 0 8px; color: #c9cfdb; }
.copy { white-space: nowrap; flex: none; }
.copy.ok { background: #9fe0b5; }
details summary { cursor: pointer; color: var(--gold-2); margin-top: 12px; font-weight: 600; }
details pre { white-space: pre-wrap; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 16px; font-size: .86rem; line-height: 1.5; max-height: 460px; overflow: auto; }
.skill h3 { margin: 0; }
.skill-name { align-self: flex-start; }
/* guides page */
.langs { display: flex; gap: 6px; margin-bottom: 14px; }
.langs button { background: var(--panel); color: var(--muted); border: 1px solid var(--line); padding: 5px 13px; border-radius: 999px; font-size: .85rem; }
.langs button.on { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--gold-ink); border-color: var(--gold); }
.why { border-left: 4px solid var(--gold); padding: 2px 0 2px 14px; color: var(--muted); max-width: 640px; }
.guide-path { display: grid; gap: 12px; }
.guide-path .card { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; }
.guide-path .card h2 { font-size: 1.1rem; margin: 0 0 2px; }
.guide-path .card p { margin: 0; font-size: .95rem; }
.guide-path .step { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; background: #222b3d; color: var(--gold-2); font-weight: 700; font-size: 1.2rem; }
.guide-path .extra .step { color: #9cc3f5; }
.guide-path .meta { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.guide-path .dl { text-decoration: none; background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--gold-ink); padding: 9px 16px; border-radius: 10px; font-weight: 700; white-space: nowrap; }
.guide-note { margin-top: 28px; }
@media (max-width: 560px) {
  .guide-path .card { grid-template-columns: 44px 1fr; }
  .guide-path .step { width: 44px; height: 44px; }
  .guide-path .dl { grid-column: 1 / -1; text-align: center; }
}

/* download box */
.download .dl-button { display: block; text-align: center; margin-bottom: 6px; }
.dl-steps { padding-left: 1.2em; font-size: .92rem; }
.dl-steps li { margin: .3em 0; }
.checksum summary { margin-top: 6px; font-size: .92rem; }
.checksum .hash, .checksum .cmd { display: block; word-break: break-all; font-size: .78rem; padding: 8px; margin: 6px 0; }
.checksum .copy { padding: 6px 12px; font-size: .85rem; }
.get-it { max-width: 100%; }

/* legal page */
.legal li { margin: .45em 0; }
.lic { width: 100%; border-collapse: collapse; margin: 8px 0 12px; }
.lic th, .lic td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.lic th { color: var(--gold-2); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }

.thanks { text-align: center; }
.thanks .mascot { margin: 0 auto 10px; }
.thanks .actions { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  .mascot img, .bubble, .mascot:hover img { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 800px) {
  .hero-row { grid-template-columns: 1fr; padding: 40px 16px; }
  .hero-media { grid-row: 1; }
  .project-body { grid-template-columns: 1fr; }
  .get-it { position: static; }
  .two { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .site-header nav { gap: 14px; }
  .ai-row, .about-row, .hub-grid, .mini-grid { grid-template-columns: 1fr; }
  .hub-head, .project-top { flex-direction: column; align-items: flex-start; }
  .mascot { align-self: center; }
  .mascot img { height: 150px; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager-home { grid-column: 1 / -1; grid-row: 2; }
  .prompt-head { flex-direction: column; }
}
