/* ═══════════════════════════════════════
   CV — Guillermo Gamboa
   style.css
═══════════════════════════════════════ */

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

:root {
  --navy:        #0f1e35;
  --navy-mid:    #1a2f4a;
  --slate:       #2d4263;
  --accent:      #c8a96e;
  --accent-light:#e8d5a8;
  --cream:       #faf8f3;
  --off-white:   #f2ede4;
  --text-dark:   #1a1a1a;
  --text-mid:    #4a4a4a;
  --text-muted:  #7a7a7a;
  --divider:     #d8d0c4;
  --section-alt: #f5f0e8;
  --tag-bg:      #e8e0d4;
  --tag-text:    #3a3020;
  font-family: 'DM Sans', sans-serif;
}

body {
  background: var(--off-white);
  color: var(--text-dark);
  min-height: 100vh;
}

/* ─── HERO ─── */
.hero {
  background: var(--navy);
  position: relative;
  overflow: visible;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 320px; height: 320px;
  border-radius: 50%;
  border: 1px solid rgba(200,169,110,0.15);
  pointer-events: none;
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 400px; height: 400px;
  border-radius: 50%;
  border: 1px solid rgba(200,169,110,0.08);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 56px 48px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.hero-text {
  padding-bottom: 48px;
}

.hero-text h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.6rem, 5vw, 4rem);
  color: #fff;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.hero-text .subtitle {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-text .profile-text {
  font-size: 0.94rem;
  line-height: 1.78;
  color: rgba(255,255,255,0.68);
  max-width: 540px;
}

.hero-contacts {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(200,169,110,0.25);
  border-radius: 100px;
  padding: 6px 15px;
  font-size: 0.79rem;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  font-family: inherit;
  cursor: pointer;
}
.contact-chip:hover {
  background: rgba(200,169,110,0.14);
  border-color: var(--accent);
  color: var(--accent-light);
}
.contact-chip .icon {
  font-size: 13px;
  opacity: 0.8;
}

/* ─── PHOTO — flush bottom-right corner ─── */
.photo-wrap {
  position: relative;
  align-self: flex-end;
  flex-shrink: 0;
}

.photo-frame {
  width: 220px;
  display: block;
  position: relative;
  bottom: 0;
  /* no border, no background — image sits directly on hero */
}

.photo-frame img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: bottom center;
  /* drop shadow so the figure reads against the dark bg */
  filter: drop-shadow(-6px 0 18px rgba(0,0,0,0.35));
}

/* ─── MAIN LAYOUT ─── */
.layout {
  max-width: 1060px;
  margin: 0 auto;
  padding: 52px 48px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 52px;
  align-items: start;
}

/* ─── SECTIONS ─── */
section { margin-bottom: 42px; }
section:last-child { margin-bottom: 0; }

.section-label {
  font-size: 0.67rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--divider);
}

/* ─── EXPERIENCE CARDS ─── */
.exp-card {
  background: #fff;
  border: 1px solid var(--divider);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 16px;
  position: relative;
  transition: box-shadow 0.2s;
}
.exp-card:hover { box-shadow: 0 4px 22px rgba(15,30,53,0.09); }
.exp-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 8px 0 0 8px;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.exp-role {
  font-family: 'DM Serif Display', serif;
  font-size: 1.05rem;
  color: var(--navy);
}
.exp-period {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 4px;
}
.exp-company {
  font-size: 0.79rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}
.exp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.exp-list li {
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.62;
  padding-left: 16px;
  position: relative;
}
.exp-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 1rem;
  line-height: 1.58;
}

/* ─── PORTFOLIO ─── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.portfolio-card {
  background: var(--section-alt);
  border: 1px solid var(--divider);
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}
.portfolio-card:hover {
  box-shadow: 0 4px 22px rgba(15,30,53,0.11);
  transform: translateY(-2px);
}

.port-icon {
  width: 36px;
  height: 36px;
  background: var(--navy);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.port-icon svg {
  width: 17px;
  height: 17px;
  fill: var(--accent);
}

.portfolio-card h4 {
  font-family: 'DM Serif Display', serif;
  font-size: 0.97rem;
  color: var(--navy);
  margin-bottom: 6px;
}
.portfolio-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.62;
}

.port-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.port-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.port-live-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  padding: 3px 10px;
  border: 1px solid var(--accent);
  border-radius: 100px;
  background: rgba(200,169,110,0.06);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.port-live-link:hover {
  background: var(--accent);
  color: var(--navy);
}
.port-live-link svg {
  width: 12px; height: 12px;
  fill: currentColor;
  flex-shrink: 0;
}

.port-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.port-tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.69rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.03em;
}
.port-tag.special {
  background: var(--navy);
  color: var(--accent-light);
}

.port-gh-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.73rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 3px 10px;
  border: 1px solid var(--divider);
  border-radius: 100px;
  background: #fff;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.port-gh-link svg {
  width: 12px; height: 12px;
  fill: currentColor;
  flex-shrink: 0;
}
.port-gh-link:hover {
  color: var(--navy);
  border-color: var(--navy);
}

/* ─── SIDEBAR ─── */
.sidebar section {
  background: #fff;
  border: 1px solid var(--divider);
  border-radius: 8px;
  padding: 20px 22px;
  margin-bottom: 16px;
}
.sidebar .section-title { font-size: 1rem; }

.skill-group { margin-bottom: 14px; }
.skill-group:last-child { margin-bottom: 0; }

.skill-group-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.skill-tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.75rem;
  padding: 4px 11px;
  border-radius: 100px;
}
.skill-tag.highlight {
  background: var(--navy);
  color: var(--accent-light);
}

.soft-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.soft-list li {
  font-size: 0.85rem;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  gap: 9px;
}
.soft-list li::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.edu-item {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--divider);
}
.edu-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.edu-degree { font-weight: 500; font-size: 0.88rem; color: var(--text-dark); margin-bottom: 2px; }
.edu-school  { font-size: 0.79rem; color: var(--text-muted); }
.edu-badge {
  display: inline-block;
  margin-top: 6px;
  background: var(--section-alt);
  border: 1px solid var(--divider);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lang-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 7px;
}
.lang-name  { color: var(--text-dark); font-weight: 500; }
.lang-level { font-size: 0.74rem; color: var(--text-muted); }
.lang-bar {
  height: 3px;
  background: var(--divider);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 14px;
}
.lang-bar:last-child { margin-bottom: 0; }
.lang-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

.social-links { display: flex; gap: 10px; flex-wrap: wrap; }
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  background: var(--section-alt);
  border: 1px solid var(--divider);
  border-radius: 100px;
  font-size: 0.79rem;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.social-btn:hover {
  background: var(--navy);
  color: var(--accent);
  border-color: var(--navy);
}
.social-btn svg {
  width: 14px; height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ─── NEGOCIOS BANNER ─── */
.negocios-banner {
  background: var(--navy);
  border-radius: 10px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.negocios-banner::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 180px; height: 180px;
  border-radius: 50%;
  border: 1px solid rgba(200,169,110,0.14);
  pointer-events: none;
}

.negocios-banner-label {
  font-size: 0.67rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.negocios-banner-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.negocios-banner-sub {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
  max-width: 440px;
}

.negocios-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--navy);
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.negocios-banner-cta:hover { opacity: 0.82; }

/* ─── FOOTER ─── */
footer {
  background: var(--navy);
  padding: 28px 48px;
}
.footer-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-name {
  font-family: 'DM Serif Display', serif;
  font-size: 1rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.04em;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border: 1px solid rgba(200,169,110,0.22);
  border-radius: 100px;
  font-size: 0.77rem;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  font-family: inherit;
  background: none;
  cursor: pointer;
}
.footer-link:hover {
  background: rgba(200,169,110,0.12);
  border-color: var(--accent);
  color: var(--accent-light);
}
.footer-link svg {
  width: 12px; height: 12px;
  fill: currentColor;
  flex-shrink: 0;
}
.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.2);
  margin-top: 6px;
  letter-spacing: 0.06em;
}

/* ─── RESPONSIVE ─── */

/* Tablet */
@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr 160px;
    padding: 40px 28px 0;
    gap: 24px;
    align-items: flex-start;
  }
  .photo-frame { width: 160px; }
  .hero-text { padding-bottom: 32px; }
  .hero-text h1 { font-size: clamp(2rem, 5vw, 2.8rem); }

  .layout {
    grid-template-columns: 1fr;
    padding: 36px 24px;
    gap: 0;
  }
  .sidebar section { margin-bottom: 16px; }
  footer { padding: 24px 24px; }
}

/* Móvil */
@media (max-width: 480px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding: 28px 20px 0;
    gap: 0;
  }
  .hero-text { padding-bottom: 0; }
  .hero-text h1 { font-size: 1.9rem; }
  .profile-text { margin-top: 12px; }
  .exp-header { flex-direction: column; gap: 3px; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 1200px) {
  .photo-frame { width: 260px; }
}