:root {
  --ink: #07060c;
  --radius: 30px;
  --line: rgba(255, 255, 255, .14);
  --soft: rgba(255, 255, 255, .74);
  --dim: rgba(255, 255, 255, .52);
  /* Titles in a bold Clarendon, the face of the THIEL wordmark; reading text in Charter. */
  --display: Superclarendon, Clarendon, "Clarendon BT", "Clarendon LT Std", Besley, Rockwell, "Roboto Slab", Georgia, serif;
  --serif: Charter, "Bitstream Charter", "Iowan Old Style", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--ink); }

body {
  margin: 0;
  min-height: 100vh;
  color: #fff;
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* The sky the landing flight ends in, held still behind the page. */
.sky {
  position: fixed;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  background:
    linear-gradient(rgba(7, 6, 12, .46), rgba(7, 6, 12, .74)),
    var(--ink) url(/frames/720/f0640.webp) center / cover no-repeat;
}

.glass {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02) 38%), rgba(13, 15, 28, .50);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .38),
    inset 0 -1px 0 rgba(255, 255, 255, .10),
    0 8px 20px rgba(0, 0, 0, .22),
    0 34px 80px rgba(0, 0, 0, .40);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
}

/* Shown to a signed-in author only, or to everyone else only. */
.for-author { display: none !important; }

.author .for-author { display: revert !important; }

.author .for-guest { display: none !important; }

/* ------------------------------------------------------------ top bar */

.mast {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: max(26px, env(safe-area-inset-top)) 20px 0;
}

.home {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--soft);
  transition: color .2s ease;
}

.home:hover { color: #fff; }

.tabs {
  display: flex;
  gap: 2px;
  min-width: 0;
  padding: 5px;
  overflow-x: auto;
  border-radius: 999px;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tabs a {
  flex: none;
  padding: 10px 11px 9px;
  border-radius: 999px;
  font-family: var(--display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  text-transform: uppercase;
  color: var(--soft);
  transition: color .2s ease, background .2s ease;
}

.tabs a:hover { color: #fff; }

.tabs a[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}

.wrap {
  width: min(860px, 100% - 32px);
  margin: 0 auto;
  padding: 40px 0 0;
}

/* ------------------------------------------------------------ a section */

/* The painting, in a glass frame like its card on the first page, with the name over its foot. */
.hero { padding: 8px; }

.hero__art {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) - 8px);
}

.hero__art img {
  display: block;
  width: 100%;
  height: clamp(250px, 46vw, 400px);
  object-fit: cover;
}

.hero__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 5, 10, .90) 0%, rgba(5, 5, 10, .55) 28%, rgba(5, 5, 10, 0) 62%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10);
  border-radius: inherit;
}

.hero__text {
  position: absolute;
  z-index: 1;
  left: clamp(22px, 5vw, 40px);
  right: clamp(22px, 5vw, 40px);
  bottom: clamp(22px, 4.6vw, 36px);
}

.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(32px, 7.6vw, 64px);
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1;
  text-transform: uppercase;
}

.hero p {
  margin: 12px 0 0;
  font-family: var(--display);
  font-size: clamp(16px, 2.5vw, 21px);
  line-height: 1.3;
  color: rgba(255, 255, 255, .88);
}

.credit {
  margin: 10px 14px 0;
  font-size: 13px;
  text-align: right;
  color: var(--dim);
}

/* The articles of a section: one sheet, one line per article, the date in the margin. */
.index {
  margin-top: 22px;
  padding: 8px 40px 14px;
}

.index__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 18px 0 14px;
  font-size: 14px;
  color: var(--dim);
}

.index__head a {
  font-family: var(--display);
  font-weight: 700;
  text-decoration: none;
  color: #fff;
}

.index__head a:hover { text-decoration: underline; }

.entry {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 0 28px;
  padding: 26px 0 28px;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.entry__when {
  padding-top: 6px;
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
  color: var(--dim);
}

.entry h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(21px, 3vw, 27px);
  font-weight: 700;
  line-height: 1.16;
}

a.entry h2 {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  display: inline;
  transition: background-size .3s ease;
}

a.entry:hover h2 { background-size: 100% 1px; }

.entry p {
  margin: 9px 0 0;
  font-size: 17.5px;
  line-height: 1.46;
  color: var(--soft);
}

.entry--full .prose {
  margin-top: 10px;
  font-size: 18px;
  line-height: 1.55;
}

.entry--full h2 { font-size: 21px; }

.empty {
  margin: 0;
  padding: 26px 0 28px;
  border-top: 1px solid var(--line);
  font-size: 17.5px;
  color: var(--soft);
}

.index__head:has(span:empty) + .index__list .empty { border-top: 0; }

/* ------------------------------------------------------------ an article */

.post { padding: 46px 48px 54px; }

.post__section {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
  color: var(--soft);
}

.post__section:hover { color: #fff; }

.post h1 {
  margin: 14px 0 0;
  font-family: var(--display);
  font-size: clamp(30px, 5.2vw, 50px);
  font-weight: 700;
  line-height: 1.08;
}

.post__meta {
  margin: 16px 0 0;
  font-size: 15px;
  color: var(--dim);
}

/* A thesis opens with the belief it argues against. */
.claim {
  display: grid;
  gap: 1px;
  margin: 32px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--line);
}

.claim div {
  padding: 18px 22px 20px;
  background: rgba(10, 11, 22, .62);
}

.claim dt {
  font-size: 14px;
  color: var(--dim);
}

.claim dd {
  margin: 7px 0 0;
  font-size: 19px;
  line-height: 1.4;
}

.claim div:first-child dd { color: var(--soft); }

.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.specs li {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15px;
  color: var(--soft);
}

.specs b {
  margin-right: 7px;
  font-weight: 400;
  color: var(--dim);
}

.prose {
  margin-top: 36px;
  font-size: 19.5px;
  line-height: 1.64;
  color: rgba(255, 255, 255, .92);
}

.prose > :first-child { margin-top: 0; }

.prose > :last-child { margin-bottom: 0; }

.prose p { margin: 0 0 1.15em; }

.prose h2,
.prose h3 {
  margin: 1.8em 0 .5em;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.2;
}

.prose h2 { font-size: 24px; }

.prose h3 { font-size: 19px; }

.prose a {
  text-decoration-color: rgba(255, 255, 255, .45);
  text-underline-offset: 3px;
}

.prose blockquote {
  margin: 1.4em 0;
  padding: 2px 0 2px 20px;
  border-left: 2px solid rgba(255, 255, 255, .4);
  color: var(--soft);
}

.prose ul,
.prose ol {
  margin: 0 0 1.15em;
  padding-left: 1.3em;
}

.prose li { margin-bottom: .35em; }

.prose code {
  padding: .1em .35em;
  border-radius: 6px;
  background: rgba(255, 255, 255, .12);
  font-family: var(--mono);
  font-size: .84em;
}

.prose pre {
  overflow-x: auto;
  margin: 1.4em 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(6, 7, 14, .6);
}

.prose pre code {
  padding: 0;
  background: none;
  font-size: 14px;
  line-height: 1.5;
}

.prose hr {
  margin: 2em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose img {
  display: block;
  max-width: 100%;
  margin: 1.6em auto;
  border-radius: 16px;
}

.after {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.pill {
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 15px;
  text-decoration: none;
  color: var(--soft);
}

.pill:hover { color: #fff; }

.foot {
  display: flex;
  justify-content: center;
  gap: 26px;
  padding: 54px 20px max(44px, env(safe-area-inset-bottom));
  font-size: 14px;
}

.foot a {
  text-decoration: none;
  color: var(--dim);
}

.foot a:hover { color: #fff; }

/* ------------------------------------------------------------ signing in and writing */

.panel {
  margin-bottom: 18px;
  padding: 40px 44px 44px;
}

.panel[data-page="login"] {
  width: min(460px, 100%);
  margin: 6vh auto 0;
}

.panel h1,
.panel h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.1;
}

.panel h1 { font-size: 34px; }

.panel h2 { font-size: 19px; }

.panel__head,
.mine__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.mine { margin-top: 34px; }

.mine__list {
  margin-top: 14px;
  border-bottom: 1px solid var(--line);
}

.mine__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  font: inherit;
  font-size: 17px;
  text-align: left;
  color: #fff;
  cursor: pointer;
}

.mine__row strong { font-weight: 400; }

.mine__row:hover strong { text-decoration: underline; }

.mine__row span {
  flex: none;
  font-size: 14px;
  color: var(--dim);
}

.mine__list > .form__note { padding: 14px 0; }

.form {
  display: grid;
  gap: 20px;
  margin-top: 26px;
}

.panel[data-page="editor"] .form { margin-top: 0; }

.form label,
.form__label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--soft);
}

.form small {
  font-size: 13px;
  color: var(--dim);
}

.form label small { margin-left: 6px; }

.form label:has(small) { grid-template-columns: auto 1fr; }

.form label:has(small) > :is(input, select, .form__affix) { grid-column: 1 / -1; }

.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(6, 7, 14, .55);
  font: inherit;
  font-size: 17px;
  color: #fff;
}

.form textarea {
  min-height: 420px;
  line-height: 1.55;
  resize: vertical;
}

.form :is(input, select, textarea):focus {
  outline: 2px solid rgba(255, 255, 255, .7);
  outline-offset: 1px;
}

.form__pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 16px;
}

.form__pair[hidden] { display: none; }

.form__affix {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(6, 7, 14, .55);
}

.form__affix span {
  flex: none;
  padding-left: 15px;
  font-size: 17px;
  color: var(--dim);
}

.form__affix input {
  padding-left: 2px;
  border: 0;
  background: none;
}

.form__tools {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: -10px;
}

.form__tools .form__label {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.form__tools > span:last-child {
  display: flex;
  gap: 18px;
}

.form__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.form__note {
  margin: 0;
  font-size: 15px;
  color: var(--soft);
}

.preview {
  min-height: 420px;
  margin-top: 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(6, 7, 14, .35);
}

.button {
  padding: 13px 24px 12px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  color: #0a0a12;
  cursor: pointer;
}

.button:hover { background: rgba(255, 255, 255, .86); }

.button--quiet {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.button--quiet:hover { background: rgba(255, 255, 255, .16); }

.link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .4);
  text-underline-offset: 3px;
  color: var(--soft);
  cursor: pointer;
}

.link:hover { color: #fff; }

.link--danger { color: rgb(255, 160, 150); }

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .9);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  :root { --radius: 24px; }

  .mast {
    justify-content: flex-start;
    padding-left: 16px;
    padding-right: 16px;
  }

  .wrap { padding-top: 26px; }

  .hero { padding: 6px; }

  .hero__art { border-radius: calc(var(--radius) - 6px); }

  .index { padding: 4px 22px 8px; }

  .entry {
    grid-template-columns: minmax(0, 1fr);
    padding: 22px 0 24px;
  }

  .entry__when {
    padding: 0 0 8px;
    line-height: 1.4;
  }

  .entry__when br { display: none; }

  .entry__when time::after { content: "  "; white-space: pre; }

  .post { padding: 32px 24px 38px; }

  .prose { font-size: 18.5px; }

  .panel { padding: 30px 22px 32px; }

  .form__pair { grid-template-columns: minmax(0, 1fr); }
}
