/* ——— Variables globales ——— */
:root {
  --bg: #ede2e0;
  --bg-header: #b7b1f1;
  --bg-card: #dec2db;
  --accent: #5b62b3;
  --accent-2: #2e80e4;
  --text: #1c1c1c;
  --text-light: #6b6560;
  --border: #d9d2c0;
  --white: #fafaf7;

  --lavender: #b3a8d8;
  --cream: #f5eee6;
  --dark: #1a1a2e;
  --dark-violet: #2a2535;
  --surface: #231f35;
  --white: #ffffff;
  --green: #a8d8b3;
  --gold: #d8c4a8;

  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-signature: "MS Madi";

  --radius: 8px;
  --radius-lg: 16px;
  --gap: 2rem;
  --section-pad: 6rem 1.5rem;
  --max-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

ul {
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
}

em {
  font-style: italic;
  color: var(--accent);
}

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1.5rem;
}

.section-header {
  max-width: var(--max-width);
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

/* ——— HEADER ——— */
header#banner {
  min-height: 100vh;
  background-color: var(--bg-header);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;

  .sparkle-container {
    .sparkle {
      position: absolute;
      z-index: 3;
      pointer-events: none;
      transform: scale(2, 2);
    }
    .sparkle svg {
      fill: var(--white);
    }
  }

  .tagline {
    position: absolute;
    left: 2%;
    top: 5%;
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-align: left;
  }

  .header-inner {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease both;
  }

  .header-text {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .portfolio-text {
    line-height: 1;
    font-family: var(--font-display);
    font-size: 24vw;
    color: var(--white);
    /* margin-bottom: 1rem; */
    letter-spacing: -0.08em;
    user-select: none;
  }

  .signature {
    position: absolute;
    font-size: 6vw;
    font-style: italic;
    font-family: var(--font-signature);
    transform: rotate(-5deg);
    user-select: none;
  }

  .scroll-hint {
    position: absolute;
    bottom: 2rem;
    font-size: 2rem;
    color: rgba(236, 230, 240, 0.785);
    animation: bounce 2s ease-in-out infinite;
  }

  .rrss {
    position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 36px; padding: 0 30px 22px; flex-wrap: wrap;

    .contact-item { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--dark); font-weight: 500; letter-spacing: 0.02em; }
    .icon-circle { width: 26px; height: 26px; background: var(--dark); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
    .icon-circle svg { width: 13px; height: 13px; fill: var(--white); }
  }
}

header#banner::before {
  content: "";
  position: absolute;
  inset: 0;
  /* background-image:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(42, 6, 76, 0.241) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(76, 165, 213, 0.1) 0%, transparent 60%); */
  pointer-events: none;
}

#navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}

.nav-list {
  display: flex;
  gap: 0;
  max-width: var(--max-width);
  margin: 0 auto;
  overflow-x: auto;
}

.nav-link {
  display: inline-block;
  padding: 1.1rem 1.25rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition:
    color 0.2s,
    border-color 0.2s;
}

.nav-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

#sobre-mi {
  padding: var(--section-pad);
  max-width: var(--max-width);
  margin: 0 auto;
}

.sobre-mi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.bio {
  color: var(--text-light);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.btn-primary {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.85rem 2rem;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
  transition:
    background 0.25s ease,
    transform 0.2s ease;
}

.btn-primary:hover {
  background: #a8491e;
  transform: translateY(-2px);
}

.sobre-mi-image {
  position: relative;
  display: flex;
  justify-content: center;
}

.profile-img {
  width: 100%;
  max-width: 380px;
  position: relative;
  z-index: 1;
}

#tarjetas {
  padding: var(--section-pad);
  background-color: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* Transición hover en tarjetas */
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(28, 28, 28, 0.12);
}

.card-img-wrap {
  position: relative;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.card:hover .card-img {
  transform: scale(1.06);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(200, 90, 42, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 500;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover .card-overlay {
  opacity: 1;
}

.card-body {
  padding: 1.25rem;
}

.card-tag {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0.4rem 0 0.6rem;
}

.card-text {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

#habilidades {
  padding: var(--section-pad);
  margin: 0 auto;
  max-width: var(--max-width);
  /* background-color: var(--dark); */

  .skills-wrap {
    overflow-x: auto;
    padding: 0 1.5rem;
  }

  .skills-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
  }

  thead th {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: left;
    padding: 0.85rem 1.2rem;
    background: var(--bg-dark);
    /* color: var(--white); */
    /* border-bottom: 3px solid var(--accent); */
    letter-spacing: 0.2rem;
    text-transform: uppercase;
  }

  thead th:first-child,
  tbody td:first-child {
    border-right: 1px solid var(--dark-violet);
  }

  thead th:last-child,
  tbody td:last-child {
    border-left: 1px solid var(--dark-violet);
  }

  .skills-table tbody tr {
    transition: background 0.2s;
  }

  .skills-table tbody tr td {
    padding: 0.75rem 1.2rem;
    color: var(--text-light);
  }

  .s-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    font-size: 16px;
    background-color: var(--bg-card);
    padding: 5px;
  }
}

#contacto {
  padding: var(--section-pad);
  background-color: var(--accent);
}

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
  max-width: var(--max-width);
  margin: 0 auto;
}

#contacto .section-label {
  color: rgba(250, 250, 247, 0.45);
}
#contacto .section-title {
  color: var(--white);

  em { color: var(--green)}
}

#contacto .bio {
  color: rgba(250, 250, 247, 0.55);
}

.contact-info {
  margin-top: 1.5rem;
}

.contact-info p {
  color: rgba(250, 250, 247, 0.4);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

/* Formulario */
.contact-form {
  background: rgba(250, 250, 247, 0.04);
  border: 1px solid rgba(250, 250, 247, 0.1);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.2rem;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(250, 250, 247, 0.45);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
  background: rgba(250, 250, 247, 0.07);
  border: 1px solid rgba(250, 250, 247, 0.12);
  border-radius: var(--radius);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(250, 250, 247, 0.2);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: rgba(200, 90, 42, 0.06);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.btn-submit {
  width: 100%;
  padding: 1rem;
  background: var(--bg-header);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    background 0.25s ease,
    transform 0.2s ease;
}

.btn-submit:hover {
  background: #463e91;
  transform: translateY(-2px);
}

#peliculas {
  padding: var(--section-pad);
  max-width: var(--max-width);
  margin: 0 auto;
}

.movies-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 0 1.5rem;
}

.movie-card {
  display: grid;
  grid-template-columns: 80px 200px 1fr;
  gap: 2rem;
  align-items: center;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--white);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.movie-card:hover {
  transform: translateX(8px);
  box-shadow:
    -6px 0 0 var(--accent),
    0 4px 20px rgba(28, 28, 28, 0.06);
}

.movie-rank {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--border);
  text-align: center;
  line-height: 1;
}

.movie-poster {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.movie-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
}

.movie-year {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.movie-desc {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.6;
}

footer {
  background: var(--bg-header);
  border-top: 1px solid rgba(250, 250, 247, 0.07);
  padding: 2.5rem 1.5rem;
}

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

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--white);
}

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

.footer-link {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(250, 250, 247, 0.4);
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 0.78rem;
  color: rgba(47, 22, 81, 0.713);
  width: 100%;
  text-align: center;
  border-top: 1px solid rgba(250, 250, 247, 0.06);
  padding-top: 1.5rem;
  margin-top: 0.5rem;
}

/* ——— ANIMACIONES ——— */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Animación de entrada para secciones */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

section {
  animation: fadeInUp 0.7s ease both;
}

/* ——— RESPONSIVIDAD ——— */
@media (max-width: 768px) {
  .sobre-mi-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .sobre-mi-image {
    order: -1;
  }

  .img-decoration {
    display: none;
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .movie-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .movie-poster {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    height: 130px;
  }

  .movie-rank {
    font-size: 2rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

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

@media (max-width: 480px) {
  .nav-list {
    gap: 0;
  }
  .nav-link {
    padding: 1rem 0.75rem;
    font-size: 0.72rem;
  }
}
