/* style.css - Tema rojo oscuro ligero DevAlment */
:root {
  /* Paleta rojo oscuro */
  --bg-dark: #0a0505;
  --bg-darker: #050202;
  --bg-card: rgba(20, 8, 8, 0.9);
  --accent-red: #ff2a2a;
  --accent-dark: #8b0000;
  --accent-neon: #ff073a;
  --text-light: #f0e0e0;
  --text-muted: #b0a0a0;
  --border: rgba(255, 50, 50, 0.2);
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Reset básico */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { 
  height: 100%; 
  font-family: "Inter", system-ui, sans-serif; 
}

/* Fondo principal */
body {
  color: var(--text-light);
  background: linear-gradient(135deg, var(--bg-darker), #150505, var(--bg-dark));
  padding: 30px 20px;
  min-height: 100vh;
}

/* Contenedor */
.container { 
  max-width: 1200px; 
  margin: 0 auto; 
}

/* Header */
header {
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 15px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.brand { 
  display: flex; 
  gap: 15px; 
  align-items: center; 
}

.logo {
  height: 60px; 
  width: 60px; 
  border-radius: 15px;
  display: grid; 
  place-items: center;
  background: linear-gradient(135deg, 
    rgba(255, 40, 40, 0.2), 
    rgba(139, 0, 0, 0.3));
  border: 2px solid var(--border);
  overflow: hidden;
}

.logo img { 
  width: 70%; 
  height: 70%; 
  object-fit: contain;
  filter: brightness(1.2);
}

h1 { 
  font-size: 22px; 
  font-weight: 800; 
  background: linear-gradient(to right, var(--accent-dark), var(--accent-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Navegación */
nav a {
  padding: 10px 20px; 
  border-radius: 8px;
  background: rgba(139, 0, 0, 0.2);
  color: var(--text-light); 
  text-decoration: none; 
  font-weight: 600;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

nav a:hover { 
  background: rgba(255, 40, 40, 0.3);
  border-color: var(--accent-neon);
  transform: translateY(-2px);
}

/* Tarjetas principales */
.card, .hero {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 30px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 30px;
  transition: transform 0.3s ease;
}

.card:hover, .hero:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

/* Imágenes */
.hero img {
  width: 100%; 
  height: 250px; 
  object-fit: cover; 
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

/* Títulos */
h2 { 
  font-size: 26px; 
  margin-bottom: 15px;
  color: var(--accent-red);
  font-weight: 700;
}

h3 {
  font-size: 20px;
  color: var(--text-light);
  margin-bottom: 10px;
}

/* Texto */
p { 
  font-size: 15px; 
  line-height: 1.6; 
  color: var(--text-muted); 
  margin-bottom: 15px;
}

/* Enlaces */
a:not(.btn):not(nav a) {
  color: var(--accent-red);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:not(.btn):not(nav a):hover {
  color: var(--accent-neon);
}

/* Listas */
ul { 
  list-style: none; 
  padding-left: 0; 
  margin: 15px 0;
}

ul li {
  padding: 8px 0;
  color: var(--text-muted);
  padding-left: 25px;
  position: relative;
}

ul li::before { 
  content: "•"; 
  color: var(--accent-red); 
  position: absolute;
  left: 0;
  font-size: 20px;
}

/* Botones */
.btn, .btn-back {
  display: inline-block;
  padding: 12px 24px; 
  border-radius: 8px;
  background: linear-gradient(to right, var(--accent-dark), var(--accent-red));
  color: white; 
  text-decoration: none; 
  font-weight: 600;
  border: none;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.btn:hover, .btn-back:hover { 
  transform: translateY(-3px);
  background: linear-gradient(to right, var(--accent-red), var(--accent-neon));
  box-shadow: 0 5px 15px rgba(255, 40, 40, 0.4);
}

/* Tags */
.tag {
  padding: 8px 15px;
  border-radius: 8px;
  background: rgba(139, 0, 0, 0.2);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  display: inline-block;
  margin: 5px;
  transition: all 0.3s ease;
}

.tag:hover {
  background: rgba(255, 40, 40, 0.3);
  color: var(--text-light);
  transform: scale(1.05);
}

/* Estadísticas */
.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 40px 0;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  min-width: 140px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-red);
}

.stat-card h2 {
  font-size: 32px;
  margin-bottom: 5px;
}

.stat-card p {
  font-size: 14px;
  margin: 0;
}

/* Proyectos */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin: 40px 0;
}

.project-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 25px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-red);
}

.project-card h3 {
  color: var(--accent-red);
  margin-bottom: 10px;
}

.project-card p {
  font-size: 14px;
}

.project-card a {
  color: var(--accent-red);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  margin-top: 10px;
}

.project-card a:hover {
  color: var(--accent-neon);
}

/* Galería */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.gallery img:hover {
  transform: scale(1.03);
  border-color: var(--accent-red);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 2, 2, 0.95);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
  border: 2px solid var(--accent-red);
}

.lightbox.active { display: flex; }

.lightbox::after {
  content: "×";
  position: absolute;
  top: 20px; right: 30px;
  font-size: 30px; 
  color: var(--accent-red);
  cursor: pointer;
}

/* Footer */
footer {
  margin-top: 50px; 
  text-align: center; 
  color: var(--text-muted);
  font-size: 14px; 
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  nav {
    width: 100%;
  }
  
  nav a {
    display: block;
    text-align: center;
    margin-bottom: 10px;
  }
  
  .card, .hero {
    padding: 20px;
  }
  
  .stats {
    gap: 15px;
  }
  
  .stat-card {
    min-width: 120px;
    padding: 15px;
  }
  
  .projects {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .gallery {
    grid-template-columns: 1fr;
  }
}