:root {
  --font-body: "Newsreader", Georgia, "Times New Roman", ui-serif, serif;
  --font-display: "Orbitron", system-ui, sans-serif;
  --font-accent: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  font-family: var(--font-body);
}

body {
  background-color: var(--accent-color);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='40' viewBox='0 0 50 40'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='var(--bg-color)' fill-opacity='0.04'%3E%3Cpath d='M40 10L36.67 0h-2.11l3.33 10H20l-2.28 6.84L12.11 0H10l6.67 20H10l-2.28 6.84L2.11 10 5.44 0h-2.1L0 10l6.67 20-3.34 10h2.11l2.28-6.84L10 40h20l2.28-6.84L34.56 40h2.1l-3.33-10H40l2.28-6.84L47.89 40H50l-6.67-20L50 0h-2.1l-5.62 16.84L40 10zm1.23 10l-2.28-6.84L34 28h4.56l2.67-8zm-10.67 8l-2-6h-9.12l2 6h9.12zm-12.84-4.84L12.77 38h15.79l2.67-8H20l-2.28-6.84zM18.77 20H30l2.28 6.84L37.23 12H21.44l-2.67 8zm-7.33 2H16l-4.95 14.84L8.77 30l2.67-8z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  color: var(--text-color);
  margin: 0;
}

a {
  color: var(--link-color);
}
a:hover {
  color: var(--link-hover);
}

blockquote {
  border-left: 1px solid var(--accent-color);
  margin: 0 0 0 1rem;
  padding: 0 0 0 1rem;
}

hr {
  border-color: var(--accent-color);
  border-width: 0.5px;
}

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

pre {
  overflow-x: auto;
  white-space: pre;
  overflow-wrap: normal;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;

  background-color: var(--bg-code);
  padding: 0.5rem;
  scrollbar-gutter: stable;
}

pre code {
  display: block;
  padding: 0;
  margin: 0;

  white-space: inherit;
  overflow-wrap: inherit;
  font-family: var(--font-accent);
}

code {
  background-color: var(--bg-code);
  font-family: var(--font-accent);
}

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

header {
  padding: 0 1em;
}

header a {
  color: var(--bg-color);
}
header a:hover {
  color: var(--bg-code);
}

.content {
  background-color: var(--bg-color);
  max-width: 84ch;
  padding: 1em;
  display: flow-root;
}

.content p {
  line-height: 1.3;
}

aside {
  background-color: var(--bg-color);
  float: right;
  width: 280px;
  margin: 0 -360px 0 0;
  padding: 0 1rem;
  clear: right;
}

.bio-footer {
  background-color: var(--bg-color);
  border-top: 1px solid var(--accent-color);
  padding: 2rem 1rem;
}

.bio-content {
  display: flex;
  gap: 2rem;
  align-items: center;
  max-width: 76ch;
  margin: 0 auto;
  line-height: 1.3em;
}

.bio-text {
  flex: 1;
}

.bio-text h4 {
  margin: 0 0 1rem 0;
  color: var(--text-color);
}

.bio-text p {
  margin: 0.5rem 0;
  color: var(--text-color);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  color: var(--text-color);
  text-decoration: none;
}

.social-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.social-icon.octicon {
  transform: translate(2px, 2px);
}

.social-links a:hover .social-icon {
  color: var(--link-color);
}

.bio-headshot {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .bio-content {
    flex-direction: column;
    gap: 1rem;
  }

  .bio-headshot {
    width: 100px;
    height: 100px;
  }
}

/* Mobile reset */
@media (max-width: 900px) {
  aside {
    float: none;
    width: auto;
    margin: 0;
    padding: 0 0 0 1rem;
    border-left: 4px solid var(--accent-color);
  }

  blockquote {
    margin: 0;
    padding: 0 0 0 1rem;
  }
}

.home {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  padding: clamp(0.25rem, 2vw, 1rem) 0;
}

.home::before,
.home::after {
  content: "";
  position: absolute;
  inset: -1rem;
  z-index: -2;
  pointer-events: none;
}

.home::before {
  background-image:
    linear-gradient(color-mix(in oklab, var(--text-color) 6%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklab, var(--text-color) 5%, transparent) 1px, transparent 1px),
    linear-gradient(color-mix(in oklab, var(--accent-color) 10%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklab, var(--accent-color) 8%, transparent) 1px, transparent 1px);
  background-size: 2rem 2rem, 2rem 2rem, 8rem 8rem, 8rem 8rem;
  mask-image: linear-gradient(to bottom, black 0 72%, transparent 100%);
  opacity: 0.42;
}

.home::after {
  background-image: radial-gradient(color-mix(in oklab, var(--text-color) 18%, transparent) 0.6px, transparent 0.8px);
  background-size: 5px 5px;
  mix-blend-mode: multiply;
  opacity: 0.18;
}

.home :is(.home-hero, .home-book, .home-articles) {
  position: relative;
  background-image:
    linear-gradient(var(--accent-color), var(--accent-color)),
    linear-gradient(var(--accent-color), var(--accent-color)),
    linear-gradient(var(--accent-color), var(--accent-color)),
    linear-gradient(var(--accent-color), var(--accent-color));
  background-position:
    left top,
    left top,
    right bottom,
    right bottom;
  background-repeat: no-repeat;
  background-size:
    1.25rem 1px,
    1px 1.25rem,
    1.25rem 1px,
    1px 1.25rem;
}

.home :is(.home-hero, .home-book, .home-articles)::selection {
  background: color-mix(in oklab, var(--accent-color) 30%, transparent);
}

.home :is(.home-hero, .home-book) {
  border-left: 3px solid var(--accent-color);
  padding: clamp(1rem, 3vw, 1.75rem) 0 clamp(1.75rem, 4vw, 2.5rem) clamp(1rem, 3vw, 1.75rem);
}

.home :is(.home-hero, .home-book)::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 3px;
  z-index: -1;
  width: min(100% - 3px, 40rem);
  pointer-events: none;
  background: linear-gradient(90deg, color-mix(in oklab, var(--bg-color) 94%, var(--text-color) 6%), var(--bg-color) 68%, transparent);
}

.home :is(.home-hero, .home-book)::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -3px;
  z-index: -2;
  width: 0.55rem;
  pointer-events: none;
  background: var(--accent-color);
  box-shadow: 0 0 0.85rem color-mix(in oklab, var(--accent-color) 28%, transparent);
}

.home-hero h1,
.home-book h2,
.home-articles h2 {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  letter-spacing: -0.04em;
  line-height: 0.96;
  text-wrap: balance;
}

.home-hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  color: var(--text-color);
  text-shadow: 0 0 30px color-mix(in oklab, var(--accent-color) 18%, transparent);
  letter-spacing: 0.02em;
}

.home-book h2,
.home-articles h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 0.02em;
}

.home-hero p,
.home-book p,
.home-articles li {
  font-size: clamp(1.05rem, 1.25vw, 1.1rem);
  line-height: 1.68;
}

.home-hero p {
  max-width: 62ch;
}

.home-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.home-social-links a,
.home-inline-link,
.home-button,
.home-articles__list a {
  font-family: var(--font-accent);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.home-social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 0.9rem;
  border: 1px solid color-mix(in oklab, var(--accent-color) 35%, var(--bg-color));
  background: color-mix(in oklab, var(--bg-color) 88%, var(--accent-color) 12%);
  color: var(--text-color);
  box-shadow: 0.35rem 0.35rem 0 color-mix(in oklab, var(--accent-color) 20%, transparent);
}

.home-social-links a:hover {
  transform: translate(-2px, -2px);
  color: var(--link-color);
  box-shadow: 0.5rem 0.5rem 0 color-mix(in oklab, var(--link-color) 24%, transparent);
}

.home-social-links a:focus-visible,
.home-inline-link:focus-visible,
.home-button:focus-visible,
.home-articles__list a:focus-visible {
  outline: 2px solid var(--link-color);
  outline-offset: 4px;
}

.home-book__layout {
  display: grid;
  gap: clamp(1.6rem, 4vw, 2.25rem);
  margin-top: 1.35rem;
}

.home-book__cover {
  justify-self: start;
  padding: 0.55rem;
  border: 1px solid color-mix(in oklab, var(--accent-color) 30%, var(--bg-color));
  background:
    linear-gradient(135deg, color-mix(in oklab, var(--bg-color) 86%, var(--accent-color) 14%), color-mix(in oklab, var(--bg-color) 96%, var(--link-color) 4%));
  box-shadow: 0.55rem 0.55rem 0 color-mix(in oklab, var(--accent-color) 18%, transparent);
}

.home-book__cover img {
  display: block;
}

.home-book__copy {
  display: grid;
  gap: 0.55rem;
}

.home-book__copy p {
  margin: 0;
}

.home-book__actions {
  margin-bottom: 0;
  padding-top: 0.15rem;
}

.home-book__buy-copy {
  padding-top: 0.35rem;
}

.home-inline-link {
  color: var(--link-color);
  font-weight: 700;
}

.home-inline-link:hover {
  color: var(--link-hover);
}

.home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: 0.1rem;
  padding: 0.75rem 1rem;
  border: 1px solid color-mix(in oklab, var(--accent-color) 45%, var(--bg-color));
  background: color-mix(in oklab, var(--bg-color) 82%, var(--accent-color) 18%);
  color: var(--text-color);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0.55rem 0.55rem 0 color-mix(in oklab, var(--accent-color) 22%, transparent);
}

.home-button:hover {
  transform: translate(-2px, -2px);
  color: var(--text-color);
  box-shadow: 0.7rem 0.7rem 0 color-mix(in oklab, var(--link-color) 24%, transparent);
}

.home-articles {
  border-top: 1px solid color-mix(in oklab, var(--accent-color) 40%, var(--bg-color));
  border-left: 1px solid color-mix(in oklab, var(--accent-color) 24%, var(--bg-color));
  padding-top: clamp(1.25rem, 4vw, 2rem);
  padding-left: clamp(1rem, 3vw, 1.75rem);
}

.home-articles__list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}

.home-articles__list li {
  margin: 0;
}

.home-articles__list a {
  display: block;
  position: relative;
  padding: 0.75rem 0.35rem;
  color: var(--text-color);
  font-size: clamp(1.05rem, 1.2vw, 1.05rem);
  text-decoration: none;
}

.home-articles__list a::before {
  content: "";
  position: absolute;
  left: -0.85rem;
  top: 50%;
  width: 0.45rem;
  height: 1px;
  background: color-mix(in oklab, var(--accent-color) 55%, transparent);
}

.home-articles__list a:hover {
  color: var(--link-color);
  background: linear-gradient(90deg, color-mix(in oklab, var(--accent-color) 12%, transparent), transparent 72%);
  transform: translateX(0.35rem);
}

@media (min-width: 46rem) {
  .home-book__layout {
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
    align-items: start;
  }
}

@media (max-width: 45.999rem) {
  .home :is(.home-hero, .home-book) {
    margin-inline: -1rem;
    padding: 1rem 1rem 1.9rem;
  }

  .home-articles {
    margin-inline: -1rem;
    padding-inline: 1rem;
  }

  .home :is(.home-hero, .home-book)::before {
    inset-inline-start: 3px;
    width: calc(100% - 3px);
  }
}
