/* Night Workshop: the shared look for /portfolio and /showcase (2026-09 redesign).
   Both pages link this file. Colors are role tokens, so a palette change is a
   token swap on :root, never a per-rule edit. */

:root {
  --bg: #12131F;
  --bg-2: #171929;
  --card: #1C1E31;
  --card-2: #23263D;
  --line: #2C2E46;
  --line-hi: #4A4D72;
  --ink: #F3F0FA;
  --muted: #ABA8C4;
  --primary: #FF8A3D;
  --primary-l: #FFA866;
  --on-primary: #2A1200;
  --primary-glow: rgba(255, 138, 61, 0.35);
  --second: #6EE0B5;
  --second-bg: #123A2F;
  --hl1: #FFB27A;
  --hl2: #FF6F61;
  --pool1: #5B4BD6;
  --pool2: #FF8A3D;
  --pool3: #2FA27E;
  --peg-dot: rgba(255, 255, 255, 0.14);
  --hook: #8B8BA8;
  --chip-bg: #262943;
  --chip-ink: #C9C6E0;

  --font-head: 'Bricolage Grotesque', 'Avenir Next', system-ui, sans-serif;
  --font-body: 'Figtree', 'Avenir Next', system-ui, sans-serif;
  --rad: 14px;
  --rad-lg: 20px;
  --gutter: clamp(16px, 4vw, 40px);
  --spine: 1280px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html, body { overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(16px, 0.9rem + 0.25vw, 19px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button, input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 800; letter-spacing: -0.01em; line-height: 1.05; text-wrap: balance; }

:focus-visible { outline: 3px solid var(--second); outline-offset: 3px; border-radius: 6px; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--primary); color: var(--on-primary); padding: 8px 14px; border-radius: 8px; z-index: 200; font-weight: 700; }
.skip-link:focus { left: 8px; }

/* ── Atmosphere: concentrated glow pools + faint pegboard dots ── */
.pools { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.pools b { position: absolute; border-radius: 50%; filter: blur(90px); mix-blend-mode: screen; opacity: 0.3; }
.pools b:nth-child(1) { width: min(640px, 80vw); height: 520px; left: -160px; top: -160px; background: var(--pool1); animation: drift1 26s ease-in-out infinite alternate; }
.pools b:nth-child(2) { width: min(560px, 70vw); height: 480px; right: -140px; top: 18vh; background: var(--pool2); opacity: 0.22; animation: drift2 30s ease-in-out infinite alternate; }
.pools b:nth-child(3) { width: min(520px, 70vw); height: 420px; left: 30vw; bottom: -180px; background: var(--pool3); opacity: 0.22; animation: drift1 22s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(90px, 70px) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-80px, 50px) scale(0.92); } }

/* ── Shell ── */
.shell { width: 100%; max-width: var(--spine); margin: 0 auto; padding-inline: var(--gutter); }

/* ── Top nav ── */
.topnav { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding-block: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 0.85rem; background: linear-gradient(135deg, var(--primary-l), var(--primary)); color: var(--on-primary); box-shadow: 0 4px 14px var(--primary-glow); }
.navlinks { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.navlinks a { font-weight: 600; font-size: 0.92rem; color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; }
.navlinks a:hover { color: var(--ink); background: var(--card); }
.navlinks a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--primary); border-radius: 10px 10px 2px 2px; }

/* ── Type bits ── */
.kicker { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 800; color: var(--second); }
.grad { background: linear-gradient(120deg, var(--hl1), var(--hl2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.lede { color: var(--muted); font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem); max-width: 52ch; }

/* ── Buttons ── */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 12px; font-family: var(--font-head); font-weight: 700; font-size: 1rem; text-decoration: none; border: 0; cursor: pointer; transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s; }
.btn-primary { background: linear-gradient(135deg, var(--primary-l), var(--primary)); color: var(--on-primary); box-shadow: 0 8px 24px var(--primary-glow), inset 0 1px 1px rgba(255, 255, 255, 0.3); }
.btn-primary::before { content: ''; position: absolute; inset: 0 0 50% 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent); border-radius: inherit; pointer-events: none; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px var(--primary-glow), inset 0 1px 1px rgba(255, 255, 255, 0.3); }
.btn-ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--line-hi); transform: translateY(-2px); }

/* ── Hero with the pegboard ── */
.hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding-block: clamp(24px, 5vw, 64px) clamp(28px, 4vw, 48px); }
.hero h1 { font-size: clamp(2.6rem, 1.6rem + 4.4vw, 5rem); line-height: 0.98; margin-top: 12px; }
.hero .lede { margin-top: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-quote { margin-top: 24px; padding-left: 14px; border-left: 3px solid var(--second); color: var(--muted); font-size: 0.95rem; max-width: 50ch; }
@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); } }

.pegboard { position: relative; border-radius: var(--rad-lg); border: 1px solid var(--line); background-color: var(--bg-2); background-image: radial-gradient(circle, var(--peg-dot) 1.6px, transparent 2px); background-size: 22px 22px; background-position: 11px 11px; min-height: 320px; padding: 30px 18px 44px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 12px; justify-items: center; align-content: center; box-shadow: inset 0 2px 24px rgba(0, 0, 0, 0.35); }
.pegboard-label { position: absolute; left: 16px; bottom: 12px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.peg { position: relative; width: clamp(64px, 7vw, 92px); aspect-ratio: 1; display: block; transform-origin: 50% -20px; animation: swing 4.2s ease-in-out infinite; animation-delay: var(--d, 0s); text-decoration: none; }
.peg::before { content: ''; position: absolute; left: 50%; top: -20px; width: 2px; height: 20px; background: var(--hook); transform: translateX(-50%); }
.peg::after { content: ''; position: absolute; left: 50%; top: -25px; width: 9px; height: 9px; border-radius: 50%; background: var(--chip-ink); transform: translateX(-50%); box-shadow: 0 0 0 3px var(--bg-2); }
.peg svg { width: 100%; height: 100%; display: block; border-radius: 22%; box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4); }
.peg-name { position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%) translateY(-4px); white-space: nowrap; font-size: 0.72rem; font-weight: 700; color: var(--ink); background: var(--card-2); border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px; opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none; z-index: 2; }
.peg:hover, .peg:focus-visible { animation-play-state: paused; }
.peg:hover .peg-name, .peg:focus-visible .peg-name { opacity: 1; transform: translateX(-50%) translateY(0); }
.peg:hover svg { box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45), 0 0 0 3px var(--primary); }
@keyframes swing { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@media (max-width: 520px) { .pegboard { min-height: 0; gap: 36px 8px; padding: 30px 10px 40px; } }

/* ── Stats ── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--rad); padding: 16px 18px; }
.stat-num { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { margin-top: 6px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.meter { height: 6px; border-radius: 99px; background: var(--line); margin-top: 12px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--second)); transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94); }

/* ── Sections ── */
.block { padding-block: clamp(40px, 6vw, 80px) 0; scroll-margin-top: 16px; }
.block-head { display: grid; gap: 10px; margin-bottom: 26px; max-width: 72ch; }
.block-head h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); }
.block-head p { color: var(--muted); }

/* ── Cards ── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--rad-lg); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s; }
.card:hover { transform: translateY(-3px); border-color: var(--line-hi); }
.card-shot { position: relative; aspect-ratio: 16 / 10; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.card-shot > img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card-icon { position: absolute; left: 14px; bottom: -20px; width: 48px; height: 48px; z-index: 1; }
.card-icon svg { width: 100%; height: 100%; display: block; border-radius: 12px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35); }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-shot + .card-body { padding-top: 28px; }
.card-type { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--second); }
.card-title { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; line-height: 1.2; }
.card-desc { color: var(--muted); font-size: 0.93rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.chip { font-size: 0.72rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; background: var(--chip-bg); color: var(--chip-ink); }
.chip-live { background: var(--second-bg); color: var(--second); }
.card-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-family: var(--font-head); font-weight: 700; font-size: 0.92rem; color: var(--primary-l); text-decoration: none; }
.card-link::after { content: '→'; transition: transform 0.2s; }
.card-link:hover::after { transform: translateX(4px); }
.card-note { font-size: 0.82rem; color: var(--muted); font-style: italic; min-height: 44px; display: inline-flex; align-items: center; }

/* Flow strip: stands in for a screenshot on builds with no public page */
.flow { display: flex; flex-wrap: wrap; align-content: center; gap: 8px 6px; padding: 18px; height: 100%; background-color: var(--bg-2); background-image: radial-gradient(circle, var(--peg-dot) 1.4px, transparent 1.8px); background-size: 18px 18px; }
.flow span { font-size: 0.76rem; font-weight: 700; padding: 5px 10px; border-radius: 8px; background: var(--card-2); border: 1px solid var(--line-hi); color: var(--ink); }
.flow i { font-style: normal; color: var(--primary-l); font-weight: 800; align-self: center; }

/* ── Panels (about, contact) ── */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--rad-lg); padding: clamp(22px, 4vw, 40px); }

/* ── Footer ── */
.foot { margin-top: clamp(56px, 8vw, 96px); padding-block: 28px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; display: grid; gap: 8px; text-align: center; }
.foot a { color: var(--ink); }

.loading { color: var(--muted); padding: 40px 0; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
