/* Self-hosted fonts, all SIL OFL 1.1. Licences are in assets/fonts/. */
@font-face {
  font-family: "Geist";
  src: url("assets/fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("assets/fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --ink: #15181a;
  --grey: #62676b;
  --accent: #0a7d6b;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sans: "Geist", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a100f;
    --ink: #e9efed;
    --grey: #8d9a97;
    --accent: #97fce4;
  }
}

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

html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

::selection { background: #97fce4; color: #072723; }

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
ul { list-style: none; }

main {
  display: flex;
  flex-direction: column;
  max-width: 560px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(64px, 15vh, 140px) 24px 28px;
  animation: fade .8s var(--ease) both;
}
@keyframes fade { from { opacity: 0; } }

/* Header */
.name {
  font: 400 clamp(34px, 6vw, 42px)/1.1 var(--serif);
  letter-spacing: -.01em;
}
.bio {
  margin-top: 14px;
  color: var(--grey);
  font-size: 14.5px;
  text-wrap: pretty;
}
/* Bio links read as plain text: no underline, same colour. */
.bio a { color: inherit; text-decoration: none; }

/* Section tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 26px;
  margin-top: clamp(36px, 7vh, 64px);
}
.tabs a {
  position: relative;
  padding: 10px 0;
  color: var(--grey);
  font-size: 15px;
  transition: color .2s;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-expanded="true"] { color: var(--ink); }
.tabs a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.js .tabs a[aria-expanded="true"]::after { transform: scaleX(1); }

/* Collapsing panels. Without JavaScript they all stay open. */
.js .panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s var(--ease);
}
.js .panel.open { grid-template-rows: 1fr; }
.panel-inner {
  /* Side padding keeps focus outlines from being clipped by overflow. */
  margin-inline: -6px;
  padding-inline: 6px;
}
.js .panel-inner {
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s, visibility 0s .15s;
}
.js .panel.open .panel-inner {
  opacity: 1;
  visibility: visible;
  transition: opacity .35s .12s, visibility 0s;
}

/* Entries */
.entries { padding-block: 26px 6px; }
.entry + .entry { margin-top: 22px; }
.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.entry-name { font-weight: 500; }
a.entry-name:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a.entry-name[target]::after {
  content: "";
  display: inline-block;
  width: .6em;
  height: .6em;
  margin-left: .4em;
  background: var(--grey);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 8 8 2M3 2h5v5' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 8 8 2M3 2h5v5' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.entry-icon {
  display: inline-block;
  height: 15px;
  width: auto;
  margin-right: 7px;
  vertical-align: -2px;
  border-radius: 3px;
}
.entry-emoji {
  display: inline-block;
  margin-right: 7px;
  font-size: 14px;
  line-height: 1;
}
.entry-author { color: var(--grey); font-weight: 400; }
.entry-desc {
  margin-top: 3px;
  color: var(--grey);
  font-size: 14px;
  text-wrap: pretty;
}
.entry-name .now { color: var(--grey); font-weight: 400; }

/* Talks listed under an entry, each opening its slides */
.talks { margin-top: 10px; }
.talks a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-block: 9px;
  border-bottom: 1px dashed color-mix(in srgb, var(--grey) 35%, transparent);
  font-size: 14px;
}
.talks li:first-child a { border-top: 1px dashed color-mix(in srgb, var(--grey) 35%, transparent); }
.talks a:hover .talk-name {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.talk-topic { color: var(--grey); }
.talk-meta { flex: none; color: var(--grey); font: 400 12px/1 var(--mono); }

/* Footer */
footer {
  margin-top: auto;
  padding-top: 56px;
  color: var(--grey);
  font: 400 12px/1.8 var(--mono);
}
footer a { transition: color .2s; }
footer a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
