/* Shared styles for static pages, extends the design language from index-Ddvv-SVc.css */

/* Floating top navigation: a centered pill that overlays the React root and static pages alike */
.topnav {
  position: fixed;
  top: 1.1rem;
  left: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem 0.45rem 1.15rem;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(10, 10, 10, 0.06);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 10px 30px -14px rgba(74, 127, 224, 0.35),
    0 2px 6px rgba(10, 10, 10, 0.05);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -12px);
  animation: navFloatIn 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: 1.1s;
}
.topnav__brand {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
  padding-right: 0.8rem;
  margin-right: 0.15rem;
  border-right: 1px solid rgba(10, 10, 10, 0.1);
}
.topnav__links {
  display: flex;
  gap: 0.15rem;
}
.topnav__links a {
  color: var(--fg-muted);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}
.topnav__links a:hover {
  color: var(--fg);
  background: rgba(10, 10, 10, 0.05);
}
.topnav__links a[aria-current="page"] {
  color: var(--fg);
  background: rgba(74, 127, 224, 0.12);
}

@keyframes navFloatIn {
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Override .page on static pages so content can scroll naturally */
.page--static {
  height: auto;
  min-height: 100%;
  justify-content: flex-start;
  padding: 6rem 1.5rem 5rem;
}
body.has-static {
  overflow: auto;
}

/* Section container */
.section {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
}

/* Page heading */
.page-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-c);
  margin-bottom: 0.75rem;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: 0.1s;
}
.page-title {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 5.5vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--fg);
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: 0.2s;
}
.page-lede {
  margin: 0 0 3rem;
  max-width: 40rem;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.6;
  color: var(--fg-muted);
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: 0.35s;
}

/* Generic prose block */
.prose p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--fg);
  max-width: 38rem;
  margin: 0 0 1.25rem;
}
.prose p + p {
  color: var(--fg-muted);
}

/* Card grid */
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  margin-top: 2rem;
}
.card {
  position: relative;
  padding: 1.5rem 1.4rem 1.4rem;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(10, 10, 10, 0.06);
  border-radius: 14px;
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px -20px rgba(74, 127, 224, 0.35);
  border-color: rgba(74, 127, 224, 0.25);
}
.card__tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-c);
  margin-bottom: 0.6rem;
}
.card__title {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.card__body {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--fg-muted);
}

/* Staggered animation for cards */
.grid > .card:nth-child(1) { animation-delay: 0.45s; }
.grid > .card:nth-child(2) { animation-delay: 0.55s; }
.grid > .card:nth-child(3) { animation-delay: 0.65s; }
.grid > .card:nth-child(4) { animation-delay: 0.75s; }
.grid > .card:nth-child(5) { animation-delay: 0.85s; }
.grid > .card:nth-child(6) { animation-delay: 0.95s; }

/* Work list: bigger, editorial */
.work-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  border-top: 1px solid rgba(10, 10, 10, 0.08);
}
.work-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(10, 10, 10, 0.08);
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.work-list .work-item:nth-child(1) { animation-delay: 0.4s; }
.work-list .work-item:nth-child(2) { animation-delay: 0.5s; }
.work-list .work-item:nth-child(3) { animation-delay: 0.6s; }
.work-list .work-item:nth-child(4) { animation-delay: 0.7s; }
.work-list .work-item:nth-child(5) { animation-delay: 0.8s; }
.work-item__title {
  margin: 0 0 0.25rem;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.work-item__meta {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.work-item__year {
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

/* Contact panel */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.contact-item {
  padding: 1.25rem 1.25rem 1.5rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(10, 10, 10, 0.06);
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.contact-grid > .contact-item:nth-child(1) { animation-delay: 0.45s; }
.contact-grid > .contact-item:nth-child(2) { animation-delay: 0.55s; }
.contact-grid > .contact-item:nth-child(3) { animation-delay: 0.65s; }
.contact-item__label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 0.5rem;
}
.contact-item__value {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.contact-item__value:hover {
  color: var(--blue-c);
}

/* Big CTA email */
.cta-email {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  padding: 0.9rem 1.4rem;
  background: var(--fg);
  color: var(--bg);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: transform 0.2s ease, background 0.2s ease;
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: 0.5s;
}
.cta-email:hover {
  transform: translateY(-2px);
  background: var(--blue-c);
}
.cta-email__arrow {
  transition: transform 0.2s ease;
}
.cta-email:hover .cta-email__arrow {
  transform: translateX(3px);
}

/* Obfuscated email rendered as external SVG; bots reading the HTML won't see the address */
.email-svg {
  display: inline-block;
  height: 1.3em;
  width: auto;
  vertical-align: middle;
  pointer-events: none;
  user-select: none;
}
.cta-email .email-svg {
  height: 1.25em;
  margin-right: 0.1rem;
}
.contact-item .email-svg {
  height: 1.3em;
  margin-top: 0.15rem;
}

/* Footnote / fineprint */
.fineprint {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(10, 10, 10, 0.08);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .page-eyebrow,
  .page-title,
  .page-lede,
  .card,
  .work-item,
  .contact-item,
  .cta-email {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .topnav {
    animation: none;
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Small screens */
@media (max-width: 560px) {
  .topnav {
    top: 0.6rem;
    padding: 0.25rem 0.3rem 0.25rem 0.8rem;
    gap: 0.1rem;
    max-width: calc(100vw - 1rem);
    font-size: 0.8rem;
  }
  .topnav__brand {
    padding-right: 0.55rem;
    margin-right: 0.15rem;
    font-size: 0.85rem;
  }
  .topnav__links {
    gap: 0.05rem;
  }
  .topnav__links a {
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    padding: 0.6rem 0.55rem;
  }
  .page--static {
    padding: 5rem 1.1rem 4rem;
  }
  .work-item {
    grid-template-columns: 1fr;
  }
}

/* Very small screens: drop the brand divider so the pill keeps a healthy margin from the edges */
@media (max-width: 380px) {
  .topnav {
    padding: 0.25rem 0.3rem 0.25rem 0.65rem;
    max-width: calc(100vw - 0.7rem);
  }
  .topnav__brand {
    padding-right: 0.45rem;
    margin-right: 0;
    border-right: 0;
    font-size: 0.8rem;
  }
  .topnav__links a {
    font-size: 0.58rem;
    letter-spacing: 0.04em;
    padding: 0.6rem 0.42rem;
  }
}
