/* ============================================================
   Juan Cruz Segovia — Tarjeta de presentación
   ============================================================ */

:root {
  --bg: #FAF9F6;
  --bg-alt: #F1EFE9;
  --surface: #FFFFFF;
  --border: #E4E0D6;
  --text: #1C1B18;
  --text-muted: #5B584E;
  --accent: #0F6B5C;
  --accent-strong: #0B4F44;
  --accent-soft: #E4F1EE;
  --accent-2: #C4622B;
  --accent-2-soft: #FBE9DD;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(28,27,24,.04), 0 8px 24px -12px rgba(28,27,24,.12);
  --shadow-hover: 0 4px 8px rgba(28,27,24,.06), 0 16px 36px -14px rgba(28,27,24,.18);
  --maxw: 880px;
  --font-display: 'Outfit', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .5em;
  color: var(--text);
}

p { margin: 0 0 1em; color: var(--text-muted); }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

ul { margin: 0; padding-left: 1.2em; color: var(--text-muted); }
ul li { margin-bottom: .4em; }
ul li:last-child { margin-bottom: 0; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--accent);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  z-index: 100;
}
.skip-link:focus {
  left: 20px;
  top: 20px;
}

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

/* ---------------- Topbar ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 249, 246, .85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .02em;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .brand__name { display: none; }
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 6px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.lang-toggle__opt {
  padding: 4px 10px;
  border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}
.lang-toggle__opt.is-active {
  background: var(--accent);
  color: #fff;
}
.lang-toggle__sep { color: var(--border); }

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  padding: 64px 0 56px;
  background:
    radial-gradient(1200px 400px at 15% -10%, var(--accent-soft) 0%, transparent 60%),
    radial-gradient(800px 300px at 100% 0%, var(--accent-2-soft) 0%, transparent 55%);
}

.hero__inner { max-width: var(--maxw); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-strong);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.2rem);
  letter-spacing: -.02em;
  margin-bottom: .3em;
}

.hero__tagline {
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  color: var(--text);
  font-weight: 500;
  margin-bottom: .6em;
  max-width: 46ch;
}

.hero__location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.i {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.hero__location .i { fill: currentColor; stroke: none; width: 16px; height: 16px; }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease, border-color .15s ease;
  min-height: 44px;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(15,107,92,.5);
}
.btn--primary:hover {
  background: var(--accent-strong);
  box-shadow: 0 8px 20px -6px rgba(15,107,92,.6);
}

.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

/* ---------------- Sections ---------------- */

.section {
  padding: 56px 0;
}
.section--alt {
  background: var(--bg-alt);
}

.section__title {
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  margin-bottom: 28px;
  letter-spacing: -.01em;
}

.section__intro {
  max-width: 60ch;
  margin-top: -14px;
  margin-bottom: 28px;
  font-size: 1.02rem;
  color: var(--text-muted);
}

.about__body {
  max-width: 68ch;
}
.about__body p {
  font-size: 1.02rem;
  color: var(--text);
}

/* ---------------- Grid & cards ---------------- */

.grid {
  display: grid;
  gap: 18px;
}
.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}
.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 860px) {
  .grid--4, .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: box-shadow .18s ease, transform .18s ease;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.card__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 { font-size: 1.05rem; margin-bottom: .4em; }
.card p { font-size: .92rem; margin: 0; }

.card--edu { padding: 20px 22px; }
.card__date {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 8px;
}
.card__org { font-size: .9rem; color: var(--text-muted); margin: 0; }

/* ---------------- Stack chips ---------------- */

.stackgroup { margin-bottom: 22px; }
.stackgroup:last-child { margin-bottom: 0; }
.stackgroup h4 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: .87rem;
  font-weight: 500;
  color: var(--text);
}

/* ---------------- Timeline ---------------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline__item {
  position: relative;
  padding-left: 34px;
  margin-bottom: 36px;
}
.timeline__item:last-child { margin-bottom: 0; }

.timeline__dot {
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--accent);
}

.timeline__content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}

.timeline__date {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 6px;
}
.timeline__content h3 { font-size: 1.12rem; margin-bottom: 2px; }
.timeline__org {
  font-size: .92rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.timeline__content ul { font-size: .92rem; }

/* ---------------- CTA / contact ---------------- */

.section--cta {
  background: linear-gradient(160deg, var(--accent-strong), var(--accent) 65%);
  color: #fff;
  text-align: center;
}
.cta__inner { display: flex; flex-direction: column; align-items: center; }
.section--cta h2 { color: #fff; }
.section--cta p { color: rgba(255,255,255,.85); }
.cta__langs {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .03em;
  color: rgba(255,255,255,.75);
  margin-bottom: 18px;
}
.section--cta .hero__cta { justify-content: center; margin-top: 24px; }
.section--cta .btn--ghost {
  background: transparent;
  border-color: rgba(255,255,255,.4);
  color: #fff;
}
.section--cta .btn--ghost:hover {
  border-color: #fff;
  color: #fff;
}
.section--cta .btn--primary {
  background: #fff;
  color: var(--accent-strong);
  box-shadow: 0 6px 16px -6px rgba(0,0,0,.25);
}
.section--cta .btn--primary:hover {
  background: #fff;
  opacity: .92;
}

/* ---------------- Footer ---------------- */

.footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------------- Reveal animation ---------------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .card, .btn { transition: none; }
}

/* ---------------- Responsive tweaks ---------------- */

@media (max-width: 480px) {
  .hero { padding: 44px 0 40px; }
  .section { padding: 44px 0; }
  .btn { width: 100%; justify-content: center; }
  .hero__cta { flex-direction: column; }
  .section--cta .hero__cta { width: 100%; }
  .footer__inner { flex-direction: column; gap: 8px; text-align: center; align-items: center; }
}
