:root {
  /* White color palette (Current) */
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;

  --bg-body: #f8fafc; /* main background */
  --bg-card: #ffffff; /* for containers (cards) */

  --text-main: #334155;
  --text-heading: #0f172a;
  --text-muted: #64748b; /* Secondary text */

  /* Futuro Modo Oscuro (Ejemplo de cómo se vería, actualmente no se aplica)
  --bg-body-dark: #0f172a;
  --bg-card-dark: #1e293b;
  --text-main-dark: #cbd5e1;
  ... 
  */

  --radius-card: 1.2rem;
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px 1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

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

html {
  font-size: 62.5%; /* 1rem = 10px */
}

body {
  font-family: "Cause", system-ui, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
}

main {
  max-width: 110rem;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- HEADER --- */
.image-header {
  margin-bottom: 10rem; /* Photo wont touch main content */
  display: flex;
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  /* clean degradation with primary color*/
  background: linear-gradient(135deg, var(--color-primary) 0%, #3b82f6 100%);
  height: 25vh; /* static banner size */
  min-height: 20rem;
  box-shadow: var(--shadow-sm);
}

.image-title {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  font-size: 4.5rem;
  color: #ffffff; /*  contrast with background */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.1rem;
}

.image-container {
  position: absolute;
  bottom: 0;
  transform: translateY(50%);
}

.image-profile {
  width: 16rem;
  height: 16rem;
  object-fit: cover;

  border: 0.4rem solid var(--bg-card);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  background-color: var(--bg-card); /* Por si la imagen tarda en cargar */
}

/* --- Main Content --- */
.content {
  width: 100%;
  display: flex;
  gap: 4rem;
  padding-bottom: 5rem;
}

/* --- Sidebar --- */
.sidebar {
  flex-basis: 25%;

  /* card */
  background-color: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: 3rem 2rem;
  height: fit-content;
}

.sidebar nav {
  width: 100%;
}

.sidebar ul {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  list-style: none;
}

.sidebar ul li {
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  padding: 1rem 1.5rem;
  border-radius: 0.8rem;
  transition: all 0.3s ease; /* Transición suave */
  border-left: 0.3rem solid transparent; /* Preparado para el hover */
}

.sidebar ul li:hover,
.sidebar ul li.active {
  color: var(--color-primary);
  background-color: rgba(37, 99, 235, 0.05);
  border-left-color: var(--color-primary);
  transform: translateX(0.5rem);
}

/* --- Card  --- */
.info-container {
  flex-basis: 75%;
  background-color: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: 4rem;

  font-size: 1.7rem;
  line-height: 1.8;
}

.info-title {
  color: var(--text-heading);
  font-size: 3rem;
  padding-bottom: 1.5rem;
  margin-bottom: 3rem;
  position: relative;
}

/* Underline */
.info-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 6rem;
  height: 0.4rem;
  background-color: var(--color-primary);
  border-radius: 0.2rem;
}

.info-container p {
  margin-bottom: 2rem;
  color: var(--text-main);
}

.info-container p:last-child {
  margin-bottom: 0;
}

.hidden {
  display: none;
}

.active {
  display: block !important;
}

/* --- Technologies --- */
.box {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.technologies-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;

  border: 0.1rem solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
}

.technologies-container:hover {
  box-shadow: var(--shadow-md);
}

.technologies-container li {
  text-align: center;
  text-decoration: none;
  list-style: none;
}

/* --- Footer --- */
footer {
  text-align: center;
  background-color: var(--bg-card);
  padding: 2rem;
  color: var(--text-muted);
  font-size: 1.4rem;
}

@media (max-width: 768px) {
  .image-title {
    font-size: 3.5rem;
  }

  .image-profile {
    width: 13rem;
    height: 13rem;
  }

  .content {
    flex-direction: column;
    gap: 3rem;
  }

  .sidebar {
    flex-basis: auto;
    padding: 2rem;
  }

  /* Mobile Sidebar */
  .sidebar ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .sidebar ul li {
    border-left: none;
    border-bottom: 0.3rem solid transparent;
  }

  .sidebar ul li:hover {
    transform: translateY(-0.2rem);
    border-left-color: transparent;
    border-bottom-color: var(--color-primary);
  }

  .info-container {
    flex-basis: auto;
    padding: 3rem 2rem;
  }
}
