:root { color-scheme: light; --ink: #263d37; --muted: #63716c; --accent: #287b67; --line: #e2e8e4; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #fff; font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { color: #164e40; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
.page-width { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.site-header .page-width, .site-header nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header .page-width { min-height: 80px; }
.site-header a { text-decoration: none; }
.brand { color: #111; font-size: 26px; font-weight: 750; letter-spacing: -1px; }
.skip-link { position: absolute; left: 20px; top: -100px; background: white; padding: 12px; }
.skip-link:focus { top: 10px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0; font-size: 14px; color: var(--muted); }
.project-heading { max-width: 800px; margin: 48px 0 36px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 2px; font-size: 12px; font-weight: 700; }
h1 { margin: 8px 0 16px; font-size: clamp(34px, 6vw, 58px); line-height: 1.15; letter-spacing: -1.5px; }
.project-heading > p:last-child { font-size: 20px; color: var(--muted); }
h2 { font-size: 24px; line-height: 1.3; margin: 0 0 24px; }
.project-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 0; margin: 0 0 56px; list-style: none; }
.project-gallery li { min-width: 0; background: #f6f5f1; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.project-gallery li:first-child { grid-column: 1 / -1; }
.project-gallery a { display: block; height: 100%; }
.project-gallery a { cursor: zoom-in; }
.project-gallery a:hover img { transform: scale(1.025); }
.project-gallery img { display: block; width: 100%; height: 340px; object-fit: contain; }
.project-gallery img { transition: transform 220ms ease; }
.project-gallery li:first-child img { height: clamp(280px, 48vw, 580px); }
.cbp-l-project-container { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 56px; margin-bottom: 64px; }
.cbp-l-project-desc-text p:first-child { margin-top: 0; }
.cbp-l-project-desc-text li { margin-bottom: 8px; }
.cbp-l-project-details { padding: 28px; background: #f6f8f6; border: 1px solid var(--line); border-radius: 12px; align-self: start; }
.cbp-l-project-details-list { list-style: none; padding: 0; margin: 0; }
.cbp-l-project-details-list li { border-bottom: 1px solid var(--line); padding: 12px 0; overflow-wrap: anywhere; }
.cbp-l-project-details-list strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.cbp-l-project-details-visit { display: inline-block; margin-top: 24px; padding: 12px 18px; border-radius: 6px; background: var(--accent); color: white; text-decoration: none; font-size: 13px; font-weight: 600; }
.cbp-l-project-details-visit:hover { background: #164e40; color: white; }
.related-projects { padding-top: 32px; border-top: 1px solid var(--line); }
.related-projects ul { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin: 0; padding: 0; }
.related-projects a { display: block; padding: 10px 18px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.related-projects a:hover { background: #f6f8f6; }
.back-link { display: inline-block; margin: 36px 0 60px; }
.site-footer { padding: 28px 0; background: #f6f8f6; color: var(--muted); font-size: 14px; }
.site-footer p { margin: 0 0 8px; }
@media (max-width: 700px) {
  .site-header .page-width, .site-header nav { gap: 16px; }
  .site-header .page-width { min-height: 72px; }
  .site-header nav { font-size: 14px; }
  .project-heading { margin-top: 32px; }
  .project-heading > p:last-child { font-size: 18px; }
  .project-gallery { grid-template-columns: 1fr; gap: 16px; margin-bottom: 36px; }
  .project-gallery img { height: 280px; }
  .cbp-l-project-container { grid-template-columns: 1fr; gap: 28px; margin-bottom: 40px; }
  .cbp-l-project-details { padding: 22px; }
}

/* Additional galleries on project detail pages. */
.project-history > p, .project-app > p { max-width: 800px; color: var(--muted); margin-bottom: 28px; }
.project-app { margin-bottom: 56px; }
.project-gallery figure { margin: 0; }
.project-gallery figure a { height: auto; }
.project-gallery figcaption { padding: 16px 18px; font-size: 14px; line-height: 1.5; border-top: 1px solid var(--line); background: #fff; }
.project-gallery--equal li:first-child, .project-gallery--app li:first-child { grid-column: auto; }
.project-gallery--equal img, .project-gallery--equal li:first-child img { height: auto; aspect-ratio: 4 / 3; }
.project-gallery--app { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; }
.project-gallery--app img, .project-gallery--app li:first-child img { height: auto; aspect-ratio: 333 / 592; }
@media (max-width: 900px) {
  .project-gallery--app { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .project-gallery--app { grid-template-columns: 1fr; max-width: 333px; margin-inline: auto; }
}

/* Full-screen project image viewer. */
.project-lightbox { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #17221f; color: #fff; overflow: hidden; }
.project-lightbox::backdrop { background: rgba(8, 16, 13, .92); }
.project-lightbox[open] { display: flex; flex-direction: column; }
.project-lightbox__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; padding: 12px clamp(20px, 4vw, 56px); }
.project-lightbox__count { color: #c7d4ce; font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.project-lightbox button { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid rgba(255, 255, 255, .28); border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; font: inherit; cursor: pointer; transition: background 180ms ease, border-color 180ms ease; }
.project-lightbox button:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .55); }
.project-lightbox button:focus-visible { outline: 3px solid #b1e5d1; outline-offset: 3px; }
.project-lightbox__close { font-size: 32px !important; line-height: 1; }
.project-lightbox__stage { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; grid-template-rows: minmax(0, 1fr); align-items: center; gap: clamp(8px, 2vw, 32px); flex: 1; min-height: 0; padding: 0 clamp(12px, 4vw, 56px); }
.project-lightbox__image { display: block; max-width: 100%; max-height: calc(100dvh - 160px); width: auto; height: auto; margin: auto; object-fit: contain; box-shadow: 0 18px 50px rgba(0, 0, 0, .25); }
.project-lightbox__nav { justify-self: center; font-size: 38px !important; line-height: 1; }
.project-lightbox__nav[hidden] { display: none; }
.project-lightbox__caption { min-height: 72px; margin: 0; padding: 16px 24px 24px; color: #d7e3dc; text-align: center; font-size: 15px; line-height: 1.5; }
@media (max-width: 600px) {
  .project-lightbox__toolbar { min-height: 64px; }
  .project-lightbox__stage { grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 4px; padding: 0 8px; }
  .project-lightbox button { width: 40px; height: 40px; }
  .project-lightbox__nav { font-size: 30px !important; }
  .project-lightbox__caption { min-height: 64px; padding: 12px 20px 20px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .project-gallery img, .project-lightbox button { transition: none; }
}
