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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #0d1117;
  color: #ffffff;
  line-height: 1.6;
}

.navbar {
  width: 100%;
  padding: 20px 8%;
  background: rgba(13, 17, 23, 0.96);
  border-bottom: 1px solid #30363d;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 22px;
  font-weight: bold;
  color: #58a6ff;
}

.menu {
  display: flex;
  gap: 22px;
}

.menu a {
  color: #c9d1d9;
  text-decoration: none;
  font-size: 15px;
  transition: 0.3s ease;
}

.menu a:hover {
  color: #58a6ff;
}

.hero {
  min-height: 90vh;
  padding: 90px 8%;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 40px;
  align-items: center;
  background:
    radial-gradient(circle at top left, rgba(31, 111, 235, 0.35), transparent 35%),
    radial-gradient(circle at bottom right, rgba(137, 87, 229, 0.35), transparent 35%),
    #0d1117;
}

.badge {
  display: inline-block;
  margin-bottom: 18px;
  padding: 8px 14px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 999px;
  color: #58a6ff;
  font-size: 14px;
}

.hero h1 {
  font-size: 58px;
  line-height: 1.1;
  margin-bottom: 22px;
}

.hero p {
  max-width: 750px;
  color: #c9d1d9;
  font-size: 20px;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 10px;
  font-weight: bold;
  text-decoration: none;
  transition: 0.3s ease;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-primary {
  background: #238636;
  color: #ffffff;
}

.btn-primary:hover {
  background: #2ea043;
}

.btn-secondary {
  color: #58a6ff;
  border: 1px solid #58a6ff;
  background: transparent;
}

.btn-secondary:hover {
  background: rgba(88, 166, 255, 0.1);
}

.btn-cv {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border: 2px solid #58a6ff;
  color: #58a6ff;
  border-radius: 10px;
  font-weight: bold;
  text-decoration: none;
  background: transparent;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.btn-cv:hover {
  background: #58a6ff;
  color: #0d1117;
  transform: translateY(-3px);
}

.hero-card {
  background: rgba(22, 27, 34, 0.9);
  border: 1px solid #30363d;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.hero-card h3 {
  margin-bottom: 18px;
  color: #58a6ff;
}

.hero-card ul {
  list-style: none;
}

.hero-card li {
  padding: 12px 0;
  color: #c9d1d9;
  border-bottom: 1px solid #30363d;
}

.hero-card li:last-child {
  border-bottom: none;
}

.section {
  padding: 80px 8%;
}

.section h2 {
  font-size: 36px;
  color: #58a6ff;
  margin-bottom: 24px;
}

.section p {
  max-width: 900px;
  color: #c9d1d9;
  margin-bottom: 15px;
  font-size: 17px;
}

.learning-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 28px;
}

.learning-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 16px;
  padding: 24px;
  transition: 0.3s ease;
}

.learning-card:hover {
  transform: translateY(-5px);
  border-color: #58a6ff;
  box-shadow: 0 15px 35px rgba(88, 166, 255, 0.12);
}

.learning-card h3 {
  color: #ffffff;
  margin-bottom: 12px;
}

.learning-card p {
  color: #c9d1d9;
  font-size: 15px;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.skills span {
  padding: 12px 18px;
  background: #161b22;
  border: 1px solid #30363d;
  color: #c9d1d9;
  border-radius: 10px;
  transition: 0.3s ease;
}

.skills span:hover {
  border-color: #58a6ff;
  color: #ffffff;
  transform: translateY(-3px);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

.project-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 16px;
  padding: 26px;
  transition: 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: #58a6ff;
  box-shadow: 0 15px 35px rgba(88, 166, 255, 0.12);
}

.project-card h3 {
  margin-bottom: 14px;
  color: #ffffff;
}

.project-card p {
  color: #c9d1d9;
  font-size: 16px;
  margin-bottom: 20px;
}

.project-link {
  color: #58a6ff;
  font-weight: bold;
  text-decoration: none;
}

.project-link:hover {
  text-decoration: underline;
}

.project-status {
  display: inline-block;
  color: #f0b429;
  font-weight: bold;
  background: rgba(240, 180, 41, 0.1);
  border: 1px solid rgba(240, 180, 41, 0.35);
  padding: 8px 12px;
  border-radius: 8px;
}

.contact-section {
  text-align: center;
}

.contact-section p {
  margin: 0 auto 25px;
}

footer {
  padding: 28px;
  text-align: center;
  color: #8b949e;
  background: #010409;
  border-top: 1px solid #30363d;
}

/* ── Imagen de perfil ── */
.hero-profile {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

.profile-image-container {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(135deg, #58a6ff, #8957e5);
  box-shadow: 0 20px 45px rgba(88, 166, 255, 0.18);
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 4px solid #0d1117;
  border-radius: 50%;
  display: block;
}

/* ── Responsive tablet ── */
@media (max-width: 950px) {
  .navbar {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 14px 5%;
    gap: 10px;
  }

  .menu {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
    font-size: 14px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 60px 6%;
    min-height: auto;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-profile {
    align-items: center;
  }

  .profile-image-container {
    width: 190px;
    height: 190px;
  }

  .learning-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* ── Responsive mobile ── */
@media (max-width: 500px) {
  .navbar {
    flex-direction: column;
    align-items: center;
    padding: 12px 5%;
    gap: 8px;
  }

  .logo {
    font-size: 18px;
  }

  .menu {
    justify-content: center;
    gap: 10px;
  }

  .menu a {
    font-size: 13px;
  }

  .hero {
    padding: 50px 5%;
  }

  .hero h1 {
    font-size: 32px;
  }

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

  .hero-profile {
    align-items: center;
  }

  .profile-image-container {
    width: 160px;
    height: 160px;
  }

  .section {
    padding: 50px 5%;
  }

  .section h2 {
    font-size: 28px;
  }

  .learning-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-buttons {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .btn-cv {
    justify-content: center;
  }
}