/* ajith.ai. One stylesheet, no framework. */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #fbfaf7;
  --text: #1c1b19;
  --muted: #66635d;
  --rule: #e6e2d9;
  --accent: #1d5c47;
  --accent-soft: #e5eee8;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --measure: 42rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --text: #ecebe6;
    --muted: #9d9a93;
    --rule: #2b2a27;
    --accent: #7cc7a6;
    --accent-soft: #1b2a24;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
a:hover { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--bg); padding: 0.5rem 0.75rem; z-index: 10; }

.site-header, main, .site-footer {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1.75rem 0.5rem;
}
.wordmark { font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-size: 0.9375rem; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { color: var(--text); }

/* Main */
main { padding-block: 2.5rem 4.5rem; }

h1 {
  font-size: clamp(2.375rem, 7vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 600;
  margin: 0 0 1.25rem;
}
.lede { font-size: 1.25rem; line-height: 1.5; letter-spacing: -0.01em; margin: 0 0 1rem; }
.hero p { max-width: 36rem; margin: 0 0 1rem; }
.thesis { color: var(--muted); }
.thesis a { color: var(--text); }

section { margin-top: 4rem; }
h2 {
  display: flex;
  gap: 0.75rem;
  margin: 0 0 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
  font: 500 0.8125rem/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
h2 .num { color: var(--accent); }
.section-note { color: var(--muted); font-size: 0.9375rem; margin: 0.75rem 0 0.25rem; }

/* Items */
.item { padding: 1.1rem 0 1.25rem; border-bottom: 1px solid var(--rule); }
.item:last-of-type { border-bottom: 0; }
.item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.15rem 1rem;
}
.item h3 { margin: 0; font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
.item h3 a { text-decoration: none; }
.item h3 a[target="_blank"]::after {
  content: "\2197";
  margin-left: 0.3em;
  font-size: 0.8em;
  color: var(--muted);
}
.item p { margin: 0.4rem 0 0; }
.meta { font: 400 0.8125rem/1.4 var(--mono); color: var(--muted); }

.subhead {
  margin: 2rem 0 0;
  font: 500 0.8125rem/1.4 var(--mono);
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* Note lists */
.note-list { list-style: none; padding: 0; margin: 0; }
.note-list li { padding: 0.95rem 0; border-bottom: 1px solid var(--rule); }
.note-list time { display: block; font: 400 0.8125rem/1.4 var(--mono); color: var(--muted); margin-bottom: 0.2rem; }
.note-list a { font-weight: 600; text-decoration: none; }
.note-list p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.9375rem; }
.more { display: inline-block; margin-top: 1.25rem; font: 500 0.875rem/1.4 var(--mono); }

/* Notes and prose */
.note-meta { font: 400 0.8125rem/1.4 var(--mono); color: var(--muted); margin: 0 0 1.25rem; }
.note-meta a { color: var(--muted); }
article.note h1 { font-size: clamp(2rem, 5.5vw, 2.75rem); margin-bottom: 1.75rem; }
.prose { max-width: 38rem; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 1.15rem; }
.prose h2 { margin-top: 2.25rem; }
.prose blockquote { margin-left: 0; padding-left: 1rem; border-left: 2px solid var(--accent); color: var(--muted); }
.prose code { font: 0.9em var(--mono); background: var(--accent-soft); padding: 0.1em 0.3em; border-radius: 3px; }
.origin { font: 400 0.875rem/1.4 var(--mono); margin-top: 2rem; }
.related { margin-top: 3.5rem; }

ul.plain { list-style: none; padding: 0; margin: 0.75rem 0 0; }
ul.plain li { padding: 0.35rem 0; }

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-block: 1.5rem 3rem;
  background: linear-gradient(var(--rule), var(--rule)) top center / calc(100% - 2.5rem) 1px no-repeat;
  color: var(--muted);
  font-size: 0.875rem;
}
.site-footer p { margin: 0; }

@media (max-width: 520px) {
  body { font-size: 1rem; }
  main { padding-block: 1.75rem 3.5rem; }
  section { margin-top: 3rem; }
  .lede { font-size: 1.125rem; }
}
