@font-face {
  font-family: "Silkscreen";
  src: url("../fonts/silkscreen-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --sheet: #e1f8ff;
  --sheet-soft: #d7f3fb;
  --ink: #18203f;
  --muted: #59627f;
  --violet: #513381;
  --violet-dark: #332059;
  --pink: #e66bc7;
  --border: #79afcb;
  --code-bg: #171b3f;
  --code-ink: #e9fbff;
  --display: "Silkscreen", "Courier New", monospace;
  --reading: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #101447;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--reading);
  font-size: 1.08rem;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

.vaporwave-scene {
  position: fixed;
  z-index: 0;
  inset: 0;
  background-color: #151951;
  background-image: url("../images/vaporwave-palms-reference.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.vaporwave-scene::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(16 19 65 / 10%), rgb(13 17 58 / 22%)),
    radial-gradient(circle at center, transparent 32%, rgb(9 12 47 / 22%) 100%);
  content: "";
}

.skip-link {
  position: fixed;
  z-index: 3;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 0.9rem;
  color: var(--ink);
  background: var(--sheet);
  border: 2px solid var(--violet);
  font-family: var(--display);
  font-size: 0.68rem;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-frame {
  position: relative;
  z-index: 1;
  width: min(820px, calc(100% - clamp(2rem, 8vw, 7rem)));
  margin: clamp(2rem, 6vw, 4.5rem) auto;
  padding: clamp(2.25rem, 5vw, 4rem);
  overflow: hidden;
  background: rgb(225 248 255 / 97.5%);
  border: 2px solid var(--border);
  box-shadow: 14px 14px 0 rgb(21 20 74 / 48%);
}

.page-frame::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--violet) 0 28%, var(--pink) 28% 64%, #65c7e8 64% 100%);
  content: "";
}

::selection {
  color: var(--violet-dark);
  background: #f7b8e8;
}

a {
  color: var(--violet);
  text-decoration-color: var(--pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--violet-dark);
  text-decoration-thickness: 3px;
}

a:focus-visible {
  border-radius: 1px;
  outline: 3px solid var(--pink);
  outline-offset: 4px;
}

.site-header {
  padding: 0.35rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}

.eyebrow,
.section-title,
.post-date {
  margin: 0;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  line-height: 1.5;
  text-transform: uppercase;
}

.draft-label {
  margin-left: 0.55rem;
  color: var(--violet);
}

.site-title {
  max-width: 12ch;
  margin: 0.75rem 0 1rem;
  font-family: var(--display);
  font-size: clamp(2.65rem, 7vw, 4.35rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.98;
  text-wrap: balance;
}

.site-title a {
  color: var(--ink);
  text-decoration: none;
}

.site-description {
  max-width: 42ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.post-list {
  padding-top: 2.4rem;
}

.section-title {
  margin-bottom: 0.8rem;
  color: var(--violet);
}

.post-preview {
  padding: 1.75rem 0 1.9rem;
  border-bottom: 1px solid rgb(121 175 203 / 62%);
}

.post-preview:last-child {
  padding-bottom: 0.25rem;
  border-bottom: 0;
}

.post-preview h3 {
  margin: 0.45rem 0 0.65rem;
  font-family: var(--display);
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.4;
}

.post-preview h3 a {
  color: var(--ink);
  text-decoration-color: var(--pink);
}

.post-preview p:last-child {
  margin: 0;
  color: var(--muted);
}

.empty-state {
  color: var(--muted);
}

.home-link {
  display: inline-block;
  margin-bottom: 3rem;
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.post-header {
  padding: 0.35rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}

.post-header h1 {
  margin: 0.75rem 0 1rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 5.5vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.22;
  text-wrap: balance;
}

.post-summary {
  max-width: 52ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.post-body {
  padding-top: 2.6rem;
}

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

.post-body p,
.post-body li {
  max-width: 67ch;
}

.post-body p {
  margin: 1.15rem 0;
}

.post-body h2,
.post-body h3,
.post-body h4 {
  color: var(--ink);
  font-family: var(--display);
  font-weight: 400;
  text-wrap: balance;
}

.post-body h2 {
  margin: 3rem 0 1rem;
  font-size: 1.22rem;
  line-height: 1.45;
}

.post-body h3 {
  margin: 2.25rem 0 0.9rem;
  font-size: 1rem;
  line-height: 1.5;
}

.post-body h4 {
  margin: 2rem 0 0.75rem;
  font-size: 0.82rem;
  line-height: 1.55;
}

.post-body ul,
.post-body ol {
  margin: 1.25rem 0;
  padding-left: 1.45rem;
}

.post-body li {
  margin: 0.45rem 0;
  padding-left: 0.25rem;
}

.post-body blockquote {
  margin: 1.8rem 0;
  padding: 0.15rem 0 0.15rem 1.3rem;
  color: var(--violet-dark);
  border-left: 4px solid var(--pink);
  font-size: 1.08rem;
  font-style: italic;
}

.post-body blockquote p {
  margin: 0.65rem 0;
}

code {
  padding: 0.12em 0.32em;
  color: var(--violet-dark);
  background: #ccebf5;
  border: 1px solid #a9d7e7;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 0.88em;
}

pre {
  max-width: 100%;
  margin: 1.8rem 0;
  padding: 1.2rem 1.25rem;
  overflow-x: auto;
  color: var(--code-ink);
  background: var(--code-bg);
  border-left: 5px solid var(--pink);
  box-shadow: 5px 5px 0 rgb(67 46 115 / 20%);
  line-height: 1.58;
  tab-size: 2;
}

pre code {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  font-size: 0.88rem;
}

figure {
  margin: 2rem 0;
}

figure img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--sheet-soft);
  border: 2px solid var(--border);
}

figcaption,
.small-note {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

figcaption {
  margin-top: 0.65rem;
}

.small-note {
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

hr {
  width: 6rem;
  margin: 2.75rem 0;
  border: 0;
  border-top: 4px solid var(--pink);
}

@media (max-width: 620px) {
  body {
    font-size: 1rem;
  }

  .vaporwave-scene {
    background-position: 50% center;
  }

  .page-frame {
    width: calc(100% - 1.1rem);
    margin: 0.55rem auto;
    padding: 2.25rem 1.3rem 2.5rem;
    border-width: 1px;
    box-shadow: 5px 5px 0 rgb(21 20 74 / 48%);
  }

  .page-frame::before {
    height: 5px;
  }

  .site-title {
    font-size: clamp(2.15rem, 13vw, 3rem);
  }

  .home-link {
    margin-bottom: 2.4rem;
  }

  .post-header h1 {
    font-size: clamp(1.55rem, 8.5vw, 2.1rem);
  }

  .post-body h2 {
    font-size: 1.05rem;
  }

  pre {
    margin-right: -0.35rem;
    margin-left: -0.35rem;
    padding: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  .vaporwave-scene,
  .skip-link,
  .home-link {
    display: none;
  }

  body {
    color: #000;
    background: #fff;
  }

  .page-frame {
    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 0;
    box-shadow: none;
  }
}
