:root {
  --primary-color: #6c63ff;
  --dark-bg: #121212;
  --darker-bg: #0a0a0a;
  --ligth-text: #f5f5f5;
  --gray-text: #aaaaaa;
  --card-bg: #1e1e1e;
  --border-color: #2d2d2d;
  --transition: all 0.3s easy;
}
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scrollbar-color: var(--primary-color) var(--dark-bg);
}
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--dark-bg);
  color: var(--ligth-text);
  line-height: 1.6;
}
a {
  text-decoration: none;
  color: inherit;
  align-items: center;
  justify-items: right;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}
#navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 5%;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}
.logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  font-weight: 900;
}
.logo span {
  color: var(--primary-color);
}
.nav-links {
  display: flex;
  gap: 20px;
}
.nav-links a {
  position: relative;
  padding: 10px;
  transition: var(--transition);
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}
.nav-links a:hover {
  color: var(--primary-color);
}
.nav-links a:hover:after {
  width: 100px;
}
section {
  padding: 90 px 5%;
  max-width: 1400px;
  margin: 0 auto;
}
.section-title {
  font-size: 30px;
  margin-bottom: 40px;
  text-align: center;
  position: relative;
  padding-bottom: 16px;
}
.section-title:after {
  content: 0;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--primary-color);
}
.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 12px 20px;
  border-radius: 5px;
  font-weight: 600;
  transition: var(--transition);
  border: none;
}
.btn:hover {
  background-color: #5651d8;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(108, 99, 255, 0.3);
}
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 40px;
}
.hero-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  margin-top: 100px;
}
.hero-text {
  flex: 1;
}
.hero-text h1 {
  font-size: 35px;
  margin-bottom: 8px;
  font-weight: 700;
  padding-top: 60px;
}
.hero-text h2 {
  font-size: 20px;
  color: var(--primary-color);
  margin-bottom: 24px;
  font-weight: 600;
}
.hero-image {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}
.hero-image img {
  width: 350px;
  height: 350px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--primary-color);
  box-shadow: 0 0 25px rgba(108, 99, 255, 0.5);
  transition: var(--transition);
}
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}
.timeline:before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  width: 2px;
  height: 100%;
  background-color: var(--border-color);
}
.timeline-item {
  position: relative;
  margin-bottom: 24px;
  padding-left: 50px;
}
.timeline-content {
  background-color: var(--card-bg);
  padding: 16px;
  border-radius: 10px;
  border-left: 3px solid var(--primary-color);
}
.projects-container {
  display: flex;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.project-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translate(-3px);
  box-shadow: 0 0 30px rgba(108, 99, 255, 0.3);
  cursor: pointer;
}
.project-img {
  overflow: hidden;
}
.project-img img {
  transition: var(--transition);
  width: 100%;
}
.project-card:hover .project-img img {
  transform: scale(1.05);
}
.project-info {
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.project-info h3 {
  margin-bottom: 12px;
  font-size: 20px;
}
.project-info p {
  color: var(--gray-text);
  margin-bottom: 12px;
  font-size: 16px;
  flex-grow: 1;
}
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.project-tech span {
  font-size: 14px;
  padding: 4px 7px;
  background-color: var(--darker-bg);
  border-radius: 20px;
}
.project-links {
  display: flex;
  gap: 16px;
}
.project-links a {
  font-size: 14px;
  color: var(--gray-text);
  transition: var(--transition);
}
.project-links a:hover {
  color: var(--primary-color);
}
footer {
  background-color: var(--darker-bg);
  border-top: 1px solid var(--border-color);
  padding: 24px 5%;
}
@media (max-width: 430px) {
  #navbar {
    flex-direction: column;
    padding: 16px;
    gap: 16px;
  }
  .hero-content,
  .nav-links {
    flex-direction: column;
  }
}

.contacto {
  background-color: var(--card-bg);
  display: flex;
  padding: 15px;
  width: 100%;
  height: 100%;
}
.form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 40%;
}
button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  border-radius: 10px;
  background-color: var(--primary-color);
  cursor: pointer;
}
button:hover {
  background-color: #5651d8;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(108, 99, 255, 0.3);
}
label {
  font-weight: 600;
}
.Contacto h2 {
  display: flex;

  padding: 50px;
}
.form-input {
  width: 400px;
}
.social-links {
  padding: 20px;
}

/* Ocultar hamburguesa por defecto en desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #fff;
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(
      10,
      10,
      10,
      0.97
    ); /* ← oscuro, igual que el header */
    padding: 1rem 0;
    gap: 0;
  }

  .nav-links.open {
    display: flex !important;
  }

  .nav-links a {
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--ligth-text);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }
}
