@font-face {
  font-family: "Frank Ruhl Libre";
  src: url("fonts/frank-ruhl-libre-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Frank Ruhl Libre";
  src: url("fonts/frank-ruhl-libre-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

:root {
  --page: #f8f8f8;
  --text: #2f2f2f;
  --strong: #111111;
  --underline: #cccccc;
  --edge: clamp(1rem, 4vw, 1.5rem);
  --main-block: 18.08em;
}

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

html {
  min-height: 100%;
  background: var(--page);
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: "Frank Ruhl Libre", Georgia, serif;
  font-size: 18px;
  line-height: 1.5rem;
}

a,
a:visited {
  color: var(--strong);
  text-decoration: underline;
  text-decoration-color: var(--underline);
  text-underline-offset: 0.2rem;
  -webkit-tap-highlight-color: transparent;
}

a:active,
button:active,
[role="button"]:active {
  background: transparent;
  box-shadow: none;
  text-shadow: none;
}

a:hover {
  text-decoration-color: var(--strong);
}

a:focus-visible {
  outline: 2px solid var(--strong);
  outline-offset: 4px;
}

b,
strong,
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--strong);
  font-weight: 600;
}

.site-header,
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 1rem var(--edge);
}

.site-header {
  top: 0;
  justify-content: flex-start;
}

.site-header h1 {
  margin: 0;
  padding: 0;
  font-size: 1.08rem;
  line-height: 1.3;
}

.brand-link,
.brand-link:visited {
  --brand-core-shift: -1.48em;
  position: relative;
  display: inline-flex;
  width: 10.4em;
  height: 1.35em;
  align-items: baseline;
  color: var(--strong);
  text-decoration: none;
}

.brand-text {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
}

.brand-away,
.brand-keep,
.brand-gap {
  display: inline-block;
  transform-origin: center;
}

.brand-away {
  position: relative;
  z-index: 1;
  display: inline-flex;
  overflow: visible;
  max-width: 4.2em;
  opacity: 1;
  transition: opacity 1600ms ease;
}

.brand-letter {
  display: inline-block;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  transform-origin: center;
}

.brand-core {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: baseline;
  background: var(--page);
  transform: translate3d(0, 0, 0);
  transition: transform 2600ms cubic-bezier(0.42, 0, 0.18, 1);
  will-change: transform;
}

.brand-core::before {
  content: "";
  position: absolute;
  inset: -0.05em -0.42em -0.05em;
  z-index: -1;
  background: var(--page);
  opacity: 0;
  transition: opacity 500ms ease;
}

.brand-keep,
.brand-gap {
  position: relative;
  max-width: 5.2em;
  transform: none;
  transition: none;
}

.brand-gap {
  width: 0.28em;
  flex: 0 0 0.28em;
}

.brand-link.is-brand-faded .brand-away {
  opacity: 0;
}

.brand-link.is-brand-shifted .brand-core::before {
  opacity: 1;
}

.brand-link.is-brand-shifted .brand-core {
  transform: translate3d(var(--brand-core-shift, 0), 0, 0);
}

.back-link,
.back-link:visited {
  display: inline-flex;
  height: 1.35em;
  align-items: baseline;
  color: var(--strong);
  text-decoration: none;
  transition: none;
}

.back-link:hover,
.back-link:focus-visible {
  opacity: 1;
}

main {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(4.5rem, 12vh, 6rem) var(--edge);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

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

.content {
  width: var(--main-block);
  max-width: calc(100vw - (2 * var(--edge)));
  font-size: 1.215rem;
  line-height: 1.8225rem;
  min-height: 9.92125em;
  text-align: left;
  transform: translateX(var(--anchor-shift, 0));
  pointer-events: auto;
}

.intro h2,
.projects h2,
.k-note h2 {
  margin: 0 0 1.25rem;
  display: inline-block;
  font-size: 1.62rem;
  line-height: 1.35;
}

.typing-title {
  min-height: 1.35em;
}

.projects h2,
.k-note h2 {
  min-height: 1.35em;
}

.typing-text {
  display: inline-block;
  min-width: var(--typing-width, auto);
}

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

.typing-measure {
  position: fixed;
  left: 0;
  top: 0;
  visibility: hidden;
  white-space: nowrap;
  pointer-events: none;
}

.typing-caret {
  display: inline-block;
  position: relative;
  width: 0;
  height: 1.62em;
  margin: 0;
  background: transparent;
  transform: translate3d(0, 0, 0);
  transition: transform 1100ms cubic-bezier(0.42, 0, 0.18, 1);
  vertical-align: -0.34em;
}

.typing-caret::before {
  content: "";
  position: absolute;
  left: 0.04em;
  top: 0;
  width: 1px;
  height: 100%;
  background: currentColor;
}

.typing-caret.is-flashing {
  animation: caret-blink var(--caret-blink-duration, 1500ms) steps(1, end) var(--caret-blink-count, 2);
}

@keyframes caret-blink {
  0%,
  48% {
    opacity: 1;
  }

  49%,
  100% {
    opacity: 0;
  }
}

.intro {
  min-height: 9.92125em;
}

.intro p,
.projects dt,
.projects dd,
.k-note p {
  margin: 0 0 1rem;
  font-size: 1em;
  line-height: inherit;
}

.intro h2,
.intro p,
.projects dt,
.projects dd,
.k-note h2,
.k-note p {
  white-space: nowrap;
}

.projects dl {
  margin: 0;
}

.projects {
  min-height: 9.92125em;
  font-size: inherit;
  line-height: inherit;
  transform: none;
}

.projects h2,
.k-note h2 {
  font-size: 1.62rem;
}

.projects dl {
  filter: blur(5px);
  user-select: none;
}

.projects dt {
  color: var(--text);
}

.project-name {
  display: inline-block;
  line-height: inherit;
}

.projects dd {
  padding: 0;
  color: var(--text);
}

.k-note {
  min-height: 9.92125em;
  font-size: inherit;
  line-height: inherit;
}

.site-footer {
  bottom: 0;
  justify-content: flex-start;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.site-footer ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  display: inline-flex;
  line-height: 0;
}

.icon-link {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

span.icon-link {
  cursor: default;
}

.icon-link:visited {
  text-decoration: none;
}

.footer-text,
.footer-text-link,
.footer-text-link:visited {
  display: inline-flex;
  height: 16px;
  align-items: center;
  color: var(--strong);
  font-size: 0.95rem;
  font-family: "Frank Ruhl Libre", Georgia, serif;
  line-height: 16px;
  opacity: 0.5;
  text-decoration: none;
  transition: opacity 160ms ease;
}

.icon-link img {
  width: 16px;
  height: 16px;
  opacity: 0.5;
  transition: opacity 160ms ease;
}

.kigex-mark {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  border-radius: 3px;
  background: var(--strong);
  color: var(--page);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 16px;
  font-weight: 400;
  line-height: 16px;
  opacity: 0.5;
  overflow: hidden;
  text-decoration: none;
  transition: opacity 160ms ease;
}

.kigex-mark.k-note-mark {
  width: 0.98em;
  height: 0.98em;
  margin: 0 0.015em 0 -0.015em;
  border-radius: 0.16em;
  font-size: 0.78em;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 400;
  line-height: 1;
  opacity: 0.5;
  vertical-align: 0.025em;
}

.k-note-bang {
  display: inline-block;
  margin-left: 0.04em;
}

.icon-link:hover img,
.icon-link:focus-visible img,
.icon-link:hover .kigex-mark,
.icon-link:focus-visible .kigex-mark,
.footer-text-link:hover,
.footer-text-link:focus-visible {
  opacity: 1;
}

@media (max-width: 540px) {
  body {
    font-size: 17px;
  }

  .content {
    font-size: clamp(0.91rem, 4.25vw, 1rem);
    line-height: 1.5rem;
  }

  .intro h2,
  .projects h2,
  .k-note h2 {
    font-size: 1.5rem;
  }

  .projects,
  .k-note {
    width: calc(100vw - (2 * var(--edge)));
    min-height: 11.2475rem;
    font-size: clamp(0.91rem, 4.25vw, 1rem);
    line-height: 1.5rem;
    transform: none;
  }

  .projects h2,
  .k-note h2 {
    min-height: 1.665em;
  }

  main {
    padding-left: var(--edge);
    padding-right: var(--edge);
  }
}

@media (max-width: 360px) {
  :root {
    --edge: 0.5rem;
  }

  .k-note h2 {
    font-size: clamp(1.35rem, 7vw, 1.5rem);
  }
}

@media (max-height: 540px) {
  body {
    display: flex;
    flex-direction: column;
  }

  .site-header,
  .site-footer {
    position: static;
  }

  main {
    position: static;
    flex: 1;
    min-height: min(28rem, 100dvh);
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
