/* ============================================
   Andrea Valles | Portafolio — v2
   Paleta basada en el logo AV
   ============================================ */

:root {
  --navy: #0d2243;
  --navy-soft: #163257;
  --blue: #135dd6;
  --blue-dark: #0e46a8;
  --teal: #1ec7cf;
  --teal-dark: #128a90;
  --lime: #e0f72c;
  --bg: #faf9f7;
  --card-bg: #ffffff;
  --text: #22262b;
  --text-muted: #666d76;
  --border: #e9e7e2;
  --radius: 12px;
  --max-width: 1120px;
  --shadow: 0 4px 18px rgba(13, 34, 67, 0.06);
  --shadow-hover: 0 10px 30px rgba(13, 34, 67, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-weight: 400;
}

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

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 88px 0; }

h1, h2, h3, h4 {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  line-height: 1.22;
  margin: 0 0 16px;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 12px;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 52px;
  text-align: center;
}

.section-head h2 { font-size: clamp(1.7rem, 2.8vw, 2.2rem); }
.section-head p { color: var(--text-muted); font-size: 1.03rem; }

/* Brand dots motif — used as a small recurring signature */
.brand-dots { display: inline-flex; gap: 6px; align-items: center; }
.brand-dots span {
  width: 7px; height: 7px; border-radius: 50%;
}
.brand-dots span:nth-child(1) { background: var(--blue); }
.brand-dots span:nth-child(2) { background: var(--teal); }
.brand-dots span:nth-child(3) { background: var(--lime); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,0.5); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--navy); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-dark); }
.btn-sm { padding: 9px 18px; font-size: 0.82rem; }

/* ---------- Header / Nav ---------- */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(250, 249, 247, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
}
.logo img { height: 30px; width: auto; }
.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--blue); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--navy); margin: 5px 0; transition: 0.3s;
}

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
}

/* ---------- Hero (fluye continuo con el header, foto con esquinas redondeadas) ---------- */
.hero {
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding: 150px 0 80px;
}
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 16px;
}
.hero h1 {
  color: var(--navy);
  font-weight: 900;
  font-size: clamp(2.2rem, 3.8vw, 3.2rem);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hero h1 em { color: var(--blue); font-style: normal; }
.hero p.lead {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 480px;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-actions .btn-outline { border-color: var(--border); color: var(--navy); }
.hero-actions .btn-outline:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.hero-stats {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}
.hero-stats div strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--navy);
}
.hero-stats div span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero-photo-wrap { position: relative; }
.hero-photo {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(13,34,67,0.16);
  aspect-ratio: 3 / 4;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.hero-photo .frame-icon { display: none; }
.hero-photo small { display: none; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; padding: 110px 0 50px; text-align: center; }
  .hero-photo-wrap { order: -1; max-width: 380px; margin: 0 auto; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero-stats { justify-content: center; }
}

/* ---------- Clients strip ---------- */
.clients-strip {
  background: var(--bg);
  padding: 34px 0;
  border-bottom: 1px solid var(--border);
}
.clients-strip .label {
  text-align: center;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.clients-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 18px 40px;
}
.clients-row span {
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  opacity: 0.55;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.clients-row .client-logo {
  display: flex;
  align-items: center;
  opacity: 1;
}
.clients-row .client-logo img {
  height: 26px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.55;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.clients-row .client-logo img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* ---------- About ---------- */
.about .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.about p { color: var(--text-muted); font-size: 1.03rem; margin-bottom: 18px; }
.about-highlights {
  display: grid;
  gap: 4px;
}
.highlight-card {
  background: transparent;
  border-left: 3px solid var(--blue);
  padding: 6px 0 18px 18px;
  margin-bottom: 14px;
}
.highlight-card:nth-child(2) { border-color: var(--teal); }
.highlight-card:nth-child(3) { border-color: var(--lime); }
.highlight-card h4 { margin-bottom: 6px; font-size: 1rem; }
.highlight-card p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

@media (max-width: 860px) {
  .about .container { grid-template-columns: 1fr; }
}

/* ---------- Trayectoria: acordeón ---------- */
.timeline { max-width: 780px; margin: 0 auto; }
.timeline-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--card-bg);
}
.timeline-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  user-select: none;
}
.timeline-item summary::-webkit-details-marker { display: none; }
.timeline-item summary:hover { background: var(--bg); }
.timeline-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}
.timeline-item:nth-of-type(2) .timeline-dot,
.timeline-item:nth-of-type(5) .timeline-dot { background: var(--teal); }
.timeline-item:nth-of-type(3) .timeline-dot,
.timeline-item:nth-of-type(6) .timeline-dot { background: var(--lime); }
.timeline-head { flex: 1; min-width: 0; }
.timeline-date {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--teal-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 2px;
}
.timeline-head h3 { font-size: 1.04rem; margin: 0; }
.timeline-head .role-company { font-size: 0.88rem; color: var(--text-muted); }
.timeline-chevron {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  color: var(--navy);
  transition: transform 0.25s ease;
}
.timeline-item[open] .timeline-chevron { transform: rotate(45deg); background: var(--bg); }
.timeline-body {
  padding: 0 22px 22px 50px;
}
.timeline-body ul { margin: 0; padding-left: 18px; color: var(--text-muted); font-size: 0.94rem; }
.timeline-body li { margin-bottom: 6px; }

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.project-card:hover .card-title { color: var(--blue); }

.card-img {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  font-size: 1.9rem;
  position: relative;
  background:
    radial-gradient(circle at 85% 15%, rgba(30,199,207,0.35), transparent 55%),
    linear-gradient(155deg, var(--navy) 0%, #081627 100%);
  overflow: hidden;
}
.card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-category {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 8px;
}
.card-title {
  font-size: 1rem;
  margin-bottom: 8px;
  transition: color 0.2s ease;
  line-height: 1.3;
}
.card-desc {
  color: var(--text-muted);
  font-size: 0.87rem;
  margin-bottom: 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-highlight {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
  background: #eef7f7;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 12px;
}
.card-highlight .star { color: var(--blue); flex-shrink: 0; }
.card-readmore {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---------- Project modal ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13, 34, 67, 0.72);
  z-index: 2000;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }
body.modal-lock { overflow: hidden; }

.modal-box {
  background: #fff;
  border-radius: var(--radius);
  max-width: 720px;
  width: 100%;
  overflow: hidden;
  position: relative;
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  color: var(--navy);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.modal-img {
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  color: rgba(255,255,255,0.85);
  position: relative;
  background:
    radial-gradient(circle at 85% 15%, rgba(30,199,207,0.35), transparent 55%),
    linear-gradient(155deg, var(--navy) 0%, #081627 100%);
  overflow: hidden;
}
.modal-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.modal-gallery {
  display: flex;
  gap: 8px;
  padding: 12px 32px 0;
  overflow-x: auto;
}
.modal-gallery:empty { padding: 0; }
.gallery-thumb {
  flex-shrink: 0;
  width: 56px; height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  background: none;
  opacity: 0.65;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.active { opacity: 1; border-color: var(--blue); }
.modal-content { padding: 32px 32px 36px; }
.modal-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--teal-dark);
}
.modal-content h2 { font-size: 1.4rem; margin: 8px 0 12px; }
.modal-teaser { color: var(--text-muted); font-size: 1rem; margin-bottom: 8px; }
.modal-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.modal-section { margin-bottom: 22px; }
.modal-section h4 {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--teal-dark);
  margin-bottom: 8px;
}
.modal-section p { color: var(--text); font-size: 0.95rem; margin: 0; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.tag {
  font-size: 0.72rem;
  background: #eef7f7;
  color: var(--teal-dark);
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 700;
}

@media (max-width: 600px) {
  .modal-overlay { padding: 0; }
  .modal-box { border-radius: 0; min-height: 100vh; }
}

/* ---------- Skills ---------- */
.skills-list { max-width: 880px; margin: 0 auto; }
.skills-row {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.skills-row:last-child { border-bottom: none; }
.skills-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  color: #fff;
  background: var(--blue);
}
.skills-row:nth-child(2) .skills-icon { background: var(--teal); }
.skills-row:nth-child(3) .skills-icon { background: var(--navy); }
.skills-row:nth-child(4) .skills-icon { background: var(--blue-dark); }
.skills-row h4 { font-size: 0.95rem; margin: 0 0 8px; }
.skill-pills { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.skill-pill {
  font-size: 0.85rem;
  color: var(--text);
  position: relative;
  padding-left: 14px;
}
.skill-pill::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--teal);
}

@media (max-width: 600px) {
  .skills-row { flex-direction: column; gap: 10px; }
}

/* ---------- Education ---------- */
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.edu-grid h4 { color: var(--teal-dark); font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.edu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.edu-logo {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.edu-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.edu-logo .fallback { font-size: 1.1rem; color: var(--teal-dark); }
.edu-logo-pair { flex-shrink: 0; display: flex; }
.edu-logo-pair .edu-logo:nth-child(2) { margin-left: -12px; }
.edu-item .deg { font-weight: 700; font-size: 0.96rem; }
.edu-item .inst { font-size: 0.86rem; color: var(--text-muted); }
.cert-list { list-style: none; margin: 0; padding: 0; }
.cert-list li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.cert-list li:last-child { border-bottom: none; }

@media (max-width: 780px) { .edu-grid { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact {
  background: var(--navy);
  color: #fff;
  padding: 64px 0;
}
.contact .container {
  max-width: 700px;
  text-align: center;
}
.contact h2 { color: #fff; font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.contact p.lead { color: rgba(255,255,255,0.68); font-size: 1rem; margin-bottom: 30px; }
.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 28px;
  margin: 30px 0 22px;
  font-size: 0.92rem;
}
.contact-links a, .contact-links span {
  color: rgba(255,255,255,0.85);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.contact-links a:hover { color: var(--teal); }
.cv-links {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.82rem;
}
.cv-links a { color: rgba(255,255,255,0.55); text-decoration: underline; text-underline-offset: 3px; }
.cv-links a:hover { color: #fff; }

/* ---------- Footer ---------- */
footer {
  background: #081627;
  color: rgba(255,255,255,0.45);
  text-align: center;
  padding: 22px 0;
  font-size: 0.82rem;
}
footer a { color: rgba(255,255,255,0.7); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
