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

:root {
  --bg: #ede5d8;
  --surface: #d8ccbe;
  --card: #cfc3b4;
  --accent: #e57a2e;
  --accent2: #9e8f80;
  --text: #2d2a26;
  --muted: #6b6158;
  --border: rgba(45, 42, 38, 0.15);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Cabin", sans-serif;
  font-weight: 300;
  overflow-x: hidden;
}

/* GRAIN OVERLAY */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.2;
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 3rem;
  background: linear-gradient(
    to bottom,
    rgba(237, 229, 216, 0.97),
    transparent
  );
  backdrop-filter: blur(2px);
}

.nav-logo {
  font-family: "Cabin", sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.3s;
}

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

/* HERO */
#inicio {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 3rem 5rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 80% 60% at 60% 40%,
      rgba(229, 122, 46, 0.1) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 50% 50% at 20% 80%,
      rgba(158, 143, 128, 0.12) 0%,
      transparent 50%
    ),
    var(--bg);
}

.hero-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--border),
    transparent
  );
}
.hero-line:nth-child(1) {
  left: 25%;
}
.hero-line:nth-child(2) {
  left: 50%;
}
.hero-line:nth-child(3) {
  left: 75%;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  margin-bottom: 2rem;
  animation: fadeUp 0.8s ease both;
}

.hero-name {
  font-family: "Cabin", sans-serif;
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  animation: fadeUp 0.8s 0.15s ease both;
}

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

.hero-sub {
  margin-top: 1.5rem;
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  max-width: 420px;
  line-height: 1.7;
  animation: fadeUp 0.8s 0.3s ease both;
}

.hero-cta {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  animation: fadeUp 0.8s 0.45s ease both;
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0a;
  text-decoration: none;
  padding: 0.85rem 2rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  transition:
    background 0.3s,
    transform 0.2s;
  font-family: "Cabin", sans-serif;
}
.btn-primary:hover {
  background: #f08c45;
  transform: translateY(-2px);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  padding: 0.85rem 2rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition:
    border-color 0.3s,
    transform 0.2s;
  font-family: "Cabin", sans-serif;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  right: 3rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 2;
  animation: fadeUp 1s 0.8s ease both;
}

.scroll-line {
  width: 40px;
  height: 1px;
  background: var(--muted);
  display: block;
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: slide 2s infinite;
}

/* SOBRE MÍ */
#sobre-mi {
  padding: 8rem 3rem;
  display: flex;
  flex-direction: row;
  gap: 5rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.about-img-wrap {
  position: relative;
  width: 300px;
  flex-shrink: 0;
  align-self: flex-start;
  margin: 2rem;
}

/* Corner brackets - top-left */
.about-img-wrap::before {
  content: "";
  position: absolute;
  top: -14px;
  left: -14px;
  width: 40px;
  height: 40px;
  border-top: 3px solid var(--accent);
  border-left: 3px solid var(--accent);
  z-index: 2;
}

/* Corner brackets - bottom-right */
.about-img-wrap::after {
  content: "";
  position: absolute;
  bottom: -14px;
  right: -14px;
  width: 40px;
  height: 40px;
  border-bottom: 3px solid var(--accent);
  border-right: 3px solid var(--accent);
  z-index: 2;
}

.about-img-wrap img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top center;
  display: block;
  position: relative;
  z-index: 1;
  filter: grayscale(10%) contrast(1.05);
}

.about-text {
}

.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.section-label::before {
  content: "";
  display: block;
  width: 30px;
  height: 1px;
  background: var(--accent);
}

.about-title {
  font-family: "Cabin", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

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

.about-desc {
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat-num {
  font-family: "Cabin", sans-serif;
  font-size: 2rem;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* PORTAFOLIO */
#portafolio {
  padding: 6rem 3rem;
  background: var(--surface);
  position: relative;
}

#portafolio::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--border),
    transparent
  );
}

.section-header {
  max-width: 1200px;
  margin: 0 auto 4rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.section-title {
  font-family: "Cabin", sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
}

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

.video-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.video-grid.vertical {
  grid-template-columns: repeat(3, 1fr);
}

.video-grid.vertical .video-card .video-thumb {
  aspect-ratio: 9/16;
}

.subsection-label {
  max-width: 1200px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.subsection-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.subsection-gap {
  max-width: 1200px;
  margin: 3.5rem auto 0;
}

.video-card {
  position: relative;
  background: var(--card);
  overflow: hidden;
  cursor: pointer;
  group: true;
}

.video-card.featured {
  grid-column: span 2;
}

.video-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.6s ease,
    filter 0.4s;
  filter: brightness(0.8) grayscale(15%);
}

.video-card:hover .video-thumb img {
  transform: scale(1.06);
  filter: brightness(0.9) grayscale(0%);
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 0.9) 0%,
    transparent 50%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.play-btn {
  width: 52px;
  height: 52px;
  border: 1.5px solid rgba(232, 201, 126, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.3s,
    border-color 0.3s,
    background 0.3s;
}

.play-btn svg {
  width: 18px;
  height: 18px;
  fill: var(--accent);
  margin-left: 3px;
}

.video-card:hover .play-btn {
  transform: scale(1.12);
  border-color: var(--accent);
  background: rgba(232, 201, 126, 0.1);
}

.video-info {
  padding: 1rem 1.2rem 1.2rem;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.video-num {
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.video-title {
  font-family: "Cabin", sans-serif;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--text);
}

/* MODAL */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(45, 42, 38, 0.96);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

.modal-bg.open {
  display: flex;
}

.modal-inner {
  width: 90vw;
  max-width: 900px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: -3rem;
  right: 0;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s;
}

.modal-close:hover {
  color: var(--accent);
}

.modal-video {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
}

/* CONTACTO */
#contacto {
  padding: 8rem 3rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.contact-title {
  font-family: "Cabin", sans-serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

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

.contact-sub {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 3rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  transition: color 0.3s;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

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

.contact-link svg {
  width: 16px;
  height: 16px;
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--accent);
  color: #0a0a0a;
  text-decoration: none;
  padding: 1rem 2.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  font-family: "Cabin", sans-serif;
  transition:
    background 0.3s,
    transform 0.2s;
}

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

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-family: "Cabin", sans-serif;
  font-size: 0.95rem;
  color: var(--accent);
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* ANIMATIONS */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  nav {
    padding: 1.2rem 1.5rem;
  }
  .nav-links {
    display: none;
  }
  #inicio {
    padding: 0 1.5rem 4rem;
  }
  #sobre-mi {
    flex-direction: column;
    padding: 5rem 1.5rem;
    gap: 3rem;
  }
  #portafolio {
    padding: 5rem 1.5rem;
  }
  .video-grid {
    grid-template-columns: 1fr;
  }
  .video-card.featured {
    grid-column: span 1;
  }
  #contacto {
    padding: 5rem 1.5rem;
  }
  footer {
    padding: 2rem 1.5rem;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .hero-name {
    font-size: 3rem;
  }
  .hero-cta {
    flex-direction: column;
  }
  .about-stats {
    grid-template-columns: 1fr 1fr;
  }
}
