/* ============================================================
   Kellen Poole — Portfolio design system
   Aesthetic: "editorial-tech" — warm paper / deep forest,
   Source Serif 4 (display serif) + Spline Sans (grotesque body).
   ============================================================ */

:root{
  --bg:#f7f6f1;            /* warm paper */
  --bg-tint:#efeee6;
  --surface:#fffefb;
  --surface-2:#f1f0e8;
  --line:#e5e3d8;
  --line-strong:#d8d6c8;
  --ink:#171f1a;
  --muted:#5b655d;
  --faint:#8a9389;
  --accent:#0f6e56;       /* deep forest green */
  --accent-ink:#0b5945;
  --accent-soft:rgba(15,110,86,.10);
  --gold:#9a6b12;
  --crit:#b42318;
  --shadow:0 1px 2px rgba(20,30,24,.04), 0 12px 30px -12px rgba(20,30,24,.12);
  --shadow-lift:0 2px 4px rgba(20,30,24,.05), 0 24px 48px -18px rgba(20,30,24,.22);
  --maxw:760px;
}
@media (prefers-color-scheme: dark){
  :root{
    --bg:#0f1310; --bg-tint:#141813; --surface:#171c15; --surface-2:#1f251c;
    --line:#2a3127; --line-strong:#384132; --ink:#edf1e9; --muted:#9aa597; --faint:#6f7a6c;
    --accent:#67d6ab; --accent-ink:#8fe4c2; --accent-soft:rgba(103,214,171,.12);
    --gold:#e2b15f; --crit:#f0a99f;
    --shadow:0 1px 2px rgba(0,0,0,.3), 0 14px 34px -14px rgba(0,0,0,.5);
    --shadow-lift:0 2px 6px rgba(0,0,0,.35), 0 26px 56px -18px rgba(0,0,0,.6);
  }
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:"Spline Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:16px; line-height:1.6; letter-spacing:-.005em;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
/* subtle paper grain for warmth */
body::before{
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none; opacity:.5;
  background-image:radial-gradient(var(--line) .5px, transparent .5px);
  background-size:22px 22px; -webkit-mask-image:linear-gradient(180deg,rgba(0,0,0,.5),transparent 70%);
  mask-image:linear-gradient(180deg,rgba(0,0,0,.5),transparent 70%);
}
::selection{background:var(--accent-soft); color:var(--accent-ink)}
a{color:inherit; text-decoration:none}

.wrap{max-width:var(--maxw); margin:0 auto; padding:0 22px}

/* ---------- top bar ---------- */
.topbar{
  position:sticky; top:0; z-index:40; backdrop-filter:saturate(140%) blur(12px);
  background:color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom:1px solid var(--line);
}
.topbar .row{max-width:var(--maxw); margin:0 auto; padding:13px 22px; display:flex; align-items:center; justify-content:space-between; gap:12px}
.topbar .brand{display:inline-flex; align-items:center; gap:9px; font-family:"Source Serif 4",Georgia,serif; font-weight:600; font-size:16px; letter-spacing:-.01em}
.topbar .brand::before{content:""; width:26px; height:26px; border-radius:50%; background:url(/kellen.jpg) center/cover, var(--surface-2); border:1px solid var(--line-strong); flex-shrink:0}
.topbar .brand b{color:var(--accent)}
.topbar .back{font-size:13px; color:var(--muted); display:inline-flex; align-items:center; gap:6px; transition:color .2s}
.topbar .back:hover{color:var(--accent)}

/* ---------- hero ---------- */
.hero{padding:54px 0 30px}
.hero-ava{width:106px; height:106px; border-radius:50%; object-fit:cover; display:block; margin:0 0 26px; background:var(--surface-2); border:3px solid var(--surface); box-shadow:0 0 0 1.5px var(--accent), 0 18px 36px -16px rgba(20,30,24,.4)}
@media(max-width:520px){ .hero-ava{width:88px; height:88px} }
.eyebrow{font-family:"Spline Sans Mono",ui-monospace,monospace; font-size:11.5px; font-weight:500; letter-spacing:.18em; text-transform:uppercase; color:var(--accent); margin:0 0 16px}
h1{font-family:"Source Serif 4",Georgia,serif; font-weight:600; font-size:clamp(2.1rem,6vw,3.4rem); line-height:1.04; letter-spacing:-.02em; margin:0; font-optical-sizing:auto; font-variant-ligatures:none}
.lede{font-size:clamp(1.05rem,2.4vw,1.28rem); color:var(--muted); margin:18px 0 0; max-width:34ch; line-height:1.45}
.hero .lede{max-width:44ch; color:var(--ink)}

.status{display:inline-flex; align-items:center; gap:8px; margin:22px 0 0; padding:6px 13px; border-radius:999px; border:1px solid var(--line-strong); background:var(--surface); font-size:12.5px; font-weight:500; box-shadow:var(--shadow)}
.status .dot{width:8px; height:8px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 3px var(--accent-soft)}
.status.amber .dot{background:var(--gold); box-shadow:0 0 0 3px rgba(154,107,18,.14)}
.started{font-family:"Spline Sans Mono",monospace; font-size:12px; color:var(--faint); letter-spacing:.03em; margin:13px 0 0}
.started b{color:var(--muted); font-weight:500}
.proj-date{font-family:"Spline Sans Mono",monospace; font-size:11px; color:var(--faint); letter-spacing:.03em; white-space:nowrap; flex-shrink:0; padding-top:4px}

.actions{display:flex; flex-wrap:wrap; gap:10px; margin:26px 0 0}
.btn{display:inline-flex; align-items:center; gap:8px; padding:11px 18px; border-radius:11px; font-size:14px; font-weight:600; letter-spacing:-.01em; transition:transform .15s ease, box-shadow .2s ease, background .2s; cursor:pointer; border:1px solid transparent}
.btn .arr{transition:transform .2s}
.btn:hover .arr{transform:translateX(3px)}
.btn-primary{background:var(--accent); color:#fff; box-shadow:var(--shadow)}
.btn-primary:hover{transform:translateY(-2px); box-shadow:var(--shadow-lift)}
@media (prefers-color-scheme: dark){ .btn-primary{color:#06140e} }
.btn-ghost{background:var(--surface); color:var(--ink); border-color:var(--line-strong); box-shadow:var(--shadow)}
.btn-ghost:hover{transform:translateY(-2px); box-shadow:var(--shadow-lift); border-color:var(--accent)}

/* ---------- sections ---------- */
section{padding:30px 0; border-top:1px solid var(--line)}
section:first-of-type{border-top:none}
.label{font-family:"Spline Sans Mono",ui-monospace,monospace; font-size:11px; font-weight:500; letter-spacing:.16em; text-transform:uppercase; color:var(--faint); margin:0 0 14px; display:flex; align-items:center; gap:10px}
.label::before{content:""; width:18px; height:1px; background:var(--accent); display:inline-block}
h2{font-family:"Source Serif 4",Georgia,serif; font-weight:600; font-size:clamp(1.35rem,3.4vw,1.85rem); letter-spacing:-.015em; margin:0 0 14px; line-height:1.15}
.prose{font-size:16.5px; color:var(--ink); max-width:62ch}
.prose.muted{color:var(--muted)}
.prose b, .prose strong{color:var(--ink); font-weight:600}
.prose + .prose{margin-top:12px}

/* numbered "how it works" / "how to" steps */
.steps{counter-reset:s; margin:6px 0 0; padding:0; list-style:none}
.steps li{counter-increment:s; position:relative; padding:14px 0 14px 52px; border-top:1px solid var(--line); font-size:15.5px}
.steps li:first-child{border-top:none}
.steps li::before{content:counter(s); position:absolute; left:0; top:12px; width:32px; height:32px; border-radius:9px; background:var(--accent-soft); color:var(--accent); font-family:"Source Serif 4",Georgia,serif; font-weight:600; font-size:15px; display:flex; align-items:center; justify-content:center}
.steps li b{font-weight:600}
.steps li .sub{display:block; color:var(--muted); font-size:13.5px; margin-top:3px}

/* feature cards */
.cards{display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:4px}
@media(max-width:600px){ .cards{grid-template-columns:1fr} }
.card{background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:16px 17px; box-shadow:var(--shadow); transition:transform .15s, box-shadow .2s, border-color .2s}
.card:hover{transform:translateY(-2px); box-shadow:var(--shadow-lift); border-color:var(--line-strong)}
.card h3{font-family:"Spline Sans",sans-serif; font-weight:600; font-size:15px; margin:0 0 5px; letter-spacing:-.01em}
.card p{margin:0; font-size:13.7px; color:var(--muted); line-height:1.5}
.card .tick{color:var(--accent); font-weight:700}

/* STAR — the signature treatment */
.star{display:flex; flex-direction:column; gap:0}
.star-row{display:grid; grid-template-columns:64px 1fr; gap:18px; padding:20px 0; border-top:1px solid var(--line)}
.star-row:first-child{border-top:none}
.star-row .glyph{font-family:"Source Serif 4",Georgia,serif; font-weight:600; font-size:38px; line-height:1; color:var(--accent); opacity:.92}
.star-row .k{font-family:"Spline Sans Mono",monospace; font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--faint); margin:0 0 6px}
.star-row .t{font-size:15.5px; color:var(--ink); margin:0; line-height:1.55}
@media(max-width:520px){ .star-row{grid-template-columns:44px 1fr; gap:14px} .star-row .glyph{font-size:30px} }

/* tech pills */
.pills{display:flex; flex-wrap:wrap; gap:8px; margin-top:2px}
.pill{font-family:"Spline Sans Mono",monospace; font-size:12px; padding:6px 11px; border-radius:8px; background:var(--surface-2); color:var(--muted); border:1px solid var(--line)}

/* callout (status / limitations) */
.callout{background:var(--surface); border:1px solid var(--line); border-left:3px solid var(--accent); border-radius:12px; padding:16px 18px; box-shadow:var(--shadow)}
.callout.amber{border-left-color:var(--gold)}
.callout ul{margin:8px 0 0; padding-left:18px}
.callout li{font-size:14.5px; margin:5px 0; color:var(--muted)}
.callout li b{color:var(--ink)}

/* honesty line */
.honest{font-size:13.5px; color:var(--faint); font-style:italic}

/* mono output block (for shopflow/nightshift) */
.term{font-family:"Spline Sans Mono",monospace; font-size:12.5px; background:var(--surface-2); border:1px solid var(--line); border-radius:11px; padding:14px 16px; color:var(--ink); overflow-x:auto; line-height:1.7}
.term .g{color:var(--accent)} .term .m{color:var(--faint)}

/* inline code in prose */
code{font-family:"Spline Sans Mono",monospace; font-size:.88em; background:var(--surface-2); border:1px solid var(--line); border-radius:5px; padding:1px 5px; color:var(--ink); white-space:nowrap}
.steps code, .prose code{word-break:break-word; white-space:normal}

/* screenshots / figures (case-study media) */
.shot{margin:16px 0 0; border:1px solid var(--line-strong); border-radius:14px; overflow:hidden; background:var(--surface-2); box-shadow:var(--shadow-lift)}
.shot img{display:block; width:100%; height:auto}
.shot figcaption{font-size:13px; color:var(--muted); padding:11px 15px; border-top:1px solid var(--line); background:var(--surface); line-height:1.45}
.shot + .shot{margin-top:14px}

footer{padding:40px 0 56px; border-top:1px solid var(--line); margin-top:14px; text-align:center; color:var(--faint); font-size:13px}
footer a{color:var(--accent)}

/* staggered load reveal */
@keyframes rise{from{opacity:0; transform:translateY(14px)} to{opacity:1; transform:none}}
.reveal{opacity:0; animation:rise .7s cubic-bezier(.22,1,.36,1) forwards}
.reveal:nth-child(1){animation-delay:.02s}.reveal:nth-child(2){animation-delay:.08s}
.reveal:nth-child(3){animation-delay:.14s}.reveal:nth-child(4){animation-delay:.2s}
.reveal:nth-child(5){animation-delay:.26s}.reveal:nth-child(6){animation-delay:.32s}
.reveal:nth-child(7){animation-delay:.38s}.reveal:nth-child(8){animation-delay:.44s}
@media (prefers-reduced-motion: reduce){ .reveal{opacity:1; animation:none} html{scroll-behavior:auto} .btn,.card{transition:none} }

/* ---------- hub-specific ---------- */
.hub-grid{display:flex; flex-direction:column; gap:14px; margin-top:6px}
.proj{display:block; background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:20px 21px; box-shadow:var(--shadow); transition:transform .16s, box-shadow .22s, border-color .2s}
.proj:hover{transform:translateY(-3px); box-shadow:var(--shadow-lift); border-color:var(--line-strong)}
.proj-head{display:flex; align-items:baseline; justify-content:space-between; gap:12px}
.proj-name{font-family:"Source Serif 4",Georgia,serif; font-weight:600; font-size:21px; letter-spacing:-.01em; margin:0}
.proj-num{color:var(--faint); font-size:14px; font-family:"Spline Sans Mono",monospace}
.proj-prop{font-size:14.5px; color:var(--muted); margin:9px 0 0; line-height:1.5}
.proj-skill{font-family:"Spline Sans Mono",monospace; font-size:11.5px; color:var(--accent); margin:11px 0 0; letter-spacing:.02em}
.proj-actions{display:flex; flex-wrap:wrap; gap:8px; margin:15px 0 0}
.mini{font-size:13px; font-weight:600; padding:8px 14px; border-radius:9px; display:inline-flex; gap:6px; align-items:center; transition:transform .15s, background .2s, border-color .2s}
.mini-go{background:var(--accent); color:#fff} @media(prefers-color-scheme:dark){.mini-go{color:#06140e}}
.mini-go:hover{transform:translateY(-1px)}
.mini-out{background:var(--surface-2); color:var(--ink); border:1px solid var(--line)}
.mini-out:hover{border-color:var(--accent); color:var(--accent)}
