/* CSS Variables - Dracula Theme */
:root {
  --bg-primary: #1a1b26;
  --bg-terminal: #282a36;
  --bg-header: #21222c;
  --text-primary: #f8f8f2;
  --text-secondary: #6272a4;
  --text-glow: rgba(189, 147, 249, 0.3);
  --text-subtle: rgba(139, 233, 253, 0.08);
  --text-dim: #6272a4;
  --text-muted: #44475a;
  --border-color: #44475a;
  --accent-purple: #bd93f9;
  --accent-pink: #ff79c6;
  --accent-cyan: #8be9fd;
  --accent-green: #50fa7b;
  --accent-orange: #ffb86c;
  --accent-yellow: #f1fa8c;
  --error-color: #ff5555;
  --btn-close: #ff5555;
  --btn-minimize: #f1fa8c;
  --btn-maximize: #50fa7b;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

/* Base */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scanlines overlay */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.1) 0px,
    rgba(0, 0, 0, 0.1) 1px,
    transparent 1px,
    transparent 2px
  );
  opacity: 0.3;
}

/* Container */
.container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem;
  min-height: 100vh;
}

/* Terminal window */
.terminal {
  width: 100%;
  max-width: 900px;
  background-color: var(--bg-terminal);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow:
    0 0 60px rgba(189, 147, 249, 0.08),
    0 20px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

/* Terminal header */
.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
}

.window-buttons {
  display: flex;
  gap: 8px;
}

.btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.btn-close { background-color: var(--btn-close); }
.btn-minimize { background-color: var(--btn-minimize); }
.btn-maximize { background-color: var(--btn-maximize); }

.terminal-title {
  font-size: 12px;
  color: var(--accent-purple);
}

/* Terminal body */
.terminal-body {
  padding: 1.5rem;
}

/* Sections */
.section {
  margin-bottom: 1.5rem;
}

/* Prompt styling */
.prompt {
  margin-bottom: 0.5rem;
}

.prompt-symbol {
  color: var(--accent-green);
  margin-right: 0.5rem;
}

/* ASCII Logo */
.ascii-logo {
  font-size: 10px;
  line-height: 1.2;
  color: var(--text-primary);
  text-shadow: 0 0 10px var(--text-glow);
  margin: 1rem 0 1.5rem 0;
  overflow-x: auto;
  white-space: pre;
}

/* Output text */
.output {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 8px var(--text-glow);
}

.output.dim {
  color: var(--text-dim);
  text-shadow: none;
}

.output.error {
  color: var(--error-color);
  text-shadow: 0 0 8px rgba(255, 85, 85, 0.4);
}

.error-cmd {
  color: var(--text-primary);
}

/* Hint text */
.hint {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 1.5rem;
}

.cmd {
  color: var(--accent-cyan);
}

/* Command form */
.cmd-form {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.cmd-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  caret-color: transparent;
  text-shadow: 0 0 8px var(--text-glow);
  width: 0;
  min-width: 1ch;
  max-width: calc(100% - 2em);
}

.cmd-input::placeholder {
  color: var(--text-muted);
}

.cmd-input:focus {
  outline: none;
}

/* Custom blinking cursor for input */
.cmd-cursor {
  display: none;
  width: 0.6em;
  height: 1.2em;
  background-color: var(--text-primary);
  vertical-align: text-bottom;
  flex-shrink: 0;
}

.cmd-cursor.visible {
  display: inline-block;
  animation: blink 1s step-end infinite;
}

/* Command output */
.cmd-output {
  border-left: 2px solid var(--border-color);
  padding-left: 1rem;
  margin-left: 0.5rem;
}

/* Command history line */
.cmd-history {
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.cmd-history .prompt-symbol {
  color: var(--text-muted);
}

/* Output list */
.output-list {
  list-style: none;
  margin-bottom: 0.5rem;
}

.output-list li {
  padding: 0.25rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.bullet {
  color: var(--accent-pink);
  position: absolute;
  left: 0;
}

/* Contact block */
.contact-block {
  background-color: var(--text-subtle);
  padding: 1rem;
  border-left: 3px solid var(--accent-purple);
}

.contact-cta {
  font-weight: bold;
  margin-bottom: 0.75rem;
  color: var(--accent-green);
  text-shadow: 0 0 8px rgba(80, 250, 123, 0.3);
}

.contact-block p {
  margin-bottom: 0.25rem;
}

.label {
  color: var(--accent-orange);
  display: inline-block;
  min-width: 70px;
}

.link {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: text-shadow 0.2s ease, color 0.2s ease;
}

.link:hover,
.link:focus {
  color: var(--accent-pink);
  text-shadow: 0 0 10px rgba(255, 121, 198, 0.4);
  outline: none;
}

.link:focus-visible {
  outline: 2px solid var(--accent-pink);
  outline-offset: 2px;
}

/* Footer */
.terminal-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.copyright {
  font-size: 12px;
  color: var(--text-dim);
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Typing cursor */
.typing-cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  background-color: var(--text-primary);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .typing-cursor {
    animation: none;
  }

  .cmd-cursor.visible {
    animation: none;
  }

  .link {
    transition: none;
  }
}

/* Responsive */
@media (max-width: 768px) {
  body {
    font-size: 13px;
  }

  .container {
    padding: 1rem 0.5rem;
  }

  .terminal-body {
    padding: 1rem;
  }

  .ascii-logo {
    font-size: 6px;
    line-height: 1.1;
  }

  .contact-block {
    padding: 0.75rem;
  }

  .label {
    min-width: 60px;
  }

  .cmd-input {
    font-size: 16px; /* Prevent zoom on iOS */
  }
}

@media (max-width: 480px) {
  .ascii-logo {
    font-size: 4.5px;
  }

  .terminal-header {
    padding: 0.5rem 0.75rem;
  }

  .terminal-title {
    font-size: 11px;
  }

  .window-buttons {
    gap: 6px;
  }

  .btn {
    width: 10px;
    height: 10px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --border-color: #666;
    --accent-purple: #d4aaff;
    --accent-pink: #ff99cc;
    --accent-cyan: #99ffff;
    --accent-green: #66ff99;
  }
}
