/* ---------------------------------------------------------------------------
   rosscooperman.com — Claude-written CSS, no build step.
   Type: Archivo (display, variable width/weight) + Newsreader (body, serif).
   --------------------------------------------------------------------------- */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: block;
}

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-italic-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

/* ------------------------------------------------------------------ tokens */

:root {
  --paper: #faf9f6;
  --ink: #1a181d;
  --muted: #6b6773;
  --accent: #9e1b32; /* garnet — a nod to two decades of Ruby */
  --rule: #e6e3db;

  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141316;
    --ink: #e9e7e2;
    --muted: #a39fab;
    --accent: #e15b72;
    --rule: #2c2a30;
  }
}

:root[data-theme="light"] {
  --paper: #faf9f6;
  --ink: #1a181d;
  --muted: #6b6773;
  --accent: #9e1b32;
  --rule: #e6e3db;
}

:root[data-theme="dark"] {
  --paper: #141316;
  --ink: #e9e7e2;
  --muted: #a39fab;
  --accent: #e15b72;
  --rule: #2c2a30;
}

/* ------------------------------------------------------------------- base */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: light dark;
}

body {
  background: var(--paper);
  color: var(--ink);
  overflow-x: clip;
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: 46rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2rem);
}

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

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

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  transition: text-decoration-color 140ms ease;
}

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

.skip {
  position: absolute;
  left: -100vw;
  top: 0;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.85rem;
  padding: 0.5rem 0.9rem;
}

.skip:focus {
  left: 0;
}

em {
  font-style: italic;
}

/* --------------------------------------------------------------- masthead */

.masthead {
  padding-top: clamp(3.5rem, 11vh, 6.5rem);
}

.folio {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.75rem;
}

.name {
  font-family: var(--sans);
  font-weight: 800;
  font-stretch: 74%;
  font-size: clamp(3.3rem, 15vw, 7.85rem);
  line-height: 0.92;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  margin-top: 1.4rem;
}

.thesis {
  font-size: clamp(1.22rem, 2.4vw, 1.45rem);
  line-height: 1.5;
  max-width: 40ch;
  margin-top: 1.75rem;
  text-wrap: pretty;
}

.thesis em {
  color: var(--accent);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.75rem;
  margin-top: 2.25rem;
}

.links a {
  font-family: var(--sans);
  font-weight: 640;
  font-size: 0.82rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

/* --------------------------------------------------------------- sections */

section {
  margin-top: clamp(4rem, 9vh, 5.75rem);
}

.eyebrow {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.about p {
  max-width: 62ch;
}

.about p + p {
  margin-top: 1.1em;
}

/* --------------------------------------------------- experience (ledger) */

.role {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  column-gap: 2rem;
  padding-block: 1.7rem;
  border-top: 1px solid var(--rule);
}

.role:last-of-type {
  border-bottom: 1px solid var(--rule);
}

.rail {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  line-height: 1.7;
  padding-top: 0.35rem;
}

.rail .dates {
  color: var(--muted);
}

.rail .team {
  color: var(--accent);
}

.role h3 {
  font-family: var(--sans);
  font-weight: 680;
  font-size: 1.08rem;
  letter-spacing: 0.005em;
  line-height: 1.35;
}

.role h3 .title {
  color: var(--muted);
  font-weight: 480;
}

.role .lede {
  margin-top: 0.55rem;
}

.role ul {
  list-style: none;
  margin-top: 0.8rem;
  display: grid;
  gap: 0.55rem;
}

.role li {
  padding-left: 1.35rem;
  position: relative;
  font-size: 0.99rem;
  line-height: 1.6;
}

.role li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.earlier {
  margin-top: 1.6rem;
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 60ch;
}

/* ---------------------------------------------------------------- toolbox */

.toolbox dl {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  column-gap: 2rem;
  row-gap: 1rem;
}

.toolbox dt {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding-top: 0.2rem;
}

.toolbox dd {
  font-family: var(--sans);
  font-weight: 480;
  font-size: 0.92rem;
  line-height: 1.8;
}

.toolbox dd .sep {
  color: var(--accent);
  padding-inline: 0.45rem;
}

/* ---------------------------------------------------------------- contact */

.contact .reach {
  font-size: clamp(1.2rem, 2.2vw, 1.4rem);
  line-height: 1.5;
  max-width: 40ch;
}

.contact .also {
  margin-top: 0.9rem;
  color: var(--muted);
  max-width: 52ch;
}

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

footer {
  margin-top: clamp(4rem, 9vh, 5.75rem);
  border-top: 1px solid var(--rule);
  padding-block: 1.4rem 2.5rem;
}

footer p {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  justify-content: space-between;
}

footer a {
  color: var(--muted);
}

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

/* ----------------------------------------------------------------- motion */

@media (prefers-reduced-motion: no-preference) {
  .masthead > *,
  main,
  footer {
    opacity: 0;
    animation: rise 650ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  }

  .folio { animation-delay: 60ms; }
  .name { animation-delay: 130ms; }
  .thesis { animation-delay: 220ms; }
  .links { animation-delay: 310ms; }
  main { animation-delay: 430ms; }
  footer { animation-delay: 430ms; }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 40rem) {
  .role,
  .toolbox dl {
    grid-template-columns: 1fr;
  }

  .rail {
    display: flex;
    gap: 1.25rem;
    padding-top: 0;
    margin-bottom: 0.6rem;
  }

  .toolbox dt {
    padding-top: 0;
    margin-bottom: 0.2rem;
  }

  .toolbox dd + dt {
    margin-top: 0.4rem;
  }

  .folio {
    flex-direction: column;
    gap: 0.25rem;
  }
}
