:root {
  --bg: #090d16;
  --text: #f5f7fb;
  --muted: #a9b4c8;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #72e6c8;
  --accent-strong: #4ec4ff;
  --accent-warm: #f0c66c;
  --shadow-lg: 0 28px 90px rgba(0, 0, 0, 0.38);
  --shadow-md: 0 18px 40px rgba(0, 0, 0, 0.28);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --content-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(78, 196, 255, 0.16), transparent 22%),
    radial-gradient(circle at 80% 12%, rgba(114, 230, 200, 0.12), transparent 20%),
    linear-gradient(180deg, #060810 0%, #0a0f18 45%, #08111a 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 88%);
}

.orb {
  position: fixed;
  z-index: 0;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.22;
  pointer-events: none;
}

.orb-left {
  top: 120px;
  left: -80px;
  background: #1273ea;
}

.orb-right {
  top: 260px;
  right: -80px;
  background: #3ccf91;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Sora", sans-serif;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

code {
  font-family: inherit;
  color: var(--text);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 36px), var(--content-width));
  margin: 0 auto;
  padding-bottom: 88px;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(9, 13, 22, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-md);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #05111d;
  font-family: "Sora", sans-serif;
  font-weight: 800;
}

.brand-text {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-nav a,
.header-cta {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.header-cta:hover,
.header-cta:focus-visible {
  color: var(--text);
}

.header-cta {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: transparent;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 6px auto;
  background: var(--text);
}

.section {
  padding-top: 88px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.88fr);
  gap: 28px;
  align-items: start;
  padding-top: 54px;
}

.hero-main,
.hero-side,
.proof-strip,
.content-card,
.project-card,
.signal-card,
.stat-card {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.7s ease forwards;
}

.hero-side {
  animation-delay: 0.12s;
}

.proof-strip {
  animation-delay: 0.18s;
}

.hero-badges,
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill,
.role-chip,
.role-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.pill-accent {
  border-color: rgba(114, 230, 200, 0.32);
  background: rgba(114, 230, 200, 0.12);
  color: var(--accent);
}

.eyebrow {
  margin: 22px 0 16px;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.8rem);
}

.hero-summary {
  max-width: 66ch;
  margin-top: 22px;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button,
.toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.button:hover,
.button:focus-visible,
.toggle-button:hover,
.toggle-button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #06131d;
  box-shadow: 0 18px 34px rgba(78, 196, 255, 0.2);
}

.button-secondary,
.toggle-button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.keyword-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.keyword-bar span {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.signal-card,
.stat-card,
.content-card,
.project-card,
.proof-strip article {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 20, 34, 0.96), rgba(10, 14, 24, 0.92));
  box-shadow: var(--shadow-lg);
}

.signal-card,
.content-card,
.project-card {
  border-radius: var(--radius-xl);
}

.signal-card {
  padding: 28px;
}

.signal-title,
.pane-label,
.stack-label,
.proof-label {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-card h2 {
  margin-top: 12px;
  font-size: 1.7rem;
}

.signal-card p:last-child {
  margin-top: 16px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.stat-card {
  padding: 24px;
  border-radius: var(--radius-lg);
}

.stat-card.wide {
  grid-column: 1 / -1;
}

.stat-value {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-warm);
  font-family: "Sora", sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
}

.stat-label {
  color: var(--muted);
  line-height: 1.6;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.proof-strip article {
  padding: 22px;
  border-radius: var(--radius-lg);
}

.proof-strip strong {
  display: block;
  margin-top: 12px;
  font-size: 1rem;
  line-height: 1.55;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 30px;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 2.6vw, 2.6rem);
}

.about-layout,
.contact-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
}

.content-card {
  padding: 32px;
}

.content-card p + p {
  margin-top: 18px;
}

.narrative-card {
  background:
    radial-gradient(circle at 100% 0, rgba(78, 196, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(15, 20, 34, 0.98), rgba(10, 14, 24, 0.94));
}

.checkpoint-card {
  background:
    radial-gradient(circle at 0 100%, rgba(114, 230, 200, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(15, 20, 34, 0.98), rgba(10, 14, 24, 0.94));
}

.checkpoint-card h3,
.recruiter-card h3 {
  margin-bottom: 18px;
  font-size: 1.35rem;
}

.highlight-list,
.detail-list {
  display: grid;
  gap: 14px;
}

.highlight-list li,
.detail-list li {
  position: relative;
  padding-left: 19px;
  color: var(--muted);
  line-height: 1.68;
}

.highlight-list li::before,
.detail-list li::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
}

.timeline {
  display: grid;
  gap: 22px;
}

.timeline-item {
  position: relative;
  overflow: hidden;
}

.timeline-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent-strong), rgba(114, 230, 200, 0));
}

.timeline-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.timeline-top h3,
.project-card h3,
.stack-grid h3 {
  font-size: 1.4rem;
}

.timeline-period {
  white-space: nowrap;
  color: var(--accent);
  font-weight: 800;
}

.timeline-summary {
  margin-bottom: 18px;
  color: var(--text);
  font-weight: 600;
}

.projects-layout {
  display: grid;
  gap: 22px;
}

.featured-project {
  padding: 28px;
}

.project-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.project-tag {
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.role-chip,
.role-badge {
  color: var(--text);
}

.project-head h3 {
  margin-top: 14px;
}

.project-summary {
  max-width: 72ch;
  margin-top: 14px;
}

.project-visual {
  margin-top: 24px;
}

.main-shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
}

.main-shot img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(78, 196, 255, 0.18), rgba(114, 230, 200, 0.08));
}

.featured-project:first-of-type .main-shot img {
  object-fit: contain;
  padding: 22px;
  background: linear-gradient(135deg, rgba(78, 196, 255, 0.12), rgba(78, 196, 255, 0.02));
}

.main-shot figcaption,
.project-thumbs figcaption {
  padding: 12px 14px 14px;
  color: var(--muted);
  font-size: 0.88rem;
}

.project-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.project-thumbs figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.project-thumbs img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(78, 196, 255, 0.12), rgba(114, 230, 200, 0.08));
}

.visual-wide .project-thumbs img {
  aspect-ratio: 16 / 10;
}

.project-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.project-pane {
  min-height: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
}

.project-pane p:last-child {
  margin-top: 12px;
}

.stack-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.stack-columns > div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.stack-columns p {
  margin-top: 10px;
}

.project-grid,
.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.compact-card {
  padding: 26px;
}

.compact-copy {
  margin-top: 16px;
}

.mini-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.mini-block strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
}

.mini-block p {
  margin-top: 10px;
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.tag-group span {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.contact-grid a,
.contact-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 64px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  font-weight: 700;
}

.contact-grid a:hover,
.contact-grid a:focus-visible {
  border-color: rgba(78, 196, 255, 0.35);
}

.recruiter-card {
  background:
    radial-gradient(circle at top right, rgba(240, 198, 108, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(15, 20, 34, 0.98), rgba(10, 14, 24, 0.94));
}

.collapsible[hidden] {
  display: none;
}

.image-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 220px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(78, 196, 255, 0.08), rgba(114, 230, 200, 0.04)),
    rgba(255, 255, 255, 0.025);
}

.image-frame.is-missing img {
  display: none;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1160px) {
  .project-grid,
  .stack-grid,
  .project-body,
  .stack-columns {
    grid-template-columns: 1fr 1fr;
  }

  .project-body > :last-child,
  .stack-columns > :last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .hero,
  .about-layout,
  .contact-layout,
  .proof-strip,
  .project-grid,
  .stack-grid,
  .project-body,
  .stack-columns,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 100%;
  }

  .timeline-top,
  .project-head {
    flex-direction: column;
  }

  .timeline-period {
    white-space: normal;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--content-width));
  }

  .site-header {
    border-radius: 28px;
    align-items: start;
  }

  .header-cta {
    display: none;
  }

  .menu-toggle {
    display: inline-block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(8, 11, 20, 0.98);
    box-shadow: var(--shadow-md);
  }

  .site-nav a {
    padding: 14px 16px;
    border-radius: 12px;
  }

  .site-nav a:hover,
  .site-nav a:focus-visible {
    background: rgba(255, 255, 255, 0.04);
  }

  .site-header.nav-open .site-nav {
    display: flex;
  }

  .brand-text {
    display: none;
  }

  .section {
    padding-top: 72px;
  }

  .content-card,
  .signal-card,
  .project-card {
    padding: 24px;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .stat-card.wide {
    grid-column: auto;
  }

  .project-thumbs {
    grid-template-columns: 1fr;
  }
}

.project-mobile {
  margin-top: 2rem;
}

.mobile-gallery {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.mobile-gallery figure {
  max-width: 220px; /* 👈 clave */
  width: 100%;
}

.mobile-gallery img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  object-fit: cover;
}