:root {
  --background: #fcfcfc;
  --rurikon-100: #d8dbdf;
  --rurikon-200: #b3b9c1;
  --rurikon-300: #8c95a1;
  --rurikon-400: #697381;
  --rurikon-500: #4a515b;
  --rurikon-600: #3b4149;
  --rurikon-700: #2b3035;
  --rurikon-800: #1e2125;
  --rurikon-border: #d8dbdfb3;
  --spacing: 0.25rem;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  touch-action: manipulation;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  padding: 1.5rem;
  background: var(--background);
  color: var(--rurikon-500);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.875rem;
  line-height: 1.5rem;
  font-feature-settings: "cpsp" 1, "cv01", "cv03", "cv04", "calt", "ss03", "liga", "ordn";
  font-variant: common-ligatures contextual;
  font-variation-settings: "wght" 440, "opsz" 32;
  letter-spacing: 0.0085em;
  word-spacing: -0.04em;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

.layout {
  display: flex;
  flex-direction: column;
}

.mobile-fade {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  width: 100%;
  height: 1.5rem;
  pointer-events: none;
  background: linear-gradient(#fff 0%, #ffffffa1 14%, #ffffff5c 29%, #ffffff30 43%, #ffffff14 57%, #ffffff05 71%, #fff0 86% 100%);
}

nav {
  width: 100%;
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  font-style: italic;
  letter-spacing: -0.006em;
  word-spacing: 0;
}

nav ul {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  text-align: right;
  text-transform: lowercase;
}

nav li {
  margin-inline: -0.5rem;
}

.nav-link {
  display: inline-block;
  width: 100%;
  padding-inline: 0.5rem;
  color: var(--rurikon-300);
  text-decoration: none;
  transition: color 150ms;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--rurikon-600);
}

.nav-link.active {
  color: var(--rurikon-800);
}

.nav-link:focus-visible,
article a:focus-visible,
.post-row:focus-visible {
  border-radius: 0.125rem;
  outline: 1px dotted var(--rurikon-400);
  outline-offset: 1px;
}

main {
  position: relative;
  flex: 1;
  max-width: 42rem;
  contain: inline-size;
  hanging-punctuation: first allow-end last;
  hyphens: auto;
  hyphenate-limit-chars: 10 6 6;
}

.divider {
  position: absolute;
  right: 0;
  width: 100%;
  height: 1px;
  background: var(--rurikon-border);
  opacity: 0.5;
  mix-blend-mode: multiply;
}

article {
  padding-top: 1.5rem;
  view-transition-name: crossfade;
}

h1,
h2,
h3 {
  color: var(--rurikon-600);
  font-size: inherit;
  line-height: inherit;
  font-weight: 600;
  font-variation-settings: "wght" 600, "opsz" 32;
  text-wrap: balance;
}

h1 {
  margin: 0 0 1.75rem;
}

h2 {
  margin: 3.5rem 0 1.75rem;
}

h3 {
  margin: 2.5rem 0 1.75rem;
}

p,
article ul,
article ol,
blockquote,
pre {
  margin: 1.75rem 0 0;
}

article a {
  color: inherit;
  overflow-wrap: break-word;
  text-decoration-line: underline;
  text-decoration-color: var(--rurikon-300);
  text-decoration-thickness: from-font;
  text-underline-offset: 2px;
}

article a:hover {
  text-decoration-color: var(--rurikon-600);
}

article ul:not(.post-list),
article ol {
  padding-left: 1.25rem;
}

article ul:not(.post-list) li,
article ol li {
  padding-left: 0.375rem;
}

article li::marker {
  color: var(--rurikon-200);
}

blockquote {
  padding-left: 1rem;
  box-shadow: 1px 0 0 var(--rurikon-500) inset;
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  font-style: italic;
  letter-spacing: -0.006em;
}

hr {
  width: 6rem;
  margin: 3.5rem 0;
  border: 0;
  border-top: 1px solid var(--rurikon-border);
}

code {
  color: #00317f;
  font-family: "Iosevka Fixed", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92em;
  word-spacing: -0.15em;
}

pre {
  overflow-x: auto;
  padding: 0.875rem 1.25rem;
  background: #f7f7f7;
  -webkit-font-smoothing: auto;
}

pre code {
  display: inline-block;
  min-width: 100%;
  padding: 0;
  color: #414141;
  line-height: 1.45rem;
  white-space: pre;
}

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

.post-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-list li {
  font-weight: 500;
  font-variation-settings: "wght" 500, "opsz" 32;
}

.post-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  margin-inline: -0.5rem;
  padding-inline: 0.5rem;
  color: var(--rurikon-500);
  text-decoration: none;
}

.post-row:hover,
.post-row:focus-visible {
  color: var(--rurikon-700);
}

.post-row time {
  display: block;
  align-self: flex-start;
  color: var(--rurikon-200);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
  white-space: nowrap;
  transition: color 150ms;
}

.post-row:hover time,
.post-row:focus-visible time {
  color: var(--rurikon-500);
}

.dot-leaders {
  flex: 1;
  height: 1em;
  overflow: hidden;
  color: var(--rurikon-100);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 6px;
  line-height: 1;
  text-align: end;
  word-wrap: break-word;
}

.dot-leaders::after {
  content: "······································································";
}

::selection {
  color: #485a74;
  background: #95a5ac40;
}

@supports (view-transition-name: none) {
  @media not (prefers-reduced-motion: reduce) {
    ::view-transition-old(crossfade) {
      animation: 0.4s cubic-bezier(0.6, 0, 0.8, 1) forwards hide;
    }

    ::view-transition-new(crossfade) {
      opacity: 0;
      animation: 0.6s 0.2s forwards appear;
    }
  }
}

@keyframes hide {
  from {
    opacity: 1;
    filter: blur(0);
  }

  to {
    opacity: 0;
    filter: blur(4px);
  }
}

@keyframes appear {
  from {
    opacity: 0;
    filter: blur(4px);
  }

  to {
    opacity: 1;
    filter: blur(0);
  }
}

@media (min-width: 420px) {
  .layout {
    flex-direction: row;
  }

  nav {
    width: 4rem;
    margin-right: 1.5rem;
  }

  nav ul {
    position: sticky;
    top: 1.5rem;
    display: block;
    margin-bottom: 0;
  }

  .divider {
    left: 0;
    right: auto;
    width: 1px;
    height: 100%;
    opacity: 1;
  }

  article {
    padding-top: 0;
    padding-left: 1.5rem;
  }
}

@media (min-width: 40rem) {
  body {
    padding: 2.5rem;
    font-size: 15px;
    line-height: 1.75rem;
  }

  .mobile-fade {
    display: none;
  }

  nav {
    margin-right: 2.5rem;
  }

  nav ul {
    top: 2.5rem;
  }

  article {
    padding-left: 2.5rem;
  }
}

@media (min-width: 48rem) {
  body {
    padding: 3.5rem;
    font-size: 1rem;
  }

  nav {
    margin-right: 3.5rem;
  }

  nav ul {
    top: 3.5rem;
  }

  article {
    padding-left: 3.5rem;
  }
}
