/* CMS-controlled presentation: native scrolling, readable evidence and documents. */
.about-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.about-grid > * { min-width: 0; }
.about-stats { grid-column: 1 / -1; }
.about-stats:empty, .about-visual:empty { display: none; }
.about-grid:has(.about-visual:empty):has(.about-stats:empty) { grid-template-columns: minmax(0, 1fr); }
.about-evidence { margin: 0; overflow: hidden; border: 1px solid var(--border-2); border-radius: 16px; background: var(--bg-2); }
.about-evidence img { width: 100%; aspect-ratio: 4 / 3; display: block; }
.about-evidence figcaption { padding: 16px 20px; color: var(--ink-2); font-size: 13px; line-height: 1.6; border-top: 1px solid var(--border); }
.system-evidence { color: var(--c3); }
.system-evidence svg { display: block; width: 100%; }
.evidence-caption { padding: 22px 24px 0; color: var(--ink); font-size: 16px; }
.work-showcase { min-width: 0; }
.project-gallery { min-width: 0; }
.gallery-controls { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin: 0 0 20px; color: var(--ink-2); font-size: 14px; }
.gallery-controls[hidden] { display: none; }
.gallery-controls > div { display: flex; gap: 8px; }
.gallery-controls button { border: 1px solid var(--border-2); background: var(--bg-2); width: 44px; height: 44px; border-radius: 50%; color: var(--ink); cursor: pointer; }
.gallery-controls button:disabled { opacity: .35; cursor: default; }
.gallery-track { display: flex; gap: 24px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--c2) transparent; padding: 6px 0 18px; }
.project-page { flex: 0 0 100%; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-content: start; scroll-snap-align: start; }
.project-page > .work-card:nth-child(n) { grid-column: auto; min-width: 0; border-radius: 16px; }
.project-page > .work-card[data-format="wide"], .project-page > .work-card[data-format="feature"] { grid-column: span 2; }
.project-gallery[data-columns="1"] .project-page { grid-template-columns: minmax(0, 1fr); }
.project-gallery[data-columns="1"] .project-page > .work-card:nth-child(n) { grid-column: auto; }
.project-page:has(> .work-card:only-child) { grid-template-columns: minmax(0, 1fr); }
.project-page:has(> .work-card:only-child) > .work-card { grid-column: auto; }
.project-gallery .work-preview { aspect-ratio: 16 / 9; min-height: 0; }
.project-gallery .work-body { display: flex; flex-direction: column; flex: 1; }
.project-gallery .work-desc { overflow-wrap: anywhere; }
.project-gallery .work-tags { margin-bottom: 16px; }
.project-open { border: 0; padding: 8px 0; background: none; text-align: left; align-self: flex-start; cursor: pointer; margin-top: auto; color: var(--ink); font: inherit; }
.project-page > [data-format="compact"] .work-preview { aspect-ratio: 3 / 1; }
.project-page > [data-format="compact"] .work-body { padding: 20px; }
.project-page > [data-format="feature"] { display: grid; grid-template-columns: 1.1fr 1fr; }
.project-page > [data-format="feature"] .work-preview { aspect-ratio: auto; height: 100%; }
.project-gallery[data-gallery-mode="rail"] .gallery-track { scroll-snap-type: x proximity; }
.project-gallery[data-gallery-mode="rail"] .work-card { flex: 0 0 min(440px, 85%); min-width: 0; scroll-snap-align: start; border-radius: 16px; }
.project-gallery .work-card:hover { transform: none; }
.project-gallery .work-card:focus-within { outline: 2px solid var(--c3); outline-offset: -3px; }
.architecture-preview { height: 100%; display: grid; place-content: center; padding: 24px; gap: 20px; color: var(--ink); }
.architecture-preview strong { font-size: clamp(18px, 2vw, 28px); font-weight: 500; }
.architecture-nodes { display: flex; align-items: center; gap: 8px; }
.architecture-nodes span { border: 1px solid var(--border-2); border-radius: 8px; padding: 10px 12px; font-size: 12px; color: var(--c3); }
.architecture-preview small { color: var(--ink-2); font-size: 11px; }
.cert-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.certificate-card { display: grid; grid-template-columns: minmax(180px, .65fr) minmax(0, 1.5fr); gap: clamp(24px, 4vw, 48px); padding: clamp(20px, 3vw, 36px); background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 16px; align-items: center; }
.certificate-cover { min-height: 200px; display: grid; place-content: center; gap: 12px; text-align: center; border: 1px solid var(--border); border-radius: 12px; color: var(--c3); overflow: hidden; padding: 20px; }
.certificate-cover strong { font-size: clamp(36px, 5vw, 68px); font-weight: 600; }
.certificate-cover span { color: var(--ink-2); font-size: 12px; overflow-wrap: anywhere; }
.certificate-cover img { width: 100%; height: 190px; object-fit: contain; background: white; }
.certificate-copy .when { color: var(--ink-2); font-size: 13px; }
.certificate-copy h3 { font-size: clamp(23px, 2.5vw, 34px); line-height: 1.25; margin: 12px 0; }
.certificate-copy p { color: var(--ink-2); max-width: 60ch; line-height: 1.65; margin: 0; }
.certificate-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.certificate-actions button, .certificate-actions a { padding: 11px 16px; border: 1px solid var(--border-2); border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.certificate-actions [hidden] { display: none; }
.certificate-viewer { width: min(960px, 94vw); height: min(850px, 90dvh); border: 1px solid var(--border-2); border-radius: 16px; background: var(--bg-2); color: var(--ink); padding: 20px; }
.certificate-viewer::backdrop { background: rgba(0,0,0,.8); }
.certificate-viewer header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.certificate-viewer h2 { font-size: 19px; line-height: 1.4; }
.certificate-viewer button { border: 1px solid var(--border-2); border-radius: 8px; background: transparent; color: var(--ink); padding: 10px 16px; cursor: pointer; }
.certificate-viewer iframe, .certificate-viewer img { display: block; width: 100%; height: calc(100% - 70px); border: 0; object-fit: contain; background: #fff; }
#contact > .container > .section-index { display: block; }
.contact-grid { margin-top: 28px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); }
.contact-grid > * { min-width: 0; }
.contact-big h2 { font-size: clamp(46px, 5.5vw, 84px); line-height: 1.07; margin-top: 0 !important; max-width: 13ch; text-wrap: balance; }
.contact-big .tagline { max-width: 44ch; font-size: 18px; line-height: 1.65; }
.contact-form { border-radius: 16px; }
.contact-cards .v { overflow-wrap: anywhere; }
@media (max-width: 900px) { .about-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .project-page { grid-template-columns: minmax(0, 1fr); }
  .project-page > .work-card:nth-child(n) { grid-column: auto; }
  .project-page > [data-format="feature"] { display: flex; }
  .project-page > [data-format="feature"] .work-preview { aspect-ratio: 16 / 9; height: auto; }
  .certificate-card { grid-template-columns: minmax(0, 1fr); }
  .certificate-cover { min-height: 140px; }
  .contact-form { padding: 24px; }
  .contact-form .field-row { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .gallery-track { scroll-behavior: auto; } }
