/* joshcooper.net — Ward, dark ground */

:root {
  --ink:    #171F1D;
  --text:   #E9EAE5;
  --grey:   #7E8884;
  --rule:   #2C3733;
  --teal:   #4E9E8B;
  --ochre:  #B07A17;
}

html { -webkit-text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.64;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

::selection { background: rgba(176, 122, 23, .42); }

p { margin: 0 0 1.25rem; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.shell { max-width: 52rem; margin: 0 auto; padding: 0 1.75rem; }

/* ---------- utility type ---------- */

.mono {
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ---------- marker stripe ---------- */

.mark {
  position: relative;
  display: inline-block;
  line-height: 1;
  vertical-align: baseline;
  isolation: isolate;
}

.mark::before {
  content: '';
  position: absolute;
  left: -.08em;
  right: -.16em;
  bottom: .09em;
  height: .42em;
  background: var(--ochre);
  opacity: .5;
  transform: skewX(-1.4deg) rotate(-.4deg);
  border-radius: 1px;
  z-index: -1;
}

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

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 2rem 0 1.1rem;
  border-bottom: 1px solid var(--rule);
}

.masthead__mark { color: var(--teal); text-decoration: none; }

.masthead__nav { display: flex; gap: 1.35rem; }

.masthead__nav a {
  color: var(--grey);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 140ms ease, border-color 140ms ease;
}

.masthead__nav a:hover { color: var(--text); border-bottom-color: var(--ochre); }
.masthead__nav a[aria-current="page"] { color: var(--text); }

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

.hero { padding: 6.5rem 0 6rem; }

.hero__eyebrow { color: var(--teal); margin: 0 0 1.6rem; }

.hero__name {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(2.75rem, 9vw, 5.25rem);
  line-height: .92;
  letter-spacing: -.035em;
  margin: 0 0 2.9rem;
}

.hero__body { max-width: 34rem; }
.hero__body p { margin-bottom: 1.35rem; }

/* ---------- about ---------- */

.band { padding: 4rem 0 3.5rem; }

.band__title { color: var(--grey); margin: 0 0 3.25rem; }

.row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 34rem);
  gap: 2.5rem;
  align-items: start;
}

.row + .row {
  margin-top: 3.5rem;
  padding-top: 3.5rem;
  border-top: 1px solid var(--rule);
}

.row__label {
  margin: 0;
  padding-top: .5rem;
  display: flex;
  gap: .6rem;
}

.row__label .num { color: var(--grey); }
.row__label .name { color: var(--teal); }

/* ---------- roles ---------- */

.role + .role {
  margin-top: 2.75rem;
  padding-top: 2.75rem;
  border-top: 1px solid var(--rule);
}

.role__title {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.3125rem;
  line-height: 1.26;
  letter-spacing: -.012em;
  margin: 0 0 .45rem;
}

.role__org { color: var(--teal); }

.role__dates { color: var(--grey); margin: 0 0 1.15rem; }

/* ---------- colophon ---------- */

.colophon {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0 4rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.colophon__links { display: flex; gap: 1.35rem; flex-wrap: wrap; }

.colophon__links a {
  text-decoration: none;
  color: var(--text);
  padding-bottom: 3px;
  border-bottom: 1px solid var(--rule);
  transition: border-color 140ms ease;
}

.colophon__links a:hover { border-bottom-color: var(--ochre); }

.colophon__note { color: var(--grey); }

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

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

.rise { animation: rise 620ms cubic-bezier(.2, .65, .3, 1) both; }
.rise--1 { animation-delay:  60ms; }
.rise--2 { animation-delay: 160ms; }
.rise--3 { animation-delay: 270ms; }

/* ---------- narrow ---------- */

@media (max-width: 46rem) {
  body { font-size: 1.0625rem; }
  .row { grid-template-columns: 1fr; gap: .75rem; }
  .row__label { padding-top: 0; }
  .hero { padding: 3.75rem 0 3.25rem; }
  .band { padding: 2.75rem 0; }
  .colophon { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; opacity: 1; transform: none; }
  * { transition-duration: .01ms !important; }
}
