* { box-sizing: border-box; }

:root {
  --paper: #f3ecd8;
  --ink: #15130f;
  --yellow: #ffe500;
  --pink: #ff6b9d;
  --blue: #4ecdc4;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.65;
}

body {
  margin: 0;
  min-height: 100vh;
}

body::before {
  background-image:
    linear-gradient(rgba(21, 19, 15, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 19, 15, 0.035) 1px, transparent 1px);
  background-size: 16px 16px;
  content: '';
  inset: 0;
  pointer-events: none;
  position: fixed;
}

.sg-letter {
  margin: 0 auto;
  max-width: 850px;
  padding: clamp(44px, 8vw, 100px) 24px 90px;
  position: relative;
}

.sg-letter header {
  border-bottom: 8px solid var(--ink);
  margin-bottom: 42px;
  padding-bottom: 30px;
}

.sg-letter-kicker {
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 0 18px;
}

.sg-letter h1 {
  color: var(--ink);
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: clamp(55px, 13vw, 112px);
  font-weight: 700;
  letter-spacing: -0.09em;
  line-height: 0.76;
  margin: 0;
  text-shadow: 5px 5px 0 var(--yellow);
}

.sg-letter-date {
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 22px 0 0;
}

.sg-letter article {
  font-size: clamp(17px, 2.2vw, 20px);
  max-width: 760px;
}

.sg-letter article > p {
  margin: 0 0 1.35em;
}

.sg-letter a {
  color: var(--ink);
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.sg-letter a:hover {
  background: var(--yellow);
}

.sg-letter-links {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
  margin: 38px 0 44px;
}

.sg-letter-links a {
  background: var(--yellow);
  border: 4px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 105px;
  padding: 16px;
  text-decoration: none;
  transition: transform 80ms linear, box-shadow 80ms linear;
}

.sg-letter-links a:nth-child(2) { background: var(--pink); }
.sg-letter-links a:nth-child(3) { background: var(--blue); }
.sg-letter-links a:hover {
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(3px, 3px);
}

.sg-letter-links span {
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 17px;
  font-weight: 700;
}

.sg-letter-links small {
  font-size: 13px;
  font-weight: 600;
  margin-top: auto;
}

.sg-letter-signature {
  font-family: 'Space Mono', 'Courier New', monospace;
  font-weight: 700;
  margin-top: 42px !important;
}

::selection {
  background: var(--pink);
  color: var(--ink);
}

@media (max-width: 620px) {
  .sg-letter {
    padding-left: 18px;
    padding-right: 18px;
  }

  .sg-letter h1 {
    letter-spacing: -0.1em;
    text-shadow: 4px 4px 0 var(--yellow);
  }

  .sg-letter-links {
    grid-template-columns: 1fr;
  }

  .sg-letter-links a {
    min-height: 82px;
  }
}
