:root {
  --bg: #f4d8d8;
  --fg: #2b2b2b;
  --muted: #746666;
  --soft: #cdb3b3;
  --link: #303030;
  --link-hover: #000000;
  --column: 36rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: "Patrick Hand", system-ui, sans-serif;
}

body {
  min-height: 100vh;
  line-height: 1.5;
  background-image: radial-gradient(rgba(0, 0, 0, 0.018) 1px, transparent 1px);
  background-size: 6px 6px;
}

::selection {
  background: #2b2b2b;
  color: #f4d8d8;
}

/* slightly softer centering */
main {
  width: min(100%, 54rem);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem 1.5rem;
}

.panel {
  display: flex;
  flex-direction: column;
}

/* note */
.note {
  width: min(100%, 30rem);
  margin: 0 auto 1rem auto;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: left;
}

/* title */
h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  font-weight: normal;
  line-height: 1.2;
  letter-spacing: 0.01em;
  transform: rotate(-0.2deg);
  max-width: 24rem;
  margin-left: auto;
  margin-right: auto;
}

/* subtitle */
.subtitle {
  margin: 0.75rem auto 2rem auto;
  max-width: 30rem;
  text-align: center;
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  line-height: 1.5;
  color: var(--muted);
  transform: rotate(0.15deg);
}

/* list */
.spaces {
  width: min(100%, 30rem);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.space {
  font-size: clamp(1.15rem, 1.9vw, 1.45rem);
  line-height: 1.45;
  padding: 0.45rem 0;
  border-bottom: 1px dotted var(--soft);
  text-align: left;
  letter-spacing: 0.01em;
  opacity: 0.75;
}

/* imperfections ONLY on homepage */
.panel > .spaces .space:nth-child(odd) {
  transform: rotate(-0.35deg);
  color: #2f2f2f;
}

.panel > .spaces .space:nth-child(even) {
  transform: rotate(0.25deg);
  color: #262626;
}

.panel > .spaces .space:nth-child(3) {
  margin-top: 0.35rem;
}

.panel > .spaces .space:nth-child(5) {
  margin-top: 0.55rem;
}

.space a,
.space a:visited {
  color: inherit;
  text-decoration: none;
}

.space a:hover,
.space a:focus {
  color: var(--link-hover);
  text-decoration: underline;
  letter-spacing: 0.03em;
}

.space.disabled {
  color: var(--muted);
}

/* ================= */
/* ARTICLES CLEAN    */
/* ================= */

.article-column {
  width: min(100%, var(--column));
  margin: 2.3rem auto 0 auto;
}

/* remove rotation + centering weirdness */
.article-column h1 {
  text-align: left;
  font-size: clamp(1.6rem, 2.2vw, 2rem);
  margin: 0 0 0.5rem 0;
  transform: none;
  max-width: none;
}

.article-column .subtitle {
  text-align: left;
  max-width: none;
  margin: 0.5rem 0 1.8rem 0;
  transform: none;
}

/* kill homepage effects */
.article-column .space {
  transform: none !important;
  margin-top: 0 !important;
}

/* content */
.content {
  font-size: 1.25rem;
}

.content p {
  margin: 0 0 1.45rem 0;
  line-height: 1.85;
}

.content p + p {
  text-indent: 1.25rem;
}

.content a,
.content a:visited,
.attachments a,
.attachments a:visited {
  color: var(--link);
}

.content a:hover,
.content a:focus,
.attachments a:hover,
.attachments a:focus {
  color: var(--link-hover);
}

.content ul,
.content ol {
  margin: 0 0 1.45rem 1.4rem;
}

.content li {
  margin: 0.35rem 0;
  line-height: 1.75;
}

.attachments {
  margin-top: 2.8rem;
  padding-top: 1rem;
  border-top: 1px dotted var(--soft);
  opacity: 0.75;
}

.attachments h2 {
  margin: 0 0 0.9rem 0;
  font-size: 1.05rem;
  font-weight: normal;
  color: var(--muted);
}

/* misc */
hr {
  border: 0;
  border-top: 1px dotted var(--soft);
  margin: 2rem 0;
  opacity: 0.7;
}

img {
  display: block;
  max-width: 100%;
  margin: 1.5rem auto;
}

blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--soft);
  color: #3d3d3d;
}

small {
  color: var(--muted);
}

@media (max-width: 640px) {
  main {
    padding: 1.4rem 1rem 2.5rem 1rem;
  }

  h1 {
    font-size: clamp(1.6rem, 7vw, 2.1rem);
    max-width: 20rem;
  }

  .space {
    font-size: 1.08rem;
  }

  .content {
    font-size: 1.16rem;
  }

  .content p + p {
    text-indent: 0.9rem;
  }
}