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

body {
  background: #2b2b2b;
  color: #e5e5e5;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 24px 120px;
}

/* Header */
.header {
  margin-bottom: 40px;
}

.header h1 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: -0.02em;
  color: #e5e5e5;
}

.subtitle {
  color: #a0a0a0;
  font-size: 1rem;
  margin-top: 4px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.social-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #6aa0ff;
  text-decoration: none;
  transition: opacity 0.15s;
}

.social-links a:hover {
  opacity: 0.7;
}

.social-links a:focus-visible {
  outline: 2px solid #6aa0ff;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Bio */
.bio {
  margin-bottom: 40px;
}

.bio p {
  color: #a0a0a0;
  font-size: 1rem;
  max-width: 600px;
}

/* Terminal */
.terminal {
  background: #222;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  overflow: hidden;
}

#terminal-body {
  padding: 16px;
}

#message-input {
  width: 100%;
  background: transparent;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  color: #e5e5e5;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  padding: 12px;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
  min-height: 100px;
}

#message-input:focus {
  border-color: #6aa0ff;
}

#message-input::placeholder {
  color: #666;
}

.terminal-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

#send-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  padding: 8px 20px;
  background: transparent;
  color: #6aa0ff;
  border: 1px solid #6aa0ff;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

#send-btn:hover {
  background: #6aa0ff;
  color: #222;
}

#send-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

#send-btn:focus-visible {
  outline: 2px solid #6aa0ff;
  outline-offset: 2px;
}

#status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

.success-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #a0a0a0;
  margin-bottom: 4px;
}

.success-done {
  color: #6aa0ff;
}

.hidden {
  display: none;
}

/* Command Palette */
.palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
  z-index: 100;
}

.palette-overlay.hidden {
  display: none;
}

.palette {
  width: 100%;
  max-width: 480px;
  background: #222;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.palette-header {
  padding: 12px 16px;
  border-bottom: 1px solid #3a3a3a;
}

#palette-input {
  width: 100%;
  background: transparent;
  border: none;
  color: #e5e5e5;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  outline: none;
}

#palette-input::placeholder {
  color: #666;
}

.palette-list {
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
}

.palette-list li {
  padding: 10px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #e5e5e5;
  cursor: pointer;
  transition: background 0.1s;
}

.palette-list li:hover,
.palette-list li.active {
  background: #2e2e2e;
}

.palette-desc {
  color: #666;
}

/* Footer */
.site-footer {
  max-width: 720px;
  margin: 48px auto 0;
  padding: 0 24px 40px;
  position: relative;
}

.footer-sig {
  display: inline-block;
  cursor: default;
  position: relative;
}

.footer-sig:focus-visible {
  outline: none;
}

.footer-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #555;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.footer-amp {
  color: #6aa0ff;
  opacity: 0.5;
}

.footer-sig:hover .footer-text,
.footer-sig:focus .footer-text {
  color: #a0a0a0;
}

/* Hover reveal */
.footer-reveal {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  width: 380px;
  background: #1e1e1e;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 10;
}

.footer-sig:hover .footer-reveal,
.footer-sig:focus .footer-reveal,
.footer-sig.open .footer-reveal {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.reveal-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #a0a0a0;
  margin-bottom: 6px;
}

.reveal-prompt {
  color: #6aa0ff;
  margin-right: 6px;
}

.reveal-body {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: #888;
  line-height: 1.5;
  margin-bottom: 12px;
}

.reveal-divider {
  border: none;
  border-top: 1px solid #2e2e2e;
  margin: 12px 0;
}

.reveal-edbot {
  color: #6aa0ff;
  opacity: 0.8;
  margin-bottom: 0;
}

/* Responsive */
@media (max-width: 600px) {
  main {
    padding: 48px 16px 40px;
  }

  .site-footer {
    margin-top: 24px;
    padding-bottom: 32px;
  }

  .header h1 {
    font-size: 1.5rem;
  }

  .social-links {
    gap: 8px;
  }

  .palette {
    margin: 0 16px;
  }
}
