/* ============================================================
   fazliddin.com — Design Tokens & Styles

   Warm canvas, ink type, one lime accent. Large regular-weight
   headlines, hairline dividers, floating pill navigation.
   The dashboard also loads this file (plus dashboard.css), so the
   legacy token names below must keep existing.
   ============================================================ */

:root {
  /* Brand */
  --ink:          #21201f;
  --ink-2:        #2c2b29;
  --ink-3:        #3a3936;
  --canvas:       #f6f4f1;
  --lime:         #c2f942;
  --lime-strong:  #b2ee1e;
  --lime-soft:    #eefbc8;
  --on-lime:      #21201f;

  /* Neutral scale (warm) */
  --neutral-0:   #ffffff;
  --neutral-50:  #faf9f7;
  --neutral-100: #f1efeb;
  --neutral-200: #e6e3dd;
  --neutral-300: #d3cfc8;
  --neutral-400: #a6a6a5;
  --neutral-500: #716f6d;
  --neutral-600: #5a5856;
  --neutral-700: #3a3936;
  --neutral-800: #2c2b29;
  --neutral-900: #21201f;
  --neutral-950: #161615;

  /* Legacy blue scale — used only by dashboard.css. */
  --accent-50:  #eff6ff;
  --accent-100: #dbeafe;
  --accent-200: #bfdbfe;
  --accent-300: #93c5fd;
  --accent-400: #60a5fa;
  --accent-500: #2563eb;
  --accent-600: #1d4ed8;
  --accent-700: #1e40af;
  --accent-800: #1e3a8a;
  --accent-900: #172554;

  --success-500: #16a34a;
  --success-50:  #f0fdf4;
  --warning-500: #d97706;
  --warning-50:  #fffbeb;
  --danger-500:  #dc2626;
  --danger-50:   #fef2f2;
  --info-500:    #0284c7;
  --info-50:     #f0f9ff;

  /* Semantic */
  --bg:             var(--canvas);
  --bg-soft:        var(--neutral-100);
  --bg-muted:       var(--neutral-200);
  --surface:        var(--neutral-0);
  --border:         var(--neutral-200);
  --border-strong:  var(--neutral-300);
  --fg:             var(--ink);
  --fg-strong:      var(--ink);
  --fg-muted:       var(--neutral-500);
  --fg-soft:        var(--neutral-400);
  --fg-on-accent:   var(--on-lime);
  --text-on-dark:   var(--canvas);
  --text-on-light:  var(--ink);
  --accent:         var(--lime);
  --accent-hover:   var(--lime-strong);
  --accent-soft:    var(--lime-soft);
  --link:           var(--fg);
  --link-hover:     var(--fg);
  --code-bg:        var(--neutral-100);
  --code-fg:        var(--ink);
  --ring:           rgba(33, 32, 31, 0.18);
  --dot:            rgba(33, 32, 31, 0.16);
  --btn-bg:         var(--ink);
  --btn-fg:         var(--canvas);

  --syn-comment:    #8b8a86;
  --syn-keyword:    #c2f942;
  --syn-string:     #f0c987;
  --syn-number:     #f5a97f;
  --syn-literal:    #f5a97f;
  --syn-type:       #9ccfd8;
  --syn-function:   #f6f4f1;
  --syn-property:   #9ccfd8;
  --syn-punct:      #a6a6a5;

  --font-sans: 'DM Sans', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;

  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  --radius-xs:   4px;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px rgba(33, 32, 31, 0.04);
  --shadow-sm: 0 1px 3px rgba(33, 32, 31, 0.06), 0 1px 2px rgba(33, 32, 31, 0.04);
  --shadow-md: 0 8px 24px rgba(33, 32, 31, 0.07), 0 2px 6px rgba(33, 32, 31, 0.04);
  --shadow-lg: 0 24px 60px rgba(33, 32, 31, 0.12), 0 6px 16px rgba(33, 32, 31, 0.05);
  --shadow-ring: 0 0 0 3px var(--ring);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration-fast: 120ms;
  --duration:      200ms;
  --duration-slow: 600ms;

  --wrap: 1200px;
  --wrap-narrow: 760px;
  --gutter: 24px;
}

[data-theme="dark"] {
  --bg:             var(--neutral-950);
  --bg-soft:        #1d1c1b;
  --bg-muted:       var(--neutral-800);
  --surface:        var(--neutral-900);
  --border:         #34332f;
  --border-strong:  #4a4844;
  --fg:             var(--canvas);
  --fg-strong:      #ffffff;
  --fg-muted:       #a8a5a0;
  --fg-soft:        #75736f;
  --code-bg:        var(--neutral-800);
  --code-fg:        var(--canvas);
  --link:           var(--canvas);
  --link-hover:     var(--canvas);
  --ring:           rgba(194, 249, 66, 0.28);
  --dot:            rgba(246, 244, 241, 0.14);
  --btn-bg:         var(--canvas);
  --btn-fg:         var(--ink);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: var(--weight-regular) var(--text-base)/1.6 var(--font-sans);
  overflow-x: hidden;
}

::selection { background: var(--lime); color: var(--ink); }

h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--font-sans); color: var(--fg); font-weight: var(--weight-medium); }
h1 { font-size: var(--text-5xl); line-height: 1.05; letter-spacing: -0.035em; font-weight: var(--weight-regular); }
h2 { font-size: var(--text-3xl); line-height: 1.15; letter-spacing: -0.025em; }
h3 { font-size: var(--text-xl); line-height: 1.3; letter-spacing: -0.015em; }
p { margin: 0; }

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--duration) var(--ease), text-decoration-color var(--duration) var(--ease);
}
a:hover {
  color: var(--link-hover);
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: 0.88em;
  font-variant-ligatures: none;
}
:not(pre) > code {
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 0.12em 0.42em;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
}

hr, .divider {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 0;
}

img { max-width: 100%; height: auto; }

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 4px;
}

.muted { color: var(--fg-muted); }
.muted-link { color: var(--fg-muted); text-decoration: underline; text-underline-offset: 3px; }
.muted-link:hover { color: var(--fg); }

/* ============================================================
   Layout
   ============================================================ */
.page-wrapper {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.page-wrapper--narrow { max-width: calc(var(--wrap-narrow) + var(--gutter) * 2); }

main { display: block; min-height: 60vh; }

.section { padding: 96px 0 0; }
.section--sm { padding: 64px 0 0; }

/* Section heading: label pill + large title on the left, lead on the right. */
.section-head {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px 64px;
  align-items: end;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}
.section-head__title {
  margin-top: 18px;
  font-size: clamp(34px, 4.2vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.028em;
  font-weight: var(--weight-regular);
}
.section-head__lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: 520px;
}
.section-head__aside { display: grid; gap: 18px; justify-items: start; }

.section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.section__title {
  font-size: 28px;
  font-weight: var(--weight-medium);
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}
.section__header .section__title { margin-bottom: 0; }
.section__lead { color: var(--fg-muted); font-size: 17px; margin: -8px 0 24px; }
.section__link, .arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: var(--weight-medium);
  color: var(--fg);
  white-space: nowrap;
}
.section__link svg, .arrow-link svg { transition: transform var(--duration) var(--ease); }
.section__link:hover svg, .arrow-link:hover svg { transform: translateX(3px); }
.section-subtitle { font-size: 15px; font-weight: var(--weight-medium); color: var(--fg-muted); margin-bottom: 8px; }

/* ============================================================
   Labels: eyebrow, pills, tags
   ============================================================ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.label-pill,
.page-header > .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 14px 0 6px;
  border-radius: var(--radius-full);
  background: var(--lime);
  color: var(--on-lime);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: var(--weight-medium);
  letter-spacing: 0;
  text-transform: none;
  align-self: flex-start;
  justify-self: start;
}
.page-header > .eyebrow { padding-left: 14px; }
.label-pill__dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  display: inline-grid;
  place-items: center;
}
.label-pill__dot::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg-muted);
  font-size: 12.5px;
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 14px 0 12px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: var(--weight-medium);
  color: var(--fg);
}
.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4cc417;
  flex: none;
}
.pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: #4cc417;
  opacity: 0.35;
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse {
  0% { transform: scale(0.6); opacity: 0.45; }
  80%, 100% { transform: scale(1.8); opacity: 0; }
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  background: var(--bg-soft);
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  text-decoration: none;
}
.tag:hover { background: var(--lime); color: var(--on-lime); text-decoration: none; }
.tag__hash { opacity: 0.6; }

.meta-dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: var(--weight-medium) 15px/1 var(--font-sans);
  letter-spacing: -0.005em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease),
              border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { transition: transform var(--duration) var(--ease); }
.btn:hover svg { transform: translateX(2px); }

.btn--primary,
.btn--accent {
  background: var(--btn-bg);
  color: var(--btn-fg);
}
.btn--primary:hover,
.btn--accent:hover { background: var(--lime); color: var(--on-lime); }

.btn--lime { background: var(--lime); color: var(--on-lime); }
.btn--lime:hover { background: var(--lime-strong); color: var(--on-lime); }

.btn--secondary {
  background: var(--surface);
  color: var(--fg);
  border-color: var(--border-strong);
}
.btn--secondary:hover { border-color: var(--fg); color: var(--fg); }

.btn--ghost { background: transparent; color: var(--fg); }
.btn--ghost:hover { background: var(--bg-soft); color: var(--fg); }

.btn--lg { height: 54px; padding: 0 26px; font-size: 16px; border-radius: 12px; }
.btn--sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }

.btn:disabled { opacity: 0.6; cursor: progress; }
.btn.is-success { background: var(--lime); color: var(--on-lime); }

.round-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: var(--btn-bg);
  color: var(--btn-fg);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}
.round-btn:hover { background: var(--lime); color: var(--on-lime); }
.round-btn:disabled { opacity: 0.35; cursor: default; background: var(--btn-bg); color: var(--btn-fg); }

/* ============================================================
   Header — floating pill
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px var(--gutter) 0;
}
.header-inner {
  position: relative;
  z-index: 3;
  max-width: var(--wrap);
  margin: 0 auto;
  height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 8px 0 22px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.site-header.scrolled .header-inner,
.site-header.mobile-nav-open .header-inner { box-shadow: var(--shadow-md); }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-size: 19px;
  font-weight: var(--weight-semibold);
  letter-spacing: -0.03em;
  color: var(--fg);
  justify-self: start;
}
.wordmark:hover { text-decoration: none; color: var(--fg); }
.wordmark__dot {
  width: 8px;
  height: 8px;
  margin: 6px 2px 0;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 1.5px var(--ink);
}
.wordmark__tld { color: var(--fg-muted); font-weight: var(--weight-medium); }

.desktop-nav { display: flex; align-items: center; gap: 2px; }
.desktop-nav a {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 15px;
  color: var(--fg);
}
.desktop-nav a:hover { background: var(--bg-soft); text-decoration: none; }
.desktop-nav a.active { background: var(--bg-soft); font-weight: var(--weight-medium); }

.header-utilities {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-toggle, .nav-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
}
.theme-toggle:hover, .nav-icon-link:hover { background: var(--bg-soft); color: var(--fg); text-decoration: none; }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

.lang-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: var(--bg-soft);
}
.lang-toggle button {
  height: 30px;
  min-width: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--fg-muted);
  font: var(--weight-medium) 12px/1 var(--font-mono);
  cursor: pointer;
}
.lang-toggle button.active { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-xs); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  height: 46px;
  margin-left: 6px;
  padding: 0 18px;
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 15px;
  font-weight: var(--weight-medium);
  white-space: nowrap;
}
.nav-cta:hover { background: var(--lime); color: var(--on-lime); text-decoration: none; }

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
}
.mobile-menu-btn__icon--close { display: none; }
.mobile-nav-open .mobile-menu-btn__icon--open { display: none; }
.mobile-nav-open .mobile-menu-btn__icon--close { display: block; }

.mobile-nav { display: none; }
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(22, 22, 21, 0.28);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/* ============================================================
   Page header (inner pages)
   ============================================================ */
.page-header { padding: 80px 0 48px; }
.page-header__title {
  margin-top: 4px;
  font-size: clamp(40px, 5.6vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.03em;
  font-weight: var(--weight-regular);
  max-width: 900px;
}
.page-header__lead {
  margin-top: 22px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: 640px;
}
.page-header__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }

/* ============================================================
   Home — hero
   ============================================================ */
.hero { padding: 72px 0 40px; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.hero__title {
  margin-top: 26px;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.032em;
  font-weight: var(--weight-regular);
}
.hero__lead {
  margin-top: 24px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: 560px;
}
.hero__facts {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 600px;
}
.hero__facts li {
  padding: 2px 18px;
  border-left: 1px solid var(--border-strong);
  font-size: 14px;
  line-height: 1.4;
  color: var(--fg-muted);
}
.hero__facts li:first-child { padding-left: 0; border-left: 0; }
.hero__facts strong { display: block; color: var(--fg); font-size: 16px; font-weight: var(--weight-medium); margin-bottom: 2px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 40px; }

/* Hero visual: a small "ops console" built from real snippets. */
.hero__visual {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
}
.hero__glow {
  position: absolute;
  inset: 8% 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--lime) 70%, transparent), transparent 72%);
  filter: blur(30px);
  opacity: 0.75;
}
.console {
  position: relative;
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.console__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
}
.console__dots { display: inline-flex; gap: 6px; }
.console__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.console__status { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--fg); }
.console__body { padding: 18px 18px 20px; display: grid; gap: 10px; }
.console__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-soft);
}
.console__draft {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-soft);
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg-muted);
}
.console__draft del {
  text-decoration-color: #e5484d;
  text-decoration-thickness: 2px;
  color: var(--fg-soft);
  font-family: var(--font-mono);
  font-size: 13px;
}
.console__msg {
  justify-self: start;
  max-width: 90%;
  padding: 12px 14px;
  border-radius: 14px 14px 14px 4px;
  background: var(--ink);
  color: var(--canvas);
  font-size: 15px;
  line-height: 1.45;
}
[data-theme="dark"] .console__msg { background: var(--canvas); color: var(--ink); }
.console__log {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.console__log b { color: #b7791f; font-weight: 500; }

.float-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fg);
  white-space: nowrap;
  animation: float 7s ease-in-out infinite;
}
.float-chip--lime { background: var(--lime); border-color: var(--lime); color: var(--on-lime); }
.float-chip--ink { background: var(--ink); border-color: var(--ink); color: var(--canvas); }
[data-theme="dark"] .float-chip--ink { background: var(--canvas); border-color: var(--canvas); color: var(--ink); }
.float-chip--a { top: 9%; left: 2%; animation-delay: -1s; }
.float-chip--b { bottom: 13%; left: -2%; animation-delay: -3s; }
.float-chip--c { top: 22%; right: -2%; animation-delay: -5s; }
.float-chip--d { bottom: 4%; right: 6%; animation-delay: -2s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Stack marquee */
.marquee {
  margin-top: 48px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 32px;
  overflow: hidden;
}
.marquee__label { flex: none; font-size: 14px; color: var(--fg-muted); max-width: 120px; line-height: 1.35; }
.marquee__viewport {
  flex: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; align-items: center; flex: none; }
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--fg);
  white-space: nowrap;
}
.marquee__item::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--lime);
  box-shadow: 0 0 0 1px var(--border-strong);
  transform: rotate(45deg);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================================
   Home — work rows (case studies)
   ============================================================ */
.work-list { list-style: none; margin: 0; padding: 0; }
.work-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 40px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.work-row__media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  background-color: var(--surface);
  background-image: radial-gradient(var(--dot) 1.3px, transparent 1.4px);
  background-size: 11px 11px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: background-color var(--duration-slow) var(--ease);
}
.work-row:hover .work-row__media { background-color: var(--lime-soft); }
[data-theme="dark"] .work-row:hover .work-row__media { background-color: #2a3214; }
.work-row__num {
  position: absolute;
  top: 12px;
  left: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
}
.work-row__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  display: grid;
  place-items: center;
  transition: transform var(--duration-slow) var(--ease);
}
[data-theme="dark"] .work-row__icon { background: var(--canvas); color: var(--ink); }
.work-row:hover .work-row__icon { transform: scale(1.08) rotate(-6deg); }
.work-row__title {
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: var(--weight-medium);
}
.work-row__desc { font-size: 19px; line-height: 1.5; color: var(--fg-muted); }
.work-row__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 20px; }

/* ============================================================
   Services
   ============================================================ */
.services {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
}
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 320px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg);
  transition: transform var(--duration-slow) var(--ease), box-shadow var(--duration-slow) var(--ease),
              border-color var(--duration) var(--ease);
}
a.service-card:hover {
  text-decoration: none;
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.service-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.service-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  color: var(--fg);
}
.service-card__title { margin-top: 18px; font-size: 22px; letter-spacing: -0.02em; font-weight: var(--weight-medium); }
.service-card__desc { font-size: 15px; line-height: 1.55; color: var(--fg-muted); }
.service-card__foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.service-card__price { font-size: 15px; font-weight: var(--weight-medium); }
.service-card__go {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-soft);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}
a.service-card:hover .service-card__go { background: var(--lime); color: var(--on-lime); }

/* ============================================================
   Home — principles (quote slider)
   ============================================================ */
.quotes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 40px;
  align-items: end;
}
.quotes__intro { display: grid; gap: 28px; align-content: space-between; height: 100%; }
.quotes__intro .section-head__title { margin-top: 18px; }
.quotes__nav { display: flex; gap: 10px; }
.quotes__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.quotes__track::-webkit-scrollbar { display: none; }
.quote-slide {
  margin: 0;
  scroll-snap-align: start;
  padding: 4px 4px 4px 0;
}
.quote-slide blockquote {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.quote-slide figcaption { margin-top: 28px; display: grid; gap: 2px; font-size: 15px; }
.quote-slide figcaption a { font-weight: var(--weight-semibold); }
.quote-slide figcaption span { color: var(--fg-muted); }
.quotes__progress { display: flex; gap: 6px; margin-top: 28px; }
.quotes__progress i {
  height: 3px;
  width: 18px;
  border-radius: 2px;
  background: var(--border-strong);
  transition: width var(--duration) var(--ease), background var(--duration) var(--ease);
}
.quotes__progress i.is-active { width: 40px; background: var(--fg); }

/* ============================================================
   Home — split CTA
   ============================================================ */
.cta-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 96px;
}
.cta-split__code {
  border-radius: var(--radius-xl);
  background: var(--ink);
  border: 1px solid var(--ink-3);
  overflow: hidden;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}
.cta-split__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ink-3);
  font-family: var(--font-mono);
  font-size: 12px;
  color: #a6a6a5;
}
.cta-split__bar .console__dots i { background: var(--ink-3); }
.cta-split__code pre {
  margin: 0;
  padding: 24px;
  flex: 1;
  font-size: 13px;
  line-height: 1.85;
  color: var(--canvas);
  white-space: pre;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 78%, transparent);
  mask-image: linear-gradient(90deg, #000 78%, transparent);
}
.cta-split__hl {
  display: block;
  margin: 0 -24px;
  padding: 0 24px 0 21px;
  border-left: 3px solid var(--lime);
  background: rgba(194, 249, 66, 0.12);
}
.cta-split__card {
  border-radius: var(--radius-xl);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}
.cta-split__title {
  font-size: clamp(32px, 3.4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.028em;
  font-weight: var(--weight-regular);
}
.cta-split__card p { font-size: 18px; color: var(--fg-muted); max-width: 440px; }
.cta-split__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ============================================================
   Post cards & rows
   ============================================================ */
.featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 36px;
}
.featured-grid--single { grid-template-columns: 1fr; }
.featured-grid__side { display: grid; gap: 16px; }
.featured-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg);
  transition: transform var(--duration-slow) var(--ease), box-shadow var(--duration-slow) var(--ease);
}
.featured-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.featured-card--large {
  padding: 36px;
  min-height: 420px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--lime) 45%, transparent), transparent 48%),
    var(--surface);
}
.featured-card__meta { display: flex; align-items: center; gap: 10px; color: var(--fg-muted); }
.featured-card__title { font-size: 21px; line-height: 1.25; letter-spacing: -0.02em; font-weight: var(--weight-medium); }
.featured-card--large .featured-card__title {
  margin-top: auto;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: var(--weight-regular);
}
.featured-card__dek { font-size: 15px; line-height: 1.55; color: var(--fg-muted); }
.featured-card--large .featured-card__dek { font-size: 17px; max-width: 520px; }
.featured-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 8px; }
.featured-card--large .featured-card__footer { margin-top: 12px; }
.featured-card__read { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: var(--weight-medium); }

.post-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: baseline;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  color: var(--fg);
  transition: padding var(--duration) var(--ease);
}
.post-row:hover { text-decoration: none; padding-left: 10px; }
.post-row:hover .post-row__title { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.post-row__date, .post-row__read { font-family: var(--font-mono); font-size: 13px; color: var(--fg-muted); }
.post-row__title { font-size: 19px; letter-spacing: -0.015em; font-weight: var(--weight-medium); }
.post-row__dek { margin-top: 4px; font-size: 15px; color: var(--fg-muted); }

.post-year { margin-bottom: 32px; }
.year-label {
  font-size: 15px;
  font-family: var(--font-mono);
  font-weight: var(--weight-regular);
  color: var(--fg-muted);
  margin-bottom: 8px;
}

/* ============================================================
   Newsletter
   ============================================================ */
.newsletter-box {
  margin-top: 64px;
  padding: 40px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 48px;
  align-items: center;
}
.newsletter-box .eyebrow { grid-column: 1; }
.newsletter-box__title { grid-column: 1; font-size: 30px; letter-spacing: -0.03em; font-weight: var(--weight-regular); }
.newsletter-box__desc { grid-column: 1; color: var(--fg-muted); }
.newsletter-box .newsletter-form { grid-column: 2; grid-row: 1 / span 3; }

.newsletter-form { display: flex; gap: 10px; }
.newsletter-form input[type="email"],
.contact-form input,
.contact-form textarea,
.search-form__input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.4 var(--font-sans);
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.newsletter-form input:focus,
.contact-form input:focus,
.contact-form textarea:focus,
.search-form__input:focus { outline: none; border-color: var(--fg); box-shadow: var(--shadow-ring); }
.newsletter-form .btn { height: 50px; }
.newsletter-form--compact { margin-top: 8px; max-width: 520px; }

.issue-row {
  display: grid;
  grid-template-columns: 90px 130px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  color: var(--fg);
}
.issue-row:hover { text-decoration: none; }
.issue-row__number, .issue-row__date { font-family: var(--font-mono); font-size: 13px; color: var(--fg-muted); }
.issue-row__title { font-weight: var(--weight-medium); }

/* ============================================================
   Blog list
   ============================================================ */
.tag-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.tag-filter {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  color: var(--fg);
  font-size: 14px;
}
.tag-filter:hover { border-color: var(--fg); text-decoration: none; }
.tag-filter.active { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 32px 0; }
.pagination__info { font-family: var(--font-mono); font-size: 13px; color: var(--fg-muted); }
.pagination__link {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  color: var(--fg);
  font-size: 14px;
}
.pagination__link:hover { border-color: var(--fg); text-decoration: none; }

/* ============================================================
   Post detail
   ============================================================ */
.post-layout { padding-top: 48px; }
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 40px;
  font-size: 14px;
  color: var(--fg-muted);
}
.post-back:hover { color: var(--fg); }
.post-article__title {
  font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.028em;
  font-weight: var(--weight-regular);
}
.post-article__dek { margin: 22px 0 40px; font-size: 20px; line-height: 1.5; color: var(--fg-muted); }
.post-hero-image { margin: 0 0 32px; border-radius: var(--radius-lg); overflow: hidden; }
.post-hero-image img { display: block; width: 100%; }

.post-article__body {
  font-size: 18px;
  line-height: 1.75;
  color: var(--fg);
}
.post-article__body p { margin-bottom: 20px; }
.post-article__body h2 {
  font-size: 30px;
  font-weight: var(--weight-medium);
  letter-spacing: -0.025em;
  margin: 56px 0 16px;
}
.post-article__body h3 { font-size: 21px; margin: 36px 0 12px; }
.post-article__body a { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.post-article__body > :is(ul, ol) { margin: 0 0 20px; padding-left: 24px; }
.post-article__body li + li { margin-top: 8px; }
.post-article__body li::marker { color: var(--fg-muted); }
.post-article__body > blockquote {
  margin: 32px 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--lime);
  font-size: 21px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.post-article__body > blockquote p:last-child { margin-bottom: 0; }
/* Markdown code fences (HTML posts use .code-block instead). */
.post-article__body > pre {
  margin: 28px 0;
  padding: 20px 22px;
  background: var(--ink);
  color: var(--canvas);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.75;
  overflow-x: auto;
}
.post-article__body > pre code { color: inherit; }
.post-article__body > table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  margin: 28px 0;
  border-collapse: collapse;
  font-size: 15px;
}
.post-article__body > table :is(th, td) {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.post-article__body > table th { font-weight: var(--weight-semibold); border-bottom-color: var(--fg); }

.post-toc {
  margin: 0 0 40px;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}
.post-toc__title { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fg-muted); margin-bottom: 10px; }
.post-toc ul { list-style: none; margin: 0; padding: 0; }
.post-toc__item { margin: 6px 0; }
.post-toc__item--h3 { padding-left: 16px; }
.post-toc a { color: var(--fg-muted); font-size: 15px; }
.post-toc a:hover { color: var(--fg); }

.post-tags { display: flex; gap: 8px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border); }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 40px 0 0;
}
.post-nav__link {
  display: block;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg);
}
.post-nav__link:hover { text-decoration: none; border-color: var(--fg); }
.post-nav__link--next { text-align: right; }
.post-nav__label { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--fg-muted); margin-bottom: 8px; }
.post-nav__title { font-size: 16px; font-weight: var(--weight-medium); }

.related-posts { display: grid; gap: 10px; }
.related-post {
  display: block;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg);
}
.related-post:hover { text-decoration: none; border-color: var(--fg); }
.related-post__title { font-weight: var(--weight-medium); margin-bottom: 4px; }
.related-post__meta { font-family: var(--font-mono); font-size: 12px; color: var(--fg-muted); }

.post-author {
  margin: 48px 0 0;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--canvas);
}
.post-author .eyebrow { color: #a6a6a5; }
.post-author p { font-size: 16px; line-height: 1.6; }
.post-author strong { color: #fff; }
.post-author a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
[data-theme="dark"] .post-author { background: var(--surface); border: 1px solid var(--border); }

.series-banner { margin-bottom: 24px; }
.series-links { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.series-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  font-size: 13px;
  color: var(--fg-muted);
}
.series-link.active, .series-link:hover { background: var(--lime); border-color: var(--lime); color: var(--on-lime); text-decoration: none; }

.comments-section { padding: 48px 0 64px; }

/* HTML-authored code blocks */
.code-block {
  margin: 28px 0;
  border-radius: var(--radius-md);
  background: var(--ink);
  border: 1px solid var(--ink-3);
  overflow: hidden;
}
.code-block__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--ink-3);
}
.code-block__file { font-family: var(--font-mono); font-size: 12px; color: #a6a6a5; }
.code-block__copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #a6a6a5;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.code-block__copy:hover, .code-block__copy.copied { color: var(--lime); }
.code-block pre {
  margin: 0;
  padding: 18px 20px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--canvas);
  overflow-x: auto;
}

.syn-comment  { color: var(--syn-comment); font-style: italic; }
.syn-keyword  { color: var(--syn-keyword); }
.syn-string   { color: var(--syn-string); }
.syn-number   { color: var(--syn-number); }
.syn-type     { color: var(--syn-type); }
.syn-function { color: var(--syn-function); }
.syn-punct    { color: var(--syn-punct); }
.syn-literal  { color: var(--syn-literal); }

/* ============================================================
   About / Uses / Now / Timeline
   ============================================================ */
.about-body {
  display: grid;
  gap: 18px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--fg);
}
.about-body h2 {
  margin: 40px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 28px;
  letter-spacing: -0.025em;
}
.about-body a { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.about-body ul { margin: 0; padding-left: 20px; display: grid; gap: 12px; }
.about-body li::marker { color: var(--fg-muted); }
.about-body dl { margin: 0; }
.about-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 48px 0 0; }

.timeline { list-style: none; padding: 0; margin: 12px 0 0; }
.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.timeline-item__period { font-family: var(--font-mono); font-size: 13px; color: var(--fg-muted); }

.uses-list { display: grid; gap: 48px; }
.uses-section__title {
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: var(--weight-regular);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
  margin-bottom: 10px;
}
.uses-dl { margin: 0; }
.uses-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.uses-item__name { font-size: 17px; font-weight: var(--weight-medium); letter-spacing: -0.01em; }
.uses-item__note { margin: 0; font-size: 16px; line-height: 1.55; color: var(--fg-muted); }

/* ============================================================
   Projects
   ============================================================ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.project-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 240px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg);
  transition: transform var(--duration-slow) var(--ease), box-shadow var(--duration-slow) var(--ease);
}
a.project-card:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow-md); }
.project-card__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project-card__name { font-family: var(--font-mono); font-size: 15px; font-weight: var(--weight-medium); }
.project-card__header svg { color: var(--fg-muted); transition: transform var(--duration) var(--ease); }
a.project-card:hover .project-card__header svg { transform: translate(2px, -2px); color: var(--fg); }
.project-card__tagline { margin-top: 18px; font-size: 22px; line-height: 1.25; letter-spacing: -0.02em; }
.project-card__desc { font-size: 15px; line-height: 1.55; color: var(--fg-muted); }
.project-card__meta { margin-top: auto; padding-top: 16px; display: flex; gap: 16px; font-size: 13px; color: var(--fg-muted); }
.project-card__lang, .project-card__stars { display: inline-flex; align-items: center; gap: 6px; }
.lang-dot { width: 9px; height: 9px; border-radius: 50%; }

/* ============================================================
   Products
   ============================================================ */
.products-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.products-grid--home { margin-top: 36px; }
.product-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}
.product-card__header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.product-card__price { font-weight: var(--weight-medium); }
.product-card__price--prominent { font-size: 20px; }
.product-card__title { font-size: 22px; letter-spacing: -0.02em; }
.product-card__blurb { color: var(--fg-muted); }
.product-card__bullets { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 8px; }
.product-card__bullet { padding-left: 22px; position: relative; font-size: 15px; }
.product-card__bullet::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--lime);
}
.product-card__actions { display: flex; gap: 10px; margin-top: auto; }
.products-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.products-trust__item { display: grid; gap: 4px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 15px; color: var(--fg-muted); }
.products-trust__item strong { color: var(--fg); }
.product-cta-box, .newsletter-cta {
  margin-top: 48px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

/* ============================================================
   Hire me
   ============================================================ */
.testimonials-grid { display: grid; gap: 16px; }
.testimonial-card {
  margin: 0;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}
.testimonial-card__quote { font-size: 18px; line-height: 1.5; margin: 0 0 16px; }
.testimonial-card__author { font-size: 14px; color: var(--fg-muted); }
.testimonial-card__author strong { display: block; color: var(--fg); }

.contact-box {
  margin-top: 96px;
  padding: 56px;
  border-radius: var(--radius-xl);
  background: var(--ink);
  color: var(--canvas);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 16px 56px;
}
[data-theme="dark"] .contact-box { background: var(--surface); border: 1px solid var(--border); }
.contact-box .eyebrow { color: #a6a6a5; grid-column: 1; }
.contact-box__title {
  grid-column: 1;
  color: var(--canvas);
  font-size: clamp(32px, 3.6vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.028em;
  font-weight: var(--weight-regular);
}
.contact-box__lead { grid-column: 1; color: #bdbab5; font-size: 17px; }
.contact-form { grid-column: 2; grid-row: 1 / span 3; display: grid; gap: 12px; }
.contact-box .contact-form input,
.contact-box .contact-form textarea {
  background: var(--ink-2);
  border-color: var(--ink-3);
  color: var(--canvas);
}
.contact-box .contact-form input::placeholder,
.contact-box .contact-form textarea::placeholder { color: #8b8a86; }
.contact-box .contact-form input:focus,
.contact-box .contact-form textarea:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(194, 249, 66, 0.25); }
.contact-form textarea { height: auto; min-height: 150px; padding: 14px 16px; resize: vertical; }
.contact-box .btn--accent,
.contact-box .btn--primary { background: var(--lime); color: var(--on-lime); }
.contact-box .btn--accent:hover,
.contact-box .btn--primary:hover { background: var(--canvas); color: var(--ink); }

.calendly-embed iframe {
  width: 100%;
  min-height: 680px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

/* ============================================================
   Search, errors, empty states
   ============================================================ */
.search-form { display: flex; gap: 10px; margin-bottom: 32px; }
.search-results-meta { color: var(--fg-muted); margin-bottom: 16px; font-size: 15px; }
.search-suggestions { display: flex; flex-wrap: wrap; gap: 8px; }

.empty-state {
  grid-column: 1 / -1;
  padding: 56px 24px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--fg-muted);
}

.error-page { padding: 120px 0 80px; text-align: center; display: grid; justify-items: center; gap: 16px; }
.error-icon { color: var(--fg-muted); }
.error-code {
  font-size: clamp(88px, 14vw, 160px);
  line-height: 1;
  letter-spacing: -0.06em;
  font-weight: var(--weight-regular);
}
.error-title { font-size: 28px; letter-spacing: -0.02em; }
.error-lead { color: var(--fg-muted); max-width: 460px; }
.error-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 12px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  margin: 120px 12px 12px;
  border-radius: var(--radius-xl);
  background: var(--ink);
  color: var(--canvas);
}
[data-theme="dark"] .site-footer { background: #1b1a19; border: 1px solid var(--border); }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 72px var(--gutter) 36px; }
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--ink-3);
}
.footer-cta__title {
  color: var(--canvas);
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: var(--weight-regular);
  max-width: 640px;
}
.footer-cta .btn { margin-top: 32px; }
.footer-card {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
}
.footer-card__status { display: flex; align-items: center; gap: 10px; font-size: 17px; color: var(--canvas); }
.footer-card dl { margin: 22px 0 0; display: grid; gap: 14px; }
.footer-card dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: #8b8a86; }
.footer-card dd { margin: 2px 0 0; font-size: 15px; color: #d8d5cf; }

.footer-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  padding: 48px 0;
}
.footer-nav__col { display: grid; gap: 10px; align-content: start; }
.footer-nav__label { font-size: 15px; color: var(--canvas); margin-bottom: 4px; }
.footer-nav a { font-size: 14.5px; color: #a6a6a5; }
.footer-nav a:hover { color: var(--canvas); }

.footer-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--ink-3);
}
.footer-wordmark {
  display: inline-flex;
  align-items: center;
  font-size: clamp(40px, 7vw, 88px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-weight: var(--weight-medium);
  color: var(--canvas);
}
.footer-wordmark .wordmark__dot { width: 0.16em; height: 0.16em; margin: 0.12em 0.06em 0; box-shadow: none; }
.footer-wordmark .wordmark__tld { color: #6f6d69; }
.footer-bottom__meta { display: grid; justify-items: end; gap: 14px; font-size: 13px; color: #8b8a86; }
.footer-social { display: flex; gap: 8px; }
.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink-2);
  color: var(--canvas);
}
.footer-social a:hover { background: var(--lime); color: var(--on-lime); }

/* ============================================================
   Toast, utilities, helpers
   ============================================================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1000;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--canvas);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast--error { background: var(--danger-500); color: #fff; }
[data-theme="dark"] .toast { background: var(--canvas); color: var(--ink); }

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--lime);
  z-index: 10000;
  transition: width 0.1s linear;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 10001;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--canvas);
}
.skip-link:focus { left: 12px; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; opacity: 0; }

/* Honour the HTML `hidden` attribute everywhere (class selectors would otherwise win). */
[hidden] { display: none !important; }

/* Body scroll lock helper (used by mobile nav and dashboard sidebar).
   JS pins the body (`top: -scrollY`) so iOS Safari actually stops scrolling. */
.body--no-scroll {
  position: fixed;
  width: 100%;
  overflow-y: scroll;
}

/* ============================================================
   Motion: scroll reveal (only when JS is running)
   ============================================================ */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  /* Safety net: show content even if the observer never fires. */
  animation: reveal-fallback 0s 2.5s forwards;
}
.js [data-reveal].is-visible { opacity: 1; transform: none; animation: none; }
@keyframes reveal-fallback { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; animation: none; }
  .marquee__track, .float-chip, .pulse::after { animation: none; }
  .marquee__track { flex-wrap: wrap; width: auto; }
  .marquee__group[aria-hidden="true"] { display: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-row { grid-template-columns: 180px minmax(0, 1fr); }
  .work-row__body { grid-column: 2; }
}

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 24px; }
  .hero__visual { min-height: 440px; }
  .section-head, .quotes, .cta-split, .footer-top { grid-template-columns: 1fr; }
  .section-head { align-items: start; }
  .featured-grid { grid-template-columns: 1fr; }
  .contact-box, .newsletter-box { grid-template-columns: 1fr; }
  .contact-form, .newsletter-box .newsletter-form { grid-column: 1; grid-row: auto; }
  .products-grid { grid-template-columns: 1fr 1fr; }
  .cta-split__code { min-height: 320px; }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .desktop-nav, .nav-cta { display: none; }
  .header-inner { grid-template-columns: 1fr auto; height: 60px; padding: 0 8px 0 18px; }
  .mobile-menu-btn { display: inline-flex; }

  .mobile-nav {
    position: fixed;
    z-index: 2;
    top: calc(var(--header-height, 60px) + 20px);
    left: var(--gutter);
    right: var(--gutter);
    max-height: calc(100svh - var(--header-height, 60px) - 36px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    display: grid;
    gap: 2px;
    padding: 10px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav a {
    display: flex;
    align-items: center;
    min-height: 50px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 18px;
    color: var(--fg);
    touch-action: manipulation;
  }
  .mobile-nav a:hover, .mobile-nav a.active { background: var(--bg-soft); text-decoration: none; }
  .mobile-nav .mobile-nav__cta { margin-top: 8px; justify-content: center; background: var(--btn-bg); color: var(--btn-fg); }
  .mobile-nav .mobile-nav__cta:hover { background: var(--lime); color: var(--on-lime); }
}

@media (min-width: 821px) {
  .mobile-nav, .mobile-nav-overlay { display: none !important; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .site-header { padding-top: 8px; }
  .header-utilities .lang-toggle button { min-width: 30px; padding: 0 6px; }
  .section { padding-top: 72px; }
  .hero { padding: 40px 0 24px; }
  .hero__lead, .page-header__lead { font-size: 17px; }
  .hero__facts { grid-template-columns: 1fr; gap: 12px; }
  .hero__facts li { padding: 0 0 0 14px; border-left: 2px solid var(--lime); }
  .hero__facts li:first-child { padding-left: 14px; border-left: 2px solid var(--lime); }
  .hero__actions .btn, .page-header__actions .btn { flex: 1 1 auto; }
  .hero__visual { min-height: 380px; margin: 0 -4px; }
  .console { width: 100%; }
  .float-chip { font-size: 11px; height: 30px; padding: 0 10px; }
  .float-chip--a { top: 2%; left: 0; }
  .float-chip--c { top: auto; bottom: 2%; right: 0; }
  .float-chip--b, .float-chip--d { display: none; }
  .marquee { flex-direction: column; align-items: flex-start; gap: 14px; }
  .marquee__label { max-width: none; }
  .marquee__viewport { width: 100%; }
  .marquee__item { font-size: 18px; }
  .page-header { padding: 48px 0 32px; }
  .section-head__lead { font-size: 17px; }
  .work-row { grid-template-columns: 1fr; gap: 16px; }
  .work-row__body { grid-column: 1; }
  .work-row__media { aspect-ratio: 16 / 7; }
  .work-row__desc { font-size: 17px; }
  .services { grid-template-columns: 1fr; }
  .service-card { min-height: 0; }
  .cta-split__card, .contact-box, .newsletter-box { padding: 28px 22px; }
  .cta-split__code pre { font-size: 12px; padding: 18px; }
  .featured-card--large { padding: 26px; min-height: 320px; }
  .post-row { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .post-row__date { grid-column: 1 / -1; font-size: 12px; }
  .post-row__read { grid-row: 2; grid-column: 2; align-self: start; white-space: nowrap; }
  .post-row:hover { padding-left: 0; }
  .newsletter-form, .search-form { flex-direction: column; align-items: stretch; }
  .newsletter-form .btn, .search-form .btn { width: 100%; }
  .post-article__body { font-size: 17px; }
  .post-article__body > pre { margin-left: -16px; margin-right: -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav__link--next { text-align: left; }
  .project-grid, .products-grid, .products-trust { grid-template-columns: 1fr; }
  .uses-item, .timeline-item { grid-template-columns: 1fr; gap: 4px; }
  .issue-row { grid-template-columns: 1fr; gap: 2px; }
  .pagination { flex-direction: column; }
  .pagination__link { width: 100%; justify-content: center; }
  .site-footer { margin: 80px 8px 8px; border-radius: var(--radius-lg); }
  .footer-inner { padding-top: 48px; }
  .footer-nav { gap: 28px 16px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-bottom__meta { justify-items: start; }
  .calendly-embed iframe { min-height: 720px; }
}

/* Inputs at <16px trigger iOS zoom on focus. */
@media (max-width: 480px) {
  input, textarea, select { font-size: 16px; }
}

/* Tap targets on touch devices. */
@media (hover: none) and (pointer: coarse) {
  .btn { min-height: 44px; }
  .theme-toggle, .nav-icon-link, .lang-toggle button { min-height: 36px; min-width: 36px; }
}
