/* Shared Digital Corona navigation for independently styled research sub-sites.
 * Everything is dc-* scoped so an archive or poster can keep its own design
 * system without inheriting the Home site's global resets and component rules. */
:root {
  --dc-research-header-height: 72px;
  --dc-research-header-padding-y: 8px;
  --dc-research-logo-size: 56px;
}

.dc-site-header {
  position: sticky;
  top: 0;
  z-index: 300;
  height: var(--dc-research-header-height);
  color: #eef0fb;
  background: rgba(6, 6, 12, .76);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display Web", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.dc-nav-inner {
  box-sizing: border-box;
  width: 100%;
  max-width: 1320px;
  height: 100%;
  margin: 0 auto;
  padding: var(--dc-research-header-padding-y) 6vw;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: clamp(16px, 3vw, 38px);
}

.dc-brand,
.dc-nav-links a,
.dc-nav-links button,
.dc-project-return {
  color: inherit;
  text-decoration: none;
}

.dc-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .01em;
}

.dc-mark {
  display: block;
  width: var(--dc-research-logo-size);
  height: var(--dc-research-logo-size);
  flex: none;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}

.dc-mark canvas { display: block; width: 100%; height: 100%; }
.dc-brand:hover .dc-mark,
.dc-brand:focus-visible .dc-mark { transform: scale(1.1); }
.dc-brand-digital { color: #22d3ee; font-weight: 500; }
.dc-brand-corona { color: #eef0fb; font-weight: 700; margin-left: 4px; }

.dc-nav-links {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
  color: #a8abc4;
  font-size: 15px;
}

.dc-nav-links button {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.dc-nav-links :is(a, button) { position: relative; transition: color .2s ease; }
.dc-nav-links :is(a, button):hover,
.dc-nav-links :is(a, button)[aria-current] { color: #22d3ee; }
.dc-nav-links :is(a, button)[aria-current]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 2px;
  border-radius: 2px;
  background: #22d3ee;
}

.dc-project-return {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: #eef0fb;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.dc-project-return span { color: #c084fc; font-size: 17px; line-height: 1; }
.dc-project-return:hover {
  transform: translateY(-1px);
  border-color: rgba(192, 132, 252, .62);
  background: rgba(168, 85, 247, .14);
}

.dc-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 11px;
  background: rgba(255, 255, 255, .05);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.dc-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #eef0fb;
  transition: transform .25s ease, opacity .25s ease;
}

.dc-nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.dc-nav-toggle.open span:nth-child(2) { opacity: 0; }
.dc-nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.dc-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 290;
  background: rgba(4, 4, 10, .66);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.dc-nav-backdrop.show { opacity: 1; pointer-events: auto; }
body.dc-nav-open { overflow: hidden !important; }

@media (max-width: 900px) {
  .dc-nav-inner { grid-template-columns: auto 1fr auto; padding-inline: 20px; gap: 12px; }
  .dc-brand { position: relative; z-index: 302; }
  .dc-project-return { justify-self: end; }
  .dc-nav-toggle { display: flex; position: relative; z-index: 302; }
  .dc-nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 301;
    width: min(82vw, 340px);
    padding: 92px 28px 30px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(6, 6, 12, .97);
    border-left: 1px solid rgba(255, 255, 255, .1);
    box-shadow: -20px 0 50px rgba(0, 0, 0, .45);
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  }
  .dc-nav-links.open { transform: translateX(0); }
  .dc-nav-links :is(a, button) { display: block; width: 100%; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); font-size: 16px; text-align: left; }
  .dc-nav-links :is(a, button)[aria-current]::after { display: none; }
}

@media (max-width: 560px) {
  :root {
    --dc-research-header-padding-y: 12px;
    --dc-research-logo-size: 48px;
  }
  .dc-nav-inner { padding-inline: 14px; }
  .dc-brand { gap: 9px; font-size: 15px; }
  .dc-project-return { width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; font-size: 0; }
  .dc-project-return span { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .dc-site-header *, .dc-nav-backdrop { transition: none !important; }
}

@media (prefers-reduced-transparency: reduce) {
  .dc-site-header, .dc-nav-links { background: #06060c; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

@media (prefers-contrast: more) {
  .dc-site-header { border-color: #eef0fb; }
  .dc-project-return, .dc-nav-toggle { border-color: #eef0fb; }
}
