/*
 * herddark — an Apache-2.0 adaptation of Herdr's ink website surface.
 * Source: https://github.com/herdrdev/herdr (website/css/site.css).
 * Attribution and the full license: ../ATTRIBUTION.md and ../LICENSE.
 */

:root,
html[data-mode="ink"] {
  color-scheme: dark;
  --bg: #17171a;
  --panel: #1e1e22;
  --mass: #26262b;
  --ink: #eae8ee;
  --dim: #cdccd2;
  --faint: #b0afb6;
  --faint-2: #908f96;
  --line: #26262b;
  --line-2: #35353d;
  --spot: #cba6f7;
  --spot-ink: #17171a;
  --grid: #202024;
  --run: #5fae74;
  --max: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  min-height: 100vh;
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 72px 72px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
}

::selection { background: var(--spot); color: var(--spot-ink); }

a { color: inherit; }

.site-frame {
  width: min(100%, var(--max));
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  border-inline: 1px solid var(--line-2);
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line-2);
}

.site-header {
  min-height: 4.25rem;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -.05em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  border: 1px solid var(--line-2);
  color: var(--spot);
  font-family: var(--mono);
  font-size: .875rem;
  letter-spacing: 0;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(.75rem, 3vw, 1.5rem);
}

.site-header nav a {
  color: var(--faint);
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--spot);
}

main { padding: 0 var(--gutter); }

.masthead,
.page-heading,
.not-found {
  position: relative;
  padding: clamp(4.5rem, 10vw, 8rem) 0 clamp(3rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--line-2);
}

.masthead::after {
  position: absolute;
  right: 0;
  bottom: 1.25rem;
  color: var(--mass);
  content: "SIREN";
  font-family: var(--display);
  font-size: clamp(4rem, 18vw, 12rem);
  font-weight: 900;
  letter-spacing: -.1em;
  line-height: .6;
  pointer-events: none;
  user-select: none;
}

.kicker {
  margin: 0 0 1.25rem;
  color: var(--spot);
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  font-family: var(--display);
  letter-spacing: -.055em;
  line-height: 1.05;
}

h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(3.25rem, 12vw, 8rem);
  font-weight: 900;
}

h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
}

h3 { font-size: 1.25rem; }

.subtitle {
  position: relative;
  z-index: 1;
  max-width: 33rem;
  margin: 1.25rem 0 0;
  color: var(--dim);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.intro-copy {
  position: relative;
  z-index: 1;
  max-width: 38rem;
  margin-top: 1.5rem;
  color: var(--faint);
}

.intro-copy p { margin: 0; }

.archive { padding: clamp(2.5rem, 6vw, 5rem) 0; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line-2);
}

.section-heading .kicker { margin: 0; }

.entry {
  display: grid;
  grid-template-columns: minmax(6rem, 10rem) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3rem);
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.entry-meta,
.post-meta {
  color: var(--faint-2);
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .05em;
  line-height: 1.7;
  text-transform: uppercase;
}

.entry-meta span,
.post-meta span { display: block; }

.entry-body h2 a {
  color: var(--ink);
  text-decoration: none;
}

.entry-body h2 a:hover,
.entry-body h2 a:focus-visible { color: var(--spot); }

.entry-body p {
  max-width: 44rem;
  margin: .75rem 0 0;
  color: var(--dim);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.tag-list a {
  display: block;
  border: 1px solid var(--line-2);
  padding: .25rem .45rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .04em;
  text-decoration: none;
}

.tag-list a:hover,
.tag-list a:focus-visible {
  border-color: var(--spot);
  background: var(--spot);
  color: var(--spot-ink);
}

.page-heading { padding-bottom: 3rem; }

.page-heading h1 { font-size: clamp(2.75rem, 8vw, 5.5rem); }

.terms {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.terms li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.terms a {
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  text-decoration: none;
}

.terms a:hover,
.terms a:focus-visible { color: var(--spot); }

.terms span {
  color: var(--faint-2);
  font-family: var(--mono);
  font-size: .75rem;
}

.post { max-width: 49rem; margin: 0 auto; padding: clamp(4rem, 9vw, 7rem) 0; }

.post-header { padding-bottom: 2.5rem; border-bottom: 1px solid var(--line-2); }

.post-header h1 { max-width: 13ch; font-size: clamp(2.75rem, 8vw, 5.75rem); }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.125rem;
  margin-top: 1.5rem;
}

.post-meta span { display: inline; }

.prose { color: var(--dim); font-size: 1.0625rem; }

.prose > :first-child { margin-top: 2.5rem; }
.prose p,
.prose ul,
.prose ol { max-width: 42rem; }
.prose a { color: var(--spot); text-decoration-thickness: 1px; text-underline-offset: .2em; }
.prose strong { color: var(--ink); }
.prose img {
  display: block;
  width: 100%;
  height: auto;
  margin: 2rem 0;
  border: 1px solid var(--line-2);
  background: var(--panel);
}
.prose blockquote {
  margin: 2rem 0;
  border-left: 2px solid var(--spot);
  padding: .25rem 0 .25rem 1.25rem;
  color: var(--ink);
}
.prose pre {
  overflow-x: auto;
  border: 1px solid var(--line-2);
  background: var(--panel);
  padding: 1rem 1.25rem;
  color: var(--ink);
}
.prose code { font-family: var(--mono); font-size: .9em; }
.prose :not(pre) > code { background: var(--mass); padding: .15em .35em; }

.not-found { min-height: 55vh; }
.not-found h1 { max-width: none; }
.not-found p:not(.kicker) { color: var(--dim); }

.button {
  display: inline-block;
  margin-top: 1rem;
  border: 1px solid var(--spot);
  padding: .65rem .9rem;
  color: var(--spot);
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}

.button:hover,
.button:focus-visible { background: var(--spot); color: var(--spot-ink); }

.empty { padding: 1.5rem 0; color: var(--faint-2); }

.site-footer {
  min-height: 4rem;
  justify-content: space-between;
  border-top: 1px solid var(--line-2);
  border-bottom: 0;
  color: var(--faint-2);
  font-family: var(--mono);
  font-size: .625rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

@media (max-width: 38rem) {
  .site-header { min-height: auto; padding-block: 1rem; align-items: flex-start; }
  .site-header nav { gap: .75rem; padding-top: .25rem; }
  .site-header nav a { font-size: .6rem; }
  .masthead::after { bottom: 1.5rem; font-size: 5rem; }
  .entry { grid-template-columns: 1fr; gap: .5rem; }
  .entry-meta { display: flex; gap: 1rem; }
  .entry-meta span { display: inline; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: .25rem; padding-block: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
