body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #CBD4D9;
  color: #3B3B3B;
  line-height: 1.6;
  font-size: clamp(1rem, 1.2vw,1.25rem);
}

h1,
h2,
h3 {
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
  color: #3B3B3B;
}

a:hover {
  color: #666;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: #CBD4D9;
  position: relative;
}

header h1 {
  font-size: 1.8rem;
  margin: 0;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 20;
}

.hamburger .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #3B3B3B;
  transition: all 0.3s ease;
}

nav {
  display: flex;
  gap: 20px;
}

nav a {
  font-weight: bold;
  padding: 5px 10px;
  transition: color 0.3s;
}

nav a:hover {
  color: #666;
}

#hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 20px;
  background-color: #CBD4D9;
}

#hero h1 {
  margin-bottom: 20px;
}

#hero h2 {
  margin-bottom: 20px;
}

#hero p {
  max-width: 600px;
  margin-bottom: 40px;
}

.experience-section {
  max-width: 1100px;
  text-align: center;
  margin: 40px auto 60px auto;
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  padding: 0 20px;
  justify-items: center;
}

.experience-card {
  display: flex ;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.85);
  padding: 32px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  width: 100%;
  min-height: 250px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.experience-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.experience-card h3 {
  font-weight: 600;
  margin-bottom: 4rem;
  color: #111;
}

.experience-card p {
  max-width: 55ch;
  margin: 0 auto;
  text-align: justify;
  line-height: 1.6;
  color: #333;
}

.scroll-down {
  font-size: 3rem;
  background: #CBD4D9;
  color: #3B3B3B;
  text-decoration: none;
  margin-top: 20px;
  animation: bounce 2s infinite;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}

#proyectos {
  padding: 40px 20px;
  text-align: center;
  max-width: 1100px;
  margin: 0 auto;
}

#proyectos h2 {
  margin-bottom: 20px;
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
  padding: 0 20px;
}

.project-card {
  background-color: #F2F0EF;
  padding: 32px;
  border-radius: 18px;
  border: 1px solid #E6E6E6;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);

  width: 100%;
  min-height: 250px;

  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;

  transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.07);
}

.project-card img {
  width: 280px;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
}

.project-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card img {
  width: 280px;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
}

.project-card h3 {
  margin-bottom: 10px;
}

.project-card-content p {
  line-height: 1.65;
  color: #333;
  margin-bottom: 14px;
}

.project-card-content a {
  margin-top: auto;
  background: #1c1c1c;
  color: #F2F0EF;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  display: inline-block;
}

.project-card a:hover {
  background-color: #666;
}

.repo-extra-info {
  margin-top: 12px;
  font-size: 0.95rem;
  color: #444;
}

.repo-extra-info p {
  margin: 4px 0;
}

#contacto {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 60px 10%;
  background-color: #CBD4D9;
  color: #3B3B3B;
}

#contacto h2 {
  font-weight: bold;
  margin-bottom: 20px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-links a {
  font-size: 1.8rem;
  font-weight: 600;
  color: #3B3B3B;
  transition: color 0.3s;
}

.contact-links a:hover {
  color: #666;
}

.contact-image {
  max-width: 40%;
}

.contact-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
}

footer {
  padding: 20px;
  text-align: center;
  background-color: #CBD4D9;
}

footer p {
  margin: 0;
}

@media (max-width: 768px) {
  header {
    justify-content: space-between;
  }

  .project-card{
    flex-direction: column;
    max-width: 95%;
  }

  .project-card img{
    width: 100%;
    height: 200px;
  }

  .experience-card {
    flex-direction: column;
    max-width: 95%;
  }

  .hamburger {
    display: flex;
  }

  nav {
    display: none;
    position: absolute;
    top: 60px;
    right: 20px;
    background-color: #CBD4D9;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }

  nav.open {
    display: flex;
  }

  header h1 {
    font-size: 1.5rem;
  }

  #hero h1 {
    font-size: 2rem;
  }

  #hero h2 {
    font-size: 1.2rem;
  }

  #hero p {
    font-size: 1rem;
  }

  #proyectos h2 {
    font-size: 1.8rem;
  }

  #contacto {
    flex-direction: column;
    text-align: center;
  }

  .contact-image {
    max-width: 60%;
    margin-top: 20px;
  }

  .contact-links a {
    font-size: 1.5rem;
  }
}

.hamburger.open .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.open .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.open .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}
