/**
 * styles.css
 *
 * Purpose: Main stylesheet for samuelpollock.com
 * This file contains all CSS styling extracted from index.html for better
 * maintainability and potential reuse across multiple pages.
 *
 * Design System: "Actuarial Ledger" theme
 * - Fonts: Spectral (display), Work Sans (body), IBM Plex Mono (data/code)
 * - Color palette: Dark ink-navy background with warm parchment text
 * - Visual motif: Print report/audit stamp aesthetic
 */

:root {
  /* ---- Color tokens ---- */
  --ink:        #10151c;   /* page background — deep ink-navy, not pure black */
  --paper:      #ede9de;   /* primary text — warm parchment off-white */
  --paper-dim:  #8b93a1;   /* secondary/muted text */
  --brass:      #c9a227;   /* primary accent — ledger stamp / seal color */
  --teal:       #4fa39a;   /* secondary accent — links, live/active state */
  --rule:       #2a323c;   /* hairline dividers on the dark background */
  --card:       #161d26;   /* slightly-raised panel background */

  /* ---- Spacing scale (keeps rhythm consistent site-wide) ---- */
  --gap-xs: 0.5rem;
  --gap-sm: 1rem;
  --gap-md: 2rem;
  --gap-lg: 4rem;
  --gap-xl: 7rem;

  /* ---- Type scale ---- */
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.75rem;
  --step-3: 2.75rem;
  --step-4: 4rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Work Sans', sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Respect users who've asked for reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

h1, h2, h3 {
  font-family: 'Spectral', serif;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

a { color: var(--teal); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }

/* Visible keyboard focus everywhere — accessibility floor */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 var(--gap-md);
}

/* ============ HERO ============ */
.hero {
  padding: var(--gap-xl) 0 var(--gap-lg);
  border-bottom: 1px solid var(--rule);
}

/* The "audit stamp" — a small rotated monogram badge,
   evoking a certified/reviewed stamp on an actuarial report.
   This is the page's signature element: it reappears (unrotated,
   smaller) as a favicon-style mark in the footer to bookend the page. */
.stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1.5px solid var(--brass);
  border-radius: 4px;
  color: var(--brass);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transform: rotate(-4deg);
  margin-bottom: var(--gap-md);
}

.hero h1 {
  font-size: var(--step-4);
  color: var(--paper);
}

.hero .role {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--teal);
  font-size: var(--step-1);
  margin-top: var(--gap-xs);
}

.hero .lede {
  max-width: 58ch;
  color: var(--paper-dim);
  font-size: var(--step-1);
  margin-top: var(--gap-md);
}

/* ---- Ledger fact row: the recurring "exhibit table" device ----
   Used here in the hero, and again in Experience/Projects,
   so the tabular-number styling becomes a visual through-line
   rather than a one-off decoration. */
.ledger {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--gap-sm);
  margin-top: var(--gap-lg);
  border-top: 1px solid var(--rule);
  padding-top: var(--gap-sm);
}

.ledger dt {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.5rem;
  color: var(--brass);
  font-variant-numeric: tabular-nums;
}

.ledger dd {
  margin: 0;
  font-size: 0.85rem;
  color: var(--paper-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cta-row {
  display: flex;
  gap: var(--gap-sm);
  margin-top: var(--gap-lg);
  flex-wrap: wrap;
}

.btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  padding: 0.75rem 1.25rem;
  border-radius: 3px;
  border: 1px solid var(--brass);
}

.btn.primary {
  background: var(--brass);
  color: var(--ink);
}
.btn.primary:hover { background: #dcb43a; text-decoration: none; }

.btn.secondary {
  color: var(--paper);
  border-color: var(--rule);
}
.btn.secondary:hover { border-color: var(--teal); color: var(--teal); text-decoration: none; }

/* ============ SECTIONS ============ */
section { padding: var(--gap-lg) 0; border-bottom: 1px solid var(--rule); }
section:last-of-type { border-bottom: none; }

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--gap-sm);
}

section h2 { font-size: var(--step-3); margin-bottom: var(--gap-md); }

.bio p { max-width: 62ch; color: var(--paper); }

/* ---- Experience: styled as ledger line-items, since a career
   timeline is a genuine sequence — numbering/ordering here
   carries real information, not decoration. ---- */
.entry {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: var(--gap-md);
  padding: var(--gap-sm) 0;
  border-top: 1px solid var(--rule);
}
.entry:first-of-type { border-top: none; }

.entry .period {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--brass);
  font-size: 0.85rem;
  padding-top: 0.2rem;
}

.entry h3 { font-size: var(--step-1); color: var(--paper); }
.entry .org { color: var(--teal); font-size: 0.95rem; margin-top: 0.2rem; }
.entry p { color: var(--paper-dim); margin-top: var(--gap-xs); max-width: 55ch; font-size: 0.95rem; }

/* ---- Projects: card grid for demos. Each card has a status
   tag so visitors know what's live vs. in progress — an
   empty/unfinished demo should say so, not silently 404. ---- */
.projects-grid {
  display: grid;
  gap: var(--gap-md);
}

.project-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: var(--gap-md);
}

.project-card h3 { font-size: var(--step-1); margin-bottom: var(--gap-xs); }

.status {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  margin-bottom: var(--gap-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status.building { background: rgba(201,162,39,0.15); color: var(--brass); }
.status.live     { background: rgba(79,163,154,0.15); color: var(--teal); }

.project-card p { color: var(--paper-dim); font-size: 0.95rem; max-width: 55ch; }
.project-card .demo-link { display: inline-block; margin-top: var(--gap-sm); font-family: 'IBM Plex Mono', monospace; font-size: 0.85rem; }

/* ============ CONTACT / FOOTER ============ */
footer {
  padding: var(--gap-lg) 0 var(--gap-md);
  text-align: center;
}

footer .stamp { transform: rotate(0deg); width: 40px; height: 40px; font-size: 0.7rem; margin-bottom: var(--gap-md); }

footer p { color: var(--paper-dim); font-size: 0.85rem; margin-top: var(--gap-md); }

/* ---- Mobile: collapse the two-column entry grid, tighten spacing ---- */
@media (max-width: 600px) {
  :root {
    --gap-xl: 4rem;
    --gap-lg: 2.5rem;
    --step-4: 2.75rem;
    --step-3: 2rem;
  }
  .entry { grid-template-columns: 1fr; gap: var(--gap-xs); }
  .entry .period { padding-top: 0; }
}
