:root {
  --bg-dark: #05050A;
  --bg-panel: #0A0D14;
  --text-main: #E2E8F0;
  --text-dim: #94A3B8;
  --neon-cyan: #00F0FF;
  --neon-cyan-dim: rgba(0, 240, 255, 0.15);
  --neon-purple: #8A2BE2;

  --font-sans: 'Inter', sans-serif;
  --font-mono: 'Fira Code', monospace;
  --font-display: 'Orbitron', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Efecto de luz de fondo (super ligero para la GPU) */
/* Efecto de luz de fondo (super ligero para la GPU) */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background: 
    radial-gradient(circle at 80% 20%, var(--neon-cyan-dim) 0%, transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(138, 43, 226, 0.08) 0%, transparent 40%);
  filter: blur(80px);
}

/* Navegación */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 0;
  background: rgba(5, 5, 10, 0.8);
  backdrop-filter: blur(10px);
  /* Usado solo aquí, es seguro */
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 100;
}

.nav-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
}

.logo span {
  color: var(--neon-cyan);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--neon-cyan);
}

.btn-outline {
  border: 1px solid var(--neon-cyan);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  color: var(--neon-cyan) !important;
}

.btn-outline:hover {
  background: var(--neon-cyan-dim);
}

/* Layout Principal */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
}

.badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: rgba(0, 240, 255, 0.1);
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border-radius: 50px;
  border: 1px solid var(--neon-cyan-dim);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.neon-text {
  color: var(--neon-cyan);
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.cursor {
  color: var(--neon-cyan);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 600px;
  margin-bottom: 2rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--text-dim);
  transition: border-color 0.3s, color 0.3s;
}

.tech-tag:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

/* Secciones Genéricas */
.section {
  padding: 6rem 0;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
}

/* Grid de Proyectos */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 2rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--neon-cyan-dim);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.25rem;
  color: #fff;
}

.card-links a {
  color: var(--text-dim);
  width: 20px;
  display: inline-block;
  transition: color 0.3s;
}

.card-links a:hover {
  color: var(--neon-cyan);
}

.card p {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.card-tech {
  display: flex;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--neon-cyan);
}

/* Blog List */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.blog-post {
  display: block;
  text-decoration: none;
  background: var(--bg-panel);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.3s;
}

.blog-post:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--neon-cyan-dim);
}

.post-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--neon-purple);
  margin-bottom: 0.5rem;
  display: block;
}

.blog-post h3 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.blog-post p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

footer {
  text-align: center;
  padding: 3rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Contacto */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #fff;
}

.contact-info p {
  color: var(--text-dim);
  margin-bottom: 2.5rem;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-method {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.method-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1rem;
  color: var(--neon-purple);
}

.method-value {
  font-size: 1.1rem;
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}

a.method-value:hover {
  color: var(--neon-cyan);
}

.contact-form {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 2.5rem;
  border-radius: 12px;
  display: grid;
  gap: 1.5rem;
}

.form-group {
  display: grid;
  gap: 0.5rem;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.form-group input,
.form-group textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.8rem 1rem;
  border-radius: 6px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.02);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.btn-primary {
  background: var(--neon-cyan);
  color: var(--bg-dark);
  border: none;
  padding: 1rem 2rem;
  border-radius: 6px;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.btn-primary svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 240, 255, 0.4);
}

.btn-primary:hover svg {
  transform: translateX(3px) translateY(-3px);
}

@media (max-width: 900px) {
  .contact-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-panel);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.empty-state svg {
  width: 60px;
  height: 60px;
  color: var(--text-dim);
  opacity: 0.5;
}

.empty-state p {
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Skeleton Loader */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.03) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-post {
  padding: 1.5rem;
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skeleton-text {
  height: 1rem;
  width: 100%;
}

.skeleton-title {
  height: 1.5rem;
  width: 60%;
}

/* Código en Blogs */
pre code {
  font-family: var(--font-mono) !important;
  font-size: 0.9rem !important;
  border-radius: 8px;
  padding: 1.5rem !important;
  background: #0d1117 !important; /* Estilo VS Code / GitHub Dark */
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 1.5rem 0;
}

/* DevIcons adjustments */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.tech-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  font-weight: 500;
}

.tech-tag i {
  font-size: 1.2rem;
  color: var(--neon-cyan);
}

/* Admin Panel Premium Styles */
.admin-main {
  padding-top: 120px;
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 5rem;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
}

.login-box {
  background: rgba(10, 13, 20, 0.6);
  backdrop-filter: blur(20px);
  padding: 3.5rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  max-width: 500px;
  margin: 100px auto 0;
}

.post-editor {
  background: rgba(10, 13, 20, 0.6);
  backdrop-filter: blur(20px);
  padding: 2.5rem;
  border-radius: 16px;
  border: 1px solid rgba(0, 240, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.post-editor h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--neon-cyan);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.admin-post-list {
  margin-top: 4rem;
  display: grid;
  gap: 1.5rem;
}

.admin-post-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.admin-post-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
}

.admin-post-item strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  color: #fff;
}

.btn-delete {
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.btn-delete:hover {
  background: #EF4444;
  color: white;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero-title {
    font-size: 2.5rem;
  }
}