/* Humanjava — dark brand theme (match humanjava.com) */
:root {
  --bg: #1a1a2e;              /* deep navy-purple base */
  --bg-deep: #3b0c49;        /* deep purple */
  --panel: #0a0a0a;          /* near-black deep card */
  --panel-2: #16213e;        /* card gradient start */
  --text: #ffffff;
  --mute: rgba(255,255,255,0.72);
  --faint: rgba(255,255,255,0.55);
  --line: rgba(255,255,255,0.10);
  --primary: #d20d74;        /* magenta/pink accent */
  --primary-2: #f0338f;
  --link: #ff5fa8;        /* pink that passes AA 4.5:1 on dark bg for text/links */
  --build: #8dff8d;          /* green "build" accent */
  --warn: #f5c542;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
/* Single dark theme — define light override only to satisfy explicit opt-out */
:root[data-theme="light"] { color-scheme: dark; }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  overflow-x: clip;
  font-family: var(--sans);
  background:
    radial-gradient(900px 600px at 15% -10%, rgba(59,12,73,0.55), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--primary-2); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--sans); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }

/* ---------- Header ---------- */
.site-header {
  background: rgba(26,26,46,0.72);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .inner {
  max-width: 1120px; margin: 0 auto;
  padding: 14px 16px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
}
.brand {
  grid-column: 2;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 26px; letter-spacing: -0.04em;
  color: #fff; width: 44px; height: 44px; margin: 0 auto;
}
.brand:hover { color: #fff; opacity: .9; }
.brand .j { color: var(--primary); }
.brand-logo { height: 30px; width: auto; display: block; }
.header-cta { grid-column: 3; justify-self: end; }
.nav {
  grid-column: 1 / -1;
  display: flex; gap: 26px; flex-wrap: wrap; justify-content: center;
  font-size: 15px; font-weight: 600;
  margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line);
}
.nav a { color: var(--mute); }
.nav a:hover, .nav a.active { color: #fff; }
.pill {
  display: inline-block; background: var(--primary); color: #fff;
  padding: 9px 20px; border-radius: 999px; font-weight: 700; font-size: 14px;
}
.pill:hover { background: var(--primary-2); color: #fff; }

/* ---------- Layout ---------- */
main { flex: 1; width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 40px 16px; }
.narrow { max-width: 720px; }

/* ---------- Hero (home) ---------- */
.hero {
  background: linear-gradient(120deg, #16213e 0%, #3b0c49 55%, #d20d74 125%);
  text-align: center;
  padding: 96px 16px 104px;
}
.hero-inner { max-width: 840px; margin: 0 auto; }
.hero h1 { font-size: clamp(34px, 5vw, 54px); color: #fff; margin-bottom: 18px; }
.hero p { color: rgba(255,255,255,0.85); font-size: 18px; max-width: 620px; margin: 0 auto 32px; }
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
/* Stacked variant: primary CTA on its own line, secondary CTAs on the line below. */
.hero-ctas-stacked { flex-direction: column; align-items: center; }
.hero-ctas-stacked .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  font-weight: 700; font-size: 15px; border: 2px solid transparent;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-2); border-color: var(--primary-2); color: #fff; }
.btn-ghost { background: transparent; color: var(--build); border-color: var(--build); }
.btn-ghost:hover { background: rgba(141,255,141,0.12); color: var(--build); }

/* ---------- Section rhythm on home ---------- */
.section { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.section.pad { padding-top: 56px; }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 18px;
}

/* ---------- Featured "LATEST BUILD" card ---------- */
.featured {
  position: relative; margin: 56px auto 0; max-width: 1120px;
  background: linear-gradient(135deg, #16213e 0%, #0a0a0a 100%);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 40px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center;
}
.featured .tag-build {
  position: absolute; top: 20px; right: 20px;
  background: rgba(141,255,141,0.15); color: var(--build);
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
}
.featured h2 { font-size: 26px; color: #fff; margin-bottom: 14px; }
.featured p { color: var(--mute); margin-bottom: 22px; }
.featured .fimg img { border-radius: 12px; border: 1px solid var(--line); width: 100%; }

/* ---------- Crypto disclaimer ---------- */
.disclaimer {
  max-width: 1120px; margin: 40px auto 0;
  background: rgba(245,197,66,0.07);
  border: 1px solid rgba(245,197,66,0.30);
  border-radius: 14px; padding: 22px 24px;
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
}
.disclaimer .icon { font-size: 22px; line-height: 1; }
.disclaimer strong { color: #fff; display: block; margin-bottom: 6px; }
.disclaimer p { color: var(--mute); font-size: 14px; margin: 0; }

/* ---------- Cards / grid ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card {
  background: linear-gradient(135deg, rgba(22,33,62,0.55) 0%, rgba(10,10,10,0.55) 100%);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column; transition: border-color .15s, transform .15s;
}
.card:hover { border-color: rgba(210,13,116,0.5); transform: translateY(-2px); }
.card .thumb { aspect-ratio: 16/9; object-fit: cover; width: 100%; background: #0a0a0a; display: block; }
.card .body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font-size: 20px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card h3 a { color: #fff; }
.card h3 a:hover { color: var(--primary-2); }
.card .excerpt { color: var(--mute); font-size: 14px; }
.card .meta { font-size: 13px; color: var(--faint); }
.card .tags { margin-top: 2px; display: flex; flex-wrap: wrap; gap: 8px; }
.card .tags a { font-size: 12px; color: var(--link); }
.more { margin-top: 36px; text-align: center; }
.more a { font-size: 15px; font-weight: 700; }

/* ---------- Articles index (filterable) ---------- */
.page-head h1 { font-size: 36px; color: #fff; margin-bottom: 8px; }
.page-head p { color: var(--mute); margin-bottom: 28px; max-width: 640px; }
.layout { display: grid; grid-template-columns: 230px 1fr; gap: 36px; }
aside.filters { position: sticky; top: 120px; align-self: start; }
aside.filters h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.03);
  color: var(--mute); padding: 6px 12px; margin: 0 7px 7px 0;
  border-radius: 999px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.chip:hover { color: #fff; border-color: rgba(255,255,255,0.3); }
.chip[aria-pressed="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip .n { font-family: var(--mono); font-size: 11px; opacity: .8; }
.reset { background: none; border: none; color: var(--link); cursor: pointer; font-size: 13px; padding: 6px 0; font-family: inherit; }
.count { font-family: var(--mono); font-size: 12px; color: var(--faint); margin: 0 0 20px; }
.empty { color: var(--mute); }
/* articles grid can breathe wider on its own column */
.layout .grid { grid-template-columns: repeat(2, 1fr); }

/* ---------- Article / page ---------- */
/* Hero breaks wider than the reading column (capped, centered, no overflow) and crops to 16:9. */
.post-hero-wrap {
  width: auto;
  margin: 8px calc(50% - min(50vw - 16px, 480px)) 36px;
}
.post-hero {
  display: block; width: 100%; max-width: none;
  aspect-ratio: 16 / 9; object-fit: cover; object-position: top;
  border-radius: 16px; border: 1px solid var(--line); background: var(--panel);
}
.post-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--link); margin-bottom: 14px; }
.post h1 { font-size: clamp(30px, 4.5vw, 44px); color: #fff; margin-bottom: 16px; }
.post .lede { color: var(--mute); font-size: 19px; margin-bottom: 22px; }
.byline { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.byline .who { font-weight: 700; color: #fff; font-size: 15px; }
.byline .who a { color: #fff; }
.byline .who a:hover { color: var(--link); }
.byline .meta { font-size: 13px; color: var(--faint); }
.post .tags { margin-bottom: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.post .tags a {
  font-size: 12px; color: var(--mute); border: 1px solid var(--line);
  padding: 4px 11px; border-radius: 999px;
}
.post .tags a:hover { color: #fff; border-color: rgba(255,255,255,0.3); }
.content { font-size: 17px; }
.content h2 { font-size: 28px; margin: 40px 0 14px; color: #fff; }
.content h3 { font-size: 22px; margin: 30px 0 10px; color: #fff; }
.content h4 { font-size: 18px; margin: 24px 0 8px; color: #fff; }
.content p { margin: 0 0 20px; color: rgba(255,255,255,0.88); }
.content ul, .content ol { margin: 0 0 20px 24px; color: rgba(255,255,255,0.88); }
.content li { margin-bottom: 8px; }
.content a { color: var(--primary-2); text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }
.content a:hover { color: var(--link); }
.content img { border-radius: 12px; margin: 26px 0; width: 100%; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.22); }
.content img[src*="nostrkey"], .content img[src*="voxrelay"], .content img[src*="soundhsa"], .content img[src*="cibc"], .content img[src*="camh"] { background: #0e0e18; }
.content figure { margin: 28px 0; }
.content figcaption { font-size: 13px; color: var(--faint); text-align: center; margin-top: 8px; }
.content blockquote {
  border-left: 3px solid var(--primary); padding: 2px 0 2px 22px; margin: 34px 0;
  color: #fff; font-size: clamp(20px, 2.4vw, 24px); line-height: 1.42; font-style: italic; font-weight: 500;
}
.content blockquote p { margin: 0 0 10px; color: inherit; }
.content blockquote p:last-child { margin-bottom: 0; }
.content pre {
  background: #0a0a0a; color: #e9ecef; padding: 18px; border-radius: 10px;
  overflow-x: auto; margin: 22px 0; font-family: var(--mono); font-size: 13px;
  border: 1px solid var(--line);
}
.content code { font-family: var(--mono); font-size: .9em; }
.content hr { border: none; border-top: 1px solid var(--line); margin: 36px 0; }
.content table { border-collapse: collapse; width: 100%; margin: 22px 0; }
.content th, .content td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; }
.back { display: inline-block; margin-top: 36px; font-size: 14px; font-weight: 600; }

/* Related reading */
.related { border-top: 1px solid var(--line); margin-top: 56px; padding-top: 40px; }
.related h2 { font-size: 22px; color: #fff; margin-bottom: 24px; }
.related .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related .card h3 { font-size: 16px; }

/* ---------- Tag landing ---------- */
.tag-hero { border-radius: 14px; margin-bottom: 22px; width: 100%; max-height: 320px; object-fit: cover; border: 1px solid var(--line); }
.tag-head h1 { font-size: 34px; color: #fff; margin-bottom: 10px; }
.tag-head .desc { color: var(--mute); margin-bottom: 8px; max-width: none; }
.tag-head .count { margin-bottom: 4px; }

/* ---------- Subscribe placeholder ---------- */
.subscribe-box {
  max-width: 640px; margin: 0 auto; text-align: center;
  background: linear-gradient(135deg, rgba(22,33,62,0.55) 0%, rgba(10,10,10,0.55) 100%);
  border: 1px solid var(--line); border-radius: 16px;
  padding: clamp(28px, 4vw, 48px);
}
.subscribe-box h1 { font-size: 36px; color: #fff; margin-bottom: 16px; }
.subscribe-box p { color: var(--mute); margin-bottom: 20px; }
.note {
  display: inline-block; background: rgba(141,255,141,0.10); border: 1px solid rgba(141,255,141,0.3);
  color: var(--build); padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 16px; margin-top: 72px;
  font-size: 14px; color: var(--faint); text-align: center;
}
.site-footer .org { color: #fff; font-weight: 700; margin-bottom: 10px; }
/* Footer nav: 3 stacked rows on mobile; row 1 alone + rows 2&3 together on
   tablet; a single line at desktop. */
.footer-nav { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 14px; }
.site-footer nav { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.site-footer nav a, .site-footer a { color: var(--mute); }
.site-footer nav a:hover { color: #fff; }
.site-footer nav .sep { color: var(--mute); opacity: .5; user-select: none; }
@media (min-width: 600px) {
  .footer-nav { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 12px 28px; }
  .footer-nav .r1 { flex-basis: 100%; }
}
@media (min-width: 900px) {
  .footer-nav .r1 { flex-basis: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .related .grid { grid-template-columns: repeat(3, 1fr); }
  .featured { grid-template-columns: 1fr; }
  .featured .fimg { order: -1; }
}
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .layout .grid { grid-template-columns: 1fr; }
  aside.filters { position: static; }
}
@media (max-width: 560px) {
  .grid, .related .grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 16px 72px; }
  .featured { padding: 26px; }
}

/* ---------- Mobile hamburger ---------- */
.nav-toggle { display: none; grid-column: 3; justify-self: end; align-items: center; justify-content: center; width: 44px; height: 44px; background: none; border: 0; color: #fff; cursor: pointer; padding: 0; }
.nav-toggle .bars { position: relative; display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ''; position: absolute; left: 0; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; }
  .nav.open { display: flex; flex-direction: column; align-items: center; gap: 14px; }
}

/* ---------- Accessibility ---------- */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 700; }
.skip-link:focus { left: 0; color: #fff; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- TL;DR key points (top of articles; AI-citation friendly) ---------- */
.key-points {
  margin: 20px 0 28px;
  padding: 18px 22px;
  background: linear-gradient(180deg, rgba(141,255,141,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--line);
  border-left: 3px solid var(--build);
  border-radius: 12px;
}
.key-points .kp-label {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--build);
}
.key-points ul { margin: 0; padding-left: 1.1em; }
.key-points li { margin: 6px 0; color: var(--mute); line-height: 1.5; }
.key-points li::marker { color: var(--build); }

/* ---------- FAQ page ---------- */
.faq-list { margin: 28px 0 8px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.02);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  position: relative;
  padding-right: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 20px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--link);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item summary:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.faq-a { padding: 0 20px 18px; }
.faq-a p { margin: 0; color: var(--mute); line-height: 1.6; }
@media (prefers-reduced-motion: reduce) {
  .faq-item summary::after { transition: none; }
}

/* ---------- homepage project cards ("What we ship") ---------- */
.builds-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.builds-h { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin: 0; }
.builds-more { text-transform: none; letter-spacing: 0; font-size: 0.82rem; font-weight: 600; color: var(--link); margin-left: 8px; }
.builds-more:hover { color: var(--primary-2); }
.builds-nav { display: flex; gap: 10px; }
.builds-arrow {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--text);
  font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color .15s ease, background .15s ease, opacity .15s ease;
}
.builds-arrow:hover { border-color: var(--primary); }
.builds-arrow:disabled { opacity: 0.3; cursor: default; }
.builds-arrow:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.builds-rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 2px 8px;
}
.builds-rail::-webkit-scrollbar { display: none; }
.builds-rail .build-card { flex: 0 0 clamp(300px, 42%, 460px); scroll-snap-align: start; }
.build-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.build-card:hover, .build-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
  border-color: var(--primary);
  outline: none;
}
.build-card:focus-visible { box-shadow: 0 0 0 3px var(--link); }
.build-card img {
  width: 100%; height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  display: block;
  background: #111;
  border-bottom: 1px solid var(--line);
}
.build-meta { padding: 18px 20px 22px; }
.build-meta .build-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: 8px;
}
.build-meta h3 { font-size: 20px; color: #fff; margin: 0 0 8px; }
.build-meta p { color: var(--mute); margin: 0; line-height: 1.55; font-size: 0.95rem; }
@media (max-width: 720px) {
  .builds-rail .build-card { flex-basis: 84%; }
  .builds-head { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .build-card { transition: none; }
  .build-card:hover { transform: none; }
}

/* ---------- card footer: tags wrap full-width; date floats in the corner ---------- */
.card .body { position: relative; }        /* anchor for the floating date */
.card .cardfoot {
  margin-top: auto;                         /* pin tags to the bottom of the card */
  padding-top: 12px;
}
.card .cardfoot .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;                            /* full width, natural wrapping */
  padding-right: 92px;                      /* clear the floating date's corner */
}
.card .cardfoot a { font-size: 12px; color: var(--link); }
.card .cardfoot a:hover { color: var(--primary-2); }
.card .cardfoot .card-date {
  position: absolute;                       /* own z-layer, floating in the bottom-right corner */
  right: 20px;
  bottom: 20px;
  z-index: 2;
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
}

/* ---------- in-page anchor jumps clear the sticky header ---------- */
html { scroll-behavior: smooth; }
.content h2[id], .content h3[id] { scroll-margin-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
