/* CSS GOALS:
 * - No build step, vanilla can be tasty too!
 * - Fluid layout and type
 * - Try to keep this expandable for future hacking
 * - Utility classes for most minor cases (manual pseudo-tailwind)
 * - Manual classes where it makes sense (mostly responsive styles)
 *
 * STRUCTURE:
 * - @fonts - Fallback font sizing
 * - @variables - Variables + Colors
 *   - @lightmode
 *   - @darkmode
 * - @globals - Base styles
 *   - @grid - CSS Grid w/breakouts
 *   - @flow - Global spacing with fallbacks
 *   - @type - Default typography definitions
 * - @components - Components / Expanded Elements
 * - @code - Prism Code Highlighting
 * - @animation - CSS animations and transititions
 * - @utility - Utility classes (Pseudo-Tailwind)
 *   - @util-display -
 *   - @util-layout -
 *   - @util-color -
 *   - @util-position -
 *   - @util-spacing -
 *   - @util-type -
 *   - @util-visual -
 *   - @util-size -
 *   - @util-stacking -
 * - @a11y - Accessibility utilities
*/

/* @fonts
 * Better fallbacks + local fonts */

@font-face {
  font-family: Helvetica;
  src: local(Helvetica);
  size-adjust: 105%;
}

@font-face {
  font-family: Arial Narrow;
  src: local(Arial Narrow);
  size-adjust: 86%;
}

/* Gorgeous font from Mathieu Triay via: https://ateliertriay.github.io/bricolage/ */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/https/nathan-long.com/fonts/BricolageGrotesque-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/https/nathan-long.com/fonts/BricolageGrotesque-Bold.woff2') format('woff2');
}

@font-face {
  font-family: 'Bricolage Grotesque 96pt Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/https/nathan-long.com/fonts/BricolageGrotesque96ptCondensed-Bold.woff2') format('woff2');
}

/* JetBrains Mono is the best code font - FIGHT ME */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/https/nathan-long.com/fonts/JetBrainsMono-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/https/nathan-long.com/fonts/JetBrainsMono-Italic.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/https/nathan-long.com/fonts/JetBrainsMono-Bold.woff2') format('woff2');
}

/* @Variables
 * - @lightmode */

:root {
  /* fonts */
  --font-family: 'Bricolage Grotesque', Helvetica;
  --font-family-accent: 'Bricolage Grotesque 96pt Condensed', Arial Narrow,
    sans-serif;
  --font-family-monospace: 'JetBrains Mono', 'Fira Code', 'Source Code Pro',
    'IntelOne Mono', Inconsolata, Consolas, MonoLisa, Monoid, Menlo, Monaco,
    Andale Mono WT, Andale Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono,
    Liberation Mono, Nimbus Mono L, monospace;
  /* animation toggles */
  --transition-toggle: 0;
  --play-state: paused;
  /* colors */
  --color-gray-20: #e0e0e0;
  --color-gray-50: #c0c0c0;
  --color-gray-60: #707070;
  --color-gray-70: #777779;
  --color-gray-90: #333;
  --color-gold: #fee0b4;
  --color-nearwhite: #fcfcfc;
  --color-nearblack: #070707;
  --color-background-offset: #f8f5fa;
  --color-robin-egg: #f5f1f8;
  --color-text-default: var(--color-gray-90);
  --color-text-reduced: var(--color-gray-50);
  --color-text-faint: #e4e6ed;
  /* tokyonight light (modified for better saturation) */
  --color-red: #9f3c4f;
  --color-orange: #a8521f;
  --color-yellow: #9b620d;
  --color-yellow-green: #4e6d2c;
  --color-green: #2c6b61;
  --color-light-cyan: #0f6c7c;
  --color-cyan: #094d74;
  --color-blue: #2b5293;
  --color-magenta: #574082;
  --color-purple: #6d458c;
  --color-offwhite: #2d375f;
  --color-foreground: #a9b1d6;
  --color-text: #4c5478;
  --color-parameters: #6b5128;
  --color-termblack: #0f0f14;
  --color-comments: #9699a3;
  --color-white: #ffffff;
  /* theme binding */
  --theme-background: var(--color-nearwhite);
  --theme-glow: var(--color-robin-egg);
  --theme-text: var(--color-text-default);
  --theme-text-gray: var(--color-gray-70);
  --theme-text-reduced: var(--color-gray-60);
  --theme-text-faint: var(--color-text-faint);
  --theme-editorbg: var(--color-white);
  /* theme constants (don't need rebinding) */
  --theme-link: var(--color-blue);
  --theme-link-visited: var(--color-light-cyan);
  --theme-color-accent: var(--color-text-reduced);
  --theme-divider: var(--color-text-faint);
  /* layout variables */
  --container-padding: 1rem;
  --gap: clamp(1rem, 6vw, 3rem);
  --full: minmax(var(--gap), 1fr);
  --content: min(30em, 100% - var(--gap) * 2);
  --popout: minmax(0, 2rem);
  --feature: minmax(0, 10rem);
  --ease-elastic: cubic-bezier(0.6, 2.07, 0.6, 0.5);
  --ease-easeOutQuad: cubic-bezier(0.5, 1, 0.89, 1);
}

/* @darkmode */
.dark:root {
  --color-gray-20: #e0e0e0;
  --color-gray-50: #808080;
  --color-gray-70: #dad8d8;
  --color-gray-90: #dad8d8;
  --color-gold: #47300e;
  --color-background-offset: #131620;
  --color-black: #000000;
  --color-text-faint: #262c44;
  /* tokyonight storm (modified) */
  --color-red: #f7768e;
  --color-orange: #ff9e64;
  --color-yellow: #e0af68;
  --color-yellow-green: #9ece6a;
  --color-green: #73daca;
  --color-light-cyan: #2ac3de;
  --color-cyan: #7dcfff;
  --color-blue: #7aa2f7;
  --color-magenta: #bb9af7;
  --color-purple: #7aa2f7;
  --color-offwhite: #c0caf5;
  --color-foreground: #a9b1d6;
  --color-text: #9aa5ce;
  --color-parameters: #cfc9c2;
  --color-comments: #565f89;
  --color-navy: #24283b;
  --color-navy-light: #333752;
  /* theme binding */
  --theme-background: var(--color-nearblack);
  --theme-glow: var(--color-black);
  --theme-divider: var(--color-navy-light);
  --theme-editorbg: var(--color-navy);
  color-scheme: dark;
}

.light.party:root {
  --color-background-offset: rgba(250 250 255 / 0.4);
  --color-text: #2e108d;
  --color-text-reduced: rgba(0 0 30 / 0.4);
  --color-text-faint: rgba(0 0 30 / 0.1);
  --color-faint-white: rgba(255 255 255 / 0.9);
  --theme-background: cyan;
  --theme-editorbg: var(--color-faint-white);
  --theme-glow: rgba(255 255 255 / 0.6);
  --theme-link: #b63668;
  --theme-link-visited: #7f165f;
  --theme-text: var(--color-text);
}

.dark.party:root {
  --color-background-offset: rgba(0 0 0 / 0.2);
  --color-text: #d0eea8;
  --color-text-reduced: rgba(230 230 255 / 0.6);
  --color-text-faint: rgba(230 230 255 / 0.2);
  --color-faint-black: rgba(0 0 0 / 0.3);
  --theme-background: indigo;
  --theme-editorbg: var(--color-faint-black);
  --theme-glow: rgba(0 0 0 / 0.3);
  --theme-link: #35ff41;
  --theme-link-visited: #11d43e;
  --theme-divider: rgba(255 255 255 / 0.2);
  --theme-text: var(--color-text);
}

/* @globals */

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

html,
body {
  background-color: var(--theme-background);
  color: var(--theme-text);
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.8;
  margin: 0;
  padding: 0;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--theme-text);
  color: var(--theme-background);
}

::-moz-selection {
  background: var(--theme-text);
  color: var(--theme-background);
}

img {
  max-width: 100%;
  height: auto;
}

input {
  padding: 0.5em;
  font-family: var(--font-family-monospace);
}

input[type="text"], input[type="email"] {
  border: 1px solid var(--theme-divider);
  border-radius: 0;
}

/* @grid - Grid with Breakouts
 * from https://ryanmulligan.dev/blog/layout-breakouts/ */

.content {
  display: grid;
  grid-template-columns:
    [full-start] var(--full)
    [feature-start] var(--feature)
    [popout-start] var(--popout)
    [content-start] var(--content) [content-end]
    var(--popout) [popout-end]
    var(--feature) [feature-end]
    var(--full) [full-end];
  font-size: 18px;
}

.text-content, input {
  font-size: clamp(1.125rem, 0.625vw + 0.875rem, 1.625rem);
}

.content > * {
  grid-column: content;
}

.popout,
.content blockquote,
.content table {
  grid-column: popout;
}

.feature {
  grid-column: feature;
}

.full {
  grid-column: full;
}

.content-inner {
  width: var(--content);
}

/* @flow - global spacing with fallback */

.flow > * + * {
  margin-block-start: var(--flow-space, 1em);
}

.flow-0 {
  --flow-space: 0em;
}

.flow-1 {
  --flow-space: 1em;
}

.flow-3\/2 {
  --flow-space: 1.5em;
}

.flow-2 {
  --flow-space: 2em;
}

.flow-3 {
  --flow-space: 3em;
}

/* @type */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-accent);
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0;
  text-wrap: pretty;
}

.heading-massive {
  font-size: 20vw;
}
h1,
.heading-100 {
  font-size: 3em;
}

h2,
.heading-200 {
  font-size: 2em;
}

.prose h2 {
  border-bottom: 2px dotted var(--theme-divider);
}

h3,
.heading-300 {
  font-size: 1.423em;
}

h4,
.heading-400 {
  font-size: 1.25em;
}

h5,
.heading-500 {
  font-size: 1.125em;
}

strong {
  font-weight: 700;
}

hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--theme-divider);
}

p,
ul,
ol {
  margin-top: 0;
}

p:last-child {
  margin-bottom: 0;
}

p,
.tmpl-post li {
  line-height: 1.5;
}

ul,
ol {
  padding-inline-start: 1lh;
}

li::marker {
  color: var(--color-blue);
}

a {
  color: var(--theme-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 250ms ease-in-out;
}

a:visited {
  color: var(--theme-link-visited);
}

a:hover,
a:focus {
  color: var(--color-red);
  animation: rainbow-text 7000ms linear infinite;
  animation-play-state: var(--play-state);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-style: dotted;
}

table {
  margin: 1em 0;
  border-collapse: collapse;
}

th {
  background-color: var(--theme-text);
  color: var(--theme-background);
  padding: 1ch 2.25ch;
}

td {
  padding: 1ch 2.25ch;
  line-height: 1.375;
}

tr:nth-child(even) {
  background-color: var(--theme-text-faint);
}

/* @components */

.details {
  background-color: var(--theme-editorbg);
  padding: 2ch;
  border: 1px solid var(--theme-divider);
  border-radius: 1ch;
  box-shadow: 0 0 2em var(--theme-glow);
}

blockquote {
  background-color: var(--theme-editorbg);
  padding: 2ch;
  margin-left: 0;
  font-size: 1.125em;
  border-radius: 2ch;
}

.light blockquote {
  box-shadow: 0 0 1.5ch var(--theme-glow);
  border: 1px solid var(--theme-divider);
}

blockquote p {
  margin-bottom: 0.5em;
}

blockquote cite {
  font-size: 0.625em;
}

button {
  background: transparent;
  border: 0;
}

/* Buttons */

.btn {
  border-radius: 0.5em;
  border: 2px solid currentColor;
  display: inline-block;
  font-family: var(--font-family-accent);
  color: var(--theme-text);
  background-color: var(--theme-background);
  padding: 0.375em 0.75em;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    background-color 300ms ease-in-out,
    color 300ms ease-in-out,
    border-color 300ms ease-in-out;
}

.btn:hover {
  background-color: var(--theme-link);
  border-color: var(--theme-link);
  color: var(--theme-background);
  text-decoration: none;
  animation: none;
}

.btn[aria-pressed='true'],
.btn[data-pressed='true'] {
  background-color: var(--theme-link);
  color: var(--theme-background);
  border-color: var(--theme-text);
}

.btn-square {
  padding: 0.75em;
  line-height: 0;
}

.btn-borderless {
  border-width: 0;
}

.btn-group .btn {
  border-radius: 0;
}

.btn-group .btn + .btn {
  margin-left: -2px;
}

.btn-group .btn:first-child {
  border-top-left-radius: 0.5em;
  border-bottom-left-radius: 0.5em;
}

.btn-group .btn:last-child {
  border-top-right-radius: 0.5em;
  border-bottom-right-radius: 0.5em;
}

/* logo */

.logo {
  width: 50px;
  transition-property: transform;
  transition-duration: calc(400ms * var(--transition-toggle));
  transition-timing-function: var(--ease-elastic);
  z-index: 3;
}

.logo:hover {
  transform: rotate(calc(20deg * var(--transition-toggle)));
}

.logo:hover .logo-path {
  fill: var(--color-red);
}

.logo-svg {
  width: 100%;
}

.logo-link {
  display: block;
  line-height: 1;
}

.logo-path {
  fill: var(--theme-link);
  transition: fill 400ms ease-out;
}

/* header and nav  */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  position: relative;
  width: 100%;
}

.nav-wrapper {
  align-items: center;
  flex-grow: 1;
  flex-direction: column;
  position: fixed;
  justify-content: center;
  display: none;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: var(--theme-editorbg);
  padding-top: 3rem;
  z-index: 2;
}

[data-mobile='true'] .nav-wrapper {
  display: flex;
}

@media all and (min-width: 576px) {
  .nav-wrapper {
    padding-top: 0;
    display: flex;
    flex-direction: row;
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    background-color: transparent;
  }
}

.nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 1.125rem;
}

.nav-item {
  list-style: none;
  padding: 0.5rem 2rem;
  font-size: 4vh;
}

.nav-item a:not(:hover) {
  text-decoration: none;
}

.nav-item-active a:not(:hover),
.nav-item-active a:hover {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

@media all and (min-width: 576px) {
  .nav {
    flex-direction: row;
    flex-grow: 1;
    padding-top: 0;
  }

  .nav-item {
    padding: 1rem;
    font-size: 1em;
  }
}

.preferences {
  padding-top: 1rem;
  border-top: 1px solid var(--theme-divider);
  display: flex;
  position: relative;
  z-index: 2;
  width: 100%;
}

.preferences-detail {
  position: static;
  display: flex;
  flex-direction: column;
  transform-origin: top;
  top: 100%;
  right: 0;
  padding: 1em 2em;
  width: 100%;
}

.preferences-trigger {
  display: none;
}

@media all and (min-width: 576px) {
  .preferences {
    width: auto;
    padding-top: 0;
    border: 0;
  }

  .preferences-detail {
    position: absolute;
    width: auto;
    padding: 1em;
    background-color: var(--theme-editorbg);
  }

  :root:not(.dark) .preferences-detail {
    box-shadow: 0 0 2em var(--theme-glow);
  }

  .preferences-trigger {
    display: block;
  }

  [data-pref='false'] .preferences-detail {
    display: none;
  }

  [data-pref='true'] .preferences-detail {
    display: flex;
  }
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 0.325em;
  z-index: 10;
}

.nav-toggle[aria-pressed='true'] [class^='nav-toggle-line-'] {
  background: var(--theme-background);
}

[class^='nav-toggle-line-'] {
  width: 1.5em;
  height: 2px;
  background-color: var(--theme-text);
  transition:
    transform 300ms var(--ease-elastic),
    opacity 300ms ease-out;
}

.nav-toggle-line-top {
  transform-origin: top left;
}

.nav-toggle[aria-pressed='true'] .nav-toggle-line-top {
  transform: rotate(45deg) translate(2px, -3px) scaleX(1.05);
}

.nav-toggle[aria-pressed='true'] .nav-toggle-line-mid {
  opacity: 0;
}

.nav-toggle-line-bottom {
  transform-origin: bottom right;
}

.nav-toggle[aria-pressed='true'] .nav-toggle-line-bottom {
  transform: rotate(-45deg) translate(9px, -11px) scaleX(1.05);
}

@media all and (min-width: 576px) {
  .nav-toggle {
    display: none;
  }
}

.icon {
  width: 1.5em;
  height: 1.5em;
  fill: currentColor;
  line-height: 0;
  transition: fill 300ms ease-in-out;
}

/* gradient accents */

.radial-bottom {
  background: var(--theme-background)
    radial-gradient(
      ellipse at 75% 100%,
      rgba(233, 225, 239, 0.4) 0%,
      rgba(233, 225, 239, 0) 60%
    );
}

.party .radial-bottom {
  background: radial-gradient(
    ellipse at 75% 100%,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0) 60%
  );
}

.radial-top {
  background: var(--theme-background)
    radial-gradient(
      ellipse at 25% 0%,
      rgba(233, 225, 239, 0.4) 0%,
      rgba(233, 225, 239, 0) 60%
    );
}

.party .radial-top {
  background: radial-gradient(
    ellipse at 25% 0%,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0) 60%
  );
}

.dark .radial-bottom {
  background: radial-gradient(
    ellipse at 75% 100%,
    rgba(95, 79, 130, 0.2) 0%,
    rgba(95, 79, 130, 0) 60%
  );
}

.dark.party .radial-bottom {
  background: radial-gradient(
    ellipse at 75% 100%,
    rgba(15, 0, 70, 0.3) 0%,
    rgba(15, 0, 70, 0) 60%
  );
}

.dark .radial-top {
  background: radial-gradient(
    ellipse at 25% 0%,
    rgba(95, 79, 130, 0.2) 0%,
    rgba(95, 79, 130, 0) 60%
  );
}

.dark.party .radial-top {
  background: radial-gradient(
    ellipse at 25% 0%,
    rgba(15, 0, 70, 0.3) 0%,
    rgba(15, 0, 70, 0) 60%
  );
}

.radial-mid {
  background: radial-gradient(
    circle at 50% 0%,
    rgba(233, 225, 239, 0.4) 0%,
    rgba(233, 225, 239, 0) 40%,
    rgba(233, 225, 239, 0) 100%
  );
}

.dark .radial-mid {
  background: radial-gradient(
    circle at 50% 0%,
    rgba(15, 0, 60, 0.3) 0%,
    rgba(15, 0, 60, 0) 45%,
    rgba(15, 0, 60, 0) 100%
  );
}

/* intro */

.intro {
  margin-bottom: 3em;
  padding: 3em 0;
}

.intro-eyebrow {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--theme-link);
}

.intro-title {
  font-size: 4em;
  line-height: 1;
  margin-top: 0.25em;
}

.section-eyebrow {
  font-weight: bold;
  font-size: 0.75em;
  text-transform: uppercase;
  margin-bottom: 3em;
}

.section-eyebrow::after {
  display: inline-block;
  content: '';
  width: 3em;
  border-top: 2px solid currentColor;
  vertical-align: middle;
  margin-left: 0.75em;
}

/* Posts list */

.postlist-date {
  font-size: 0.8125em; /* 13px /16 */
  color: var(--color-gray-90);
}

.postlist-link {
  text-decoration: none;
  font-size: 2em;
  font-weight: 700;
  line-height: 1;
}

/* lab lists */

.lablist-image {
  width: 5em;
  flex-shrink: 0;
}

@media all and (min-width: 576px) {
  .lablist-image {
    width: 7.5em;
  }
}

.lablist-image-link:focus {
  outline-offset: -2px;
}

.lablist-image img {
  transition: transform calc(250ms * var(--transition-toggle))
    var(--ease-easeOutQuad);
}

.lablist-image:hover img {
  transform: scale(1.075);
}

.lablist-content {
  margin-left: 1em;
  flex-grow: 1;
}

/* Tags */

.post-tag {
  text-transform: uppercase;
  background-color: var(--theme-background);
  font-size: 0.625em;
  text-decoration: none;
  font-family: var(--font-family-monospace);
  border: 1px solid var(--theme-divider);
  border-radius: 0.5em;
  padding: 0.5em 0.75em;
  font-weight: bold;
  transition:
    color 250ms ease-in-out,
    background-color 250ms ease-in-out,
    border-color 250ms ease-in-out;
}

.post-tag:hover {
  background-color: var(--theme-link);
  border-color: var(--theme-link);
  color: var(--theme-background);
  animation: none;
  text-decoration: none;
}

/* Direct Links / Markdown Headers */

.header-anchor {
  font-family: sans-serif;
  text-decoration: none;
  font-style: normal;
  margin-left: 0.1em;
}

a[href].header-anchor,
a[href].header-anchor:visited {
  color: transparent;
}

a[href].header-anchor:focus,
a[href].header-anchor:focus:visited,
:hover > a[href].header-anchor,
:hover > a[href].header-anchor:visited {
  color: #aaa;
}

/* Slides */

.slide {
  grid-column: feature;
  display: flex;
  flex-direction: column;
  gap: 1em;
  --flow-space: 2em;
}

.slide-image, .slide-text {
  flex-basis: 100%;
}

.slide-image figcaption {
  font-size: 0.75em;
  font-style: italic;
  color: var(--color-text-reduced);
}

.slide-text {
  --flow-space: 1em;
}

@media all and (min-width: 768px) {
  .slide {
    flex-direction: row;
    gap: 2em;
    --flow-space: 3em;
  }

  .slide-image, .slide-text {
    flex-basis: 50%;
  }
}

/* @random */

.about-inset {
  --border-color: var(--theme-background);
  width: 30vw;
  position: absolute;
  top: -3rem;
  right: -1rem;
  animation: bounce 20s infinite ease-in-out;
  animation-play-state: var(--play-state);
  border: 0.5em solid var(--border-color);
  max-width: 14rem;
}

.dark .about-inset {
  --border-color: var(--theme-background);
}

@media all and (min-width: 768px) {
  .about-inset {
    right: -3rem;
    width: 13vw;
  }
}

.svg-inset {
  position: absolute;
  width: 40vw;
  bottom: -2rem;
  left: -3rem;
  max-width: 18rem;
  /* mix-blend-mode: overlay; */
  opacity: 0.8;
  color: var(--color-gold);
  animation: spin 240s infinite linear;
  animation-play-state: var(--play-state);
}

@media all and (min-width: 768px) {
  .svg-inset {
    width: 22vw;
  }
}

.dark .svg-inset {
  mix-blend-mode: screen;
  opacity: 1;
  color: var(--color-gold);
}

@media all and (min-width: 1280px) {
  .about-inset {
    right: -3rem;
    width: 13vw;
  }

  .svg-inset {
    width: 22vw;
    left: -4em;
    bottom: -2.5rem;
  }
}

/* @party */

.party main,
.party footer {
  z-index: 1;
  position: relative;
}

.party .nav-wrapper {
  z-index: 2;
}

.party-wrapper {
  width: 6em;
  height: 6em;
  border-radius: 100%;
  background-color: var(--theme-glow);
  animation: rainbow-bg 7000ms linear infinite;
  animation-play-state: var(--play-state);
}

.piano-roll-visualizer {
  overflow: hidden;
}

midi-player::part(control-panel) {
  background-color: var(--theme-editorbg);
  border: 2px solid currentColor;
}

midi-player::part(time) {
  font-family: var(--font-family-monospace);
  color: var(--theme-text);
  font-size: 0.825em;
}

midi-player::part(seek-bar) {
  width: 0.25rem;
}

/* @code - Code blocks and Prism Highlighting ======================================= */

pre,
code {
  font-family: var(--font-family-monospace);
  color: var(--color-blue);
  vertical-align: baseline;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  text-align: left;
  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
  font-weight: 400;
}

pre, .code-bg {
  line-height: 1.5;
  box-shadow: 0 0 2em var(--theme-glow);
}

code {
  word-break: break-all;
}

code:not([class*='language']), .code-bg {
  background-color: var(--theme-editorbg);
  border-radius: 0.5ch;
  font-size: 0.9em;
  padding: 0.125em 0.25em;
  border: 1px solid var(--theme-divider);
}

.light code:not([class*='language']), .light .code-bg {
  box-shadow: 0 0 1.5ch var(--theme-glow);
}

code[class*='language-'],
pre[class*='language-'] {
  color: var(--color-offwhite);
  -moz-tab-size: 4;
  -o-tab-size: 4;
  tab-size: 4;
  border-radius: 1ch;
  font-size: 0.875em;
}

pre[class*='language-']::-moz-selection,
pre[class*='language-'] ::-moz-selection,
code[class*='language-']::-moz-selection,
code[class*='language-'] ::-moz-selection {
  text-shadow: none;
  background: var(--color-gold);
}

pre[class*='language-']::selection,
pre[class*='language-'] ::selection,
code[class*='language-']::selection,
code[class*='language-'] ::selection {
  text-shadow: none;
  background: var(--color-gold);
}

@media print {
  code[class*='language-'],
  pre[class*='language-'] {
    text-shadow: none;
  }
}

/* Code blocks */

pre[class*='language-'] {
  padding: 2ch;
  overflow: auto;
  border: 1px solid var(--theme-divider);
}

:not(pre) > code[class*='language-'],
pre[class*='language-'] {
  color: var(--color-text);
  background: var(--theme-editorbg);
}

:not(pre) > code[class*='language-'] {
  padding: 0.1em;
  border-radius: 0.3em;
  white-space: normal;
}

.token.comment,
.token.prolog,
.token.cdata {
  color: var(--color-comments);
  font-style: italic;
}

.token.punctuation {
  color: var(--color-blue);
}

.token.doctype {
  color: var(--color-orange);
}

.token.attr-name {
  color: var(--color-green);
}

.token.selector {
  color: var(--color-yellow);
}

.namespace {
  color: var(--color-text);
}

.token.deleted {
  color: var(--color-red);
  font-style: italic;
}

.token.symbol {
  color: var(--color-blue);
}

.token.property {
  color: var(--color-green);
}

.token.tag,
.token.operator {
  color: var(--color-magenta);
}

.token.keyword {
  color: var(--color-purple);
  font-style: italic;
}

.token.function {
  color: var(--color-blue);
}

.token.parameter {
  color: var(--color-orange);
}

.token.boolean,
.token.constant {
  color: var(--color-orange);
}

.token.number {
  color: var(--color-orange);
}

.token.builtin,
.token.char {
  color: var(--color-light-cyan);
}

.token.inserted {
  color: var(--color-magenta);
  font-style: italic;
}

.token.string,
.token.url,
.token.entity,
.language-css .token.string,
.style .token.string {
  color: var(--color-yellow-green);
}

.token.class-name,
.token.atrule,
.token.attr-value {
  color: var(--color-yellow-green);
}

.token.regex,
.token.important,
.token.variable {
  color: var(--color-red);
}

.token.important,
.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}

/* @animation */

.rainbow-text {
  animation: rainbow-text 10s linear infinite;
  animation-play-state: var(--play-state);
}

.party .rainbow-text {
  animation: rainbow-text 2s linear infinite;
  animation-play-state: var(--play-state);
}

@keyframes rainbow-text {
  0% {
    color: var(--color-red);
  }
  10% {
    color: var(--color-orange);
  }
  30% {
    color: var(--color-green);
  }
  40% {
    color: var(--color-yellow-green);
  }
  60% {
    color: var(--color-cyan);
  }
  70% {
    color: var(--color-blue);
  }
  80% {
    color: var(--color-magenta);
  }
  90% {
    color: var(--color-purple);
  }
  100% {
    color: var(--color-red);
  }
}

@keyframes rainbow-bg {
  0% {
    background-color: var(--color-red);
  }
  10% {
    background-color: var(--color-orange);
  }
  30% {
    background-color: var(--color-green);
  }
  40% {
    background-color: var(--color-yellow-green);
  }
  60% {
    background-color: var(--color-cyan);
  }
  70% {
    background-color: var(--color-blue);
  }
  80% {
    background-color: var(--color-magenta);
  }
  90% {
    background-color: var(--color-purple);
  }
  100% {
    background-color: var(--color-red);
  }
}

@keyframes bounce {
  0% {
    transform: translateY(-5%);
  }
  50% {
    transform: translateY(5%);
  }
  100% {
    transform: translateY(-5%);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* @utility (Pseudo-Tailwind) */
/* Because utility classes are awesome, fight me! */

/* @util-border */

/* @util-display */

.inline-block {
  display: inline-block;
}

.inline {
  display: inline;
}

.block {
  display: block;
}

.flex {
  display: flex;
}

/* @util-layout */

.flex-col {
  flex-direction: column;
}

.flex-col-to-row, .flex-col-to-row-medium {
  flex-direction: column;
}

.flex-row-to-col, .flex-row-to-col-medium {
  flex-direction: row;
}

@media all and (min-width: 576px) {
  .flex-col-to-row {
    flex-direction: row;
  }

  .flex-row-to-col {
    flex-direction: column;
  }
}

@media all and (min-width: 768px) {
  .flex-col-to-row-medium {
    flex-direction: row;
  }

  .flex-row-to-col-medium {
    flex-direction: column;
  }
}

.flex-row {
  flex-direction: row;
}

.flex-wrap {
  flex-wrap: wrap;
}

.grow {
  flex-grow: 1;
}

.no-shrink {
  flex-shrink: 0;
}

.gap-1\/4 {
  gap: 0.25em;
}

.gap-1\/2 {
  gap: 0.5em;
}

.gap-1 {
  gap: 1em;
}

.gap-2 {
  gap: 2em;
}

.justify-start {
  justify-content: flex-start;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.items-baseline {
  align-items: baseline;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.block {
  display: block;
}

.order-1-to-2-medium {
  order: 1
}

.order-2-to-1-medium {
  order: 2;
}

@media all and (min-width: 768px) {
  .order-1-to-2-medium {
    order: 2;
  }

  .order-2-to-1-medium {
    order: 1;
  }
}

.border-0 {
  border-width: 0;
}

.border-1 {
  border-width: 1px;
}

.border-divider {
  border-color: var(--theme-divider);
}

.border-standard {
  border: 1px solid var(--theme-divider);
}

.two-columns {
  columns: 2;
}

@media (min-width: 576px) {
  .two-columns-md {
    columns: 2;
  }
}

.break-inside-avoid {
  break-inside: avoid;
}

/* @util-color */

.bg-editor {
  background-color: var(--theme-editorbg);
}

.bg-background-offset {
  background-color: var(--color-background-offset);
}

.color-faint {
  color: var(--theme-text-faint);
}

.color-reduced,
a.color-reduced {
  color: var(--theme-text-reduced);
}

.color-text {
  color: var(--theme-text);
}

.color-gray {
  color: var(--theme-text-gray);
}

.color-background {
  color: var(--theme-background);
}

.color-accent {
  color: var(--theme-color-accent);
}

.h-auto {
  height: auto;
}

.h-full {
  height: 100%;
}

/* @util-position */

.fixed {
  position: fixed;
}

.absolute {
  position: absolute;
}

.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.inset-lower-right {
  bottom: 0;
  right: 0;
}

.inset-lower {
  bottom: 0;
  left: 0;
  right: 0;
}

.inset-right {
  top: 0;
  right: 0;
  bottom: 0;
}

.relative {
  position: relative;
}

.top-1\/2 {
  top: 0.5em;
}

.left-1\/2 {
  left: 0.5em;
}

.top-1 {
  top: 1em;
}

.left-1 {
  left: 1em;
}

.lh-0 {
  line-height: 0;
}

.lh-1 {
  line-height: 1;
}

/* @util-spacing */

.m-0 {
  margin: 0;
}

.mt-0 {
  margin-top: 0;
}

.mt-1\/2 {
  margin-top: 0.5em;
}

.mt-1 {
  margin-top: 1em;
}

.mt-2 {
  margin-top: 2em;
}

.mt-3 {
  margin-top: 3em;
}

.mt-4 {
  margin-top: 4em;
}

.mt-4-neg {
  margin-top: -4.5em;
}

.mt-content {
  margin-top: 2rem;
}

@media all and (min-width: 768px) {
  .mt-content {
    margin-top: 4rem;
  }
}

.mb-content {
  margin-bottom: 4rem;
}

.mr-1 {
  margin-inline-end: 1em;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1\/4 {
  margin-bottom: 0.25em;
}

.mb-1\/2 {
  margin-bottom: 0.5em;
}

.mb-1 {
  margin-bottom: 1em;
}

.mb-2 {
  margin-bottom: 2em;
}

.mb-3 {
  margin-bottom: 3em;
}

.mb-4 {
  margin-bottom: 4em;
}

.mt-n2 {
  margin-top: -2em;
}

.ml-auto {
  margin-left: auto;
}

.ml-1 {
  margin-left: 1em;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.my-1 {
  margin-top: 1em;
  margin-bottom: 1em;
}

.my-2 {
  margin-top: 2em;
  margin-bottom: 2em;
}

.my-3 {
  margin-top: 3em;
  margin-bottom: 3em;
}

.min-w-5 {
  min-width: 5em;
}

.p-0 {
  padding: 0;
}

.p-1\/2 {
  padding: 0.5em;
}

.p-1 {
  padding: 1em;
}

.pt-0 {
  padding-top: 0;
}

.pt-1\/2 {
  padding-top: 0.5em;
}

.px-1\/2 {
  padding-right: 0.5em;
  padding-left: 0.5em;
}

.px-1rem {
  padding-right: 1rem;
  padding-left: 1rem;
}

.py-1\/2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-1 {
  padding-top: 1em;
  padding-bottom: 1em;
}

.py-2 {
  padding-top: 2em;
  padding-bottom: 2em;
}

.py-3 {
  padding-top: 3em;
  padding-bottom: 3em;
}

.pl-2 {
  padding-left: 2em;
}

.space-x-1 > * + * {
  margin-left: 1em;
}

.space-y-1 > * + * {
  margin-top: 1em;
}

.space-y-2 > * + * {
  margin-top: 2em;
}

/* @util-type */

.list-none {
  list-style: none;
}

.text-small {
  font-size: 0.75em;
}

.text-large {
  font-size: 2em;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.font-bold {
  font-weight: bold;
}

.font-small {
  font-size: 0.875em;
}

.font-xsmall {
  font-size: 0.5em;
}

.font-thin {
  font-family: var(--font-family-accent);
}

.font-mono {
  font-family: var(--font-family-monospace);
}

.leading-none {
  line-height: 0;
}

.leading-1 {
  line-height: 1;
}

.leading-sm {
  line-height: 1.125;
}

.leading-md {
  line-height: 1.25;
}

.decoration-none {
  text-decoration: none;
}

.uppercase {
  text-transform: uppercase;
}

.capitalize {
  text-transform: capitalize;
}

.wrap-balance {
  text-wrap: balance;
}

.wrap-pretty {
  text-wrap: pretty;
}

/* @util-divide */

.divide-y > * + * {
  border-top: 1px solid var(--color-gray-90);
}

.after\:color-text:after {
  color: var(--theme-text);
}

/* @util-visual */

.opacity-25 {
  opacity: 0.25;
}

.opacity-50 {
  opacity: 0.5;
}

.overflow-hidden {
  overflow: hidden;
}

:root:not(.dark) .shadow-light-only {
  box-shadow: 0 0 2em var(--theme-glow);
}

.rounded-full {
  border-radius: 100%;
}

.rounded-1 {
  border-radius: 1rem;
}

/* @util-size */

.w-full {
  width: 100%;
}

.w-1\/2 {
  width: 50%;
}

.w-3 {
  width: 3em;
}

.w-7 {
  width: 7em;
}

.aspect-square {
  aspect-ratio: 1/1;
}

@media all and (min-width: 768px) {
  .w-1\/2-medium {
    width: 50%;
  }
}

/* @util-stacking */

.z-n1 {
  z-index: -1;
}

.z-1 {
  z-index: 1;
}

.z-2 {
  z-index: 2;
}

.z-3 {
  z-index: 3;
}

.z-4 {
  z-index: 4;
}

/* @a11y */
/* screen readers */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sr-only-focus:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.skip-link {
  background: var(--theme-background);
  left: 0;
  top: 0;
  display: inline-block;
}

.skip-link:focus {
  position: absolute;
  padding: 0.5rem;
}

/* Party Animation */

.pixi-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* 404 Animation */

.zdog-canvas {
  position: static;
  width: 60vw;
  height: auto;
  aspect-ratio: 1/1;
  transform: translateY(-15%);
}

.animation404-first {
  margin-right: -15vw;
}

.animation404-last {
  margin-left: -15vw;
}

@media all and (min-width: 768px) {
  .zdog-canvas {
    width: 35vw;
  }

  .animation404-first {
    margin-right: -8vw;
  }

  .animation404-last {
    margin-left: -8vw;
  }
}
