:root {
  --background: #f3f2ee;
  --foreground: #101011;
  --muted: #6a6a6e;
  --surface: #ffffff;
  --border: rgba(16, 16, 17, 0.1);
  --blue: #2f6bff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Inter", sans-serif;
}
img { display: block; width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: none; cursor: pointer; }

.navbar {
  position: fixed;
  z-index: 100;
  top: 20px;
  left: 50%;
  width: min(94%, 1440px);
  min-height: 72px;
  padding: 10px 14px 10px 18px;
  display: grid;
  grid-template-columns: 170px 1fr auto;
  align-items: center;
  gap: 24px;
  background: rgba(12, 12, 12, 0.94);
  color: #fff;
  border-radius: 999px;
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
}

.brand {
  width: 82px;
  height: 50px;
  display: grid;
  place-items: center;
}

.brand img {
  width: auto;
  height: 44px;
  object-fit: contain;
  filter: invert(1);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 34px;
  font-size: 0.86rem;
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  opacity: 0.72;
  transform: translateY(0);
  transition:
    opacity 180ms ease,
    color 180ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 22px;
  height: 2px;
  background: var(--blue);
  border-radius: 999px;
  opacity: 0;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition:
    opacity 180ms ease,
    transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  opacity: 1;
  color: #fff;
  transform: translateY(-2px);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) scaleX(1);
}

.nav-links a:focus-visible {
  outline: none;
}

.nav-cta {
  position: relative;
  overflow: hidden;
  padding: 17px 24px;
  background: var(--blue);
  color: #fff;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  transform: translateY(0) scale(1);
  transition:
    transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 240ms ease;
}

.nav-cta::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -50%;
  width: 38%;
  height: 220%;
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(20deg) translateX(-220%);
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-cta:hover,
.nav-cta:focus-visible {
  transform: translateY(-3px) scale(1.025);
  box-shadow: 0 14px 30px rgba(47, 107, 255, 0.28);
}

.nav-cta:hover::before,
.nav-cta:focus-visible::before {
  transform: rotate(20deg) translateX(620%);
}

.nav-cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.menu-button {
  display: none;
}


.project-layout {
  width: min(94%, 1500px);
  margin: 0 auto;
  padding: 118px 0 48px;
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: clamp(34px, 4vw, 70px);
  align-items: start;
}

.preview-column {
  position: sticky;
  top: 108px;
}
.insta-preview-card {
  border-radius: 34px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 60px rgba(16, 16, 17, 0.12);
}
.insta-preview-shell {
  position: relative;
  isolation: isolate;
}
.insta-shell-image {
  width: 100%;
  height: auto;
}
.insta-post-window {
  position: absolute;
  z-index: 2;
  top: 22%;
  left: 0;
  width: 100%;
  height: 59.375%;
  overflow: hidden;
  background: #d43e33;
}
.insta-post-window img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.post-backdrop {
  z-index: 1;
  object-fit: cover;
  filter: blur(18px) saturate(.95) brightness(.8);
  transform: scale(1.12);
  opacity: .72;
  transition: opacity 220ms ease, transform 340ms cubic-bezier(.22,1,.36,1);
}
.post-foreground {
  z-index: 2;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.12));
  transition: opacity 220ms ease, transform 340ms cubic-bezier(.22,1,.36,1);
}
.post-backdrop.is-changing,
.post-foreground.is-changing {
  opacity: 0;
}
.post-foreground.is-changing {
  transform: scale(.98);
}
.preview-note {
  margin: 14px 6px 0;
  color: var(--muted);
  font-size: .82rem;
  text-align: center;
}

.content-column { min-width: 0; }
.project-intro { max-width: 900px; margin-bottom: 20px; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.project-intro h1 {
  margin: 0;
  font-family: "League Spartan", sans-serif;
  font-size: clamp(3rem, 4vw, 4.5rem);
  line-height: .92;
  letter-spacing: -.05em;
}
.project-category {
  margin: 12px 0 0;
  font-size: clamp(1.06rem, 1.28vw, 1.3rem);
  font-weight: 700;
}
.project-description {
  max-width: 840px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: clamp(.94rem, 1vw, 1rem);
  line-height: 1.62;
}

.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 16px 44px rgba(16,16,17,.06);
  backdrop-filter: blur(10px);
}
.profile-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.profile-main > img {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 8px 22px rgba(0,0,0,.08);
}
.profile-name-row { display: flex; align-items: center; gap: 8px; }
.profile-name-row h2 {
  margin: 0;
  font-family: "League Spartan", sans-serif;
  font-size: 1.42rem;
}
.verified-badge {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
}
.profile-subtitle {
  margin: 3px 0 4px;
  color: var(--muted);
  font-size: .84rem;
}
.profile-copy {
  margin: 0;
  max-width: 620px;
  color: var(--foreground);
  font-size: .9rem;
  line-height: 1.55;
}
.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-end;
}
.profile-meta span {
  color: var(--muted);
  font-size: .8rem;
  white-space: nowrap;
}
.profile-meta strong { color: var(--foreground); }

.instagram-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.grid-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-height: 0;
  padding: 10px 10px 12px;
  border: 1px solid rgba(16,16,17,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.7);
  box-shadow: 0 10px 24px rgba(16,16,17,.05);
  transition: transform 240ms cubic-bezier(.22,1,.36,1), box-shadow 240ms ease, border-color 240ms ease;
}
.grid-card img {
  width: auto;
  max-width: 100%;
  height: clamp(132px, 10.6vw, 175px);
  border-radius: 12px;
  object-fit: contain;
}
.grid-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(16,16,17,.88);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  text-align: center;
}
.grid-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 18px 34px rgba(16,16,17,.12);
}
.grid-card.is-active {
  border-color: rgba(47,107,255,.5);
  box-shadow: 0 18px 38px rgba(47,107,255,.16);
}
.grid-card:focus-visible {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(47,107,255,.16);
}

@media (max-width: 1200px) {
  .project-layout {
    grid-template-columns: 1fr;
  }
  .preview-column {
    position: relative;
    top: auto;
    width: min(420px, 100%);
    margin: 0 auto;
  }
}

@media (max-width: 860px) {
  .navbar {
    grid-template-columns: 90px 1fr auto;
    padding: 10px 12px;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    display: grid;
    gap: 4px;
    padding: 16px;
    border-radius: 24px;
    background: rgba(12, 12, 12, 0.97);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition:
      opacity 200ms ease,
      visibility 200ms ease,
      transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links a {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
  }

  .nav-links a:hover,
  .nav-links a:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    transform: none;
  }

  .nav-links a::after {
    display: none;
  }

  .menu-button {
    justify-self: end;
    width: 44px;
    height: 44px;
    display: grid;
    place-content: center;
    gap: 7px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
  }

  .menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 200ms ease;
  }

  .menu-button[aria-expanded="true"] span:first-child {
    transform: translateY(4.5px) rotate(45deg);
  }

  .menu-button[aria-expanded="true"] span:last-child {
    transform: translateY(-4.5px) rotate(-45deg);
  }

  .profile-header { flex-direction: column; align-items: flex-start; }
  .profile-meta { justify-content: flex-start; }
}

@media (max-width: 620px) {
  .navbar {
    top: 10px;
    width: 96%;
    min-height: 66px;
    grid-template-columns: 64px 1fr auto;
    border-radius: 28px;
  }

  .brand {
    width: 54px;
  }

  .brand img {
    height: 36px;
  }

  .nav-cta {
    display: none;
  }

  .project-layout { width: 91%; padding-top: 104px; }
  .instagram-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-card img { height: 128px; }
}


/* Fallback used only if the Web Animations API is unavailable. */
@keyframes fallbackFadeUp {
  from { opacity: 0; transform: translateY(24px) scale(.96); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.animation-fallback {
  animation: fallbackFadeUp 760ms cubic-bezier(.16, 1, .3, 1) both;
}


/* HOSPITAL MILLENIUM — ajustes específicos de proyecto */
.millenium-window {
  top: 10.996%;
  height: 61.355%;
  background: #f7f7f5;
}

.millenium-post {
  object-fit: contain;
  background: #fff;
  filter: none;
}

.profile-logo-contain {
  object-fit: contain !important;
  padding: 7px;
  background: #fff;
}

.preview-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 6px 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
}

.preview-status strong {
  color: var(--foreground);
}

.five-items {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.five-items .grid-card {
  position: relative;
  grid-column: span 2;
  padding: 0;
  overflow: hidden;
}

.five-items .grid-card:nth-child(4) {
  grid-column: 2 / span 2;
}

.five-items .grid-card:nth-child(5) {
  grid-column: 4 / span 2;
}

.millenium-grid .grid-card {
  aspect-ratio: 684 / 770;
  background: #fff;
}

.millenium-grid .grid-card img {
  width: 100%;
  max-width: none;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
  background: #fff;
  transition: transform 420ms cubic-bezier(.22,1,.36,1), filter 240ms ease;
}

.millenium-grid .grid-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 56%, rgba(0,20,45,.48));
}

.millenium-grid .grid-card span {
  position: absolute;
  z-index: 2;
  left: 10px;
  bottom: 10px;
  min-height: 32px;
  background: rgba(7,61,109,.88);
  backdrop-filter: blur(8px);
}

.millenium-grid .grid-card:hover img {
  transform: scale(1.035);
}

@media (max-width: 620px) {
  .five-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .five-items .grid-card,
  .five-items .grid-card:nth-child(4),
  .five-items .grid-card:nth-child(5) {
    grid-column: auto;
  }

  .five-items .grid-card:last-child {
    grid-column: 1 / -1;
    width: calc(50% - 7px);
    justify-self: center;
  }
}
