:root {
  --paper: #f7f4ee;
  --card: #fffdf9;
  --ink: #1b1a17;
  --muted: #6b655c;
  --rule: #e2dccf;
  --cyan: #00879a;
  --magenta: #c2185b;
  --green: #1f8a70;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 8px 24px rgb(0 0 0 / .06);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14130f;
    --card: #1c1b17;
    --ink: #eeeae2;
    --muted: #a39c90;
    --rule: #2f2d27;
    --cyan: #2cc4d6;
    --magenta: #f0508c;
    --green: #3cc39c;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .3);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
}
img { max-width: 100%; height: auto; display: block; }   /* height:auto keeps screenshots in proportion when they shrink */
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--magenta); }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* ---- header ---- */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { font: 700 1.15rem var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.logo span { color: var(--magenta); }
.nav { display: flex; gap: 20px; font-size: .92rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }

/* ---- type ---- */
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 6vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); font-weight: 650; }
h3 { font-size: 1.3rem; font-weight: 650; }
p { margin: 0 0 1em; }
.kicker { font: 600 .78rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--magenta); margin-bottom: .8em; }
.lede { font: 400 1.3rem/1.55 var(--serif); color: var(--muted); max-width: 40ch; }

/* ---- sections ---- */
.hero { padding: 88px 0 64px; }
.hero h1 em { font-style: italic; color: var(--cyan); }
section { padding: 56px 0; }
section + section { border-top: 1px solid var(--rule); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head p { color: var(--muted); margin: 0; }

/* ---- project cards ---- */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--rule); border-radius: 14px;
  padding: 26px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px;
  text-decoration: none; color: inherit;
  transition: transform .15s ease, border-color .15s ease;
}
a.card:hover { transform: translateY(-3px); border-color: var(--cyan); color: inherit; }
.card .icon { width: 52px; height: 52px; border-radius: 12px; }
.card h3 { margin: 4px 0 0; }
.card p { color: var(--muted); margin: 0; flex: 1; }
.card .more { font-weight: 600; font-size: .92rem; color: var(--cyan); }
.card.quiet { box-shadow: none; background: transparent; border-style: dashed; }
.tag { display: inline-block; font: 600 .72rem var(--sans); letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; background: color-mix(in srgb, var(--cyan) 14%, transparent); color: var(--cyan); align-self: flex-start; }
.tag.soon { background: color-mix(in srgb, var(--magenta) 14%, transparent); color: var(--magenta); }

/* ---- two-column about ---- */
.about { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; }
.about p { font-size: 1.05rem; }
@media (max-width: 720px) { .about { grid-template-columns: 1fr; gap: 8px; } }

/* ---- project page ---- */
.proj-hero { padding: 72px 20px 40px; }   /* keeps .wrap's side margins on phones */
.proj-hero .icon { width: 72px; height: 72px; border-radius: 16px; margin-bottom: 22px; }
/* Hero with the screenshot to the right of the text (stacks on narrow screens). */
.proj-hero.split { max-width: 1260px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: 52px; align-items: center; }
.proj-hero.split .lede { font-size: 1.16rem; }
.proj-hero.split .shot { margin: 0; width: 100%; }
@media (max-width: 920px) { .proj-hero.split { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: .98rem;
  text-decoration: none; border: 1px solid var(--rule); color: var(--ink); background: var(--card);
}
.btn:hover { border-color: var(--cyan); color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.primary:hover { background: var(--cyan); border-color: var(--cyan); color: #fff; }
.btn small { font-weight: 400; opacity: .7; }
.fine { font-size: .88rem; color: var(--muted); }
.shot { border-radius: 12px; border: 1px solid var(--rule); box-shadow: var(--shadow); margin: 8px 0 0; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 28px 36px; }
.features h3 { font-size: 1.08rem; margin-bottom: .3em; }
.features p { color: var(--muted); font-size: .98rem; margin: 0; }

.req { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 24px 28px; }
.req ul { margin: 0; padding-left: 1.2em; }
.req li { margin: .25em 0; }
code { font: .88em var(--mono); background: color-mix(in srgb, var(--ink) 7%, transparent); padding: .1em .35em; border-radius: 5px; }
.hash { font: .75rem var(--mono); color: var(--muted); word-break: break-all; }

/* MattChat pill mock */
.pill-stage { display: grid; place-items: center; padding: 56px 20px; border-radius: 14px; background: #101418; margin-top: 8px; }
.pill { display: flex; align-items: center; gap: 14px; background: #0b0e11; border: 1px solid #25303a; border-radius: 99px; padding: 12px 22px; box-shadow: 0 12px 40px rgb(0 0 0 / .5); }
.pill .dot { width: 10px; height: 10px; border-radius: 50%; background: #f0508c; box-shadow: 0 0 12px #f0508c; animation: blink 1.4s infinite; }
.pill .wave { display: flex; align-items: center; gap: 3px; height: 28px; }
.pill .wave i { width: 3px; border-radius: 2px; background: #2cc4d6; animation: wave 1.1s ease-in-out infinite; }
.pill .t { font: 500 .9rem var(--mono); color: #b8c4cc; }
@keyframes wave { 0%, 100% { height: 5px; } 50% { height: 26px; } }
@keyframes blink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .pill .wave i, .pill .dot { animation: none; height: 14px; } }

/* ---- footer ---- */
.site-foot { border-top: 1px solid var(--rule); padding: 32px 0 48px; color: var(--muted); font-size: .9rem; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-foot a { color: var(--muted); }

/* hidden until the GitHub username is filled in */
a[href*="__GH_USER__"] { display: none !important; }

/* YouTube band */
.yt { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; padding: 28px; border-radius: 14px; background: var(--card); border: 1px solid var(--rule); box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: transform .15s ease, border-color .15s ease; }
.yt:hover { transform: translateY(-3px); border-color: #e62117; color: inherit; }
.yt .kicker { display: block; color: #e62117; margin-bottom: .3em; }
.yt strong { display: block; font: 700 1.6rem/1.2 var(--serif); }
.yt-sub { display: block; color: var(--muted); margin-top: .35em; }
.yt .more { font-weight: 600; font-size: .92rem; color: var(--cyan); white-space: nowrap; }
.yt-play { width: 64px; height: 46px; border-radius: 12px; background: #e62117; position: relative; }
.yt-play::after { content: ""; position: absolute; left: 26px; top: 14px; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; }
@media (max-width: 640px) { .yt { grid-template-columns: 1fr; gap: 14px; } }
