/* =========================================================
   Wilson Ríos V. — Sitio personal
   Tokens: Navy #10192E / #1B2A4A · Gold #B08D57 · Bone #F4F1EC
   Display: Georgia (serif editorial) · Body: system sans · Utility: monospace caps
   ========================================================= */

:root {
  --navy-dark: #10192e;
  --navy: #1b2a4a;
  --navy-soft: #243759;
  --gold: #b08d57;
  --gold-light: #d8c9a3;
  --bone: #f4f1ec;
  --bone-dim: #e9e4d8;
  --slate: #3d4759;
  --slate-light: #6b7280;
  --white: #ffffff;
  --rule: #d9d2c4;

  --font-display: Georgia, "Cambria", "Times New Roman", serif;
  --font-body: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-utility: "Courier New", Courier, monospace;

  --max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--slate);
  background: var(--bone);
  line-height: 1.65;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--navy); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

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

.eyebrow {
  font-family: var(--font-utility);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0;
  font-weight: 700;
}

section { padding: 96px 0; }
section.tight { padding: 72px 0; }

/* ============ SKIP LINK ============ */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: var(--navy-dark);
  padding: 10px 16px;
  z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ============ HEADER / NAV ============ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  background: rgba(16, 25, 46, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(176, 141, 87, 0.25);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.brand strong { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  color: var(--bone);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.25s ease;
}
.nav-links a:hover { color: var(--gold-light); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--gold);
  color: var(--gold);
  width: 40px; height: 40px;
  border-radius: 4px;
  font-size: 1.1rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    top: 72px; right: 0;
    background: var(--navy-dark);
    flex-direction: column;
    width: 240px;
    padding: 24px;
    gap: 18px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    height: calc(100vh - 72px);
    border-left: 1px solid rgba(176,141,87,0.25);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

/* ============ HERO ============ */
.hero {
  background: radial-gradient(circle at 18% 20%, var(--navy-soft) 0%, var(--navy-dark) 62%);
  color: var(--bone);
  padding: 168px 0 110px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(176,141,87,0.06) 0 1px, transparent 1px 120px);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-portrait { order: -1; max-width: 260px; margin: 0 auto; }
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
  margin-bottom: 18px;
}
.hero h1 em {
  font-style: normal;
  color: var(--gold);
}
.hero-role {
  font-size: 1.18rem;
  color: var(--gold-light);
  margin-bottom: 24px;
  font-family: var(--font-display);
  font-style: italic;
}
.hero-desc {
  color: #c9c9d4;
  max-width: 540px;
  margin-bottom: 36px;
  font-size: 1.02rem;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 44px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}
.btn-gold { background: var(--gold); color: var(--navy-dark); font-weight: 600; }
.btn-gold:hover { background: var(--gold-light); color: var(--navy-dark); }
.btn-ghost { border-color: rgba(244,241,236,0.4); color: var(--bone); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-light); }

.hero-badges {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(176,141,87,0.25);
  padding-top: 28px;
}
.hero-badge .num {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.7rem;
  font-weight: 700;
  display: block;
}
.hero-badge .label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a9adc1;
}

.hero-portrait {
  position: relative;
  justify-self: center;
}
.hero-portrait .frame {
  position: relative;
  width: 280px;
  border: 1px solid var(--gold);
  padding: 14px;
}
.hero-portrait img {
  width: 100%;
  filter: grayscale(15%) contrast(1.05);
}
.hero-portrait .plate {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--navy-dark);
  padding: 8px 22px;
  font-family: var(--font-utility);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ============ SECTION HEAD ============ */
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 16px; }
.section-head p { color: var(--slate-light); font-size: 1.02rem; }
.on-dark .section-head h2 { color: var(--white); }
.on-dark .section-head p { color: #b7bbcf; }

/* ============ ABOUT ============ */
.about { background: var(--white); }
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

.about-photo img {
  border: 1px solid var(--rule);
  filter: grayscale(8%);
}
.about-card {
  background: var(--bone);
  border-left: 3px solid var(--gold);
  padding: 22px 24px;
  margin-top: 22px;
  font-size: 0.92rem;
}
.about-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; }
.about-card dt { color: var(--slate-light); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.about-card dd { margin: 0; color: var(--navy); font-weight: 600; }

.about-text p { margin: 0 0 18px; color: var(--slate); }
.about-text p:last-child { margin-bottom: 0; }

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 36px;
}
@media (max-width: 700px) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  border-top: 2px solid var(--gold);
  padding-top: 14px;
}
.pillar h4 { font-size: 1.02rem; margin-bottom: 8px; }
.pillar p { font-size: 0.88rem; color: var(--slate-light); margin: 0; }

/* ============ COMPETENCIAS ============ */
.skills { background: var(--bone-dim); }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
@media (max-width: 980px) { .skills-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .skills-grid { grid-template-columns: 1fr; } }

.skill-card {
  background: var(--white);
  padding: 28px 24px;
}
.skill-card .tag {
  font-family: var(--font-utility);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}
.skill-card h4 { font-size: 1.05rem; margin-bottom: 14px; }
.skill-card ul { margin: 0; padding: 0; list-style: none; }
.skill-card li {
  font-size: 0.88rem;
  color: var(--slate);
  padding: 6px 0;
  border-top: 1px solid var(--bone-dim);
}
.skill-card li:first-child { border-top: none; }

/* ============ EXPERIENCIA (timeline) ============ */
.experience { background: var(--navy-dark); color: var(--bone); }
.timeline { position: relative; margin-top: 10px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(to bottom, var(--gold), rgba(176,141,87,0.15));
}
.timeline-item {
  position: relative;
  padding-left: 50px;
  margin-bottom: 44px;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--navy-dark);
  border: 2px solid var(--gold);
}
.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}
.timeline-head h3 { color: var(--white); font-size: 1.18rem; }
.timeline-date {
  font-family: var(--font-utility);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  white-space: nowrap;
}
.timeline-org {
  font-style: italic;
  color: var(--gold-light);
  font-size: 0.92rem;
  margin-bottom: 12px;
  display: block;
}
.timeline-item ul { margin: 0; padding-left: 18px; color: #c2c5d6; font-size: 0.93rem; }
.timeline-item li { margin-bottom: 6px; }
.timeline-item li::marker { color: var(--gold); }

/* ============ PROYECTOS ============ */
.projects { background: var(--bone); }
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 980px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .project-grid { grid-template-columns: 1fr; } }

.project-card {
  background: var(--white);
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.project-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(16,25,46,0.1); }
.project-thumb {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--white);
  letter-spacing: 0.02em;
}
.project-thumb.t1 { background: linear-gradient(135deg, #1b2a4a, #3d4759); }
.project-thumb.t2 { background: linear-gradient(135deg, #b08d57, #8a6b3a); }
.project-thumb.t3 { background: linear-gradient(135deg, #243759, #b08d57); }
.project-thumb.t4 { background: linear-gradient(135deg, #3d4759, #1b2a4a); }
.project-thumb.t5 { background: linear-gradient(135deg, #8a6b3a, #1b2a4a); }
.project-thumb.t6 { background: linear-gradient(135deg, #1b2a4a, #b08d57); }

.project-body { padding: 22px 24px; flex: 1; display: flex; flex-direction: column; }
.project-body .tag {
  font-family: var(--font-utility);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.project-body h4 { font-size: 1.05rem; margin-bottom: 10px; }
.project-body p { font-size: 0.88rem; color: var(--slate-light); margin: 0; flex: 1; }

/* ============ EDUCACION / IDIOMAS ============ */
.education { background: var(--bone-dim); }
.edu-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 56px; }
@media (max-width: 860px) { .edu-grid { grid-template-columns: 1fr; } }

.edu-item {
  border-bottom: 1px solid var(--rule);
  padding: 18px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}
.edu-item:first-child { padding-top: 0; }
.edu-item h4 { font-size: 1rem; margin-bottom: 4px; }
.edu-item span { color: var(--slate-light); font-size: 0.88rem; }

.lang-box {
  background: var(--white);
  border: 1px solid var(--rule);
  padding: 26px;
}
.lang-box h3 { font-size: 1.1rem; margin-bottom: 18px; }
.lang-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.92rem; }
.lang-row:last-child { margin-bottom: 0; }
.lang-row .lvl { color: var(--gold); font-weight: 600; }

/* ============ MARCA PERSONAL ============ */
.brand-section {
  background: var(--navy);
  color: var(--bone);
}
.brand-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) { .brand-grid { grid-template-columns: 1fr; } }
.brand-grid h2 { color: var(--white); font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 16px; }
.brand-grid .lead { color: var(--gold-light); font-style: italic; font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 18px; }
.brand-list { list-style: none; margin: 0; padding: 0; }
.brand-list li {
  padding: 14px 0;
  border-top: 1px solid rgba(176,141,87,0.25);
  font-size: 0.95rem;
  color: #c9c9d4;
}
.brand-list li:first-child { border-top: none; }
.brand-list strong { color: var(--white); }

/* ============ CONTACTO ============ */
.contact { background: var(--white); }
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-list { list-style: none; margin: 28px 0 0; padding: 0; }
.contact-list li {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
}
.contact-list li:first-child { border-top: none; }
.contact-list .ico {
  color: var(--gold);
  font-weight: 700;
  width: 22px;
  flex-shrink: 0;
}
.contact-list a { color: var(--navy); }
.contact-list a:hover { color: var(--gold); }

.form-card {
  background: var(--bone);
  border: 1px solid var(--rule);
  padding: 34px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-card label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-light);
  margin-bottom: 6px;
}
.form-card input, .form-card textarea {
  width: 100%;
  border: 1px solid var(--rule);
  background: var(--white);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--slate);
  border-radius: 2px;
}
.form-card input:focus, .form-card textarea:focus {
  border-color: var(--gold);
  outline: none;
}
.form-field { margin-bottom: 16px; }
.form-note { font-size: 0.8rem; color: var(--slate-light); margin-top: 14px; }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--navy-dark);
  color: #9a9eb3;
  padding: 40px 0;
  text-align: center;
  font-size: 0.85rem;
}
.site-footer .f-name { color: var(--gold-light); font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 10px; }
.site-footer .f-social { display: flex; gap: 20px; justify-content: center; margin: 16px 0; }
.site-footer .f-social a { color: var(--bone); font-size: 1.1rem; }
.site-footer .f-social a:hover { color: var(--gold); }

/* ============ BACK TO TOP ============ */
.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 400;
}
.back-top.visible { opacity: 1; pointer-events: auto; }
.back-top:hover { transform: translateY(-3px); }

/* ============ REVEAL ON SCROLL ============ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
