/* ═══════════════════════════════════════════════════════════════════════════
   TERMINAL PORTFOLIO - STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Colors */
  --bg-dark: #0a0e14;
  --bg-terminal: #0d1117;
  --bg-header: #161b22;
  --text-primary: #00ff9f;
  --text-secondary: #7ee787;
  --text-muted: #8b949e;
  --text-white: #e6edf3;
  --accent-red: #ff6b6b;
  --accent-yellow: #ffd93d;
  --accent-green: #6bcf7f;
  --accent-blue: #58a6ff;
  --accent-purple: #bc8cff;
  --accent-cyan: #56d4dd;
  
  /* Terminal window */
  --border-radius: 12px;
  --header-height: 38px;
  
  /* Fonts */
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* ─────────────────────────────────────────────────────────────────────────
   BASE STYLES
   ───────────────────────────────────────────────────────────────────────── */

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-mono);
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  
  /* Animated background */
  background: 
    radial-gradient(ellipse at 20% 80%, rgba(0, 255, 159, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(88, 166, 255, 0.08) 0%, transparent 50%),
    var(--bg-dark);
}

/* ─────────────────────────────────────────────────────────────────────────
   TERMINAL CONTAINER
   ───────────────────────────────────────────────────────────────────────── */

.terminal-container {
  width: 100%;
  max-width: 900px;
  height: 85vh;
  max-height: 700px;
  background: var(--bg-terminal);
  border-radius: var(--border-radius);
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 100px rgba(0, 255, 159, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  
  /* Subtle animation on load */
  animation: terminalFadeIn 0.6s ease-out;
}

@keyframes terminalFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ─────────────────────────────────────────────────────────────────────────
   TERMINAL HEADER (Window bar)
   ───────────────────────────────────────────────────────────────────────── */

.terminal-header {
  height: var(--header-height);
  background: var(--bg-header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  padding: 0 12px;
  flex-shrink: 0;
}

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

.terminal-buttons span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: opacity 0.2s;
}

.terminal-buttons span:hover {
  opacity: 0.8;
}

.btn-close { background: var(--accent-red); }
.btn-minimize { background: var(--accent-yellow); }
.btn-maximize { background: var(--accent-green); }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.terminal-header-spacer {
  width: 52px;
}

/* ─────────────────────────────────────────────────────────────────────────
   TERMINAL BODY
   ───────────────────────────────────────────────────────────────────────── */

.terminal-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-white);
  
  /* Custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.terminal-body::-webkit-scrollbar {
  width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
  background: transparent;
}

.terminal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ─────────────────────────────────────────────────────────────────────────
   OUTPUT STYLES
   ───────────────────────────────────────────────────────────────────────── */

#output {
  white-space: pre-wrap;
  word-wrap: break-word;
}

.output-line {
  margin-bottom: 4px;
}

.command-line {
  color: var(--text-primary);
  margin-top: 12px;
}

.command-line .prompt {
  color: var(--accent-cyan);
}

.command-line .command {
  color: var(--text-white);
}

/* Special text colors */
.text-green { color: var(--text-primary); }
.text-cyan { color: var(--accent-cyan); }
.text-yellow { color: var(--accent-yellow); }
.text-red { color: var(--accent-red); }
.text-blue { color: var(--accent-blue); }
.text-purple { color: var(--accent-purple); }
.text-muted { color: var(--text-muted); }
.text-bold { font-weight: 700; }

/* ASCII Art */
.ascii-art {
  color: var(--text-primary);
  font-size: 11px;
  line-height: 1.2;
  margin: 8px 0;
}

/* Section headers */
.section-header {
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 15px;
  margin: 16px 0 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 4px;
}

/* Skill categories */
.skill-category {
  color: var(--accent-yellow);
  margin-top: 12px;
  margin-bottom: 4px;
}

.skill-items {
  color: var(--text-muted);
  padding-left: 20px;
}

/* Experience/Education entries */
.entry {
  margin: 16px 0;
  padding-left: 4px;
  border-left: 2px solid var(--accent-blue);
  padding-left: 12px;
}

.entry-title {
  color: var(--text-primary);
  font-weight: 700;
}

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

.entry-period {
  color: var(--text-muted);
  font-size: 12px;
}

.entry-description {
  color: var(--text-white);
  margin-top: 4px;
}

.entry-tech {
  color: var(--accent-purple);
  font-size: 12px;
  margin-top: 4px;
}

/* Project cards */
.project {
  margin: 16px 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-name {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 15px;
}

.project-desc {
  color: var(--text-muted);
  margin: 6px 0;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tech-tag {
  background: rgba(88, 166, 255, 0.15);
  color: var(--accent-blue);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

/* Contact links */
.contact-item {
  margin: 8px 0;
}

.contact-link {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-link:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* Certifications */
.cert-item {
  margin: 6px 0;
  padding-left: 16px;
  position: relative;
}

.cert-item::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-green);
}

/* Help command table */
.help-table {
  margin: 12px 0;
}

.help-row {
  display: flex;
  margin: 4px 0;
}

.help-cmd {
  color: var(--accent-yellow);
  width: 140px;
  flex-shrink: 0;
}

.help-desc {
  color: var(--text-muted);
}

/* Error message */
.error {
  color: var(--accent-red);
}

/* Success message */
.success {
  color: var(--accent-green);
}

/* ─────────────────────────────────────────────────────────────────────────
   INPUT LINE
   ───────────────────────────────────────────────────────────────────────── */

.input-line {
  display: flex;
  align-items: center;
  margin-top: 8px;
  position: relative;
}

.prompt {
  color: var(--accent-cyan);
  margin-right: 8px;
  white-space: nowrap;
}

#command-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-white);
  font-family: var(--font-mono);
  font-size: 14px;
  caret-color: var(--text-primary);
}

#command-input::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

/* Blinking cursor (when input is empty) */
.cursor {
  display: none;
  width: 8px;
  height: 18px;
  background: var(--text-primary);
  animation: blink 1s step-end infinite;
}

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

/* ─────────────────────────────────────────────────────────────────────────
   MOBILE HINT
   ───────────────────────────────────────────────────────────────────────── */

.mobile-hint {
  display: none;
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  animation: fadeInUp 0.5s ease 1s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ─────────────────────────────────────────────────────────────────────────
   RESPONSIVE DESIGN
   ───────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  .terminal-container {
    height: 90vh;
    max-height: none;
    border-radius: 8px;
  }
  
  .terminal-body {
    padding: 12px;
    font-size: 13px;
  }
  
  .ascii-art {
    font-size: 8px;
  }
  
  .help-row {
    flex-direction: column;
  }
  
  .help-cmd {
    width: auto;
  }
  
  .mobile-hint {
    display: block;
  }
  
  .entry {
    padding-left: 8px;
  }
}

@media (max-width: 480px) {
  .terminal-title {
    display: none;
  }
  
  .terminal-header-spacer {
    display: none;
  }
  
  .terminal-body {
    font-size: 12px;
    line-height: 1.5;
  }
}

/* ─────────────────────────────────────────────────────────────────────────
   ANIMATIONS
   ───────────────────────────────────────────────────────────────────────── */

/* Typing effect for text */
.typing {
  overflow: hidden;
  animation: typing 0.5s steps(40, end);
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

/* Glow effect on special elements */
.glow {
  text-shadow: 0 0 10px var(--text-primary), 0 0 20px var(--text-primary);
}

/* Scanlines effect (optional - uncomment to enable) */
/*
.terminal-body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.1) 0px,
    rgba(0, 0, 0, 0.1) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 10;
}
*/
