/* Crypto Desk — institutional dark, designed presence */
:root {
  --bg: #0a0a0b;
  --bg-elevated: #111113;
  --bg-card: #151518;
  --bg-card-hover: #1a1a1e;
  --border: #2e2e34;
  --border-subtle: #222226;
  --text: #e8eaed;
  --text-muted: #9aa0a6;
  --text-dim: #6b7280;
  --accent: #7a8ba3;
  --accent-soft: #8a9bb0;
  --accent-bright: #9aabc0;
  --accent-dim: rgba(122, 139, 163, 0.14);
  --accent-glow: rgba(122, 139, 163, 0.22);
  --accent-border: rgba(122, 139, 163, 0.38);
  --white: #f5f5f7;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max: 40rem;
  --max-wide: 52rem;
  --radius: 6px;
  --radius-hex: 10px 6px 10px 6px;
  --ease: 0.2s ease;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 24px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(122, 139, 163, 0.07), transparent 55%),
    linear-gradient(rgba(122, 139, 163, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 139, 163, 0.028) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent-soft);
  text-decoration: none;
  transition: color var(--ease);
}

a:hover,
a:focus-visible {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ——— Site header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(10, 10, 11, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-header__inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--white);
  text-decoration: none;
}

.brand:hover,
.brand:focus-visible {
  color: var(--white);
  text-decoration: none;
}

.brand__mark {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--accent-border);
}

.brand__text {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  line-height: 1.2;
}

.brand__name {
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.brand__handle {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color var(--ease), color var(--ease), background var(--ease);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--white);
  background: var(--accent-dim);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.35rem;
}

.site-nav a {
  display: inline-block;
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  transition: color var(--ease), background var(--ease);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--white);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
}

.site-nav a[aria-current="page"] {
  color: var(--accent-soft);
  background: var(--accent-dim);
  box-shadow: inset 0 -2px 0 0 var(--accent);
}

/* ——— Main ——— */
main {
  flex: 1;
  max-width: var(--max-wide);
  margin: 0 auto;
  width: 100%;
  padding: 2.5rem 1.25rem 3.5rem;
}

.page-narrow {
  max-width: var(--max);
}

/* ——— Hero ——— */
.hero {
  position: relative;
  margin: -2.5rem -1.25rem 2.75rem;
  padding: 3.75rem 1.25rem 3.25rem;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 20% 40%, rgba(122, 139, 163, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(10, 10, 11, 0.45) 0%, rgba(10, 10, 11, 0.72) 55%, var(--bg) 100%),
    linear-gradient(90deg, rgba(10, 10, 11, 0.55) 0%, transparent 40%),
    url("assets/header.png") center 28% / cover no-repeat;
  opacity: 0.82;
  pointer-events: none;
}

.hero__content {
  position: relative;
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.hero__mark {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-hex);
  box-shadow:
    0 0 0 1px var(--accent-border),
    0 0 32px var(--accent-glow);
  margin-bottom: 0.25rem;
}

.hero__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 3.15rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--white);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.hero__tagline {
  margin: 0;
  max-width: 30rem;
  font-size: 1.12rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  margin-top: 0.5rem;
}

.hero__secondary {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color var(--ease);
}

.hero__secondary:hover,
.hero__secondary:focus-visible {
  color: var(--accent-soft);
  text-decoration: none;
}

.hero__secondary::after {
  content: " →";
  opacity: 0.75;
}

/* ——— Lane cards (3-up) ——— */
.lanes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 2.75rem;
}

.lane-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.15rem 1.2rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent-border);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  transition:
    transform var(--ease),
    border-color var(--ease),
    background var(--ease),
    box-shadow var(--ease);
}

.lane-card:hover,
.lane-card:focus-visible {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  border-color: var(--accent-border);
  border-left-color: var(--accent);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 12px 28px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(122, 139, 163, 0.12);
  text-decoration: none;
  color: inherit;
}

.lane-card__label {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.lane-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--white);
  letter-spacing: -0.015em;
}

.lane-card__blurb {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.45;
}

/* ——— Featured note card ——— */
.featured {
  margin-bottom: 1rem;
  padding: 1.5rem 1.5rem 1.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.featured::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122, 139, 163, 0.45), transparent);
}

.featured__label {
  margin: 0 0 0.7rem;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.featured h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.featured h2 a {
  color: var(--white);
  text-decoration: none;
  transition: color var(--ease);
}

.featured h2 a:hover,
.featured h2 a:focus-visible {
  color: var(--accent-soft);
  text-decoration: none;
}

.featured__meta {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

.featured__deck {
  margin: 0 0 1.15rem;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.featured__link {
  font-size: 0.9rem;
  font-weight: 560;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-decoration: none;
  transition: color var(--ease);
}

.featured__link:hover,
.featured__link:focus-visible {
  color: var(--white);
  text-decoration: none;
}

.featured__link::after {
  content: " →";
}

/* ——— Buttons ——— */
.btn {
  display: inline-block;
  padding: 0.7rem 1.35rem;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  text-decoration: none;
  transition:
    background var(--ease),
    border-color var(--ease),
    color var(--ease),
    transform var(--ease),
    box-shadow var(--ease);
}

.btn:hover,
.btn:focus-visible {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  color: var(--bg);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(122, 139, 163, 0.25);
}

.btn--ghost {
  background: transparent;
  color: var(--accent-soft);
  border-color: var(--accent-border);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--accent-dim);
  color: var(--white);
  border-color: var(--accent);
  box-shadow: none;
}

/* ——— Page chrome ——— */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.page-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 3rem;
  height: 2px;
  background: var(--accent);
  opacity: 0.7;
}

.page-header h1 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.65rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--white);
}

.page-header .lede {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 36rem;
  line-height: 1.55;
}

/* ——— Prose ——— */
.prose {
  max-width: var(--max);
}

.prose h2 {
  margin: 2.35rem 0 0.9rem;
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--white);
}

.prose h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-soft);
}

.prose p {
  margin: 0 0 1.05rem;
  color: var(--text-muted);
}

.prose ul,
.prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose li strong {
  color: var(--text);
  font-weight: 600;
}

.prose blockquote {
  margin: 1.85rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-elevated);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-style: italic;
  line-height: 1.55;
  box-shadow: var(--shadow-card);
}

.prose--article h1,
.article-title {
  font-family: var(--font-serif);
}

/* ——— Thesis framework 2×2 ——— */
.framework {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  counter-reset: framework;
}

.framework li {
  counter-increment: framework;
  position: relative;
  padding: 1.2rem 1.2rem 1.25rem;
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-top: 2px solid var(--accent-border);
  box-shadow: var(--shadow-card);
  transition:
    border-color var(--ease),
    background var(--ease),
    transform var(--ease);
}

.framework li:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-border);
  border-top-color: var(--accent);
  transform: translateY(-1px);
}

.framework li strong {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  color: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.framework li strong::before {
  content: counter(framework, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0;
  color: var(--accent);
  opacity: 0.85;
}

.framework li span,
.framework li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ——— Notes list (editorial) ——— */
.note-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.note-list li {
  border-bottom: 1px solid var(--border-subtle);
}

.note-list li:first-child {
  border-top: 1px solid var(--border-subtle);
}

.note-list a {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  grid-template-rows: auto auto;
  column-gap: 1.25rem;
  row-gap: 0.35rem;
  align-items: baseline;
  padding: 1.25rem 0.85rem 1.25rem 0;
  margin: 0 -0.85rem 0 0;
  padding-left: 0.85rem;
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: background var(--ease);
}

.note-list a:hover,
.note-list a:focus-visible {
  text-decoration: none;
  background: var(--accent-dim);
}

.note-list a:hover .note-list__title,
.note-list a:focus-visible .note-list__title {
  color: var(--accent-soft);
}

.note-list__date {
  grid-column: 1;
  grid-row: 1;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.note-list__title {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.015em;
  transition: color var(--ease);
}

.note-list__excerpt {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ——— Article ——— */
.article-meta {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.page-header .article-title,
.article .page-header h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  font-size: clamp(1.75rem, 4vw, 2.15rem);
}

.template-badge {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 3px;
}

.callout {
  margin: 1.5rem 0;
  padding: 1.05rem 1.2rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.callout strong {
  color: var(--text);
}

.contact-card {
  padding: 1.5rem 1.55rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  box-shadow: var(--shadow-card);
}

.contact-card dt {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.contact-card dd {
  margin: 0 0 1.25rem;
  font-size: 1.08rem;
}

.contact-card dd:last-child {
  margin-bottom: 0;
}

.disclaimer-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.disclaimer-list li {
  position: relative;
  padding: 1rem 1.2rem 1rem 1.65rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.disclaimer-list li:last-child {
  border-bottom: none;
}

.disclaimer-list li::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 1.35rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.8;
}

.disclaimer-list li strong {
  color: var(--text);
}

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  margin-top: auto;
}

.site-footer__inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 1.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.15rem;
}

.site-footer a {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color var(--ease);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent-soft);
}

.site-footer__copy {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-dim);
  opacity: 0.9;
}

/* ——— Responsive ——— */
@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: rgba(10, 10, 11, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.25rem 1rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.35rem;
  }

  .site-header {
    position: relative;
  }

  .brand__handle {
    display: none;
  }

  .hero {
    margin: -2.5rem -1.25rem 2.25rem;
    padding: 2.75rem 1.25rem 2.5rem;
  }

  .hero h1 {
    font-size: 2.05rem;
  }

  .hero__mark {
    width: 56px;
    height: 56px;
  }

  .lanes {
    grid-template-columns: 1fr;
  }

  .framework {
    grid-template-columns: 1fr;
  }

  .note-list a {
    grid-template-columns: 1fr;
    row-gap: 0.25rem;
  }

  .note-list__date {
    grid-column: 1;
    grid-row: 1;
  }

  .note-list__title {
    grid-column: 1;
    grid-row: 2;
  }

  .note-list__excerpt {
    grid-column: 1;
    grid-row: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .lane-card:hover,
  .lane-card:focus-visible,
  .btn:hover,
  .btn:focus-visible,
  .framework li:hover {
    transform: none;
  }
}

.contact-muted {
  color: var(--text-dim);
}

.callout--spaced {
  margin-top: 2rem;
}

.prose--spaced {
  margin-top: 2rem;
}
