/* ============================================================
   mk.css — Matthew Karsten layer on top of the jdm-site / lct-site
   system (site.css + home.css + kit.css, recolored to PSM purple).
   Palette from psm-brand/assets/palette.json: purple #A855F7 (fill),
   #7e22ce (text + buttons, 7:1 behind white), deep violet #2d1b4e,
   near-black #160d26, gold #FBBF24 (accent only, dark text on it),
   cream #FAF7F2. Purple-to-purple gradients only: never into blue.
   ============================================================ */

body.home { --mk-gold: #fbbf24; --mk-cream: #faf7f2; --mk-lilac: #c084fc; }

/* ---- Solana green: an ACCENT (~10%), never the spine ----------------
   The contrast rule INVERTS, exactly like jdm-site's pink:
     --sol     #14F195  FILL + text on DARK only (10-13:1 on the violet grounds,
                        but 1.3-1.5:1 on any light ground: never text on light)
     --sol-ink #077b4b  text/UI on LIGHT only (4.51:1 on the lilac tint, 5.32:1
                        on white; 2.9-3.7:1 on dark, so never on dark)
   Both directions are pinned by tools/audit.py (pairs + a selector guard).
   --grad-sol matches the accent on karsten.cv/solana; it only ever draws
   hairlines and underlines, never a field. */
:root {
  --sol: #14f195;
  --sol-ink: #077b4b;
  --sol-tint: #e8fbf2;
  --deep: #160d26;
  --surface: #ffffff;
  --cream: #faf7f2;
  --lilac-tint: #f3e8ff;
  --grad-sol: linear-gradient(108deg, #9945ff 0%, #7c7bff 42%, #14f195 100%);
}

/* wordmark: squirrel mark + name, no logo file needed */
.mk-mark { display: inline-flex; align-items: center; gap: 0.8rem; text-decoration: none; color: var(--h-deep); }
.mk-mark img { width: 48px; height: 48px; flex: none; }
.mk-mark span { display: flex; flex-direction: column; line-height: 1.05; }
.mk-mark b { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; }
.mk-mark small { font-weight: 600; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--h-pink); margin-top: 0.3rem; }
.h-logo.mk-mark img { height: 48px; }
.mk-mark-foot { color: #fff; justify-self: center; }
.mk-mark-foot img { width: 88px; height: 88px; }
.mk-mark-foot b { font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.6rem); }
.mk-mark-foot small { color: var(--mk-lilac); font-size: 0.85rem; }

.h-top a { display: inline-flex; align-items: center; gap: 0.4rem; }
.h-top svg { vertical-align: -2px; }

/* hero: a purple pool of light behind the cut-out, falling to near-black violet */
.h-hero {
  background:
    radial-gradient(38% 70% at 24% 58%, rgba(168, 85, 247, 0.72), transparent 72%),
    radial-gradient(45% 70% at 100% 100%, rgba(123, 75, 168, 0.35), transparent 70%),
    linear-gradient(90deg, #1f0f36 0%, #1a0d2b 48%, #160d26 100%);
}
.h-hero h1 .big { color: var(--mk-lilac); }
.p-hero { background: radial-gradient(45% 90% at 100% 0%, rgba(168, 85, 247, 0.30), transparent 70%), linear-gradient(180deg, #241640 0%, #160d26 100%); }
.p-hero h1 { color: var(--mk-lilac); }
.h-hero-figure img, .p-hero-figure.cut img {
  filter:
    drop-shadow(0 0 6px rgba(243, 232, 255, .55))
    drop-shadow(0 0 22px rgba(192, 132, 252, .45))
    drop-shadow(0 -6px 60px rgba(251, 191, 36, .22));
}
.p-hero-figure.frame img { aspect-ratio: 4 / 3; border-radius: 18px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); }
.p-hero-figure.cut.head img { max-height: 560px; }
.h-cred { background: linear-gradient(-160deg, #3a2266 0%, #160d26 100%); }
.h-statement .h-who span { color: var(--mk-lilac); }
.h-three svg { stroke: var(--mk-lilac); }
.h-callout { background: linear-gradient(180deg, #a855f7 0%, #7e22ce 100%); }
.h-about .lct-stats div, .p-lead .stats-row div { border-top-color: var(--mk-gold); }
.h-about .lct-stats b { color: var(--h-deep); }
.h-foot { background: radial-gradient(60% 120% at 0% 0%, rgba(168, 85, 247, .22), transparent 70%), linear-gradient(180deg, #2d1b4e 0%, #160d26 100%); }
.h-foot-base { background: #0f0819; }
.h-foot-base a { display: inline-flex; }
.lct-contact-list b { color: var(--mk-gold); }
.h-nav a[aria-current="page"] { color: var(--h-pink); }

/* rooms: same chip row as LCT's levels */
.mk-rooms li { border-color: var(--h-teal); color: var(--h-teal); }
.lct-subjects { color: var(--h-pink); }

/* books band on the homepage */
.mk-books-band { background: var(--mk-cream); }
.mk-books-band .lct-books img { height: clamp(170px, 18vw, 240px) !important; }
.lct-seen-note a { color: var(--h-pink); font-weight: 600; }

/* ---- /work case studies ---- */
.mk-case { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; margin: 0 0 clamp(3.5rem, 7vw, 5.5rem); }
.mk-case:last-child { margin-bottom: 0; }
.mk-case.flip .mk-case-img { order: 2; }
.mk-case-img { display: block; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 60px -32px rgba(22, 13, 38, .6); line-height: 0; }
.mk-case-img img { width: 100%; height: auto; display: block; transition: transform .3s ease; }
a.mk-case-img:hover img { transform: scale(1.02); }
.mk-case-stat { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0.9rem 1.2rem; padding: clamp(2rem, 4vw, 3rem); line-height: 1.2; background: radial-gradient(70% 90% at 0% 0%, rgba(168, 85, 247, .45), transparent 70%), linear-gradient(160deg, #2d1b4e, #160d26); color: #fff; }
.mk-case-stat b { font-size: clamp(2.2rem, 1.4rem + 2.4vw, 3.4rem); font-weight: 800; color: var(--mk-gold); letter-spacing: -0.03em; }
.mk-case-stat span { font-weight: 600; font-size: 1rem; }
.mk-tag { font-weight: 700; font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--h-pink); margin: 0 0 0.6rem; }
.mk-case h3 { font-weight: 800; font-size: clamp(2rem, 1.4rem + 1.8vw, 3rem); color: var(--h-deep); letter-spacing: -0.03em; line-height: 1; margin: 0 0 0.8rem; }
.mk-sub { font-weight: 700; font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); color: var(--h-deep); margin: 0 0 1rem; line-height: 1.35; }
.mk-case p { font-size: 1.05rem; line-height: 1.6; }
.mk-facts { list-style: none; padding: 0; margin: 1.2rem 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mk-facts li { background: #f3e8ff; color: #6b21a8; font-weight: 700; font-size: 0.82rem; padding: 0.35rem 0.8rem; border-radius: 999px; }
.mk-links { font-weight: 700; }
.mk-links a { color: var(--h-pink); }
.dark .mk-links a { color: var(--mk-lilac); }
.mk-mcp code { font-size: 0.85em; background: rgba(255, 255, 255, .1); padding: 0.1em 0.35em; border-radius: 4px; word-break: break-all; }
.mk-mcp li { border-top-color: var(--mk-gold) !important; display: flex; flex-direction: column; }
.mk-mcp .mk-links { margin-top: auto; padding-top: 0.8rem; word-break: break-all; }
.mk-counts { margin-top: 2.6rem !important; }
.dark .mk-counts div { background: rgba(255, 255, 255, .06); }
.dark .mk-counts b { color: #fff; }
.dark .mk-counts span { color: var(--mk-gold); }
.mk-counts.light { grid-template-columns: repeat(2, 1fr); margin-top: 0 !important; }
.mk-counts.light div { background: #fff; box-shadow: 0 10px 30px -20px rgba(22, 13, 38, .5); }
.mk-oss-links { margin-top: 2rem; font-weight: 700; line-height: 2; }
.mk-oss-links a { color: #fff; }

/* client site tiles */
.mk-sites { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem 1.6rem; }
.mk-sites a { display: flex; flex-direction: column; height: 100%; background: #fff; border-radius: 16px; overflow: hidden; color: inherit; text-decoration: none; box-shadow: 0 12px 34px -22px rgba(22, 13, 38, .55); transition: transform .2s ease, box-shadow .2s ease; }
.mk-sites a:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -22px rgba(22, 13, 38, .6); }
.mk-sites img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; display: block; }
.mk-sites b { font-size: 1.2rem; color: var(--h-deep); margin: 1.1rem 1.3rem 0.4rem; }
.mk-sites span { font-size: 0.97rem; line-height: 1.5; color: #5b5470; margin: 0 1.3rem 0.8rem; }
.mk-sites em { font-style: normal; font-weight: 700; font-size: 0.88rem; color: var(--h-pink); margin: auto 1.3rem 1.2rem; }
.mk-earlier { align-items: center; }

.mk-archive { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem 1.4rem; }
.mk-archive a { display: flex; flex-direction: column; height: 100%; padding: 1rem 1.2rem; border-radius: 12px; background: #f8f5fc; text-decoration: none; border-left: 3px solid; border-image: var(--grad-sol) 1; }
.mk-archive a:hover b, .mk-archive a:focus-visible b { color: var(--sol-ink); }
.mk-archive b { color: var(--h-deep); font-size: 1.05rem; }
.mk-archive span { color: #5b5470; font-size: 0.92rem; margin-top: 0.25rem; }
@media (max-width: 960px) { .mk-archive { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .mk-archive { grid-template-columns: 1fr; } }

/* ---- /speaking ---- */
.mk-topics { grid-template-columns: repeat(3, 1fr); }
.mk-topics article { background: #fff; border-radius: 18px; padding: 2rem 1.8rem; box-shadow: 0 10px 30px -20px rgba(22, 13, 38, .5); border-top: 5px solid var(--h-red); }
.mk-topics h3 { margin-top: 0 !important; font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.6rem) !important; }
.mk-topics p { max-width: none !important; margin: 0 !important; }
.mk-gallery { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem 1.6rem; }
.mk-gallery li { display: flex; flex-direction: column; }
.mk-gallery img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; margin-bottom: 0.9rem; }
.mk-gallery b { color: var(--h-deep); font-size: 1.08rem; }
.mk-gallery span { color: #5b5470; font-size: 0.9rem; margin-top: 0.2rem; }

.mk-talks { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .mk-talks { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; } }

/* ---- /about ---- */
.mk-timeline { list-style: none; padding: 0; margin: 0 auto; max-width: 860px; display: grid; gap: 0; }
.mk-timeline li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1.6rem; padding: 1.5rem 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.mk-timeline li:first-child { border-top: 0; }
.mk-timeline li > span { font-weight: 800; color: var(--mk-gold); font-size: 1rem; letter-spacing: 0.02em; padding-top: 0.15rem; }
.mk-timeline b { display: block; font-size: 1.2rem; color: #fff; margin-bottom: 0.35rem; }
.mk-timeline p { margin: 0; color: #e9ddf7; font-size: 1.02rem; line-height: 1.55; }
.mk-creds { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 1.6rem; }
.mk-creds li { background: #fff; border-left: 4px solid var(--h-red); border-radius: 0 12px 12px 0; padding: 1rem 1.2rem; display: flex; flex-direction: column; }
.mk-creds b { color: var(--h-deep); font-size: 1.05rem; }
.mk-creds span { color: #5b5470; font-size: 0.92rem; margin-top: 0.2rem; }
.mk-shelf { grid-template-columns: repeat(3, 1fr); max-width: 900px; margin-inline: auto; }
.lct-shelf em a { color: var(--h-pink); }

@media (max-width: 960px) {
  .mk-sites, .mk-gallery, .mk-topics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .mk-case { grid-template-columns: 1fr; }
  .mk-case.flip .mk-case-img { order: 0; }
  .mk-shelf { grid-template-columns: repeat(3, 1fr); }
  .mk-shelf img { height: 170px; }
}
@media (max-width: 640px) {
  .mk-sites, .mk-gallery, .mk-topics, .mk-creds { grid-template-columns: 1fr; }
  .mk-timeline li { grid-template-columns: 1fr; gap: 0.4rem; }
  .mk-shelf { grid-template-columns: repeat(2, 1fr); }
  .mk-mark b { font-size: 1.15rem; }
  .mk-mark img { width: 40px; height: 40px; }
  .h-top-contact { font-size: 0.78rem; text-align: center; }
}

/* ================= Solana-green accent placements ================= */
/* 1. hairlines + the kicker underline: purple -> green, as on karsten.cv/solana */
.p-kicker::after, .h-caps::after { content: ""; display: block; width: 3.2rem; height: 3px; margin-top: 0.7rem; background: var(--grad-sol); border-radius: 2px; }
.h-caps::after { margin: 0.9rem auto 0; }
.h-cred { border-bottom: 3px solid; border-image: var(--grad-sol) 1; }
.h-foot-links { border-top: 1px solid; border-image: var(--grad-sol) 1; }
.mk-timeline li + li { border-top: 1px solid; border-image: linear-gradient(90deg, rgba(153, 69, 255, .55), rgba(20, 241, 149, .55)) 1; }
.mk-mcp li { border-top: 5px solid !important; border-image: var(--grad-sol) 1 !important; }

/* 2. Solana-related tags on work cards: green tint + ink text (light ground) */
.mk-facts li.sol { background: var(--sol-tint); color: var(--sol-ink); }
.dark .mk-tag-sol { color: var(--sol); }

/* 3. hover + focus: green ring, direction-correct for the ground */
.home :focus-visible { outline-color: var(--sol-ink); }
.dark :focus-visible, .h-hero :focus-visible, .p-hero :focus-visible, .h-foot :focus-visible, .h-statement :focus-visible { outline-color: var(--sol); }
.mk-sites a:hover, .mk-sites a:focus-visible { box-shadow: 0 0 0 2px var(--sol-ink), 0 20px 40px -22px rgba(22, 13, 38, .6); }
.h-hero .h-btn-outline:hover, .p-hero .h-btn-outline:hover { border-color: var(--sol); }
.dark .mk-links a:hover, .mk-oss-links a:hover, .h-foot-links a:hover, .lct-contact-list a:hover { color: var(--sol); }
.mk-links a:hover, .lct-seen-note a:hover, .lct-shelf em a:hover { color: var(--sol-ink); }

/* 4. stat numerals on dark bands */
.dark .mk-counts b, .mk-case-stat b { color: var(--sol); }

/* 5. hero backlight: tight lilac rim, purple core, green outer halo */
.h-hero-figure img, .p-hero-figure.cut img {
  filter:
    drop-shadow(0 0 5px rgba(243, 232, 255, .55))
    drop-shadow(0 0 22px rgba(168, 85, 247, .55))
    drop-shadow(0 -8px 70px rgba(20, 241, 149, .30));
}
.h-hero { background:
    radial-gradient(38% 70% at 24% 58%, rgba(168, 85, 247, 0.70), transparent 72%),
    radial-gradient(30% 50% at 8% 100%, rgba(20, 241, 149, 0.16), transparent 70%),
    radial-gradient(45% 70% at 100% 100%, rgba(123, 75, 168, 0.35), transparent 70%),
    linear-gradient(90deg, #1f0f36 0%, #1a0d2b 48%, #160d26 100%); }
