/* ============================================
   TOKENS
============================================ */
:root {
  --bg: #0B0E14;
  --panel: #12161F;
  --panel-alt: #161B26;
  --border: #232838;
  --text: #E4E7EB;
  --text-dim: #8993A6;
  --accent: #3FE0A5;
  --accent-dim: #2A9D74;
  --amber: #E0A93F;

  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-body: 'Inter', -apple-system, sans-serif;

  --radius: 6px;
  --max-width: 820px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 40px 20px;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 20% 10%, rgba(63, 224, 165, 0.05), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(224, 169, 63, 0.04), transparent 40%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
}

/* Scanline sutil, decorativa */
.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.015) 0px,
    rgba(255,255,255,0.015) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.4;
}

/* ============================================
   TERMINAL WINDOW
============================================ */
.terminal-window {
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6), 0 0 0 1px rgba(63,224,165,0.03);
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: var(--panel-alt);
  border-bottom: 1px solid var(--border);
}

.titlebar-dots { display: flex; gap: 7px; flex-shrink: 0; }
.dot { width: 11px; height: 11px; border-radius: 50%; display: block; }
.dot-red { background: #FF5F57; }
.dot-yellow { background: #FEBC2E; }
.dot-green { background: #28C840; }

.titlebar-path {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-print {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  flex-shrink: 0;
}
.btn-print:hover { background: rgba(63, 224, 165, 0.1); }
.btn-print:active { transform: scale(0.97); }
.btn-print:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.terminal-body {
  padding: 44px clamp(20px, 5vw, 56px) 40px;
}

/* ============================================
   PROMPT LINES
============================================ */
.prompt-line {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 14px;
  letter-spacing: 0.2px;
}
.prompt {
  color: var(--accent);
  font-weight: 600;
  margin-right: 8px;
}

/* ============================================
   HERO
============================================ */
.hero { margin-bottom: 8px; }

.name {
  font-family: var(--font-mono);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -0.5px;
  color: #fff;
}

.role {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--accent);
  margin: 0 0 14px;
  font-weight: 500;
}
.cursor-tag { color: var(--text-dim); margin-right: 6px; }

.type-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--accent);
  margin-left: 4px;
  animation: blink 1.1s step-end infinite;
  vertical-align: text-bottom;
}
@keyframes blink { 50% { opacity: 0; } }

.tagline {
  font-size: 15.5px;
  color: var(--text-dim);
  max-width: 56ch;
  margin: 0 0 26px;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.contact-list svg { color: var(--accent); flex-shrink: 0; }
.contact-list a {
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.contact-list a:hover,
.contact-list a:focus-visible {
  color: var(--text);
  border-color: var(--accent-dim);
}

/* ============================================
   DIVIDER
============================================ */
.divider {
  margin: 34px 0;
  text-align: center;
  color: var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 4px;
  user-select: none;
}

/* ============================================
   BLOCKS
============================================ */
.block { margin-bottom: 8px; }

.profile-text {
  font-size: 15.5px;
  color: var(--text);
  max-width: 68ch;
  margin: 0;
}
.profile-text strong { color: var(--accent); font-weight: 600; }

/* ============================================
   NEOFETCH STACK BLOCK
============================================ */
.neofetch {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
}

.neofetch-ascii {
  flex-shrink: 0;
  color: var(--accent-dim);
  font-family: var(--font-mono);
}
.neofetch-ascii pre {
  margin: 0;
  font-size: 11px;
  line-height: 1.3;
}

.neofetch-info {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.nf-row {
  display: flex;
  gap: 6px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--border);
  flex-wrap: wrap;
}
.nf-row:last-child { border-bottom: none; }
.nf-row dt {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--amber);
  font-weight: 600;
  min-width: 108px;
  flex-shrink: 0;
}
.nf-row dd {
  margin: 0;
  font-size: 13.5px;
  color: var(--text);
}

/* ============================================
   CARDS (proyectos / experiencia / educación)
============================================ */
.card {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
}
.card:last-child { margin-bottom: 0; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 4px;
}
.card-header h3 {
  font-family: var(--font-mono);
  font-size: 16.5px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber);
  border: 1px solid rgba(224, 169, 63, 0.35);
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.card-sub {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 12px;
  font-style: italic;
}

.card-list {
  margin: 0;
  padding-left: 18px;
  font-size: 14.5px;
  color: var(--text);
}
.card-list li { margin-bottom: 6px; }
.card-list li:last-child { margin-bottom: 0; }
.card-list strong { color: var(--accent); font-weight: 600; }

/* ============================================
   FOOTER
============================================ */
.footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.footer .prompt-line { margin-bottom: 6px; }
.footer-text {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0;
}
.highlight { color: var(--accent); }

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 640px) {
  body { padding: 16px 10px; }
  .terminal-body { padding: 32px 20px 30px; }
  .neofetch { flex-direction: column; gap: 16px; }
  .card-header { flex-direction: column; align-items: flex-start; }
  .nf-row dt { min-width: 100%; }
  .titlebar-path { display: none; }
}

/* ============================================
   REDUCED MOTION
============================================ */
@media (prefers-reduced-motion: reduce) {
  .type-cursor { animation: none; opacity: 1; }
  html { scroll-behavior: auto; }
}

/* ============================================
   PRINT (PDF export)
============================================ */
@media print {
  body {
    background: #fff !important;
    padding: 0;
    color: #111;
  }
  .scanline { display: none; }
  .terminal-window {
    box-shadow: none;
    border: none;
    max-width: 100%;
  }
  .titlebar { display: none; }
  .terminal-body { padding: 18px 6px; }
  .name, .card-header h3 { color: #111; }
  .prompt-line, .role, .badge, .nf-row dt { color: #444 !important; }
  .card, .neofetch {
    background: #fafafa !important;
    border: 1px solid #ddd !important;
    break-inside: avoid;
  }
  .profile-text strong, .card-list strong, .highlight { color: #111 !important; font-weight: 700; }
  .type-cursor { display: none; }
  a { color: #111 !important; text-decoration: underline; }
}
