/* Fonts */
:root {
  --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --heading-font: "Raleway", sans-serif;
  --nav-font: "Poppins", sans-serif;
}

:root {
  --background-color: #f0f4f8;
  --default-color: #2b2d42;
  --heading-color: #1e1f3a;
  --surface-color: #ffffff;
  --contrast-color: #ffffff;
  --accent-color: #7f5af0; /* púrpura brillante */
}

/* Nav Menu Colors - The following color variables are used specifically for the navigation menu. They are separate from the global colors to allow for more customization options */
:root {
  --nav-color: #c4c7d7;
  --nav-hover-color: #6e42f5;
  --nav-mobile-background-color: #1c1c2e;
  --nav-dropdown-background-color: #2b2d3f;
  --nav-dropdown-color: #dde1e9;
  --nav-dropdown-hover-color: #8d6df8;
}

/* Color Presets - These classes override global colors when applied to any section or element, providing reuse of the sam color scheme. */

.light-background {
  --background-color: #f9f9f9;
  --surface-color: #ffffff;
}

.dark-background {
  --background-color: #1c1c2e;
  --surface-color: #252538;
  --default-color: #dde1e9;
  --heading-color: #ffffff;
  --nav-color: #adb0c0;
  --accent-color: #6e42f5; /* púrpura frío brillante */
  --contrast-color: #ffffff;
}

/* Smooth scroll */
:root {
  scroll-behavior: smooth;
}

:root {
  --background-color: #000; /* para overlay */
  --accent-color: #f08d49; /* para hover en íconos */
  --default-color: #fff; /* color base para íconos */
}

.icon-link i {
  color: white;
  transition: color 0.3s ease;
}

.icon-link:hover i {
  color: #ccc; /* gris claro */
}

/* ###############################################################
General stuff 
#################################################################*/
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  color: var(--default-color);
  background-color: var(--background-color);
  font-family: var(--default-font);
}

a:hover {
  color: color-mix(in srgb, var(--accent-color), transparent 25%);
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--heading-color);
  font-family: var(--heading-font);
}

.reveal {
  opacity: 0;
  transform: translateY(100px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

section {
  color: var(--default-color);
  background-color: var(--background-color);
  padding: 60px 0;
  overflow: clip;
}

.anchor-offset {
  position: relative;
  top: -100px; /* ajusta esto a la altura de tu header en móvil */
  height: 0;
  visibility: hidden;
}
/* ###############################################################
Header 
#################################################################*/
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@600&display=swap");

.language-header {
  position: fixed;
  top: 0;
  left: 80px; /* Mismo ancho que tu sidebar */
  width: calc(100% - 80px);
  background-color: transparent;
  z-index: 1000;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

body {
  background: var(--background-color);
  font-family: var(--nav-font);
}

/* Sidebar Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  min-width: 100px;
  background: #181826;
  display: flex;
  justify-content: center;
  padding: 1rem 0;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.03);
  z-index: 997;
  transition: all 0.3s ease-in-out;
}

main {
  margin-left: 100px;
  transition: margin-left 0.3s ease-in-out;
}

.header .navbar__menu {
  list-style: none;
  padding: 0;
  /* margin: 0; */
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  position: relative;
}

.navbar__item {
  position: relative;
  width: 100%;
}

.navbar__link {
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 100%;
  padding: 0.5rem 0;
  position: relative;
  z-index: 1;
}

.navbar__link:hover,
.navbar__link.active {
  background-color: var(--accent-color);
  color: white;
  border-radius: 1rem;
  width: 50px;
  animation: iconBoing 0.4s ease;
}

.navbar__link i {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

@keyframes iconBoing {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.4);
  }
  60% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

.navbar__link span {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: white;
  padding: 0.35rem 0.75rem;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-size: 0.75rem;
  color: var(--accent-color);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000; /* make sure it's above the sidebar */
  display: inline-block;
}

.navbar__link:hover span {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
}

/* Toggle button (for mobile) */
.header .header-toggle {
  display: none;
}

@media (max-width: 1199px) {
  .header {
    left: -100%;
    width: 220px;
    background-color: var(--background-color);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    /* overflow: hidden; */
    align-items: normal;
    justify-content: normal;
  }

  .header.header-show {
    left: 0;
  }

  .header .header-toggle {
    display: flex;
    position: fixed;
    top: 15px;
    left: 15px;
    background: var(--accent-color);
    color: var(--contrast-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    z-index: 100;
    cursor: pointer;
  }

  .header .header-toggle:hover {
    background-color: #6e42f5;
  }

  main {
    margin-left: 0;
  }

  .header.header-show ~ main {
    margin-left: 220px;
  }

  nav {
    margin-left: 20px;
  }
}

/* ###########################################################
Hero Section 
############################################################*/
.hero {
  width: 100%;
  min-height: 100vh;
  position: relative;
  padding: 80px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero:before {
  content: "";
  background: color-mix(in srgb, var(--background-color), transparent 80%);
  position: absolute;
  inset: 0;
  z-index: 2;
}

.hero .container {
  position: relative;
  z-index: 3;
}

.hero h2 {
  margin: 0;
  font-size: 64px;
  font-weight: 700;
}

.hero p {
  margin: 5px 0 0 0;
  font-size: 26px;
}

.hero p span {
  letter-spacing: 1px;
  border-bottom: 2px solid var(--accent-color);
}

.hero .social-links {
  margin-top: 25px;
}

.hero .social-links a {
  font-size: 20px;
  display: inline-block;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  line-height: 1;
  margin-right: 20px;
  transition: 0.3s;
}

.hero .social-links a:hover {
  color: var(--accent-color);
}

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

  .hero p {
    font-size: 20px;
  }
}

/* ###############################################################
About 
#################################################################*/
.about h3 {
  font-weight: 700;
  font-size: 24px;
}

.about ul {
  list-style: none;
  padding: 0;
}

.about ul li {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.about ul strong {
  margin-right: 10px;
}

.about ul i {
  font-size: 16px;
  margin-right: 5px;
  color: var(--accent-color);
  line-height: 0;
}

/* ###############################################################
Resume 
#################################################################*/
.resume-item {
  padding: 0 0 20px 20px;
  margin-top: -2px;
  border-left: 2px solid var(--accent-color);
  position: relative;
}

.resume-item h4 {
  line-height: 18px;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  margin-bottom: 10px;
}

.resume-item h5 {
  font-size: 16px;
  padding: 5px 15px;
  display: inline-block;
  font-weight: 600;
  margin-bottom: 10px;
}

.resume-item ul {
  padding-left: 20px;
}

.resume-item ul li {
  padding-bottom: 10px;
}

.resume-item:last-child {
  padding-bottom: 0;
}

.resume-item::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50px;
  left: -9px;
  top: 0;
  background: var(--background-color);
  border: 2px solid var(--accent-color);
}

/* ###############################################################
Portfolio 
#################################################################*/
.portfolio {
  padding: 0;
  margin: 0 auto 20px auto;
  list-style: none;
  text-align: center;
}

.portfolio li {
  cursor: pointer;
  display: inline-block;
  padding: 8px 20px 10px 20px;
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 5px;
  border-radius: 50px;
  transition: all 0.3s ease-in-out;
  font-family: var(--heading-font);
}

.portfolio li:hover,
.portfolio li {
  color: var(--contrast-color);
  background-color: var(--accent-color);
}

.portfolio li:first-child {
  margin-left: 0;
}

.portfolio li:last-child {
  margin-right: 0;
}

@media (max-width: 575px) {
  .portfolio li {
    font-size: 14px;
    margin: 0 0 10px 0;
  }
}

.portfolio .portfolio-item {
  position: relative;
  overflow: hidden;
}

.portfolio .portfolio-item .portfolio-info {
  opacity: 0;
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -100%;
  z-index: 3;
  transition: all ease-in-out 0.5s;
  background: color-mix(in srgb, var(--background-color), transparent 10%);
  padding: 15px;
}

.portfolio .portfolio-item .portfolio-info h4 {
  font-size: 18px;
  font-weight: 600;
  padding-right: 50px;
}

.portfolio .portfolio-item .portfolio-info p {
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  font-size: 14px;
  margin-bottom: 0;
  padding-right: 50px;
}

.portfolio .portfolio-item .portfolio-info .preview-link,
.portfolio .portfolio-item .portfolio-info .details-link {
  position: absolute;
  right: 50px;
  font-size: 24px;
  top: calc(50% - 14px);
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  transition: 0.3s;
  line-height: 0;
}

.portfolio .portfolio-item .portfolio-info .preview-link:hover,
.portfolio .portfolio-item .portfolio-info .details-link:hover {
  color: var(--accent-color);
}

.portfolio .portfolio-item .portfolio-info .details-link {
  right: 14px;
  font-size: 28px;
}

.portfolio .portfolio-item:hover .portfolio-info {
  opacity: 1;
  bottom: 0;
}

.fixed-size-img {
  width: 300px;
  height: 300px;
  object-fit: cover;
}

/* ###############################################################
technologies 
#################################################################*/

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin: 2rem auto;
}
.card {
  border-radius: 15px;
  padding: 1.5rem;
  width: 250px;
  color: #222;
  font-family: sans-serif;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card.frontend {
  background: linear-gradient(
    to bottom,
    #7b4397,
    #5b24dc
  ); /* Morado frambuesa */
  color: whitesmoke;
}

.card.backend {
  background: linear-gradient(
    to bottom,
    #6a11cb,
    #2575fc
  ); /* Violeta eléctrico a azul */
  color: whitesmoke;
}

.card.tools {
  background: linear-gradient(
    to bottom,
    #8e2de2,
    #4a00e0
  ); /* Púrpura vibrante */
  color: whitesmoke;
}

.card.cms {
  background: linear-gradient(
    to bottom,
    #9d50bb,
    #6e48aa
  ); /* Lavanda profundo */
  color: whitesmoke;
}

.card-icon {
  font-size: 2rem;
  text-align: center;
}

.card-title {
  text-align: center;
  font-weight: bold;
  margin: 1rem 0;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.skills .progress {
  height: 60px;
  display: block;
  background: none;
  border-radius: 0;
}

.skills .progress .skill {
  color: var(--heading-color);
  padding: 0;
  margin: 0 0 6px 0;
  text-transform: uppercase;
  display: block;
  font-weight: 600;
  font-family: var(--heading-font);
}

.skills .progress .skill .val {
  float: right;
  font-style: normal;
}

.skills .progress-bar-wrap {
  background: color-mix(in srgb, var(--default-color), transparent 90%);
  height: 10px;
}

.skills .progress-bar {
  width: 0;
  height: 10px;
  transition: width 0.9s ease-in-out;
  background-color: var(--accent-color);
  border-radius: 4px;
}

/* ###############################################################
Footer
#################################################################*/

.footer {
  color: var(--default-color);
  background-color: var(--background-color);
  font-size: 14px;
  text-align: center;
  padding: 30px 0;
  position: relative;
}

.footer h3 {
  font-size: 36px;
  font-weight: 700;
  position: relative;
  padding: 0;
  margin: 0 0 15px 0;
}

.footer p {
  font-size: 15;
  font-style: italic;
  padding: 0;
  margin: 0 0 30px 0;
}

.footer .social-links {
  margin: 0 0 30px 0;
}

.footer .social-links a {
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-color);
  color: var(--contrast-color);
  line-height: 1;
  margin: 0 4px;
  border-radius: 50%;
  text-align: center;
  width: 36px;
  height: 36px;
  transition: 0.3s;
}

.footer .social-links a:hover {
  background: color-mix(in srgb, var(--accent-color), transparent 20%);
  text-decoration: none;
}

.footer .copyright {
  padding-top: 25px;
  border-top: 1px solid
    color-mix(in srgb, var(--default-color), transparent 90%);
}

.footer .credits {
  font-size: 13px;
  padding-top: 5px;
}
