/* The site's spec-sheet design language, shared by the homepage and /cv:
   solid #00f, hard white rules, a numbered label column, Oswald for display
   and Hack mono for everything else, paragraphs included.
   Yellow is kept for the bolt, section numbers and small marks. */

@font-face {
  font-family: 'Oswald';
  src: url('../fonts/oswald-latin.woff2') format('woff2');
  font-weight: 200 700;
  font-display: swap;
}

@font-face {
  font-family: 'Hack';
  src: url('../fonts/hack-regular-subset.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Hack';
  src: url('../fonts/hack-bold-subset.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --blue: #00f;
  --ink: #fff;
  --dim: rgba(255, 255, 255, 0.72);
  --hi: #fe0;
  --rule: 2px solid var(--ink);
  --hair: 1px solid var(--ink);
  --gut: 16px;
  --label: 0px;
  --display: 'Oswald', 'Arial Narrow', sans-serif;
  --mono: 'Hack', ui-monospace, 'SF Mono', Menlo, monospace;
}

@media (min-width: 760px) {
  :root {
    --gut: 32px;
    --label: 220px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--blue);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font: 15px/1.65 var(--mono);
}

::selection {
  background: var(--hi);
  color: #000;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
  background: var(--ink);
  color: var(--blue);
  text-decoration: none;
  outline: none;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

.bolt {
  display: inline-block;
  width: 0.5em;
  height: 0.67em;
  fill: var(--hi);
}

/* top and bottom strips: mono, ruled, edge to edge */

/* the strips sit above the masthead: at display sizes the name's text box
   reaches up past its tight line-height and would otherwise take the clicks */
.bar {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  padding: 10px var(--gut);
  border-bottom: var(--rule);
  font: 700 12px/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bar a {
  text-decoration-thickness: 1px;
}

.bar-end {
  margin-left: auto;
}

.bar-foot {
  border-top: var(--rule);
  border-bottom: 0;
  margin-top: -2px;
}

/* masthead: the name as big as it will go */

.masthead {
  padding: 24px var(--gut) 32px;
  border-bottom: var(--rule);
}

h1 {
  font: 700 clamp(72px, 25vw, 220px) / 0.84 var(--display);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-left: -0.04em;
}

h1 .bolt {
  margin: 0 0.04em 0 0.06em;
  vertical-align: -0.02em;
}

.lede {
  max-width: 38em;
  margin-top: 28px;
  font-size: clamp(16px, 1.9vw, 20px);
  line-height: 1.5;
}

@media (min-width: 760px) {
  .lede {
    margin-left: calc(var(--label) + var(--gut));
  }
}

/* sections: a label column and a content column, ruled between */

.block {
  display: grid;
  grid-template-columns: 1fr;
  border-bottom: var(--rule);
}

@media (min-width: 760px) {
  .block {
    grid-template-columns: var(--label) 1fr;
  }
}

.label {
  padding: 14px var(--gut);
  font: 700 13px/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: var(--hair);
}

.label span {
  color: var(--hi);
  margin-right: 0.6em;
}

@media (min-width: 760px) {
  .label {
    position: sticky;
    top: 0;
    align-self: start;
    border-bottom: 0;
  }

  .block > :last-child {
    border-left: var(--rule);
  }
}

@media print {
  :root {
    --ink: #000;
    --dim: #333;
    --hi: #000;
    --blue: #fff;
  }

  body {
    font-size: 9.5pt;
  }

  .bar {
    display: none;
  }

  h1 {
    font-size: 54pt;
  }
}
