/* =========================================
   Portfolio - Andrés Ramírez
   ========================================= */

/* Foto de perfil en la página principal */
.md-typeset p:has(> img[alt="Andrés Ramírez"]) {
  margin: 0 0 1.5rem 0 !important;
  text-align: left !important;
}

.md-typeset p > img[alt="Andrés Ramírez"] {
  width: 180px !important;
  height: auto !important;
  max-width: 180px !important;
  border-radius: 0 !important;
  display: block !important;
  margin: 0 !important;
  object-fit: cover !important;
  box-shadow: var(--md-shadow-z2);
}

/* Título principal */
.md-content h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Separación entre secciones */
.md-content hr {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

/* Cards */
.md-typeset .grid.cards > ul > li {
  border-radius: 12px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.md-typeset .grid.cards > ul > li:hover {
  transform: translateY(-3px);
  box-shadow: var(--md-shadow-z2);
}

/* Iconos grandes de las cards */
.md-typeset .grid.cards .lg {
  font-size: 1.8rem;
}

/* Botones */
.md-button {
  margin: 0.25rem;
  border-radius: 6px;
}

/* Tablas */
.md-typeset table:not([class]) {
  border-radius: 8px;
  overflow: hidden;
}

/* Mermaid */
.mermaid {
  margin: 2rem 0;
}

/* Footer */
.md-footer-meta {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Blog */
.post-meta {
  color: var(--md-default-fg-color--light);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

.md-typeset .post-meta strong {
  color: var(--md-default-fg-color);
}

/* Cards misma altura */
.md-typeset .grid.cards > ul > li {
  height: 100%;
}

/* Móvil */
@media screen and (max-width: 768px) {

  .md-content h1 {
    font-size: 1.8rem;
  }

  .md-typeset .grid.cards > ul > li {
    margin-bottom: 0.75rem;
  }

  .md-button {
    width: auto;
  }

  .md-content img[alt="Andrés Ramírez"] {
    width: 150px !important;
    max-width: 150px !important;
    height: auto !important;
  }
}