:root {
  --accent-color: #4A90E2;
  --secondary-color: #1A1F2E;
  --dark-color: #0D1117;
  --grey-color: #2C3E50;
  --body-text-color: #E1E8ED;
  --light-text-color: #B8C5D6;
  --link-color: #4A90E2;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Nunito Sans', sans-serif;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.65;
  color: var(--body-text-color);
  background-color: var(--secondary-color);
  margin: 0;
}

/* ───────────────────────────────────────────────
   Espaciado uniforme en todas las secciones
───────────────────────────────────────────────── */
section {
  padding: 32px 0;
  min-height: 40vh;
}

#home.py-4 {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
  min-height: 80vh;
}

#about,
#resume,
#portfolio,
#contact {
  padding: 32px 0;
}

.content-container > section {
  margin-bottom: 1rem;
}

section h1,
section h2 {
  margin-bottom: 0.6rem;
  position: relative;
  padding-bottom: 0.3rem;
}

section h1::after,
section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 70px;
  height: 3px;
  background: var(--accent-color);
  border-radius: 2px;
}

/* ───────────────────────────────────────────────
   Tipografía base
───────────────────────────────────────────────── */
h1, .h1 { font-size: 4.4rem; font-weight: 800; margin: 0.3em 0; }
h2, .h2 { font-size: 2.6rem; font-weight: 700; margin: 0.7em 0 0.5em; }
h3, .h3 { font-size: 1.7rem; font-weight: 600; }
h4, .h4 { font-size: 1.4rem; font-weight: 600; margin: 1em 0 0.5em; }

p {
  color: var(--light-text-color);
  font-size: 1.05rem;
  line-height: 1.75;
}

.lead-paragraph {
  font-size: 1.3rem;
  line-height: 1.8;
  color: #d1d9e0;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.25s ease;
}

a:hover {
  color: #6aa8f5;
}

/* ───────────────────────────────────────────────
   Navegación vertical - SOLO iconos cambian color
───────────────────────────────────────────────── */
.navigation {
  position: fixed;
  left: 20px;
  top: 30px;                    /* distancia desde arriba */
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-start;      /* alineado a la izquierda */
}

.nav-pills {
  background: transparent;
  padding: 1rem 0.6rem;
  border-radius: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;                  /* espacio entre iconos */
}

.nav-link {
  color: #6a829e;
  font-size: 2rem;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-color);
  background: transparent !important;
}

.nav-link i.ti {
  transition: all 0.32s ease;
}

.nav-link:hover i.ti,
.nav-link.active i.ti {
  transform: scale(1.25);
}

/* ───────────────────────────────────────────────
   Sidebar - visible en desktop, offcanvas en móvil
───────────────────────────────────────────────── */
.hero-sidebar {
  position: fixed;
  right: 0;
  top: 0;
  width: 340px;
  height: 100vh;
  background: rgba(13, 17, 23, 0.94);
  backdrop-filter: blur(10px);
  border-left: 1px solid rgba(74, 144, 226, 0.14);
  z-index: 900;
  overflow-y: auto;
  color: #e1e8ed;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-sidebar .hero-img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--accent-color);
  box-shadow: 0 0 30px rgba(74, 144, 226, 0.28);
  margin-bottom: 1.8rem;
  transition: transform 0.4s ease;
}

.hero-sidebar .hero-img:hover {
  transform: scale(1.06);
}

.hero-sidebar h2 {
  font-size: 1.95rem;
  margin: 0.6rem 0 0.4rem;
  color: white;
}

.hero-sidebar > p {
  color: rgba(225, 232, 237, 0.84);
  font-size: 1.08rem;
  margin-bottom: 2.2rem;
}

.social-icon {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  margin: 1.8rem 0 3rem;
  position: relative;
  z-index: 999;
}

.social-link {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  color: white;
  font-size: 1.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.09);
  transition: all 0.3s ease;
    position: relative;
  z-index: 1000;
}

.social-link:hover {
  background: var(--accent-color);
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(74, 144, 226, 0.35);
}

/* Botón hamburguesa (solo móvil) */
.offcanvas-btn { display: flex; 
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 1001;
  display: none;
}

.offcanvas-btn i {
    font-size: 30px;
    color: var(--body-text-color);
    transition: color 0.3s ease;
}

.offcanvas-btn:hover i {
    color: var(--accent-color);
}


/* Contenido principal deja espacio para sidebar */
.main-content {
  margin-right: 340px;
  min-height: 100vh;
}

/* ───────────────────────────────────────────────
   Habilidades
───────────────────────────────────────────────── */
.skills-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.4rem 2rem;
  margin: 2.5rem 0;
}

.skills-list h4 {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 16px 20px;
  background: rgba(74, 144, 226, 0.07);
  border: 1px solid rgba(74, 144, 226, 0.15);
  border-radius: 12px;
  color: var(--body-text-color);
  font-weight: 600;
  transition: all 0.3s ease;
}

.skills-list h4:hover {
  background: rgba(74, 144, 226, 0.15);
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.skills-list .ti {
  font-size: 2rem;
  color: var(--accent-color);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 1.4rem 2rem;
  align-items: stretch;
}

.service-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.8rem;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-color);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 15px;
  background: rgba(74, 144, 226, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  font-size: 1.4rem;
}

.service-card p {
  color: var(--light-text-color);
  line-height: 1.6;
  flex-grow: 1;
}

@media (max-width: 1024px) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 768px) {
  .service-grid {
    grid-template-columns: repeat(1, minmax(200px, 1fr));
  }
}

/* Responsive Adjustments */
/* ───────────────────────────────────────────────
   Contacto
───────────────────────────────────────────────── */
.contact-list {
  padding: 2rem;
  background: rgba(255,255,255,0.05);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.09);
  transition: all 0.35s ease;
}

.contact-list:hover {
  transform: translateY(-8px);
  background: rgba(74, 144, 226, 0.09);
  border-color: var(--accent-color);
}

.contact-list i {
  font-size: 2.8rem;
  color: var(--accent-color);
  margin-bottom: 1.2rem;
}

/* ───────────────────────────────────────────────
   Responsive
───────────────────────────────────────────────── */
@media (max-width: 1199px) {
  .hero-sidebar {
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    width: 320px;
  }

  .hero-sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    margin-right: 0;
  }

  .offcanvas-btn { display: flex; 
    display: block;
  }

  .navigation {
    display: none;
  }

  section {
    padding: 28px 0;
  }

  #home {
    padding-top: 80px;
    padding-bottom: 60px;
  }
}

@media (max-width: 991px) {
  h1, .h1 { font-size: 3.6rem; }
  h2, .h2 { font-size: 2.3rem; }
}

@media (max-width: 576px) {
  h1, .h1 { font-size: 3rem; }
  .lead-paragraph { font-size: 1.15rem; }
  .skills-list { grid-template-columns: 1fr; }
}

.github-section__inner {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2.8rem;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.35);
}

.github-section .lead-paragraph a.github-link {
  font-weight: 600;
  color: var(--accent-color);
  text-decoration: underline;
}

.github-summary {
  font-size: 0.95rem;
  line-height: 1.6;
  min-height: 2.4rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.github-card {
  background: rgba(13, 17, 23, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1.6rem;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  min-height: 220px;
}

.github-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.45);
}

.github-card h3 {
  margin-bottom: 0.6rem;
  font-size: 1.25rem;
}

.github-card h3 a {
  color: white;
  text-decoration: none;
}

.github-card h3 a:hover {
  color: var(--accent-color);
}

.github-card p {
  color: var(--light-text-color);
  font-size: 0.95rem;
  line-height: 1.5;
  min-height: 48px;
}

.github-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  color: var(--light-text-color);
  font-size: 0.85rem;
  margin-top: 1rem;
}

.github-card-meta span {
  padding: 0.15rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.github-link:hover {
  text-decoration: none;
}

@media (max-width: 768px) {
  .github-section__inner {
    padding: 2rem;
  }
}

/* ───────────────────────────────────────────────
   Off-Canvas Mobile Menu
───────────────────────────────────────────────── */
.offcanvas-body {
  background-color: var(--secondary-color);
  color: var(--body-text-color);
}

.offcanvas-header {
  background-color: var(--secondary-color);
  color: var(--body-text-color);
  border-bottom: 1px solid var(--grey-color);
}

/* ───────────────────────────────────────────────
   Certificados
───────────────────────────────────────────────── */
.cert-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.cert-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.cert-img-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.cert-card:hover .cert-img-wrapper img {
  transform: scale(1.05);
}

.cert-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 17, 23, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cert-card:hover .cert-overlay {
  opacity: 1;
}

.cert-info {
  padding: 1.25rem;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cert-info h4 {
  font-size: 1.1rem;
  color: white;
  margin-bottom: 0.25rem;
}
