/*==================== GOOGLE FONTS ====================*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

/*==================== VARIABLES CSS ====================*/
:root {
  --header-height: 4rem;

  /*========== Colors ==========*/
  --first-color: #3b82f6;
  --first-color-alt: #2563eb;
  --first-color-lighter: rgba(59, 130, 246, 0.1);
  --title-color: #f1f5f9;
  --text-color: #94a3b8;
  --text-color-light: #64748b;
  --body-color: #0a0f1a;
  --container-color: rgba(30, 41, 59, 0.5);
  --border-color: rgba(51, 65, 85, 0.5);

  /*========== Font and typography ==========*/
  --body-font: 'Inter', sans-serif;
  --code-font: 'Fira Code', monospace;

  --big-font-size: 2.5rem;
  --h1-font-size: 2rem;
  --h2-font-size: 1.5rem;
  --h3-font-size: 1.25rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.875rem;
  --smaller-font-size: 0.813rem;

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;

  /*========== Margenes Bottom ==========*/
  --mb-0-25: 0.25rem;
  --mb-0-5: 0.5rem;
  --mb-0-75: 0.75rem;
  --mb-1: 1rem;
  --mb-1-5: 1.5rem;
  --mb-2: 2rem;
  --mb-2-5: 2.5rem;
  --mb-3: 3rem;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
  --z-modal: 1000;
}

/* Responsive typography */
@media screen and (min-width: 968px) {
  :root {
    --big-font-size: 4rem;
    --h1-font-size: 2.5rem;
    --h2-font-size: 2rem;
    --h3-font-size: 1.5rem;
    --normal-font-size: 1.125rem;
    --small-font-size: 0.938rem;
    --smaller-font-size: 0.875rem;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0 0 var(--header-height) 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  line-height: 1.6;
}

h1,
h2,
h3,
h4 {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
  line-height: 1.2;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--text-color);
  transition: 0.3s;
}

a:hover {
  color: var(--first-color);
}

img {
  max-width: 100%;
  height: auto;
}

/*==================== REUSABLE CSS CLASSES ====================*/
.section {
  padding: 6rem 0 2rem;
}

.section-title {
  font-size: var(--h2-font-size);
  text-align: center;
  margin-bottom: var(--mb-0-25);
}

.section-subtitle {
  display: block;
  font-size: var(--small-font-size);
  color: var(--first-color);
  margin-bottom: var(--mb-3);
  text-align: center;
  font-family: var(--code-font);
  letter-spacing: 1px;
}

.section-title,
.section-subtitle {
  position: relative;
  z-index: 1;
}

/*==================== LAYOUT ====================*/
.container {
  max-width: 1024px;
  margin-left: var(--mb-1-5);
  margin-right: var(--mb-1-5);
}

.grid {
  display: grid;
  gap: 1.5rem;
}

/*==================== NAVBAR ====================*/
.navbar {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: var(--z-fixed);
  transition: all 0.4s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 var(--mb-1-5);
  height: var(--header-height);
}

.nav-logo {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
  font-family: var(--code-font);
  font-size: var(--h3-font-size);
}
.nav-logo span {
  color: var(--first-color);
}

.nav-toggle {
  color: var(--title-color);
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
}

.nav-menu {
  display: flex;
  column-gap: 2rem;
}

.nav-link {
  color: var(--text-color);
  font-weight: var(--font-medium);
  font-size: var(--small-font-size);
  position: relative;
  padding-bottom: 4px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--first-color);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--title-color);
}

.nav-link:hover::after {
  width: 100%;
}

/* Active link */
.active-link {
  color: var(--first-color);
}
.active-link::after {
  width: 100%;
}

/*==================== BUTTONS ====================*/
.btn {
  display: inline-flex;
  align-items: center;
  background-color: var(--first-color);
  color: #ffffff;
  padding: 0.85rem 2rem;
  border-radius: 0.75rem;
  font-weight: var(--font-semi-bold);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: var(--small-font-size);
}

.btn:hover {
  background-color: var(--first-color-alt);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.btn-icon {
  font-size: 1.25rem;
  margin-left: var(--mb-0-5);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  background-color: transparent;
  color: var(--first-color);
  padding: 0.85rem 2rem;
  border-radius: 0.75rem;
  font-weight: var(--font-semi-bold);
  border: 1px solid var(--first-color);
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: var(--small-font-size);
}

.btn-ghost:hover {
  background-color: var(--first-color-lighter);
  color: var(--first-color);
  transform: translateY(-3px);
}

/*==================== HOME ====================*/
.home {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding-top: 5rem;
  position: relative;
  overflow: hidden;
}

/* Subtle gradient glow behind hero */
.home::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(
    ellipse,
    rgba(59, 130, 246, 0.08) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.home-container {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.home-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-subtitle {
  font-family: var(--code-font);
  color: var(--first-color);
  font-size: var(--normal-font-size);
  margin-bottom: var(--mb-0-75);
  display: block;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.home-title {
  font-size: var(--big-font-size);
  margin-bottom: var(--mb-0-5);
  background: linear-gradient(135deg, #f1f5f9 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-role {
  color: var(--text-color);
  font-size: var(--h2-font-size);
  margin-bottom: var(--mb-1-5);
  font-weight: var(--font-regular);
}

.home-description {
  margin: 0 auto var(--mb-2-5) auto;
  max-width: 540px;
  font-size: var(--normal-font-size);
  line-height: 1.8;
  color: var(--text-color);
}

.home-social {
  display: flex;
  justify-content: center;
  column-gap: 1.25rem;
  margin-bottom: var(--mb-2-5);
}

.home-social-icon {
  font-size: 1.25rem;
  color: var(--text-color-light);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.home-social-icon:hover {
  color: var(--first-color);
  border-color: var(--first-color);
  background-color: var(--first-color-lighter);
  transform: translateY(-3px);
}

.home-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/*==================== ABOUT ====================*/
.about-container {
  grid-template-columns: 1fr;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.about-description {
  margin-bottom: var(--mb-2-5);
  font-size: var(--normal-font-size);
  line-height: 1.8;
}

.about-info {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin-bottom: var(--mb-2-5);
}

.about-info > div {
  text-align: center;
}

.about-info-title {
  font-size: var(--h1-font-size);
  font-weight: var(--font-semi-bold);
  color: var(--first-color);
  display: block;
}

.about-info-name {
  font-size: var(--smaller-font-size);
  display: block;
  font-family: var(--code-font);
  color: var(--text-color-light);
}

/*==================== SKILLS ====================*/
.skills-container {
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
}

.skills-content {
  background-color: var(--container-color);
  padding: 2.5rem;
  border-radius: 1.25rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.skills-content:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

.skills-header {
  display: flex;
  align-items: center;
  margin-bottom: var(--mb-2);
}

.skills-icon {
  font-size: 2rem;
  color: var(--first-color);
  margin-right: var(--mb-0-75);
}

.skills-title {
  font-size: var(--h3-font-size);
}

.skills-subtitle {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
}

.skills-name {
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  margin-top: 0.25rem;
}

.skill-item {
  padding: 1.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.skill-item:hover {
  transform: translateY(-5px);
  background-color: rgba(59, 130, 246, 0.05);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.skill-item img {
  transition: transform 0.3s ease;
}

.skill-item:hover img {
  transform: scale(1.1);
}

.skills-percentage-text {
  font-family: var(--code-font);
  font-size: var(--smaller-font-size) !important;
  color: var(--text-color-light) !important;
  margin-top: 0.25rem;
  display: block;
}

/*==================== EXPERIENCE ====================*/
.experience-container {
  max-width: 800px;
}

.experience-content {
  display: grid;
  row-gap: 1.5rem;
}

.experience-card {
  background-color: var(--container-color);
  padding: 2rem 2.5rem;
  border-radius: 1.25rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
}

.experience-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--first-color), transparent);
  border-radius: 1.25rem 0 0 1.25rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.experience-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.experience-card:hover::before {
  opacity: 1;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.experience-title {
  font-size: var(--h3-font-size);
  font-weight: var(--font-semi-bold);
}

.experience-company {
  display: block;
  font-size: var(--small-font-size);
  color: var(--first-color);
  margin-top: var(--mb-0-25);
  font-family: var(--code-font);
}

.experience-calendar {
  font-size: var(--smaller-font-size);
  color: var(--text-color-light);
  font-family: var(--code-font);
  background-color: rgba(59, 130, 246, 0.08);
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

ul.experience-description {
  font-size: var(--small-font-size);
  list-style-type: none;
  padding-left: 0;
  color: var(--text-color);
}

ul.experience-description li {
  margin-bottom: 0.6rem;
  line-height: 1.7;
  padding-left: 1.25rem;
  position: relative;
}

ul.experience-description li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--first-color);
  font-size: 0.875rem;
}

/*==================== PROJECTS ====================*/
.projects-container {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background-color: var(--container-color);
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.project-content {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-0-75);
}

.project-description {
  font-size: var(--small-font-size);
  margin-bottom: var(--mb-1);
  line-height: 1.7;
  flex-grow: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: var(--mb-1-5);
}

.project-tech li {
  font-family: var(--code-font);
  font-size: var(--smaller-font-size);
  background-color: var(--first-color-lighter);
  color: var(--first-color);
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
}

.project-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--first-color);
  font-weight: var(--font-medium);
  font-size: var(--small-font-size);
  transition: all 0.3s ease;
}

.project-button:hover {
  color: var(--first-color-alt);
}

.project-button-icon {
  transition: transform 0.3s;
}

.project-button:hover .project-button-icon {
  transform: translateX(4px);
}

/*==================== CONTACT ====================*/
.contact-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 1rem;
}

.contact-information {
  display: flex;
  align-items: center;
  margin-bottom: 0;
  background-color: var(--container-color);
  padding: 1.5rem 2.5rem;
  border-radius: 1.25rem;
  border: 1px solid var(--border-color);
  min-width: 360px;
  transition: all 0.3s ease;
}

.contact-information:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

.contact-icon {
  font-size: 1.75rem;
  color: var(--first-color);
  margin-right: var(--mb-1);
}

.contact-title {
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
}

.contact-subtitle {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
  font-family: var(--code-font);
  word-break: break-all;
  overflow-wrap: break-word;
}

/*==================== FOOTER ====================*/
.footer {
  padding-top: 2rem;
}

.footer-container {
  row-gap: 3.5rem;
}

.footer-bg {
  background-color: var(--container-color);
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border-color);
}

.footer-title {
  font-size: var(--h2-font-size);
  margin-bottom: var(--mb-0-25);
}

.footer-subtitle {
  font-size: var(--small-font-size);
  color: var(--first-color);
  font-family: var(--code-font);
}

.footer-links {
  display: flex;
  flex-direction: column;
  row-gap: 1.5rem;
}

.footer-link:hover {
  color: var(--first-color);
}

.footer-socials {
  display: flex;
  gap: 1.5rem;
}

.footer-social {
  font-size: 1.25rem;
  color: var(--text-color-light);
  transition: all 0.3s ease;
}

.footer-social:hover {
  color: var(--first-color);
  transform: translateY(-3px);
}

.footer-copy {
  font-size: var(--smaller-font-size);
  text-align: center;
  color: var(--text-color-light);
  margin-top: var(--mb-3);
  font-family: var(--code-font);
}

/*==================== SCROLL BAR ====================*/
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background-color: var(--body-color);
}

::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-color-light);
}

/*==================== MEDIA QUERIES ====================*/

@media screen and (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 65%;
    height: calc(100vh - var(--header-height));
    background-color: rgba(10, 15, 26, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    padding-top: 3rem;
    row-gap: 3rem;
    transition: 0.4s;
    border-right: 1px solid var(--border-color);
  }

  .nav-menu.show-menu {
    left: 0;
  }

  .nav-toggle {
    display: block;
  }

  .home-container {
    padding-top: 2rem;
  }

  .skills-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-info {
    flex-direction: row;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .experience-header {
    flex-direction: column;
  }

  .projects-container {
    grid-template-columns: 1fr;
  }

  .contact-information {
    min-width: auto;
    width: 100%;
    padding: 1.5rem 1.25rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-links {
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
  }

  .footer-socials {
    justify-content: center;
  }
}

@media screen and (min-width: 768px) {
  .body {
    margin: 0;
  }
  .section {
    padding: 8rem 0 2rem;
  }
  .about-container,
  .experience-container {
    margin: 0 auto;
  }
  .footer-container {
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
  }
  .footer-socials {
    justify-self: flex-end;
  }
}

@media screen and (min-width: 1024px) {
  .container {
    margin-left: auto;
    margin-right: auto;
  }
}
