:root {
  --width: 700px;

  --foreground: oklch(83.3% 0 0);
  --background: oklch(15.4% 0 0);
  --muted: oklch(60.0% 0 0);

  --header-background: oklch(23.5% 0 0);

  --header-height: 60px;
  --footer-height: 60px;

  --brand-skyblue: oklch(79.9% 0.073 220);
  --brand-violet: oklch(76.0% 0.121 309);
  --brand-pink: oklch(71.4% 0.125 21);
}

/* Inter variable font (SIL OFL 1.1), self-hosted from public/fonts. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

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

html {
  scrollbar-gutter: stable both-edges;
}

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: "Inter", sans-serif;
  color: var(--foreground);
  background-color: var(--background);
}

a {
  color: inherit;
  text-decoration: none;
}

.wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  row-gap: 36px;
  min-height: 100vh;
}

a[href*="//"]:not([href*="//ozkxr.xyz"])::after {
  content: "°";
}

a:focus-visible {
  outline: 2px solid var(--brand-pink);
  outline-offset: 2px;
  border-radius: 2px;
}

/* HEADER */

.header {
  view-transition-name: site-header;
  display: flex;
  max-width: min(calc(100vw - 24px), var(--width));
  height: var(--header-height);
  align-items: center;
  justify-content: center;
  border-bottom: 1px var(--header-background) solid;
}

.header-content {
  display: flex;
  width: var(--width);
  align-items: center;
  padding: 0px 12px;
  user-select: none;
}

.home-link {
  display: flex;
  align-items: center;
  width: 32px;
  height: 42px;
}

/* Grey outline at rest; the bolt's gradient fills in on hover/focus. */
.logo path {
  fill: transparent;
  stroke: var(--muted);
  stroke-width: 0.66;
  paint-order: stroke;
}

.home-link:hover .logo path,
.home-link:focus-visible .logo path {
  fill: url(#logo-gradient);
}

/* NAV */

.nav {
  display: flex;
  flex-direction: row;
  height: 40px;
  padding: 0px 10px;
  align-items: center;
  user-select: none;
}

.nav a {
  display: inline-block;
  height: 1.4em;
  padding: 0.1em;
  border-radius: 2px;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--background);
  background-color: var(--foreground);
}

.nav span {
  color: var(--muted);
  white-space: pre;
}

.nav a[aria-current="page"] {
  color: var(--background);
  background-color: var(--foreground);
}

/* MAIN */

.main {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  width: min(calc(100vw - 24px), var(--width));
  padding: 0px 30px;
}

/* MARKDOWN */

.main h1 {
  margin-bottom: 30px;
  font-weight: 900;
}

.main h2 {
  margin-bottom: 30px;
}

.main h3 {
  margin-bottom: 30px;
}

.main p {
  line-height: 1.4em;
  margin-bottom: 30px;
}

.main > ul {
  margin-bottom: 30px;
}

.main ul {
  list-style-type: "–> ";
  padding-left: 1.6em;
}

.main ol {
  margin-bottom: 30px;
  padding-left: 1.6em;
}

.main li {
  line-height: 1.4em;
  list-style-position: outside;
}

.main a {
  color: var(--brand-pink);
}

.main a:hover,
.main a:focus-visible {
  color: var(--background);
  background: var(--brand-pink);
  border-radius: 2px;
}

/* FOOTER */

.footer {
  display: flex;
  flex-direction: column;
  width: var(--width);
  height: 60px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

/* LIGHTNING */

.lightning {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - var(--header-height) - var(--footer-height) - 96px);
}
