
:root {  
    --bg: #f7f7f7;  
    --bg-soft: #ffffff;  
    --text-main: #111827;  
    --text-muted: #6b7280;
    --accent: #ffca28; /* amarillo aproximado */  
    --accent-strong: #f59e0b;  
    --border-soft: #e5e7eb;  
    --radius-lg: 18px;  
    --radius-md: 14px;  
    --radius-sm: 999px;  
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
}

.cv-page {
  background-color: #f3f4f6;
}

/* Layout helpers */
.container {
    width: min(1120px, 100% - 3rem);
    margin-inline: auto;
  }
  
  .section {
    padding-block: 4.5rem;
  }
  
  .section-header {
    margin-bottom: 2.5rem;
  }
  
  .section-header h2 {
    font-size: 2rem;
    margin: 0 0 0.5rem;
  }
  
  .section-header p {
    margin: 0;
    color: var(--text-muted);
  }
  
  .section-header--center {
    text-align: center;
  }
  
  /* Header */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(247, 247, 247, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  }
  
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 1rem;
  }
  
  .logo {
    font-weight: 600;
    text-decoration: none;
    color: var(--text-main);
  }
  
  .main-nav {
    display: flex;
    gap: 1.5rem;
  }
  
  .nav-link {
    font-size: 0.95rem;
    text-decoration: none;
    color: var(--text-muted);
    position: relative;
    padding-bottom: 0.2rem;
  }
  
  .nav-link:hover {
    color: var(--text-main);
  }
  
  .nav-link--active {
    color: var(--text-main);
    font-weight: 500;
  }
  
  .nav-link--active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background-color: var(--accent);
  }
  
  /* Hero */
  .hero {
    padding-block: 4.5rem 3.5rem;
  }
  
  .hero-inner {
    display: flex;
  }
  
  .hero-content {
    max-width: 640px;
  }
  
  .hero-kicker {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
  }
  
  .hero-title {
    font-size: clamp(2.6rem, 4vw, 3.4rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 3rem;
  }

  
  .hero-title span:first-child {
    color: var(--accent-strong);
  }
  
  .hero-subtitle {
    margin: 0 0 1.8rem;
    color: var(--text-muted);
    max-width: 33rem;
  }
  
  /* Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }
  
  .btn--primary {
    background-color: var(--accent);
    color: #1f2933;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.35);
  }
  
  .btn--primary:hover {
    background-color: var(--accent-strong);
    transform: translateY(-1px);
  }
  
  .btn--outline {
    background-color: #fff;
    border-color: var(--border-soft);
    color: var(--text-main);
  }
  
  .btn--outline:hover {
    background-color: #f3f4f6;
  }
  
  /* Hero actions & social */
  .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-social {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
  }
  
  .icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background-color: #fff;
    font-size: 0.8rem;
    color: var(--text-main);
    text-decoration: none;
  }
  
  .icon-btn:hover {
    background-color: #f3f4f6;
  }
  
  /* Scroll down */
  .scroll-down {
    border: none;
    background: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
  }
  
  /* Case studies */
  .case-studies {
    background-color: #fff;
    border-radius: 30px 30px 0 0;
    padding-top: 3.5rem;
    box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.05);
  }
  
  .case-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.8rem 1.4rem;
  }
  
  .case-card {
    background-color: var(--bg-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
  }
  
  .case-image {
    background-color: #e5e7eb;
    height: 180px;
  }
  
  /* Aquí puedes reemplazar por imágenes reales con background-image */
  .case-image--1 { background-image: url("img/case-1.png"); background-size: cover; background-position: center; }
  .case-image--2 { background-image: url("img/case-2.png"); background-size: cover; background-position: center; }
  .case-image--3 { background-image: url("img/case-3.png"); background-size: cover; background-position: center; }
  .case-image--4 { background-image: url("img/case-4.png"); background-size: cover; background-position: center; }
  .case-image--5 { background-image: url("img/case-5.png"); background-size: cover; background-position: center; }
  .case-image--6 { background-image: url("img/case-6.png"); background-size: cover; background-position: center; }
  
  .case-info {
    padding: 1.1rem 1.25rem 1.25rem;
  }
  
  .case-info h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
  }
  
  .case-meta {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
  }
  
  /* Footer */
  .site-footer {
    border-top: 1px solid var(--border-soft);
    background-color: #f9fafb;
    padding-block: 1.8rem;
  }
  
  .footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    font-size: 0.85rem;
  }
  
  .footer-name {
    font-weight: 600;
    margin: 0 0 0.1rem;
  }
  
  .footer-role {
    margin: 0;
    color: var(--text-muted);
  }
  
  .footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
  }
  
  .footer-contact a {
    color: var(--text-main);
    text-decoration: none;
  }
  
  .footer-contact a:hover {
    text-decoration: underline;
  }
  
  .footer-social {
    display: flex;
    gap: 0.5rem;
  }

  /* Página de CV */
  .cv-main {
    padding-top: 3.5rem;
    padding-bottom: 4rem;
  }

  .cv-container {
    max-width: 960px;
  }

  .cv-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    justify-content: center;
  }

  .cv-viewer-wrapper {
    background-color: #ffffff;
    border-radius: 18px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
    padding: 1.25rem;
  }

  .cv-embed {
    width: 100%;
    height: min(80vh, 900px);
    border-radius: 12px;
    border: none;
  }

  .cv-fallback {
    margin-top: 0.9rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
  }

  /* Modal proyecto */
  .modal {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 80;
  }

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

  .modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
  }

  .modal-dialog {
    position: relative;
    z-index: 1;
    width: min(960px, 100% - 3rem);
    max-height: min(700px, 100vh - 3rem);
    background-color: #ffffff;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.45);
    display: flex;
    flex-direction: column;
  }

  .modal-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1.6fr) auto;
    align-items: center;
    gap: 1.5rem;
    padding: 1.2rem 1.8rem;
    color: #ffffff;
  }

  .modal-back {
    appearance: none;
    border: none;
    background: none;
    color: #ffffff;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
  }

  .modal-kicker {
    margin: 0 0 0.2rem;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
  }

  .modal-title {
    margin: 0 0 0.25rem;
    font-size: 1.6rem;
    letter-spacing: 0.05em;
  }

  .modal-subtitle {
    margin: 0;
    font-size: 0.9rem;
    max-width: 30rem;
  }

  .modal-logo {
    justify-self: end;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.1;
  }

  .modal-body {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1.1fr);
    gap: 2rem;
    padding: 1.8rem 1.8rem 1.6rem;
    background-color: #f9fafb;
    overflow-y: auto;
  }

  .modal-body-left {
    font-size: 0.9rem;
    color: var(--text-main);
  }

  .modal-meta-grid {
    display:flex;
    justify-content: space-between;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.4rem;
  }

  .modal-meta-label {
    margin: 0 0 0.15rem;
    font-weight: 600;
  }

  .modal-meta-value {
    margin: 0;
    color: var(--text-muted);
  }

  .modal-section + .modal-section {
    margin-top: 1.1rem;
  }

  .modal-section h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
  }

  .modal-section p {
    margin: 0;
    color: var(--text-main);
  }

  .modal-body-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }

  .modal-phones {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 4 / 5;
    border-radius: 24px;

  }

  .modal-cta {
    width: 100%;
    justify-content: center;
  }

  /* Modales por proyecto (colores de cabecera y CTA + imágenes) */
  .modal--juan .modal-header {
    background-color: #c8102e;
  }

  .modal-cta--juan {
    background-color: #c8102e;
    box-shadow: 0 10px 25px rgba(200, 16, 46, 0.35);
    color: #ffffff;
  }

  .modal-cta--juan:hover {
    background-color: #a40d25;
  }

  .modal-phones--juan {
    background-image: url("img/case-1-juan-valdez.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
  }

  .modal--liberty .modal-header {
    background-color: #ffd51f;
    color: #111827;
  }

  .modal--liberty .modal-back {
    color: #111827;
  }

  .modal-cta--liberty {
    background-color: #ffd51f;
    color: #111827;
    box-shadow: 0 10px 25px rgba(250, 204, 21, 0.4);
  }

  .modal-cta--liberty:hover {
    background-color: #facc15;
  }

  .modal-phones--liberty {
    background-image: url("img/case-2-liberty.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
  }

  .modal--si-joven .modal-header {
    background-color: #004b94;
  }

  .modal-cta--si-joven {
    background-color: #004b94;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.4);
    color: #ffffff;
  }

  .modal-cta--si-joven:hover {
    background-color: #013b74;
  }

  .modal-phones--si-joven {
    background-image: url("img/case-6-sijoven.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
  }

  .modal--rnmc .modal-header {
    background-color: #d3ff1f;
    color: #111827;
  }

  .modal--rnmc .modal-back {
    color: #111827;
  }

  .modal-cta--rnmc {
    background-color: #d3ff1f;
    color: #111827;
    box-shadow: 0 10px 25px rgba(132, 204, 22, 0.4);
  }

  .modal-cta--rnmc:hover {
    background-color: #c0f31b;
  }

  .modal-phones--rnmc {
    background-image: url("img/case-5-ponal.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
  }

  .modal--polaris .modal-header {
    background-color: #22354d;
  }

  .modal-cta--polaris {
    background-color: #22354d;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.45);
    color: #ffffff;
  }

  .modal-cta--polaris:hover {
    background-color: #192739;
  }

  .modal-phones--polaris {
    background-image: url("img/case-3-polaris.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
  }

  .modal--sisben .modal-header {
    background-color: #e5e5e5;
    color: #111827;
  }

  .modal--sisben .modal-back {
    color: #111827;
  }

  .modal-cta--sisben {
    background-color: #f3f4f6;
    color: #111827;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
  }

  .modal-cta--sisben:hover {
    background-color: #e5e7eb;
  }

  .modal-phones--sisben {
    background-image: url("img/case-4-sisben.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
  }
  
  /* About page */
  .hero--about {
    padding-block: 4rem 3rem;
    background: linear-gradient(120deg, #fef3c7 0%, #e5e7eb 40%, #f9fafb 100%);
  }
  
  .about-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1.2fr);
    gap: 2.5rem;
    align-items: center;
  }
  
  .hero-title--about span .highlight {
    color: var(--accent-strong);
  }
  
  .body-text {
    margin: 0 0 1rem;
    color: var(--text-muted);
  }
  
  .about-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-block: 1.8rem 1.2rem;
  }
  
  .about-card {
    background-color: #fff;
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  }
  
  .about-card h3 {
    margin: 0 0 0.3rem;
    font-size: 0.95rem;
  }
  
  .about-card p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
  }
  
  .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  
  .tag {
    padding: 0.28rem 0.9rem;
    border-radius: 999px;
    background-color: #e5e7eb;
    font-size: 0.8rem;
  }
  
  /* About photo */
  .about-photo-wrapper {
    position: relative;
    justify-self: center;
  }
  
  .about-photo {
    width: min(320px, 80vw);
    aspect-ratio: 3 / 4;
    border-radius: 30px;
    background: url("img/profile.png") center/cover no-repeat, #d1d5db;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
  }
  
  .about-badge {
    position: absolute;
    bottom: 14px;
    right: -10px;
    background-color: var(--accent-strong);
    color: var(--text-main);
    padding: 0.6rem 1rem;
    border-radius: 999px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 900;
    gap: 0.1rem;
  }
  
  .about-badge span:first-child {
    font-size: 1.3rem;
    font-weight: 600;
  }
  
  /* Skills section */
  .skills-section {
    background-color: #f9fafb;
  }
  
  .skills-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.4rem;
  }
  
  .skills-card {
    background-color: #fff;
    border-radius: var(--radius-md);
    padding: 1.4rem 1.3rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
    font-size: 0.9rem;
  }
  
  .skills-card h3 {
    margin: 0 0 0.7rem;
    font-size: 1rem;
  }
  
  .skills-card ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
  }
  
  .skills-card li + li {
    margin-top: 0.25rem;
  }
  
  /* Responsivo */
  @media (max-width: 900px) {
    .main-nav {
      gap: 1rem;
      font-size: 0.9rem;
    }
  
    .case-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  
    .about-layout {
      grid-template-columns: minmax(0, 1fr);
    }
  
    .about-photo-wrapper {
      order: -1;
    }
  
    .skills-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  
  @media (max-width: 640px) {
    .header-inner {
      flex-direction: column;
      gap: 0.7rem;
    }
  
    .main-nav {
      flex-wrap: wrap;
    }
  
    .hero {
      padding-top: 3.5rem;
    }
  
    .case-grid {
      grid-template-columns: minmax(0, 1fr);
    }
  
    .skills-grid {
      grid-template-columns: minmax(0, 1fr);
    }
  
    .footer-inner {
      flex-direction: column;
      align-items: flex-start;
    }

    .modal-dialog {
      width: min(100% - 1.4rem, 520px);
      max-height: calc(100vh - 2rem);
    }

    .modal-header {
      grid-template-columns: minmax(0, 1fr);
      gap: 0.75rem;
      text-align: left;
    }

    .modal-logo {
      justify-self: center;
    }

    .modal-body {
      grid-template-columns: minmax(0, 1fr);
      padding: 1.4rem 1.3rem 1.2rem;
    }

    .modal-meta-grid {
      grid-template-columns: minmax(0, 1fr);
      gap: 0.75rem;
    }

    .modal-body-right {
      align-items: flex-start;
    }

    .modal-phones {
      max-width: 260px;
      margin-inline: auto;
    }
  }