/* ronner.dev — terminal-ledger design system
   Structure and chrome in JetBrains Mono; prose in Inter.
   One accent (#6366f1), hairlines instead of cards, ISO dates, numbered rows. */

@font-face {
  font-family: "Inter";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/Inter-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/Inter-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/Inter-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/JetBrainsMono-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/JetBrainsMono-Medium.woff2") format("woff2");
}

:root {
  --bg: #15151a;
  --ink: #f2f2f6;
  --text: #cdced7;
  --muted: #9a9aa8;
  --faint: #6e6e7a;
  --accent: #6366f1;
  --accent-soft: #818cf8;
  --rule: rgba(255, 255, 255, 0.07);
  --link-line: rgba(129, 140, 248, 0.3);
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  padding-top: min(9vh, 5.5rem);
}

.page {
  max-width: 640px;
  width: 100%;
}

::selection {
  background: rgba(99, 102, 241, 0.35);
  color: var(--ink);
}

/* ---------- header ---------- */

header {
  margin-bottom: 3rem;
}

.mast {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand::before {
  content: "~/";
  color: var(--accent);
  font-weight: 400;
}
.brand:hover {
  color: var(--accent-soft);
}

.nav {
  display: flex;
  gap: 1.1rem;
}
.nav a {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.nav a:hover {
  color: var(--ink);
}
.nav a[aria-current="page"] {
  color: var(--accent-soft);
}

/* Ledger rule: full-width hairline with an indigo stroke at the head. */
.rule {
  position: relative;
  border-top: 1px solid var(--rule);
  margin-top: 0.9rem;
}
.rule::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  height: 2px;
  width: 2.5rem;
  background: var(--accent);
  animation: rule-draw 0.6s ease-out;
}
@keyframes rule-draw {
  from {
    width: 0;
  }
  to {
    width: 2.5rem;
  }
}

/* ---------- type ---------- */

h1,
h2,
h3 {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.page-title {
  font-size: 1.45rem;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.page-intro {
  color: var(--muted);
  margin-bottom: 2.5rem;
}

/* Mono uppercase section label — the ledger's column header. */
.tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 0.75rem;
}

.prose {
  font-family: var(--sans);
}

.statement {
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 2.75rem;
}

/* ---------- links ---------- */

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--link-line);
  transition:
    color 0.15s,
    border-color 0.15s;
}
a:hover {
  color: var(--accent-soft);
  border-color: var(--accent-soft);
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: transparent;
}
.brand,
.nav a,
.row-title,
.footer-links a,
.plain {
  border-bottom: none;
}

/* ---------- ledger rows ---------- */

.rows {
  list-style: none;
  counter-reset: row;
  border-bottom: 1px solid var(--rule);
}

.row {
  counter-increment: row;
  display: grid;
  grid-template-columns: 2.25rem 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}
.row::before {
  content: counter(row, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
  padding-top: 0.15rem;
  transition: color 0.15s;
}
.row:hover::before {
  color: var(--accent);
}

.row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.row-title {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
}

.row-body {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.row-date {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
  white-space: nowrap;
}

.status {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: lowercase;
  letter-spacing: 0.06em;
  color: var(--faint);
  white-space: nowrap;
}
.status::before {
  content: "[";
}
.status::after {
  content: "]";
}
.status--active {
  color: var(--accent-soft);
}

.row-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}
.row-links a {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text);
}
.row-links a[href^="http"]::after {
  content: " ↗";
  color: var(--faint);
}

/* ---------- section spacing ---------- */

.section-gap {
  margin-top: 2.5rem;
}

/* ---------- footer ---------- */

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.footer-links {
  display: flex;
  gap: 1.1rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}
.footer-links a {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.footer-links a:hover {
  color: var(--ink);
}
.copyright {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
}

/* ---------- article (blog posts) ---------- */

.post-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.post-title {
  font-size: 1.6rem;
  line-height: 1.25;
  margin-bottom: 2rem;
}

article {
  font-family: var(--sans);
}
article h2 {
  font-size: 1.2rem;
  margin: 2.25rem 0 0.75rem;
}
article h3 {
  font-size: 1rem;
  margin: 1.75rem 0 0.5rem;
}
article p {
  margin-bottom: 1rem;
}
article ul,
article ol {
  margin: 0 0 1rem 1.5rem;
}
article li {
  margin-bottom: 0.4rem;
}
article code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
article pre {
  background: #101014;
  border: 1px solid var(--rule);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  line-height: 1.6;
}
article pre code {
  background: transparent;
  padding: 0;
}
article blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
  color: var(--muted);
  margin: 1rem 0;
}
article hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}
article img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* ---------- prose pages (about, legal) ---------- */

main.prose h2 {
  font-size: 1rem;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}
main.prose ul,
main.prose dl {
  margin-bottom: 0.75rem;
}
main.prose ul {
  padding-left: 1.25rem;
}
main.prose li {
  margin-bottom: 0.25rem;
}
main.prose dt {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  margin-top: 0.9rem;
}
main.prose dt:first-child {
  margin-top: 0;
}
main.prose dd {
  color: var(--muted);
  margin-bottom: 0.25rem;
}
main.prose hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}
main.prose strong {
  color: var(--ink);
  font-weight: 500;
}
.updated {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
  margin-top: 0.5rem;
}
.thought {
  font-style: italic;
  color: var(--muted);
}

/* ---------- motion & responsive ---------- */

@media (prefers-reduced-motion: reduce) {
  .rule::before {
    animation: none;
  }
  * {
    transition: none !important;
  }
}

@media (max-width: 480px) {
  body {
    padding: 1.25rem;
    padding-top: 2.5rem;
  }
  .row {
    grid-template-columns: 1.75rem 1fr;
    gap: 0.75rem;
  }
  .row-date {
    display: none;
  }
  .row-head {
    display: block;
  }
  .row-head .status {
    margin-left: 0.5rem;
  }
}
