/* Fonts */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

/* Variables */
:root {
  --main-color: #ca2059;
  --main-cyan: #41ebb8;
  --blue: #0000ff;
  --blue-dark: #376979;
  --orange: #ffa500;
  --green-yellow: #cddc39;
  --pink-light: #130f11;
  --cyan-light: #0b0e0e;
  --white: #ffffff;
  --white-alpha-40: rgba(255, 255, 255, 0.4);
  --white-alpha-25: rgba(255, 255, 255, 0.25);
  --backdrop-filter-blur: blur(5px);
}

/* Global Settings */
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  outline: none;
}

::before,
::after {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background-image: linear-gradient(
    to bottom right,
    var(--pink-light),
    var(--cyan-light)
  );
  background-attachment: fixed;
  font-size: 16px;
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  color: var(--white);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  padding: 35px 15px;
}

body.hide-scrolling {
  overflow-y: hidden;
}

body::before {
  content: "";
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background-color: var(--green-yellow);
  z-index: -1;
  opacity: 0.12;
}

a {
  text-decoration: none;
}

h1,
h2 {
  font-weight: 600;
}

h3,
h4,
h5,
h6 {
  font-weight: 500;
}

img {
  max-width: 100%;
  vertical-align: middle;
}

ul {
  list-style: none;
}

section {
  background-color: rgba(13, 11, 51, 0.85); /* Más opaco */
  border: 1px solid rgba(12, 4, 44, 0.4); /* Borde menos transparente */
  min-height: calc(100vh - 70px);
  border-radius: 30px;
  backdrop-filter: var(--backdrop-filter-blur);
  display: none;
}

section.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out forwards;
}

section.fade-out {
  animation: fadeOut 0.5s ease-in-out forwards;
}

.main {
  /* background-color: red;    */
  max-width: 1200px;
  margin: auto;
  transition: all 0.5s ease-in-out;
  position: relative;
}

.main.fade-out {
  opacity: 0;
}

.container {
  /* background-color: red; */
  padding: 0 40px;
  width: 100%;
}

.row {
  display: flex;
  flex-wrap: wrap;
}
.align-items-center {
  align-items: center;
}

.hidden {
  display: none !important;
}

/* Section Title */

.sec-padding {
  padding: 80px 0;
}

.flex-end {
  justify-content: flex-end;
}

.section-title {
  /* background-color: red; */
  padding: 0 15px;
  width: 100%;
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 40px;
  text-transform: capitalize;
}

/* Custom ScrollBar */

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background-color: var(--white);
}

::-webkit-scrollbar-thumb {
  background-color: var(--main-color);
}

/* Buttons */

button {
  font-family: inherit;
  user-select: none;
}

.btn {
  line-height: 1.5;
  background-color: var(--white-alpha-25);
  border: 1px solid var(--white-alpha-40);
  padding: 10px 28px;
  display: inline-block;
  border-radius: 30px;
  color: var(--main-cyan);
  font-weight: 500;
  text-transform: capitalize;
  font-family: inherit;
  font-size: 16px;

  cursor: pointer;
  user-select: none;
  position: relative;
  overflow: hidden;
  vertical-align: middle;
  transition: color 0.3s ease;
}

.btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background-color: var(--main-color);
  z-index: -1;
  transition: width 0.3s ease;
}

.btn:hover::before {
  width: 100%;
}

.btn:hover {
  color: var(--white);
}
.btn-container {
  display: flex;
  justify-content: space-between;
  gap: 3px; /* Ajusta este valor para el espacio entre botones */
  margin-top: 20px; /* Ajusta este valor para el espacio sobre los botones */
}

.btn-container .btn {
  flex: 1;
  text-align: center;
  white-space: nowrap;
  padding: 10px 15px; /* Ajusta estos valores según necesites */
  font-size: 14px; /* Ajusta el tamaño de fuente si es necesario */
}

/* Media query para pantallas más pequeñas */
@media (max-width: 768px) {
  .btn-container {
    flex-direction: column;
  }

  .btn-container .btn {
    margin-bottom: 10px;
  }
}
/* Animation Keyframes */

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes zoomInOut {
  0%,
  100% {
    transform: scale(0.5);
  }
  50% {
    transform: scale(1);
  }
}
@keyframes bounceTop {
  0%,
  100% {
    transform: translateY(-50px);
  }
  50% {
    transform: translateY(0px);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Background Circles */
body {
  background-image: url("all.jpg"); /* Ajusta la ruta si es necesario */
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: 0% 100%;
  animation: bg-pan-tr 20s cubic-bezier(0.755, 0.05, 0.855, 0.06) infinite
    alternate-reverse both;
}

@-webkit-keyframes bg-pan-tr {
  0% {
    background-position: 0% 100%;
  }
  100% {
    background-position: 100% 0%;
  }
}
@keyframes bg-pan-tr {
  0% {
    background-position: 0% 100%;
  }
  100% {
    background-position: 100% 0%;
  }
}

/* Overlay */
.overlay {
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background-color: transparent;
  z-index: 200;
  visibility: hidden;
}

.overlay.active {
  visibility: visible;
}

/* Page Loader */
.page-loader {
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  z-index: 999;
  background-color: var(--white-alpha-25);
  backdrop-filter: var(--backdrop-filter-blur);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}
.page-loader.fade-out {
  opacity: 0;
}
.page-loader div {
  border: 2px solid transparent;
  position: absolute;
  border-radius: 50%;
  opacity: 0.6;
  border-top-color: transparent !important;
  border-bottom-color: transparent !important;
  animation: spin 1s linear infinite;
}
.page-loader div:nth-child(1) {
  height: 60px;
  width: 60px;
  border-color: var(--main-color);
}
.page-loader div:nth-child(2) {
  height: 45px;
  width: 45px;
  border-color: var(--blue);
  animation-duration: 1.2s;
}
.page-loader div:nth-child(3) {
  height: 30px;
  width: 30px;
  border-color: var(--orange);
}

/* Header */

.header {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  z-index: 1;
  padding: 20px 0 0;
}

.header.active {
  position: fixed;
  top: 35px;
  padding: 20px 15px;
}

.header.active .container {
  max-width: 1200px;
  margin: auto;
}

.header .nav-toggler {
  width: 50px;
  height: 50px;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  background-color: var(--white-alpha-25);
  border: 1px solid var(--white-alpha-40);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 15px;
  z-index: 1;
  transition: opacity 0.5s ease-in-out;
}

.header .nav-toggler.hide {
  opacity: 0;
  transition: none;
}

.header .nav-toggler span {
  height: 2px;
  width: 24px;
  background-color: var(--main-color);
  position: relative;
  transition: background-color 0.3s ease;
}

.header.active .nav-toggler span {
  background-color: transparent;
}

.header .nav-toggler span::before,
.header .nav-toggler span::after {
  content: "";
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: var(--main-color);
  transition: all 0.3s ease;
}

.header .nav-toggler span::before {
  left: 0;
  transform: translateY(-8px);
}

.header.active .nav-toggler span::before {
  transform: rotate(45deg);
}

.header .nav-toggler span::after {
  right: 0;
  transform: translateY(8px);
}

.header.active .nav-toggler span::after {
  transform: rotate(-45deg);
}

.header:not(.active) .nav-toggler:hover span::before,
.header:not(.active) .nav-toggler:hover span::after {
  width: 50%;
}

.header .nav {
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  /* background-color: blue; */
  padding: 35px 15px;
  overflow-y: auto;
  visibility: hidden;
}

.header.active .nav {
  visibility: visible;
}

.header .nav-inner {
  min-height: calc(100vh - 70px);
  background-color: var(--white-alpha-40);
  max-width: 1200px;
  margin: auto;
  border: 1px solid var(--white-alpha-40);
  backdrop-filter: var(--backdrop-filter-blur);
  padding: 50px 0;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.5s ease;
}

.header.active .nav-inner {
  opacity: 1;
}

.header .nav-inner ul li {
  text-align: center;
}

.header .nav-inner ul li a {
  font-size: 40px;
  text-transform: capitalize;
  color: var(--pink-light);
  display: block;
  font-weight: 500;
  padding: 8px 15px;
  transition: color 0.3s ease;
  position: relative;
}

.header .nav-inner ul li a::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  height: 50%;
  width: 0%;
  background-color: var(--white-alpha-25);
  z-index: -1;
  transition: width 0.5s ease;
}

.header .nav-inner ul li a:hover::before {
  width: 100%;
}

.header .nav-inner ul li a:hover {
  color: var(--main-color);
}

/* Home Section */

.home-section {
  padding: 120px 0;
}

.home-section.active {
  display: flex;
}

.home-text p {
  font-size: 38px;
}
.home-text h1 {
  font-size: 80px;
  text-transform: capitalize;
}
.home-text h2 {
  font-size: 30px;
  text-transform: capitalize;
  font-weight: 300;
  margin: 0 0 30px;
}

.home-text .btn {
  margin: 0 15px 15px 0;
}

.home-text,
.home-img {
  width: 50%;
  padding: 15px;
}
.home-img {
  display: flex;
  justify-content: center;
  align-items: center;
}
.home-img img {
  width: 125%; /* Aumentado en un 25% */
  max-width: 450px; /* 360px * 1.25 */
  border-radius: 50%;
  aspect-ratio: 1 / 1; /* Mantiene la imagen cuadrada */
  object-fit: cover; /* Asegura que la imagen cubra todo el espacio */
}

.home-img .img-box img {
  width: 100%;
  border-radius: 50%;
  margin-bottom: 20px;
}

/* About Section */
.about-img {
  /* background-color: red; */
  width: 40%;
  padding: 0 10px;
  display: flex;
  align-items: center;
  flex-direction: column;
}

.about-text {
  /* background-color: blue; */
  width: 60%;
  padding: 0 15px;
}

.about-img .img-box {
  background-color: var(--white-alpha-25);
  max-width: 380px;
  border: 1px solid var(--white-alpha-40);
  margin-bottom: 40px;
  border-radius: 20px;
}

.about-img img {
  max-width: 100%;
  height: auto;
}

.about-text h3 {
  text-transform: capitalize;
  font-size: 20px;
  margin: 20px 0;
}

.about-text .skills {
  display: flex;
  flex-wrap: wrap;
}

.about-text .skill-item {
  background-color: var(--white-alpha-25);
  border: 2px solid var(--main-cyan);
  padding: 5px 15px;
  text-transform: capitalize;
  margin: 0 10px 10px 0;
  border-radius: 20px;
}

.about-tabs {
  display: flex;
  justify-content: center;
  gap: 40px; /* espacio entre español e inglés */
}

.about-tabs .tab-group {
  display: flex;
  gap: 30px; /* espacio entre educación/experiencia */
}

.about-tabs .tab-item {
  padding: 2px 0;
  background-color: transparent;
  border: none;
  text-transform: capitalize;
  display: inline-block; /* ❌ Esto rompe el flex */
  color: var(--white-alpha-40);
  font-size: 20px;
  cursor: pointer;
  font-weight: 500;
  margin: 0 30px 0 0;
  position: relative;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.about-tabs .tab-item:last-child {
  margin: 0;
}

.about-tabs .tab-item::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 1px;
  background-color: var(--blue-dark);
  transition: width 0.3s ease;
}

.about-tabs .tab-item:hover::before {
  width: 100%;
}

.about-tabs .tab-item.active::before {
  width: 100%;
  background-color: var(--main-color);
}

.about-tabs .tab-item.active {
  color: var(--main-cyan);
  opacity: 1;
  cursor: auto;
}

.about-text .timeline {
  position: relative;
}

.about-text .timeline::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 1px;
  top: 0;
  left: 5px;
  background-color: var(--main-color);
}

.about-text .tab-content {
  padding: 40px 0;
  display: none;
}

.about-text .tab-content.active {
  display: block;
}

.about-text .timeline-item {
  margin-bottom: 30px;
  position: relative;
  padding: 10px 0 0 40px;
}

.about-text .timeline-item::before {
  content: "";
  position: absolute;
  height: 11px;
  width: 11px;
  left: 0;
  background-color: var(--main-cyan);
  top: 16px;
  border-radius: 50%;
}

.about-text .timeline-item:last-child {
  margin-bottom: 0;
}

.about-text .timeline-item .date {
  display: block;
  color: var(--main-cyan);
  font-weight: 400;
  margin: 0 0 10px;
}

.about-text .timeline-item h4 {
  font-size: 18px;
  text-transform: capitalize;
  margin: 0 0 10px;
}

.about-text .timeline-item h4 span {
  font-weight: 400;
}

.about-text .btn {
  margin: 0 15px 15px 0;
}

/* Portfolio Section */

.portfolio-section {
  padding-bottom: 50px;
}

.portfolio-item {
  width: calc((100% / 3) - 30px);
  margin: 0 15px 30px;
}

.portfolio-item-thumbnail img {
  width: 100%;
  border-radius: 10px;
}

.portfolio-item-thumbnail {
  padding: 10px;
  background-color: var(--white-alpha-25);
  border: 1px solid var(--white-alpha-40);
  border-radius: 10px;
}

.portfolio-item h3 {
  font-size: 20px;
  text-transform: capitalize;
  margin: 20px 0;
}

.portfolio-item-details {
  display: none;
}

/* Portfolio Popup */

.portfolio-popup {
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  /* background-color: red; */
  z-index: 200;
  /* opacity: 0.5; */
  visibility: hidden;
}

.portfolio-popup.open {
  visibility: visible;
  overflow-y: auto;
}

.pp-inner {
  /* background-color: red; */
  min-height: 100vh;
  padding: 40px 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pp-content {
  background-color: rgba(
    44,
    26,
    128,
    0.8
  ); /* Aumentar opacidad a 0.8 para más solidez */
  padding: 25px;
  border: 1px solid rgba(22, 26, 51, 0.6); /* También aumenta la opacidad del borde */
  border-radius: 30px;
  max-width: 750px;
  width: 100%;
  backdrop-filter: var(--backdrop-filter-blur);
  opacity: 1; /* Establecer la opacidad completa */
  transform: scale(0.9);
}

.portfolio-popup.open .pp-content {
  opacity: 1;
  transform: scale(1);
  transition: all 0.5s ease;
}

.pp-header {
  position: relative;
}

.pp-header .btn {
  position: absolute;
  height: 40px;
  width: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  right: -40px;
  top: -40px;
}

.pp-thumbnail img {
  border-radius: 10px;
}

.pp-header h3 {
  font-size: 25px;
  text-transform: capitalize;
  margin: 20px 0 15px;
}

.pp-body .description {
  margin-bottom: 20px;
}

.pp-body .general-info li {
  margin-bottom: 10px;
  font-weight: 500;
  text-transform: capitalize;
}

.pp-body .general-info li span {
  font-weight: 300;
}

.pp-body .general-info li a {
  text-transform: lowercase;
  color: var(--main-cyan);
}

/* Contact Section */

.contact-form,
.contact-info {
  width: 50%;
  padding: 0 15px;
}

.contact-form .input-group {
  width: 100%;
  margin-bottom: 30px;
}

.contact-form .input-control::placeholder {
  color: var(--blue-dark);
  opacity: 0.8;
  font-weight: 300;
}

.contact-form .input-control {
  display: block;
  width: 100%;
  height: 50px;
  border-radius: 25px;
  border: none;
  font-family: inherit;
  font-weight: 400;
  font-size: 16px;
  background-color: var(--white);
  padding: 0 20px;
  color: var(--blue);
  border: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.contact-form .input-control:focus {
  border-color: var(--white-alpha-40);
}

.contact-form textarea.input-control {
  height: 120px;
  resize: none;
  padding-top: 15px;
}

.contact-info-item {
  margin: 0 0 30px;
  padding: 0 0 0 20px;
}

.contact-info-item h3 {
  font-size: 20px;
  text-transform: capitalize;
  margin: 0 0 5px;
}

.contact-info-item .social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 55px; /* Doubled from 60px */
  width: 55px; /* Doubled from 60px */
  background-color: var(--white-alpha-25);
  border: 1px solid var(--white-alpha-40);
  color: var(--main-cyan);
  border-radius: 50%;
  margin: 6px 4px 0 0;
  transition: all 0.3s ease;
}

.contact-info-item .social-links a i {
  font-size: 32px; /* Increase icon size proportionally */
}

.contact-info-item .social-links a:hover {
  color: var(--white);
  background-color: var(--main-color);
}

/* Responsive */
@media (max-width: 991px) {
  .container {
    padding: 0;
  }
  .home-text,
  .home-img {
    width: 100%;
  }
  .home-text {
    text-align: center;
  }
  .home-img {
    order: -1;
  }
  .home-img .img-box {
    max-width: 300px;
  }
  .home-text .btn {
    margin: 0 7px 15px;
  }
  .portfolio-item {
    width: calc(50% - 30px);
  }
}
@media (max-width: 767px) {
  .contact-form,
  .contact-info,
  .about-img,
  .about-text {
    width: 100%;
  }
  .about-text {
    margin-top: 30px;
  }
  .portfolio-item {
    width: calc(100% - 30px);
  }
  .pp-inner {
    padding: 30px 15px;
  }
  .contact-info {
    order: -1;
    margin-bottom: 15px;
  }
  .contact-info-item {
    padding: 0;
  }
}
@media (max-width: 575px) {
  .section-title h2,
  .header .nav-inner ul li a {
    font-size: 35px;
  }
  .home-text h1 {
    font-size: 30px;
  }
  .home-text h2 {
    font-size: 18px;
  }
  .pp-header h3 {
    font-size: 20px;
  }
  .skills-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap; /* Permite que las columnas se envuelvan si no hay suficiente espacio */
  }

  .skills-column {
    flex: 0 0 calc(33.333% - 20px); /* Ancho fijo para cada columna */
    max-width: calc(
      33.333% - 20px
    ); /* Asegura que las columnas no crezcan más allá de este ancho */
    display: flex;
    flex-direction: column;
  }

  .skill-category {
    margin-bottom: 40px;
    flex-grow: 1; /* Permite que las categorías crezcan para llenar el espacio vertical */
    display: flex;
    flex-direction: column;
  }

  .skill-category h4 {
    margin-bottom: 10px;
  }

  .skill-item {
    margin-bottom: 5px;
  }

  .skill-item i {
    font-size: 24px;
    color: #007bff;
    margin-right: 18px;
    width: 24px; /* Ancho fijo para los iconos */
    text-align: center; /* Centra los iconos en su espacio */
  }
  .empty-space {
    height: 20px; /* Ajusta esta altura según el espacio que desees */
  }
  .notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #4caf50;
    color: white;
    padding: 15px;
    border-radius: 5px;
    display: none;
    z-index: 1000;
  }
  .spacing {
    margin-top: 100px; /* Ajusta el valor según la cantidad de espacio que necesites */
  }
}
/* Topbar - Barra de navegación superior */
.topbar {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: white;
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

.topbar a:hover {
    opacity: 0.85;
    text-decoration: none;
}

/* Logo con imagen */
.topbar .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.topbar .logo-img {
    height: 38px;
    width: 38px;
    object-fit: cover;
    border-radius: 8px;
    background: white;
    padding: 2px;
}

.topbar .logo-text {
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.5px;
    font-family: var(--font-head, 'Barlow Condensed', Arial, sans-serif);
    color: white;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.topbar-right span {
    font-size: 0.9rem;
    opacity: 0.9;
}

.topbar-right button {
    background: rgba(255,255,255,0.2);
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.topbar-right button:hover {
    background: rgba(255,255,255,0.3);
}

.topbar-right a {
    color: white;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.topbar-right a:hover {
    background: rgba(255,255,255,0.2);
}

/* Notificación badge */
.notif-btn {
    position: relative;
    text-decoration: none;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
}

.notif-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    padding: 0 5px;
    font-size: 11px;
    min-width: 18px;
    text-align: center;
    font-weight: bold;
}

.notif-badge.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 640px) {
    .topbar {
        flex-direction: column;
        text-align: center;
        padding: 0.75rem 1rem;
    }
    
    .topbar-right {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .topbar .logo-img {
        height: 32px;
        width: 32px;
    }
    
    .topbar .logo-text {
        font-size: 1.1rem;
    }
}