/* derekroga.space — shared stylesheet.
   Design system: files/design-system.md (22 Nov 2026).
   Static HTML/CSS only, no JavaScript. Mobile-first. */

:root {
  /* Light (default) */
  --bg:            #FAFAF7;
  --surface:       #FFFFFF;
  --surface-muted: #F1F0EB;
  --text:          #111318;
  --muted:         #5C6470;
  --faint:         #8A919C;
  --border:        #E4E3DC;
  --border-strong: #D2D1C8;
  --accent:        #2440F5;
  --accent-hover:  #1B32C4;
  --accent-soft:   #E9ECFF;
  --on-accent:     #FFFFFF;
  --ink:           #111318;
  --on-ink:        #FAFAF7;
  --success:       #157347;
  --warning:       #B45309;
  --danger:        #B91C1C;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(17, 19, 24, 0.06);
  --shadow-md: 0 8px 24px rgba(17, 19, 24, 0.08);
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --space-9: 96px; --space-10: 128px;
  --font-display: 'Space Grotesk', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 900px) {
  html { font-size: 17px; }
}

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

/* Body links are always underlined; nav and buttons are not. */
main p a, main li a, .prose a { text-decoration: underline; text-underline-offset: 2px; }

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

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

/* ---------- layout ---------- */

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 24px;
}
.wrap-narrow {
  max-width: 720px;
  margin-inline: auto;
  padding-inline: 24px;
}
@media (max-width: 640px) {
  .wrap, .wrap-narrow { padding-inline: 16px; }
}

main { padding: 0 0 4rem; }

section { padding-top: 2.5rem; }
section:first-child { padding-top: 2.5rem; }

/* ---------- headings / type ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
  color: var(--text);
}
h1 { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: 2rem; font-weight: 600; margin-top: 2.75rem; }
h3 { font-size: 1.25rem; font-weight: 600; margin-top: 1.75rem; }
h4 { font-size: 1.05rem; font-weight: 600; margin-top: 1.5rem; }
p { margin: 0 0 1rem; }
p, li { max-width: 68ch; }
ul, ol { margin: 0 0 1rem; padding-left: 1.4rem; }
li { margin-bottom: 0.35rem; }

.lede, .lead {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--muted);
}
.subhead { font-size: 1.25rem; color: var(--muted); margin-top: -0.25rem; }

.kicker, .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* ---------- header / nav ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  min-height: 64px;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.site-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.site-name:hover { color: var(--text); text-decoration: none; }
.site-name .tld { color: var(--muted); font-family: var(--font-mono); font-size: 0.85rem; font-weight: 400; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}
.site-nav a {
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.25rem 0;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom: 2px solid var(--accent);
}
.site-nav a.cross-link {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

/* ---------- breadcrumb ---------- */

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  padding-top: 1.5rem;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumb span[aria-current="page"] { color: var(--text); }

/* ---------- hero ---------- */

.hero { padding: 4rem 0 1rem; }
.hero h1 { margin-bottom: 1rem; }
.hero h1 .accent-underline {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}
.hero .lede { max-width: 62ch; }
.hero-meta {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 1.5rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1fr 340px; }
}
.hero-photo {
  width: 100%;
  max-width: 340px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: block;
}
.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}
.portrait {
  max-width: 320px;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: block;
  margin: 0 0 1rem;
}
figure { margin: 0 0 1.5rem; }
figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: #000; color: var(--on-ink); text-decoration: none; }
.btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-secondary:hover {
  border-color: var(--text);
  background: var(--surface-muted);
  color: var(--text);
  text-decoration: none;
}

/* ---------- cards / grids ---------- */

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.card h2, .card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card.featured { background: var(--surface); }
.card.featured-wide { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .card.featured-wide .split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--surface-muted);
  color: var(--muted);
  border-radius: 6px;
  padding: 5px 9px;
  margin: 0 0.35rem 0.35rem 0;
}

/* ---------- lists ---------- */

ul.plain { list-style: none; margin: 0 0 1rem; padding: 0; }
ul.plain li { padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
ul.plain li:last-child { border-bottom: 0; }

ul.features { margin: 0 0 1rem; padding-left: 1.25rem; }
ul.features li { margin-bottom: 0.3rem; }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li {
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
}
.post-list li:last-child { border-bottom: 1px solid var(--border); }
.post-list h3 { margin: 0 0 0.25rem; }
.post-meta {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--faint);
  margin: 0 0 0.4rem;
}
.post-list p { margin-bottom: 0; color: var(--muted); }
.post-list a { text-decoration: none; }
.post-list a:hover { text-decoration: underline; }

/* Numbered steps */
.steps { list-style: none; counter-reset: step; margin: 0 0 1.5rem; padding: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1rem 2.75rem;
  max-width: 68ch;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps li strong { display: block; margin-bottom: 0.15rem; }

/* ---------- callouts / diagrams / tables ---------- */

.callout {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout-plain {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.callout-plain p:last-child { margin-bottom: 0; }

.diagram {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin: 1.5rem 0;
  text-align: center;
}
.diagram svg { max-width: 100%; height: auto; }
.diagram figcaption { text-align: left; }

.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--surface);
}
th, td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--surface-muted);
}
tr:last-child td { border-bottom: 0; }

/* ---------- code ---------- */

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-muted);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
pre {
  background: #171A1F;
  color: #F2F3F0;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 1.25rem 0;
}
pre code { background: transparent; padding: 0; color: inherit; }

/* ---------- profiles ---------- */

.profiles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.profiles a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
}
.profiles a:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
  text-decoration: none;
}

/* ---------- section headers ---------- */

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
.section-head h2 { margin-top: 0; }
.section-head a { font-size: 0.95rem; white-space: nowrap; }

/* ---------- dark section / CTA band ---------- */

.section-dark {
  --bg:            #0E1013;
  --surface:       #171A1F;
  --surface-muted: #1F232A;
  --text:          #F2F3F0;
  --muted:         #9BA3AF;
  --faint:         #6B7280;
  --border:        #262A31;
  --border-strong: #3A4049;
  --accent:        #8FA0FF;
  --accent-hover:  #A9B6FF;
  --accent-soft:   #232742;
  --on-accent:     #0E1013;
  --ink:           #F2F3F0;
  --on-ink:        #0E1013;
  background: var(--bg);
  color: var(--text);
}
.cta-band {
  margin-top: 3.5rem;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}
.cta-band h2 { margin-top: 0; }
.cta-band p:last-of-type { margin-bottom: 1.25rem; }

/* ---------- footer ---------- */

.site-footer {
  background: #0E1013;
  color: #F2F3F0;
  padding: 4rem 0 2.5rem;
  font-size: 0.9rem;
}
.site-footer .footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
}
@media (min-width: 900px) {
  .site-footer .footer-top { grid-template-columns: 1.5fr 1fr 1fr; }
}
.site-footer .wordmark {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: #F2F3F0;
}
.site-footer .footer-pitch { color: #9BA3AF; max-width: 40ch; }
.site-footer h3 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6B7280;
  margin: 0 0 0.75rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer a { color: #C7CCD6; text-decoration: none; }
.site-footer a:hover { color: #FFFFFF; text-decoration: underline; }
.site-footer .footer-bottom {
  border-top: 1px solid #262A31;
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: #6B7280;
}
.site-footer .footer-bottom p { margin: 0; }

/* ---------- related links ---------- */

.related {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}
.related h2 { font-size: 1.25rem; margin-top: 0; }

/* ---------- small screens ---------- */

@media (max-width: 640px) {
  h2 { font-size: 1.75rem; }
  .hero { padding: 2.5rem 0 0.5rem; }
  .site-header .wrap { flex-direction: column; gap: 0.5rem; }
  .cta-band { padding: 1.75rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* ---------- logo ---------- */

.site-name { display: inline-flex; align-items: center; }
.site-logo { height: 2rem; width: auto; display: block; }
.site-header .wrap { align-items: center; }
.site-footer .wordmark { display: flex; align-items: center; gap: 0.6rem; }
.footer-mark { width: 2rem; height: 2rem; flex: none; }

/* ---------- mentions page ---------- */

.mention-jump { font-size: 0.9375rem; color: var(--muted); }
.mention-list { list-style: none; margin: 0; padding: 0; }
.mention-row { padding: 1rem 0; border-top: 1px solid var(--border); }
.mention-row:last-child { border-bottom: 1px solid var(--border); }
.mention-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.mention-domain { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--muted); margin-left: 0.5rem; }
.mention-desc { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.95rem; }
.mention-second { font-size: 0.875rem; margin-left: 0.75rem; }
.mention-count { font-family: var(--font-mono); font-size: 0.875rem; font-weight: 400; color: var(--muted); }

/* ---------- testimonials ---------- */

.testimonial { display: flex; flex-direction: column; margin-bottom: 0; }
.testimonial blockquote { margin: 0 0 1.25rem; flex: 1; }
.testimonial blockquote p { margin: 0; font-size: 1rem; }
.testimonial figcaption {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: auto;
}
.testimonial figcaption strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
}
.testimonial figcaption span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--muted);
}
