:root {
  color-scheme: light;
  --paper: #ffffff;
  --surface: #ffffff;
  --ink: #111111;
  --muted: #5f5f5f;
  --soft: #9d9d9d;
  --line: #d7d7d7;
  --fine-line: #ececec;
  --brand-left: 44px;
  --content-left: 455px;
  --content-width: min(1110px, calc(100vw - 520px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html.has-custom-cursor,
html.has-custom-cursor * {
  cursor: none;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    "Neue Haas Unica",
    "Helvetica Neue",
    "Avenir Next",
    "Inter",
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-100px, -100px, 0);
  transition:
    opacity 120ms ease,
    width 120ms ease,
    height 120ms ease;
}

.cursor-dot.is-visible {
  opacity: 1;
}

.cursor-dot.is-pressing {
  width: 6px;
  height: 6px;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--muted);
}

.site-header,
main {
  width: calc(100% - 48px);
  margin: 0 24px;
}

.site-header {
  position: relative;
  display: block;
  padding: 18px 0 0;
  min-height: 170px;
  border-bottom: 0;
  background: transparent;
  backdrop-filter: none;
}

.header-side {
  display: grid;
  justify-items: start;
  gap: 10px;
  width: var(--content-width);
  position: absolute;
  top: 78px;
  left: var(--content-left);
  margin: 0;
}

.header-title {
  margin-left: var(--brand-left);
  transform: none;
}

.header-title p,
h1,
h2,
p {
  margin: 0;
}

.brand-line {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  justify-items: start;
  gap: 4px;
  margin-bottom: 4px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  font-family:
    "Baskerville",
    "Iowan Old Style",
    "New York",
    "Palatino Linotype",
    "Book Antiqua",
    Georgia,
    serif;
  font-size: clamp(28px, 2.7vw, 36px);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: 0;
  text-transform: lowercase;
}

.brand-mark {
  color: #c91818;
  font-size: 0.92em;
  line-height: 1;
}

.status {
  position: static;
  display: inline-block;
  justify-self: start;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: clamp(15px, 1.05vw, 17px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-transform: lowercase;
  white-space: nowrap;
  animation: status-blink 1.4s steps(1, end) infinite;
}

.header-title p {
  color: #676767;
  font-size: clamp(16px, 1.2vw, 19px);
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0;
}

nav {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  padding-top: 0;
}

.lang-switch {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-size: clamp(16px, 1.15vw, 19px);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: lowercase;
  align-self: end;
  justify-self: end;
}

.lang-switch a,
.lang-switch span {
  padding: 2px 0;
}

.lang-switch .is-active {
  color: var(--ink);
}

nav a,
nav span {
  color: var(--ink);
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: clamp(14px, 1.05vw, 17px);
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0;
}

nav a:hover {
  color: var(--muted);
}

main {
  padding: 20px 0 52px;
}

section {
  display: block;
  width: var(--content-width);
  margin: 0 0 0 var(--content-left);
  padding: 0 0 44px;
  border-bottom: 0;
}

.intro {
  margin-top: 0;
  padding: 0;
  border-top: 0;
  border-bottom: 0;
  background: transparent;
  border-radius: 0;
}

.intro::before {
  content: "";
}

.intro p {
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  font-family:
    "Baskerville",
    "Iowan Old Style",
    "New York",
    "Palatino Linotype",
    "Book Antiqua",
    Georgia,
    serif;
  font-size: clamp(17px, 1.25vw, 21px);
  font-weight: 400;
  line-height: 1.18;
  text-wrap: pretty;
}

.intro-linkline {
  max-width: none;
  font-family:
    "Baskerville",
    "Iowan Old Style",
    "New York",
    "Palatino Linotype",
    "Book Antiqua",
    Georgia,
    serif;
  font-size: clamp(17px, 1.25vw, 21px);
  line-height: 1.18;
  text-transform: none;
}

.intro-link-section {
  padding-top: 0;
  padding-bottom: 54px;
  border-top: 0;
}

.intro-link-section .intro-linkline {
  grid-column: auto;
}

.intro-linkline a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.page-intro p {
  font-size: clamp(25px, 2.8vw, 38px);
}

h2 {
  position: static;
  width: auto;
  text-align: left;
  color: var(--ink);
  font-size: clamp(16px, 1.15vw, 19px);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: lowercase;
  margin-bottom: 10px;
}

.item-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: item;
  font-size: clamp(17px, 1.25vw, 21px);
  text-transform: lowercase;
}

.item-list li {
  position: relative;
  display: block;
  align-items: start;
  min-height: 0;
  padding: 4px 0 4px 22px;
  border: 0;
  border-top: 0;
  border-radius: 0;
  background: transparent;
}

ol.item-list li::before,
ul.item-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0.38em;
  display: block;
  color: var(--ink);
  font-size: 0.95em;
  line-height: 1;
}

#projects .item-list,
#evaluations .item-list,
#directories .item-list {
  font-size: clamp(17px, 1.25vw, 21px);
  line-height: 1.22;
  font-family:
    "Baskerville",
    "Iowan Old Style",
    "New York",
    "Palatino Linotype",
    "Book Antiqua",
    Georgia,
    serif;
  font-weight: 400;
}

#projects .project-panorama {
  color: #2563ff;
  text-transform: none;
}

#projects {
  padding-bottom: 52px;
}

#evaluations {
  padding-top: 8px;
}

.about,
.blog {
  row-gap: 8px;
}

.about .name,
.about p:not(.name),
.about address,
.blog p {
  grid-column: auto;
}

.about .name,
.about p,
.about address,
.blog p {
  max-width: none;
  font-size: clamp(17px, 1.25vw, 21px);
  text-transform: lowercase;
  font-family:
    "Baskerville",
    "Iowan Old Style",
    "New York",
    "Palatino Linotype",
    "Book Antiqua",
    Georgia,
    serif;
  font-weight: 400;
}

.blog {
  border-bottom: 0;
}

.about p:not(.name) {
  max-width: 660px;
}

.name {
  margin-bottom: 3px;
  font-family:
    "Baskerville",
    "Iowan Old Style",
    "New York",
    "Palatino Linotype",
    "Book Antiqua",
    Georgia,
    serif;
  font-size: clamp(15px, 1vw, 17px);
  font-weight: 400;
  color: var(--ink);
  text-transform: lowercase;
}

address {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  font-style: normal;
  font-size: 14px;
  text-transform: lowercase;
  overflow-wrap: anywhere;
}

address a {
  width: fit-content;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-color: var(--soft);
}

.post-list {
  display: grid;
  gap: 8px;
}

.post-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--fine-line);
  background: var(--surface);
}

.post-card time,
.admin-list span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.post-card h3 {
  margin: 0;
  font-family:
    "Baskerville",
    "Iowan Old Style",
    Georgia,
    serif;
  font-size: clamp(16px, 1.1vw, 18px);
  font-weight: 400;
  line-height: 1.15;
  text-transform: lowercase;
}

.post-card p,
.empty-state {
  margin: 0;
  font-size: clamp(13px, 0.96vw, 15px);
  text-transform: lowercase;
}

.editor-form {
  display: grid;
  grid-column: 2;
  gap: 10px;
  max-width: 620px;
}

.post-editor .editor-form {
  grid-column: auto;
  max-width: none;
}

.editor-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.editor-form input,
.editor-form select,
.editor-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.editor-form input,
.editor-form select {
  height: 36px;
  padding: 7px 9px;
}

.editor-form textarea {
  min-height: 180px;
  padding: 9px;
  resize: vertical;
}

.editor-form button {
  width: fit-content;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--surface);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-form .button-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.admin-list {
  display: grid;
  grid-column: 2;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-list li {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--fine-line);
  background: var(--surface);
}

@media (max-width: 880px) {
  .site-header,
  main {
    width: calc(100% - 26px);
    margin: 0 13px;
  }

  .site-header {
    padding-top: 14px;
    min-height: 0;
  }

  .header-side {
    width: auto;
    position: static;
    margin: 22px 0 0 0;
    justify-items: start;
  }

  .header-title {
    margin-left: 0;
  }

  .status {
    position: static;
    transform: none;
  }

  nav {
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-top: 0;
    gap: 16px;
  }

  section,
  .intro {
    width: auto;
    margin: 0;
    padding: 22px 0;
  }

  .about .name,
  .about p:not(.name),
  .about address,
  .intro-link-section .intro-linkline,
  .blog p,
  .editor-form,
  .admin-list {
    grid-column: 1;
  }

  .intro {
    margin-top: 6px;
    padding: 12px 0 14px;
  }

  .intro p {
    font-size: 16px;
  }

  .intro-linkline,
  .item-list,
  .about .name,
  .about p,
  .about address,
  .blog p {
    font-size: 16px;
  }

  .item-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .site-header,
  main {
    width: calc(100% - 18px);
    margin: 0 9px;
  }

  nav a {
    padding-inline: 0;
    font-size: 13px;
  }

  .intro p {
    font-size: 15px;
  }

  .intro-linkline,
  .item-list,
  .about .name,
  .about p,
  .about address,
  .blog p {
    font-size: 15px;
  }

  .item-list li {
    min-height: 0;
    padding: 6px 0;
  }

  .brand-line {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .brand,
  .status {
    justify-self: start;
  }
}

@media (hover: none), (pointer: coarse) {
  .cursor-dot {
    display: none;
  }
}

@keyframes status-blink {
  0%,
  54% {
    opacity: 1;
  }

  55%,
  100% {
    opacity: 0.25;
  }
}
