/* ── RESET & BASE ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:      #FAFAF7;
  --blush:      #E8B4B8;
  --blush-light:#F5E6E8;
  --mauve:      #9D8FA0;
  --mauve-light:#EDE0F0;
  --rose-dark:  #C47B82;
  --gold:       #C9A96E;
  --text:       #3D3535;
  --text-soft:  #7A6B6B;
  --white:      #FFFFFF;
  --shadow:     0 4px 24px rgba(157,143,160,.15);
  --shadow-lg:  0 12px 48px rgba(157,143,160,.22);
  --radius:     16px;
  --radius-sm:  8px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Raleway', sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

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

h1,h2,h3,h4 {
  font-family: 'Playfair Display', serif;
  line-height: 1.25;
}

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

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

/* ── UTILITIES ─────────────────────────────────────── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section { padding: 100px 0; }
.section-alt { background: var(--blush-light); }

#about {
  background: linear-gradient(135deg, #FCEFEC 0%, #F5DCE3 55%, #EED5E0 100%);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 4rem;
}

.section-tag {
  display: inline-block;
  font-family: 'Raleway', sans-serif;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mauve);
  background: var(--mauve-light);
  padding: .35rem 1rem;
  border-radius: 99px;
  margin-bottom: 1rem;
}

.section-header h2 { font-size: clamp(2.4rem, 4.6vw, 3.4rem); margin-bottom: .85rem; }
.section-desc { color: var(--text-soft); font-size: 1.05rem; }

/* ── BUTTONS ───────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--blush), var(--rose-dark));
  color: var(--white);
  padding: .85rem 2rem;
  border-radius: 99px;
  font-weight: 600;
  font-size: .95rem;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(232,180,184,.45);
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(232,180,184,.55);
}

.btn-ghost {
  display: inline-block;
  border: 1.5px solid var(--blush);
  color: var(--rose-dark);
  padding: .85rem 2rem;
  border-radius: 99px;
  font-weight: 600;
  font-size: .95rem;
  transition: var(--transition);
}
.btn-ghost:hover {
  background: var(--blush-light);
  transform: translateY(-2px);
}

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

/* ── NAVBAR ────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.1rem 0;
  transition: var(--transition);
}
#navbar.scrolled {
  background: rgba(250,250,247,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(157,143,160,.12);
  padding: .75rem 0;
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-style: italic;
  color: var(--rose-dark);
}

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

.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: var(--transition);
}
.nav-links a:hover { color: var(--rose-dark); }

.btn-nav {
  background: linear-gradient(135deg, var(--blush), var(--rose-dark)) !important;
  color: var(--white) !important;
  padding: .5rem 1.4rem;
  border-radius: 99px;
  font-weight: 600 !important;
  box-shadow: 0 3px 14px rgba(232,180,184,.4);
  transition: var(--transition) !important;
}
.btn-nav:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(232,180,184,.5) !important; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
}
.menu-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--rose-dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── HERO ──────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 7rem 2rem 4rem;
  gap: 4rem;
  max-width: 1140px;
  margin: 0 auto;
}

.hero-bg-blobs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
  will-change: transform;
  transform: translateZ(0);
}
.blob-1 { width: 520px; height: 520px; background: var(--blush); top: -120px; right: -100px; }
.blob-2 { width: 400px; height: 400px; background: var(--mauve-light); bottom: -80px; left: -80px; }
.blob-3 { width: 300px; height: 300px; background: #FDEBD0; top: 40%; left: 30%; }

.hero-content { flex: 1; max-width: 560px; }

.hero-tag {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mauve);
  margin-bottom: 1.2rem;
}

.hero-content h1 {
  font-size: clamp(3rem, 5.8vw, 4.8rem);
  margin-bottom: 1.25rem;
  color: var(--text);
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-soft);
  margin-bottom: 2.5rem;
  max-width: 460px;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-visual {
  flex-shrink: 0;
  position: relative;
  width: 400px;
  height: 450px;
}

.avatar-frame {
  width: 360px;
  height: 400px;
  border-radius: 48% 52% 60% 40% / 50% 44% 56% 50%;
  overflow: hidden;
  background: linear-gradient(145deg, var(--blush-light), var(--mauve-light));
  border: 3px solid var(--white);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.float-badge {
  position: absolute;
  background: var(--white);
  border-radius: 99px;
  padding: .5rem 1rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--rose-dark);
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.badge-1 { top: 10px; right: -10px; }
.badge-2 { bottom: 60px; left: -20px; }
.badge-3 { bottom: 10px; right: 10px; }

/* ── SOBRE MÍ ──────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text .lead {
  font-size: 1.2rem;
  font-family: 'Playfair Display', serif;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.about-text p { color: var(--text-soft); margin-bottom: .75rem; }

.tools-title {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mauve);
  margin-bottom: 1.2rem;
}

.tools-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}

.tool-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: var(--white);
  border: 1.5px solid var(--blush-light);
  border-radius: 99px;
  padding: .55rem 1.1rem;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text);
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(232,180,184,.1);
}
.tool-chip:hover {
  border-color: var(--blush);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(232,180,184,.25);
}
.tool-icon { font-size: 1rem; }

/* ── DISEÑO WEB ────────────────────────────────────── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.project-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.project-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}

.card-img {
  position: relative;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #F5E6E8, #E8B4B8);
}
.card-img picture { display: contents; }
.card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
  transition: transform .6s ease;
}
.project-card:hover .card-img img { transform: scale(1.04); }
.featured .card-img { aspect-ratio: auto; min-height: 260px; }

.card-img-placeholder {
  color: rgba(255,255,255,.7);
  font-size: .85rem;
  font-style: italic;
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(61,53,53,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}
.project-card:hover .card-overlay { opacity: 1; }

.card-link {
  color: var(--white);
  font-weight: 600;
  font-size: .95rem;
  border: 1.5px solid rgba(255,255,255,.6);
  padding: .6rem 1.4rem;
  border-radius: 99px;
  transition: var(--transition);
}
.card-link:hover { background: rgba(255,255,255,.15); }

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-tags { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.tag {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--mauve);
  background: var(--mauve-light);
  padding: .25rem .75rem;
  border-radius: 99px;
}

.card-body h3 {
  font-size: 1.3rem;
  margin-bottom: .5rem;
}
.card-body p { color: var(--text-soft); font-size: .92rem; }

/* ── SEO ───────────────────────────────────────────── */
.seo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.seo-services h3,
.seo-cases h3 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.service-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.service-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.service-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--blush-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-list strong {
  display: block;
  font-weight: 600;
  margin-bottom: .2rem;
  color: var(--text);
}
.service-list p { color: var(--text-soft); font-size: .9rem; margin: 0; }

.case-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.4rem;
  margin-bottom: 1rem;
  border-left: 3px solid var(--blush);
  box-shadow: 0 2px 12px rgba(232,180,184,.12);
}
.case-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}
.case-sector {
  font-size: .78rem;
  font-weight: 600;
  color: var(--mauve);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.case-result {
  font-size: .82rem;
  font-weight: 700;
  padding: .2rem .7rem;
  border-radius: 99px;
}
.result-up { background: #D5EAD5; color: #3A7A3A; }

.case-card p { color: var(--text-soft); font-size: .9rem; }

/* ── COPYWRITING ───────────────────────────────────── */
.copy-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.copy-samples {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.copy-type-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.copy-type-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.copy-type-icon { font-size: 1.8rem; margin-bottom: .75rem; }
.copy-type-card h4 { font-size: 1rem; margin-bottom: .4rem; color: var(--text); }
.copy-type-card p { font-size: .88rem; color: var(--text-soft); }

.copy-sample {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 1.3rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 12px rgba(232,180,184,.1);
}

.sample-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold);
  margin-bottom: .6rem;
}

.copy-sample blockquote {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--text);
  border: none;
  padding: 0;
}
.copy-sample blockquote small {
  display: block;
  margin-top: .6rem;
  font-size: .78rem;
  color: var(--text-soft);
  font-style: normal;
  font-family: 'Raleway', sans-serif;
}
.copy-sample blockquote small a {
  color: var(--rose-dark);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}
.copy-sample blockquote small a:hover {
  border-bottom-color: currentColor;
}

/* ── CONTACT ───────────────────────────────────────── */
.contact-section { background: var(--white); }

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.btn-cv {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: 1rem;
  padding: 1rem 2.4rem;
}

.contact-links {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.contact-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  background: var(--white);
  border: 1.5px solid var(--blush-light);
  color: var(--text);
  padding: .75rem 1.6rem;
  border-radius: 99px;
  font-size: .92rem;
  font-weight: 500;
  transition: var(--transition);
  box-shadow: 0 2px 12px rgba(232,180,184,.12);
}
.contact-icon-btn:hover {
  border-color: var(--blush);
  color: var(--rose-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232,180,184,.25);
}

/* ── FOOTER ────────────────────────────────────────── */
#footer {
  background: var(--text);
  color: rgba(255,255,255,.7);
  text-align: center;
  padding: 3rem 2rem;
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.6rem;
  color: var(--blush);
  margin-bottom: .3rem;
}
.footer-tagline {
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mauve);
  margin-bottom: 1.5rem;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.footer-links a {
  font-size: .88rem;
  color: rgba(255,255,255,.6);
  transition: var(--transition);
}
.footer-links a:hover { color: var(--blush); }
.footer-copy { font-size: .78rem; color: rgba(255,255,255,.35); }

/* ── ANIMATIONS ────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 900px) {
  #hero { flex-direction: column; text-align: center; padding: 7rem 2rem 4rem; gap: 3rem; }
  .hero-cta { justify-content: center; }
  .hero-desc { margin: 0 auto 2.5rem; }
  .hero-visual { width: 320px; height: 360px; }
  .avatar-frame { width: 280px; height: 310px; }
  .badge-1 { top: 0; right: -5px; }
  .badge-2 { bottom: 40px; left: -10px; }
  .badge-3 { bottom: 0; right: 5px; }

  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .tools-list { grid-template-columns: repeat(2, 1fr); }
  .tools-list .tool-chip:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .project-card.featured { grid-template-columns: 1fr; }
  .seo-grid { grid-template-columns: 1fr; }
  .copy-types { grid-template-columns: 1fr; }
  .copy-samples { grid-template-columns: 1fr; }

  /* Mobile portfolio cards: show project logos centered */
  .project-card .card-img {
    background: #fdfcfa;
    aspect-ratio: 16/9;
  }
  .project-card.featured .card-img { aspect-ratio: 16/9; min-height: 0; }
  .project-card .card-img img {
    object-fit: contain;
    object-position: center center;
    padding: 1.75rem 2rem;
  }
  .project-card:hover .card-img img { transform: none; }
  .project-card[data-mobile-bg="dark"] .card-img { background: #1a1414; }
}

@media (max-width: 640px) {
  .section { padding: 70px 0; }
  .nav-links {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(250,250,247,.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.2rem;
    z-index: 999;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.2rem; }
  .menu-toggle { display: flex; z-index: 1001; }
  .copy-types { grid-template-columns: 1fr; }
}

/* ── MOBILE PERFORMANCE ─────────────────────────────
   filter:blur() and backdrop-filter are GPU-intensive.
   On 4x-throttled mobile CPUs (Lighthouse simulation),
   they cause paint timeouts and a missing score.
   We disable them entirely below 768px.
────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Hide decorative blobs — the main performance killer */
  .hero-bg-blobs { display: none; }

  /* Navbar: replace blur with solid background */
  #navbar.scrolled {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(250,250,247,.97);
  }

  /* Mobile menu overlay: replace blur with solid background */
  .nav-links {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(250,250,247,.99);
  }
}
