/* ==========================================================================
   williamjruss.com — quiet editorial one-pager
   Newsreader (text) + IBM Plex Mono (labels), warm paper, one oxide accent.
   ========================================================================== */

:root {
  --paper: #faf7f2;
  --ink: #211d18;
  --ink-soft: #575046;
  --accent: #9c3a16;
  --rule: #e2dbd0;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", "Consolas", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #181512;
    --ink: #ece5da;
    --ink-soft: #a89e90;
    --accent: #e88d5f;
    --rule: #332e28;
  }
}

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

html {
  color-scheme: light dark;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding: clamp(2.5rem, 8vw, 6rem) clamp(1.25rem, 6vw, 3rem);
}

main,
footer {
  max-width: 41rem;
  margin-inline: auto;
}

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

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

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

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

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

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

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.75rem;
}

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

h1 {
  font-size: clamp(2.75rem, 9vw, 4.25rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin-bottom: 0.6rem;
}

.role {
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-soft);
}

.headshot {
  width: clamp(6.5rem, 18vw, 9rem);
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--rule);
  box-shadow: 0.5rem 0.5rem 0 0 color-mix(in srgb, var(--accent) 14%, transparent);
  flex-shrink: 0;
}

/* ---- intro ---- */

.lede {
  font-size: clamp(1.35rem, 4vw, 1.6rem);
  line-height: 1.4;
  font-weight: 500;
  margin-bottom: 1.1rem;
  text-wrap: balance;
}

.intro > p + p {
  margin-bottom: 1.75rem;
}

/* ---- link rows ---- */

.link-row {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.75rem;
  row-gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.85rem;
}

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

section {
  margin-bottom: 3.25rem;
}

h2 {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
  padding-top: 1.1rem;
  margin-bottom: 1.75rem;
}

.section-num {
  color: var(--accent);
  margin-right: 1rem;
}

/* ---- work list ---- */

.work-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1.9rem;
}

.work-list h3 {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.3rem;
}

.work-list h3 a {
  color: inherit;
}

.work-list p {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

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

footer {
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  align-items: baseline;
}

.copyright {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ---- entrance (reduced-motion aware) ---- */

@media (prefers-reduced-motion: no-preference) {
  .hero,
  main > section,
  footer {
    animation: rise 600ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }
  main > section:nth-of-type(1) { animation-delay: 90ms; }
  main > section:nth-of-type(2) { animation-delay: 180ms; }
  main > section:nth-of-type(3) { animation-delay: 270ms; }
  footer { animation-delay: 340ms; }
}

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

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

@media (max-width: 34rem) {
  .hero {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 1.5rem;
  }
}
