/* Pevnor site styles: dark charcoal with warm copper accents.
   The header pairs the approved orange mark with the text wordmark. */
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../vendor/ibm-plex-mono-2.5.0/IBMPlexMono-Bold-Latin1.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #1b1c1e;          /* dark charcoal */
  --surface: #25272a;     /* raised charcoal */
  --border: #3a3d41;
  --fg: #ecebe8;          /* body text */
  --muted: #b9b6b0;       /* secondary text */
  --accent: #e0a47a;      /* warm copper, text and focus */
  --accent-strong: #c87f4f; /* deeper copper, rules and markers */
  --preview-width: 72rem;
  --page-gutter: 1.25rem;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--fg);
}

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.skip-link:focus {
  top: 1rem;
}

.site-header,
main,
.site-footer {
  /* Align the page content with the preview's outer border. */
  width: min(calc(100% - 2 * var(--page-gutter)), calc(var(--preview-width) + 2px));
  margin: 0 auto;
}

.site-header {
  padding-top: 1.25rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--border);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav ul a {
  display: inline-block;
  padding: 0.375rem 0 0.125rem;
}

.site-name {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 3rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

/* The mark keeps its own aspect ratio from the width/height attributes. */
.site-mark {
  width: auto;
  height: 2.5rem;
}

section {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 1rem;
}

section:last-child {
  border-bottom: 0;
}

.status {
  display: inline-block;
  margin: 0;
  padding: 0.15rem 0.75rem;
  border: 1px solid var(--accent-strong);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.9rem;
}

.status-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

h1,
h2,
h3 {
  line-height: 1.25;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.125rem;
  margin: 0 0 0.25rem;
  color: var(--accent);
}

.tagline {
  margin: 1rem 0 1.5rem;
  font-size: clamp(1.25rem, 3.5vw, 1.5rem);
  font-weight: 400;
  color: var(--muted);
}

.thesis {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-left: 4px solid var(--accent-strong);
}

.thesis p {
  margin: 0;
  font-size: 1.15rem;
}

.principles {
  margin: 0;
  padding-left: 1.5rem;
}

.principles li {
  margin-bottom: 1.25rem;
}

.principles li::marker,
.workflow li::marker {
  color: var(--accent);
  font-weight: 700;
}

.principles p {
  margin: 0;
}

.workflow {
  padding-left: 1.75rem;
}

.workflow li {
  margin-bottom: 0.5rem;
}

/* The required development-status label is long; keep it compact. */
.preview-title {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
}

/* The preview is a plain image: nothing inside it is interactive. */
.preview {
  margin: 0;
}

/* Keep the preview legible on narrow screens with a focusable scroll frame. */
.preview-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.preview-scroll:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.preview-scroll img {
  display: block;
  width: var(--preview-width);
  max-width: none;
  height: auto;
}

.preview figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer p {
  margin: 0;
}

/* Entry index and article pages. */
.entries h1,
.article-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
}

.entries-intro {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.entries-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.entries-item {
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
}

.entries-item h2 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.25rem, 3.5vw, 1.5rem);
}

.entries-item p {
  margin: 0.25rem 0 0;
}

.entry-date {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.article {
  padding: 2.5rem 0;
}

.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.article-section {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
}

.article-body h2 {
  margin-top: 2rem;
}

.article-body pre {
  overflow-x: auto;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.article-body code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9375em;
}

.article-body blockquote {
  margin: 1.5rem 0;
  padding: 0.5rem 1.25rem;
  background: var(--surface);
  border-left: 4px solid var(--accent-strong);
}

.article-body img {
  max-width: 100%;
  height: auto;
}

.site-nav a[aria-current="page"] {
  color: var(--fg);
  text-decoration-thickness: 2px;
}
