/* ============================================================
   CV INTERACTIVO — Jonathan Grez Parada
   style.css — Paleta: Negro + Plateado + Dorado (Minimalista Premium)
   ============================================================ */

/* ----------------------------------------------------------
   1. VARIABLES CSS — Tema claro
---------------------------------------------------------- */
:root {
  --bg:           #f8f8f6;
  --bg-alt:       #efefed;
  --surface:      #ffffff;
  --text:         #111111;
  --text-muted:   #777777;
  --accent:       #1a1a1a;
  --accent2:      #9e9e9e;
  --gold:         #b8a88a;
  --border:       rgba(0,0,0,0.09);
  --nav-bg:       rgba(248,248,246,0.95);
  --shadow:       0 6px 30px rgba(0,0,0,0.08);
  --radius:       12px;
  --transition:   0.32s cubic-bezier(.4,0,.2,1);
}

/* ----------------------------------------------------------
   2. VARIABLES CSS — Tema oscuro
---------------------------------------------------------- */
[data-theme="dark"] {
  --bg:           #0d0d0d;
  --bg-alt:       #141414;
  --surface:      #1a1a1a;
  --text:         #f0f0ee;
  --text-muted:   #888888;
  --accent:       #e8e8e8;
  --accent2:      #888888;
  --gold:         #c9aa7c;
  --border:       rgba(255,255,255,0.07);
  --nav-bg:       rgba(13,13,13,0.97);
  --shadow:       0 6px 30px rgba(0,0,0,0.5);
}

/* ----------------------------------------------------------
   3. BASE
---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
}

h1, h2, h3, h4, h5 {
  font-family: 'Cormorant Garamond', serif;
  line-height: 1.15;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--text); }

/* ----------------------------------------------------------
   4. NAVBAR
---------------------------------------------------------- */
#mainNav {
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0.8rem 0;
  transition: background var(--transition), box-shadow var(--transition);
}

#mainNav.scrolled { box-shadow: var(--shadow); }

.navbar-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text) !important;
}
.navbar-brand span { color: var(--gold); }

.nav-link {
  color: var(--text-muted) !important;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem !important;
  transition: color var(--transition);
}
.nav-link:hover,
.nav-link.active { color: var(--text) !important; }

/* ----------------------------------------------------------
   5. BOTONES
---------------------------------------------------------- */
.btn-theme {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-muted);
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-theme:hover { border-color: var(--gold); color: var(--gold); }

.btn-primary-cv {
  display: inline-block;
  background: var(--text);
  color: var(--bg) !important;
  border: 1.5px solid var(--text);
  border-radius: 4px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.7rem 2rem;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-primary-cv:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(184,168,138,0.35);
}

.btn-secondary-cv {
  display: inline-block;
  background: transparent;
  color: var(--text) !important;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.7rem 2rem;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-secondary-cv:hover {
  border-color: var(--text);
  transform: translateY(-2px);
}

.btn-color-cv {
  background: transparent;
  color: var(--text-muted) !important;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-color-cv:hover { border-color: var(--gold); color: var(--gold) !important; }

/* ----------------------------------------------------------
   6. HERO
---------------------------------------------------------- */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

/* Líneas decorativas de fondo */
.hero-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-lines::before {
  content: '';
  position: absolute;
  top: 15%; right: 8%;
  width: 1px; height: 55%;
  background: linear-gradient(to bottom, transparent, var(--border), transparent);
}
.hero-lines::after {
  content: '';
  position: absolute;
  top: 20%; right: 12%;
  width: 1px; height: 40%;
  background: linear-gradient(to bottom, transparent, var(--border), transparent);
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}
.hero-line-deco {
  width: 40px; height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}
.hero-eyebrow span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero-name {
  font-size: clamp(3.5rem, 7vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.0;
}
.hero-name .surname { color: var(--accent2); }

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-top: 1.2rem;
  line-height: 1.8;
}

.hero-btns {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Estadísticas hero */
.hero-stats { display: flex; gap: 2rem; margin-top: 2.5rem; }
.stat-item { text-align: center; }
.stat-border { border-left: 1px solid var(--border); padding-left: 2rem; }
.stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Avatar */
.avatar-col {
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-frame {
  position: relative;
  width: 280px; height: 280px;
}
.avatar-frame::before {
  content: '';
  position: absolute;
  top: -12px; right: -12px;
  width: 100%; height: 100%;
  border: 1px solid var(--gold);
  border-radius: 4px;
  opacity: 0.4;
  transition: opacity var(--transition);
}
.avatar-frame:hover::before { opacity: 0.8; }
.avatar-inner {
  width: 100%; height: 100%;
  background: linear-gradient(145deg, #1a1a1a 0%, #2e2e2e 50%, #1a1a1a 100%);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 5rem; font-weight: 700;
  color: var(--gold);
  letter-spacing: -2px;
  position: relative; overflow: hidden;
}
.avatar-inner::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(184,168,138,0.12) 0%, transparent 60%);
}

/* ----------------------------------------------------------
   7. SECTIONS
---------------------------------------------------------- */
.section-pad { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }

.section-header { margin-bottom: 3.5rem; }
.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}
.section-eyebrow span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.section-title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.gold-line {
  width: 40px; height: 2px;
  background: var(--gold);
  margin-top: 1rem;
}

/* ----------------------------------------------------------
   8. INFO CARDS
---------------------------------------------------------- */
.info-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  border: 1px solid var(--border);
  transition: all var(--transition);
  height: 100%;
}
.info-card:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 32px rgba(184,168,138,0.12);
  transform: translateY(-3px);
}
.info-icon { font-size: 1.1rem; color: var(--gold); margin-top: 3px; flex-shrink: 0; }
.info-label {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); margin: 0 0 3px;
}
.info-value { font-size: 0.92rem; font-weight: 500; color: var(--text); margin: 0; }

/* ----------------------------------------------------------
   9. TIMELINE
---------------------------------------------------------- */
.timeline { position: relative; padding-left: 2.5rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 5px; top: 8px; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}
.timeline-item { position: relative; margin-bottom: 2.5rem; }
.timeline-dot {
  position: absolute;
  left: -2.2rem; top: 0.4rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--bg);
}
.timeline-content {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.timeline-content:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 32px rgba(184,168,138,0.10);
}
.timeline-date {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold);
}
.timeline-title { font-size: 1.35rem; font-weight: 700; color: var(--text); margin: 0.35rem 0 0.15rem; }
.timeline-company { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.8rem; }
.timeline-desc { font-size: 0.92rem; color: var(--text-muted); line-height: 1.75; margin-bottom: 1rem; }
.timeline-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.timeline-tags span {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.25rem 0.9rem;
  border-radius: 2px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
}
.timeline-tags span:hover { border-color: var(--gold); color: var(--gold); }

/* ----------------------------------------------------------
   10. SKILLS
---------------------------------------------------------- */
.skills-subtitle {
  display: block;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}
.skill-bar-wrap { display: flex; flex-direction: column; gap: 1.2rem; }
.skill-bar-item { display: flex; flex-direction: column; gap: 0.4rem; }
.skill-bar-header { display: flex; justify-content: space-between; }
.skill-bar-header span { font-size: 0.87rem; font-weight: 500; color: var(--text); }
.skill-bar-header span:last-child { color: var(--text-muted); font-size: 0.8rem; }
.skill-bar { height: 2px; background: var(--border); border-radius: 0; overflow: hidden; }
.skill-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--accent2));
  transition: width 1.4s cubic-bezier(.4,0,.2,1);
}

.soft-skills-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.75rem; }
.soft-skill {
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 0.5rem;
  text-align: center;
  font-size: 0.78rem; font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
  cursor: default;
}
.soft-skill i { font-size: 1.2rem; color: var(--accent2); }
.soft-skill:hover {
  border-color: var(--gold);
  color: var(--text);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(184,168,138,0.12);
}
.soft-skill:hover i { color: var(--gold); }

/* ----------------------------------------------------------
   11. FORMULARIO DE CONTACTO
---------------------------------------------------------- */
.cv-input {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 4px !important;
  color: var(--text) !important;
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  padding: 0.8rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.cv-input:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(184,168,138,0.12) !important;
  outline: none;
}
.cv-input::placeholder { color: var(--text-muted) !important; font-size: 0.88rem; }

.form-label {
  display: block;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.mb-4 { margin-bottom: 1.4rem; }

.invalid-feedback { display: none; color: #c0392b; font-size: 0.78rem; margin-top: 0.3rem; }
.cv-input.is-invalid { border-color: #c0392b !important; }
.cv-input.is-invalid + .invalid-feedback { display: block; }
.cv-input.is-valid { border-color: var(--gold) !important; }

.alert-success {
  background: rgba(184,168,138,0.1);
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 4px;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.d-none { display: none !important; }

/* ----------------------------------------------------------
   12. FOOTER
---------------------------------------------------------- */
.cv-footer {
  background: var(--text);
  padding: 2.5rem 0;
  text-align: center;
}
[data-theme="dark"] .cv-footer { background: #050505; }
.cv-footer p { color: #888; font-size: 0.82rem; margin: 0; }
.brand-footer {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem; font-weight: 700;
  color: #fff;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.brand-footer span { color: var(--gold); }
.footer-sub { margin-top: 0.4rem; font-size: 0.72rem !important; opacity: 0.4; }

/* ----------------------------------------------------------
   13. ANIMACIONES REVEAL
---------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }

/* ----------------------------------------------------------
   14. RESPONSIVE
---------------------------------------------------------- */
@media (max-width: 992px) {
  .hero-stats { gap: 1.5rem; }
  .stat-border { padding-left: 1.5rem; }
}

@media (max-width: 768px) {
  .hero-section { padding: 110px 0 60px; }
  .hero-name { font-size: 3.2rem; }
  .soft-skills-grid { grid-template-columns: repeat(2,1fr); }
  .section-pad { padding: 65px 0; }
  .avatar-frame { width: 220px; height: 220px; margin-top: 2rem; }
  .avatar-inner { font-size: 4rem; }
  .hero-stats { gap: 1rem; }
  .stat-border { padding-left: 1rem; }
}

@media (max-width: 480px) {
  .hero-name { font-size: 2.6rem; }
  .soft-skills-grid { grid-template-columns: repeat(2,1fr); }
  .hero-btns { flex-direction: column; }
  .btn-primary-cv, .btn-secondary-cv { text-align: center; }
}
