/* lopez-angulo personal hub — Apple-inspired light system */
:root {
  --ink: #1d1d1f;
  --ink-soft: #1d1d1f;
  --paper: #ffffff;
  --paper-deep: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --muted: #6e6e73;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.08);
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-highlight: rgba(255, 255, 255, 0.9);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 12px 40px rgba(0, 0, 0, 0.06);
  --shadow-lift: 0 4px 16px rgba(0, 0, 0, 0.06), 0 20px 48px rgba(0, 0, 0, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 980px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
  --max: 980px;
  --nav-h: 52px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --dur: 0.5s;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.47;
  font-size: 17px;
  letter-spacing: -0.011em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* —— Ambient: soft cool wash + liquid glass field —— */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 50% -20%, rgba(0, 113, 227, 0.06), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 40%, rgba(210, 220, 235, 0.35), transparent 50%),
    radial-gradient(ellipse 45% 35% at 0% 80%, rgba(235, 238, 245, 0.8), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #fbfbfd 45%, var(--paper-deep) 100%);
}

.liquid-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.7;
  mix-blend-mode: multiply;
}

.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(56px);
  opacity: 0.7;
  transition: transform 0.9s var(--ease);
}

.ambient-glow--a {
  width: min(52vw, 480px);
  height: min(52vw, 480px);
  top: -5%;
  left: 15%;
  background: radial-gradient(circle, rgba(0, 113, 227, 0.09), transparent 68%);
}

.ambient-glow--b {
  width: min(46vw, 400px);
  height: min(46vw, 400px);
  bottom: 5%;
  right: 8%;
  background: radial-gradient(circle, rgba(120, 140, 170, 0.1), transparent 68%);
}

body.has-pointer .ambient-glow--a {
  transform: translate(
    calc(var(--mx, 0.5) * 20px - 10px),
    calc(var(--my, 0.3) * 14px - 7px)
  );
}

body.has-pointer .ambient-glow--b {
  transform: translate(
    calc(var(--mx, 0.5) * -16px + 8px),
    calc(var(--my, 0.3) * -12px + 6px)
  );
}

/* —— Glass material (frosted white) —— */
.glass {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: var(--surface-strong);
  }
}

.glass--nav {
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  background: rgba(255, 255, 255, 0.72);
  border-bottom-color: rgba(0, 0, 0, 0.06);
  box-shadow: none;
}

.glass--hero {
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  background: rgba(255, 255, 255, 0.78);
}

.glass--card {
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  background: rgba(255, 255, 255, 0.8);
}

.glass--panel {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
}

.glass--pill {
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--line);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* —— Skip / focus —— */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.55rem 0.95rem;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: top 0.15s;
}

.skip-link:focus {
  top: 1rem;
}

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

/* —— Nav (Apple-like bar) —— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--nav-h);
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  max-width: 100%;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  margin-right: auto;
  opacity: 0.92;
}

.nav-brand:hover {
  opacity: 1;
  color: var(--accent);
}

.nav-links {
  display: none;
  gap: 1.75rem;
  align-items: center;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  opacity: 0.8;
  transition: opacity 0.2s, color 0.2s;
}

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

@media (min-width: 640px) {
  .nav-links {
    display: flex;
  }
}

.lang-toggle {
  flex-shrink: 0;
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s, background 0.2s;
  font-family: var(--font);
}

.lang-toggle:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.04);
}

/* —— Page —— */
.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem) 5rem;
  display: flex;
  flex-direction: column;
  gap: 4.5rem;
}

/* —— Product hero (apple.com-style centered) —— */
.hero-product {
  text-align: center;
  padding: clamp(2.5rem, 8vw, 5rem) 0.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--muted);
}

.hero-product h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 4.75rem);
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--ink);
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.hero-role {
  margin: 0 0 1.25rem;
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  font-weight: 400;
  color: var(--muted);
  letter-spacing: -0.02em;
}

.hero-tagline {
  margin: 0 auto 1.25rem;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--ink);
  max-width: 38rem;
  line-height: 1.47;
  letter-spacing: -0.016em;
  opacity: 0.9;
}

.hero-tagline--lg {
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  max-width: 42rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.hero-location {
  margin: 0 0 2rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.hero-location a {
  color: var(--accent);
  font-weight: 400;
  text-decoration: none;
}

.hero-location a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sep {
  margin: 0 0.35rem;
  opacity: 0.4;
}

.hero-portrait--inline {
  margin: 0 0 2rem;
}

.portrait-ring {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(145deg, #e8e8ed, #f5f5f7 45%, #d2d2d7);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  margin: 0 auto;
}

@media (min-width: 720px) {
  .portrait-ring {
    width: 180px;
    height: 180px;
  }
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid #fff;
}

.quick-access {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: center;
}

.quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.7rem 1.35rem;
  text-decoration: none;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: -0.016em;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition:
    transform 0.3s var(--ease),
    background 0.2s,
    color 0.2s,
    border-color 0.2s,
    box-shadow 0.3s;
}

.pill:hover {
  transform: scale(1.02);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  color: var(--accent);
}

.pill--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: none;
}

.pill--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

/* —— Sections —— */
.section-head {
  margin-bottom: 1.5rem;
  text-align: center;
}

.section-head--inline {
  margin-bottom: 1.15rem;
  text-align: left;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-lede {
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 34rem;
  line-height: 1.47;
  letter-spacing: -0.012em;
}

.section-head--inline .section-lede {
  margin: 0;
}

/* —— Projects: two clean tiles —— */
.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.project-list--duo {
  grid-template-columns: 1fr;
  gap: 1.15rem;
}

@media (min-width: 800px) {
  .project-list--duo {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
}

.project-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 1.5rem 1.6rem;
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.35s var(--ease),
    border-color 0.25s,
    box-shadow 0.35s var(--ease),
    background 0.25s;
}

.project-card--tile {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  min-height: 100%;
  padding: 2rem 1.75rem;
  background: var(--paper-deep);
  border: none;
  border-radius: 28px;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.project-card--tile:hover,
.project-card--tile:focus-visible {
  transform: scale(1.015);
  background: #ececef;
  box-shadow: none;
  border: none;
}

.project-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: #fff;
  border: none;
  box-shadow: none;
  flex-shrink: 0;
}

.project-body h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.project-value {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.4;
  letter-spacing: -0.014em;
}

.project-meta {
  margin: 0 0 1.15rem;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--muted);
  opacity: 0.85;
}

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.016em;
  margin-top: auto;
}

.cta-arrow {
  transition: transform 0.3s var(--ease);
  display: inline-block;
}

.project-card:hover .cta-arrow {
  transform: translateX(3px);
}

/* —— Focus grid —— */
.focus-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 800px) {
  .focus-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.15rem;
  }
}

.focus-card {
  background: var(--paper-deep);
  border-radius: 22px;
  padding: 1.65rem 1.5rem;
}

.focus-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.focus-card p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--muted);
  letter-spacing: -0.012em;
}

/* —— About —— */
.about {
  padding: 0;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.bio {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.55;
  max-width: 42rem;
  letter-spacing: -0.014em;
  opacity: 0.92;
}

.bio a {
  color: var(--accent);
  font-weight: 400;
  text-decoration: none;
}

.bio a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tags span {
  font-size: 0.8rem;
  font-weight: 400;
  padding: 0.4rem 0.85rem;
  background: var(--paper-deep);
  border: none;
  border-radius: var(--radius-pill);
  color: var(--muted);
  letter-spacing: -0.01em;
}

/* —— Footer —— */
.site-footer {
  text-align: center;
  padding: 0.5rem 0 2rem;
}

.footer-row {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
}

.footer-row a {
  color: var(--muted);
  font-weight: 400;
  text-decoration: none;
}

.footer-row a:hover {
  color: var(--accent);
}

.footer-note {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.75;
}

/* —— Reveal motion —— */
.reveal {
  animation: reveal-in var(--dur) var(--ease) both;
}

.reveal-delay-1 { animation-delay: 0.06s; }
.reveal-delay-2 { animation-delay: 0.12s; }
.reveal-delay-3 { animation-delay: 0.18s; }

@keyframes reveal-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .pill:hover,
  .project-card:hover,
  .project-card:focus-visible {
    transform: none;
  }

  .ambient-glow {
    transition: none;
  }

  .liquid-field {
    display: none;
  }

  body.has-pointer .ambient-glow--a,
  body.has-pointer .ambient-glow--b {
    transform: none;
  }
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.28s;
  animation-timing-function: var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}
