/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ── */
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: 'Geist Mono', 'Courier New', monospace;
  color: #fff;
}

/* ── Skip link (accessibility) ── */
.skip-link {
  position: absolute;
  top: -999px;
  left: 8px;
  z-index: 999;
  padding: 8px 16px;
  background: #fff;
  color: #000;
  font-size: 13px;
  border-radius: 4px;
  text-decoration: none;
  font-family: 'Geist Mono', 'Courier New', monospace;
}
.skip-link:focus {
  top: 8px;
}

/* ── Video background ── */
#bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

/* ── App shell ── */
#app {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

/* ── Header ── */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 36px 36px;
  flex-shrink: 0;
}

.logo-link {
  display: inline-block;
  line-height: 0;
  border-radius: 4px;
}
.logo-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 4px;
}

.logo-link svg {
  height: 38px;
  width: auto;
  display: block;
}

/* ── Language switcher ── */
nav[aria-label] {
  font-family: 'Geist Mono', 'Courier New', monospace;
  font-size: 13px;
  letter-spacing: 2.5px;
  user-select: none;
}

.lang-btn {
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  padding: 4px 2px;
  transition: color 0.2s;
  border-radius: 3px;
}
.lang-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}
.lang-btn[aria-pressed="true"] {
  color: #fff;
}
.lang-btn[aria-pressed="false"] {
  color: rgba(255, 255, 255, 0.38);
}
.lang-btn[aria-pressed="false"]:hover {
  color: rgba(255, 255, 255, 0.65);
}

.lang-sep {
  color: rgba(255, 255, 255, 0.3);
  margin: 0 2px;
  aria-hidden: true;
}

/* ── Main ── */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  overflow: hidden;
}

/* ── Liquid Glass panel ── */
.content-box {
  max-width: 820px;
  width: calc(100% - 48px);
  max-height: calc(100vh - 180px);
  display: flex;
  flex-direction: column;
  padding: 44px 48px;
  overflow: hidden;
  border-radius: 1.5rem;
  z-index: 10;

  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.05) 55%,
    rgba(255, 255, 255, 0.10) 100%
  );

  backdrop-filter: blur(40px) saturate(220%) brightness(112%);
  -webkit-backdrop-filter: blur(40px) saturate(220%) brightness(112%);

  border: 1px solid rgba(255, 255, 255, 0.22);

  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.28),
    0 2px 8px  rgba(0, 0, 0, 0.16),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.58),
    inset 0 -1px 0  rgba(255, 255, 255, 0.10);
}

/* ── Terminal output ── */
.terminal-output {
  font-family: 'Geist Mono', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.4;
  color: #ffffff;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.terminal-output::-webkit-scrollbar { display: none; }

.t-line {
  display: block;
  margin-bottom: 22px;
  white-space: pre-wrap;
  word-break: break-word;
}

.t-line a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.6);
}
.t-line a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── IBM-style block cursor ── */
#cursor {
  display: inline-block;
  width: 0.58em;
  height: 1.05em;
  background: #ffffff;
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: ibm-blink 0.75s step-end infinite;
}

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

/* ── Footer ── */
footer {
  position: absolute;
  font-family: 'Geist Mono', 'Courier New', monospace;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 36px 36px;
  z-index: 20;
}

.copyright {
  font-size: 12px;
  letter-spacing: 0.14em;
  opacity: 0.55;
}

/* ── Noscript fallback ── */
.noscript-content {
  font-family: 'Geist Mono', 'Courier New', monospace;
  font-size: 15px;
  line-height: 1.75;
  color: #fff;
  white-space: pre-wrap;
}
.noscript-content a {
  color: inherit;
  text-decoration: underline;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  #cursor {
    animation: none;
    opacity: 1;
  }
}

/* ── Mobile ── */
@media (max-width: 640px) {
  header { padding: 20px 20px; }
  .content-box {
    padding: 28px 24px;
    max-height: calc(100vh - 150px);
  }
  .terminal-output { font-size: 13px; }
  footer { font-size: 9px; letter-spacing: 1px; }
}
