@import url("https://fonts.googleapis.com/css2?family=Ubuntu+Mono:wght@400;700&display=swap");

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: #000;
  touch-action: manipulation;
  font-family: "Ubuntu Mono";
}

:root {
  --ui-green: #33ff33;
  --ui-green-soft: rgba(51, 255, 51, 0.24);
  --ui-green-line: rgba(51, 255, 51, 0.46);
  --ui-green-glow: rgba(51, 255, 51, 0.22);
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
}

body {
  overflow: hidden;
  overscroll-behavior: none;
}

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

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(51, 255, 51, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51, 255, 51, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 18%, rgba(51, 255, 51, 0.08), transparent 34%),
    #000;
  background-size: 48px 48px, 48px 48px, auto, auto;
}

#root-page {
  display: none;
}

body.root-mode {
  width: 100%;
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  background: #000;
}

body.root-mode #app {
  position: relative;
  inset: auto;
  overflow: visible;
  min-height: 100vh;
  background:
    linear-gradient(rgba(51, 255, 51, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51, 255, 51, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 10%, rgba(51, 255, 51, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 18%),
    #000;
  background-size: 56px 56px, 56px 56px, auto, auto, auto;
}

body.root-mode #root-page {
  position: relative;
  z-index: 20;
  display: block;
}

body.root-mode #portal-shell,
body.root-mode #portal-status,
body.root-mode #portal-loader-sigil {
  display: none;
}

.root-shell {
  width: min(1280px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.root-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: center;
  justify-items: center;
  padding-bottom: 28px;
  text-align: center;
}

.root-avatar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 236px);
  justify-self: center;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(51, 255, 51, 0.28);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(51, 255, 51, 0.08) inset,
    0 0 40px rgba(51, 255, 51, 0.12);
  transition:
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 180ms ease;
}

.root-avatar-link:hover,
.root-avatar-link:focus-visible {
  transform: translate3d(0, -2px, 0) scale(1.018);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.68),
    0 0 0 1px rgba(51, 255, 51, 0.22),
    0 0 48px rgba(51, 255, 51, 0.18);
}

.root-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}

.root-copy {
  display: grid;
  gap: 14px;
  justify-items: center;
  max-width: 860px;
}

.root-eyebrow,
.story-card__eyebrow,
.story-rail__label {
  color: var(--ui-green);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: none;
}

.story-rail__label--small {
  font-size: 0.72rem;
  opacity: 0.8;
}

.root-title {
  margin: 0;
  color: var(--ui-green);
  font-size: clamp(3rem, 6vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  text-shadow:
    0 0 18px rgba(51, 255, 51, 0.18),
    0 0 42px rgba(51, 255, 51, 0.08);
}

.root-lede,
.root-note,
.story-card__copy {
  margin: 0;
  color: rgba(241, 255, 241, 0.84);
  font-size: 1rem;
  line-height: 1.62;
}

.root-lede,
.root-note {
  max-width: 68ch;
}

.root-note code,
.story-card__copy code {
  color: var(--ui-green);
}

.root-social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding-top: 4px;
}

.root-social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(51, 255, 51, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    rgba(0, 0, 0, 0.78);
  color: #f4fff4;
  text-decoration: none;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background-color 140ms ease;
}

.root-social-link:hover,
.root-social-link:focus-visible {
  transform: translate3d(0, -1px, 0);
  border-color: rgba(51, 255, 51, 0.46);
  background:
    linear-gradient(180deg, rgba(51, 255, 51, 0.08), rgba(255, 255, 255, 0)),
    rgba(0, 0, 0, 0.92);
}

.root-social-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.root-social-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.story-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
}

.story-rail {
  position: relative;
}

.story-rail__sticky {
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.story-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(51, 255, 51, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    rgba(0, 0, 0, 0.74);
  color: rgba(240, 255, 240, 0.82);
  text-decoration: none;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background-color 140ms ease,
    color 140ms ease;
}

.story-chip:hover,
.story-chip:focus-visible,
.story-chip.is-current {
  transform: translate3d(0, -1px, 0);
  border-color: rgba(51, 255, 51, 0.42);
  background:
    linear-gradient(180deg, rgba(51, 255, 51, 0.08), rgba(255, 255, 255, 0)),
    rgba(0, 0, 0, 0.92);
  color: #f4fff4;
}

.story-chip--muted {
  color: rgba(216, 255, 216, 0.58);
}

.story-chip__icon {
  width: 1rem;
  height: 1rem;
  flex: none;
  transform: translateY(0.05em);
}

.story-stream {
  position: relative;
  display: grid;
  gap: 22px;
}

.story-stream::before {
  display: none;
}

.story-card {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: auto;
  padding: 26px 28px 28px;
  border: 1px solid rgba(51, 255, 51, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    radial-gradient(circle at 100% 0%, rgba(51, 255, 51, 0.08), transparent 28%),
    linear-gradient(135deg, rgba(51, 255, 51, 0.04), transparent 55%),
    rgba(0, 0, 0, 0.88);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.52),
    0 0 0 1px rgba(51, 255, 51, 0.06) inset;
  scroll-margin-top: 24px;
}

.story-card::before {
  display: none;
}

.story-card--overview,
.story-card--reserved {
  min-height: auto;
}

.story-card__title {
  margin: 0;
  color: #f4fff4;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.story-lockup {
  display: inline-flex;
  align-items: baseline;
  gap: 0.44rem;
}

.story-glyph {
  color: var(--ui-green);
  font-size: 1.05em;
  line-height: 1;
  transform: translateY(0.08em);
}

.story-icon {
  width: 1em;
  height: 1em;
  flex: none;
  transform: translateY(0.08em);
}

.story-pills,
.story-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.story-pill,
.story-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(51, 255, 51, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    rgba(0, 0, 0, 0.62);
  color: rgba(236, 255, 236, 0.84);
  text-decoration: none;
}

.story-link:hover,
.story-link:focus-visible,
.story-pill--link:hover,
.story-pill--link:focus-visible {
  border-color: rgba(51, 255, 51, 0.42);
  color: #f4fff4;
  background:
    linear-gradient(180deg, rgba(51, 255, 51, 0.08), rgba(255, 255, 255, 0)),
    rgba(0, 0, 0, 0.92);
}

body.iam-mode #app {
  display: grid;
  place-items: start center;
  width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 50% 0%, rgba(51, 255, 51, 0.04), rgba(51, 255, 51, 0) 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    #000;
}

#iam-page {
  position: fixed;
  inset: 0;
  display: none;
  place-items: start center;
  padding: 0 24px 24px;
  box-sizing: border-box;
  overflow: auto;
  z-index: 20;
}

body.iam-mode #iam-page {
  display: grid;
}

body.iam-mode #portal-shell,
body.iam-mode #portal-status,
body.iam-mode #portal-loader-sigil {
  display: none;
}

#iam-easter-egg {
  position: fixed;
  left: 50%;
  top: 50%;
  margin: 0;
  color: var(--ui-green);
  font-family: "Ubuntu Mono";
  font-size: clamp(6px, 0.95vw, 9px);
  line-height: 1.02;
  white-space: pre;
  transform: translate3d(-50%, -50%, 0) scale(0.42);
  opacity: 0;
  pointer-events: none;
  user-select: none;
  display: none;
  z-index: 1;
}

#iam-card {
  width: min(100%, 920px);
  min-height: calc(100dvh - 24px);
  padding: 0 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#iam-header {
  position: sticky;
  top: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0 20px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.98), rgba(0, 0, 0, 0.92) 82%, rgba(0, 0, 0, 0));
  z-index: 4;
}

#iam-avatar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transform: translate3d(0, 0, 0) scale(1);
  transition:
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 180ms ease;
  will-change: transform, filter;
  margin-bottom: 14px;
}

#iam-avatar {
  width: clamp(220px, 24vw, 360px);
  height: clamp(220px, 24vw, 360px);
  border-radius: 999px;
  object-fit: cover;
  background: #fff;
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.36);
}

#iam-handle {
  margin: 0 0 18px;
  color: var(--ui-green);
  font-family: "Ubuntu Mono";
  font-size: clamp(28px, 4.8vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}

#iam-x-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  color: #fff;
  text-decoration: none;
  font-family: "Ubuntu Mono";
  font-size: 18px;
  font-weight: 700;
  opacity: 0.94;
}

#iam-x-badge svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

#iam-links {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  justify-items: stretch;
  padding-bottom: 28px;
}

.iam-link-card {
  display: grid;
  grid-template-columns: 42px auto;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 58px;
  padding: 12px 16px;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid rgba(51, 255, 51, 0.28);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
  will-change: transform;
}

.iam-link-card--brand {
  grid-template-columns: 1fr;
  gap: 0;
  justify-items: center;
}

.iam-link-card:hover,
.iam-link-card:focus-visible {
  transform: translate3d(0, -1px, 0) scale(1.012);
  background: rgba(0, 0, 0, 0.86);
  border-color: rgba(51, 255, 51, 0.56);
  box-shadow:
    0 0 14px rgba(51, 255, 51, 0.18),
    0 10px 22px rgba(0, 0, 0, 0.22);
}

.iam-link-card--brand .iam-link-icon {
  display: none;
}

.iam-link-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  box-shadow: none;
}

.iam-link-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.iam-link-svg {
  width: 22px;
  height: 22px;
  display: block;
}

.iam-link-label {
  font-family: "Ubuntu Mono";
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  line-height: 1;
  text-align: center;
}

.brand-lockup {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  justify-content: center;
}

.brand-emoji-svg {
  width: 0.94em;
  height: 0.94em;
  display: inline-block;
  flex: none;
  transform: translateY(0.08em);
  margin-right: 0.05em;
}

.brand-word {
  display: inline-block;
}

.iam-link-emoji {
  display: none;
}

.iam-link-glyph {
  display: none;
}

#landing {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  gap: clamp(14px, 2.4vh, 22px);
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

#landing-photo {
  width: min(44vw, 180px);
  height: min(44vw, 180px);
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  transform: translate3d(0, 0, 0);
}

#entropy-sigil {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  color: var(--ui-green);
  font-family: "Ubuntu Mono";
  font-size: clamp(6px, 1.38vw, 10px);
  line-height: 1.02;
  letter-spacing: 0;
  white-space: pre;
  transform: translate3d(-50%, -50%, 0) perspective(1100px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(0.58);
  transform-origin: center;
  opacity: 0.76;
  pointer-events: none;
  user-select: none;
  filter:
    drop-shadow(0 0 12px rgba(51, 255, 51, 0.18))
    drop-shadow(0 0 26px rgba(51, 255, 51, 0.10))
    brightness(1.12);
  transition:
    opacity 120ms linear,
    filter 140ms linear;
  will-change: transform, opacity, filter;
  mix-blend-mode: screen;
}

#entropy-sigil .sigil-cell {
  display: inline-block;
  min-width: 0.58em;
  color: rgba(51, 255, 51, 0.12);
  opacity: 0.14;
  text-shadow:
    0 0 2px rgba(51, 255, 51, 0.10),
    0 0 8px rgba(51, 255, 51, 0.04);
  transition:
    opacity 120ms linear,
    color 120ms linear,
    text-shadow 160ms linear,
    transform 180ms ease;
  transform: translate3d(0, 0, 0);
}

#entropy-sigil .sigil-cell.flare {
  color: var(--ui-green);
  opacity: 0.92;
  text-shadow:
    0 0 8px rgba(51, 255, 51, 0.52),
    0 0 18px rgba(51, 255, 51, 0.28),
    0 0 34px rgba(51, 255, 51, 0.12);
}

#entropy-sigil .sigil-cell.flare-strong {
  color: var(--ui-green);
  opacity: 1;
  text-shadow:
    0 0 12px rgba(51, 255, 51, 0.62),
    0 0 28px rgba(51, 255, 51, 0.34),
    0 0 44px rgba(51, 255, 51, 0.18);
  transform: translate3d(0, -0.02em, 0);
}

#landing-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(80vw, 360px);
  min-height: 64px;
  padding: 20px 34px 18px;
  border-radius: 16px;
  color: var(--ui-green);
  text-decoration: none;
  font-family: "Ubuntu Mono";
  font-weight: 700;
  font-size: clamp(28px, 7vw, 48px);
  letter-spacing: 0.01em;
  background:
    linear-gradient(180deg, rgba(26, 34, 26, 0.84), rgba(4, 8, 4, 0.96)),
    radial-gradient(120% 160% at 50% 0%, rgba(160, 255, 180, 0.18), rgba(160, 255, 180, 0) 52%),
    linear-gradient(120deg, rgba(51, 255, 51, 0.06), rgba(51, 255, 51, 0));
  border: 1px solid var(--ui-green-line);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.58),
    0 10px 26px rgba(0, 0, 0, 0.44),
    0 0 0 1px rgba(51, 255, 51, 0.16) inset,
    0 0 14px rgba(51, 255, 51, 0.18),
    0 -8px 16px rgba(0, 0, 0, 0.46) inset;
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
  transform: translate3d(0, 0, 0);
  transition:
    transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 220ms ease,
    border-color 220ms ease,
    filter 220ms ease;
  will-change: transform, box-shadow, filter;
  isolation: isolate;
  overflow: hidden;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  backface-visibility: hidden;
  pointer-events: none;
}

#app.portal-collapsed #landing-button {
  pointer-events: auto;
  cursor: pointer;
}

#landing-button::before,
#landing-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

#landing-button::before {
  background:
    linear-gradient(180deg, rgba(190, 255, 204, 0.22), rgba(190, 255, 204, 0.02) 30%, rgba(0, 0, 0, 0.24) 100%);
  opacity: 0.64;
}

#landing-button::after {
  inset: 1px;
  background:
    linear-gradient(180deg, rgba(51, 255, 51, 0.08), rgba(51, 255, 51, 0) 55%),
    radial-gradient(85% 85% at 50% 14%, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0) 56%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.14));
  box-shadow:
    0 1px 2px rgba(255, 255, 255, 0.10) inset,
    0 -8px 14px rgba(0, 0, 0, 0.36) inset,
    0 0 0 1px rgba(51, 255, 51, 0.16) inset;
}

.button-sheen,
.button-core,
.button-label {
  position: relative;
  z-index: 1;
}

.button-sheen {
  position: absolute;
  inset: -30% -12%;
  background:
    conic-gradient(from 210deg at 50% 50%, rgba(255, 255, 255, 0) 0deg, rgba(255, 255, 255, 0.15) 42deg, rgba(255, 255, 255, 0) 85deg),
    radial-gradient(circle at 50% 50%, rgba(96, 255, 124, 0.08), rgba(96, 255, 124, 0) 60%);
  filter: blur(18px);
  opacity: 0.8;
  transform: translate3d(0, 0, 0);
}

.button-core {
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 30%, rgba(120, 255, 140, 0.14), rgba(120, 255, 140, 0) 58%),
    linear-gradient(180deg, rgba(10, 14, 10, 0), rgba(10, 14, 10, 0.3));
}

.button-label {
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06),
    0 2px 8px rgba(0, 0, 0, 0.62),
    0 0 18px rgba(51, 255, 51, 0.26);
}

#landing-button:hover:not(.interaction-armed):not(.interaction-release),
#landing-button:focus-visible:not(.interaction-armed):not(.interaction-release) {
  transform: translate3d(0, -2px, 0) scale(1.03);
  border-color: rgba(51, 255, 51, 0.62);
  box-shadow:
    0 30px 72px rgba(0, 0, 0, 0.62),
    0 14px 36px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(51, 255, 51, 0.22) inset,
    0 0 22px rgba(51, 255, 51, 0.24),
    0 -10px 18px rgba(0, 0, 0, 0.42) inset;
  filter: saturate(1.10);
}

#landing-button.interaction-armed {
  transform: translate3d(0, 1px, 0) scale(1.016);
}

#landing-button.interaction-release {
  transform: translate3d(0, -1px, 0) scale(1.038);
}

#landing-button:active {
  transform: translate3d(0, 1px, 0) scale(0.992);
}

#portal-shell {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  mix-blend-mode: normal;
  background: #000;
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
  transition:
    transform 700ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 650ms ease,
    filter 650ms ease;
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
  contain: layout paint style;
}

#portal-shell.collapsed {
  opacity: 0;
  filter: blur(10px);
  transform: translate3d(0, -2vh, 0) scale(0.94);
}

#portal-canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  background: #000;
  transform: translate3d(-50%, -50%, 0);
  will-change: transform, opacity;
  backface-visibility: hidden;
  contain: layout paint style;
}

html.gpu-compositor #app,
html.gpu-compositor #portal-shell,
html.gpu-compositor #portal-canvas,
html.gpu-compositor #portal-loader-sigil,
html.gpu-compositor #entropy-sigil,
html.gpu-compositor #portal-status,
html.gpu-compositor #landing-button {
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

html.gpu-compositor #portal-shell,
html.gpu-compositor #portal-canvas {
  will-change: transform, opacity;
}

#portal-status {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  color: var(--ui-green);
  font-family: "Ubuntu Mono";
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  pointer-events: auto;
  padding: 7px 10px;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(51, 255, 51, 0.28);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  outline: none;
  z-index: 10;
}

#portal-status:hover:not(.interaction-armed):not(.interaction-release),
#portal-status:focus-visible:not(.interaction-armed):not(.interaction-release) {
  transform: translateX(-50%) translate3d(0, -1px, 0) scale(1.028);
  border-color: rgba(51, 255, 51, 0.56);
  box-shadow:
    0 0 14px rgba(51, 255, 51, 0.20),
    0 10px 22px rgba(0, 0, 0, 0.22);
}

#portal-status {
  transition:
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
  will-change: transform, border-color, box-shadow;
}

#portal-status.interaction-armed {
  transform: translateX(-50%) translate3d(0, 1px, 0) scale(1.014);
}

#portal-status.interaction-release {
  transform: translateX(-50%) translate3d(0, -1px, 0) scale(1.04);
}

#iam-avatar-link:hover:not(.interaction-armed):not(.interaction-release),
#iam-avatar-link:focus-visible:not(.interaction-armed):not(.interaction-release) {
  transform: translate3d(0, -2px, 0) scale(1.03);
  filter: brightness(1.04);
}

#iam-avatar-link.interaction-armed {
  transform: translate3d(0, 1px, 0) scale(1.014);
}

#iam-avatar-link.interaction-release {
  transform: translate3d(0, -1px, 0) scale(1.038);
}

.iam-link-card:hover:not(.interaction-armed):not(.interaction-release),
.iam-link-card:focus-visible:not(.interaction-armed):not(.interaction-release) {
  transform: translate3d(0, -2px, 0) scale(1.022);
}

.iam-link-card.interaction-armed {
  transform: translate3d(0, 1px, 0) scale(1.012);
}

.iam-link-card.interaction-release {
  transform: translate3d(0, -1px, 0) scale(1.03);
}

#portal-loader-sigil {
  position: fixed;
  left: 0;
  top: 0;
  margin: 0;
  display: block;
  color: var(--ui-green);
  font-family: "Ubuntu Mono";
  font-size: clamp(9px, 1.08vw, 13px);
  line-height: 1.05;
  letter-spacing: 0;
  white-space: pre;
  pointer-events: none;
  user-select: none;
  text-shadow:
    0 0 8px rgba(51, 255, 51, 0.54),
    0 0 20px rgba(51, 255, 51, 0.28),
    0 0 40px rgba(51, 255, 51, 0.14);
  transform: translate3d(-9999px, -9999px, 0);
  opacity: 0;
  transition: opacity 120ms linear;
  z-index: 9;
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
  filter:
    drop-shadow(0 0 12px rgba(51, 255, 51, 0.16))
    brightness(1.18);
  mix-blend-mode: screen;
}

.loader-sigil-part {
  position: absolute;
  margin: 0;
  left: 0;
  top: 0;
  color: inherit;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  white-space: pre;
  transform: translate3d(0, 0, 0);
  transform-origin: center;
  will-change: transform;
}

#portal-loader-sigil.active {
  opacity: 0.98;
}

#portal-status.hidden {
  display: none;
}

@media (hover: none) {
  #landing-button {
    transform: translate3d(0, 0, 0) scale(1);
  }

  #landing-button:hover,
  #landing-button:focus-visible,
  #portal-status:hover,
  #portal-status:focus-visible,
  #iam-avatar-link:hover,
  #iam-avatar-link:focus-visible,
  .iam-link-card:hover,
  .iam-link-card:focus-visible {
    transform: none;
  }
}

@media (max-width: 640px) {
  #iam-page {
    padding: 14px;
  }

  #iam-card {
    width: min(100%, 420px);
    min-height: auto;
    max-height: calc(100dvh - 28px);
    padding: 0 0 24px;
  }

  .iam-link-card {
    min-height: 56px;
    padding: 12px 14px;
    grid-template-columns: 38px auto;
    gap: 12px;
  }

  .iam-link-icon {
    width: 38px;
    height: 38px;
  }

  #iam-avatar {
    width: clamp(118px, 32vw, 168px);
    height: clamp(118px, 32vw, 168px);
  }

  .iam-link-label {
    font-size: 15px;
  }

  #landing-photo {
    width: min(38vw, 146px);
    height: min(38vw, 146px);
  }

  #entropy-sigil {
    font-size: clamp(7px, 1.92vw, 10px);
    transform: translate3d(-50%, -50%, 0) perspective(900px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(0.64);
  }

  #landing-button {
    min-width: min(86vw, 360px);
    min-height: 60px;
    padding: 18px 28px 16px;
    font-size: clamp(24px, 9vw, 40px);
  }

  #portal-loader-sigil {
    font-size: clamp(8px, 1.9vw, 10px);
  }

}

@media (min-width: 760px) {
  #iam-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) and (orientation: landscape) {
  #iam-page {
    padding: 12px;
  }

  #iam-card {
    width: min(100%, 760px);
    min-height: auto;
    padding: 18px 18px 22px;
  }

  #iam-avatar {
    width: clamp(120px, 24vh, 180px);
    height: clamp(120px, 24vh, 180px);
  }

  #iam-handle {
    margin-bottom: 14px;
    font-size: clamp(24px, 4vh, 30px);
  }

  #iam-links {
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .iam-link-card {
    min-height: 52px;
    padding: 10px 14px;
  }
}

@media (max-width: 1080px) {
  .root-shell {
    width: min(1320px, calc(100vw - 28px));
  }

  .root-hero,
  .story-layout {
    grid-template-columns: 1fr;
  }

  .root-hero {
    justify-items: start;
  }

  .story-rail__sticky {
    position: sticky;
    top: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .story-rail__label,
  .story-rail__break {
    grid-column: 1 / -1;
  }

  .story-stream::before {
    left: 15px;
  }

  .story-card {
    padding-left: 44px;
  }

  .story-card::before {
    left: 7px;
  }
}

@media (max-width: 720px) {
  .root-shell {
    width: min(1320px, calc(100vw - 18px));
    padding-top: 18px;
    padding-bottom: 40px;
  }

  .root-hero {
    gap: 18px;
    padding-bottom: 22px;
  }

  .root-avatar-link {
    width: min(58vw, 210px);
  }

  .root-title {
    font-size: clamp(2.3rem, 12vw, 3.5rem);
  }

  .root-lede,
  .root-note,
  .story-card__copy {
    font-size: 0.95rem;
  }

  .story-rail__sticky {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 14px;
  }

  .story-chip {
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.9rem;
  }

  .story-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .story-card {
    min-height: auto;
    padding: 20px 18px 20px 34px;
    gap: 12px;
  }

  .story-card::before {
    top: 24px;
    left: 5px;
    width: 12px;
    height: 12px;
  }

  .story-stream::before {
    left: 11px;
  }

  .story-card__title {
    font-size: clamp(1.65rem, 8vw, 2.4rem);
  }

  .story-pills,
  .story-card__links,
  .root-social {
    gap: 8px;
  }

  .story-pill,
  .story-link,
  .root-social-link {
    min-height: 36px;
    padding: 0 10px;
  }
}
