@view-transition {
  navigation: auto;
}

:root[data-theme="Notes"] {
  --c-bg: #fff;
  --c-text: #001d32;
  --c-text-secondary: #97a2aa;
  --c-highlight: #0093ff;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="Notes"] {
    --c-bg: #001423;
    --c-text: #fff;
    --c-text-secondary: #97a2aa;
    --c-highlight: #0093ff;
  }
}

html {
  background: var(--c-bg);
  scroll-behavior: smooth;
}

html,
body {
  font-size: 1em;
}
body {
  font-family: Verdana, "Helvetica Neue", sans-serif;
  line-height: 1.5;
  max-width: 30rem;
  width: 90%;
  margin: 0 auto;
  color: var(--c-text);
}

main a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid;
  transition: 0.1s ease color;
}
main a:hover {
  color: var(--c-highlight);
  border-bottom: 2px solid var(--c-highlight);
}

pre {
  overflow: scroll;
}

body > header {
  margin: 4rem 0 0;
  position: relative;
}
body > header h1 {
  line-height: 1;
  text-indent: 11rem;
}
body > header h1:after {
  content: "";
  width: 0.25rem;
  height: 1.25em;
  background-color: var(--c-highlight);
  display: inline-block;
  position: relative;
  top: 0.2em;
  animation: 1s blink step-end infinite;
}
body > header > :is(h1, p) {
  margin: 0.5rem 0;
  position: relative;
  z-index: 1;
}
body > header p {
  color: var(--c-text-secondary);
  padding-left: 3rem;
  line-height: 1.3;
}
body > header svg {
  position: absolute;
  left: -20px;
  top: -30px;
  fill: var(--c-highlight);
  z-index: 0;
}
@keyframes blink {
  from,
  to {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

article > header > p {
  color: var(--c-text-secondary);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  margin-bottom: 0;
}
article > footer {
  color: var(--c-text-secondary);
  font-size: 0.8125rem;
  margin-bottom: 0;
}
article > footer > ul {
  display: flex;
  list-style-type: none;
  gap: 0.5rem;
  padding: 0;
}
article > footer > ul li:not(:last-child):after {
  content: " · ";
  padding: 0 0.25rem;
}

article header {
  display: flex;
  flex-direction: column;
}
article header h1 {
  order: 2;
}
article h1 {
  text-transform: uppercase;
  letter-spacing: 0.0125rem;
}
article :is(h1, h2, h3, h4) {
  font-size: 1rem;
}
blockquote {
  border-left: 1px solid var(--c-highlight);
  margin: 0;
  padding-left: calc(1.618rem / 2);
}
article {
  margin-bottom: 5rem;
  padding-top: 5rem; /* enough space when anchoring to a thing */
  overflow-wrap: break-word;
}

body > footer {
  margin: calc(100vh - 6rem) 0 2rem;
  color: var(--c-text-secondary);
  font-size: 0.75rem;
}

.highlight {
  color: var(--c-highlight);
}

nav {
  position: sticky;
  top: 0;
  left: 0;
  margin-left: -2rem;
  display: flex;
  gap: 1rem;
  z-index: 10;
  background: var(--c-bg);
  padding: 1rem 0 0.25rem 2rem;
}
nav:after {
  content: "";
  position: absolute;
  width: 100%;
  top: 100%;
  left: 0;
  height: 3rem;
  background: linear-gradient(0deg, transparent, var(--c-bg));
  pointer-events: none;
}

/*@media screen and (min-width: 600px) {
            body {
              margin: 0 0 0 2rem;
            }
            nav {
              left: 2rem;
            }
          }*/

nav > * {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 0 0 10px var(--c-bg);
  background: var(--c-bg);
  transition: 0.3s ease transform;
  width: 48px;
  height: 48px;
  position: relative;
  color: inherit;
  border: none;
}

nav > *:after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--c-text-secondary);
  opacity: 0.25;
}

nav > [aria-current="page"] {
  opacity: 0.125;
  border-color: transparent;
  cursor: default !important;
  pointer-events: none;
}

nav > :first-child {
  z-index: 100;
  margin-right: auto;
}

nav > *:hover {
  color: inherit;
  cursor: pointer;
}

nav svg {
  width: 24px;
  height: 24px;
}

/* nav button svg {
  view-transition-name: nav-icon;
} */

::view-transition-old(nav-icon-shuffle),
::view-transition-new(nav-icon-shuffle) {
  animation: nav-icon-spin 1.5s ease;
}

@keyframes nav-icon-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.archive-nav {
  margin-top: 0.5rem;
  margin-left: 2.25rem;
  border-radius: 50px;
  position: relative;
  z-index: 1;
}
.archive-nav a {
  text-align: center;
  padding: 0.25rem 0.75rem;
  border-radius: 5rem;
  text-decoration: none;
  color: var(--c-text-secondary);
  transition: 0.3s ease color;
}
.archive-nav a:hover {
}
.archive-nav a[aria-current="page"] {
  color: var(--c-bg);
  background-color: var(--c-highlight);
  cursor: default !important;
  pointer-events: none;
}
