/* Shared nav/footer additions. keeps the header identical on every page */
.nav-dd {
  position: relative;
  display: inline-block;
}
.nav-dd .dd-trigger {
  cursor: pointer;
}
.nav-dd .dd-trigger .dd-caret {
  font-size: 10px;
  display: inline-block;
  transform: translateY(-1px);
  transition: transform 0.2s ease;
}
.nav-dd:hover .dd-caret,
.nav-dd:focus-within .dd-caret {
  transform: rotate(180deg) translateY(-1px);
}
.nav-dd .dd-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 170px;
  display: none;
  flex-direction: column;
  padding: 6px;
  background: var(--bg-primary, #fafafa);
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  z-index: 300;
}
.nav-dd:hover .dd-menu,
.nav-dd:focus-within .dd-menu {
  display: flex;
}
.nav-dd .dd-menu a {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  white-space: nowrap;
  border-radius: 6px;
  color: var(--text-secondary, #555);
}
.nav-dd .dd-menu a:hover {
  color: var(--text-primary, #111);
  background: var(--bg-secondary, #f0f0f0);
}
.nav-dd .dd-menu a::after {
  display: none;
}
nav a.sd-link {
  color: #1e3a8a;
  font-weight: 600;
}
nav a.sd-link:hover {
  color: #1e3a8a;
  opacity: 0.75;
}
nav a.sd-link.active {
  color: #1e3a8a;
}
/* Footer signoff shared by every page */
.footer-signoff {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border, #e5e5e5);
  padding-top: 24px;
}
.footer-signoff p {
  font-size: 13px;
  color: var(--text-secondary, #666);
  margin: 0;
}
.footer-signoff span {
  font-size: 13px;
  color: var(--text-secondary, #666);
}
@media (max-width: 768px) {
  .footer-signoff {
    padding: 24px 24px 32px;
    flex-direction: column;
    gap: 8px;
  }
}

/* Shared next-project passage for the five featured portfolio stories */
.next-project {
  display: block;
  max-width: 1200px;
  margin: 0 auto 120px;
  padding: 56px 48px;
  border-top: 1px solid var(--border, #e2e8f0);
}
.next-project-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}
.next-project .np-label {
  margin: 0 0 14px;
  color: var(--text-tertiary, #94a3b8);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.next-project .np-title {
  margin: 0;
  color: var(--text-primary, #0f172a);
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.15;
  transition: color 0.25s ease;
}
.next-project:hover .np-title { color: var(--accent, #1e3a8a); }
.next-project .np-arrow {
  display: grid;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  place-items: center;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 50%;
  color: var(--text-secondary, #475569);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.next-project:hover .np-arrow {
  transform: translateX(6px);
  border-color: var(--accent, #1e3a8a);
  background: var(--accent, #1e3a8a);
  color: var(--bg-primary, #fff);
}
@media (max-width: 768px) {
  .next-project { margin-bottom: 80px; padding: 40px 24px; }
  .next-project .np-arrow { width: 44px; height: 44px; flex-basis: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .next-project .np-title,
  .next-project .np-arrow { transition: none; }
}

/* Studio link: secondary, not accent */
nav a.studio-link { color: var(--text-tertiary, #94a3b8); font-weight: 500; }
nav a.studio-link:hover { color: var(--text-primary, #0f172a); }

/* Mobile menu */
.nav-burger { display: none; width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; color: inherit; }
.nav-burger span { display: block; width: 20px; height: 1.5px; background: currentColor; }
.nav-burger:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; border-radius: 6px; }
.nav-sheet { position: fixed; inset: 0; z-index: 400; background: rgba(15,23,42,0.5); opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s; }
.nav-sheet.is-open { opacity: 1; visibility: visible; }
.nav-sheet__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(320px, 86vw); background: #fafafa; padding: 64px 28px 28px; display: flex; flex-direction: column; gap: 4px; transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.7,.2,1); overflow-y: auto; }
.nav-sheet.is-open .nav-sheet__panel { transform: none; }
.nav-sheet__panel a { padding: 10px 0; font-size: 17px; font-weight: 500; color: #0f172a; border-bottom: 1px solid #e2e8f0; }
.nav-sheet__label { margin: 18px 0 2px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #94a3b8; }
.nav-sheet__close { position: absolute; top: 14px; right: 18px; width: 40px; height: 40px; border: 0; background: transparent; font-size: 28px; cursor: pointer; color: #0f172a; }
@media (max-width: 720px) {
  header nav { display: none !important; }
  .nav-burger { display: inline-flex; }
}

/* Dark header variant (thesis) */
body.header-dark header { background: rgba(15,23,42,0.92); border-bottom-color: rgba(255,255,255,0.08); color: #f8fafc; }
body.header-dark header .logo { color: #f8fafc; }
body.header-dark header nav a, body.header-dark header nav a.studio-link { color: rgba(248,250,252,0.68); }
body.header-dark header nav a:hover, body.header-dark header nav a.active { color: #fff; }
body.header-dark .nav-dd .dd-menu { background: #0f172a; border-color: rgba(255,255,255,0.12); }
body.header-dark .nav-dd .dd-menu a { color: rgba(248,250,252,0.75); }
body.header-dark .nav-dd .dd-menu a:hover { background: rgba(255,255,255,0.06); color: #fff; }
