/* ── Terminal window ────────────────────────────────────────── */
.terminal-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 3rem);
  padding: 1.25rem;
}

.terminal-window {
  width: 100%;
  max-width: 900px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  border: 1px solid #1c1c1c;
  display: flex;
  flex-direction: column;
  max-height: 88vh;
}

/* Title bar */
.terminal-titlebar {
  background: #1a1a1a;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  user-select: none;
}

.terminal-dots {
  display: flex;
  gap: 6px;
  margin-right: 0.5rem;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red    { background: #ff5f57; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green  { background: #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: #555;
  margin-left: -48px; /* optical center past the dots */
}

/* Scrollback area */
.terminal-body {
  background: #0a0a0a;
  padding: 1rem 1.25rem;
  flex: 1;
  overflow-y: auto;
  font-size: 0.88rem;
  line-height: 1.6;
  scroll-behavior: smooth;
  /* Custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: #2a2a2a #0a0a0a;
}

.terminal-body::-webkit-scrollbar { width: 6px; }
.terminal-body::-webkit-scrollbar-track { background: #0a0a0a; }
.terminal-body::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }

/* Output lines */
.t-prompt {
  color: #39ff14;
  user-select: none;
}

.t-cmd {
  color: #cccccc;
}

.t-output {
  color: #aaaaaa;
  white-space: pre-wrap;
  word-break: break-word;
  display: block;
  margin-bottom: 0.1rem;
}

.t-output.green  { color: #39ff14; }
.t-output.cyan   { color: #00cfff; }
.t-output.muted  { color: #555555; }
.t-output.error  { color: #ff6b6b; }
.t-output.spacer { display: block; height: 0.5rem; }

.t-link {
  color: #00cfff;
  text-decoration: none;
  cursor: pointer;
}
.t-link:hover { text-decoration: underline; }

/* Input line */
.terminal-input-line {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.2rem 0;
  flex-shrink: 0;
}

.terminal-input-line .t-prompt {
  white-space: nowrap;
  padding-right: 0.4rem;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #cccccc;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.88rem;
  line-height: 1.6;
  caret-color: #39ff14;
}

/* Blinking cursor on auto-type lines */
.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: #39ff14;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
  margin-left: 1px;
}

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

/* "Browse normally" escape hatch */
.terminal-escape {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
  z-index: 10;
  background: #161616;
  border: 1px solid #2e2e2e;
  border-radius: 5px;
  padding: 0.45rem 0.9rem;
}

.terminal-escape a {
  color: #aaaaaa;
  text-decoration: none;
  white-space: nowrap;
}

.terminal-escape a:hover { color: #ffffff; text-decoration: none; }

/* Mobile: hide terminal, show normal homepage */
@media (max-width: 767px) {
  .terminal-page     { display: none !important; }
  .terminal-escape   { display: none; }
  .mobile-home       { display: block !important; }
}

@media (min-width: 768px) {
  .mobile-home { display: none; }
}

/* Mobile homepage */
.mobile-home {
  padding: 2.5rem 1.5rem;
}

.mobile-home h1 {
  color: #39ff14;
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.mobile-home .mobile-tagline {
  color: #888;
  font-size: 0.88rem;
  margin-bottom: 2rem;
}

.mobile-home .mobile-links {
  list-style: none;
  padding: 0;
}

.mobile-home .mobile-links li {
  padding: 0.6rem 0;
  border-bottom: 1px solid #1e1e1e;
}

.mobile-home .mobile-links a {
  color: #00cfff;
  font-size: 0.9rem;
}

.mobile-home .mobile-bio hr {
  border: none;
  border-top: 1px solid #1e1e1e;
  margin: 1.5rem 0;
}

.mobile-home .mobile-bio {
  margin-top: 1.25rem;
  color: #888;
  font-size: 0.85rem;
  line-height: 1.8;
}
