@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap');

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

:root {
  --bg: #f5f5f5;
  --bg-secondary: #e8e8e8;
  --red: #cc0000;
  --red-hover: #ff0000;
  --white: #0a0a0a;
  --ice: #111111;
  --gray: #888888;
  --border: #cccccc;
  --font-main: 'Cormorant Garamond', Georgia, serif;
  --font-mono: 'Fira Code', 'Courier New', monospace;
}

body {
  background-color: var(--bg);
  color: var(--white);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--red-hover);
}

/* Navbar */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background-color: var(--bg);
  z-index: 100;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--white);
  letter-spacing: 2px;
}

.nav-logo span {
  color: var(--red);
}

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

.nav-links a {
  color: var(--ice);
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

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

/* Hero */
.hero {
  max-width: 860px;
  margin: 6rem auto;
  padding: 0 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 4rem;
  letter-spacing: 6px;
  color: var(--white);
  text-transform: uppercase;
}

.hero h1 span {
  color: var(--red);
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--ice);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 1rem 0;
}

.hero .divider {
  width: 60px;
  height: 2px;
  background: var(--red);
  margin: 1.5rem auto;
}

.hero .bio {
  font-size: 1.25rem;
  color: var(--ice);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

.hero-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.hero-links a {
  border: 1px solid var(--red);
  color: var(--white);
  padding: 0.5rem 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: background 0.2s;
}

.hero-links a:hover {
  background: var(--red);
  color: var(--white);
}

/* Cards */
.cards-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 1100px;
  margin: 3rem auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: border-color 0.2s;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding-right: 2rem;
  width: 100%;
}

.card:hover {
  border-color: var(--red);
}

.card img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  padding: 1rem;
}

.card-body {
  padding: 1rem 1rem 1rem 0;
  flex: 1;
}

.card-title {
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: 0.3rem;
}

.card-meta {
  font-size: 1rem;
  color: var(--red);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.card-desc {
  font-size: 1.25rem;
  color: var(--ice);
  line-height: 1.6;
}

/* Content pages */
.content-wrap {
  max-width: 760px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.content-wrap h1 {
  font-size: 2.5rem;
  color: var(--white);
  border-bottom: 2px solid var(--red);
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
}

.with-border h1 {
  border-bottom: 2px solid var(--red);
  padding-bottom: 0.5rem;
}

.content-wrap h2 {
  font-size: 1.75rem;
  color: var(--red);
  margin: 2rem 0 1rem;
}

.content-wrap h3 {
  font-size: 1.3rem;
  color: var(--white);
  margin: 1.5rem 0 0.5rem;
}

.content-wrap p {
  font-size: 1.25rem;
  color: var(--ice);
  margin-bottom: 1rem;
}

.content-wrap code {
  font-family: var(--font-mono);
  background: transparent;
  color: #cc0000;
  padding: 0.15rem 0.4rem;
  font-size: 0.85rem;
}

.content-wrap pre {
  background: #1a1a1a;
  border-left: 3px solid var(--red);
  padding: 1.2rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.content-wrap pre code {
  background: none;
  color: #f0f0f0;
  font-size: 0.85rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--gray);
  font-size: 0.8rem;
  letter-spacing: 1px;
  margin-top: 4rem;
}

footer span {
  color: var(--red);
}

/* Certificaciones */
.cert-card {
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s;
}

.cert-card:hover {
  border-color: var(--red);
}

.cert-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.cert-badge {
  color: var(--red);
  font-size: 1.4rem;
  font-weight: bold;
}

.cert-name {
  color: var(--white);
  font-size: 1.05rem;
  margin: 0;
}

.cert-meta {
  color: var(--gray);
  font-size: 0.85rem;
  margin: 0;
  letter-spacing: 1px;
}

.cert-desc {
  color: var(--ice);
  font-size: 0.95rem;
}

.cert-upcoming {
  border-left: 3px solid var(--red);
  padding-left: 1rem;
  margin-top: 2rem;
}

.cert-upcoming p {
  color: var(--gray);
  font-style: italic;
}

.cert-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

/* Dificultad */
.diff-very\ easy { color: #00ff00; }
.diff-easy       { color: #00cc00; }
.diff-medium     { color: #ffaa00; }
.diff-hard       { color: #ff0000; }
.diff-insane     { color: #9900ff; }

/* Syntax highlight override */
.highlight { background: transparent; padding: 1rem; border-left: 3px solid var(--red); margin: 1.5rem 0; overflow-x: auto; }
.highlight pre { background: none; border: none; padding: 0; margin: 0; }
.highlight code { background: none; color: #111111; font-size: 0.9rem; }
.chroma { background: transparent; color: #111111; }
.chroma .k  { color: #111111; }
.chroma .s  { color: #111111; }
.chroma .c  { color: #111111; }
.chroma .n  { color: #111111; }
.chroma .m  { color: #111111; }

/* Reset total syntax highlight */
.chroma * { color: #111111 !important; background: transparent !important; }
.highlight * { color: #111111 !important; background: transparent !important; }

/* Sin borde en h1 de metodologia */
.metodologia-page h1 {
  border-bottom: none;
  padding-bottom: 0;
}

.no-border h1:first-child {
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

/* Sin borde en h1 dentro del div de portada de metodologia */
.content-wrap h1[style] {
  border-bottom: none;
  padding-bottom: 0;
}

/* Bloques de codigo sin margen lateral */
.content-wrap .highlight {
  margin-left: -2rem;
  margin-right: -2rem;
}

/* Tabla portada metodologia */
.content-wrap table td {
  font-family: var(--font-mono);
  font-size: 1rem;
}

/* Numeros normales en tablas */
.content-wrap table td {
  font-variant-numeric: lining-nums;
  font-family: var(--font-main);
}

/* Reset tabla portada */
.content-wrap table td {
  font-variant-numeric: normal;
  font-family: var(--font-main);
  font-size: 1.2rem;
}



/* Imagenes centradas en contenido */
.content-wrap img {
  display: block;
  margin: 1.5rem auto;
  max-width: 100%;
}

.content-wrap table strong {
  font-weight: bold;
}

.content-wrap table td:first-child {
  font-weight: bold;
}

/* Negritas visibles */
.content-wrap strong, .content-wrap b {
  font-weight: 700;
  color: var(--white);
}

/* Negritas globales */
strong, b {
  font-weight: 700;
}

/* Nav activo */
.nav-links a.active {
  color: var(--white);
  font-weight: 700;
}

/* Caption debajo de imagenes */
.content-wrap img + em,
.content-wrap img ~ em {
  display: block;
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: -1rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

/* Caption de imagenes */
.img-caption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: 0.3rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

/* Quitar caption en lightbox */
.glightbox-clean .gslide-description {
  display: none;
}
