:root {
  --bg: #0a0a0a;
  --fg: #e6e6e6;
  --dim: #888;
  --glow: rgba(230, 230, 230, 0.9);
  --border: #333;
  --font: 'IBM Plex Mono', Menlo, Consolas, Monaco, monospace;

  --frame-radius: clamp(0.68rem, 0.9vw, 0.95rem);
  --glass-radius: clamp(0.95rem, 1.2vw, 1.25rem);
  --corner-offset: clamp(0.59rem, 0.76vw, 1.01rem);
  --corner-size: clamp(0.68rem, 0.2vw + 0.66rem, 0.8rem);

  --split-ratio: 35%;
  --split-line-span: 86%;
  --center-gap: clamp(5.35rem, 8.02vw, 10.69rem);
  --portrait-width: clamp(13.5rem, 16vw, 15rem);

  --main-size: clamp(0.78rem, 0.3vw + 0.72rem, 1rem);
  --inner-inset: clamp(0.68rem, 0.78vw + 0.2rem, 1.1rem);
  --glass-inset: clamp(0.28rem, 0.45vw + 0.12rem, 0.46rem);

  --divider-fade: rgba(0, 0, 0, 0.3) 0%, black 15%, black 85%, rgba(0, 0, 0, 0.3) 100%;

  font-size: clamp(72%, 0.6vw + 0.62rem, 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

html,
body {
  height: 100%;
  background: #000;
  color: var(--fg);
  font-family: var(--font);
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: pan-x pan-y;
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  border-radius: var(--frame-radius);
}

.crt-wrapper {
  position: fixed;
  inset: var(--glass-inset);
  z-index: 10;
  border-radius: var(--glass-radius);
  overflow: hidden;
  background: var(--bg);
}

.crt-screen {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: center;
}

@keyframes crt-off {
  0% {
    transform: scale(1, 1.3);
    filter: brightness(1);
    opacity: 1;
  }
  60% {
    transform: scale(1, 0.002);
    filter: brightness(10);
    opacity: 1;
  }
  100% {
    transform: scale(0, 0.002);
    filter: brightness(20);
    opacity: 0;
  }
}

@keyframes crt-on {
  0% {
    transform: scale(0.15, 0.002);
    filter: blur(24px) brightness(20);
    opacity: 0;
  }
  8% {
    transform: scale(0.15, 0.002);
    filter: blur(24px) brightness(18);
    opacity: 0.5;
  }
  42% {
    transform: scale(0.15, 0.002);
    filter: blur(16px) brightness(14);
    opacity: 0.6;
  }
  62% {
    transform: scale(1, 0.002);
    filter: blur(8px) brightness(9);
    opacity: 0.7;
  }
  86% {
    transform: scale(1, 0.55);
    filter: blur(3px) brightness(2.2);
  }
  95% {
    transform: scale(1, 0.88);
    filter: blur(0.8px) brightness(1.4);
  }
  100% {
    transform: scale(1, 1);
    filter: blur(0) brightness(1);
    opacity: 1;
  }
}

.crt-wrapper.shutdown .crt-screen {
  animation: crt-off 0.55s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.crt-wrapper.startup .crt-screen {
  animation: crt-on 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.crt-wrapper header,
.crt-wrapper .content,
.crt-wrapper .portrait,
.crt-wrapper footer,
main::before {
  opacity: 0;
  transition: opacity 220ms ease;
}

.crt-wrapper.booting header,
.crt-wrapper.booting .content,
.crt-wrapper.booting .portrait,
.crt-wrapper.booting footer,
.crt-wrapper.startup header,
.crt-wrapper.startup .content,
.crt-wrapper.startup .portrait,
.crt-wrapper.startup footer,
.crt-wrapper.booting main::before,
.crt-wrapper.startup main::before {
  opacity: 0;
}

.crt-wrapper.logo-active header,
.crt-wrapper.logo-active .content,
.crt-wrapper.logo-active footer,
.crt-wrapper.logo-active main::before {
  opacity: 1;
}

.crt-wrapper.logo-active .portrait {
  opacity: 0.55;
}

.crt-screen::after {
  content: ' ';
  position: absolute;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
  background-size:
    100% 4px,
    6px 100%;
  transition: opacity 220ms ease;
}

.crt-wrapper.startup .crt-screen::after,
.crt-wrapper.logo-active .crt-screen::after,
.crt-wrapper.shutdown .crt-screen::after {
  opacity: 1;
}

.noise-overlay {
  position: absolute;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  background: transparent
    url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.45" numOctaves="5" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.28"/%3E%3C/svg%3E')
    repeat 0 0;
  animation: grain-jump 0.7s steps(1, end) infinite;
  transition: opacity 220ms ease;
}

.crt-wrapper.startup .noise-overlay,
.crt-wrapper.logo-active .noise-overlay,
.crt-wrapper.shutdown .noise-overlay {
  opacity: 0.04;
}

@keyframes grain-jump {
  0% {
    background-position: 0 0;
  }
  25% {
    background-position: -20px 14px;
  }
  50% {
    background-position: 24px -16px;
  }
  75% {
    background-position: -30px -8px;
  }
  100% {
    background-position: 8px 2px;
  }
}

.layout-border {
  position: absolute;
  inset: var(--inner-inset);
  z-index: 121;
  border: 1px solid #242424;
  border-radius: calc(var(--frame-radius) * 0.92);
  pointer-events: none;
  mask-image: radial-gradient(circle at center, black 60%, rgba(0, 0, 0, 0.2) 140%);
  -webkit-mask-image: radial-gradient(circle at center, black 60%, rgba(0, 0, 0, 0.2) 140%);
}

.glass-overlay {
  position: fixed;
  inset: var(--glass-inset);
  z-index: 140;
  pointer-events: none;
  border-radius: var(--glass-radius);
  border: 1px solid rgba(255, 255, 255, 0.085);
  background: rgba(255, 255, 255, 0.006);
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.08),
    inset 0 0 0 0.8px rgba(255, 255, 255, 0.025),
    inset 0 -10px 20px rgba(0, 0, 0, 0.1),
    inset 0 8px 16px rgba(255, 255, 255, 0.001);
}

.glass-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  backdrop-filter: blur(0.36px) saturate(1.03) contrast(1.01) brightness(1.003);
  -webkit-backdrop-filter: blur(0.36px) saturate(1.03) contrast(1.01) brightness(1.001);
  mask-image:
    radial-gradient(126% 126% at 0% 0%, black 0%, black 32%, transparent 62%),
    radial-gradient(126% 126% at 100% 0%, black 0%, black 32%, transparent 62%),
    radial-gradient(126% 126% at 0% 100%, black 0%, black 32%, transparent 62%),
    radial-gradient(126% 126% at 100% 100%, black 0%, black 32%, transparent 62%);
  -webkit-mask-image:
    radial-gradient(126% 126% at 0% 0%, black 0%, black 32%, transparent 62%),
    radial-gradient(126% 126% at 100% 0%, black 0%, black 32%, transparent 62%),
    radial-gradient(126% 126% at 0% 100%, black 0%, black 32%, transparent 62%),
    radial-gradient(126% 126% at 100% 100%, black 0%, black 32%, transparent 62%);
}

header,
footer {
  z-index: 20;
  position: absolute;
  left: calc(var(--inner-inset) + var(--corner-offset));
  right: calc(var(--inner-inset) + var(--corner-offset));
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--corner-size);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}

header {
  top: calc(var(--inner-inset) + var(--corner-offset));
}

footer {
  bottom: calc(var(--inner-inset) + var(--corner-offset));
}

.hdr-left {
  font-weight: 600;
  color: var(--fg);
}

header > span,
footer > span {
  font-family: var(--font);
  font-size: var(--corner-size);
  font-style: normal;
  line-height: 1;
  font-kerning: none;
  font-variant-ligatures: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

header > span:first-child,
footer > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

header > span:last-child,
footer > span:last-child {
  flex: 0 0 auto;
  min-width: max-content;
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}

main {
  z-index: 20;
  position: relative;
  display: grid;
  grid-template-columns: var(--split-ratio) minmax(0, 1fr);
  align-items: stretch;
  font-size: var(--main-size);
  width: 100%;
  height: 100%;
}

main::before {
  content: '';
  position: absolute;
  top: calc((100% - var(--split-line-span)) / 2);
  bottom: calc((100% - var(--split-line-span)) / 2);
  left: var(--split-ratio);
  width: 1px;
  transform: translateX(-0.5px);
  background: var(--border);
  mask-image: linear-gradient(to bottom, var(--divider-fade));
  -webkit-mask-image: linear-gradient(to bottom, var(--divider-fade));
}

.visual {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  min-height: 0;
  padding-right: var(--center-gap);
}

.mark {
  width: 12em;
  height: 12em;
  color: var(--fg);
}

.mark svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

@keyframes logo-flicker {
  0%,
  14% {
    opacity: 0;
    filter: none;
  }
  18% {
    opacity: 0.95;
    filter: drop-shadow(0 0 10px var(--glow));
  }
  22% {
    opacity: 0.12;
    filter: none;
  }
  26% {
    opacity: 1;
    filter: drop-shadow(0 0 12px var(--glow));
  }
  32% {
    opacity: 0.45;
    filter: drop-shadow(0 0 4px var(--glow));
  }
  100% {
    opacity: 1;
    filter: drop-shadow(0 0 12px var(--glow));
  }
}

.logo-bar {
  opacity: 0;
  stroke: var(--fg);
  stroke-width: 28;
  will-change: opacity, filter;
}

.crt-wrapper.logo-active .logo-bar-1 {
  animation: logo-flicker 3.2s linear forwards 0.7s;
}

.crt-wrapper.logo-active .logo-bar-2 {
  animation: logo-flicker 2.8s linear forwards 0.2s;
}

.crt-wrapper.logo-active .logo-bar-3 {
  animation: logo-flicker 4.1s linear forwards 1.1s;
}

.crt-wrapper.logo-active .logo-bar-4 {
  animation: logo-flicker 3.5s linear forwards 0.4s;
}

@keyframes blink-glitch {
  0%,
  100% {
    opacity: 1;
    filter: drop-shadow(0 0 12px var(--glow));
  }
  20% {
    opacity: 0.15;
    filter: none;
  }
  40% {
    opacity: 1;
    filter: drop-shadow(0 0 10px var(--glow));
  }
  60% {
    opacity: 0.42;
    filter: drop-shadow(0 0 4px var(--glow));
  }
}

.logo-bar.blink-glitch {
  animation: blink-glitch 0.5s linear forwards !important;
}

.content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5em;
  width: min(100%, 34em);
  min-width: 0;
  padding-left: var(--center-gap);
  align-items: flex-start;
}

.portrait {
  display: none;
  width: var(--portrait-width);
  align-self: center;
}

.portrait__image {
  display: block;
  width: 100%;
}

.kicker {
  margin-bottom: 0.5em;
  color: var(--dim);
  font-size: 0.8em;
}

h1 {
  position: relative;
  margin-bottom: 0.4em;
  font-size: 2.5em;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.typewrap {
  position: relative;
}

.typewrap--title {
  display: inline-block;
}

.typewrap__ghost,
.typewrap__live {
  display: block;
}

.typewrap__ghost {
  visibility: hidden;
  pointer-events: none;
}

.typewrap__live {
  position: absolute;
  inset: 0;
}

.copy.typewrap .typewrap__ghost,
.copy.typewrap .typewrap__live {
  padding-right: 0.55em;
}

.copy {
  max-width: 48ch;
  color: var(--dim);
  line-height: 1.6;
}

.cursor {
  display: inline-block;
  position: relative;
  width: 0;
  height: 1.2em;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

.cursor::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0.02em;
  width: 0.46em;
  height: 100%;
  background: var(--fg);
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.contact-btn {
  display: inline-block;
  margin-top: 2em;
  padding: 0.8em 1.5em;
  border: 1px solid var(--fg);
  color: var(--fg);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.9em;
  transition:
    background 0.2s,
    color 0.2s;
}

.contact-btn:hover {
  background: var(--fg);
  color: var(--bg);
}

@media (min-width: 80rem) and (min-height: 42rem) and (orientation: landscape) {
  main {
    grid-template-columns: var(--split-ratio) max-content var(--portrait-width);
    column-gap: var(--center-gap);
  }

  .content {
    width: fit-content;
    max-width: 34em;
    padding-left: 0;
  }

  .portrait {
    display: block;
  }
}

@media (orientation: portrait) {
  :root {
    --main-size: 1rem;
    --split-ratio: 45%;
    --inner-inset: clamp(0.6rem, 0.58vw + 0.16rem, 0.68rem);
    --glass-inset: clamp(0.22rem, 0.33vw + 0.1rem, 0.26rem);
    font-size: clamp(76%, 0.4vw + 0.7rem, 84%);
  }

  main {
    grid-template-columns: 1fr;
    grid-template-rows: var(--split-ratio) minmax(0, 1fr);
  }

  main::before {
    top: var(--split-ratio);
    bottom: auto;
    width: auto;
    height: 1px;
    transform: translateY(-0.5px);
    right: calc((100% - var(--split-line-span)) / 2);
    left: calc((100% - var(--split-line-span)) / 2);
    mask-image: linear-gradient(to right, var(--divider-fade));
    -webkit-mask-image: linear-gradient(to right, var(--divider-fade));
  }

  .visual {
    justify-content: center;
    padding-right: 0;
  }

  .content {
    align-items: center;
    gap: 1em;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    text-align: center;
  }

  h1 {
    font-size: clamp(2rem, 5.8vw, 2.4rem);
    line-height: 1.1;
    white-space: nowrap;
  }

  .copy {
    max-width: 28ch;
    font-size: clamp(1.05rem, 2.8vw, 1.12rem);
  }

  .kicker {
    margin-bottom: 0;
    font-size: 0.82em;
  }

  .mark {
    width: 10.5em;
    height: 10.5em;
  }

  .contact-btn {
    margin-top: 1.2em;
    padding: 0.72em 1.3em;
  }
}

@media (max-width: 64rem) and (orientation: landscape) {
  :root {
    --main-size: 0.88rem;
    --center-gap: clamp(3.42rem, 7.7vw, 5.98rem);
    --inner-inset: clamp(0.52rem, 0.52vw + 0.14rem, 0.6rem);
    --glass-inset: clamp(0.18rem, 0.25vw + 0.1rem, 0.24rem);
    font-size: clamp(72%, 0.35vw + 0.62rem, 82%);
  }

  .mark {
    width: 9.4em;
    height: 9.4em;
  }

  .content {
    gap: 0.7em;
    width: min(100%, 28em);
    padding-left: var(--center-gap);
    padding-right: 0.4em;
  }

  h1 {
    margin-bottom: 0.25em;
    font-size: 2.35em;
    line-height: 1.05;
    white-space: nowrap;
  }

  .copy {
    max-width: 30ch;
    font-size: 1.02em;
    line-height: 1.35;
  }

  .kicker {
    font-size: 0.75em;
  }

  .contact-btn {
    margin-top: 0.5em;
    padding: 0.6em 1em;
  }
}

@media (min-device-width: 768px) and (max-device-width: 1366px) and (orientation: portrait) {
  :root {
    --main-size: clamp(1.16rem, 0.39vw + 1.06rem, 1.3rem);
    --inner-inset: clamp(0.94rem, 1.07vw + 0.26rem, 1.33rem);
    --glass-inset: clamp(0.45rem, 0.64vw + 0.15rem, 0.47rem);
  }
}

@supports (-moz-appearance: none) {
  .glass-overlay::after {
    content: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .noise-overlay,
  .logo-bar-1,
  .logo-bar-2,
  .logo-bar-3,
  .logo-bar-4,
  .blink-glitch,
  .crt-wrapper.shutdown .crt-screen,
  .crt-wrapper.startup .crt-screen {
    animation: none;
  }

  .logo-bar {
    opacity: 1;
    filter: drop-shadow(0 0 10px var(--glow));
  }
}
