/* Sometype Mono, self-hosted (latin subset, variable 400-700). License: sometype-mono-OFL.txt */
@font-face {
  font-family: "Sometype Mono";
  src: url("/sometype-mono.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sometype Mono";
  src: url("/sometype-mono-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --bg: #fdfdfc;
  --code-bg: #f2f2f0;
  --border: #e4e4e0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6e6e3;
    --muted: #8f8f8a;
    --bg: #121212;
    --code-bg: #1d1d1d;
    --border: #2c2c2c;
  }
}

body {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
  font: 1rem/1.7 "Sometype Mono", ui-monospace, monospace;
  color: var(--text);
  background: var(--bg);
}

a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--muted); }
img { max-width: 100%; height: auto; }

h1, h2 { line-height: 1.3; letter-spacing: -0.02em; }
h2 { font-size: 1.25rem; margin-top: 2.5rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

time { color: var(--muted); }

pre, code { font-family: inherit; }
pre {
  overflow-x: auto;
  padding: 1rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.875rem;
}
:not(pre) > code {
  padding: 0.1em 0.3em;
  background: var(--code-bg);
  border-radius: 4px;
}

table { border-collapse: collapse; }
th, td { padding: 0.3rem 0.75rem; border: 1px solid var(--border); }

/* Nav: "rr.  rant  apps". <body data-page> underlines the current section */
header { margin-bottom: 3rem; }
nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: baseline; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--text); }
nav .logo { color: var(--text); font-weight: 700; margin-right: 0.5rem; }
[data-page="rant"] nav a[href="/rant/"],
[data-page="apps"] nav a[href="/apps/"] {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 6px;
}

.section { font-size: 1rem; color: var(--muted); font-weight: 400; margin-top: 3rem; }
.more { margin-top: 0.75rem; }
.more a { color: var(--muted); text-decoration: none; }
.more a:hover { color: var(--text); }

/* Home: intro */
.intro h1 { font-size: 1.375rem; margin: 0 0 0.5rem; }
.intro p { margin: 0.25rem 0; }
.intro .links { display: flex; gap: 1rem; margin-top: 0.75rem; }
.intro .links a { color: var(--muted); display: inline-flex; }
.intro .links a:hover { color: var(--text); }
.intro .links svg { width: 1.375rem; height: 1.375rem; fill: currentColor; }

/* Apps: icon on the left, name + one-line description on the right. 2 columns, 1 on phones.
   Icon is a glyph for now; swap in <img src=".." alt=""> inside .icon for a real one. */
.apps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.25rem 2rem;
}
.apps a {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  column-gap: 1rem;
  align-items: center;
  text-decoration: none;
}
.apps .icon {
  grid-row: span 2;
  width: 3.25rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 22%;
  background: var(--code-bg);
  border: 1px solid var(--border);
  font-size: 1.375rem;
  font-weight: 700;
  overflow: hidden;
}
.apps .icon img { width: 100%; height: 100%; object-fit: cover; }
.apps .name { font-weight: 700; align-self: end; }
.apps .desc {
  color: var(--muted);
  font-size: 0.875rem;
  align-self: start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.apps a:hover .name { text-decoration: underline; text-underline-offset: 3px; }

/* Post list: title (+ tags) on the left, date pushed to the right.
   Markup: <ul class="posts"><li><a>..</a> <span class="tags">..</span> <time>..</time></li></ul> */
.posts { list-style: none; padding: 0; }
.posts li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 1rem; padding: 0.35rem 0; }
.posts time { flex: none; margin-left: auto; }
.tags { color: var(--muted); font-size: 0.875rem; }
