/* 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);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 2.5rem 2.5rem;
  mask-image: radial-gradient(ellipse at top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 70%);
}

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

.page--wide {
  max-width: 760px;
}

::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);
}

/* Minimal language toggle — no JS, no knob. Active side is set server-side. */
.lang-switch {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.8rem;
}

.lang-switch__option {
  color: var(--muted);
  border-bottom: none;
  line-height: 1;
}

.lang-switch__option[aria-current="true"] {
  color: var(--ink);
  font-weight: 500;
}

a.lang-switch__option:hover {
  color: var(--ink);
}

/* 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-outcome {
  font-size: 0.9rem;
  color: var(--ink);
  margin-top: 0.35rem;
  margin-bottom: 0.55rem;
  max-width: 50rem;
}

.row-outcome::before {
  content: "→ ";
  color: var(--accent);
}

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

.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);
}

/* ---------- landing page lift ---------- */

.landing-hero {
  margin-bottom: 2.75rem;
}

.landing-hero .tag {
  margin-bottom: 1rem;
}

.hero-statement {
  font-family: var(--mono);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
  max-width: 42rem;
}

.hero-statement::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 1.05em;
  background: var(--accent-soft);
  margin-left: 0.18em;
  vertical-align: baseline;
  opacity: 0;
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 0.75;
  }
}

.hero-note {
  color: var(--muted);
  margin-bottom: 1.5rem;
  max-width: 34rem;
}

.hero-proof {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--accent);
  max-width: 40rem;
}

.hero-proof strong {
  color: var(--text);
  font-weight: 500;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid var(--link-line);
  padding: 0.6rem 0.95rem;
  border-radius: 4px;
  text-decoration: none;
  transition:
    border-color 0.15s,
    background-color 0.15s,
    color 0.15s;
}

.cta-primary::before {
  content: ">";
  color: var(--accent);
}

.cta-primary:hover {
  border-color: var(--accent-soft);
  background: rgba(99, 102, 241, 0.08);
  color: var(--ink);
}

.cta-primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: transparent;
}

.telemetry {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 2.75rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text);
  line-height: 1.55;
}

.telemetry-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.9rem;
}

.telemetry-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}

.telemetry-item .status {
  font-size: 0.68rem;
  color: var(--accent-soft);
}

.telemetry-item .status::before {
  content: "[";
  color: var(--accent-soft);
}

.telemetry-item .status::after {
  content: "]";
  color: var(--accent-soft);
}

.telemetry-sep {
  color: var(--faint);
  user-select: none;
}

.telemetry-item a {
  font-family: inherit;
  font-size: inherit;
  color: var(--text);
  border-bottom-color: var(--link-line);
}

.telemetry-item a:hover {
  color: var(--accent-soft);
  border-bottom-color: var(--accent-soft);
}

.selected-work {
  margin-top: 5rem;
}

/* landing page rows as dashboard panels */
.landing .rows {
  border-bottom: none;
}

.landing .row {
  display: block;
  padding: 1.15rem 1.25rem;
  border-left: 2px solid var(--rule);
  border-radius: 0 4px 4px 0;
  margin-bottom: 1.25rem;
  position: relative;
  background-color: rgba(255, 255, 255, 0.015);
  transition:
    border-color 0.15s,
    background-color 0.15s;
}

.landing .row:last-child {
  margin-bottom: 0;
}

.landing .row::before {
  content: counter(row, decimal-leading-zero);
  position: absolute;
  top: 1.15rem;
  left: 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
  padding-top: 0;
  transition: color 0.15s;
}

.landing .row:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background-color: rgba(255, 255, 255, 0.025);
}

.landing .row:hover::before {
  color: var(--accent);
}

.landing .row:has(.status--active) {
  border-left-color: var(--accent);
}

.landing .row-main {
  margin-left: 2rem;
}

.landing .row-head {
  margin-bottom: 0.35rem;
}

.landing .row-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.landing .row-body {
  margin-bottom: 0.6rem;
}

.landing .row-outcome {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.landing .row-outcome::before {
  content: "→ ";
  color: var(--accent);
}

.landing .row-links {
  margin-top: 0;
}

.landing .status {
  font-size: 0.72rem;
  color: var(--muted);
}

.landing .status::before {
  content: "●";
  margin-right: 0.35rem;
  color: var(--faint);
}

.landing .status::after {
  content: none;
}

.landing .status--active {
  color: var(--accent-soft);
}

.landing .status--active::before {
  color: #4ade80;
}

.closing {
  margin-top: 3rem;
  padding: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
}

.closing p {
  color: var(--muted);
  margin-bottom: 1.1rem;
  max-width: 34rem;
}

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

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

@media (max-width: 480px) {
  body {
    padding: 1.25rem;
    padding-top: 2.5rem;
  }
  .hero-statement {
    font-size: 1.2rem;
    line-height: 1.5;
  }
  .hero-statement::after {
    width: 0.45em;
    height: 1em;
  }
  .telemetry {
    font-size: 0.68rem;
    gap: 0.3rem;
    padding: 0.75rem 0;
  }
  .closing {
    padding: 1.25rem;
  }
  .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;
  }
  .page--wide {
    max-width: 100%;
  }
  .landing .row {
    padding: 1rem;
  }
  .landing .row-main {
    margin-left: 1.75rem;
  }
}
