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

:root {
  --bg: #0a0a0a;
  --panel: rgba(20, 20, 20, 0.5);
  --panel-solid: #141414;
  --line: #222;
  --line-hover: #333;
  --text: #c8c8c8;
  --muted: #666;
  --dim: #444;
  --white: #f5f5f5;
  --online: #6b8e6b;
  --idle: #8e8e6b;
  --dnd: #8e6b6b;
  --accent: #aaa;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace;
  overflow: hidden;
  overflow-x: hidden;
  transition: opacity 0.35s ease, filter 0.35s ease, transform 0.35s ease;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.ambient-container {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient-grid,
.ambient-depth,
.ambient-sweep,
.ambient-line,
.ambient-vignette {
  position: absolute;
  inset: 0;
}

.ambient-grid {
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 84px 84px;
  opacity: 0.42;
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity;
}

.ambient-depth {
  inset: -16vmax;
  background:
    linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.018) 44%, rgba(255, 255, 255, 0.055) 50%, rgba(255, 255, 255, 0.018) 56%, transparent 100%),
    linear-gradient(65deg, transparent 0%, rgba(255, 255, 255, 0.015) 46%, rgba(255, 255, 255, 0.04) 50%, rgba(255, 255, 255, 0.015) 54%, transparent 100%);
  opacity: 0.34;
  transform: translate3d(-4%, -3%, 0) rotate(-4deg);
  filter: blur(1px);
  will-change: transform, opacity;
}

.ambient-sweep {
  inset: auto -20vw 30%;
  height: 38vh;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.02) 36%,
    rgba(180, 180, 180, 0.07) 50%,
    rgba(255, 255, 255, 0.02) 64%,
    transparent 100%
  );
  opacity: 0.42;
  transform: translate3d(-25%, 0, 0) rotate(-2deg);
  filter: blur(26px);
  will-change: transform, opacity;
}

.ambient-line {
  inset: 0 -10vw;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.035) 48%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.035) 52%, transparent 100%);
  opacity: 0.08;
  transform: translate3d(-38%, 0, 0) skewX(-12deg);
  will-change: transform, opacity;
}

.ambient-vignette {
  background:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.015) 0%, transparent 42%, rgba(0, 0, 0, 0.28) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 26%, rgba(255, 255, 255, 0.012) 76%, transparent);
  will-change: opacity;
}

.terminal-header,
.terminal-footer {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 100;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.95), rgba(10, 10, 10, 0.9));
  backdrop-filter: blur(4px);
  font-size: 0.75rem;
}

.terminal-header {
  top: 0;
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #333;
}

.terminal-footer {
  bottom: 0;
  padding: 0.3rem 1rem;
  border-top: 1px solid #333;
  color: var(--dim);
  text-align: center;
  font-size: 0.7rem;
}

main {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem 1.7rem;
}

.container {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.intro {
  margin-top: 0;
}

.title-container {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.avatar-wrapper {
  display: block;
  width: 120px;
  height: 120px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.avatar {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border: 1px solid #333;
  border-radius: 4px;
  filter: grayscale(30%);
  transition: filter 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  will-change: transform, filter;
}

.avatar-wrapper:hover .avatar,
.avatar-wrapper:focus-visible .avatar {
  border-color: #666;
  filter: grayscale(0%);
  box-shadow: 0 0 20px rgba(100, 100, 100, 0.3);
}

.title-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  min-width: 0;
}

h1 {
  margin: 0;
  color: var(--white);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}

.glitch-text {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  color: var(--white);
  cursor: pointer;
  font-size: inherit;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
  will-change: transform;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.glitch-text:hover,
.glitch-text:focus-visible {
  color: var(--accent);
  animation: text-glitch 0.3s ease-in-out;
}

.glitch-text:hover::before,
.glitch-text:focus-visible::before {
  opacity: 0.45;
  color: #8ea8ff;
  transform: translate(-1px, 1px);
}

.glitch-text:hover::after,
.glitch-text:focus-visible::after {
  opacity: 0.35;
  color: #ff8e8e;
  transform: translate(1px, -1px);
}

.subtitle {
  min-height: 1.25rem;
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.cursor {
  color: #888;
  opacity: 1;
  animation: cursor 1.06s steps(2, end) infinite;
}

.profile-connections {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.65rem;
}

.profile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  color: #555;
  text-decoration: none;
  transition: color 0.25s ease, transform 0.25s ease;
  will-change: transform;
}

.profile-link:hover,
.profile-link:focus-visible {
  color: #aaa;
  transform: translateY(-2px);
}

.profile-link svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.top-panels {
  display: flex;
  justify-content: center;
  margin-top: 0.75rem;
}

.status-container {
  min-width: 275px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  font-size: 0.8rem;
  transform-origin: 50% 0%;
  will-change: transform, opacity;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0;
  color: var(--muted);
  transition: background 0.3s ease, transform 0.3s ease;
  will-change: transform, opacity;
}

.status:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(3px);
}

.status-bracket {
  color: var(--dim);
}

.status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  color: #666;
}

.status-icon svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.status-details {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.5rem;
}

.status-text {
  font-weight: 500;
  white-space: nowrap;
}

.status-separator {
  color: #333;
}

.status-subtext {
  color: #555;
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online {
  color: var(--online);
}

.idle {
  color: var(--idle);
}

.dnd {
  color: var(--dnd);
}

.offline,
.loading {
  color: #444;
}

.side-panels {
  display: flex;
  gap: 0.5rem;
  min-width: 0;
  will-change: transform, opacity;
}

.testimonials,
.right-panel {
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 218px;
  max-height: 218px;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
}

.testimonials {
  overflow-y: auto;
}

.testimonials::-webkit-scrollbar {
  width: 4px;
}

.testimonials::-webkit-scrollbar-track {
  background: #111;
}

.testimonials::-webkit-scrollbar-thumb {
  border-radius: 2px;
  background: #333;
}

.testimonial-container {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.testimonial {
  padding: 0.5rem;
  border-radius: 2px;
  transition: background 0.3s ease;
  will-change: transform, opacity;
}

.testimonial:hover {
  background: rgba(255, 255, 255, 0.05);
}

.quote-content {
  display: flex;
  gap: 0.5rem;
  min-width: 0;
  font-size: 0.8rem;
}

.quote-prefix {
  flex-shrink: 0;
  color: #555;
}

.quote-body {
  min-width: 0;
  flex: 1;
}

.quote-text {
  color: #888;
  font-style: italic;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.user-info img {
  width: 1rem;
  height: 1rem;
  border-radius: 2px;
  filter: grayscale(50%);
  transition: filter 0.3s ease;
}

.testimonial:hover .user-info img {
  filter: grayscale(0%);
}

.user-name {
  color: #555;
  font-size: 0.7rem;
}

.right-panel {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: visible;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 94px;
  width: 94px;
  height: 37px;
  padding: 2px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: none;
  color: #cfcfcf;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
  overflow: hidden;
  will-change: transform, opacity;
}

.button-link:hover,
.button-link:focus-visible {
  border-color: #333;
  background: rgba(255, 255, 255, 0.025);
  transform: scale(1.05);
}

.buttons:hover .button-link:not(:hover) {
  opacity: 0.55;
}

.button-link img {
  display: block;
  width: 88px;
  height: 31px;
  flex: 0 0 88px;
  border-radius: 3px;
  object-fit: cover;
  image-rendering: pixelated;
  filter: grayscale(100%) brightness(0.9);
  transition: filter 0.3s ease;
}

.button-link:hover img,
.button-link:focus-visible img {
  filter: grayscale(0%) brightness(1);
}

.text-button {
  display: grid;
  place-items: center;
  width: 88px;
  height: 31px;
  flex: 0 0 88px;
  border: 0;
  border-radius: 3px;
  background: #050505;
  color: #ddd;
  font-size: 0.72rem;
  font-weight: 600;
  text-shadow: 0 1px 0 #000;
  box-shadow: inset 0 0 0 1px #222;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  cursor: default;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
}

.modal-close {
  position: absolute;
  top: -2rem;
  right: -0.5rem;
  border: 0;
  background: none;
  color: #888;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  color: #fff;
}

.refsheet-image {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  border: 1px solid #333;
  border-radius: 4px;
  object-fit: contain;
}

body.devtools-open main,
body.devtools-open .terminal-header,
body.devtools-open .terminal-footer {
  filter: blur(7px);
}

body.protection-pulse .terminal-header {
  border-bottom-color: #555;
  color: #777;
}

@keyframes text-glitch {
  0%,
  100% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
}

@keyframes cursor {
  50% {
    opacity: 0;
  }
}

@keyframes intro-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 800px) {
  body {
    overflow: auto;
  }

  main {
    align-items: flex-start;
    padding: 3.2rem 1rem 2.5rem;
  }

  .title-container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .title-text {
    align-items: center;
    text-align: center;
  }

  h1 {
    font-size: 1.1rem;
  }

  .profile-connections {
    justify-content: center;
  }

  .side-panels {
    flex-direction: column;
  }

  .testimonials,
  .right-panel {
    max-height: none;
    min-height: 180px;
  }

  .buttons {
    display: grid;
    grid-template-columns: repeat(3, 94px);
    justify-content: center;
  }
}

@media (max-width: 500px) {
  .terminal-header {
    font-size: 0.68rem;
  }

  .terminal-header span {
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .avatar-wrapper,
  .avatar {
    width: 110px;
    height: 110px;
  }

  .subtitle {
    max-width: 22rem;
  }

  .status-container {
    width: 100%;
    min-width: 0;
  }

  .status-details {
    gap: 0.4rem;
  }

  .status-subtext {
    max-width: 12rem;
  }

  .buttons {
    grid-template-columns: repeat(3, minmax(0, 94px));
    gap: 0.45rem;
  }

  .status {
    align-items: flex-start;
  }

  .status-details {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .status-subtext {
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.35;
  }
}

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