/* ============================================
   VARIABLES GLOBALES
   ============================================ */
:root {
  --color-bg: var(--hero-bg);
  --color-text: var(--hero-text); 
  --color-text-secondary: var(--hero-text-muted);
  --color-primary: var(--hero-accent);
  --color-primary-light: rgba(232, 163, 61, 0.12);
  --color-border: var(--hero-border);
  --color-card-bg: var(--hero-surface);
  
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 3.5rem;
  --max-width: 900px;
  --hero-bg: #0B0D10;
  --hero-surface: #12151A;
  --hero-border: #22262C;
  --hero-text: #ECEEF0;
  --hero-text-muted: #8B929A;
  --hero-accent: #E8A33D;
  --hero-accent-2: #4FD1C5;
  --font-display: 'Space Grotesk', sans-serif;
  --font-code: 'JetBrains Mono', monospace;
}

/* ============================================
   RESET BÁSICO
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   TIPOGRAFÍA Y TÍTULOS
   ============================================ */
h1, h2, h3 {
  letter-spacing: -0.02em;
}

h1 {
  font-size: 3rem;
  font-weight: 800;
}

h2 {
  font-family: var(--font-code);
  font-size: 1.8rem;
  border-bottom: 3px solid var(--color-primary-light);
  display: inline-block;
  padding-bottom: 4px;
  margin-bottom: 2rem;
  color: var(--color-primary);
  font-weight: 500;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text);
  font-weight: 700;
}

/* ============================================
   LAYOUT GENERAL
   ============================================ */
header, main, footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

header {
  position: sticky;
  top: 0;
  background: rgba(11, 13, 16, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hero-border);
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) 0;
}

.logo {
  font-family: var(--font-code);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--hero-accent);
  text-decoration: none;
}

nav ul {
  display: flex;
  list-style: none;
  gap: var(--spacing-md);
}

nav a {
  font-family: var(--font-code);
  color: var(--hero-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--hero-accent-2);
}

/* ============================================
   HERO SECTION — rediseño terminal/dark
   ============================================ */
#hero {
  background: var(--hero-bg);
  color: var(--hero-text);
  min-height: 90vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: var(--spacing-lg) var(--spacing-md);
  text-align: left;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}
#hero > .hero-content,
#hero > .hero-terminal {
  max-width: 1200px;
}

.hero-content { max-width: 480px; }

.hero-eyebrow {
  font-family: var(--font-code);
  font-size: 0.8rem;
  color: var(--hero-accent-2);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.2rem;
}

.eyebrow-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--hero-accent-2);
  box-shadow: 0 0 0 4px rgba(79, 209, 197, 0.15);
}

#hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  color: var(--hero-text);
  margin-bottom: 1.2rem;
}

#hero h1 .accent { color: var(--hero-accent); }

#hero p {
  font-size: 1.1rem;
  color: var(--hero-text-muted);
  margin-bottom: 2rem;
}

/* Botones — solo dentro del hero, no afecta .btn del resto del sitio */
#hero .btn-primary {
  background-color: var(--hero-accent);
  color: #1A1204;
}
#hero .btn-primary:hover {
  background-color: var(--hero-accent);
  transform: translateY(-2px);
}
#hero .btn-secondary {
  background-color: transparent;
  color: var(--hero-text);
  border: 2px solid var(--hero-border);
}
#hero .btn-secondary:hover {
  border-color: var(--hero-accent-2);
  color: var(--hero-text);
  background: transparent;
  transform: translateY(-2px);
}

.hero-stack {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}
.hero-stack span {
  font-family: var(--font-code);
  font-size: 0.8rem;
  color: var(--hero-text-muted);
  border-left: 2px solid var(--hero-border);
  padding-left: 8px;
}

/* Terminal */
.hero-terminal {
  background: var(--hero-surface);
  border: 1px solid var(--hero-border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 60px -25px rgba(0,0,0,0.6);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hero-border);
}
.terminal-bar .dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-bar .dot.r { background: #E8555B; }
.terminal-bar .dot.y { background: #E8B93D; }
.terminal-bar .dot.g { background: #4FD17A; }
.terminal-title {
  margin-left: 8px;
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: var(--hero-text-muted);
}
.terminal-body {
  padding: 22px 20px;
  font-family: var(--font-code);
  font-size: 0.85rem;
  line-height: 1.9;
  min-height: 220px;
}
.tline { opacity: 0; animation: hero-reveal .4s forwards; }
.tprompt { color: var(--hero-accent-2); }
.tout { color: var(--hero-text); }
.tcomment { color: var(--hero-text-muted); }
.tcursor {
  display: inline-block;
  width: 8px; height: 15px;
  background: var(--hero-accent);
  margin-left: 4px;
  vertical-align: middle;
  animation: hero-blink 1s step-end infinite;
}
@keyframes hero-reveal { to { opacity: 1; } }
@keyframes hero-blink { 50% { opacity: 0; } }
.tline:nth-child(1){ animation-delay:.2s; }
.tline:nth-child(2){ animation-delay:.9s; }
.tline:nth-child(3){ animation-delay:1.4s; }
.tline:nth-child(4){ animation-delay:1.9s; }
.tline:nth-child(5){ animation-delay:2.6s; }
.tline:nth-child(6){ animation-delay:3.1s; }
.tline:nth-child(7){ animation-delay:3.6s; }

@media (max-width: 768px) {
  #hero { grid-template-columns: 1fr; padding: var(--spacing-md) var(--spacing-md); }
  .hero-content { max-width: 100%; }
}

/* ============================================
   SOBRE MÍ
   ============================================ */
section {
  padding: var(--spacing-lg) 0;
}

#about p {
  font-size: 1.1rem;
  max-width: 800px;
  color: var(--color-text-secondary);
}

/* ============================================
   SKILLS — estilo neofetch
   ============================================ */
.skills-neofetch {
  background: var(--hero-surface);
  border: 1px solid var(--hero-border);
  border-radius: 10px;
  overflow: hidden;
  max-width: 700px;
}

.neofetch-body {
  display: flex;
  gap: 32px;
  padding: 28px 24px;
  flex-wrap: wrap;
}

.neofetch-art {
  font-family: var(--font-code);
  color: var(--hero-accent);
  font-size: 0.85rem;
  line-height: 1.15;
  white-space: pre;
  margin: 0;
}

.neofetch-info {
  font-family: var(--font-code);
  font-size: 0.85rem;
}

.nf-line {
  display: flex;
  gap: 10px;
  padding: 3px 0;
}

.nf-key {
  color: var(--hero-accent-2);
  min-width: 100px;
}

.nf-val {
  color: var(--hero-text);
}

.nf-colors {
  margin-top: 10px;
  gap: 6px;
}

.cbox {
  width: 14px;
  height: 14px;
  border-radius: 2px;
}

@media (max-width: 600px) {
  .neofetch-body { flex-direction: column; }
}


/* ============================================
   PROYECTOS — estilo terminal / git clone
   ============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-md);
}

.project-card {
  background: var(--hero-surface);
  border: 1px solid var(--hero-border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--hero-accent-2);
}

.project-body {
  padding: 20px 22px 24px;
}

.pcmd {
  font-family: var(--font-code);
  font-size: 0.85rem;
  color: var(--hero-text);
  margin-bottom: 10px;
}

.pcmd .tprompt { color: var(--hero-accent-2); margin-right: 6px; }

.pcomment {
  font-family: var(--font-code);
  font-size: 0.8rem;
  color: var(--hero-text-muted);
  margin-bottom: 14px;
}

.project-card p {
  color: var(--hero-text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.ptags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ptags span {
  font-family: var(--font-code);
  font-size: 0.72rem;
  color: var(--hero-accent);
  background: rgba(232, 163, 61, 0.1);
  padding: 4px 10px;
  border-radius: 5px;
}

/* ============================================
   CONTACTO Y FOOTER
   ============================================ */
#contact a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

footer {
  text-align: center;
  padding: var(--spacing-lg) 0;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  border-top: 1px solid var(--color-border);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.5rem; }
  #hero { padding: var(--spacing-md) 0; }
  nav { flex-direction: column; gap: var(--spacing-sm); }
}

/* ============================================
   BOTÓN DE IDIOMAS
   ============================================ */
.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem; /* Espacio entre menú y botón */
}

.lang-btn {
  background: var(--hero-surface);
  border: 1px solid var(--hero-border);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-family: var(--font-code);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--hero-text);
}

.lang-btn:hover {
  border-color: var(--hero-accent-2);
  color: var(--hero-accent-2);
}

/* Responsive para móvil */
@media (max-width: 768px) {
  .nav-right {
    flex-direction: column;
    gap: 1rem;
  }
}