@font-face {
  font-family: Literata;
  font-weight: 300 800;
  font-display: swap;
  src: url(/assets/fonts/literata-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Literata;
  font-weight: 300 800;
  font-display: swap;
  src: url(/assets/fonts/literata-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Archivo;
  font-weight: 300 800;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(/assets/fonts/archivo-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Archivo;
  font-weight: 300 800;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(/assets/fonts/archivo-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --mint: #7fc0a6;
  --mint-ink: #2b7a5e;
  --ink: #000;
  --ink-2: #333;
  --quiet: #676767;
  --paper: #fff;
  --tint: #f4f4f2;
  --line: #e6e6e3;
  --banner: #000;
  --good: #1d7a3e;
  --bad: #c0271d;
  --serif: Literata, Georgia, "Times New Roman", serif;
  --sans: Archivo, "Arial Narrow", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --mint-ink: #7fc0a6;
    --ink: #fff;
    --ink-2: #d2d2d2;
    --quiet: #8c8c8c;
    --paper: #000;
    --tint: #111;
    --line: #262626;
    --banner: #141414;
    --good: #7fc0a6;
    --bad: #ff6b5e;
  }
}

html {
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 var(--serif);
  -webkit-text-size-adjust: 100%;
}
body { margin: 0; }

a {
  color: inherit;
  text-decoration-color: var(--mint);
  text-decoration-thickness: 2px;
  text-underline-offset: .18em;
}
:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }

code, pre, .draft { font-family: var(--mono); }
time { font-variant-numeric: tabular-nums; }

/* the frame: one column on a phone, three on a wide screen */

.app { max-width: 600px; margin: 0 auto; }

@media (min-width: 640px) {
  .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-height: 100vh; }
}

.side {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: .7rem 1rem 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--mint);
  line-height: 0;
}
.mark, .type, .submark { display: block; background: currentColor; }
.mark {
  aspect-ratio: 566 / 488;
  mask: url(/assets/brand/brandmark.svg) center / contain no-repeat;
  -webkit-mask: url(/assets/brand/brandmark.svg) center / contain no-repeat;
}
.type {
  aspect-ratio: 791 / 439;
  mask: url(/assets/brand/logotype.svg) center / contain no-repeat;
  -webkit-mask: url(/assets/brand/logotype.svg) center / contain no-repeat;
}
.submark {
  aspect-ratio: 381 / 130;
  mask: url(/assets/brand/submark.svg) center / contain no-repeat;
  -webkit-mask: url(/assets/brand/submark.svg) center / contain no-repeat;
}
.brand .mark { height: 30px; }
.brand .type { height: 27px; }

.menu {
  order: 3;
  flex-basis: 100%;
  display: flex;
  margin-top: .4rem;
  font-family: var(--sans);
}
.menu a {
  flex: 1;
  text-align: center;
  padding: .8rem 0 .75rem;
  color: var(--quiet);
  font-weight: 600;
  text-decoration: none;
}
.menu a:hover { background: var(--tint); }
.menu [aria-current] { color: var(--ink); font-weight: 800; box-shadow: inset 0 -4px var(--mint); }

.langs {
  font: 600 .7rem var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--quiet);
}
.langs a { text-decoration: none; }
.langs a:hover { color: var(--ink); }
.langs > * + * { margin-left: .55em; }
.langs span { color: var(--ink); font-weight: 800; }

.bar {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  min-height: 3.2rem;
  padding: .3rem 1rem;
  font-family: var(--sans);
  border-bottom: 1px solid var(--line);
}
.bar h1, .bar b { font-size: 1.2rem; font-weight: 800; line-height: 1.2; margin: 0; }
.bar small { display: block; font-size: .78rem; color: var(--quiet); }
.back {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  margin-left: -.5rem;
  border-radius: 50%;
  font-size: 1.25rem;
  text-decoration: none;
}
.back:hover { background: var(--tint); }

@media (min-width: 1020px) {
  .app {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 600px minmax(0, 1fr);
    max-width: none;
    border: 0;
  }
  .side {
    grid-column: 1;
    justify-self: end;
    align-self: start;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: nowrap;
    grid-row: 1 / span 2;
    box-sizing: border-box;
    width: min(15rem, 100%);
    height: 100vh;
    padding: 1.4rem 1.6rem 1.6rem 1rem;
    border: 0;
  }
  .brand .mark { height: 40px; }
  .brand .type { height: 36px; }
  .menu { order: 0; flex-direction: column; flex-basis: auto; margin-top: 2rem; }
  .menu a {
    flex: none;
    text-align: left;
    padding: .55rem 1rem;
    margin-left: -1rem;
    border-radius: 999px;
    font-size: 1.2rem;
    color: var(--ink);
  }
  .menu [aria-current] { box-shadow: none; text-decoration: underline 3px var(--mint); text-underline-offset: .25em; }
  .langs { margin-top: auto; }

  main {
    grid-column: 2;
    min-height: 100vh;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
  .bar {
    position: sticky;
    top: 0;
    z-index: 2;
    background: color-mix(in srgb, var(--paper) 86%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  aside {
    grid-column: 2;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
}

@media (min-width: 1240px) {
  main { grid-row: 1 / span 2; }
  aside {
    grid-column: 3;
    grid-row: 1;
    position: sticky;
    top: 0;
    align-self: start;
    box-sizing: border-box;
    width: min(22rem, 100%);
    padding: .8rem 1.5rem;
    border: 0;
  }
}

/* profile */

.profile { border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.banner {
  position: relative;
  height: 150px;
  background: var(--banner);
  overflow: hidden;
}
.banner .submark {
  position: absolute;
  right: 1.4rem;
  bottom: 1.2rem;
  height: 44px;
  color: var(--mint);
}
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: #000;
  box-shadow: 0 0 0 1px var(--line);
}
.avatar .mark { width: 64%; color: var(--mint); }
.avatar.big {
  position: relative;
  width: 104px;
  height: 104px;
  margin: -52px 0 0 1rem;
  border-radius: 18px;
  border: 4px solid var(--paper);
  box-shadow: none;
}
.name { font: 800 1.35rem/1.2 var(--sans); margin: .7rem 1rem 0; }
.handle { font: .92rem var(--sans); color: var(--quiet); margin: .1rem 1rem .7rem; }
.bio { margin: 0 1rem .7rem; }
.stats { font: .92rem var(--sans); color: var(--quiet); margin: 0 1rem; }
.stats span + span { margin-left: 1.2rem; }
.stats b { color: var(--ink); font-weight: 800; }

.empty, .lead { padding: 1.2rem 1rem; margin: 0; color: var(--quiet); }
.lead { color: var(--ink-2); }
.lead + .stats { padding: 0 1rem 1rem; margin: 0; border-bottom: 1px solid var(--line); }

/* posts */

.post {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: .75rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--line);
}
.post:not(.full):hover { background: var(--tint); }

.by { font: .9rem/1.3 var(--sans); color: var(--quiet); margin: 0 0 .2rem; }
.by b { color: var(--ink); font-weight: 800; }
.by a { text-decoration: none; }
.by a:hover { text-decoration: underline; }
.ln { text-transform: uppercase; font-size: .8em; letter-spacing: .06em; }
.draft { font-size: .72rem; color: var(--bad); margin-left: .4rem; }

.content > * { margin: 0 0 .6em; }
.content > :last-child { margin-bottom: 0; }
.content .title { font-size: 1.05rem; line-height: 1.3; margin-bottom: .3em; }
.content .title a { text-decoration: none; }
.content .title a:hover { text-decoration: underline; text-decoration-color: var(--mint); }
.content h2 { font-size: 1.05rem; }
.content h3 { font-size: 1rem; }

.more { margin: .5rem 0 0; font: 600 .88rem var(--sans); }
.more a { color: var(--mint-ink); text-decoration: none; }
.more a:hover { text-decoration: underline; }

.tag { font: 800 .85rem var(--sans); color: var(--mint-ink); }

.call {
  margin: .7rem 0 .2rem;
  padding: .7rem .9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: .95rem;
}
.call-head {
  display: flex;
  gap: .7rem;
  align-items: baseline;
  margin: 0 0 .25rem;
  font: 600 .8rem var(--sans);
}
.call-text { font-weight: 600; margin: 0 0 .45rem; }
.call dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: .2rem .9rem;
  margin: 0;
  font-size: .9rem;
}
.call dt { font: .78rem var(--sans); color: var(--quiet); padding-top: .15em; }
.call dd { margin: 0; }
.call time { font-family: var(--sans); }

@media (max-width: 420px) {
  .call dl { grid-template-columns: 1fr; gap: 0; }
  .call dd { margin-bottom: .35rem; }
}

.r-right { color: var(--good); }
.r-wrong { color: var(--bad); }
.r-open, .r-mixed { color: var(--quiet); }
.r-due { color: var(--bad); }

/* one post, opened */

.full { display: block; padding: 1rem 1rem 0; }
.post-head { display: flex; gap: .75rem; align-items: center; margin-bottom: .9rem; }
.post-head p { display: flex; flex-direction: column; margin: 0; font: .92rem/1.25 var(--sans); }
.post-head b { font-weight: 800; }
.post-head span { color: var(--quiet); }
.full .content { font-size: 1.12rem; }
.full h1 { font-size: 1.55rem; line-height: 1.2; margin: 0 0 .5em; }
.full .content h2 { font-size: 1.2rem; margin-top: 1.4em; }
.stamp {
  margin: 1rem 0 0;
  padding: .9rem 0;
  border-top: 1px solid var(--line);
  font: .9rem var(--sans);
  color: var(--quiet);
}
.other { padding: .9rem 1rem; margin: 0; border-bottom: 1px solid var(--line); font: .9rem var(--sans); color: var(--quiet); }

.page { padding: 1.1rem 1rem 1.5rem; }
.page > :first-child { margin-top: 0; }

/* text inside posts */

ul, ol { padding-left: 1.3em; }
li + li { margin-top: .2em; }
li::marker { color: var(--quiet); }
img { max-width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5em 0; }
blockquote { margin-left: 0; padding-left: 1em; border-left: 3px solid var(--mint); color: var(--ink-2); }
code { font-size: .82em; }
pre { font-size: .8rem; line-height: 1.5; overflow-x: auto; padding: .8em 1em; background: var(--tint); border-radius: 10px; }
pre code { font-size: inherit; }

.table { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td {
  text-align: left;
  vertical-align: top;
  padding: .4em .9em .4em 0;
  border-bottom: 1px solid var(--line);
}
th { font: 700 .75rem var(--sans); color: var(--quiet); border-bottom: 2px solid var(--ink); }
th.r, td.r { text-align: right; font-variant-numeric: tabular-nums; }
th.c, td.c { text-align: center; }

/* right column */

aside { padding: 1rem; }
.box { background: var(--tint); border-radius: 16px; padding: .9rem 1rem .6rem; margin-bottom: 1rem; }
.box h2 { font: 800 1.15rem var(--sans); margin: 0 0 .2rem; }
.tally { font: .8rem var(--sans); color: var(--quiet); margin: 0 0 .5rem; }
.box ul { list-style: none; padding: 0; margin: 0; }
.box li { padding: .6rem 0; border-top: 1px solid var(--line); margin: 0; font-size: .92rem; line-height: 1.35; }
.box li a { display: block; text-decoration: none; }
.box li a:hover span { text-decoration: underline; text-decoration-color: var(--mint); }
.when { display: block; font: .78rem var(--sans); color: var(--quiet); margin-top: .2rem; }
.all { margin: 0; padding: .6rem 0 .3rem; border-top: 1px solid var(--line); font: 600 .88rem var(--sans); }
.all a { color: var(--mint-ink); text-decoration: none; }
aside footer { font: .78rem/1.5 var(--sans); color: var(--quiet); padding: 0 .2rem; }
aside footer p { margin: 0; }
