body,
html {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-color);
  background: var(--background-color);
  margin: 0;
}

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

::selection {
  color: var(--color-lightest);
  background: var(--selection-color);
}

p {
  line-height: var(--line-height-lg);
}

blockquote {
  font-weight: 700;
  font-size: var(--font-size-lg);
  line-height: var(--line-height-lg);
  padding-left: .875rem;
  color: var(--gray-dark);
  border-left: .25rem solid var(--gray-dark);
  word-break: break-word;
}

p,
blockquote {
  margin: 1.25rem 0;
}

:is(body, html, nav .tags, nav .search) svg {
  stroke: var(--text-color);
}

:is(h1, h2, h3, h4, h5, h6, .pill--button) > svg {
  margin-right: .25rem;
  stroke-width: var(--stroke-width-bold) !important;
}

sup.footnote-ref {
  line-height: var(--line-height-xs);
}

/* links */
a {
  color: var(--accent-color);
  transition-property: color;
}

/* links: custom */
:is(.main__title, footer nav:last-child) a {
  color: var(--text-color);
  text-decoration: none;
}

a:hover,
a:focus,
a:active,
:is(.main__title, footer nav:last-child) a:hover,
:is(.main__title, footer nav:last-child) a:focus,
:is(.main__title, footer nav:last-child) a:active {
  color: var(--accent-color-hover);
}

a svg {
  stroke: var(--accent-color);
}

:is(
    a:has(svg):hover,
    a:has(svg):active,
    a:has(svg):focus,
    button:has(svg):hover,
    button:has(svg):active,
    button:has(svg):focus
) svg {
  stroke: var(--accent-color-hover);
}

strong,
.pill--button {
  font-weight: 700;
}

blockquote,
em {
  font-style: italic;
}

button,
.pill--button {
  appearance: none;
  border: none;
}

/* headers */
h1, h2, h3, h4, h5, h6 {
  font-weight: 900;
}

h1 { font-size: var(--font-size-3xl) }
h2 { font-size: var(--font-size-2xl) }
h3 { font-size: var(--font-size-xl) }
h4 { font-size: var(--font-size-lg) }
h5 { font-size: var(--font-size-base) }
h6 { font-size: var(--font-size-sm) }

hr {
  height: 1px;
  background-color: var(--gray-light);
  border: 0;
}

hr.large__spacing {
  margin: 2rem 0 3rem;
}

/* tables */
table {
  display: block;
  overflow-x: auto;
  width: 100%;
  max-width: fit-content;
  margin: 0 auto;
  white-space: nowrap;
  border-radius: var(--rounded-lg);
  border: 1px solid var(--gray-light);
}

table a {
  text-decoration: none;
}

table, th, td {
  border-collapse: collapse;
}

:is(th, td):not(:last-child) {
  border-right: 1px solid var(--gray-light);
}

th,
tr:not(:last-child) {
  border-bottom: 1px solid var(--gray-light);
}

th, td {
  padding: .375rem;
  min-width: 4rem;
  word-break: break-word;
}

th {
  background-color: var(--gray-lighter);
  font-weight: 700;
  text-align: center;
}

/* header */
.main__title {
  width: 100%;
  padding-top: 2rem;
}

.main__title h1 {
  line-height: 1.25;
  margin: 0;
  padding-bottom: .625rem;
  font-size: var(--font-size-2xl);
  line-height: var(--line-height-2xl);
}

/* nav */
nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

nav ul li {
  margin-top: 0;
  margin-bottom: 0;
}

nav ul li:not(:last-child) {
  margin-right: .75rem;
}

nav svg {
  margin-top: .125rem;
}

:is(a:hover, a:active, a:focus) svg,
a svg:hover,
a svg:active,
a svg:focus,
button:hover svg,
button svg:hover,
.theme__toggle:hover,
.theme__toggle svg:hover {
  stroke-width: var(--stroke-width-bold);
}

.active,
.active svg {
  cursor: not-allowed;
}

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

.active svg,
nav ul li .active svg {
  stroke: var(--accent-color);
}

.active:hover svg,
.active svg:hover,
nav ul li .active:hover svg,
nav ul li .active svg:hover {
  stroke-width: var(--stroke-width-default);
}

/* social icons */
.at svg { stroke: var(--brand-hey) !important; }
.brand-github svg { stroke: var(--brand-github) !important; }
.brand-mastodon svg { stroke: var(--brand-mastodon) !important; }
.brand-lastfm svg { stroke: var(--brand-lastfm) !important; }
.device-tv svg { stroke: var(--brand-trakt) !important; }
.books svg { stroke: var(--brand-storygraph) !important; }
.cup svg { stroke: var(--brand-buy-me-a-coffee) !important; }
.heart-handshake svg { stroke: var(--webrings) !important; }
.rss svg { stroke: var(--brand-rss) !important; }

/* layout */
.default__wrapper {
  padding-top: 2rem;
}

.main__wrapper {
  min-height: 100vh;
}

main {
  flex: 1 1 0%;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
}

/* now */
.now__topper,
article {
  border-bottom: 1px solid var(--gray-light);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

.now__topper h2 {
  font-size: var(--font-size-xl);
  margin-top: 0;
  margin-bottom: 1rem;
}

footer nav:first-child {
  gap: .75rem;
  margin-top: 2rem;
  padding: 2rem 0 1rem;
  width: 100%;
}

footer nav:first-child svg {
  margin-top: 0;
}

footer nav:first-child a {
  width: 1.5rem;
  height: 1.5rem;
}

footer nav:last-child {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-sm);
  padding-bottom: 2rem;
}

footer nav:last-child span:not(.active) {
  margin-left: .25rem;
  margin-right: .25rem;
}

.highlight-text {
  padding: .125rem;
  background-color: var(--accent-color);
}

code {
  padding: .125rem;
  color: var(--text-color-inverted);
  background-color: var(--background-color-inverted);
}

/* buttons */
.pill--button {
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  border-radius: var(--rounded-full);
  padding: .5rem 1rem;
  margin: 0 .25rem .75rem 0;
  cursor: pointer;
  text-decoration: none;
  background-color: var(--accent-color);
  transition-property: background-color;
  display: inline-flex;
  flex-direction: row;
}

.pill--button.pill--button__small {
  padding: .25rem .5rem;
  margin-right: .5rem;
  margin-bottom: .5rem;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-sm);
  display: inline-block;
}

.pill--button:hover,
.pill--button:active,
.pill--button:focus {
  background-color: var(--accent-color-hover) !important;
}

.pill--button > svg,
.pill--button svg:hover,
.pill--button svg:active,
.pill--button svg:focus,
.pill--button:hover svg,
.pill--button:active svg,
.pill--button:focus svg {
  stroke: var(--color-lightest) !important;
}

/* articles */
article h2 {
  line-height: var(--line-height-2xl);
  margin: 0 0 .375rem;
}

article [rel="author"],
article time {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-sm);
  margin-right: .25rem;
}

article [rel="author"] {
  margin-bottom: .25rem;
}

/* icons */
svg {
  stroke-width: var(--stroke-width-default);
}

.icon--small > svg {
  width: 1rem;
  height: 1rem;
}

.icon--bold > svg {
  stroke-width: var(--stroke-width-bold);
}

.icon--spin > svg {
  animation: spin 1s linear infinite;
}

.icon--center__vertical > svg {
  display: inline;
  vertical-align: middle;
}

/* lists */
ul, ol {
  padding-left: 1.25rem;
  list-style-position: inside;
}

li {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.link__list li {
  margin-top: .375rem;
  margin-bottom: .375rem;
}

.link__list,
.link__list li:last-child {
  margin-bottom: 0;
}

/* images */
.image__banner,
.image__placeholder.banner {
  border: 1px solid var(--accent-color);
  border-radius: var(--rounded-lg);
  height: auto;
  width: 100%;
}

.image__placeholder {
  background-color: var(--color-darkest);
  justify-content: center;
  width: 100%;
  height: 100%;
}

.image__placeholder > svg {
  stroke: var(--color-lightest) !important;
  stroke-width: var(--stroke-width-bold);
  height: 1.75rem;
  width: 1.75rem;
}

.image__placeholder.round {
  border-radius: var(--rounded-full);
}

.image__placeholder.banner {
  padding: 6rem 0;
  margin: 1rem 0;
}

/* pages */
.page__header {
  font-size: var(--font-size-2xl);
  line-height: var(--line-height-2xl);
  margin-top: 0;
}

/* utilities */
.hidden {
  display: none !important;
}

.no-underline {
  text-decoration: none !important;
}

.text--centered {
  text-align: center !important;
}

.text--blurred {
  color: transparent;
  text-shadow: 0 0 6px var(--text-color);
}

.fade {
  transition-property: opacity;
  transition-timing-function: var(--transition-ease-in-out);
  transition-duration: var(--transition-duration-default);
}

.flex--centered {
  display: flex;
  flex-direction: row;
  align-items: center;
}

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

/* shared styles */
.main__title,
.main__wrapper,
.contact__wrapper {
  display: flex;
  flex-direction: column;
}

.highlight-text,
.pill--button,
.pill--button:hover,
.pill--button:active,
.pill--button:focus {
  color: var(--color-lightest);
}

a:hover,
a:focus,
a:active,
.pill--button:hover,
.pill--button:focus,
.pill--button:active {
  transition-timing-function: var(--transition-ease-in-out);
  transition-duration: var(--transition-duration-default);
}

.pill--button,
footer nav {
  justify-content: center;
}

/* theme toggle */
.theme__toggle,
.theme__toggle svg {
  cursor: pointer;
}

.theme__toggle > .light svg { stroke: var(--sun) !important; }
.theme__toggle > .dark svg { stroke: var(--moon) !important; }

.theme__toggle > .light ,
.theme__toggle > .dark {
  display: none;
}

:is(.theme__light, .theme__dark) .theme__toggle > .placeholder {
  display: none;
}

.theme__dark .theme__toggle > .light {
  display: inline;
}

.theme__dark .theme__toggle > .dark {
  display: none;
}

.theme__light .theme__toggle > .light {
  display: none;
}

.theme__light .theme__toggle > .dark {
  display: inline;
}

/* screens: md */
@media screen and (min-width: 768px) {
  .main__title {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .main__title h1 {
    padding-bottom: 0;
  }

  .now__topper h2 {
    font-size: var(--font-size-2xl);
  }

  main {
    max-width: 768px;
  }

  .main__title h1,
  .page__header {
    font-size: var(--font-size-3xl);
    line-height: var(--line-height-3xl);
  }

  /* lists */
  ul, ol {
    padding-left: 2.5rem;
  }

  footer nav:first-child {
    gap: .75rem;
  }
}
