:root {
  --fg: #000000;
  --bg: #f0f2f5;

  --ff: sans-serif;

  --main-width: 800px;
  --text-width: 720px;
}


::selection {
  background: #bec6d1;
}


/* ------------------------------------------------------------ */


body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--main-width)) minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "header header header "
    ".      main   .      "
    "footer footer footer ";
  gap: 16px;
  margin: 0;
  min-height: calc(100vh);
  color: var(--fg);
  background-color: var(--bg);
  font-family: var(--ff);
  font-size: 18px;
  line-height: 140%;
}


header {
  grid-area: header;
  position: sticky;
  top: 0;
  left: 0;
  padding: 16px;
  border-bottom: 1px var(--fg) solid;
  /* backdrop-filter: blur(2px); */
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--bg), transparent 75%) 0%,
    transparent 100%
  );
}

header h1 {
  margin: 0;
  max-width: none;
  text-decoration: none;
}


nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 8px auto 0px;
  white-space: nowrap;
}


main {
  grid-area: main;
}

main > *:first-child {
  margin-top: 24px;
}


footer {
  grid-area: footer;
  border-top: 1px var(--fg) solid;
  margin-top: 32px;
  padding: 16px;
}


/* ------------------------------------------------------------ */


h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
table {
  max-width: var(--text-width);
  margin: 40px auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 100%;
}

h1 {
  text-decoration: underline;
}


table {
  width: 100%;
}

th {
  text-align: left;
  vertical-align: top;
  padding-right: 1em;
  white-space: nowrap;
}

td {
  width: 100%;
}


a {
  color: var(--fg);
  text-decoration: none;
}


a:hover {
  text-decoration: underline;
}


a:visited {
  color: var(--fg);
}


img {
  width: 100%;
}


/* ------------------------------------------------------------ */


.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: var(--text-width);
  margin: auto;
}


.member :is(h1, h2, h3, h4, h5, h6, p) {
  margin: 8px auto;
}

.member img {
  display: block;
}


/* @media only screen and (max-width: 800px) { */
/*   .grid .member { grid-column-start: span 2; } */
/* } */


.shorts {
  max-width: var(--text-width);
  margin: auto;
}

.short {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 24px 0;
}

.short > img {
  width: 36%;
  height: auto;
}

.short > div {
  flex: 1;
  min-width: 0;
}

.short h2 {
  font-size: 1.2em;
  margin: 0 0 8px;
}

.short p {
  margin: 0;
}
