/* Self-hosted fonts - replacing Google Fonts imports */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/assets/fonts/Poppins-Light.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/Poppins-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/Poppins-Italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/Poppins-Medium.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/Poppins-SemiBold.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/Poppins-Bold.woff2') format('woff2');
}

@font-face {
  font-family: 'Press Start 2P';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/PressStart2P.woff2') format('woff2');
}

/* Tema oscuro */
:root[data-theme="dark"] {
  --hero-color: #ffffff;
  --bg-color: #151F30;
  --text-color: #ffffff;
  --title-post-color: #fff;
  --title-highlight: #E3371D;
  --read-more: #ffffff;
  --bg-card: #203047;
  --post-title: #fff;
  --bg-color-footer: #21304a;
  --link-highlight: #fff;
  --border-color: #E3371D;
  --color-link-line: #E3371D;
}
/* Tema claro (default) */
:root[data-theme="light"] {
  --text-color: #000000;
  --bg-color: #ffffff;
  --color: #151F30;
  --hero-color: #151F30;
  --read-more: #151F30;
  --bg-card: #e6edff;
  --card-shadow: 1px 1px 1px #a8a8a882;
  --title-highlight: #E3371D;
  --post-title: #E3371D;
  --bg-color-footer: #f9f5f2;
  --link-highlight: #E3371D;
  --border-color: #E3371D;
  --color-link-line: #E3371D;
}

/* Text selection highlighting */
::selection {
  background-color: #ffeb3b; /* Bright yellow */
  color: #000000; /* Black text for contrast */
  text-shadow: none; /* Remove any text shadows for better readability */
}

/* For Firefox which uses a different pseudo-element */
::-moz-selection {
  background-color: #ffeb3b;
  color: #000000;
  text-shadow: none;
}

/* Theme-specific selection styles */
:root[data-theme="dark"] ::selection {
  color: #151F30; /* Dark background color from your theme */
}

:root[data-theme="dark"] ::-moz-selection {
  color: #151F30;
}

/* Estilos base */
body {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  line-height: 1.6;
  max-width: 100%;
  margin: 0 auto;
  color: var(--text-color);
  background-color: var(--bg-color);
}

.cerrucho {
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  line-height: 1.6;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

html {
  scroll-behavior: smooth;
}

/* Header y navegación */
header {
  padding: 1rem;
  margin-bottom: 2rem;
}
footer {
  margin-top: 3rem;
}
.hero {
  color: var(--hero-color);
  font-family: Poppins;
  font-size: 55px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  position: relative;
  z-index: 1;
  width: 50%;
}

.hero-container {
  position: relative;
  width: 100%;
  padding: 3rem 0;
  overflow: hidden;
/*   display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; */
}

.hero-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1420px;
  margin: 0 auto;
  flex-wrap: nowrap;
}

@media (max-width: 1024px) {
  .hero {
    font-size: 45px;
    padding: 0 1.5rem;
  }
}

@media (max-width: 768px) {
  .hero {
    font-size: 35px;
  }
}

nav {
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  padding: 1rem 0 0 0;
  margin: 0 auto;
  min-height: 70px;
}

nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  justify-content: flex-end;
  flex: 1;
  padding: 0 2rem;
}
.logo-desktop {
  margin-right: auto;
}
img.logo {
  height: 85px;
}

nav ul li {
  display: flex;
  align-items: center;
}

nav ul li:first-child a {
  font-size: 1.8rem;
  font-weight: 600;
}

nav ul li a {
  color: var(--text-color);
  text-decoration: none;
  position: relative;
}

/* Header Logo for mobile */
.header-logo {
  display: flex;
  align-items: center;
  margin-left: 1rem;
}

.header-logo a {
  display: block;
}

.header-logo svg {
  display: block;
  height: auto;
}

/* nav ul li a:hover {
  text-decoration: underline 3px var(--title-post-color);
} */
/* Animated underline for nav menu items (except logo and theme toggle) */
.nav-menu li:not(:first-child):not(:last-child) a {
  position: relative;
  /* Elimina o evita que se solape la decoración existente */
  text-decoration: none;
  display: inline-block;
}

.nav-menu li:not(:first-child):not(:last-child) a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px; /* Ajusta según convenga */
  width: 0;
  height: 2px;
  background-color: var(--title-post-color);
  transition: width 0.3s ease-in-out;
}

.nav-menu li:not(:first-child):not(:last-child) a:hover::after {
  width: 100%;
}
#asteroidsCanvas {
  position: absolute;
  z-index: 2;
}

/* Botón arcade para el hero y Random Post Box */
.hero-container button,
.random-post-box {
  padding: 0.8rem 1.5rem;
  font-family: 'Press Start 2P', 'Poppins', sans-serif;
  font-size: 10px;
  color: #ffffff;
  background-color: var(--title-highlight);
  border: 3px solid #ffffff;
  border-radius: 4px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.4),
              inset 0 -4px 0 rgba(0, 0, 0, 0.2);
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.1s ease;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
  transform: perspective(1px) translateZ(0);
  top: 0;
  right: 0;
}

.hero-container button:hover,
.random-post-box:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.4),
              inset 0 -2px 0 rgba(0, 0, 0, 0.2);
  background-color: #ff4d2e;
}

.hero-container button:active,
.random-post-box:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.4),
              inset 0 0 0 rgba(0, 0, 0, 0.2);
  background-color: #d32e18;
}

/* Adaptación para tema oscuro en botones */
[data-theme="dark"] .hero-container button,
[data-theme="dark"] .random-post-box {
  border-color: #21304a;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.3),
              inset 0 -4px 0 rgba(0, 0, 0, 0.3);
}

/* Efecto de pixelado opcional */
@keyframes pixelate {
  0% { filter: none; }
  50% { filter: contrast(1.4) brightness(0.9) pixelate(1px); }
  100% { filter: none; }
}

.hero button:hover::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 100%);
  pointer-events: none;
}

/* Contenedor y estilos para el toggle de tema */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0.5rem;
}

.theme-toggle button {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.theme-toggle svg {
  position: absolute;
  transform-origin: center center;
  transition: transform 0.5s, opacity 0.5s;
  width: 24px;
  height: 24px;
  color: var(--text-color);
}

.theme-toggle #light-icon {
  opacity: 0;
  transform: rotate(90deg);
}

.theme-toggle #dark-icon {
  opacity: 1;
  transform: rotate(0deg);
}

[data-theme="dark"] .theme-toggle #light-icon {
  opacity: 1;
  transform: rotate(0.9rem);
}

[data-theme="dark"] .theme-toggle #dark-icon {
  opacity: 0;
  transform: rotate(90deg);
}

.header-top {
  --offset: 1;
  inset-block-start: 0;
  inset-inline-end: 0;
  position: absolute;
  z-index: 2;
  padding: 0 1rem 1rem 1rem;
}

.language-switcher {
  display: flex;
  align-items: center;
}

.language-link {
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
}

.language-link:visited {
  color: #fff;
}
.img-links {
  display: block;
  max-width: 100%;
  margin: 1rem auto;
}
.flag-icon {
  width: 24px;
  height: 16px;
}

.language-link span {
  font-weight: 500;
}

/* Sección de últimos posts */
.latest-posts-section {
  margin: 2rem 0;
}

.posts-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}
.box-links-blog {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
  padding: 0;
}
.box-links-blog .post-item {
  min-height: auto;
} 
.box-links-blog .post-item h2 {
  font-size: 1.5rem;
  margin: 0;
  line-height: 1.2;
}
/* Modificaciones para las tarjetas de post */
.post-item {
  display: flex;
  flex-direction: column;
  flex: 1 1 calc(50% - 1rem);
  min-width: 200px;
  padding: 1rem;
  box-sizing: border-box;
  background-color: var(--bg-color);
  color: var(--text-color);
  border: 3px solid transparent;
  border-radius: 15px;
  background: var(--bg-card);
  list-style: none;
  min-height: 280px; /* Altura mínima en lugar de fija */
}
.post-item time {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 0.5rem;
}
.link-metadata time {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 0.5rem;
}
.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
}
/* Contenedor de título con altura fija */
.post-title-container {
  max-height: 6.5rem;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

/* Asegurar que el título respete el contenedor */
.post-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--post-title); /* Mantener la variable de color */
  text-decoration: none; /* Mantener el estilo existente */
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

/* Estilos para la fecha */
.post-date {
  display: block;
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.8;
  flex-shrink: 0;
}

/* Contenedor de descripción con altura fija */
.post-description-container {
  height: 7rem;
  overflow: hidden;
  margin-top: 0.5rem;
  flex-grow: 1;
}

.post-description {
  margin: 0;
  line-height: 1.4;
  font-size: 1.13rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ajustes responsivos */
@media (max-width: 768px) {
  .post-item {
    min-height: 260px;
    flex: 1 1 100%;
  }
  
  .post-title-container {
    /* max-height: 8.5rem; */
    margin-bottom: auto;
  }
  
  .post-title-container .post-title {
    font-size: 1.6rem;
    line-height: 125%;
    display: inherit;
  }
  
  .post-description-container {
    height: 6rem;
  }
  
  .post-description {
    font-size: 0.9rem;
  }
  .timeline-item .timeline-content::before {
    left: -2.43rem;
  }
}

.link-page li a {
  text-decoration: underline;
  font-size: 22px;
}

.post-item:hover {
  border: 3px solid var(--border-color);
}

.post-item:hover h2 a {
  color: #E3371D;
}
.post a {
  color:  #E3371D;
  text-decoration: none;
}

.box-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
  padding: 0;
}
.post {
  max-width: 820px;
  margin: 0 auto;
  padding: 0.2rem 0.2rem
}
.post-header {
  padding: 0;
}
.post-header h1 {
  font-size: 2.3rem;
}
.post .post-content h1,
.post .post-content h2,
.post .post-content h3,
.post .post-content h4,
.post .post-content h5,
.post .post-content h6 {
  margin-left: 0;
  margin-right: 0;
}

.post-item p {
  margin: 10px;
}

.link-card {
  border: 3px solid transparent;
  padding: 1rem 2rem;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
  background: var(--bg-card);
  font-size: 1.13rem;
}

.post-list {
  list-style-type: none;
  padding: 0;
  color: var(--text-color);
}

.post-item a {
  color: var(--post-title);
  text-decoration: none;
}
.post-item h2 {
  margin-bottom: 0;
}
.pagination-nav a {
  color: var(--text-color);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  background-color: var(--bg-card);
  border: 1px solid var(--text-color);
}
.view-all {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}
.view-all a {
  color: var(--title-post-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.5rem;
}
.view-all a:hover {
  text-decoration: underline;
}
.pagination-nav a:hover {
  background-color: var(--text-color);
  color: var(--bg-card);
}
.pagination-nav ol li {
  display: inline-block;
  margin: 0 0.5rem;
}
.post-list:hover {
  cursor: pointer;
}

.link-item a {
  color: var(--title-highlight);
  text-decoration: none;
}

.link-description,
.link-content {
  margin: 0;
  padding-left: 1rem;
}

.link-card:hover {
  background: var(--bg-card);
  border: 3px solid var(--border-color);
}
.post-meta time {
  font-size: 1rem;
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 0.5rem;
}
.link-metadata {
  justify-content: flex-end;
}

.post-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-post-color);
  text-decoration: none;
  line-height: 105%;
  margin: 0;
}

.post-title span.title-highlight {
  color: #E3371D;
  font-weight: bold;
}
.link-title a {
  color: var(--link-highlight);
  margin: 0;
  text-decoration: underline #E3371D;
}
/* Timeline */
.timeline-item {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 3rem;
  border-left: 3px solid var(--title-highlight);
}

.timeline-content {
  position: relative;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 2;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.timeline-content::before {
  content: '';
  position: absolute;
  left: -3.43rem;
  top: 3rem;
  width: 1.25rem;
  height: 1.25rem;
  background: var(--bg-color);
  border: 3px solid var(--title-highlight);
  border-radius: 50%;
}

.timeline-content:hover::before {
  background: #E3371D;
  transition: background-color 0.3s ease;
  z-index: 2;
}

.timeline {
  position: relative;
  margin: 2rem 0;
}

.timeline::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #E3E3E3;
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.skill-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--text-color);
  border-radius: 2rem;
  font-size: 0.875rem;
}

.skills-highlight {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.timeline-item .location {
  color: var(--text-color);
  opacity: 0.7;
  font-size: 0.9em;
}

.timeline-content ul {
  margin-top: 1rem;
}

.timeline-content ul li {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 2rem 0;
}
.content-box-projects {
  padding: 1rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-around;
}
.related-projects-section .post-title {
  font-size: 1.5rem;
  margin: 0;
}
.project-card .date {
  font-size: 0.9em;
  color: var(--text-color);
  opacity: 0.7;
  margin-bottom: 0.5rem;
}
.project-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  /* Mover las propiedades de transformación aquí */
  transform-style: preserve-3d;
  transform: perspective(1000px);
  transition: all 0.3s ease;
}
.project-card {
  background-color: var(--bg-color);
  border: 3px solid #fff;
  transition: transform 0.2s ease;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--card-shadow);
}
.project-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease-in-out;
}

.project-link:hover {
  transform: translateY(-5px);
}
.project-metadata {
  display: flex;
  align-items: flex-start;
  margin: 0.5rem 0;
  flex-direction: column;
}

.project-client {
  font-size: 0.9rem;
  opacity: 0.7;
}

.project-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px 12px 0px 0px;
}

/* Sección de Contacto */
.contact-section {
  position: relative;
  overflow: hidden;
  padding: 2rem 0 0 0;
  background: var(--bg-color-footer);
  transition: all 0.3s ease;
}

.contact-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 9em;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem;
}

.contact-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-item {
  position: relative;
  transition: all 0.3s ease;
}

.contact-item a {
  display: grid;
  grid-template-columns: 40px auto 20px;
  align-items: center;
  padding: 1rem 0;
  text-decoration: none;
  color: inherit;
  gap: 3rem;
  border-bottom: 1px solid #a7a7a752;
}

.contact-item:hover .contact-item-label,
.contact-item:hover .contact-item-value,
.contact-item:hover .social-icon {
  color: #ffffff;
  fill: #ffffff;
}
.github-icon {
  fill: var(--text-color);
}
.contact-item:hover {
  transform: scale(1.02);
}

.contact-item-label {
  font-weight: bold;
  font-size: 0.95rem;
}

.contact-item-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  opacity: 0.8;
}

.contact-item svg {
  width: 20px;
  height: 20px;
  margin-left: auto;
  transition: transform 0.2s ease;
}

.contact-item:hover svg {
  transform: none;
  color: inherit;
}

.contact-section:has(.contact-item:hover) .contact-item-label,
.contact-section:has(.contact-item:hover) .contact-item-value,
.contact-section:has(.contact-item:hover) .title-section,
.contact-section:has(.contact-item:hover) svg {
  color: #ffffff;
  fill: #ffffff;
}

.footer-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  backdrop-filter: brightness(0.96);
  padding: 1rem;
  margin-bottom: 0;
}

/* Random Post Message Box y Tooltip */
.random-post-box {
  top: 0;
  right: 20px;
  display: flex;
  align-items: center;
  background-color: var(--title-highlight);
  border: 3px solid #ffffff;
  border-radius: 4px;
  padding: 0.4rem;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.4),
              inset 0 -4px 0 rgba(0, 0, 0, 0.2);
  z-index: 3;
  max-width: 245px;
  text-transform: uppercase;
  transition: all 0.1s ease;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.random-post-box:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.4),
              inset 0 -2px 0 rgba(0, 0, 0, 0.2);
  background-color: #ff4d2e;
}

.random-post-box:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.4),
              inset 0 0 0 rgba(0, 0, 0, 0.2);
  background-color: #d32e18;
}

.random-post-icon {
  margin-right: 10px;
  display: flex;
  align-items: center;
}

.random-post-icon svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
  color: #ffffff;
}

.random-post-text {
  font-family: 'Press Start 2P', 'Poppins', sans-serif;
  font-size: 10px;
  color: #ffffff;
  letter-spacing: 1px;
}

.random-post-box[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 16px);
  right: 0;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: 'Poppins', sans-serif;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 10;
  width: max-content;
}

.random-post-box[data-tooltip]::before {
  content: '';
  position: absolute;
  top: 100%;
  right: 20%;  
  border: 8px solid transparent;
  border-bottom-color: rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  z-index: 10; 
}

.random-post-box[data-tooltip]:hover::after,
.random-post-box[data-tooltip]:hover::before {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive ajustes */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    gap: 1rem;
  }

  nav ul li:first-child {
    margin-bottom: 1rem;
  }

  .posts-wrapper {
    grid-template-columns: 1fr;
  }

  .project-thumbnail {
    height: 150px;
  }

  .timeline-item {
    padding-left: 1.5rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}

/* Project Post Styles for both themes */
.project-post {
  max-width: 1020px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.project-post-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.project-post-meta {
  margin-bottom: 3rem;
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.7;
}

.project-post-meta-divider {
  margin-left: 0.5rem;
}

.project-post-meta-divider:before {
  content: "•";
  margin-right: 0.5rem;
}

.project-post-section {
  margin-bottom: 3rem;
}

.project-post-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.project-post-content {
  line-height: 1.7;
  color: var(--text-color);
}

.project-post-content p {
  margin-bottom: 1.5rem;
}

.project-post-content ul {
  list-style-type: none;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.project-post-content ul li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.75rem;
}

.project-post-content ul li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--title-highlight); /* Use the theme variable */
}

.project-post-tools-section h2 {
  margin-bottom: 1rem;
}

.project-post-tools-list {
  list-style: none;
  padding: 0;
}

.project-post-tool-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.project-post-tool-name {
  font-weight: 500;
}

.project-post-tool-indicator {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.875rem;
  opacity: 0.7;
}

.project-post-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-post-tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background-color: rgba(227, 55, 29, 0.15); /* Using the title-highlight with transparency */
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--title-highlight);
}

/* Light theme specific styling */
:root[data-theme="light"] .project-post-tag {
  background-color: rgba(227, 55, 29, 0.1);
  color: var(--title-highlight);
}

:root[data-theme="light"] .project-post-content ul li:before {
  color: var(--title-highlight);
}

/* Dark theme specific styling (already in place, but making explicit) */
:root[data-theme="dark"] .project-post-tag {
  background-color: rgba(227, 55, 29, 0.15);
  color: var(--title-highlight);
}

.project-post-footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(128, 128, 128, 0.2); /* Neutral color with transparency */
  color: var(--text-color);
  opacity: 0.7;
  font-size: 0.9rem;
}

/* Estilos para categorías y tags */
.post-category {
  display: inline-block;
  margin-left: 1rem;
}

.post-category a {
  color: var(--title-highlight);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-bottom-color 0.2s;
}

.post-category a:hover {
  border-bottom-color: var(--title-highlight);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.post-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 2rem;
  text-decoration: none;
  background-color: var(--bg-card);
  color: var(--text-color);
  border: 1px solid rgba(128, 128, 128, 0.2);
  transition: all 0.2s;
}

.post-tag:hover {
  background-color: var(--title-highlight);
  color: white;
  border-color: var(--title-highlight);
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: var(--bg-card);
}

.tag-cloud-item {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 2rem;
  text-decoration: none;
  color: var(--text-color);
  background-color: var(--bg-color);
  border: 1px solid rgba(128, 128, 128, 0.3);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.tag-cloud-item:hover {
  background-color: var(--title-highlight);
  color: white;
  border-color: var(--title-highlight);
}

.tag-cloud-item[data-count]::after {
  content: " (" attr(data-count) ")";
  opacity: 0.7;
  font-size: 0.8em;
}

.tags-container, .categories-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.tag-item, .category-item {
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: var(--bg-card);
}

.tag-title, .category-title {
  margin-top: 0;
  border-bottom: 2px solid var(--title-highlight);
  padding-bottom: 0.5rem;
}

.blog-navigation {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.blog-nav-link {
  display: inline-block;
  padding: 0.25rem 1rem;
  border-radius: 4px;
  background-color: var(--bg-card);
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.2s;
}

.blog-nav-link:hover {
  background-color: var(--title-highlight);
  color: white;
  cursor: pointer;
}

/* Responsive styles */
@media (max-width: 768px) {
  .blog-navigation {
    flex-direction: column;
  }
  
  .tags-cloud {
    padding: 0.75rem;
  }
  
  .tag-cloud-item {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
  }
}


/* Responsive adjustments */
@media (max-width: 768px) {
  .project-post-title {
    font-size: 1.75rem;
  }
  
  .project-post-section h2 {
    font-size: 1.5rem;
  }
  
  .project-post-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .project-post-meta-divider {
    margin-left: 0;
  }
  
  .project-post-meta-divider:before {
    display: none;
  }
}

/* Add to your existing CSS file */
.blog-nav-button {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  background-color: var(--bg-card);
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  display: flex;
  align-items: center;
}

.blog-nav-button::after {
  content: "▼";
  font-size: 0.8em;
  margin-left: 8px;
}

.blog-nav-button.active::after {
  content: "▲";
}

.blog-nav-button:hover,
.blog-nav-button.active {
  background-color: var(--title-highlight);
  color: white;
}

.tags-panel {
  border-radius: 0.5rem;
  margin-bottom: 2rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.tags-panel.panel-open {
  max-height: 500px; /* Adjust as needed */
}

.project-image {
  width: 100%;
  max-width: 800px;
  margin: 2rem 0;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.project-section {
  margin-bottom: 3rem;
}

.challenges-list li, .features-list li {
  margin-bottom: 1rem;
}

.process-phase {
  background-color: var(--bg-card);
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
}

.testimonials {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 2rem 0;
}

blockquote {
  background-color: var(--bg-card);
  border-left: 4px solid var(--title-highlight);
  padding: 1.5rem;
  margin: 0;
  position: relative;
  font-style: italic;
}

blockquote cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-weight: 500;
  color: var(--text-color);
  opacity: 0.8;
}

/* Related Projects Section styles */
.related-projects-section {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(128, 128, 128, 0.2);
}

.related-projects-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

/* Adjust projects grid for related projects to show 3 items */
.related-projects-section .projects-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .related-projects-section .projects-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

img-comparison-slider {
  --divider-width: 3px;
  --divider-color: var(--title-highlight);
  --default-handle-opacity: 1;
  --default-handle-color: white;
  max-width: 70%;
  max-height: 630px;
  margin: 2rem 0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  border-radius: 8px;
  overflow: hidden; /* Oculta cualquier parte de la imagen que exceda la altura */
}

img-comparison-slider img {
  max-width: 100%; /* Asegura que las imágenes no excedan el ancho del slider */
  height: auto; /* Mantiene la proporción de aspecto */
  display: block; /* Elimina espacios en blanco debajo de la imagen */
}

.profile-photo {
  border-radius: 50%;
  background-color: #0393a2;
  width: 150px;
  height: 150px;
  object-fit: cover;
  border: 5px solid #fff;
}

/* Add this to the end of your styles.css file */
/* filepath: /Users/christianstenger/GitHub/christenger-com/src/assets/css/styles.css */

/* Mobile Menu Styles */
.mobile-menu-toggle {
  display: none;
  z-index: 999;
}

.mobile-menu-toggle button {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.mobile-menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--text-color);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Hamburger to X animation */
.mobile-menu-toggle button.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.mobile-menu-toggle button.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle button.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}
.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 800px;
  z-index: 5;
  padding: 0 2rem;
}
/* Estilos para los elementos de texto */
.hero-intro {
  color: var(--title-highlight);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero-statement {
  color: var(--hero-color);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.hero-description {
  margin-top: 2rem;
  font-size: 1.25rem;
  line-height: 1.5;
}

/* Media queries for mobile */
@media (max-width: 768px) {
    .mobile-menu-toggle {
      display: flex;
    }
    .box-links {
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }
   .hero {
    width: 100%;
    padding: 2rem 1rem;
   }
  .post-item {
    flex: 1 1 calc(100% - 1rem);
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-color);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 998;
    height: 100vh;
    overflow-y: auto;
    padding: 0 2rem;
  }

  .nav-menu.active {
    transform: translateX(0);
    display: flex;
    justify-content: flex-start;
    padding-top: 4.5rem;
  }
  
  nav {
    position: relative;
    padding: 0;
    justify-content: flex-start;
    padding: 0;
  }
  
  nav ul li {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    transition-delay: 0s;
  }
  
  .nav-menu.active li {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* Staggered animation for menu items */
  .nav-menu.active li:nth-child(1) { transition-delay: 0.1s; }
  .nav-menu.active li:nth-child(2) { transition-delay: 0.2s; }
  .nav-menu.active li:nth-child(3) { transition-delay: 0.3s; }
  .nav-menu.active li:nth-child(4) { transition-delay: 0.4s; }
  .nav-menu.active li:nth-child(5) { transition-delay: 0.5s; }
  .nav-menu.active li:nth-child(6) { transition-delay: 0.6s; }

  /* Prevent scrolling when menu is open */
  body.menu-open {
    overflow: hidden;
  }
  .hero-container {
    padding: 0;
  }
    /* Change grid to single column layout */
    .contact-container {
      grid-template-columns: 1fr;
      gap: 2rem;
      padding: 0 1rem 4em; /* Reduce bottom padding */
    }
    
    /* Adjust contact items for better touch targets */
    .contact-item a {
      grid-template-columns: 1fr; /* Stack content vertically */
      gap: 0.5rem;
      padding: 1rem 0.5rem;
      border-bottom: 1px solid rgba(167, 167, 167, 0.3); /* Lighter border */
    }
    
    /* Reposition the social icons */
    .contact-item svg {
      position: absolute;
      right: 0.5rem;
      top: 50%;
      transform: translateY(-50%);
    }
    
    /* Ensure proper spacing and font sizing */
    .contact-item-label {
      font-size: 0.9rem;
    }
    
    .contact-item-value {
      font-size: 0.85rem;
    }
    
    /* Make contact links position relative for absolute icon positioning */
    .contact-item {
      position: relative;
    }
    
    /* Adjust footer info text */
    .footer-info {
      font-size: 0.8rem;
      text-align: center;
      padding: 1rem 0.5rem;
      flex-wrap: wrap; /* Allow text to wrap if needed */
    }
    .hero-container {
      padding: 4rem 0 0 0;
    }
    
    .hero-content {
      padding: 0 1.5rem;
    }
    
    .hero-text {
      width: 100%;
      padding: 0rem;
    }
    
    .hero-intro {
      font-size: 1.25rem;
    }
    
    .hero-statement {
      font-size: 2.5rem;
    }
    
    .hero-description {
      font-size: 1.1rem;
    }
}

@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none;
  }
  
  .header-logo {
    display: none; /* Hide the header logo on desktop */
  }
  
  nav {
    justify-content: center; /* Center the menu on desktop */
  }
}

/* Tablet-specific styles (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  /* Hero section adjustments */
  .hero {
    font-size: 45px;
    width: 70%;
  }
  
  .hero-content {
    padding: 0 1rem;
  }
  
  /* Navigation and layout adjustments */
  nav ul {
    gap: 1.5rem;
  }
  
  /* Projects grid - 2 columns for tablet */
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  /* Related projects section */
  .related-projects-section .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Contact container */
  .contact-container {
    grid-template-columns: 1fr 1fr;
    padding: 0 1rem 7em;
  }
  
  /* Skills grid */
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Timeline adjustments */
  .timeline-content {
    padding: 1.25rem;
  }
  
  /* Image comparison slider */
  img-comparison-slider {
    max-width: 85%;
  }
  
  /* Post items in a 2-column grid */
  .post-item {
    flex: 1 1 calc(50% - 1rem);
  }
  
  /* Random post box adjustments */
  .random-post-box {
    max-width: 220px;
  }
}

@media (max-width: 1024px) {
  /* #random-post-message {
    display: none !important;
  } */
  .header-logo {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    top: 50%; /* Vertical centering */
    transform: translateY(-50%); /* Vertical centering */
    margin: 0 auto;
    width: fit-content;
    z-index: 990; /* Below mobile-menu-toggle but above other content */
  }
  header {
    margin: 0;
    padding: 2rem;
  }
  .nav-menu li:not(:first-child):not(:last-child) a {
    font-size: 1.5rem;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-color);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 998;
    height: 100vh;
    overflow-y: auto;
    padding: 0 2rem;
  }

  .nav-menu.active {
    transform: translateX(0);
    display: flex;
    justify-content: flex-start;
    padding-top: 4.5rem;
  }
  
  nav {
    position: relative;
    justify-content: flex-start;
    padding: 0;
    align-items: center;
  }
  
  nav ul li {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    transition-delay: 0s;
  }
  
  .nav-menu.active li {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* Staggered animation for menu items */
  .nav-menu.active li:nth-child(1) { transition-delay: 0.1s; }
  .nav-menu.active li:nth-child(2) { transition-delay: 0.2s; }
  .nav-menu.active li:nth-child(3) { transition-delay: 0.3s; }
  .nav-menu.active li:nth-child(4) { transition-delay: 0.4s; }
  .nav-menu.active li:nth-child(5) { transition-delay: 0.5s; }
  .nav-menu.active li:nth-child(6) { transition-delay: 0.6s; }

  /* Prevent scrolling when menu is open */
  body.menu-open {
    overflow: hidden;
  }
  
  /* Show the header logo on tablet too */
  .header-logo {
    display: flex;
  }
  
  /* Hide desktop logo in mobile menu */
  .nav-menu.active li:first-child {
    display: none;
  }
}

/* Update the desktop breakpoint from 769px to 1025px */
@media (min-width: 1025px) {
  .mobile-menu-toggle {
    display: none;
  }
  
  .header-logo {
    display: none;
  }
  
  .nav-menu {
    position: static;
    flex-direction: row;
    justify-content: flex-end;
    height: auto;
    transform: none;
  }
  
  .logo-desktop {
    margin-right: auto;
  }
  
  nav ul li {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
/* Botón de mini juego para post, no tiene sentido ahora que hay poco contenido */
#random-post-message {
  display: none !important;
}
.about a {
  color: var(--title-highlight);
  text-decoration: none;
}
/* Tool tags styling (matching project-post-tag style) */
.tool-tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background-color: rgba(227, 55, 29, 0.15);
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--title-highlight);
}

:root[data-theme="light"] .tool-tag {
  background-color: rgba(227, 55, 29, 0.1);
  color: var(--title-highlight);
}

:root[data-theme="dark"] .tool-tag {
  background-color: rgba(227, 55, 29, 0.15);
  color: var(--title-highlight);
}

/* Add spacing between tool tags */
.project-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Estilos complementarios para los acordeones - compatibles con clases existentes */

/* Estilos mejorados para la sección de acordeones */
.skills-section {
  padding: 4rem 0;
  background-color: var(--bg-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  text-align: center;
  color: var(--text-color);
}

/* Estilos del acordeón principal */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.accordion-item {
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--bg-card);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.accordion-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background-color: var(--title-highlight);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 600;
  text-align: left;
  transition: background-color 0.2s ease;
}

.accordion-header:hover {
  background-color: #d32f18; /* Versión más oscura del color highlight */
}

.accordion-icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s ease;
}

.accordion-header[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 1.5rem;
  transition: max-height 0.5s ease, padding 0.3s ease;
}

.accordion-header[aria-expanded="true"] + .accordion-content {
  max-height: 500px;
  padding: 1.5rem;
}

/* Estilos para las etiquetas de habilidades */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: rgba(227, 55, 29, 0.1);
  color: var(--text-color);
  border-radius: 2rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.skill-tag:hover {
  background-color: var(--title-highlight);
  color: white;
  transform: translateY(-2px);
}

/* Estilos para acordeones anidados */
.nested-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.nested-item {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.5);
}

.nested-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text-color);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  transition: background-color 0.2s ease;
}

.nested-header:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.nested-icon {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s ease;
}

.nested-header[aria-expanded="true"] .nested-icon {
  transform: rotate(180deg);
}

.nested-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 1.25rem;
  background-color: rgba(255, 255, 255, 0.7);
  transition: max-height 0.4s ease, padding 0.2s ease;
}

.nested-header[aria-expanded="true"] + .nested-content {
  max-height: 300px;
  padding: 1.25rem;
}
/* Ajustes responsivos */
@media (max-width: 768px) {
  .header-top {
    padding: 0;
  }
  
  nav {
    align-items: center;
    gap: 1rem;
  }
  
  .mobile-menu-toggle {
    margin-right: 1rem;
  }
  
  /* Hide the first list item in the mobile menu (original logo) */
  .nav-menu.active li:first-child {
    display: none;
  }
  .accordion-header, .nested-header {
    padding: 1rem;
  }
  
  .skill-tag {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
  
  .accordion-content, .nested-content {
    padding: 0 1rem;
  }
  
  .accordion-header[aria-expanded="true"] + .accordion-content,
  .nested-header[aria-expanded="true"] + .nested-content {
    padding: 1rem;
  }
}

/* Tema oscuro - adaptaciones específicas */
[data-theme="dark"] .accordion-item {
  background-color: #203047;
}

[data-theme="dark"] .nested-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .nested-header {
  background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .nested-header:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .nested-content {
  background-color: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .skill-tag {
  background-color: rgba(227, 55, 29, 0.15);
  color: #fff;
}

/* Webmention Styles - Compatible with Light/Dark theme */
.webmentions {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color, #eaeaea);
}

.webmentions h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--title-color, #333);
}

.webmentions h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--title-color, #333);
}

.webmention-section {
  margin-bottom: 2rem;
}

.webmention-likes, 
.webmention-reposts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

.webmention-like,
.webmention-repost {
  display: inline-flex;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 0.5rem;
  border: 1px solid var(--border-color, rgba(0,0,0,0.1));
}

.webmention-comment {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-card, #f9f9f9);
  border-radius: 0.5rem;
  border: 1px solid var(--border-color, rgba(0,0,0,0.1));
}

:root[data-theme="dark"] .webmention-comment {
  background: var(--bg-card, #2a2a2a);
}

.comment-author {
  font-weight: bold;
  margin-bottom: 0.75rem;
}

.comment-author a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--title-color, #333);
}

.comment-content {
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.comment-meta {
  font-size: 0.85rem;
  color: var(--text-muted, #666);
}

.no-webmentions {
  font-style: italic;
  color: var(--text-muted, #666);
}

/* Updated mobile header logo styles */
@media (max-width: 768px) {
  
  .mobile-menu-toggle {
    position: relative; /* Ensure it creates a stacking context */
    z-index: 999; /* Higher than logo but lower than open menu */
  }
  
  nav {
    position: relative;
    min-height: 70px;
    display: flex;
    align-items: center; /* Help with vertical alignment */
  }
  
  /* Make sure the nav-menu when active has the highest z-index */
 /*  .nav-menu.active {
    z-index: 1000;
  } */
}

/* iOS-specific adjustment with fewer !important declarations */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 768px) {
    .header-logo {
      left: 0;
      right: 0;
      margin: 0 auto;
      width: fit-content;
      position: absolute;
    }
  }
}

/* Small mobile specific adjustments */
@media (max-width: 480px) {
  .contact-container {
    padding: 0 1rem 3em; /* Further reduce padding */
  }
  
  .title-section {
    font-size: 1.5rem; /* Smaller heading on very small devices */
  }
  
  .contact-item a {
    padding: 0.8rem 0.5rem; /* Slightly more compact */
  }
  
  /* Ensure proper tap targets */
  .contact-item svg {
    width: 18px;
    height: 18px;
  }
}

/* Webmention Styles - Compatible with Light/Dark theme */
.webmentions {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color, #eaeaea);
}

.webmentions h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-color); /* Use theme variable */
}

.webmentions h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-color); /* Use theme variable */
}

.webmention-section {
  margin-bottom: 2rem;
}

/* --- Avatar Grid for Likes & Reposts --- */
.webmention-likes, 
.webmention-reposts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem; /* Space between avatars */
  list-style: none;
  padding: 0;
  margin: 0; /* Reset default margins */
}

.webmention-like a,
.webmention-repost a {
  display: inline-block; /* Make the link the avatar container */
  line-height: 0; /* Prevent extra space */
}

.webmention-like .like-author,
.webmention-repost .repost-author {
  display: none; /* Hide author names in the grid view */
}

.avatar {
  width: 40px; /* Slightly larger avatars */
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--bg-color); /* Border matching background for overlap effect */
  transition: transform 0.2s ease;
}

.avatar:hover {
  transform: scale(1.1); /* Slight zoom on hover */
}
/* --- End Avatar Grid --- */

.webmention-comment {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-card); /* Use theme variable */
  border-radius: 0.5rem;
  border: 1px solid rgba(128, 128, 128, 0.1); /* Subtle border */
}

/* Remove explicit dark theme background for comment, rely on --bg-card */
/* :root[data-theme="dark"] .webmention-comment { ... } */

.comment-author {
  font-weight: bold;
  margin-bottom: 0.75rem;
}

.comment-author a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-color); /* Use theme variable */
  gap: 0.5rem; /* Space between avatar and name */
}

.comment-author .avatar { /* Style avatar within comment author differently if needed */
  width: 32px;
  height: 32px;
  border: 1px solid rgba(128, 128, 128, 0.1);
}

.comment-content {
  margin-bottom: 0.75rem;
  line-height: 1.6; /* Improved readability */
  color: var(--text-color); /* Use theme variable */
}
/* Ensure paragraphs inside comment content have spacing */
.comment-content p {
  margin-bottom: 1em;
}
.comment-content p:last-child {
  margin-bottom: 0;
}

.comment-meta {
  font-size: 0.85rem;
  color: var(--text-color); /* Use theme variable */
  opacity: 0.7; /* Muted appearance */
}

.comment-meta a {
  color: inherit; /* Inherit muted color */
  text-decoration: none;
}
.comment-meta a:hover {
  text-decoration: underline;
}

.no-webmentions {
  font-style: italic;
  color: var(--text-color); /* Use theme variable */
  opacity: 0.7; /* Muted appearance */
  margin-bottom: 2rem; /* Add space before the form */
}

/* --- Webmention Submission Form Styles --- */
.webmention-form {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: var(--bg-card); /* Use theme variable */
  border-radius: 8px;
  border: 1px solid rgba(128, 128, 128, 0.1);
}

.webmention-form h3 {
  margin-top: 0; /* Remove default top margin */
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: var(--text-color);
}

.webmention-form form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.webmention-form label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.9;
}

.webmention-form input[type="url"] {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 4px;
  font-size: 1rem;
  background-color: var(--bg-color); /* Match page background */
  color: var(--text-color);
  transition: border-color 0.2s ease;
}

.webmention-form input[type="url"]:focus {
  outline: none;
  border-color: var(--title-highlight);
  box-shadow: 0 0 0 2px rgba(227, 55, 29, 0.2); /* Highlight color focus ring */
}

.webmention-form button[type="submit"] {
  padding: 0.75rem 1.5rem;
  font-family: 'Poppins', sans-serif; /* Match site font */
  font-size: 0.9rem;
  font-weight: 500;
  color: #ffffff;
  background-color: var(--title-highlight);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  align-self: flex-start; /* Align button to the start */
}

.webmention-form button[type="submit"]:hover {
  background-color: #d32f18; /* Darker highlight color */
}

.webmention-form button[type="submit"]:active {
  transform: scale(0.98);
}

/* --- End Webmention Form Styles --- */