:root {
  --bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --accent: #a78bfa;
  --accent-ink: #7c5cd6;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
}

/* header */

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 44px 0 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 21px;
  font-weight: 200;
  letter-spacing: -0.025em;
}

.brand span {
  color: var(--accent-ink);
  font-weight: 300;
}

.brand svg {
  display: block;
  flex: none;
}

.site-nav {
  display: flex;
  gap: 22px;
}

.site-nav a {
  color: var(--faint);
  text-decoration: none;
  font-size: 10.5px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

/* hero */

.hero {
  padding: 64px 0 44px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: 46px;
  font-weight: 200;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.hero h1 span {
  color: var(--accent-ink);
  font-weight: 300;
}

.lede {
  margin: 0;
  max-width: 33em;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.85;
  color: var(--muted);
}

.intro {
  margin: 26px 0 0;
  max-width: 36em;
  color: var(--muted);
  font-size: 14.5px;
}

/* reading room */

.reading-room {
  margin: 38px 0 0;
  max-width: 560px;
}

.dream-form {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 20px 16px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.dream-form:focus-within {
  border-color: #cbd5e1;
  box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.08);
}

.dream-form textarea {
  display: block;
  width: 100%;
  min-height: 104px;
  border: 0;
  outline: none;
  resize: vertical;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
}

.dream-form textarea::placeholder {
  color: #b6c2d2;
}

.dream-form .section-label::after {
  display: none;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.counter {
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.button-primary {
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  padding: 11px 22px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 160ms ease, opacity 160ms ease;
}

.button-primary:hover {
  background: var(--accent-ink);
}

.button-primary:disabled {
  opacity: 0.55;
  cursor: default;
}

.hint {
  min-height: 18px;
  margin: 10px 0 0;
  color: #b45309;
  font-size: 12px;
  line-height: 1.5;
}

.reading {
  display: none;
  margin-top: 28px;
}

.reading.is-visible {
  display: block;
  animation: fade-up 420ms ease both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.reading .meta {
  display: block;
  margin-bottom: 14px;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.reading h3 {
  margin: 22px 0 8px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.reading p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.85;
}

.reading-foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.7;
}

.reading-foot button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  font: inherit;
  text-decoration: underline;
  text-decoration-color: #cbd5e1;
  text-underline-offset: 3px;
  cursor: pointer;
}

.reading-foot button:hover {
  color: var(--accent-ink);
}

.loading {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.loading i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.1s infinite ease-in-out;
}

.loading i:nth-child(2) {
  animation-delay: 0.15s;
}

.loading i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes blink {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 1;
  }
}

/* sections */

.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 4px;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.entries {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entries li {
  border-bottom: 1px solid var(--line);
}

.entry-link {
  display: block;
  padding: 26px 0 28px;
  text-decoration: none;
  color: inherit;
}

.entry-link time {
  display: block;
  margin-bottom: 8px;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.entry-link h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.35;
  transition: color 160ms ease;
}

.entry-link:hover h2 {
  color: var(--accent-ink);
}

.entry-link p {
  margin: 0;
  max-width: 40em;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.more {
  margin: 28px 0 0;
}

.more a {
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 3px;
}

.more a:hover {
  color: var(--accent-ink);
  border-color: var(--accent);
}

.about-teaser {
  margin-top: 56px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.about-teaser p {
  margin: 14px 0 0;
  max-width: 38em;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.about-teaser a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: #cbd5e1;
  text-underline-offset: 3px;
}

.about-teaser a:hover {
  color: var(--accent-ink);
  text-decoration-color: var(--accent);
}

/* article */

.article {
  padding: 52px 0 8px;
}

.article time {
  display: block;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.article h1 {
  margin: 12px 0 34px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.article h2 {
  margin: 36px 0 12px;
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.article .dream {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink);
}

.article .note p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
}

.article .note p:last-child {
  margin-bottom: 0;
}

.back {
  display: inline-block;
  margin-top: 44px;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}

.back:hover {
  color: var(--ink);
}

/* about */

.prose {
  padding: 56px 0 8px;
}

.prose h1 {
  margin: 0 0 26px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.015em;
}

.prose p {
  margin: 0 0 18px;
  max-width: 38em;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

.signature {
  margin-top: 30px;
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.06em;
}

/* footer */

.site-footer {
  margin-top: 56px;
  padding: 26px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.04em;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--faint);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
}

@media (max-width: 560px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 30px;
    gap: 18px;
  }

  .site-nav {
    gap: 18px;
  }

  .hero {
    padding: 44px 0 32px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .article h1,
  .prose h1 {
    font-size: 25px;
  }

  .dream-form {
    padding: 16px 16px 14px;
  }
}
