.projects-page {
  color-scheme: light;
  --ink: #0e2238;
  --muted: #5a6b7c;
  --line: #e3eaef;
  --light: #f5f8fa;
  --accent: #164d81;
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.projects-page :focus-visible, #project-dialog :focus-visible { outline: 3px solid #2275b8; outline-offset: 4px; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.top { border-bottom: 1px solid var(--line); }
.topinner { min-height: 68px; display: flex; justify-content: space-between; align-items: center; }
.brand { color: var(--ink); font-size: 1.12rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; text-decoration: none; }
.language { display: flex; gap: 3px; }
.language button { padding: 9px 13px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; border-radius: 6px; font-size: .88rem; font-weight: 650; }
.language button[aria-pressed=true] { background: var(--ink); color: white; }
.language button:hover:not([aria-pressed=true]) { background: var(--light); }
.hero { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.22fr); align-items: center; gap: clamp(28px, 5vw, 80px); padding-block: clamp(36px, 6vw, 88px) clamp(28px, 5vw, 72px); }
.hero-copy { align-self: center; }
.projects-page .eyebrow { color: var(--accent); letter-spacing: .12em; text-transform: uppercase; font-weight: 700; font-size: .72rem; margin: 0 0 12px; }
.projects-page :is(h1, h2, h3), #project-dialog :is(h1, h2, h3) { margin: 0; letter-spacing: -.04em; overflow-wrap: anywhere; }
.projects-page h1 { font-size: clamp(2.35rem, 5vw, 4.25rem); line-height: 1.02; font-weight: 650; }
.intro { font-size: clamp(1rem, 1.5vw, 1.18rem); color: var(--muted); line-height: 1.65; margin: 22px 0 0; max-width: 38ch; }
.jump { display: inline-block; margin-top: 22px; text-decoration-thickness: 1px; text-underline-offset: 4px; font-weight: 700; }
.hero-image { position: relative; margin: 0; overflow: hidden; background: var(--light); border-radius: 6px; aspect-ratio: 16 / 10; }
.hero-image img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.catalogue { padding-bottom: clamp(64px, 8vw, 104px); border-top: 1px solid var(--line); padding-top: clamp(36px, 5vw, 56px); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(36px, 4.5vw, 64px) clamp(28px, 3.6vw, 56px); }
.card { min-width: 0; display: flex; flex-direction: column; }
.card-media { position: relative; background: var(--light); border-radius: 6px; overflow: hidden; aspect-ratio: 16 / 10; }
.card-image { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.viz-tag {
  position: absolute;
  right: 10px;
  bottom: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255,255,255,0.82);
  font-size: 10px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: .03em;
  text-shadow: 0 1px 2px rgba(0,0,0,.55);
  pointer-events: none;
}
.card-body { flex: 1; display: flex; flex-direction: column; padding: 20px 2px 0; }
.facts { color: var(--muted); font-size: .75rem; font-weight: 500; letter-spacing: .01em; line-height: 1.45; margin: 0 0 8px; }
h3 { font-size: clamp(1.28rem, 1.7vw, 1.58rem); line-height: 1.2; font-weight: 650; }
.desc {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.55;
  margin: 10px 0 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  min-height: 3.1em;
}
.open { margin-top: 14px; align-self: start; border: 0; background: transparent; color: var(--accent); padding: 0 0 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-weight: 650; font-size: .92rem; }
#project-dialog { width: min(94vw, 1030px); max-height: 89dvh; border: 1px solid var(--line); border-radius: 10px; padding: 0; color: var(--ink); }
#project-dialog::backdrop { background: #071424b8; backdrop-filter: none; }
.dialog-header { z-index: 2; position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #fff; border-bottom: 1px solid var(--line); padding: 14px clamp(16px,4vw,35px); }
.dialog-header h2 { font-size: clamp(1.4rem,3vw,2rem); }
.close { flex: none; width: 42px; height: 42px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 1.55rem; cursor: pointer; }
.dialog-body { padding: 15px clamp(16px,4vw,35px) 28px; }
.dialog-body .facts { margin-top: 8px; }
.dialog-body .desc { display: block; -webkit-line-clamp: unset; line-clamp: unset; overflow: visible; min-height: 0; }
.dialog-body figure { position: relative; margin: 20px 0 0; }
.dialog-body img { display: block; height: auto; width: 100%; max-height: 560px; object-fit: contain; background: var(--light); border-radius: 6px; }
@media (max-width: 780px) {
  .hero { grid-template-columns: 1fr; padding-block: 32px 28px; }
  .hero-image { min-height: 0; }
  .grid { grid-template-columns: 1fr; gap: 40px; }
  .desc { -webkit-line-clamp: 4; line-clamp: 4; min-height: 6.2em; }
}
