:root {
  --bg: #0f1115;
  --text: #e6e6e6;
  --muted: #9aa0a6;
  --accent: #4caf50;
  --border: #1f232b;
}

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

body {
  font-family: "JetBrains Mono", monospace;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

nav a {
  margin-right: 1.5rem;
  text-decoration: none;
  color: var(--text);
  opacity: 0.8;
  transition: color 0.2s ease, opacity 0.2s ease;
}

nav a:hover {
  color: var(--accent);
  opacity: 1;
}

/* CONTENEDOR PRINCIPAL */
.container {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* CONTENIDO PRINCIPAL */
.content {
  min-width: 0;
}

/* BARRA DERECHA */
.sidebar {
  align-self: start;
  position: sticky;
  top: 2rem;
  border-left: 1px solid var(--border);
  padding-left: 1.5rem;
}

/* PERFIL FLEX */
.profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.profile img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.profile-info h3 {
  margin: 0;
  font-size: 1.1rem;
}

.profile-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.filter {
  margin-bottom: 2rem;
}

.filter input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: var(--bg);
  color: var(--text);
}

.sections h4 {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.sections a {
  display: block;
  text-decoration: none;
  color: var(--text);
  margin-bottom: 0.8rem;
  opacity: 0.85;
}

.sections a:hover {
  color: var(--accent);
  opacity: 1;
}

/* SECCIONES Y ARTÍCULOS */
section h2 {
  margin-bottom: 2rem;
  font-size: 1.4rem;
}

article {
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.5s forwards;
}

article:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

article h3 {
  margin-bottom: 0.5rem;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

article a {
  color: var(--accent);
  text-decoration: none;
  transition: text-decoration 0.2s ease;
}

article a:hover {
  text-decoration: underline;
}

footer {
  max-width: 1200px;
  margin: 4rem auto 2rem;
  padding: 0 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .container {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-left: none;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    padding-left: 0;
  }

  .profile {
    flex-direction: column;
    text-align: center;
  }

  .profile-info p {
    font-size: 0.85rem;
  }
}

.machine-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.machine-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.machine-logo {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.machine-info h3 {
  margin: 0;
  font-size: 1.1rem;
}

.machine-info .difficulty {
  margin-top: 0.3rem;
}
