@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --paper: #faf6ef;
  --paper-2: #f2ebdf;
  --ink: #1f1b17;
  --ink-2: #5c544b;
  --ink-3: #8a8178;
  --rule: #e2d8c8;
  --accent: #b4531f;
  --accent-soft: #f4dcc9;
  --b1: #4f7a4a; --b2: #3f6f8f; --b3: #00add8; --b4: #8a5aa8; --b5: #c9822b; --b6: #b4531f;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1a1714;
    --paper-2: #24201b;
    --ink: #f1ebe2;
    --ink-2: #bdb3a6;
    --ink-3: #8f8579;
    --rule: #3a332b;
    --accent: #ec8a52;
    --accent-soft: #4a2c1b;
    --b1: #7fb276; --b2: #79a9cc; --b3: #4fcbe8; --b4: #bb92d6; --b5: #e3a75a; --b6: #ec8a52;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 44rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 40rem) { .wrap { padding: 0 1.5rem; } }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* Header */
.masthead { display: flex; justify-content: space-between; align-items: baseline; padding-top: 1.5rem; padding-bottom: 1.5rem; }
.wordmark { font: 600 1.05rem var(--display); color: var(--ink); text-decoration: none; font-variation-settings: "SOFT" 100, "WONK" 1; }
.wordmark span { color: var(--accent); }
nav { display: flex; gap: 1.25rem; font-size: .95rem; }
nav a { color: var(--ink-2); text-decoration: none; }
nav a:hover, nav a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); }

/* Type */
h1, h2, h3 { font-family: var(--display); line-height: 1.15; font-variation-settings: "SOFT" 50, "WONK" 1; }
h1 { font-size: clamp(2.6rem, 9vw, 4rem); font-weight: 650; letter-spacing: -.02em; margin: 2rem 0 1rem; }
h2 { font-size: 1.6rem; font-weight: 600; margin: 3.5rem 0 1.25rem; }
h3 { font-size: 1.25rem; font-weight: 600; margin: 0 0 .4rem; }
h3 a { color: var(--ink); text-decoration-color: var(--accent); }
p { margin: 0 0 1rem; }
.lede { font: 400 1.35rem/1.45 var(--display); color: var(--ink); margin-bottom: 1.5rem; }
.small { font-size: .85rem; color: var(--ink-3); }
.kicker { font: 500 .75rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: .35rem; }

/* Hand-drawn underline */
.squiggle { position: relative; white-space: nowrap; }
.squiggle::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: -.12em; height: .3em;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8c18-6 30 2 48-2s34-5 50-1 14 3 18 1' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8c18-6 30 2 48-2s34-5 50-1 14 3 18 1' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.cursor { color: var(--accent); font-family: var(--mono); font-weight: 700; margin-left: .05em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Badges: little embroidered patches */
.badges { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: 1rem 1.1rem; }
.badges li {
  width: 5.25rem; display: flex; flex-direction: column; align-items: center; gap: .45rem;
  font: 600 .72rem/1.2 var(--sans); color: var(--ink-2); text-align: center;
}
.badges li:nth-child(1) { --tilt: -6deg; --hue: var(--b1); }
.badges li:nth-child(2) { --tilt: 4deg; --hue: var(--b2); }
.badges li:nth-child(3) { --tilt: -3deg; --hue: var(--b3); }
.badges li:nth-child(4) { --tilt: 7deg; --hue: var(--b4); }
.badges li:nth-child(5) { --tilt: -5deg; --hue: var(--b5); }
.badges li:nth-child(6) { --tilt: 3deg; --hue: var(--b6); }
.badges .patch {
  display: grid; place-items: center; width: 4.25rem; height: 4.25rem; border-radius: 50%;
  background: var(--hue); color: #fff;
  outline: 2px dashed rgb(255 255 255 / .7); outline-offset: -6px;
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px var(--hue), 0 3px 8px -2px rgb(0 0 0 / .3);
  transform: rotate(var(--tilt));
  transition: transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
.badges svg { width: 2.1rem; height: 2.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.badges li:hover .patch { transform: rotate(calc(var(--tilt) * -1.5)) scale(1.08); }
@media (prefers-color-scheme: dark) { .badges .patch { color: #1a1714; outline-color: rgb(26 23 20 / .5); } }

/* Cards */
.card {
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 14px;
  overflow: hidden; margin-bottom: 1.25rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-2px) rotate(-.25deg); box-shadow: 0 10px 24px -14px rgb(0 0 0 / .35); }
.card-text { padding: 1.25rem 1.35rem .35rem; }
.card.feature { border-color: color-mix(in srgb, var(--accent) 45%, var(--rule)); background: linear-gradient(135deg, var(--accent-soft), var(--paper-2) 60%); }
.links { font: 500 .85rem var(--mono); }

.video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Now */
.now ul { padding-left: 1.2rem; margin: 0 0 .5rem; }
.now li { margin-bottom: .35rem; }
.now li::marker { content: "› "; color: var(--accent); font-weight: 700; }

.more { margin-top: 3rem; padding: 1.5rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-bottom: 1rem; }
.more p { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin: 0; font: 400 1.15rem var(--display); }
.button {
  display: inline-block; font: 600 .95rem var(--sans); color: var(--paper); background: var(--ink);
  padding: .55rem 1rem; border-radius: 999px; text-decoration: none;
  box-shadow: 3px 3px 0 var(--accent); transition: transform .15s, box-shadow .15s;
}
.button:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--accent); }
.button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--accent); }

/* Footer */
/* footer.wrap, so it beats .wrap's padding shorthand */
footer.wrap { padding-top: 1rem; padding-bottom: 4rem; }
main.cv { padding-bottom: 1.5rem; }
footer p:first-child { display: flex; gap: 1.25rem; font-weight: 500; }
.acorn { background: none; border: 0; padding: 0 .2rem; cursor: pointer; color: var(--ink-3); vertical-align: -.25em; }
.acorn svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s; }
.acorn:hover { color: var(--accent); }
.acorn:hover svg { transform: rotate(-15deg); }

/* RISC OS 3.6 style error box, for the easter egg. Wimp colours: cream
   input-focus title bar, grey granite tiles, 3D bevels, the System font
   (VT323 stands in for it). */
@font-face {
  font-family: "VT323";
  src: url("/fonts/vt323-latin.woff2") format("woff2");
  font-display: swap;
}
.riscos {
  --hi: #fff; --lo: #777;
  --granite: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.45 0 0 0 0 0.45 4 0 0 0 -2.55'/%3E%3C/filter%3E%3Crect width='64' height='64' filter='url%28%23n%29'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 4 0 0 0 -2.45'/%3E%3C/filter%3E%3Crect width='64' height='64' filter='url%28%23n%29'/%3E%3C/svg%3E");
  padding: 0; width: min(30rem, calc(100vw - 2rem)); border: 2px solid #000; border-radius: 0;
  background: #000; color: #000;
  font: 22px/1.15 "VT323", ui-monospace, monospace; -webkit-font-smoothing: none;
}
.riscos::backdrop { background: rgb(0 0 0 / .3); }
.riscos .titlebar {
  padding: 4px 8px 3px; text-align: center; border-bottom: 2px solid #000;
  background: var(--granite), #eeeebb; background-size: 128px 128px; image-rendering: pixelated;
  box-shadow: inset 2px 2px var(--hi), inset -2px -2px #b5b58a;
}
.riscos .body {
  display: grid; grid-template-columns: auto 1fr; gap: 0 18px; padding: 18px 18px 14px;
  background: var(--granite), #dddddd; background-size: 128px 128px; image-rendering: pixelated;
}
.riscos .sprite { width: 52px; height: 48px; image-rendering: pixelated; }
.riscos .message p { margin: 0 0 .6em; }
.riscos a { color: #004499; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.riscos .buttons { grid-column: 1 / -1; display: flex; justify-content: flex-end; margin: 6px 0 0; }
/* The default action button sits in a recessed channel. */
.riscos .default { display: inline-block; padding: 5px; background: #bbb; box-shadow: inset 2px 2px var(--lo), inset -2px -2px var(--hi); }
.riscos button {
  font: inherit; min-width: 7rem; padding: 6px 18px 5px; color: #000; background: #ddd; border: 0; border-radius: 0;
  box-shadow: inset 2px 2px var(--hi), inset -2px -2px var(--lo), 0 0 0 2px #000; cursor: pointer;
}
.riscos button:active { background: #ccc; box-shadow: inset 2px 2px var(--lo), inset -2px -2px var(--hi), 0 0 0 2px #000; }
.riscos button:focus-visible { outline: 2px dotted #000; outline-offset: -7px; border-radius: 0; }

/* CV page */
.cv-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1.5rem; margin: 1rem 0 .75rem; }
.cv-head h1 { margin: 0; }
.cv .contact { display: flex; justify-content: space-between; align-items: center; gap: .9rem; color: var(--ink-2); font-size: .95rem; margin-bottom: 2rem; }
/* Pull the icons right so their glyphs, not their hit areas, line up with the button. */
.cv .icons { display: flex; gap: .35rem; margin-right: -.45rem; }
.cv .icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; color: var(--ink-2); transition: color .15s, background .15s, transform .2s; }
.cv .icon:hover { color: var(--accent); background: var(--accent-soft); transform: rotate(-8deg); }
.cv .icon svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }
.cv section h2 {
  font: 700 .8rem var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent);
  margin: 2.5rem 0 1rem; padding-bottom: .4rem; border-bottom: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
}
.cv h3, .cv .role { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.cv h3 { font-size: 1.2rem; margin: 1.75rem 0 .4rem; }
.cv .role { margin: 1rem 0 .3rem; font-size: 1rem; }
.cv .date { font: 400 .8rem var(--mono); color: var(--ink-3); letter-spacing: 0; text-transform: none; white-space: nowrap; }
.cv ul { padding-left: 1.2rem; margin: 0 0 .5rem; }
.cv li { margin-bottom: .4rem; }
.cv li::marker { color: var(--accent); }
.cv .s-education ul, .cv .s-interests ul { list-style: none; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .masthead, footer, .cv-head .button { display: none; }
  body { background: #fff; font-size: 11pt; }
}
