:root {
  color-scheme: light;
  --page: #f4f7f9;
  --surface: #e9eef2;
  --text: #10151b;
  --muted: #68737e;
  --line: #d8dee4;
  --accent: #69c7f5;
  --focus: #168dc8;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, "Courier New", monospace;
  --wipe-x: calc(100vw - 50px);
  --wipe-y: 42px;
  background: var(--page);
  color: var(--text);
  font-family: var(--mono);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #090d12;
  --surface: #121922;
  --text: #e9eff4;
  --muted: #85919c;
  --line: #202833;
  --accent: #79d2ff;
  --focus: #79d2ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 280px;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--page);
  color: var(--text);
  transition: background-color 300ms ease, color 300ms ease;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

a {
  color: inherit;
}

.home {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  background: var(--page);
}


.site-header {
  position: absolute;
  z-index: 10;
  top: clamp(22px, 4vh, 38px);
  left: clamp(24px, 4vw, 60px);
  right: clamp(24px, 4vw, 60px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-id {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 160ms ease, transform 180ms ease;
}

.site-id__mark {
  margin-right: 0.55em;
  color: var(--accent);
}

.site-id:hover,
.site-id:focus-visible {
  color: var(--text);
  transform: translateX(1px);
}

.theme-toggle {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  place-items: center;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.theme-toggle.is-turning svg {
  transform: rotate(24deg);
}

.sun-icon,
.moon-icon {
  transform-origin: 12px 12px;
  transition: opacity 180ms ease, transform 220ms ease;
}

.moon-icon {
  opacity: 0;
  transform: scale(0.65);
}

:root[data-theme="dark"] .sun-icon {
  opacity: 0;
  transform: scale(0.65);
}

:root[data-theme="dark"] .moon-icon {
  opacity: 1;
  transform: scale(1);
}

.intro {
  position: absolute;
  top: 28%;
  left: clamp(48px, 11vw, 168px);
  width: min(650px, 53vw);
}

.intro h1,
.intro p {
  margin: 0;
}

.intro h1 {
  max-width: 24ch;
  font-family: var(--mono);
  font-size: clamp(1.75rem, 2.7vw, 2.8rem);
  font-variant-ligatures: none;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.045em;
}

.intro p {
  max-width: 55ch;
  margin-top: clamp(20px, 3vh, 30px);
  color: var(--muted);
  font-size: clamp(0.82rem, 1vw, 0.96rem);
  line-height: 1.7;
  letter-spacing: -0.018em;
}

.pathways {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pathway {
  --pointer-x: 0px;
  --pointer-y: 0px;
  --pointer-rotate: 0deg;
  position: absolute;
  display: inline-flex;
  min-width: 142px;
  padding: 10px 4px 9px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 1rem;
  letter-spacing: -0.015em;
  text-decoration: none;
  transform: translate3d(var(--pointer-x), var(--pointer-y), 0)
    rotate(var(--pointer-rotate));
  transition: border-color 180ms ease, color 180ms ease,
    transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: auto;
  gap: 14px;
  justify-content: space-between;
}

.pathway:hover,
.pathway:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.pathway__arrow {
  color: var(--muted);
  font-size: 0.84rem;
  transition: color 180ms ease, transform 180ms ease;
}

.pathway:hover .pathway__arrow,
.pathway:focus-visible .pathway__arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.pathway--paperdoku {
  top: 24%;
  right: 13%;
}

.pathway--projects {
  top: 48%;
  right: 23%;
  display: grid;
  gap: 4px 14px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.project-status {
  display: grid;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
  grid-column: 1 / -1;
}

.pathway--contact {
  right: 14%;
  bottom: 20%;
}

.grid-mark {
  position: absolute;
  top: 5px;
  right: -39px;
  display: grid;
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  color: var(--line);
  grid-template-columns: repeat(3, 1fr);
  transition: border-color 180ms ease, transform 240ms ease;
}

.grid-mark i {
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transition: background-color 180ms ease, opacity 180ms ease;
}

.grid-mark i:nth-child(3n) {
  border-right: 0;
}

.grid-mark i:nth-child(n + 7) {
  border-bottom: 0;
}

.pathway--paperdoku:hover .grid-mark,
.pathway--paperdoku:focus-visible .grid-mark {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.pathway--paperdoku:hover .grid-mark i:nth-child(2),
.pathway--paperdoku:hover .grid-mark i:nth-child(5),
.pathway--paperdoku:hover .grid-mark i:nth-child(7),
.pathway--paperdoku:focus-visible .grid-mark i:nth-child(2),
.pathway--paperdoku:focus-visible .grid-mark i:nth-child(5),
.pathway--paperdoku:focus-visible .grid-mark i:nth-child(7) {
  background: color-mix(in srgb, var(--accent) 38%, transparent);
}

.stack-mark {
  position: absolute;
  top: 7px;
  right: -37px;
  display: block;
  width: 27px;
  height: 24px;
}

.stack-mark i {
  position: absolute;
  right: 0;
  display: block;
  width: 23px;
  height: 1px;
  background: var(--line);
  transition: background-color 180ms ease, transform 240ms ease;
}

.stack-mark i:first-child {
  top: 4px;
}

.stack-mark i:nth-child(2) {
  top: 11px;
  width: 18px;
}

.stack-mark i:nth-child(3) {
  top: 18px;
  width: 21px;
}

.pathway--projects:hover .stack-mark i,
.pathway--projects:focus-visible .stack-mark i {
  background: var(--accent);
}

.pathway--projects:hover .stack-mark i:first-child,
.pathway--projects:focus-visible .stack-mark i:first-child {
  transform: translateX(-3px);
}

.pathway--projects:hover .stack-mark i:nth-child(2),
.pathway--projects:focus-visible .stack-mark i:nth-child(2) {
  transform: translateX(2px);
}

.pathway--projects:hover .stack-mark i:nth-child(3),
.pathway--projects:focus-visible .stack-mark i:nth-child(3) {
  transform: translateX(-1px);
}

.at-mark {
  position: absolute;
  top: 6px;
  right: -28px;
  color: var(--muted);
  font-size: 1rem;
  transition: color 180ms ease, transform 220ms ease;
}

.pathway--contact:hover .at-mark,
.pathway--contact:focus-visible .at-mark {
  color: var(--accent);
  transform: translateY(-2px);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 5px;
}

.theme-toggle:focus-visible {
  outline: none;
}

::selection {
  background: var(--accent);
  color: #090d12;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-new(root) {
  z-index: 999;
  animation: theme-wipe 620ms cubic-bezier(0.76, 0, 0.24, 1) both;
}

@keyframes theme-wipe {
  from {
    clip-path: circle(0 at var(--wipe-x) var(--wipe-y));
  }

  to {
    clip-path: circle(150vmax at var(--wipe-x) var(--wipe-y));
  }
}

@media (max-width: 800px) {
  .home {
    min-height: 500px;
  }

  .site-header {
    top: 18px;
    right: 18px;
    left: 20px;
  }

  .intro {
    top: 16%;
    left: 7vw;
    width: 86vw;
  }

  .intro h1 {
    max-width: 24ch;
    font-size: clamp(1.35rem, 6.3vw, 1.8rem);
    line-height: 1.3;
  }

  .intro p {
    max-width: 40ch;
    margin-top: 16px;
    font-size: clamp(0.76rem, 3.2vw, 0.88rem);
    line-height: 1.58;
  }

  .pathway {
    min-width: 132px;
    padding-top: 8px;
    font-size: 0.88rem;
  }

  .pathway--paperdoku {
    top: auto;
    right: 10%;
    bottom: 38%;
  }

  .pathway--projects {
    top: auto;
    right: auto;
    bottom: 25%;
    left: 7%;
  }

  .pathway--contact {
    right: auto;
    bottom: 11%;
    left: 27%;
  }

  .grid-mark {
    right: -34px;
    width: 24px;
    height: 24px;
  }

  .stack-mark {
    right: -32px;
    transform: scale(0.9);
  }

  .at-mark {
    right: -24px;
    font-size: 0.9rem;
  }

}

@media (max-height: 620px) and (min-width: 801px) {
  .intro {
    top: 23%;
  }

  .intro h1 {
    font-size: clamp(1.65rem, 2.45vw, 2.35rem);
  }

  .pathway--projects {
    top: 46%;
  }

  .pathway--contact {
    bottom: 14%;
  }
}

@media (max-height: 580px) and (max-width: 800px) {
  .intro {
    top: 13%;
  }

  .intro h1 {
    font-size: clamp(1.2rem, 5.6vw, 1.55rem);
  }

  .intro p {
    margin-top: 11px;
    font-size: 0.72rem;
  }

  .pathway--paperdoku {
    bottom: 33%;
  }

  .pathway--projects {
    bottom: 19%;
  }

  .pathway--contact {
    bottom: 5%;
  }

}

@media (pointer: coarse) {
  .pathway {
    --pointer-x: 0px !important;
    --pointer-y: 0px !important;
    --pointer-rotate: 0deg !important;
  }
}

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

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important;
  }
}
