/* darrentech.uk — Modus Operandi Tinted, matching the Uptime Kuma status
   page (uptime.darrentech.uk/status/availability; its custom CSS lives in
   Kuma's DB on the Oracle VPS). Dark mode is the Modus Vivendi Tinted
   counterpart. Intel One Mono is self-hosted (SIL OFL, fonts/OFL.txt). */

@font-face {
  font-family: "Intel One Mono";
  src: url("fonts/IntelOneMono-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Intel One Mono";
  src: url("fonts/IntelOneMono-Italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Intel One Mono";
  src: url("fonts/IntelOneMono-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Intel One Mono";
  src: url("fonts/IntelOneMono-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  /* Modus Operandi Tinted — same values as the Kuma theme */
  --bg:        #fbf7f0;
  --surface:   #f2f0e9;
  --surface-2: #eae7de;
  --fg:        #000000;
  --muted:     #595959;
  --border:    #c2bcb5;
  --green:     #006800;
  --red:       #a60000;
  --yellow:    #6f5500;
  --blue:      #0031a9;
  --link:      #3548cf;
  --hover:     #721045;
  --mono: "Intel One Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Modus Vivendi Tinted */
    --bg:        #0d0e1c;
    --surface:   #1d2235;
    --surface-2: #2b3045;
    --fg:        #ffffff;
    --muted:     #989898;
    --border:    #61647a;
    --green:     #44bc44;
    --red:       #ff5f59;
    --yellow:    #d0bc00;
    --blue:      #2fafff;
    --link:      #79a8ff;
    --hover:     #feacd0;
  }
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0 auto;
  max-width: 44rem;
  padding: 2rem 1rem 3rem;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.6;
}

::selection { background: var(--border); color: var(--fg); }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { color: var(--hover); }

/* ── header / footer ───────────────────────────────────────────────── */
header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-bottom: 0.75rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
header.site .name {
  color: var(--fg);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}
header.site nav { display: flex; gap: 1.25rem; }
header.site nav a[aria-current="page"] {
  color: var(--fg);
  text-decoration-thickness: 2px;
}

footer.site {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 4rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}
footer.site span { margin-right: auto; }

/* ── text ──────────────────────────────────────────────────────────── */
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.02em; }
h1 { font-size: 1.6rem; margin: 0 0 1.25rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 0.75rem; }
h3 { font-size: 1.05rem; margin: 1.75rem 0 0.5rem; }

.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1rem; }
.prose li + li { margin-top: 0.25rem; }
.prose img, .prose video { max-width: 100%; height: auto; }
.prose blockquote {
  margin: 0 0 1rem;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 3px solid var(--border);
  color: var(--muted);
}
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 0.1em 0.3em;
  border-radius: 4px;
}
pre {
  overflow-x: auto;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  line-height: 1.45;
}
pre code { background: none; padding: 0; font-size: 0.875rem; }

table { border-collapse: collapse; margin: 0 0 1rem; }
th, td { border: 1px solid var(--border); padding: 0.3rem 0.6rem; text-align: left; }

figure { margin: 1.5rem 0; }
figure img, figure video {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}
figure video { width: 100%; }
figcaption { margin-top: 0.4rem; color: var(--muted); font-size: 0.875rem; }
/* figure(size="small"): a third of the text width, centred; never narrower
   than 16rem so it stays usable on a phone. */
figure.small { text-align: center; }
figure.small img { width: max(33%, 16rem); margin-inline: auto; }

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

/* ── home ──────────────────────────────────────────────────────────── */
.home h1 { font-size: 2rem; margin-bottom: 1rem; }
.home ul { list-style: none; padding: 0; }
.home li::before { content: "→ "; color: var(--muted); }

/* ── blog ──────────────────────────────────────────────────────────── */
.page-title { margin-bottom: 2rem; }

.entry { padding-bottom: 1.75rem; margin-bottom: 1.75rem; border-bottom: 1px dashed var(--border); }
.entry:last-of-type { border-bottom: 0; }
.entry header { margin-bottom: 0.6rem; }
.entry .date { color: var(--muted); font-size: 0.875rem; text-decoration: none; }
a.date:hover { color: var(--hover); text-decoration: underline; }
.entry h2 { margin: 0.15rem 0 0; font-size: 1.2rem; }
.entry h2 a { color: var(--fg); text-decoration: none; }
.entry h2 a:hover { color: var(--hover); text-decoration: underline; }
.entry.single header { margin-bottom: 1.5rem; }
.entry.single h1 { margin: 0.15rem 0 0; }
.more { font-size: 0.9rem; }
.back { margin-top: 2rem; }
