/* Orthogonal.org — "The Perpendicular" */

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #101214;
  --text: #e8e6e1;
  --muted: #9a968e;
  --accent: #a78bfa;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  font-size: 19px;
  line-height: 1.65;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

.frame {
  display: flex;
  align-items: stretch;
  gap: 1.75rem;
  max-width: 62rem;
  min-height: 100vh;
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
}

.rail h1 {
  margin: 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 2.3rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--text);
}

/* Two borders of one element form the 90-degree corner. */
main {
  flex: 1;
  border-left: 2px solid var(--accent);
  border-top: 2px solid var(--accent);
  padding: 2.25rem 0 2rem 2.25rem;
  max-width: 65ch;
}

main > :first-child {
  margin-top: 0;
}

p {
  margin: 0 0 1.4em;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
}

h2, h3 {
  font-weight: 500;
  letter-spacing: 0.02em;
  margin: 2em 0 0.6em;
}

@media (max-width: 640px) {
  body {
    font-size: 17px;
  }

  .frame {
    flex-direction: column;
    gap: 1.25rem;
    padding: 2rem 1.25rem;
    min-height: auto;
  }

  .rail h1 {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 1.6rem;
  }

  main {
    padding: 1.5rem 0 0 1.25rem;
  }
}
