:root {
  --ink: #10233a;
  --ink-soft: #3d536b;
  --muted: #6b7c8f;
  --paper: #ffffff;
  --wash: #f4f7fa;
  --line: #dfe6ee;
  --accent: #0f766e;
  --accent-dark: #0b5b55;
  --accent-soft: #e2f3f0;
  --radius: 14px;
  --shadow: 0 12px 30px rgba(16, 35, 58, 0.07);
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1rem; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  z-index: 100;
  background: var(--ink);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 6px;
}
.skip-link:focus { left: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }

.brand { font-weight: 800; font-size: 1.4rem; letter-spacing: -0.04em; color: var(--ink); text-decoration: none; }
.brand-dot { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a { color: var(--ink-soft); font-size: 0.95rem; font-weight: 600; text-decoration: none; }
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  padding: 10px;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }

.hero { background: linear-gradient(135deg, #10233a 0%, #163a52 60%, #0f514f 100%); color: #f7fbfd; padding: clamp(4rem, 10vw, 7rem) 0; }
.hero-compact { padding: clamp(3rem, 7vw, 5rem) 0; }
.hero h1 { margin-bottom: 0.2em; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }

.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.76rem; font-weight: 700; color: var(--accent); margin-bottom: 0.9rem; }
.hero .eyebrow { color: #8fe0d2; }
.hero-role { font-size: clamp(1.15rem, 2.5vw, 1.5rem); font-weight: 600; color: #bfe9e2; margin-bottom: 1.2rem; }
.hero-lead { max-width: 62ch; color: #d5e3ea; font-size: 1.02rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.8rem 0 1.5rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.72rem 1.3rem; border-radius: 8px; font-weight: 700; font-size: 0.95rem; text-decoration: none; transition: transform 0.15s ease, background 0.15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: #14a096; color: white; }
.btn-outline { border: 1px solid rgba(255, 255, 255, 0.45); color: white; }
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); color: white; }

.social { list-style: none; display: flex; flex-wrap: wrap; gap: 1.4rem; padding: 0; margin: 0; }
.social a { color: #cfe6e2; font-size: 0.92rem; }

.hero-card { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: var(--radius); padding: 1.6rem; }
.hero-card dl { margin: 0; }
.hero-card div { padding: 0.85rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.hero-card div:last-child { border-bottom: 0; padding-bottom: 0; }
.hero-card div:first-child { padding-top: 0; }
.hero-card dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: #8fe0d2; font-weight: 700; }
.hero-card dd { margin: 0.25rem 0 0; font-size: 0.96rem; color: #eaf3f5; }

.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--wash); }
.section-head { margin-bottom: 2rem; }
.section-head h2 { margin-bottom: 0; }

.timeline { display: grid; gap: 1.4rem; }
.job, .card, .project { background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.job { padding: clamp(1.4rem, 4vw, 2rem); border-left: 4px solid var(--accent); }
.job-head { margin-bottom: 1rem; }
.job-head h3 { font-size: 1.35rem; margin-bottom: 0.3rem; }
.job-company { font-weight: 700; color: var(--ink); margin-bottom: 0.15rem; }
.job-company span { font-weight: 400; color: var(--muted); }
.job-period { color: var(--accent); font-size: 0.9rem; font-weight: 700; margin: 0; }
.job ul { margin: 0; padding-left: 1.2rem; color: var(--ink-soft); }
.job li + li { margin-top: 0.55rem; }

.edu-grid, .skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; }
.card, .skill-group { padding: 1.5rem; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.card h3, .skill-group h3 { margin-bottom: 0.4rem; }
.card-sub { color: var(--ink-soft); margin-bottom: 0.4rem; }
.card-meta { color: var(--accent); font-size: 0.9rem; font-weight: 600; margin: 0; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0; }
.tags li { background: var(--accent-soft); color: var(--accent-dark); border-radius: 999px; padding: 0.3rem 0.75rem; font-size: 0.82rem; font-weight: 600; }

.contact-inner { max-width: 720px; }
.contact-lead { color: var(--ink-soft); font-size: 1.05rem; }
.contact-list { list-style: none; margin: 1.6rem 0; padding: 0; border-top: 1px solid var(--line); }
.contact-list li { display: grid; grid-template-columns: 130px 1fr; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.contact-list li > span:first-child { color: var(--muted); font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.idiomas { color: var(--ink-soft); font-size: 0.95rem; }

.site-footer { border-top: 1px solid var(--line); padding: 1.6rem 0; color: var(--muted); font-size: 0.9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; }
.footer-inner p { margin: 0; }
.footer-inner a { color: var(--ink-soft); }

.filters { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-bottom: 2rem; }
.filter { border: 1px solid var(--line); background: white; color: var(--ink-soft); border-radius: 999px; padding: 0.5rem 1rem; font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; }
.filter:hover { border-color: var(--accent); color: var(--accent); }
.filter.is-active { background: var(--accent); border-color: var(--accent); color: white; }

.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.3rem; }
.project { padding: 1.6rem; display: flex; flex-direction: column; }
.project[hidden] { display: none; }
.project-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.9rem; }
.project-kind { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 800; color: var(--accent); }
.project-scope { font-size: 0.75rem; color: var(--muted); }
.project h2 { font-size: 1.2rem; }
.project p { color: var(--ink-soft); font-size: 0.95rem; }
.project .tags { margin-top: auto; padding-top: 0.6rem; }
.project-link { margin-top: 1rem; font-size: 0.9rem; font-weight: 700; }
.projects-note { color: var(--muted); text-align: center; padding: 2rem 0; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: white; border-bottom: 1px solid var(--line); padding: 0.5rem 1.25rem 1rem; }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .hero-inner { grid-template-columns: 1fr; }
  .contact-list li { grid-template-columns: 1fr; gap: 0.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
