@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Lora:ital,wght@0,400;0,500;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg:        #0a0a0a;
  --surface:   #161616;
  --border:    #2a2a2a;
  --text:      #e0e0e0;
  --muted:     #5a5a5a;
  --accent:    #00c9a7;
  --momentum:  #f59e0b;
  --ethica:    #60a5fa;
  --grafos:    #a78bfa;
  --trela:     #f87171;
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Lora', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-w:     720px;
}

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

html { font-size: 18px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.85;
  min-height: 100vh;
}

/* ── HEADER ── */
header {
  border-bottom: 1px solid var(--border);
  padding: 1.4rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.site-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.site-title span { color: var(--accent); }

nav { display: flex; gap: 2rem; align-items: center; }

nav a {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

nav a:hover, nav a.active { color: var(--text); }
nav a[href*="momentum"]:hover { color: var(--momentum); }
nav a[href*="ethica"]:hover   { color: var(--ethica); }
nav a[href*="grafos"]:hover   { color: var(--grafos); }
nav a[href*="trela"]:hover    { color: var(--trela); }

/* ── HERO ── */
.hero {
  max-width: var(--max-w);
  margin: 5rem auto 4rem;
  padding: 0 2rem;
}

.hero h1 {
  font-family: var(--font-head);
  font-size: 2.8rem;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero p {
  color: var(--muted);
  font-size: 1rem;
  font-family: var(--font-head);
  letter-spacing: 0.04em;
}

/* ── SECCIONES EN HOME ── */
.home-sections {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem 6rem;
}

.section-block { margin-bottom: 3.5rem; }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 2px;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.section-label.momentum { color: var(--momentum); border: 1px solid var(--momentum); }
.section-label.ethica   { color: var(--ethica);   border: 1px solid var(--ethica); }
.section-label.grafos   { color: var(--grafos);   border: 1px solid var(--grafos); }
.section-label.trela    { color: var(--trela);    border: 1px solid var(--trela); }

/* ── LISTA DE POSTS (CARDS CON PREVIEW) ── */
.post-list { list-style: none; }

.post-card {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

.post-card:last-child { border-bottom: none; }

.post-card-meta {
  margin-bottom: 0.5rem;
}

.post-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.post-card-title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.post-card-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.post-card-title a:hover { color: var(--accent); }

.post-card-excerpt {
  font-size: 0.95rem;
  color: #cccccc;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.post-card-more {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: opacity 0.2s;
}

.post-card-more:hover { opacity: 0.7; }

/* ── ARTÍCULO INDIVIDUAL ── */
.article-wrap {
  max-width: var(--max-w);
  margin: 4rem auto;
  padding: 0 2rem 6rem;
}

.article-meta {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.article-section-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  display: block;
}

.article-title {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.article-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── TIPOGRAFÍA DEL CUERPO DEL ARTÍCULO ── */
.article-body {
  font-size: 1.1rem;
  line-height: 1.9;
}

.article-body p { margin-bottom: 1.6rem; }

.article-body h2 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 500;
  margin: 2.5rem 0 1rem;
  color: var(--text);
}

.article-body h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 500;
  margin: 2rem 0 0.8rem;
  color: var(--muted);
}

.article-body blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  color: var(--muted);
  font-style: italic;
}

.article-body a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.article-body a:hover { border-color: var(--accent); }

.article-body img { max-width: 100%; border-radius: 4px; margin: 2rem 0; filter: brightness(0.9); }

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--accent);
}

/* ── PÁGINA DE SECCIÓN ── */
.section-wrap {
  max-width: var(--max-w);
  margin: 4rem auto;
  padding: 0 2rem 6rem;
}

.section-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.section-name {
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: -0.02em;
}

.section-desc {
  color: #b8b8b8;
  font-family: var(--font-head);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

/* ── SOBRE ── */
.sobre-wrap {
  max-width: 600px;
  margin: 8rem auto;
  padding: 0 2rem 6rem;
}

.sobre-statement {
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-style: italic;
  line-height: 2;
  color: var(--text);
  border-left: 2px solid var(--accent);
  padding-left: 2rem;
  position: relative;
}

.sobre-title {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
  color: var(--text);
}

.sobre-statement p { margin: 0; }

/* ── LAYOUT FLEX CON SIDEBAR ── */
.page-with-sidebar {
  display: flex;
  align-items: flex-start;
}

.main-content {
  flex: 1;
  min-width: 0;
}

/* ── SIDEBAR RETRÁCTIL ── */
.sidebar {
  width: 5%;
  min-width: 44px;
  background: #1a1a2e;
  border-left: 2px solid var(--accent);
  cursor: pointer;
  transition: width 0.3s ease;
  flex-shrink: 0;
  position: sticky;
  top: 62px;
  height: calc(100vh - 62px);
  overflow: hidden;
}

.sidebar.expanded {
  width: 20%;
  min-width: 200px;
  cursor: default;
  background: #1a1a2e;
}

/* ── VISTA COLAPSADA ── */
.sidebar-collapsed-view {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem 0;
}

.sidebar.expanded .sidebar-collapsed-view {
  display: none;
}

.sidebar-section-vertical {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  user-select: none;
}

/* ── VISTA EXPANDIDA ── */
.sidebar-expanded-view {
  display: none;
  padding: 1.2rem 1rem;
  height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar.expanded .sidebar-expanded-view {
  display: block;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-section-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sidebar-close-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  width: 26px;
  height: 26px;
  border-radius: 3px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s;
  flex-shrink: 0;
  padding: 0;
}

.sidebar-close-btn:hover {
  color: var(--text);
  border-color: var(--text);
}

/* ── COLORES POR SECCIÓN ── */
.sidebar-color-momentum { color: var(--momentum); }
.sidebar-color-ethica   { color: var(--ethica); }
.sidebar-color-grafos   { color: var(--grafos); }
.sidebar-color-trela    { color: var(--trela); }

/* ── LISTA DEL SIDEBAR ── */
.sidebar-list { list-style: none; }

.sidebar-item {
  border-bottom: 1px solid var(--border);
}

.sidebar-item:last-child { border-bottom: none; }

.sidebar-item a {
  display: block;
  padding: 0.55rem 0;
  font-family: var(--font-head);
  font-size: 0.78rem;
  color: #c8c8c8;
  text-decoration: none;
  line-height: 1.35;
  transition: color 0.2s;
}

.sidebar-item a:hover,
.sidebar-item a.sidebar-current { color: #ffffff; }

.sidebar-all-link {
  display: block;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.sidebar-all-link:hover { opacity: 0.7; }

/* ── ARCHIVO ── */
.archivo-wrap {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 2rem 6rem;
}

.archivo-title {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.archivo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  align-items: start;
}

.archivo-col-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}

.archivo-momentum { color: var(--momentum); border-color: var(--momentum) !important; }
.archivo-ethica   { color: var(--ethica);   border-color: var(--ethica) !important; }
.archivo-grafos   { color: var(--grafos);   border-color: var(--grafos) !important; }
.archivo-trela    { color: var(--trela);    border-color: var(--trela) !important; }

.archivo-list { list-style: none; }

.archivo-item {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.archivo-item:last-child { border-bottom: none; }

.archivo-item a {
  font-family: var(--font-head);
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  line-height: 1.35;
  transition: color 0.2s;
}

.archivo-item a:hover { color: var(--accent); }

.archivo-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .archivo-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .archivo-grid { grid-template-columns: 1fr; }
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  header { padding: 1rem; flex-direction: column; gap: 1rem; }
  nav { gap: 1rem; flex-wrap: wrap; justify-content: center; }
  .hero h1 { font-size: 2rem; }
  .article-title { font-size: 1.7rem; }
  .post-item { flex-direction: column; gap: 0.3rem; }
}
