:root {
  color-scheme: light;
  --page-bg: #fff;
  --ink: #111;
  --ink-muted: #444;
  --ink-faint: #555;
  --link: #008;
  --link-soft: rgba(0, 0, 136, 0.08);
  --link-soft-hover: rgba(0, 0, 136, 0.16);
  --link-border: rgba(0, 0, 136, 0.35);
  --hover-wash: #ccc;
  --tile-default: #e2e2e2;
  --tile-shadow: #c5c5c5;
  --tile-edge: rgba(0, 0, 0, 0.2);
  --surface: #fff;
  --surface-2: #f6f6f6;
  --surface-3: #eee;
  --line: #ccc;
  --line-strong: #333;
  --icon: #000;
  --resume-color: #bfe8fc;
  --projects-color: #faffc8;
  --games-color: #f2e4ff;
  --about-color: #deffdd;
  --bg-shape: #989898;
  --bg-shape-2: #bcbcbc;
  --banner-shadow-near: rgba(0, 0, 0, 0.22);
  --banner-shadow-far: rgba(0, 0, 0, 0.28);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    color-scheme: dark;
    --page-bg: #161616;
    --ink: #eee;
    --ink-muted: #c8c8c8;
    --ink-faint: #aaa;
    --link: #8cb4ff;
    --link-soft: rgba(140, 180, 255, 0.12);
    --link-soft-hover: rgba(140, 180, 255, 0.22);
    --link-border: rgba(140, 180, 255, 0.4);
    --hover-wash: #3a3a3a;
    --tile-default: #2c2c2c;
    --tile-shadow: #0a0a0a;
    --tile-edge: rgba(0, 0, 0, 0.45);
    --surface: #222;
    --surface-2: #2a2a2a;
    --surface-3: #333;
    --line: #444;
    --line-strong: #888;
    --icon: #eee;
    --bg-shape: #2a2a2a;
    --bg-shape-2: #3a3a3a;
    --banner-shadow-near: rgba(255, 255, 255, 0.78);
    --banner-shadow-far: rgba(255, 255, 255, 0.42);
  }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: #161616;
  --ink: #eee;
  --ink-muted: #c8c8c8;
  --ink-faint: #aaa;
  --link: #8cb4ff;
  --link-soft: rgba(140, 180, 255, 0.12);
  --link-soft-hover: rgba(140, 180, 255, 0.22);
  --link-border: rgba(140, 180, 255, 0.4);
  --hover-wash: #3a3a3a;
  --tile-default: #2c2c2c;
  --tile-shadow: #0a0a0a;
  --tile-edge: rgba(0, 0, 0, 0.45);
  --surface: #222;
  --surface-2: #2a2a2a;
  --surface-3: #333;
  --line: #444;
  --line-strong: #888;
  --icon: #eee;
  --bg-shape: #2a2a2a;
  --bg-shape-2: #3a3a3a;
  --banner-shadow-near: rgba(255, 255, 255, 0.78);
  --banner-shadow-far: rgba(255, 255, 255, 0.42);
}

body,
html {
  height: 100%;
  margin: 0 auto;
  max-width: 1000px;
  overflow: hidden;
  background-color: var(--page-bg);
  color: var(--ink);
}

body > .bg,
body > .bg2 {
  position: absolute;
  inset: 0 0 0 0;
}

body > .bg {
  background-color: var(--bg-shape);
  clip-path: polygon(63% 69%, 100% 9%, 100% 100%, 5% 100%);
}

body > .bg2 {
  background-color: var(--bg-shape-2);
  clip-path: polygon(72% 74%, 100% 27%, 100% 100%, 5% 100%);
}

.top-layout {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: auto;
  grid-template-rows: 44px 1fr 2em;
  font-family: "Montserrat", sans-serif;
  overflow: hidden;
  max-width: 1000px;
}

.top-layout > .app-content {
  position: relative;
  overflow-y: auto;
  background-color: transparent;
  display: grid;
  justify-items: center;
  padding: 0 1em;
  width: 1000px;
  max-width: 1000px;
  margin: 0 auto;
  box-sizing: border-box;
}

@media screen and (max-width: 999px) {
  .top-layout > .app-content {
    width: 100vw;
    max-width: 100vw;
  }
}

.top-layout > .header {
  padding: 0 1em;
  height: 44px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  font-size: 2.5vw;
  gap: 0.25em;
}

.top-layout > .header > .header-crumbs {
  margin-right: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

.top-layout > .header .header-actions > ul.inline {
  width: auto;
  flex-wrap: nowrap;
  align-items: center;
}

.theme-toggle {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin-left: 0.15em;
  border: none;
  border-radius: 0.5em;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.theme-toggle:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.theme-toggle .fas {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

.top-layout > .footer {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 2.5vw;
  gap: 0.25em;
}

@media screen and (min-width: 765px) {
  .top-layout > .header,
  .top-layout > .footer {
    font-size: 16px;
  }
}

.container {
  clear: both;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media screen and (max-width: 999px) {
  .container {
    font-size: 3vw;
  }
}

@media screen and (min-width: 765px) and (max-width: 999px) {
  .container {
    font-size: 16px;
  }
}

@media screen and (min-width: 1000px) {
  .container {
    font-size: 16px;
    height: auto;
  }
}

@media screen and (min-width: 765px) {
  .container.main {
    display: grid;
    grid-template-columns: 26em auto;
    align-self: center;
    width: 100%;
  }

  .container.main .main-menu {
    height: 100%;
  }

  #home-intro {
    display: none;
  }

  html[data-route="/projects/slides"] .container.main {
    display: block;
  }

  html[data-route="/projects/slides"] #picker {
    display: none;
  }
}

.container.main .content {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.section-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.section-preview {
  display: block;
  max-width: min(100%, 30rem);
  width: auto;
  height: auto;
  border: 0;
  background: transparent;
  border-radius: 0.4rem;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.4));
}

.container.main .content .main-content > p {
  margin: 12px 0;
}

.container.main .content .main-content > p strong {
  white-space: nowrap;
}

@media screen and (max-width: 764px) {
  .container.main {
    display: flex;
    flex-direction: column;
    gap: 1.625em;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  html[data-route="/"] .container.main #outlet {
    display: none;
  }

  html[data-route="/projects/slides"] #home-intro,
  html[data-route="/projects/slides"] #picker {
    display: none;
  }

  #picker {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 1.625em;
  }

  #picker > ul.menu {
    display: contents;
  }

  #home-intro,
  #outlet {
    font-size: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: break-word;
    overflow-anchor: none;
  }

  #home-intro .home-copy .main-content {
    font-size: clamp(1rem, 4.6vw, 1.25em);
  }

  .home-copy ul.inline li a {
    font-size: 0.875em;
    padding-inline: 0.4rem;
  }

  .home-copy ul.inline li .fas {
    font-size: 18px;
    width: 18px;
    height: 18px;
  }
}

@media screen and (min-width: 765px) and (max-width: 999px) {
  .container.main {
    font-size: 14px;
  }

  .container.main .main-menu {
    font-size: 1.5vw;
  }
}

.home-copy .main-content {
  font-size: clamp(1.05rem, 2.6vw + 0.4rem, 1.5em);
}

.home-copy .main-content > p strong {
  white-space: nowrap;
}

.home-copy ul.inline {
  flex-wrap: nowrap;
  width: max-content;
  max-width: 100%;
  align-items: flex-start;
}

.home-copy ul.inline li {
  flex-direction: column;
  align-items: center;
  height: auto;
}

.pill-caption {
  display: block;
  margin-top: 0.35em;
  font-size: 0.75em;
  font-weight: 400;
  color: var(--ink-muted);
  white-space: nowrap;
}

ul.breadcrumbs {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: auto;
  gap: 0;
  margin: 0;
}

ul.breadcrumbs li {
  padding: 0 0.15em;
  line-height: 32px;
}

ul.breadcrumbs li.crumb-sep {
  color: var(--ink);
  padding: 0 0.35em;
}

ul.breadcrumbs a {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

ul.breadcrumbs .fas {
  font-size: 16px;
  width: 16px;
  text-align: center;
}

.portfolio-project {
  margin: 1.25em 0 2em;
}

.portfolio-banner {
  --banner-shape: polygon(0 0, calc(100% - 1.35em) 0, 100% 50%, calc(100% - 1.35em) 100%, 0 100%);
  position: sticky;
  top: 0;
  z-index: 8;
  display: inline-block;
  max-width: min(20rem, calc(100% - 1.5em));
  margin: 0 0 1em;
  color: #111;
  filter:
    drop-shadow(0.1em 0.1em 0.12em var(--banner-shadow-near))
    drop-shadow(0.22em 0.22em 0.55em var(--banner-shadow-far));
}

.portfolio-banner-fill {
  background: var(--projects-color);
  padding: 0.55em 2em 0.55em 0.9em;
  clip-path: var(--banner-shape);
}

.portfolio-banner h3 {
  margin: 0;
  font-size: 1.15em;
  font-weight: 700;
  line-height: 1.25;
}

.portfolio-banner .portfolio-meta {
  margin: 0.15em 0 0;
  color: #111;
  font-size: 0.95em;
  line-height: 1.3;
}

.portfolio-empty {
  margin: 1em 0;
  color: var(--ink-faint);
}

.portfolio {
  position: relative;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 0.75rem;
  list-style: none;
  margin: 0.5em 0 0;
  padding: 0;
  width: 100%;
}

.portfolio-item {
  position: relative;
  min-height: 6.5rem;
  background: transparent;
}

.portfolio-wait {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.portfolio-wait::after {
  content: "";
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid var(--line);
  border-top-color: var(--ink-muted);
  border-radius: 50%;
  animation: portfolio-spin 0.7s linear infinite;
}

.portfolio-item.is-ready .portfolio-wait {
  display: none;
}

.portfolio img {
  display: block;
  width: 100%;
  height: 6.5rem;
  object-fit: contain;
  opacity: 0;
}

.portfolio-item.is-ready img {
  opacity: 1;
}

@keyframes portfolio-spin {
  to {
    transform: rotate(360deg);
  }
}

a {
  color: var(--link);
  text-decoration: none;
}

ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  width: 100%;
  gap: 1em;
}

ul.inline {
  display: flex;
  flex-direction: row;
}

ul.inline li {
  padding: 0 0.5em;
  height: 32px;
  border-radius: 0.5em;
  display: flex;
  align-items: center;
}

ul.inline li.right-side {
  margin-left: auto;
}

ul.inline li a {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  height: 100%;
  line-height: 1;
  white-space: nowrap;
}

ul.inline li a span,
ul.inline li a span * {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  line-height: 1;
}

ul.inline li .fas,
ul.inline li .inline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  width: 24px;
  height: 24px;
  line-height: 1;
  flex-shrink: 0;
}

@media (hover: hover) and (pointer: fine) {
  ul.inline li:hover {
    background-color: var(--hover-wash);
  }

  .content ul.inline li:hover {
    background-color: transparent;
  }

  .theme-toggle:hover {
    background: var(--hover-wash);
  }

  .site-footer-version:hover,
  .content ul.inline li a:hover {
    background: color-mix(in srgb, var(--pill-bg) 72%, #000 28%);
    border-color: var(--link);
    text-decoration: none;
  }
}

ul.plain {
  list-style-type: square;
  padding: 0 2em;
}

ul.plain li {
  padding: 0.5em 0;
}

ul.menu {
  display: flex;
  flex-direction: column;
  gap: 1.625em;
}

ul.menu > li {
  background-color: var(--tile-default);
  color: #111;
  border-radius: 1.5em;
  padding: 1em;
  cursor: pointer;
  border-bottom: 4px solid var(--tile-edge);
  z-index: 0;
  width: 28em;
  height: 4.5em;
  font-size: 1em;
  box-shadow: 0.2em 0.2em 0.5em var(--tile-shadow);
  position: relative;
  box-sizing: content-box;
}

ul.menu > li a {
  color: #008;
}

ul.menu > li.about {
  background-color: var(--about-color);
}

ul.menu > li.games {
  background-color: var(--games-color);
}

ul.menu > li.projects {
  background-color: var(--projects-color);
}

ul.menu > li.resumes {
  background-color: var(--resume-color);
}

ul.menu > li .menu-item {
  display: grid;
  grid-template-columns: 6em auto;
}

ul.menu > li img.svg {
  width: 5em;
}

ul.menu > li .icon {
  font-size: 4em;
  text-align: center;
}

ul.menu > li strong {
  font-size: 1.5em;
  font-weight: 900;
}

@media screen and (max-width: 764px) {
  ul.menu > li strong {
    font-size: 1.25em;
  }
}

ul.menu > li .disabled {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background-color: var(--hover-wash);
  opacity: 0.75;
  border-radius: 1.5em;
  cursor: default;
}

@media screen and (orientation: portrait) and (max-height: 699px) {
  ul.menu > li {
    font-size: 3vw;
  }
}

@media screen and (min-width: 765px) and (max-width: 999px) {
  ul.menu > li {
    margin: 0;
  }
}

@media screen and (min-width: 765px) {
  ul.perspective {
    perspective: 1000px;
    gap: 1.625em;
  }

  ul.perspective > li {
    transform: rotateY(-30deg) rotateX(15deg);
    transition: transform 0.4s ease-out;
    margin: 0;
  }

  ul.perspective.items3 > li:nth-child(1) {
    z-index: 2;
  }

  ul.perspective.items3 > li:nth-child(2) {
    z-index: 1;
  }

  ul.perspective > li:hover {
    transform: rotateY(-15deg) rotateX(7deg) scale(1.03);
    z-index: 10;
  }

  ul.perspective > li:has(.menu-item.active),
  ul.perspective > li:has(.menu-item.active):hover {
    transform: rotateY(0deg) rotateX(0deg) scale(1.03);
    z-index: 11;
  }
}

ul .new-badge,
ul .updated-badge {
  position: absolute;
  right: -1em;
  top: -0.25em;
  padding: 0.25em;
  background-color: lightyellow;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  text-align: center;
}

ul .updated-badge {
  background-color: lightblue;
}

.menu-item.active {
  font-weight: bold;
}

.footer small {
  display: inline;
  margin: 0;
}

.site-footer-version,
.content ul.inline li a {
  --pill-bg: var(--tile-default);
  font-weight: 700;
  line-height: 1.2;
  color: var(--link);
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--link-border);
  background: var(--pill-bg);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}

.site-footer-version {
  font-size: 0.75em;
}

.content ul.inline {
  flex-wrap: wrap;
  width: auto;
  gap: 0.5em;
}

.content ul.inline li {
  padding: 0;
  height: auto;
  border-radius: 0;
}

.content ul.inline li.resumes a,
.content ul.inline li.projects a,
.content ul.inline li.games a,
.content ul.inline li.about a {
  --pill-ink: #111;
  color: var(--pill-ink);
}

.content ul.inline li.resumes a {
  --pill-bg: var(--resume-color);
}

.content ul.inline li.projects a {
  --pill-bg: var(--projects-color);
}

.content ul.inline li.games a {
  --pill-bg: var(--games-color);
}

.content ul.inline li.about a {
  --pill-bg: var(--about-color);
}

.site-footer-version:active,
.content ul.inline li a:active {
  transform: scale(0.97);
}

.site-footer-version:focus-visible,
.content ul.inline li a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 1rem;
}

.modal-overlay.hidden,
.hidden {
  display: none !important;
}

.modal {
  position: relative;
  background: var(--surface);
  color: var(--ink);
  border-radius: 12px;
  padding: 1.5rem 1.25rem 1.15rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 0.2em 0.2em 0.8em rgba(0, 0, 0, 0.25);
  text-align: left;
  font-family: "Montserrat", sans-serif;
}

.modal h2 {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
}

.modal-close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-muted);
}

.modal-close:hover {
  background: var(--surface-3);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.btn {
  font: inherit;
  cursor: pointer;
  border-radius: 0.5em;
  padding: 0.4em 0.9em;
  border: 1px solid var(--line-strong);
  background: var(--tile-default);
  color: var(--ink);
}

.btn-primary {
  background: #deffdd;
}

.changelog-help {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.changelog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(70vh, 36rem);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.changelog-item {
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.changelog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.75rem;
  color: var(--ink-faint);
}

.changelog-hash {
  font-weight: 700;
  color: var(--link);
}

.changelog-subject {
  margin-top: 0.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
}

.changelog-empty {
  font-size: 0.85rem;
  color: var(--ink-faint);
  padding: 0.5rem 0.25rem;
}

.logo {
  display: inline-block;
  height: 1em;
  width: 1em;
  vertical-align: middle;
  will-change: filter;
  transition: filter 300ms;
}

.logo:hover {
  filter: drop-shadow(0 0 2em #3178c6aa);
}

i.fas {
  color: var(--icon) !important;
}

ul.menu i.fas {
  color: #111 !important;
}

.content ul.inline li a i.fas,
.content ul.inline li a i.fab {
  color: var(--pill-ink, currentColor) !important;
}
