/* =========================================================================
   kevinpedeaux.com — styles.css
   Brand: builder-operator. Mono + serif italic. Ink on cream, terracotta accent.
   Single source of truth for /index.html and /links/index.html
   ========================================================================= */

/* ── RESET ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; cursor: pointer; }

/* ── TOKENS ─────────────────────────────────────────────────────────────── */
:root {
  /* Color */
  --ink:       #0E0F0D;
  --ink-2:     #5A5751;
  --ink-3:     #8A867D;
  --cream:     #F5F1E8;
  --cream-2:   #EDE7D8;
  --rule:      #D9D3C5;
  --accent:    #B8523E;   /* terracotta — hover, underlines, marks */
  --accent-2:  #8E3D2D;

  /* Type */
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --font-serif:   'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-sans:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Spacing — 8-grid */
  --s-1:   8px;
  --s-2:  16px;
  --s-3:  24px;
  --s-4:  32px;
  --s-5:  48px;
  --s-6:  64px;
  --s-7:  96px;

  /* Layout */
  --max-w: 560px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── BASE ───────────────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  padding: var(--s-5) var(--s-3);
  display: flex;
  flex-direction: column;
}

::selection { background: var(--accent); color: var(--cream); }

/* Subtle grain texture (CSS-only, no asset) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  background-image:
    radial-gradient(circle at 15% 30%, rgba(14,15,13,0.025) 1px, transparent 1px),
    radial-gradient(circle at 70% 65%, rgba(14,15,13,0.02) 1px, transparent 1px);
  background-size: 8px 8px, 11px 11px;
}

/* ── LAYOUT ─────────────────────────────────────────────────────────────── */
.page {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ── HEADER ─────────────────────────────────────────────────────────────── */
.header {
  padding-top: var(--s-3);
  margin-bottom: var(--s-6);
}

.name {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(20px, 2.4vw, 22px);
  letter-spacing: -0.01em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
}

.name-mark {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--accent);
  margin-right: 4px;
  transform: translateY(-1px);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ── HERO COPY ──────────────────────────────────────────────────────────── */
.hero {
  margin-bottom: var(--s-6);
}

.hero-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 4.5vw, 36px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-top: var(--s-3);
  margin-bottom: var(--s-3);
  max-width: 28ch;
}

.hero-tagline em {
  font-style: italic;
  color: var(--accent);
  font-family: var(--font-serif);
}

.hero-sub {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 52ch;
}

/* ── SECTION HEADINGS ───────────────────────────────────────────────────── */
.section {
  margin-bottom: var(--s-6);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: var(--s-2);
  margin-bottom: var(--s-2);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.section-label-count {
  color: var(--ink-3);
  font-size: 10px;
  letter-spacing: 0.08em;
}

/* ── LINK CARDS ─────────────────────────────────────────────────────────── */
.links {
  display: flex;
  flex-direction: column;
}

.link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--rule);
  transition: padding-left 200ms var(--ease-out);
  position: relative;
}

.link:hover,
.link:focus-visible {
  outline: none;
  padding-left: var(--s-2);
}

.link:hover .link-title,
.link:focus-visible .link-title {
  color: var(--accent);
}

.link:hover .link-arrow,
.link:focus-visible .link-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

.link-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.link-title {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.005em;
  transition: color 200ms var(--ease-out);
}

.link-desc {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
}

.link-arrow {
  font-family: var(--font-mono);
  color: var(--ink-3);
  font-size: 14px;
  transition: color 200ms var(--ease-out), transform 200ms var(--ease-out);
  flex-shrink: 0;
}

/* External link domain hint */
.link-domain {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

/* ── FOOTER ─────────────────────────────────────────────────────────────── */
.footer {
  margin-top: auto;
  padding-top: var(--s-5);
  padding-bottom: var(--s-2);
  border-top: 1px solid var(--rule);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  flex-wrap: wrap;
}

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

.footer-meta {
  display: flex;
  gap: var(--s-3);
  align-items: baseline;
}

.dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  background: var(--ink-3);
  border-radius: 50%;
  margin: 0 var(--s-1);
  transform: translateY(-2px);
}

/* ── COMING SOON SPECIFIC ───────────────────────────────────────────────── */
.coming-soon .hero {
  margin-bottom: var(--s-5);
}

.coming-soon .status-row {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: 6px 10px;
  background: var(--cream-2);
  border: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: var(--s-4);
}

.status-row .pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2.4s var(--ease-out) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50%      { opacity: 1;   transform: scale(1.1); }
}

/* ── 404 ────────────────────────────────────────────────────────────────── */
.notfound {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  text-align: left;
}
.notfound .code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  margin-bottom: var(--s-2);
}

/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  body { padding: var(--s-3) var(--s-3); }
  .header { margin-bottom: var(--s-5); }
  .hero { margin-bottom: var(--s-5); }
  .section { margin-bottom: var(--s-5); }
}

/* ── REDUCED MOTION ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── PRINT ──────────────────────────────────────────────────────────────── */
@media print {
  body::before { display: none; }
  .link { break-inside: avoid; }
}
