:root {
  --bg: #f7f6f3;
  --bg-elev: #ffffff;
  --ink: #1a1a1a;
  --ink-muted: #5c5c5c;
  --line: #e4e2dc;
  --accent: #2a6f73;
  --accent-soft: #d7ecec;
  --bronze: #8a7348;
  --bronze-soft: #efe8d8;
  --hero-bg: #141616;
  --hero-ink: #f4f2ee;
  --radius: 14px;
  --shadow: 0 18px 40px rgba(20, 22, 22, 0.08);
  --font: "Geist", "Inter", "Segoe UI", system-ui, sans-serif;
}

[data-theme="dark"] {
  --bg: #111213;
  --bg-elev: #1a1c1c;
  --ink: #f3f1ec;
  --ink-muted: #a8a49c;
  --line: #2a2d2d;
  --accent: #6fb3b6;
  --accent-soft: #1c3031;
  --bronze: #c4a86a;
  --bronze-soft: #2b261b;
  --hero-bg: #0c0d0d;
  --hero-ink: #f4f2ee;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background:
    radial-gradient(circle at top left, rgba(42, 111, 115, 0.07), transparent 30%),
    var(--bg);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 13px;
  text-transform: uppercase;
}
.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  color: var(--ink-muted);
}
.nav-links a:hover,
.nav-links a.active { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  transition: 0.2s ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  cursor: pointer;
}
.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}

.hero {
  background: var(--hero-bg);
  color: var(--hero-ink);
  padding: 92px 0 84px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% 40%;
  height: 70%;
  background: radial-gradient(circle, rgba(42,111,115,0.22), transparent 62%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.kicker {
  color: #8ec4c6;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 560;
  max-width: 14ch;
}
.lede {
  margin-top: 22px;
  color: #c9c6bf;
  font-size: 18px;
  max-width: 46ch;
}
.hero-actions { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.hero .btn-primary { background: #f4f2ee; color: #141616; }
.hero .btn-ghost { color: #f4f2ee; border-color: #3a3d3d; }
.hero-mark {
  display: flex;
  justify-content: center;
}
.hero-mark img {
  width: min(420px, 100%);
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.35));
  border-radius: 8px;
}
.proof {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: -1px;
}
.proof div {
  background: var(--bg-elev);
  padding: 22px 18px;
}
.proof strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.proof span {
  color: var(--ink-muted);
  font-size: 13px;
}

.section { padding: 88px 0; }
.section-tight { padding: 64px 0; }
.section h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}
.section p.intro {
  color: var(--ink-muted);
  max-width: 62ch;
  font-size: 17px;
}

.grid-3, .grid-2 {
  display: grid;
  gap: 20px;
  margin-top: 36px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 1fr 1fr; }

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.card h3 {
  font-size: 20px;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.card p { color: var(--ink-muted); }
.card .meta {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 10px;
}

.band {
  background: var(--bg-elev);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.quote {
  font-size: clamp(22px, 2.6vw, 32px);
  letter-spacing: -0.03em;
  line-height: 1.35;
  max-width: 22ch;
}
.steps { counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: 0; }
.num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-weight: 600;
  color: var(--accent);
}

.page-hero {
  padding: 72px 0 28px;
}
.page-hero h1 {
  font-size: clamp(34px, 4.5vw, 54px);
  letter-spacing: -0.035em;
  line-height: 1.08;
  max-width: 16ch;
}
.page-hero p {
  margin-top: 16px;
  color: var(--ink-muted);
  max-width: 58ch;
  font-size: 18px;
}

form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}
label { font-size: 13px; font-weight: 600; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  border-radius: 10px;
  padding: 12px 14px;
}
textarea { min-height: 140px; resize: vertical; }
.note { color: var(--ink-muted); font-size: 14px; margin-top: 14px; }
.form-success {
  display: none;
  padding: 18px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--ink);
  margin-top: 16px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  color: var(--ink-muted);
  font-size: 14px;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-links {
  display: flex;
  gap: 18px;
}

.note-list {
  display: grid;
  gap: 16px;
  margin-top: 36px;
}
.note-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
}
.note-row:first-child { border-top: 1px solid var(--line); }
.note-row:hover h3 { color: var(--accent); }
.note-row .date {
  font-size: 13px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}
.note-row h3 {
  font-size: 22px;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.note-row p {
  color: var(--ink-muted);
  max-width: 62ch;
}
.note-row .read {
  font-size: 13px;
  color: var(--accent);
  white-space: nowrap;
  font-weight: 600;
}

.article {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  isolation: isolate;
}
.article::before,
.article::after {
  content: "";
  position: absolute;
  inset: -40px -80px;
  pointer-events: none;
  z-index: -1;
}
.article::before {
  background-color: #111111;
  background-image: none;
  -webkit-mask-image: url("../assets/chess-imprint.svg");
  mask-image: url("../assets/chess-imprint.svg");
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  -webkit-mask-size: 280px 374px;
  mask-size: 280px 374px;
  -webkit-mask-position: 12px 8px;
  mask-position: 12px 8px;
  opacity: 0.176;
}
.article::after {
  background:
    linear-gradient(
      118deg,
      transparent 8%,
      color-mix(in srgb, var(--accent) 28%, transparent) 22%,
      transparent 36%,
      color-mix(in srgb, var(--bronze) 24%, transparent) 52%,
      transparent 68%,
      color-mix(in srgb, var(--accent) 20%, transparent) 82%,
      transparent 94%
    );
  mix-blend-mode: soft-light;
  opacity: 0.7;
  mask-image: url("../assets/chess-imprint.svg");
  mask-repeat: repeat;
  mask-size: 280px 374px;
  mask-position: 12px 8px;
  -webkit-mask-image: url("../assets/chess-imprint.svg");
  -webkit-mask-repeat: repeat;
  -webkit-mask-size: 280px 374px;
  -webkit-mask-position: 12px 8px;
  animation: holograph 18s ease-in-out infinite;
}
@keyframes holograph {
  0%, 100% { opacity: 0.4; transform: translate3d(0, 0, 0); }
  50% { opacity: 0.7; transform: translate3d(6px, -4px, 0); }
}
[data-theme="dark"] .article::before {
  background-color: #f4f2ee;
  opacity: 0.242;
}
[data-theme="dark"] .article::after {
  mix-blend-mode: screen;
  opacity: 0.5;
}
.article-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 18px;
}
.article h1 {
  font-size: clamp(34px, 4.6vw, 52px);
  letter-spacing: -0.04em;
  line-height: 1.08;
}
.article .deck {
  margin-top: 18px;
  font-size: 20px;
  color: var(--ink-muted);
  line-height: 1.45;
}
.article-body {
  margin-top: 36px;
}
.article-body p {
  margin: 0 0 1.15em;
  font-size: 17.5px;
}
.article-body h2 {
  margin: 1.6em 0 0.55em;
  font-size: 26px;
  letter-spacing: -0.03em;
}
.article-body h3 {
  margin: 1.4em 0 0.4em;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.article-body ul, .article-body ol {
  margin: 0 0 1.15em 1.2em;
  color: var(--ink);
}
.article-body li { margin: 0.35em 0; }
.article-body blockquote {
  margin: 1.4em 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--accent);
  color: var(--ink);
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1.4;
}
.article-end {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .note-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 900px) {
  .hero-grid, .grid-3, .grid-2, .proof { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 18px 20px 22px;
    align-items: flex-start;
  }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .hero { padding: 56px 0 48px; }
}


@media (prefers-reduced-motion: reduce) {
  .article::after { animation: none; }
}

.article-cover {
  margin: 0 0 32px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.article-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}
.note-row {
  align-items: center;
}
.note-thumb {
  width: 120px;
  height: 76px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  flex-shrink: 0;
  background: #111;
}
.note-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.note-row.has-cover {
  grid-template-columns: 120px 1fr auto;
}
@media (max-width: 900px) {
  .note-row.has-cover { grid-template-columns: 1fr; }
  .note-thumb { width: 100%; height: 160px; }
}

.article-body .kicker-line {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 10px;
}
.article-body .display-line {
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 0.4em 0 1em;
}
.hypo {
  margin: 1.2em 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-elev);
}
.hypo .tag {
  display: block;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}
.hypo p { margin: 0; font-size: 17px; }
.article-body .close-line {
  font-size: clamp(22px, 2.5vw, 28px);
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin: 1.2em 0 0.4em;
}

body { position: relative; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-color: #111111;
  -webkit-mask-image: url("../assets/chess-imprint.svg");
  mask-image: url("../assets/chess-imprint.svg");
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  -webkit-mask-size: 220px 294px;
  mask-size: 220px 294px;
  -webkit-mask-position: 18px 12px;
  mask-position: 18px 12px;
  opacity: 0.09;
}
[data-theme="dark"] body::before {
  background-color: #f4f2ee;
  opacity: 0.12;
}
body > * { position: relative; z-index: 1; }
.article::before { opacity: 0.14; }
[data-theme="dark"] .article::before { opacity: 0.20; }

html { background: var(--bg); }
body {
  background: transparent !important;
}
body::before,
body::after {
  display: none !important;
}
.piece-field {
  position: absolute;
  inset: 0 0 auto 0;
  min-height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.piece-field img {
  position: absolute;
  width: 42px;
  height: 50px;
  opacity: 0.20;
  object-fit: contain;
}
[data-theme="dark"] .piece-field img {
  filter: invert(1);
  opacity: 0.28;
}
.article::before,
.article::after {
  display: none !important;
}
body > header,
body > section,
body > footer,
body > div {
  position: relative;
  z-index: 1;
}

.headshot {
  width: 148px;
  height: 148px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  margin: 4px 0 16px;
  border: 1px solid var(--line);
}
.card.principal p + p { margin-top: 0.85em; }
@media (min-width: 901px) {
  .card.principal { grid-column: 1 / -1; display: grid; grid-template-columns: 180px 1fr; gap: 8px 28px; align-items: start; }
  .card.principal .meta { grid-column: 2; }
  .card.principal .headshot { grid-column: 1; grid-row: 1 / span 8; width: 168px; height: 168px; margin: 8px 0 0; }
  .card.principal h3 { grid-column: 2; margin-top: 0; }
  .card.principal p { grid-column: 2; }
}
