/* CTRL+ALT+DEFEND — site design system.
   Dark, hairline borders, one accent (lime) used sparingly. No blur filters,
   backdrop-filter or blend modes (measured fps drops on the old hero). */

:root {
  --bg: #050506;
  --bg-2: #0c0c0e;
  --card: #0f0f12;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f4f4f2;
  --muted: #a1a1a6;
  --faint: #6e6e74;
  --lime: #c6f84e;
  --mint: #2ee6a8;
  --violet: #9b6bff;
  --radius: 14px;
  --max: 1180px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(5, 5, 6, .92); border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { font: 700 15px/1 var(--mono); letter-spacing: -.02em; white-space: nowrap; }
.logo span { color: var(--lime); }
.nav-links { display: flex; gap: 22px; margin-right: auto; }
.nav-links a { color: var(--muted); font-size: 14px; transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-toggle { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: transform .15s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--text); color: #000; }
.btn-primary:hover { background: #fff; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .3); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 88px; border-bottom: 1px solid var(--line); }
.hero::before { /* top glow: a plain gradient, no blur filter */
  content: ""; position: absolute; inset: -40% -10% auto; height: 120%; z-index: -1;
  background:
    radial-gradient(40% 50% at 30% 20%, rgba(198, 248, 78, .14), transparent 70%),
    radial-gradient(35% 45% at 75% 10%, rgba(155, 107, 255, .14), transparent 70%);
}
.hero::after { /* faint grid */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(70% 60% at 50% 0%, #000, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero-grid > *, .about > *, .library > * { min-width: 0; } /* stop the pre-formatted ticket widening the page */
.ticket-body { overflow-x: auto; }
.badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 10px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg-2);
  font: 500 12px/1 var(--mono); color: var(--muted); margin-bottom: 28px;
}
.badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(198, 248, 78, .18); }
h1 {
  margin: 0 0 22px; font-size: clamp(40px, 6vw, 68px); line-height: 1.02; letter-spacing: -.045em; font-weight: 700;
  background: linear-gradient(180deg, #fff 30%, #9d9da3); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-wrap: balance;
}
.lede { margin: 0 0 32px; max-width: 34em; color: var(--muted); font-size: 18px; }
.lede strong { color: var(--text); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.fine { margin-top: 18px; font-size: 13px; color: var(--faint); }

/* the work-ticket card */
.ticket {
  border: 1px solid var(--line-2); border-radius: var(--radius); background: linear-gradient(180deg, #121216, #0b0b0d);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .02) inset;
  font: 13px/1.7 var(--mono); overflow: hidden;
}
.ticket-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--faint); }
.ticket-bar b { width: 10px; height: 10px; border-radius: 50%; background: #2a2a30; }
.ticket-bar span { margin-left: auto; }
.ticket-body { padding: 18px 20px 22px; }
.ticket-body > div { white-space: pre; }
.ticket-body .k { color: var(--faint); }
.ticket-body .v { color: var(--text); }
.ticket-body .p { color: var(--lime); }
.ticket-body hr { border: 0; border-top: 1px dashed var(--line-2); margin: 14px 0; }
.ticket-body ol { margin: 0; padding-left: 18px; color: var(--muted); }
.ticket-status { display: flex; justify-content: space-between; padding: 12px 20px; border-top: 1px solid var(--line); color: var(--faint); }
.ticket-status em { font-style: normal; color: var(--mint); }

/* ---------- sections ---------- */
section { padding: 96px 0; border-bottom: 1px solid var(--line); }
.eyebrow { font: 500 12px/1 var(--mono); color: var(--lime); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 14px; }
h2 { margin: 0 0 14px; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.1; letter-spacing: -.035em; font-weight: 700; text-wrap: balance; }
.section-lede { margin: 0 0 48px; color: var(--muted); max-width: 40em; font-size: 17px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 40px; }
.section-head .section-lede { margin: 0; }
.link-arrow { color: var(--muted); font-size: 14px; white-space: nowrap; }
.link-arrow:hover { color: var(--text); }

/* feature strip */
.features { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); }
.feature { padding: 28px 24px; }
.feature + .feature { border-left: 1px solid var(--line); }
.feature svg { width: 22px; height: 22px; color: var(--lime); margin-bottom: 18px; }
.feature h3 { margin: 0 0 6px; font-size: 16px; letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

/* cards (tools, posts, videos) */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card-pad { padding: 28px; }
.card .tag { font: 500 11px/1 var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.card .tag.new { color: var(--lime); }
.card h3 { margin: 0 0 10px; font-size: 20px; letter-spacing: -.02em; line-height: 1.25; }
.card p { margin: 0 0 22px; color: var(--muted); font-size: 15px; }
.card .go { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--text); }
.card .go::after { content: " →"; transition: margin .15s; }
.card:hover .go::after { margin-left: 4px; }
.card .host { font: 12px var(--mono); color: var(--faint); }

.thumb { aspect-ratio: 16/9; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: var(--bg-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-sm { padding: 20px 22px 22px; }
.card-sm h3 { font-size: 16px; margin-bottom: 8px; }
.card-sm .meta { font: 12px var(--mono); color: var(--faint); }
.thumb.video { position: relative; }
.thumb.video::after { /* play button */
  content: ""; position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px;
  border-radius: 50%; background: rgba(5, 5, 6, .75) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l8 5-8 5z' fill='%23fff'/%3E%3C/svg%3E") center/26px no-repeat;
  border: 1px solid var(--line-2); transition: transform .2s;
}
.card:hover .thumb.video::after { transform: scale(1.08); }

/* library */
.library { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card.doc { flex-direction: row; gap: 22px; align-items: flex-start; }
.doc-icon {
  flex: none; width: 64px; height: 80px; border: 1px solid var(--line-2); border-radius: 8px; position: relative;
  background: linear-gradient(160deg, #1a1a1f, #0e0e11); font: 700 10px/1 var(--mono); color: var(--lime);
  display: grid; place-items: end start; padding: 8px;
}
.doc-icon::before { content: ""; position: absolute; top: -1px; right: -1px; width: 16px; height: 16px; background: var(--bg); border-left: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); border-radius: 0 8px 0 6px; }
.form { display: grid; gap: 10px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--bg); color: var(--text); font: inherit; font-size: 15px;
}
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; border-color: var(--lime); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.check input { margin-top: 3px; accent-color: var(--lime); }
.form .btn { justify-self: start; border: 0; cursor: pointer; font-family: inherit; }
.drops { list-style: none; margin: 18px 0 0; padding: 0; font: 13px/1 var(--mono); }
.drops li { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); color: var(--faint); }
.drops li b { font-weight: 400; color: var(--muted); }
.drops li.live b { color: var(--text); }
.drops li.live span { color: var(--mint); }

/* about */
.about { display: grid; grid-template-columns: 340px 1fr; gap: 56px; align-items: center; }
.portrait { border-radius: var(--radius); border: 1px solid var(--line-2); overflow: hidden; aspect-ratio: 4/5; }
.portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.15); }
.about p { color: var(--muted); font-size: 17px; margin: 0 0 16px; max-width: 36em; }
.about p strong { color: var(--text); font-weight: 600; }

/* final CTA */
.final { text-align: center; position: relative; overflow: hidden; }
.final::before {
  content: ""; position: absolute; inset: auto 0 -60% 0; height: 120%; z-index: -1;
  background: radial-gradient(40% 50% at 50% 100%, rgba(198, 248, 78, .12), transparent 70%);
}
.final h2 { font-size: clamp(32px, 4.6vw, 54px); }
.final .section-lede { margin-inline: auto; }
.final .cta-row { justify-content: center; }

/* footer */
footer { padding: 56px 0 40px; color: var(--faint); font-size: 14px; }
.foot { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot h4 { margin: 0 0 14px; font: 500 12px/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot a:hover { color: var(--text); }
.foot .socials { display: flex; gap: 10px; margin: 18px 0 0; }
.socials a {
  display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line-2);
  border-radius: 10px; color: var(--muted); transition: color .15s, border-color .15s;
}
.socials a:hover { color: var(--lime); border-color: rgba(198, 248, 78, .4); }
.socials svg { width: 19px; height: 19px; }
.foot-base { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; }

/* ---------- blog ---------- */
.hero-sm { padding: 72px 0 56px; }
.hero-sm h1 { font-size: clamp(34px, 5vw, 54px); max-width: 16em; }
.nav-links a[aria-current] { color: var(--text); }
.featured { display: grid; grid-template-columns: 1.2fr 1fr; overflow: hidden; margin-bottom: 16px; }
.featured .thumb { border-radius: 0; border-bottom: 0; border-right: 1px solid var(--line); aspect-ratio: auto; height: 100%; }
.featured .card-pad { display: flex; flex-direction: column; justify-content: center; }
.featured h2 { font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 12px; }
.card .meta { font: 12px var(--mono); color: var(--faint); }

.wrap-narrow { width: min(720px, 100% - 32px); margin-inline: auto; }
.post-head { padding: 64px 0 32px; }
.crumbs { font-size: 13px; color: var(--faint); margin-bottom: 24px; }
.crumbs a:hover { color: var(--text); }
.post-head h1 { font-size: clamp(32px, 4.6vw, 48px); line-height: 1.1; }
.post-meta { margin: 0; font-size: 13px; color: var(--faint); }
.post-cover { margin-bottom: 40px; }
.post-cover img { border-radius: var(--radius); border: 1px solid var(--line); }

.prose { color: #d6d6d2; font-size: 17.5px; line-height: 1.75; padding-bottom: 48px; }
.prose > * + * { margin-top: 1.1em; }
.prose p, .prose ul, .prose ol, .prose figure, .prose blockquote, .prose pre, .prose table { margin-bottom: 0; }
.prose h2 { color: var(--text); font-size: 28px; line-height: 1.2; letter-spacing: -.025em; margin: 2em 0 .2em; }
.prose h3 { color: var(--text); font-size: 21px; line-height: 1.3; letter-spacing: -.015em; margin: 1.7em 0 .1em; }
.prose h4 { color: var(--text); font-size: 18px; margin: 1.5em 0 0; }
.prose strong { color: var(--text); }
.prose a { color: var(--lime); text-decoration: underline; text-decoration-color: rgba(198, 248, 78, .4); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--lime); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li p { margin: 0; }
.prose li::marker { color: var(--faint); }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--lime); color: var(--muted); font-style: italic; }
.prose blockquote p { margin: 0; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figure img { border-radius: 12px; border: 1px solid var(--line); height: auto; }
.prose figcaption { margin-top: 10px; font-size: 14px; color: var(--faint); text-align: center; }
.prose code { font: .88em var(--mono); background: var(--bg-2); border: 1px solid var(--line); padding: .1em .35em; border-radius: 5px; }
.prose pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; overflow-x: auto; line-height: 1.6; }
.prose pre code { background: none; border: 0; padding: 0; font-size: 14px; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
.prose th, .prose td { border: 1px solid var(--line-2); padding: 10px 14px; text-align: left; vertical-align: top; min-width: 120px; }
.prose th { background: var(--bg-2); color: var(--text); font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.callout { border: 1px solid rgba(198, 248, 78, .3); background: rgba(198, 248, 78, .05); border-radius: 12px; padding: 16px 20px; }
.callout p { margin: 0; }

.post-cta { border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--card); padding: 32px; margin-bottom: 96px; }
.post-cta h2 { font-size: 26px; }
.post-cta p { color: var(--muted); }
.more { border-top: 1px solid var(--line); }

/* ---------- videos ---------- */
.video-card .card-sm p { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.video-card .card-sm h3 { margin-bottom: 8px; }
.thumb.yt { display: block; cursor: pointer; }
.yt-frame { display: block; width: 100%; aspect-ratio: 16/9; border: 0; border-radius: var(--radius) var(--radius) 0 0; background: #000; }
.video-card:target { border-color: var(--lime); }

/* ---------- forms / library / contact ---------- */
.form label:not(.check):not(.sr-only) { font-size: 13px; color: var(--muted); margin-top: 4px; }
.textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.check a, .fine a, .contact-notes a { color: var(--lime); }
.form-msg { margin: 0; font-size: 14px; min-height: 1em; }
.form-msg.ok { color: var(--mint); }
.form-msg.err { color: #ff8a80; }
.form-msg a { color: var(--text); text-decoration: underline; }
.btn:disabled { opacity: .6; cursor: wait; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.doc-title { font-size: 22px; letter-spacing: -.02em; line-height: 1.25; margin: 0 0 10px; }
.library > div > .doc + .doc { margin-top: 16px; }
.card p { color: var(--muted); }
.contact-notes { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .about, .library { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .feature:nth-child(3) { border-left: 0; }
  .feature:nth-child(n+3) { border-top: 1px solid var(--line); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .about .portrait { max-width: 320px; }
  .featured { grid-template-columns: 1fr; }
  .featured .thumb { border-right: 0; border-bottom: 1px solid var(--line); aspect-ratio: 16/9; }
  .foot { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav .wrap { justify-content: space-between; }
  .hero { padding: 64px 0; }
  section { padding: 72px 0; }
  .features, .grid-2, .grid-3, .form-row { grid-template-columns: 1fr; }
  .feature + .feature { border-left: 0; border-top: 1px solid var(--line); }
  .section-head { flex-direction: column; align-items: start; }
  .foot-base { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
