:root {
  --co-bg: #0d0c09;
  --co-bg-deep: #090806;
  --co-surface: #15120e;
  --co-surface-2: #1c1812;
  --co-surface-3: #241e16;
  --co-line: rgba(244, 236, 221, 0.12);
  --co-line-strong: rgba(244, 236, 221, 0.22);
  --co-ink: #f4ecdd;
  --co-ink-2: #c8beb0;
  --co-ink-3: #958c81;
  --co-ink-4: #6e675f;
  --co-accent: #ff7b2d;
  --co-accent-hi: #ff9b5f;
  --co-accent-soft: rgba(255, 123, 45, 0.12);
  --co-accent-glow: rgba(255, 123, 45, 0.28);
  --co-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --co-sans: "IBM Plex Sans", system-ui, sans-serif;
  --co-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;
  background: var(--co-bg);
}

html[data-theme="dark"] body {
  background: var(--co-bg) !important;
  color: var(--co-ink) !important;
  font-family: var(--co-sans) !important;
  font-feature-settings: "ss01" 1, "cv11" 1;
}

html[data-theme="dark"] body > header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-color: var(--co-line) !important;
  background: rgba(13, 12, 9, 0.84) !important;
  backdrop-filter: blur(18px) saturate(135%);
}

html[data-theme="dark"] body > header > div {
  height: 72px !important;
}

html[data-theme="dark"] body > header a[href="/"] {
  color: var(--co-ink) !important;
  font-family: var(--co-mono) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em;
}

html[data-theme="dark"] body > header a[href="/"]::before {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--co-accent);
  border-radius: 50%;
  color: var(--co-accent-hi);
  content: "6";
  font-family: var(--co-serif);
  font-size: 19px;
  line-height: 1;
}

html[data-theme="dark"] body > header a[href="/"]::after {
  color: var(--co-ink-3);
  content: "/ field notes";
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

html[data-theme="dark"] body > header nav a {
  color: var(--co-ink-2) !important;
  font-family: var(--co-mono);
  font-size: 10px !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

html[data-theme="dark"] body > header nav a:hover {
  color: var(--co-ink) !important;
}

html[data-theme="dark"] body > header > div > a:last-child,
html[data-theme="dark"] a.bg-brand {
  border: 1px solid var(--co-accent) !important;
  border-radius: 999px !important;
  background: var(--co-accent) !important;
  color: #140b05 !important;
  box-shadow: 0 0 0 0 var(--co-accent-glow);
  font-family: var(--co-sans) !important;
  font-weight: 500 !important;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease !important;
}

html[data-theme="dark"] body > header > div > a:last-child:hover,
html[data-theme="dark"] a.bg-brand:hover {
  background: var(--co-accent-hi) !important;
  box-shadow: 0 0 0 7px var(--co-accent-soft);
  opacity: 1 !important;
  transform: translateY(-1px);
}

html[data-theme="dark"] body > div.min-h-screen {
  background:
    radial-gradient(circle at 12% 3%, var(--co-accent-soft), transparent 30rem),
    linear-gradient(var(--co-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--co-line) 1px, transparent 1px),
    var(--co-bg) !important;
  background-size:
    auto,
    64px 64px,
    64px 64px,
    auto !important;
  padding-top: 72px !important;
  padding-bottom: 96px !important;
}

html[data-theme="dark"] body > div.min-h-screen::before {
  position: fixed;
  z-index: -1;
  top: 80px;
  left: -160px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--co-accent-soft), transparent 68%);
  content: "";
  pointer-events: none;
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  > div.max-w-4xl
  > div.mb-8::before {
  display: block;
  margin-bottom: 16px;
  color: var(--co-accent-hi);
  content: "6OMB / AI COFOUNDER";
  font-family: var(--co-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  > div.max-w-4xl
  > div.mb-8
  h1 {
  margin-bottom: 18px !important;
  color: var(--co-ink) !important;
  font-family: var(--co-serif) !important;
  font-size: 0 !important;
  font-weight: 400 !important;
  letter-spacing: 0;
  line-height: 0.98;
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  > div.max-w-4xl
  > div.mb-8
h1::after {
  content: "Field Notes";
  font-size: clamp(50px, 5.5vw, 70px);
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  > div.max-w-4xl
  > div.mb-8
  p {
  max-width: 690px;
  color: var(--co-ink-2) !important;
  font-size: 18px;
  line-height: 1.65;
}

html[data-theme="dark"] body > div.min-h-screen .space-y-8 {
  gap: 28px;
}

html[data-theme="dark"] body > div.min-h-screen .space-y-8 > article {
  overflow: hidden;
  border: 1px solid var(--co-line) !important;
  border-radius: 22px !important;
  background: var(--co-surface) !important;
  box-shadow: none !important;
  transition:
    border-color 220ms ease,
    transform 220ms ease,
    box-shadow 220ms ease !important;
}

html[data-theme="dark"] body > div.min-h-screen .space-y-8 > article:hover {
  border-color: var(--co-line-strong) !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28) !important;
  transform: translateY(-3px);
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  .space-y-8
  > article
  > a:first-child {
  height: 300px !important;
  overflow: hidden;
  background: var(--co-surface-2);
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  .space-y-8
  > article
  > a:first-child::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 50%, rgba(13, 12, 9, 0.52)),
    linear-gradient(120deg, rgba(255, 123, 45, 0.16), transparent 45%);
  content: "";
  pointer-events: none;
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  .space-y-8
  > article
  > a:first-child
  img {
  filter: saturate(0.68) sepia(0.16) contrast(1.04);
  transition:
    filter 260ms ease,
    transform 500ms ease;
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  .space-y-8
  > article:hover
  > a:first-child
  img {
  filter: saturate(0.9) sepia(0.1) contrast(1.05);
  transform: scale(1.025);
}

html[data-theme="dark"] body > div.min-h-screen .space-y-8 > article > div {
  padding: 32px !important;
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  .space-y-8
  > article
  .text-gray-500 {
  color: var(--co-ink-3) !important;
  font-family: var(--co-mono);
  font-size: 10px !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  .space-y-8
  > article
  h2 {
  color: var(--co-ink) !important;
  font-family: var(--co-sans) !important;
  font-size: clamp(27px, 3vw, 32px) !important;
  font-weight: 500 !important;
  letter-spacing: -0.006em;
  line-height: 1.2 !important;
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  .space-y-8
  > article
  p {
  color: var(--co-ink-2) !important;
  line-height: 1.65;
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  .space-y-8
  > article
  span.bg-blue-50,
html[data-theme="dark"] article > header span.bg-blue-50 {
  border: 1px solid var(--co-line);
  background: var(--co-surface-3) !important;
  color: var(--co-accent-hi) !important;
  font-family: var(--co-mono);
  font-size: 9px !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  .space-y-8
  > article
  a.text-brand {
  flex: 0 0 auto;
  color: var(--co-accent-hi) !important;
  font-family: var(--co-mono);
  font-size: 10px !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html[data-theme="dark"] body > div.min-h-screen:has(> article) {
  padding-top: 44px !important;
}

html[data-theme="dark"] body > div.min-h-screen > article {
  max-width: 1120px !important;
}

html[data-theme="dark"] body > div.min-h-screen > article > nav a {
  color: var(--co-accent-hi) !important;
  font-family: var(--co-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html[data-theme="dark"] body > div.min-h-screen > article > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 20px 48px;
  align-items: end;
  margin-bottom: 40px !important;
}

html[data-theme="dark"] body > div.min-h-screen > article > header::before {
  display: none;
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  > article
  > header
  > div:first-child {
  grid-column: 1 / -1;
  margin-bottom: 0 !important;
}

html[data-theme="dark"] body > div.min-h-screen > article > header h1 {
  grid-column: 1;
  max-width: none;
  margin: 0 !important;
  color: var(--co-ink) !important;
  font-family: var(--co-sans) !important;
  font-size: clamp(36px, 3.6vw, 44px) !important;
  font-weight: 500 !important;
  letter-spacing: -0.002em;
  line-height: 1.14 !important;
}

html[data-theme="dark"] body > div.min-h-screen > article > header .text-gray-600 {
  grid-column: 2;
  display: flex;
  align-self: stretch;
  flex-direction: column;
  align-items: flex-start !important;
  justify-content: flex-end;
  gap: 7px !important;
  padding-left: 24px;
  border-left: 1px solid var(--co-line-strong);
  color: var(--co-ink-3) !important;
  font-family: var(--co-mono);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  > article
  > header
  .text-gray-600
  span:nth-of-type(1),
html[data-theme="dark"]
  body
  > div.min-h-screen
  > article
  > header
  .text-gray-600
  span:nth-of-type(3) {
  display: none;
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  > article
  > div.aspect-\[1200\/630\] {
  width: 100%;
  max-width: 860px;
  aspect-ratio: 2.45 / 1 !important;
  margin-right: auto;
  margin-bottom: 48px !important;
  margin-left: auto;
  border: 1px solid var(--co-line) !important;
  border-radius: 22px !important;
  background: var(--co-surface-2);
  box-shadow: none !important;
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  > article
  > div.aspect-\[1200\/630\]
  img {
  object-fit: cover !important;
  filter: saturate(0.72) sepia(0.14) contrast(1.04);
}

html[data-theme="dark"] body > div.min-h-screen > article > .prose {
  max-width: 760px !important;
  margin-right: auto;
  margin-left: auto;
  border: 1px solid var(--co-line) !important;
  border-radius: 22px !important;
  background: var(--co-surface) !important;
  box-shadow: none !important;
  color: var(--co-ink-2) !important;
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  > article
  > .prose
  > [data-brand-duplicate-title="true"] {
  display: none;
}

html[data-theme="dark"] [data-brand-duplicate-title="true"] + p {
  margin-top: 0;
}

html[data-theme="dark"] body > div.min-h-screen > article > .prose h2 {
  color: var(--co-ink) !important;
  font-family: var(--co-sans) !important;
  font-size: 32px !important;
  font-weight: 600 !important;
  letter-spacing: -0.006em;
  line-height: 1.2;
}

html[data-theme="dark"] body > div.min-h-screen > article > .prose h3 {
  color: var(--co-ink) !important;
  font-family: var(--co-sans) !important;
  font-size: 23px !important;
  font-weight: 600 !important;
  letter-spacing: -0.004em;
  line-height: 1.3;
}

html[data-theme="dark"] body > div.min-h-screen > article > .prose p,
html[data-theme="dark"] body > div.min-h-screen > article > .prose li {
  color: var(--co-ink-2) !important;
}

html[data-theme="dark"] body > div.min-h-screen > article > .prose ul,
html[data-theme="dark"] body > div.min-h-screen > article > .prose ol {
  color: var(--co-ink-2) !important;
}

html[data-theme="dark"] body > div.min-h-screen > article > .prose strong {
  color: var(--co-ink) !important;
}

html[data-theme="dark"] body > div.min-h-screen > article > .prose a {
  color: var(--co-accent-hi) !important;
  text-decoration-color: rgba(255, 155, 95, 0.42);
  text-underline-offset: 3px;
}

html[data-theme="dark"] body > div.min-h-screen > article > .prose code {
  border: 1px solid var(--co-line);
  border-radius: 5px;
  background: var(--co-surface-3) !important;
  color: var(--co-accent-hi) !important;
}

html[data-theme="dark"] body > div.min-h-screen > article > .prose pre code {
  border: 0;
  background: transparent !important;
  color: inherit !important;
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  > article
  > .prose
  div:has(> pre) {
  border: 1px solid var(--co-line);
  border-radius: 14px !important;
  background: var(--co-bg-deep) !important;
}

html[data-theme="dark"] body > div.min-h-screen > article > .prose table {
  border-color: var(--co-line-strong) !important;
  background: var(--co-surface) !important;
  color: var(--co-ink-2);
}

html[data-theme="dark"] body > div.min-h-screen > article > .prose thead,
html[data-theme="dark"] body > div.min-h-screen > article > .prose thead.bg-gray-50 {
  background: var(--co-surface-3) !important;
}

html[data-theme="dark"] body > div.min-h-screen > article > .prose tbody,
html[data-theme="dark"] body > div.min-h-screen > article > .prose tbody.bg-white {
  background: var(--co-surface) !important;
}

html[data-theme="dark"] body > div.min-h-screen > article > .prose tr {
  border-color: var(--co-line) !important;
}

html[data-theme="dark"] body > div.min-h-screen > article > .prose th {
  border-color: var(--co-line) !important;
  background: var(--co-surface-3) !important;
  color: var(--co-ink) !important;
}

html[data-theme="dark"] body > div.min-h-screen > article > .prose td {
  border-color: var(--co-line) !important;
  color: var(--co-ink-2) !important;
}

html[data-theme="dark"] body > div.min-h-screen > article > .prose blockquote {
  border-color: var(--co-accent) !important;
  color: var(--co-ink-2) !important;
}

html[data-theme="dark"] body > div.min-h-screen > article > .prose hr {
  border-color: var(--co-line-strong) !important;
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  > article
  > div.from-blue-50,
html[data-theme="dark"]
  body
  > div.min-h-screen
  > article
  > div.bg-blue-50 {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
  border: 1px solid var(--co-line) !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 88% 12%, var(--co-accent-soft), transparent 15rem),
    var(--co-surface-2) !important;
  box-shadow: none !important;
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  > article
  > div.from-blue-50
  h2,
html[data-theme="dark"]
  body
  > div.min-h-screen
  > article
  > div.from-blue-50
  h3,
html[data-theme="dark"]
  body
  > div.min-h-screen
  > article
  > div.bg-blue-50
  h3 {
  color: var(--co-ink) !important;
  font-family: var(--co-sans) !important;
  font-weight: 600 !important;
  letter-spacing: -0.012em;
  line-height: 1.25;
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  > article
  > div.from-blue-50
  p,
html[data-theme="dark"]
  body
  > div.min-h-screen
  > article
  > div.bg-blue-50
  p {
  color: var(--co-ink-2) !important;
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  > article
  > div.from-blue-50
  span.bg-blue-100 {
  border: 1px solid rgba(255, 155, 95, 0.26);
  border-radius: 999px !important;
  background: var(--co-accent-soft) !important;
  color: var(--co-accent-hi) !important;
  font-family: var(--co-mono);
  font-size: 9px !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

html[data-theme="dark"] body > div.min-h-screen > article > section h2 {
  color: var(--co-ink) !important;
  font-family: var(--co-sans) !important;
  font-size: 29px !important;
  font-weight: 600 !important;
  letter-spacing: -0.014em;
  line-height: 1.2;
}

html[data-theme="dark"] body > div.min-h-screen > article > section {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
}

html[data-theme="dark"] body > div.min-h-screen > article > section a {
  border-color: var(--co-line) !important;
  border-radius: 18px !important;
  background: var(--co-surface) !important;
  color: var(--co-ink) !important;
  box-shadow: none !important;
  transition:
    border-color 180ms ease,
    transform 180ms ease !important;
}

html[data-theme="dark"] body > div.min-h-screen > article > section a:hover {
  border-color: rgba(255, 155, 95, 0.38) !important;
  transform: translateY(-2px);
}

html[data-theme="dark"] body > div.min-h-screen > article > section a h3 {
  color: var(--co-ink) !important;
  font-family: var(--co-sans) !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  letter-spacing: -0.004em;
  line-height: 1.32;
}

html[data-theme="dark"] body > div.min-h-screen > article > section a:hover h3 {
  color: var(--co-accent-hi) !important;
}

html[data-theme="dark"] body > div.min-h-screen > article > section a p {
  color: var(--co-ink-2) !important;
  line-height: 1.55;
}

html[data-theme="dark"]
  body
  > div.min-h-screen
  > article
  > section
  a
  div.bg-gray-100 {
  background: var(--co-surface-2) !important;
}

html[data-theme="dark"] body > div.min-h-screen > article > section a img {
  filter: saturate(0.76) sepia(0.12) contrast(1.03);
}

html[data-theme="dark"] body > footer {
  border-top: 1px solid var(--co-line);
  background:
    radial-gradient(circle at 12% 0, var(--co-accent-soft), transparent 22rem),
    var(--co-bg-deep) !important;
  color: var(--co-ink-2) !important;
}

html[data-theme="dark"] body > footer p,
html[data-theme="dark"] body > footer span {
  color: var(--co-ink-3) !important;
}

html[data-theme="dark"] body > footer div.text-white {
  color: var(--co-ink) !important;
  font-family: var(--co-mono);
  font-size: 10px !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

html[data-theme="dark"] body > footer a {
  color: var(--co-ink-2) !important;
}

html[data-theme="dark"] body > footer a:hover {
  color: var(--co-accent-hi) !important;
}

html[data-theme="dark"] a:focus-visible {
  outline: 2px solid var(--co-accent-hi);
  outline-offset: 4px;
}

@media (max-width: 820px) {
  html[data-theme="dark"] body > div.min-h-screen > article {
    max-width: 760px !important;
  }

  html[data-theme="dark"] body > div.min-h-screen > article > header {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  html[data-theme="dark"]
    body
    > div.min-h-screen
    > article
    > header
    > div:first-child,
  html[data-theme="dark"] body > div.min-h-screen > article > header h1,
  html[data-theme="dark"]
    body
    > div.min-h-screen
    > article
    > header
    .text-gray-600 {
    grid-column: 1;
  }

  html[data-theme="dark"]
    body
    > div.min-h-screen
    > article
    > header
    .text-gray-600 {
    align-self: auto;
    flex-direction: row;
    align-items: center !important;
    justify-content: flex-start;
    gap: 10px !important;
    padding-top: 14px;
    padding-left: 0;
    border-top: 1px solid var(--co-line);
    border-left: 0;
  }

  html[data-theme="dark"]
    body
    > div.min-h-screen
    > article
    > header
    .text-gray-600
    span:nth-of-type(1),
  html[data-theme="dark"]
    body
    > div.min-h-screen
    > article
    > header
    .text-gray-600
    span:nth-of-type(3) {
    display: inline;
  }

  html[data-theme="dark"]
    body
    > div.min-h-screen
    > article
    > div.aspect-\[1200\/630\] {
    aspect-ratio: 1200 / 630 !important;
  }
}

@media (max-width: 640px) {
  html[data-theme="dark"] body > header > div {
    height: 64px !important;
    gap: 12px !important;
  }

  html[data-theme="dark"] body > header a[href="/"]::after {
    display: none;
  }

  html[data-theme="dark"] body > header nav {
    display: none;
  }

  html[data-theme="dark"] body > div.min-h-screen {
    padding-top: 48px !important;
    padding-bottom: 64px !important;
    background-size:
      auto,
      48px 48px,
      48px 48px,
      auto !important;
  }

  html[data-theme="dark"]
    body
    > div.min-h-screen
    > div.max-w-4xl
    > div.mb-8
    h1::after {
    font-size: 48px;
  }

  html[data-theme="dark"]
    body
    > div.min-h-screen
    .space-y-8
    > article
    > a:first-child {
    height: 220px !important;
  }

  html[data-theme="dark"] body > div.min-h-screen .space-y-8 > article > div {
    padding: 24px !important;
  }

  html[data-theme="dark"]
    body
    > div.min-h-screen
    .space-y-8
    > article
    h2 {
    font-size: 24px !important;
    line-height: 1.22 !important;
  }

  html[data-theme="dark"]
    body
    > div.min-h-screen
    .space-y-8
    > article
    > div
    > div:last-child {
    align-items: flex-start !important;
    flex-direction: column;
    gap: 18px;
  }

  html[data-theme="dark"] body > div.min-h-screen > article > header h1 {
    font-size: 26px !important;
    line-height: 1.18 !important;
  }

  html[data-theme="dark"] body > div.min-h-screen > article > .prose {
    padding: 24px !important;
  }

  html[data-theme="dark"] body > div.min-h-screen > article > .prose h2 {
    font-size: 28px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="dark"] *,
  html[data-theme="dark"] *::before,
  html[data-theme="dark"] *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
