body {
  --bg: #050505;
  --ink: #ebe6db;
  --dim: #6d6b66;
  --chrome: #a9a49a;
  --cell-w: 7.2px;
  --cell-h: 13px;
}

.wall {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  touch-action: pinch-zoom;
}

.tile {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.machine {
  position: absolute;
  z-index: 2;
  display: none;
  pointer-events: none;
}

.status {
  position: absolute;
  z-index: 3;
  display: flex;
  margin: 0;
  background: var(--line, var(--bg));
  color: var(--chrome);
  font: 400 12px/13px "Plex Mono", ui-monospace, monospace;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 320ms cubic-bezier(0.23, 1, 0.32, 1);
}

.status.is-on {
  opacity: 1;
}

.status .mode {
  padding: 0 var(--cell-w);
  background: var(--accent, var(--ink));
  color: var(--bg);
}

.status .path {
  flex: 1;
  min-width: 0;
  padding: 0 var(--cell-w);
  overflow: hidden;
  text-overflow: ellipsis;
}

.status .pos {
  padding: 0 var(--cell-w);
}

.status.is-insert .mode {
  background: var(--insert, var(--accent, var(--ink)));
}

.cmdline {
  position: absolute;
  z-index: 3;
  display: flex;
  height: var(--cell-h);
  margin: 0;
  color: var(--ink);
  font: 400 12px/13px "Plex Mono", ui-monospace, monospace;
  letter-spacing: 0;
  white-space: pre;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 320ms cubic-bezier(0.23, 1, 0.32, 1);
}

.cmdline.is-on {
  opacity: 1;
}

.cmdline .cmd {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.cmdline.is-typing .cmd::after {
  content: "";
  display: inline-block;
  width: var(--cell-w);
  height: var(--cell-h);
  vertical-align: top;
  background: var(--accent, var(--ink));
}

.cmdline .showcmd {
  flex: none;
  width: calc(11 * var(--cell-w));
  color: var(--chrome);
}

.glass {
  position: absolute;
  z-index: 2;
  display: none;
  pointer-events: none;
  background: color-mix(in srgb, var(--bg) 35%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.kb-glass {
  --feather: 14px;
  opacity: 0;
  transition: opacity 320ms cubic-bezier(0.23, 1, 0.32, 1);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--feather), #000 calc(100% - var(--feather)), transparent), linear-gradient(to bottom, transparent, #000 var(--feather), #000 calc(100% - var(--feather)), transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 var(--feather), #000 calc(100% - var(--feather)), transparent), linear-gradient(to bottom, transparent, #000 var(--feather), #000 calc(100% - var(--feather)), transparent);
  mask-composite: intersect;
}

.kb-glass.is-on {
  opacity: 1;
}

.frame-top {
  top: 0;
  left: 0;
  right: 0;
}

.brand {
  position: absolute;
  left: calc(5 * var(--cell-w));
  top: calc(3 * var(--cell-h));
  gap: var(--cell-w);
  min-height: 0;
  color: var(--ink);
  font: 400 12px/13px "Plex Mono", ui-monospace, monospace;
  letter-spacing: 0;
}

.brand svg {
  width: calc(2 * var(--cell-w));
  height: 12px;
}

.brand::after,
.enter::after {
  content: "";
  position: absolute;
  inset: -16px -8px;
}

.switch {
  position: absolute;
  top: 26px;
  right: 40px;
}

.switch.language-switch {
  top: calc(3 * var(--cell-h) - 15px);
  right: clamp(12px, 4vw, 40px);
}

.cover-profile {
  position: absolute;
  z-index: 5;
  top: 47%;
  left: max(2.2rem, calc((100% - 2060px) / 2));
  width: clamp(13rem, calc((100% - 840px) / 2 - 4rem), 28rem);
  transform: translateY(-50%);
}

.cover-location,
.cover-role,
.cover-summary {
  margin: 0;
  font: 400 14px/1.55 "Plex Mono", ui-monospace, monospace;
}

.cover-location {
  color: var(--accent);
}

.cover-title {
  margin: 0.34em 0 0.21em;
  font: 620 clamp(2.15rem, 3.1vw, 4.6rem)/0.98 "Archivo", system-ui, sans-serif;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.cover-role {
  color: var(--ink);
}

.cover-summary {
  max-width: 34ch;
  margin-top: 0.65rem;
  color: var(--chrome);
}

.cover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

::highlight(cover-pending) { color: transparent; }

.cover-actions a { position: relative; }
.cover-actions a.awaiting-type { opacity: 0; }
.cover-actions a::after {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 2px;
  pointer-events: none;
  background: radial-gradient(85px circle at var(--glow-x, 50%) var(--glow-y, 50%), #cbffd6, #47e883 36%, transparent);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 180ms ease;
}
.cover-actions a:is(:hover, :focus-visible)::after { opacity: 1; }
.cover-actions a:is(:hover, :focus-visible) { box-shadow: 0 0 12px #48e68138; }

.is-leaving .cover-profile {
  visibility: hidden;
}

@media (max-width: 1279px) {
  .cover-profile {
    top: auto;
    bottom: clamp(58px, 11vh, 132px);
    left: clamp(1rem, 5vw, 3rem);
    width: min(27rem, calc(100% - 2 * clamp(1rem, 5vw, 3rem)));
    padding: 1.2rem;
    transform: none;
    border: 1px solid var(--line);
    background: var(--bg);
  }

  .cover-title {
    font-size: clamp(2rem, 4.5vw, 3.6rem);
  }
}

@media (max-width: 420px) {
  .cover-profile {
    padding: 0.9rem;
  }

  .cover-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0.85rem;
  }

  .cover-actions .portfolio-action {
    width: 100%;
    padding-inline: 0.35rem;
    text-align: center;
  }
}

.enter {
  position: absolute;
  right: auto;
  bottom: auto;
  z-index: 6;
  display: block;
  min-height: 0;
  padding: 0 var(--cell-w);
  background: var(--ink);
  color: var(--bg);
  font: 400 12px/13px "Plex Mono", ui-monospace, monospace;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.enter:hover {
  filter: brightness(1.18);
}

.theme-key {
  position: absolute;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: var(--cell-w);
  margin: 0;
  border: 0;
  padding: 0;
  background: none;
  color: var(--chrome);
  font: 400 12px/13px "Plex Mono", ui-monospace, monospace;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
}

.theme-key:hover {
  color: var(--ink);
}

.command-glyph {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 10px;
  flex: none;
  color: var(--accent, var(--ink));
}

.command-glyph::before {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 5px;
  height: 5px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(-45deg);
}

.command-glyph::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 6px;
  height: 2px;
  background: currentColor;
  content: "";
}

.theme-key .command-glyph {
  margin-top: -1px;
}

.theme-key:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.enter:focus-visible {
  outline-offset: 4px;
}

.note {
  position: absolute;
  left: calc(5 * var(--cell-w));
  bottom: calc(2 * var(--cell-h));
  z-index: 6;
  margin: 0;
  color: var(--ink);
  font: 400 12px/13px "Plex Mono", ui-monospace, monospace;
  letter-spacing: 0;
  padding-right: var(--cell-w);
  background: var(--bg);
  white-space: nowrap;
  pointer-events: none;
}

.brand,
.switch,
.note,
.enter,
.theme-key {
  transition: opacity 320ms cubic-bezier(0.23, 1, 0.32, 1);
}

.is-leaving .brand,
.is-leaving .switch,
.is-leaving .note,
.is-leaving .enter,
.is-leaving .theme-key,
.is-leaving .glass,
.is-leaving .status,
.is-leaving .cmdline {
  opacity: 0;
}

@media (max-width: 640px) {
  .brand {
    left: 1rem;
  }

  .brand span {
    display: inline;
  }

  .switch {
    top: calc(5 * var(--cell-h));
    right: 8px;
  }
}
