/* Shared project-detail layout — matches portfolio blues without a framework rebuild */
:root {
  --bg: #f3f4f6;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #4b5563;
  --navy: #1e3a8a;
  --blue: #1d4ed8;
  --link: #1d4ed8;
  --border: #e5e7eb;
  --focus: #1e3a8a;
  --heading: #1f2937;
  --accent-ink: #1e3a8a;
  --surface: #ffffff;
  --surface-hover: #eff6ff;
  --btn-primary: #1e3a8a;
  --btn-primary-hover: #1e40af;
  --nav-offset: 7.5rem;
  color-scheme: light dark;
}
@media (min-width: 640px) {
  :root { --nav-offset: 4.75rem; }
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --panel: #1e293b;
    --ink: #f1f5f9;
    --muted: #cbd5e1;
    --blue: #93c5fd;
    --link: #93c5fd;
    --border: #334155;
    --focus: #93c5fd;
    --heading: #f1f5f9;
    --accent-ink: #bfdbfe;
    --surface: #1e293b;
    --surface-hover: #334155;
    /* 3:1 against the dark page so the button edge stays visible */
    --btn-primary: #2563eb;
    --btn-primary-hover: #1d4ed8;
  }
  body .site-nav { background: #172554; }
  .hero-shot { filter: brightness(0.9); }
}
/* 44px targets on touch screens */
@media (pointer: coarse) {
  :root { --nav-offset: 10rem; }
  .site-nav a,
  .breadcrumb a,
  .related a,
  .btn {
    display: inline-flex;
    align-items: center;
    min-block-size: 44px;
    min-inline-size: 44px;
  }
  .site-nav .inner,
  .site-nav ul { row-gap: 0; }
}
@media (pointer: coarse) and (min-width: 640px) {
  :root { --nav-offset: 5.25rem; }
}
html {
  scroll-padding-top: var(--nav-offset);
}
main h1,
main h2,
main section,
#content {
  scroll-margin-top: var(--nav-offset);
}

*,
*::before,
*::after { box-sizing: border-box; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
}

a { color: var(--link); }
a:hover { text-decoration: underline; }
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
/* Light ring on the dark navy regions, dark ring elsewhere: both stay above 3:1. */
.site-nav a:focus-visible,
.site-footer a:focus-visible {
  outline-color: #93c5fd;
}
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
main p,
main li { max-inline-size: 80ch; }

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: #fff;
  color: var(--navy);
  padding: 0.75rem 1rem;
  font-weight: 700;
  border-radius: 0.5rem;
  text-decoration: none;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.site-nav .inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}
.site-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.site-nav a:hover { color: #bfdbfe; text-decoration: none; }
.site-nav .brand { font-size: 1.1rem; letter-spacing: -0.01em; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
@media (max-width: 639px) {
  .site-nav .inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-nav ul {
    width: 100%;
    justify-content: flex-start;
  }
}

.wrap {
  max-width: 56rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.breadcrumb li + li::before {
  content: "/";
  content: "/" / "";
  margin-right: 0.35rem;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover,
.breadcrumb a:focus-visible { color: var(--blue); text-decoration: underline; }
.breadcrumb a[aria-current="page"] { color: var(--muted); }

.status {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  margin-bottom: 1rem;
}
.status.live { background: #ccfbf1; color: #115e59; }
.status.testing { background: #fef3c7; color: #92400e; }
.status.tool { background: #e0e7ff; color: #3730a3; }

h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 1.75rem;
  max-width: 42rem;
}

.hero-shot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
  margin: 0 0 2rem;
  background: #e5e7eb;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 2.5rem;
}
.btn {
  display: inline-block;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--btn-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--btn-primary-hover); }
.btn-secondary {
  background: var(--surface);
  color: var(--accent-ink);
  border-color: var(--accent-ink);
}
.btn-secondary:hover { background: var(--surface-hover); }

section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem 1.5rem 1.25rem;
  margin-bottom: 1.25rem;
}
section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  color: var(--heading);
}
section p { margin: 0 0 0.75rem; color: var(--muted); }
section p:last-child { margin-bottom: 0; }
section ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}
section li { margin-bottom: 0.4rem; }

.related {
  margin-top: 2rem;
}
.related h2 { font-size: 1.15rem; margin-bottom: 0.75rem; }
.related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.related a {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--accent-ink);
}
.related a:hover { background: var(--surface-hover); }

.site-footer {
  background: #111827;
  color: #9ca3af;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.875rem;
}
.site-footer a { color: #bfdbfe; }

/* Forced colours: backgrounds and shadows are removed, so redraw the edges they implied */
@media (forced-colors: active) {
  .site-nav { border-bottom: 1px solid CanvasText; }
  .status { border: 1px solid CanvasText; }
  .hero-shot { border: 1px solid CanvasText; }
}
