/* imwt.net — single stylesheet. No JavaScript, no external assets. */

:root {
  --accent: #2563a8;
  --bg: #fdfdfc;
  --fg: #1c2024;
  --muted: #5a626b;
  --border: #d8dde2;
  --card-bg: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #7fb2e8;
    --bg: #16191d;
    --fg: #e4e7ea;
    --muted: #9aa3ad;
    --border: #33383e;
    --card-bg: #1d2126;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg);
  color: var(--accent);
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  z-index: 10;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

header.site-header {
  border-bottom: 1px solid var(--border);
}

/* Reading column (70ch) plus the Projects sidebar (18rem) and the gap
   between them, so the header, content, and footer all share one width. */
.site-header .inner,
main,
footer.site-footer .inner {
  max-width: calc(70ch + 20.5rem);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header .inner {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.site-title a {
  color: var(--fg);
  text-decoration: none;
}

.tagline {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

nav.site-nav {
  margin-top: 0.75rem;
  font-size: 0.98rem;
}

nav.site-nav a {
  color: var(--fg);
  text-decoration: none;
  margin-right: 1.25rem;
}

nav.site-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

main {
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2.5rem;
}

/* Content column + Projects sidebar. The two share one row when there is room
   and stack when there isn't; the sidebar wraps under the content. */
main .content {
  flex: 1 1 30rem;
  max-width: 70ch;
}

.sidebar {
  flex: 0 1 18rem;
}

.sidebar-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.4rem;
}

.sidebar-box h2 {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
}

.sidebar-entry {
  font-size: 1.02rem;
  margin: 0 0 0.4rem;
}

.sidebar-subtitle {
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

.sidebar-box h4 {
  margin: 1.1rem 0 0.4rem;
  font-size: 1rem;
}

.sidebar-box p {
  font-size: 0.95rem;
  margin: 0 0 0.75rem;
}

.sidebar-box p:last-child {
  margin-bottom: 0;
}

h1 {
  font-size: 1.8rem;
  line-height: 1.25;
  margin: 0 0 1.25rem;
}

h2 {
  font-size: 1.3rem;
  margin: 2.25rem 0 0.75rem;
}

p {
  margin: 0 0 1.1rem;
}

.intro {
  font-size: 1.1rem;
  color: var(--muted);
}

.cards {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 48rem) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

.cards li {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.4rem;
  margin: 0;
}

.cards h2 {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
}

.cards h2 a {
  color: var(--fg);
  text-decoration: none;
}

.cards h2 a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.cards p {
  font-size: 0.97rem;
  margin-bottom: 0.75rem;
}

.read-more {
  font-size: 0.95rem;
}

.status-note {
  font-style: italic;
  color: var(--muted);
}

footer.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

footer.site-footer .inner {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

footer.site-footer p {
  margin: 0;
}

/* Posts */

.post-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: -0.75rem 0 1.5rem;
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 1.1rem;
}

.post table {
  border-collapse: collapse;
  width: 100%;
  font-variant-numeric: tabular-nums;
}

.post table th,
.post table td {
  padding: 0.4em 0.7em;
  text-align: left;
  vertical-align: top;
}

.post table th {
  border-bottom: 1px solid var(--border);
}

.post table tbody tr:nth-child(even) {
  background: var(--card-bg);
}

pre,
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
}

code {
  padding: 0.1em 0.35em;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
}

pre {
  overflow-x: auto;
  padding: 0.9rem 1.1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}

pre code {
  padding: 0;
  background: none;
  border: none;
}

.policy-note {
  margin-top: 2.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
}
