/* jhonprieto.com — minimal portfolio. No external fonts or trackers. */

:root {
  --bg: #f7f7f4;
  --bg-soft: #efefea;
  --surface: #ffffff;
  --text: #15171c;
  --muted: #5d6270;
  --line: #e2e2dc;
  --accent: #3355d6;
  --accent-2: #0f9f8f;
  --accent-soft: rgba(51, 85, 214, .09);
  --glow-a: rgba(51, 85, 214, .18);
  --glow-b: rgba(15, 159, 143, .14);
  --shadow: 0 1px 2px rgba(20, 22, 28, .04), 0 8px 24px rgba(20, 22, 28, .06);
  --aws: #c76a00;
  --ali: #e2541b;
  --az: #1f6fd1;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0b0d12;
  --bg-soft: #11141b;
  --surface: #141821;
  --text: #ecedf1;
  --muted: #9aa0ae;
  --line: #232835;
  --accent: #7d95ff;
  --accent-2: #3fd4c2;
  --accent-soft: rgba(125, 149, 255, .12);
  --glow-a: rgba(125, 149, 255, .22);
  --glow-b: rgba(63, 212, 194, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  --aws: #ffad4a;
  --ali: #ff8a5c;
  --az: #6aaeff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.12rem; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.fill { fill: currentColor; stroke: none; }
.muted { color: var(--muted); }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 50;
  background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand__logo { width: auto; height: 30px; fill: currentColor; stroke: none; transition: transform .35s ease; }
.brand:hover .brand__logo { transform: rotate(-6deg) scale(1.06); }
.brand__name { font-size: .82rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.nav__links { display: flex; gap: 22px; margin-left: auto; font-size: .92rem; }
.nav__links a { text-decoration: none; color: var(--muted); transition: color .15s ease; }
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__tools { display: flex; gap: 8px; }
.chip {
  display: inline-grid; place-items: center; min-width: 38px; height: 34px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text);
  font: 600 .78rem/1 inherit; letter-spacing: .04em; cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.chip:hover { border-color: var(--muted); }
.chip:active { transform: scale(.96); }
.chip--icon { padding: 0; width: 34px; min-width: 34px; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
:root[data-theme="dark"] .i-sun { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(72px, 14vh, 140px) 0 clamp(64px, 10vh, 110px); }
.hero__glow {
  position: absolute; inset: -30% -10% auto; height: 120%; pointer-events: none; z-index: -1;
  background:
    radial-gradient(40% 50% at 20% 30%, var(--glow-a), transparent 70%),
    radial-gradient(35% 45% at 80% 20%, var(--glow-b), transparent 70%);
  filter: blur(10px);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(3%, 4%, 0) scale(1.05); } }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero__text { min-width: 0; }
.hero__photo { order: 2; margin: 0; position: relative; justify-self: end; width: min(100%, 440px); }
.hero__photo::before {
  content: ""; position: absolute; inset: -14px -14px 14px 14px; border-radius: 34px; z-index: -1;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); opacity: .22;
}
.hero__photo img {
  display: block; width: 100%; height: auto; border-radius: 30px; border: 1px solid var(--line);
  box-shadow: var(--shadow); object-fit: cover;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: .85rem; color: var(--muted);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 22%, transparent); }
.hero__title { font-size: clamp(3rem, 9vw, 6.2rem); letter-spacing: -0.045em; margin-top: 22px; font-weight: 750; }
.hero__tagline {
  margin-top: 10px; font-size: clamp(1.15rem, 2.4vw, 1.55rem); font-weight: 600;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__tagline .sep { opacity: .55; }
.hero__lead { margin-top: 22px; max-width: 640px; color: var(--muted); font-size: 1.08rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text);
  font-weight: 600; font-size: .95rem; text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--muted); box-shadow: var(--shadow); }
.btn--primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn--primary:hover { border-color: var(--text); }
.hero__facts { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 52px; color: var(--muted); font-size: .92rem; }
.hero__facts strong { color: var(--text); font-size: 1.05rem; margin-right: 4px; }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 10vh, 104px) 0; border-top: 1px solid var(--line); }
.kicker { font: 600 .8rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--accent); letter-spacing: .08em; margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px 64px; }
.prose p + p { margin-top: 16px; }
.prose p { color: var(--muted); }
.prose p:first-child { color: var(--text); font-size: 1.12rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.tags li {
  padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-size: .84rem; font-weight: 600;
}
.skills { display: grid; gap: 14px; margin-top: 32px; padding-top: 28px; border-top: 1px dashed var(--line); }
.skills > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.skills dt { font: 600 .78rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.skills dd { margin: 0; }
.skills .tags { margin-top: 0; }
.tags--sm { margin-top: 18px; gap: 6px; }
.tags--sm li { font-size: .76rem; padding: 3px 10px; background: var(--bg-soft); color: var(--muted); }

/* timeline */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.timeline li { position: relative; padding-bottom: 34px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -26px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.timeline li:first-child::before { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.subhead { margin: 44px 0 18px; font: 600 .8rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--accent-2); letter-spacing: .08em; text-transform: uppercase; }
.timeline--edu li::before { border-color: var(--accent-2); }
.timeline--edu li:first-child::before { background: var(--accent-2); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-2) 16%, transparent); }
.timeline__when { font: 600 .78rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted); letter-spacing: .03em; margin-bottom: 6px; text-transform: uppercase; }
.timeline h3 + p { margin-top: 6px; color: var(--muted); }

/* project cards */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 36px; }
.card {
  display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--surface); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card--feature { grid-column: span 2; border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.card__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.card__icon svg { width: 22px; height: 22px; }
.card__link { font-size: .86rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.card__link:hover { text-decoration: underline; }
.card h3 + p { margin-top: 8px; color: var(--muted); font-size: .95rem; }
.card .tags--sm { margin-top: auto; padding-top: 18px; }
.card__note { margin-top: 10px; font-size: .8rem; color: var(--muted); }

/* certifications */
.certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 36px; }
.cert {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 22px 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  transition: transform .2s ease, box-shadow .2s ease;
}
.cert:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cert__img { width: auto; height: 104px; margin-bottom: 12px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .12)); }
.cert__img--square { height: 88px; margin: 8px 0 20px; border-radius: 14px; }
.cert__name { font-weight: 650; font-size: .92rem; line-height: 1.3; }
.cert__org { font: 600 .74rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted); }
.cert--next { border-style: dashed; background: transparent; }
.cert--next .cert__img { opacity: .55; filter: grayscale(.35); }
.cert--next .cert__org span { color: var(--accent); }

/* contact */
.contact { text-align: center; }
.contact__inner { display: flex; flex-direction: column; align-items: center; }
.contact h2 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
.contact__lead { margin-top: 14px; color: var(--muted); max-width: 520px; }
.contact .hero__actions { justify-content: center; }

.footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: .86rem; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* reveal: every time an element scrolls into view (only when JS runs and motion is welcome) */
.js .reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--delay, 0s);
}
.js .reveal--zoom { transform: translateY(18px) scale(.96); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .cards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .card--feature { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero__photo { order: 0; justify-self: start; width: min(88%, 360px); }
}
@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__tools { margin-left: auto; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card--feature { grid-column: auto; }
  .certs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cert__img { height: 84px; }
  .cert__img--square { height: 72px; margin: 6px 0 18px; }
  .skills > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  body { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__glow { animation: none; }
  .js .reveal, .js .reveal--zoom { opacity: 1; transform: none; transition: none; }
  .brand__logo { transition: none; }
  .btn, .card, .chip, .cert { transition: none; }
}
