/* ==========================================================================
   Carlos Ignacio Navarro — shared styles
   --------------------------------------------------------------------------
   Design tokens, base typography, nav, section headers, buttons, pills, footer.
   Loaded by every page on the site. Page-specific layout stays in that page's
   own <style> block, which is loaded AFTER this file and therefore wins any
   collision.
   ========================================================================== */

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

/* ── TOKENS ── */
:root {
  --bg-primary: #EEF3FA;
  --bg-secondary: #DDE7F5;
  --border-mid: #C8D8EE;
  --text-primary: #0D2144;
  --text-secondary: #4A5F7A;
  --accent: #3575C6;
  --accent-light: #5A8FD6;
  --accent-dark: #1E4A8A;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(238, 243, 250, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(53, 117, 198, 0.15);
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-dark);
  letter-spacing: 0.04em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--accent-dark); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: 0.3s;
}

/* ── LAYOUT ── */
section { padding: 100px 0; }
section:first-of-type { padding-top: 0; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── SECTION HEADERS ── */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.section-divider {
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin-bottom: 2.5rem;
  border-radius: 2px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: #0D2144;
  color: #EEF3FA;
  border: 2px solid #0D2144;
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn-outline {
  background: transparent;
  color: #0D2144;
  border: 2px solid rgba(13, 33, 68, 0.3);
}

.btn-outline:hover {
  border-color: #3575C6;
  color: #1E4A8A;
}

/* ── PILLS ──
   Two variants of the same primitive: .hero-tag is the rounded capsule used
   in the hero and for credibility chips; .skill-pill is the squared-off
   version used in dense grids. Both are shared across pages. */
.hero-tag {
  padding: 0.3rem 0.85rem;
  border: 1px solid rgba(53, 117, 198, 0.25);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(53, 117, 198, 0.07);
  color: #1E4A8A;
  letter-spacing: 0.04em;
}

.skill-pill {
  background: rgba(53, 117, 198, 0.07);
  border: 1px solid rgba(53, 117, 198, 0.25);
  border-radius: 4px;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  color: #1E4A8A;
  font-weight: 500;
}

/* ── FOOTER ──
   Solid --text-secondary rather than a 60% tint: the tint measured 2.44:1
   against the footer background, well under the 4.5:1 minimum. Solid is
   5.2:1 and passes. */
footer {
  background: #DDE7F5;
  border-top: 1px solid rgba(53, 117, 198, 0.15);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

/* ── RESPONSIVE ──
   Nav collapses at 820px, not 700px: six uppercase links plus the logo
   measure roughly 700px, so between 700 and 820 they were crushing into
   the logo. */
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 60px; left: 0; right: 0;
    background: #EEF3FA;
    border-bottom: 1px solid rgba(53, 117, 198, 0.15);
    padding: 1.5rem 2rem 2rem;
    gap: 1.25rem;
  }
  .nav-toggle { display: flex; }
}

@media (max-width: 700px) {
  section { padding: 72px 0; }
}
