/* ==========================================================================
   DUKE KAMANDA — portfolio.css
   Page components: hero, work grid, case study layout, stats, about,
   contact, timeline. Consumes tokens from theme.css.
   ========================================================================== */

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 7rem var(--pad-x) 3.5rem;
  position: relative;
  overflow: hidden;
  border-bottom: 0.5px solid var(--rule);
  background-image: linear-gradient(var(--scrim), var(--scrim)), url('media/abstract/hero-stock.jpg');
  background-size: cover;
  background-position: center;
}
.hero-bg-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-size: clamp(10rem, 22vw, 22rem);
  font-weight: 700;
  color: var(--fg);
  opacity: 0.025;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
}
.hero-body { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; flex: 1; }
.hero-kicker {
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.hero-h1 {
  font-size: var(--fs-hero);
  line-height: 0.9;
  letter-spacing: -0.025em;
  margin-bottom: 2.5rem;
}
.hero-h1 i { font-style: italic; color: var(--accent); }
.hero-h1 { text-shadow: var(--neu-text-emboss); }
.hero-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2rem;
  padding: 1.5rem 1.75rem;
  margin-top: 0.5rem;
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  box-shadow: var(--neu-pressed-md);
}
.hero-desc { max-width: 420px; font-size: 14px; line-height: 1.8; color: var(--fg-muted); }
.hero-desc strong { color: var(--fg); font-weight: 500; }
.hero-meta { text-align: right; }
.hero-meta p {
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-muted);
  line-height: 2;
}
.hero-meta span { color: var(--accent); }
@media (max-width: 640px) {
  .hero-foot { grid-template-columns: 1fr; }
  .hero-meta { text-align: left; }
}

/* ── Work grid (index + home) ───────────────────────────────────────── */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  position: relative;
}
@media (max-width: 1100px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .work-grid { grid-template-columns: 1fr; } }

/* Homepage preview grids (Selected Work, Systems & Products) run one column
   tighter than the full case-study/systems index pages — three per row on
   desktop keeps the tiles from reading oversized on a page that's meant to
   be a teaser, not the full listing. */
#work .work-grid,
#systems .work-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 2.25rem;
}
@media (max-width: 1100px) {
  #work .work-grid,
  #systems .work-grid { grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
}
@media (max-width: 760px) {
  #work .work-grid,
  #systems .work-grid { grid-template-columns: 1fr; }
}

.work-tile {
  border: none;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--fg);
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  filter: var(--neu-raised-md-filter);
  overflow: hidden;
  position: relative;
  transition: filter 0.3s cubic-bezier(0.22, 1, 0.36, 1), transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-tile:hover { filter: var(--neu-raised-lg-filter); transform: translateY(-4px); }
.work-tile.featured { grid-column: span 2; }
@media (max-width: 760px) { .work-tile.featured { grid-column: span 1; } }

.wt-media {
  aspect-ratio: 16 / 8;
  background: var(--bg-sunken);
  box-shadow: var(--neu-pressed-sm);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.work-tile.featured .wt-media { aspect-ratio: 16 / 6; }
.wt-media .img-fill {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.wt-ghost {
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  color: var(--fg);
  opacity: 0.05;
  user-select: none;
}
.wt-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; gap: 0.6rem; }
.wt-ctx {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.wt-title { font-size: clamp(1.15rem, 1.55vw, 1.5rem); line-height: 1.08; letter-spacing: -0.01em; }
.work-tile.featured .wt-title { font-size: clamp(1.4rem, 2.1vw, 1.9rem); }
.wt-title i { font-style: normal; }
.wt-desc { font-size: var(--fs-small); color: var(--fg-muted); line-height: 1.7; max-width: 560px; }
.wt-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 0.75rem; }
.wtag {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: none;
  color: var(--fg-muted);
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  box-shadow: var(--neu-raised-sm);
}
.wtag.r { color: var(--accent); }

.work-tile.placeholder {
  border: 1.5px dashed var(--rule);
  border-radius: var(--radius-md);
  box-shadow: none;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  background: none;
  gap: 0.75rem;
}
.work-tile.placeholder .plus {
  font-family: var(--serif);
  font-size: 3rem;
  color: var(--fg-faint);
  line-height: 1;
}
.work-tile.placeholder .lbl {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* ── Stats bar ──────────────────────────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  padding: 3rem var(--pad-x);
  margin: 0 var(--pad-x);
  width: calc(100% - 2 * var(--pad-x));
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  box-shadow: var(--neu-pressed-md);
}

/* ── Case study pages ───────────────────────────────────────────────── */
.case-hero {
  padding: 9rem var(--pad-x) 3.5rem;
  border-bottom: 0.5px solid var(--rule);
  background-image: linear-gradient(var(--scrim), var(--scrim)), url('media/abstract/mesh-case.svg');
  background-size: cover;
  background-position: center;
}
.case-kicker {
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.case-h1 { font-size: var(--fs-display); line-height: 0.95; letter-spacing: -0.02em; margin-bottom: 2rem; max-width: 14ch; }
.case-h1 i { font-style: italic; color: var(--accent); }
.case-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  padding-top: 1.5rem;
  box-shadow: 0 1px 0 var(--neu-lo);
}
.cm-label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 0.4rem;
}
.cm-value { font-size: var(--fs-small); color: var(--fg); line-height: 1.6; }

.case-section { padding: var(--pad-section) var(--pad-x); border-bottom: 0.5px solid var(--rule-soft); }
.case-section.alt { background: var(--bg-raised); }

.cs-grid { display: grid; grid-template-columns: 260px 1fr; gap: 3rem; align-items: start; }
@media (max-width: 760px) { .cs-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.cs-head { font-size: var(--fs-h3); line-height: 1.05; position: sticky; top: 6rem; }
.cs-head i { font-style: italic; color: var(--accent); }
.cs-body { font-size: 15px; line-height: 1.9; color: var(--fg-muted); max-width: 640px; }
.cs-body p + p { margin-top: 1.25rem; }
.cs-body strong { color: var(--fg); font-weight: 500; }

.pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.epill {
  font-size: 12px;
  padding: 5px 13px;
  border: none;
  color: var(--fg-muted);
  border-radius: var(--radius-pill);
  background: var(--bg-raised);
  box-shadow: var(--neu-raised-sm);
}

.outcome-list { list-style: none; margin-top: 0.5rem; }
.outcome-list li {
  font-size: 14px;
  color: var(--fg-muted);
  padding: 0.75rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  line-height: 1.7;
  box-shadow: 0 1px 0 var(--neu-lo);
}
.outcome-list li::before { content: '—'; color: var(--accent); flex-shrink: 0; }
.outcome-list strong { color: var(--fg); font-weight: 500; }

.media-slot {
  aspect-ratio: 16 / 9;
  background: var(--bg-sunken);
  border-radius: var(--radius-md);
  box-shadow: var(--neu-pressed-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.media-slot .lbl {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-align: center;
  padding: 0 0.75rem;
}
.media-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-top: 2rem; }
@media (max-width: 640px) { .media-row { grid-template-columns: 1fr; } }

.video-embed {
  aspect-ratio: 16 / 9;
  background: var(--bg-sunken);
  border-radius: var(--radius-md);
  box-shadow: var(--neu-pressed-sm);
  overflow: hidden;
}
.video-embed iframe { width: 100%; height: 100%; display: block; border: 0; }
.video-cap {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-align: center;
  padding: 0.6rem 0.5rem 0;
}
.video-slot { display: flex; flex-direction: column; }
/* ── Phone frame gallery ─────────────────────────────────────────────── */
.phone-gallery-wrap {
  position: relative;
  margin-top: 2rem;
}
.phone-gallery {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}
.phone-gallery::-webkit-scrollbar { display: none; }

.phone-gallery > div {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.phone-frame {
  position: relative;
  border-radius: 1.6rem;
  overflow: hidden;
  background: #0a0a0a;
  filter: drop-shadow(0 0 1.5px rgba(255,255,255,0.12)) drop-shadow(0 12px 40px rgba(0,0,0,0.5));
  aspect-ratio: 9/19.5;
  height: min(50vh, 380px);
  width: auto;
}
@media (max-width: 600px) {
  .phone-frame { height: min(42vh, 300px); }
}
.phone-frame::before {
  content: '';
  position: absolute;
  top: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  width: 28%;
  height: 1.1rem;
  background: #0a0a0a;
  border-radius: 0 0 1rem 1rem;
  z-index: 2;
}
.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
.phone-cap {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-align: center;
  margin-top: 0.6rem;
}
.phone-gallery-label {
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.phone-gallery-nav {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.pg-btn {
  background: none;
  border: 1px solid var(--accent-border);
  color: var(--accent);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.pg-btn:hover { background: var(--accent-dim); border-color: var(--accent); }
.pg-btn:disabled { opacity: 0.25; cursor: default; }

/* ── Kiosk frame gallery — landscape screens (ATM, USSD, promo boards) ── */
.kiosk-gallery-wrap { position: relative; margin-top: 2rem; }
.kiosk-gallery {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}
.kiosk-gallery::-webkit-scrollbar { display: none; }
.kiosk-gallery > div { flex: 0 0 auto; scroll-snap-align: start; }
.kiosk-frame {
  position: relative;
  border-radius: 0.6rem;
  overflow: hidden;
  background: #0a0a0a;
  filter: drop-shadow(0 0 1.5px rgba(255,255,255,0.12)) drop-shadow(0 12px 40px rgba(0,0,0,0.5));
  aspect-ratio: 4/3;
  height: min(42vh, 320px);
  width: auto;
}
@media (max-width: 600px) { .kiosk-frame { height: min(34vh, 260px); } }
.kiosk-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
.kiosk-cap {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-align: center;
  margin-top: 0.6rem;
}

.channel-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 0.5px solid var(--accent);
  padding-bottom: 2px;
}
.channel-link:hover { opacity: 0.75; }

.lite-yt {
  position: relative;
  cursor: pointer;
  background: #000;
}
.lite-yt__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  transition: opacity 0.2s ease;
}
.lite-yt:hover .lite-yt__thumb { opacity: 1; }
.lite-yt__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0.5px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lite-yt:hover .lite-yt__play { background: var(--accent); transform: translate(-50%, -50%) scale(1.06); }
.lite-yt__play svg { width: 16px; height: 16px; margin-left: 2px; }

/* Next case footer nav */
.next-case {
  display: block;
  padding: 4rem var(--pad-x);
  text-decoration: none;
  color: var(--fg);
  background: var(--bg-raised);
  box-shadow: var(--neu-pressed-md);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transition: box-shadow 0.3s ease, background-color 0.3s;
}
.next-case:hover { background: var(--accent-dim); }
.next-case .nc-lbl {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.next-case .nc-title { font-size: var(--fs-h2); line-height: 1; }

/* ── Timeline (home) ────────────────────────────────────────────────── */
.timeline {
  display: grid;
  gap: 0;
  background: var(--bg-raised);
  border-radius: var(--radius-lg);
  box-shadow: var(--neu-pressed-md);
  padding: 0.5rem 1.75rem;
}
.trow {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: none;
}
.trow:not(:last-child) { box-shadow: 0 1px 0 var(--neu-lo); }
.tyear { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.1em; color: var(--fg-muted); padding-top: 2px; line-height: 1.6; }
.tyear .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: var(--neu-raised-sm); margin-right: 8px; }
.trole { font-size: 14px; font-weight: 500; color: var(--fg); margin-bottom: 0.2rem; }
.tplace { font-size: var(--fs-small); color: var(--fg-muted); }
.ttype { font-family: var(--mono); font-size: 8px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); margin-top: 0.3rem; }
@media (max-width: 640px) { .trow { grid-template-columns: 100px 1fr; } }

/* ── About / philosophy / contact (home) ────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
@media (max-width: 700px) { .about-grid { grid-template-columns: 1fr; gap: 2rem; } }
.about-bio { font-family: var(--serif); font-size: clamp(1.1rem, 2vw, 1.4rem); line-height: 1.7; color: var(--fg-muted); }
.about-bio strong { color: var(--fg); }
.about-bio + .about-bio { margin-top: 1.25rem; }
.sidebar-block {
  margin-bottom: 1.1rem;
  padding: 1.1rem 1.25rem 1.25rem;
  border: none;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(130% 100% at 0% 0%, color-mix(in srgb, var(--card-accent, var(--accent)) 10%, transparent), transparent 65%),
    var(--bg-raised);
  box-shadow: var(--neu-raised-md);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.sidebar-block:hover {
  transform: translateY(-3px);
  box-shadow: var(--neu-raised-lg);
}
.sb-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--card-accent, var(--accent));
  margin-bottom: 0.75rem;
}
.sb-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-raised);
  box-shadow: var(--neu-raised-sm);
  color: var(--card-accent, var(--accent));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sidebar-block:hover .sb-icon { transform: rotate(-8deg) scale(1.08); }
.sb-icon svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.sb-list { list-style: none; }
.sb-list li { font-size: var(--fs-small); color: var(--fg-muted); padding: 0.3rem 0; line-height: 1.5; }
.sb-list li:not(:last-child) { box-shadow: 0 1px 0 var(--neu-lo); }
.sb-list li strong { color: var(--fg); font-weight: 500; }

.phil {
  background-color: var(--accent);
  background-image: linear-gradient(var(--accent-scrim), var(--accent-scrim)), url('media/abstract/mesh-phil.svg');
  background-size: cover;
  background-position: center;
  padding: var(--pad-section) var(--pad-x);
  text-align: center;
}
.phil-q {
  font-family: var(--serif); font-size: clamp(2rem, 5vw, 4.5rem); font-weight: 600; line-height: 1.15;
  color: var(--fg); max-width: 820px; margin: 0 auto; letter-spacing: -0.01em;
  background: var(--bg-raised);
  border-radius: var(--radius-lg);
  box-shadow: var(--neu-raised-lg);
  padding: 3rem 3.5rem;
}
.phil-q i { font-style: italic; color: var(--accent); }
.phil-attr { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg-muted); margin-top: 1.25rem; }

.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .svc-grid { grid-template-columns: 1fr; } }
.svc-card {
  position: relative;
  padding: 1.5rem;
  border: none;
  border-radius: var(--radius-lg);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--card-accent, var(--accent)) 10%, transparent), transparent 65%),
    var(--bg-raised);
  box-shadow: var(--neu-raised-md);
}
.svc-card:hover { box-shadow: var(--neu-raised-lg); transform: translateY(-4px); }
.svc-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 1rem;
  background: var(--bg-raised);
  box-shadow: var(--neu-raised-sm);
  color: var(--card-accent, var(--accent));
}
.svc-icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.svc-num { font-family: var(--mono); font-size: var(--fs-micro); letter-spacing: 0.15em; color: var(--fg-faint); margin-bottom: 0.75rem; }
.svc-name { font-family: var(--serif); font-size: var(--fs-h4); font-weight: 600; color: var(--fg); margin-bottom: 0.5rem; }
.svc-desc { font-size: 12px; color: var(--fg-muted); line-height: 1.7; }

.svc-card:nth-of-type(8n+1) { --card-accent: var(--amber); }
.svc-card:nth-of-type(8n+2) { --card-accent: var(--teal); }
.svc-card:nth-of-type(8n+3) { --card-accent: var(--violet); }
.svc-card:nth-of-type(8n+4) { --card-accent: var(--crimson); }
.svc-card:nth-of-type(8n+5) { --card-accent: var(--teal); }
.svc-card:nth-of-type(8n+6) { --card-accent: var(--crimson); }
.svc-card:nth-of-type(8n+7) { --card-accent: var(--amber); }
.svc-card:nth-of-type(8n+8) { --card-accent: var(--violet); }

.contact-h { font-size: var(--fs-display); line-height: 0.92; letter-spacing: -0.025em; margin-bottom: 2rem; }
.contact-h i { color: var(--accent); font-style: italic; }
.contact-sub { font-size: 14px; color: var(--fg-muted); max-width: 360px; line-height: 1.8; margin-bottom: 2.5rem; }
.contact-links { display: flex; flex-direction: column; gap: 0.75rem; max-width: 480px; }
.clink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  box-shadow: var(--neu-raised-sm);
  color: var(--fg);
  text-decoration: none;
  font-size: var(--fs-small);
  transition: box-shadow 0.2s ease, color 0.25s, padding-left 0.25s;
}
.clink:hover { box-shadow: var(--neu-pressed-sm); color: var(--accent); padding-left: 1.5rem; }

/* ==========================================================================
   SYSTEMS — long-form technical case studies (AI automation, dev, web)
   ========================================================================== */

/* Wide body modifier — technical write-ups need room for tables/diagrams */
.cs-body.wide { max-width: 900px; }
.cs-body.full { max-width: 100%; }
.cs-body.wide h3 { font-family: var(--serif); font-size: 1.4rem; color: var(--fg); margin: 1.75rem 0 0.75rem; font-weight: 700; }
.cs-body.wide h3:first-child { margin-top: 0; }
.cs-body.wide ul, .cs-body.wide ol { padding-left: 1.25rem; margin-top: 0.5rem; }
.cs-body.wide li { margin: 0.35rem 0; }
.cs-body.wide code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg-sunken);
  border: none;
  box-shadow: var(--neu-pressed-sm);
  padding: 0.15em 0.5em;
  border-radius: var(--radius-sm);
  color: var(--fg);
}

/* Table of contents */
.toc {
  list-style: none;
  counter-reset: toc-counter;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 2rem;
}
@media (max-width: 640px) { .toc { grid-template-columns: 1fr; } }
.toc li { counter-increment: toc-counter; }
.toc a {
  text-decoration: none;
  color: var(--fg-muted);
  font-size: 14px;
  display: flex;
  gap: 0.6rem;
  padding: 0.4rem 0;
  box-shadow: 0 1px 0 var(--neu-lo);
  transition: color 0.2s, padding-left 0.2s;
}
.toc a::before {
  content: counter(toc-counter, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  flex-shrink: 0;
}
.toc a:hover { color: var(--fg); padding-left: 0.4rem; }

/* Spec / data tables */
.spec-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
  border: none;
  border-radius: var(--radius-md);
  background: var(--bg-sunken);
  box-shadow: var(--neu-pressed-sm);
}
.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.spec-table th, .spec-table td { padding: 0.7rem 1rem; text-align: left; box-shadow: 0 1px 0 var(--neu-lo); vertical-align: top; }
.spec-table thead th {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.spec-table tbody tr:last-child td { border-bottom: none; }
.spec-table tbody tr:hover { background: var(--accent-dim); }
.spec-table td { color: var(--fg-muted); }
.spec-table td strong, .spec-table td.k { color: var(--fg); font-weight: 500; }
.spec-table.severity td:first-child { white-space: nowrap; }
.sev-tag { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 8px; border-radius: 2px; display: inline-block; }
.sev-critical { background: rgba(180, 0, 0, 0.18); color: var(--crimson); }
.sev-high { background: rgba(255, 174, 0, 0.18); color: var(--amber); }
.sev-medium { background: rgba(124, 58, 237, 0.16); color: var(--violet); }
.sev-low { background: rgba(0, 191, 166, 0.16); color: var(--teal); }

/* Architecture / repo-tree code blocks */
.code-block {
  background: var(--bg-sunken);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--neu-pressed-sm);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-top: 1rem;
}
.code-block pre {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--fg-muted);
  white-space: pre;
}
.code-block .hl { color: var(--accent); }

/* Version timeline (reuses .timeline pattern at smaller scale) */
.version-row {
  display: grid;
  grid-template-columns: 90px 110px 1fr;
  gap: 1.25rem;
  padding: 1rem 0;
  box-shadow: 0 1px 0 var(--neu-lo);
  align-items: baseline;
}
@media (max-width: 640px) { .version-row { grid-template-columns: 1fr; gap: 0.25rem; } }
.version-row .v-tag { font-family: var(--mono); font-size: 11px; color: var(--accent); }
.version-row .v-period { font-family: var(--mono); font-size: 10px; color: var(--fg-faint); }
.version-row .v-scope { font-size: 13px; color: var(--fg-muted); line-height: 1.6; }

/* ── Systems index tiles (badge variant of work-tile) ──────────────────── */
.wt-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-accent);
  background: var(--accent);
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   Interactive demo widget — self-contained CRM inbox mock
   ========================================================================== */
.demo-shell {
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-raised);
  filter: var(--neu-raised-md-filter);
  margin-top: 1.5rem;
}

/* ── Interactive workflow (native, no code shown) ───────────────────── */
.wf { margin-top: 1.5rem; }

/* Publishing spine */
.wf-spine-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.wf-spine-title {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.wf-play {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--bg-raised);
  box-shadow: var(--neu-raised-sm);
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.5rem 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wf-play:hover { transform: translateY(-1px); }
.wf-play.playing { box-shadow: var(--neu-pressed-sm); color: var(--fg-muted); }
.wf-play-icon { font-size: 0.7em; }

.wf-spine {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
  position: relative;
}
.wf-spine.cols-5 { grid-template-columns: repeat(5, 1fr); }
.wf-step {
  position: relative;
  text-align: left;
  border: none;
  background: var(--bg-raised);
  box-shadow: var(--neu-raised-sm);
  border-radius: var(--radius-md);
  padding: 0.9rem 0.85rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1), box-shadow 0.25s ease;
}
.wf-step::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--c);
  opacity: 0.35;
  transition: opacity 0.25s ease, width 0.25s ease;
}
.wf-step-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 0 var(--c);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.wf-step-name { font-weight: 600; font-size: 0.95rem; line-height: 1.1; }
.wf-step-sub {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.05em;
  color: var(--fg-muted);
}
.wf-step:hover { transform: translateY(-2px); box-shadow: var(--neu-raised-md); }
.wf-step.active { transform: translateY(-2px); box-shadow: var(--neu-raised-md); }
.wf-step.active::before { opacity: 1; width: 5px; }
.wf-step.active .wf-step-dot { box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 22%, transparent); transform: scale(1.1); }

.wf-spine-detail {
  margin-top: 1rem;
  padding: 1.15rem 1.35rem;
  border-radius: var(--radius-md);
  background: var(--bg-sunken);
  box-shadow: var(--neu-pressed-sm);
  color: var(--fg-muted);
  font-size: var(--fs-small);
  line-height: 1.75;
  min-height: 2.5rem;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.wf-spine-detail.show { opacity: 1; transform: none; }
.wf-spine-detail strong { color: var(--fg); font-weight: 600; }
.wf-spine-detail-n {
  display: inline-block;
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-right: 0.6rem;
}

/* Lane filter */
.wf-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 2.5rem 0 1.25rem; }
.wf-filter button {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: var(--bg-raised);
  box-shadow: var(--neu-raised-sm);
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.95rem;
  cursor: pointer;
  transition: color 0.2s ease, box-shadow 0.2s ease;
}
.wf-filter button.active { color: var(--accent); box-shadow: var(--neu-pressed-sm); }

/* Workflow cards */
.wf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.75rem;
}
.wf-card {
  position: relative;
  text-align: left;
  border: none;
  background: var(--bg-raised);
  box-shadow: var(--neu-raised-sm);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem 0.9rem 1.1rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1), box-shadow 0.25s ease, opacity 0.25s ease;
}
.wf-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--c);
  opacity: 0.5;
}
.wf-card-n {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  color: var(--c);
}
.wf-card-name { font-weight: 600; font-size: 0.92rem; line-height: 1.2; }
.wf-card-when {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.04em;
  color: var(--fg-muted);
}
.wf-card:hover { transform: translateY(-2px); box-shadow: var(--neu-raised-md); }
.wf-card.active { box-shadow: var(--neu-raised-md); transform: translateY(-2px); }
.wf-card.active::before { opacity: 1; width: 5px; }
.wf-card.dim { opacity: 0.28; }
.wf-card.dim:hover { opacity: 0.6; }

.wf-detail {
  margin-top: 1.25rem;
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius-md);
  background: var(--bg-sunken);
  box-shadow: var(--neu-pressed-sm);
  color: var(--fg-muted);
  font-size: var(--fs-small);
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 3rem;
}
.wf-detail.show { color: var(--fg-muted); }
.wf-detail-badge {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c);
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--c) 12%, transparent);
}
.wf-detail-name { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--fg); }
.wf-detail-blurb { color: var(--fg-muted); }

@media (max-width: 720px) {
  .wf-spine,
  .wf-spine.cols-5 { grid-template-columns: repeat(2, 1fr); }
}
.demo-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  box-shadow: var(--neu-pressed-sm);
  background: var(--bg-sunken);
}
.demo-topbar .dots { display: flex; gap: 5px; }
.demo-topbar .dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--fg-faint); display: inline-block; }
.demo-topbar .label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.demo-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}
.demo-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); animation: demo-pulse 1.6s ease infinite; }
@keyframes demo-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* God's-view command-center dashboard */
.demo-dashboard { padding: 1.25rem 1.5rem; }

.demo-range { display: flex; gap: 0.4rem; margin-bottom: 1.5rem; }
.demo-range button {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: var(--bg-raised);
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  box-shadow: var(--neu-raised-sm);
  cursor: pointer;
  transition: color 0.2s, box-shadow 0.2s ease;
}
.demo-range button:hover { color: var(--fg); }
.demo-range button.active { color: var(--on-accent); background: var(--accent); box-shadow: var(--neu-pressed-sm); }

.demo-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1.25rem; margin-bottom: 1.75rem; }
.demo-kpi { border: none; border-radius: var(--radius-md); padding: 1rem; background: var(--bg-sunken); box-shadow: var(--neu-pressed-sm); }
.demo-kpi-value { font-family: var(--serif); font-size: 1.9rem; font-weight: 700; color: var(--fg); line-height: 1; }
.demo-kpi-label { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted); margin-top: 0.4rem; }

.demo-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .demo-panels { grid-template-columns: 1fr; } }
.demo-panel-head {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 0.85rem;
}

.demo-channels { display: flex; flex-direction: column; gap: 0.45rem; }
.demo-channel-row {
  display: grid;
  grid-template-columns: 92px 1fr 34px;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  background: none;
  width: 100%;
  text-align: left;
  transition: background-color 0.15s, border-left-color 0.15s, box-shadow 0.15s;
}
.demo-channel-row:hover, .demo-channel-row.active { background: var(--accent-dim); border-left-color: var(--accent); box-shadow: var(--neu-pressed-sm); }
.demo-channel-name { font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg); display: inline-flex; align-items: center; gap: 0.4rem; }
.demo-channel-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.demo-funnel-stage { display: inline-flex; align-items: center; gap: 0.5rem; }
.demo-channel-track { height: 6px; border-radius: 3px; background: var(--bg-sunken); box-shadow: var(--neu-pressed-sm); overflow: hidden; }
.demo-channel-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 3px; transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.demo-channel-count { font-family: var(--mono); font-size: 11px; color: var(--fg-muted); text-align: right; }

.demo-funnel { display: flex; flex-direction: column; gap: 0.4rem; }
.demo-funnel-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border-left: 2px solid transparent;
  background: var(--bg-sunken);
  box-shadow: var(--neu-pressed-sm);
  width: 100%;
  text-align: left;
  transition: background-color 0.15s, border-left-color 0.15s;
}
.demo-funnel-row:hover, .demo-funnel-row.active { border-left-color: var(--accent); background: var(--accent-dim); }
.demo-funnel-stage { font-size: 12px; color: var(--fg); }
.demo-funnel-count { font-family: var(--mono); font-size: 13px; color: var(--accent); font-weight: 700; }

.demo-focus {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: var(--radius-md);
  background: var(--bg-sunken);
  box-shadow: var(--neu-pressed-sm);
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.6;
}
.demo-focus strong { color: var(--accent); }

.demo-note {
  margin-top: 1.25rem;
  padding: 0.75rem;
  border: 1px dashed var(--accent-border);
  border-radius: var(--radius-md);
  font-size: 11px;
  color: var(--fg-muted);
  line-height: 1.6;
}
.demo-note strong { color: var(--accent); }

/* ── Brand-mirror demo: recreates the real app's own UI chrome,
   independent of portfolio theme (light/dark), for visual fidelity ── */
.demo-shell.brand-crm { background: #fff; }
.demo-appwindow { display: flex; min-height: 460px; }
@media (max-width: 640px) { .demo-appwindow { flex-direction: column; min-height: 0; } }

.brand-crm .demo-sidebar {
  width: 152px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0e3470 0%, #144A9A 100%);
  padding: 16px 10px;
}
@media (max-width: 640px) { .brand-crm .demo-sidebar { width: 100%; padding: 12px 14px; } }
.brand-crm .demo-sidebar-brand { padding: 4px 6px 14px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 10px; }
@media (max-width: 640px) { .brand-crm .demo-sidebar-brand { border-bottom: none; padding-bottom: 4px; margin-bottom: 4px; } }
.brand-crm .demo-sidebar-brand strong { display: block; color: #fff; font-family: var(--sans); font-size: 16px; font-weight: 800; }
.brand-crm .demo-sidebar-brand span { display: block; color: #F8BA8D; font-family: var(--sans); font-size: 7px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; margin-top: 3px; }
.brand-crm .demo-sidebar-brand small { display: block; color: rgba(255,255,255,.32); font-family: var(--sans); font-size: 7px; margin-top: 2px; }
.brand-crm .demo-sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 640px) { .brand-crm .demo-sidebar-nav { flex-direction: row; flex-wrap: wrap; } }
.brand-crm .demo-nav-item {
  font-family: var(--sans); font-size: 10.5px; color: rgba(255,255,255,.62);
  padding: 7px 10px; border-radius: 7px; border-left: 3px solid transparent;
}
.brand-crm .demo-nav-item.active { background: rgba(255,255,255,.14); color: #fff; border-left-color: #F8BA8D; font-weight: 600; }

.brand-crm .demo-main { flex: 1; min-width: 0; background: #F5F7FB; }
.brand-crm .demo-appheader {
  height: 42px; background: #fff; border-bottom: 1px solid #E0E7F3;
  display: flex; align-items: center; padding: 0 18px;
  font-family: var(--sans); font-size: 11.5px; font-weight: 800; color: #144A9A;
}
.brand-crm .demo-dashboard { padding: 18px; }
.brand-crm .demo-range button { font-family: var(--sans); text-transform: none; letter-spacing: 0; border-color: #E0E7F3; color: #777; border-radius: 20px; }
.brand-crm .demo-range button:hover { color: #144A9A; border-color: #144A9A; }
.brand-crm .demo-range button.active { background: #144A9A; border-color: #144A9A; color: #fff; }

.brand-crm .demo-kpi { background: #fff; border: none; border-top: 3px solid #144A9A; border-radius: 9px; box-shadow: 0 1px 6px rgba(0,0,0,.06); padding: 12px 14px; }
.brand-crm .demo-kpi-value { font-family: var(--sans); color: #144A9A; font-size: 21px; font-weight: 800; }
.brand-crm .demo-kpi-label { font-family: var(--sans); color: #777; font-size: 10px; letter-spacing: 0; text-transform: none; font-weight: 500; margin-top: 3px; }

.brand-crm .demo-panel-head { font-family: var(--sans); color: #144A9A; font-size: 12px; font-weight: 800; letter-spacing: 0; text-transform: none; }
.brand-crm .demo-channel-row, .brand-crm .demo-funnel-row { background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,.05); border-radius: 8px; }
.brand-crm .demo-channel-row:hover, .brand-crm .demo-channel-row.active,
.brand-crm .demo-funnel-row:hover, .brand-crm .demo-funnel-row.active { background: #EEF3FF; }
.brand-crm .demo-channel-name, .brand-crm .demo-funnel-stage { font-family: var(--sans); color: #1a1a2e; text-transform: none; letter-spacing: 0; font-size: 11.5px; }
.brand-crm .demo-channel-track { background: #EEF1F7; }
.brand-crm .demo-channel-count { font-family: var(--sans); color: #777; }
.brand-crm .demo-funnel-count { font-family: var(--sans); }
.brand-crm .demo-focus { background: #EEF3FF; border-color: #DCE6F7; color: #1a1a2e; font-family: var(--sans); }
.brand-crm .demo-focus strong { color: #144A9A; }

/* ── n8n-style workflow canvas — mirrors the automation tool's own
   visual language: dot-grid dark canvas, rounded nodes, curved wires ── */
.n8n-canvas-wrap {
  position: relative;
  background: #1a1a1a;
  background-image: radial-gradient(rgba(255,255,255,0.09) 1px, transparent 1px);
  background-size: 22px 22px;
  border-radius: 8px;
  overflow: auto;
  padding: 2rem 1.5rem;
  margin-top: 1.5rem;
}
.n8n-canvas {
  position: relative;
  min-width: 1360px;
  height: 480px;
}
.n8n-canvas svg.wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.n8n-canvas svg.wires path {
  fill: none;
  stroke: #565656;
  stroke-width: 2;
}
.n8n-canvas svg.wires circle { fill: #565656; }

.n8n-node {
  position: absolute;
  width: 168px;
  background: #2d2d2d;
  border: 1.5px solid #444;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  font-family: var(--sans);
}
.n8n-node .n8n-icon {
  width: 26px; height: 26px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.5rem;
}
.n8n-node .n8n-icon svg { width: 15px; height: 15px; stroke: #fff; fill: none; stroke-width: 1.8; }
.n8n-node .n8n-title { color: #f2f2f2; font-size: 11.5px; font-weight: 700; line-height: 1.3; }
.n8n-node .n8n-sub { color: #999; font-size: 9.5px; margin-top: 0.2rem; line-height: 1.4; }
.n8n-node.trigger { border-color: #FF6D5A; }
.n8n-node.trigger .n8n-icon { background: #FF6D5A; }
.n8n-node.logic .n8n-icon { background: #7C3AED; }
.n8n-node.wait .n8n-icon { background: #3B82F6; }
.n8n-node.publish .n8n-icon { background: #10B981; }
.n8n-node.log .n8n-icon { background: #F59E0B; }
.n8n-node.cron .n8n-icon { background: #EC4899; }

.n8n-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; }
.n8n-legend-item { display: flex; align-items: center; gap: 0.4rem; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-muted); }
.n8n-legend-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }

/* Color swatches for design-system breakdowns */
.swatch-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.swatch { border: none; border-radius: var(--radius-md); filter: var(--neu-raised-sm-filter); overflow: hidden; }
.swatch-chip { height: 56px; }
.swatch-info { padding: 0.5rem 0.65rem; }
.swatch-token { font-family: var(--mono); font-size: 10px; color: var(--fg); display: block; }
.swatch-hex { font-family: var(--mono); font-size: 9px; color: var(--fg-faint); }
.clink span { font-family: var(--mono); font-size: var(--fs-micro); letter-spacing: 0.12em; opacity: 0.35; }

/* ── Site-wide footer social bar ────────────────────────────────────── */
.site-foot-social { display: flex; justify-content: center; gap: 1rem; padding: 1.25rem 0 2.5rem; }
.site-foot-social a {
  width: 40px; height: 40px; display: grid; place-items: center;
  color: var(--fg-muted); border-radius: 50%;
  box-shadow: var(--neu-raised-sm);
  transition: color .2s ease, transform .2s ease;
}
.site-foot-social a:hover { color: var(--accent); transform: translateY(-2px); }
.site-foot-social svg { width: 18px; height: 18px; }

/* ── Accent words: Shadows Into Light script ─────────────────────────────
   The italic gold accent words inside headings render in the handwriting
   face. It sits low on the line, so we upsize slightly and lift the
   baseline. Tile titles (.wt-title i) deliberately excluded — they stay
   upright in the display font. */
.hero-h1 i,
.case-h1 i,
.cs-head i,
.phil-q i,
.contact-h i {
  font-family: var(--accent-font);
  font-style: normal;
  font-weight: 400;
  font-size: 1.15em;
  line-height: 1;
  letter-spacing: 0;
}

/* ── "What this means for you" turn — reader-facing takeaway ──────────── */
.you-turn {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 2.25rem;
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  box-shadow: var(--neu-raised-md);
  border-left: 3px solid var(--accent);
}
.you-turn-label {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
}
.you-turn-body { font-size: 1.1rem; line-height: 1.8; color: var(--fg-muted); }
.you-turn-body strong { color: var(--fg); font-weight: 600; }
.you-turn-body i { font-style: italic; color: var(--accent); }

/* ── Touch pointer gating for hover motion ──────────────────────────────
   A tap on a touch device fires a false :hover that sticks the hover
   transform until the user taps elsewhere. On coarse pointers, drop the
   hover-driven MOTION only — neumorphic shadow and colour feedback stay.
   (Loaded last, so these win over the ungated :hover rules above.) */
@media (hover: none), (pointer: coarse) {
  .work-tile:hover,
  .card-lift:hover,
  .svc-card:hover,
  .wf-play:hover,
  .wf-step:hover,
  .wf-card:hover,
  .site-foot-social a:hover,
  .btn:hover .arr,
  .img-zoom:hover img,
  .img-zoom:hover .img-fill,
  .sidebar-block:hover .sb-icon {
    transform: none;
  }
  /* keeps its centering transform, only the hover scale is dropped */
  .lite-yt:hover .lite-yt__play { transform: translate(-50%, -50%); }
  /* no false underline reveal on tap; the .active underline is unaffected */
  .nav-links a:hover::after { transform: scaleX(0); }
}
