/* ======================
   RESET + VARIABLES
====================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-color: #0f172a;
  --text-color: #e5e7eb;
  --muted-color: #94a3b8;
  --accent-color: #38bdf8;
  --card-bg: #020617;
  --max-width: 1100px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* ======================
   UTILIDADES
====================== */
section {
  padding: 5rem 1.5rem;
}

h1, h2, h3, h4 {
  font-weight: 600;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

p {
  color: var(--muted-color);
}

a {
  text-decoration: none;
  color: inherit;
}

.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--accent-color);
  color: #020617;
  border-radius: 6px;
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(56, 189, 248, 0.3);
}

/* ======================
   HEADER
====================== */
.header {
  position: sticky;
  top: 0;
  background-color: rgba(10, 16, 34, 0.9);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.color1 {
  color: var(--accent-color);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--muted-color);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-color);
}

/* ======================
   HERO (AZUL)
====================== */
.hero {
  min-height: 90vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  width: 100%;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1;
}

.hero-text h2 span {
  color: var(--accent-color);
}

.hero-text p {
  margin-top: 1rem;
  font-size: 1.2rem;
}

.hero-buttons {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
}

.hero-socials {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
}

.hero-socials a {
  color: var(--accent-color);
  font-weight: 500;
}

.hero-image img {
  width: 450px;
  height: 450px;
  object-fit: cover;
  border-radius: 30px;
  border: 6px solid var(--accent-color);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
}

.hero-image img:hover {
  transform: scale(1.05) rotate(1deg);
}

/* ======================
   ABOUT (BLANCO)
====================== */
.about {
  background-color: #ffffff;
  color: #020617;
}

.about > * {
  max-width: var(--max-width);
  margin: 0 auto;
}

.about h3 {
  color: #020617;
}

.about p {
  color: #475569;
}

/* SKILLS */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.skills li {
  list-style: none;
  background-color: #f1f5f9;
  padding: 0.75rem 1.2rem;
  border-radius: 12px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.skills li i {
  font-size: 1.4rem;
}

.skills li span {
  font-weight: 500;
  color: #020617;
}

.skills li:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* ======================
   PROJECTS (BLANCO)
====================== */
.projects {
  background-color: #ffffff;
  color: #020617;
}

.projects > * {
  max-width: var(--max-width);
  margin: 0 auto;
}

.projects h3 {
  color: #020617;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.project-card {
  background-color: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--text-color);
}

.project-card img {
  width: 100%;
  height: 350px;          /* ALTURA FIJA */
  object-fit: cover;     /* Recorta sin deformar */
  border-radius: 8px;
  margin-bottom: 1rem;
}


.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.news-link {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #ef4444;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.news-link:hover {
  color: #dc2626;
}

/* ======================
   CONTACT (PRO / BLANCO)
====================== */
.contact {
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  padding: 7rem 1.5rem;
}

.contact-box {
  max-width: var(--max-width);
  margin: 0 auto;
  background: #ffffff;
  border-radius: 24px;
  padding: 4rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  box-shadow:
    0 40px 80px rgba(2, 6, 23, 0.25),
    0 0 0 1px rgba(15, 23, 42, 0.05);
  position: relative;
  overflow: hidden;
}

/* efecto sutil arriba */
.contact-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top left,
    rgba(56, 189, 248, 0.12),
    transparent 40%
  );
  pointer-events: none;
}

/* IZQUIERDA */
.contact-badge {
  display: inline-block;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: white;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
}

.contact-left h3 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
  color: #020617;
}

.contact-left p {
  color: #475569;
  max-width: 520px;
  margin-bottom: 2.5rem;
}

.contact-info {
  display: flex;
  gap: 3rem;
}

.contact-info div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.contact-info strong {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #020617;
}

.contact-info span {
  font-size: 0.95rem;
  color: #475569;
}

/* DERECHA (FORMULARIO) */
.contact-right {
  width: 100%;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  border-radius: 20px;
  padding: 2.5rem;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
}

/* FORM */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}


.contact-form input,
.contact-form textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  background-color: rgba(255,255,255,0.95);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #64748b;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  transform: translateY(-1px);
  box-shadow:
    0 0 0 2px rgba(56, 189, 248, 0.7),
    0 10px 25px rgba(2, 6, 23, 0.25);
}

.contact-form textarea {
  resize: none;
  min-height: 120px;
}

/* BOTÓN */
.contact-form button {
  margin-top: 0.8rem;
  background: #020617;
  color: white;
  border: none;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.contact-form button:hover {
  transform: translateY(-2px);
  background-color: #020617;
  box-shadow: 0 15px 35px rgba(2, 6, 23, 0.5);
}

.contact-note {
  margin-top: 1rem;
  font-size: 0.75rem;
  opacity: 0.85;
  text-align: center;
}





/* ======================
   FOOTER
====================== */
.footer {
  background-color: #1e293b;
  color: var(--muted-color);
  padding: 4rem 1.5rem 2rem;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

/* BRAND */
.footer-brand h4 {
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.08em;
}

.footer-brand h4 span {
  color: var(--accent-color);
}

.footer-brand p {
  margin-top: 1rem;
  max-width: 420px;
  font-size: 0.95rem;
  color: #94a3b8;
}

/* LINKS */
.footer-links strong,
.footer-socials strong {
  display: block;
  margin-bottom: 1rem;
  color: white;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links ul,
.footer-socials ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a,
.footer-socials a {
  color: #94a3b8;
  font-size: 0.9rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover,
.footer-socials a:hover {
  color: var(--accent-color);
  transform: translateX(4px);
}

/* BOTTOM */
.footer-bottom {
  max-width: var(--max-width);
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #64748b;
}

/* ======================
   HAMBURGUESA
====================== */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-color);
  border-radius: 3px;
  transition: 0.3s;
}

/* ANIMACIÓN X */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}


/* ======================
   NAV MOBILE
====================== */
@media (max-width: 768px) {

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, -10px);

    background: #020617;
    flex-direction: column;
    width: 220px;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);

    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }

  .nav-links.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }

  .nav-links li {
    margin-bottom: 1rem;
    text-align: center;
  }
}

/* ======================
   RESPONSIVE
====================== */
@media (max-width: 900px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}


/* ======================
   RESPONSIVE
====================== */
@media (max-width: 900px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-image img {
    width: 220px;
    height: 220px;
  }
}

@media (max-width: 768px) {
  .contact-box {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
}

@media (max-width: 500px) {
  .nav {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  .contact-box {
    grid-template-columns: 1fr;
    padding: 2.5rem;
  }

  .contact-left h3 {
    font-size: 2rem;
  }
}
