:root {
  --bg: #ffffff;
  --ink: #0c0c0a;
  --olive: #3a3822;
  --muted: #6b6a62;
  --line: #c9c7bd;
  --ral5002: #00387b;
  --page-margin: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }

a, a *, button, button *, .dropdown-toggle, .dropdown-toggle *,
.has-link, .has-link *, .feed-item, .feed-item *, .nav-sub a {
  cursor: url('images/cursor.png') 0 0, pointer !important;
}

html {
  overflow-x: hidden;
}

html, body {
  margin: 0;
  max-width: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  cursor: url('images/cursor.png') 0 0, auto;
}

a { color: inherit; text-decoration: none; }

/* ---------- Nav: three columns, spans full width ---------- */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  padding-top: env(safe-area-inset-top);
}

.nav-main {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 28px var(--page-margin);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-main .nav-left { text-align: left; }
.nav-main .nav-center { text-align: center; }
.nav-main .nav-right {
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--page-margin);
}

.nav-logo { height: 34px; width: auto; display: block; margin: 0 auto; }

.nav-logo-wrap { position: relative; display: inline-block; }
.nav-logo-blue {
  position: absolute;
  top: 0; left: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.nav-center:hover .nav-logo-blue,
.nav-center:active .nav-logo-blue,
.nav-center:focus-visible .nav-logo-blue { opacity: 1; }

.nav-main a { position: relative; padding: 10px 6px; margin: -10px -6px; display: inline-block; }
.nav-main a:hover { color: var(--ral5002); text-decoration: underline; text-decoration-color: var(--ral5002); }

/* ---------- Categories sub-row: expands under the main row ---------- */

.nav-sub {
  max-height: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  gap: 44px;
  transition: max-height 0.3s ease;
}

.site-nav.categories-open .nav-sub {
  max-height: 60px;
  border-top: 1px solid var(--line);
}

.nav-sub a {
  display: block;
  padding: 18px 8px 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.nav-sub a:hover { color: var(--ral5002); }

.nav-sub a.active-category { color: var(--ral5002); font-weight: 700; }

.nav-pinned .nav-sub a { color: var(--ink); }
.nav-pinned .nav-sub a:hover,
.nav-pinned .nav-sub a[aria-current="page"] { color: var(--ral5002); }
.nav-pinned .nav-sub a.active-category { color: var(--ral5002); }

.nav-spacer { transition: height 0.3s ease; }

.dropdown-toggle {
  background: none;
  border: none;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 10px 6px;
  margin: -10px -6px;
}
.dropdown-toggle:hover { color: var(--ral5002); text-decoration: underline; text-decoration-color: var(--ral5002); }
.site-nav.categories-open .dropdown-toggle { color: var(--ral5002); text-decoration: underline; text-decoration-color: var(--ral5002); }

.nav-pinned .dropdown-toggle { cursor: default; }
.nav-pinned .dropdown-toggle:hover { text-decoration: none; }

/* ---------- Language switcher: pinned left, hover-expands to the right ---------- */

.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 0;
  margin: -10px 0;
}

.lang-current {
  background: none;
  border: none;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 20px 18px;
  margin: -20px -18px;
}

.lang-switch:focus-within .lang-current,
.lang-switch.open .lang-current {
  color: var(--ral5002);
}

.lang-options {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  margin-left: 0;
  transition: max-width 0.3s ease, opacity 0.25s ease, margin-left 0.3s ease;
}

.lang-switch:focus-within .lang-options,
.lang-switch.open .lang-options {
  max-width: 300px;
  opacity: 1;
  margin-left: 14px;
}

@media (hover: hover) and (pointer: fine) {
  .lang-switch:hover .lang-current { color: var(--ral5002); }
  .lang-switch:hover .lang-options {
    max-width: 300px;
    opacity: 1;
    margin-left: 14px;
  }
}

.lang-options a {
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 20px 12px;
  margin: -20px -12px;
}

.lang-options a:hover { color: var(--ral5002); }

.lang-sep { color: var(--line); padding: 0 2px; }

@media (max-width: 720px) {
  .nav-main {
    padding-top: 18px;
    padding-bottom: 18px;
    font-size: 12px;
  }
  .nav-main .nav-right { gap: 20px; }
  .nav-logo { height: 26px; }
  .nav-main a { padding: 15px 8px; margin: -15px -8px; }
  .dropdown-toggle { padding: 15px 8px; margin: -15px -8px; }
  .nav-sub {
    justify-content: flex-start;
    gap: 28px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-left: var(--page-margin);
    padding-right: var(--page-margin);
  }
  .nav-sub::-webkit-scrollbar { display: none; }
}

.site-footer {
  padding: 30px clamp(20px, 4vw, 56px) 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.site-footer a:hover { color: var(--ral5002); }

.legal-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.legal-links a { color: var(--muted); }
.legal-links a:hover { color: var(--ral5002); }
.legal-slash { color: var(--line); }

@media (max-width: 640px) {
  .site-footer { justify-content: flex-start; }
  .legal-links { order: 3; width: 100%; flex-wrap: wrap; gap: 6px 8px; }
}

/* ---------- Cookie notice ---------- */

.cookie-notice {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  background: var(--bg);
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding: 18px clamp(20px, 4vw, 56px) calc(18px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  line-height: 1.5;
  transform: translateY(0);
  transition: transform 0.4s ease, opacity 0.4s ease;
}
.cookie-notice.hide { transform: translateY(100%); opacity: 0; pointer-events: none; }
.cookie-notice p { margin: 0; max-width: 720px; color: var(--muted); }
.cookie-notice a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); }
.cookie-notice a:hover { color: var(--ral5002); text-decoration-color: var(--ral5002); }
.cookie-notice-btn {
  flex: 0 0 auto;
  background: none;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 10px 22px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.cookie-notice-btn:hover { color: var(--ral5002); border-color: var(--ral5002); }

/* ---------- Loading screen ---------- */

.loader {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: opacity 0.6s ease;
}

.loader.hide { opacity: 0; pointer-events: none; }

.loader h1 {
  font-weight: 800;
  font-size: clamp(56px, 11vw, 130px);
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--olive);
}

.loader p {
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 700;
  color: var(--ink);
  margin: 6px 0 0;
}

.loader-logo {
  width: clamp(220px, 30vw, 380px);
  height: auto;
}

/* ---------- Home feed ---------- */

.feed-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 50px 0;
  padding: 10px clamp(30px, 6vw, 90px) 100px clamp(20px, 4vw, 56px);
  overflow: visible;
}

.feed-item {
  position: relative;
  overflow: hidden;
  display: block;
  min-width: 220px;
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .feed-item { width: 100% !important; margin-top: 0 !important; transform: none !important; }
}

.feed-item .ph {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #ececea;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9d9c94;
}

.feed-item .ph-photo {
  width: 100%;
  height: auto;
  display: block;
}

.feed-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 56, 123, 0.72);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.25s ease;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (hover: hover) and (pointer: fine) {
  .feed-item:hover .feed-overlay { opacity: 1; }
}

/* Touch devices have no hover, so information carried by the overlay
   (project id / title) is shown as a permanent, lighter gradient label
   instead of requiring an interaction that would only get in the way of
   a single tap through to the project. */
@media (hover: none) {
  .feed-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0, 56, 123, 0.82) 0%, rgba(0, 56, 123, 0) 55%);
  }
}

.feed-overlay .num { font-size: 24px; font-weight: 800; }

/* ---------- Page shell ---------- */

.page { padding: 24px clamp(20px, 4vw, 56px) 60px; }
.page-wide { padding: 24px clamp(20px, 4vw, 56px) 60px; }
.cat-page { padding: 24px clamp(20px, 4vw, 56px) 60px; }

/* ---------- Legal pages ---------- */

.legal-doc { max-width: 820px; }
.legal-doc h1 { font-size: clamp(28px, 3.4vw, 40px); margin: 0 0 28px; }
.legal-doc h3 { font-size: 16px; margin: 32px 0 10px; }
.legal-doc p { font-size: 15px; line-height: 1.7; margin: 0 0 14px; }
.legal-doc a { color: var(--ral5002); }
.legal-doc a:hover { text-decoration: underline; }
.legal-doc .legal-updated { margin-top: 30px; color: var(--muted); font-size: 13px; }

/* ---------- About ---------- */

.about-grid-top {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 0.8fr;
  gap: 50px;
  margin-top: 30px;
}

@media (max-width: 900px) {
  .about-grid-top { grid-template-columns: 1fr; }
}

.about-lede {
  margin: 0;
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.3;
}

.about-body p { font-size: 15px; line-height: 1.65; margin: 0 0 18px; }

.about-side h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.about-side p { font-size: 14px; line-height: 1.5; margin: 0 0 20px; }
.about-side a:hover { color: var(--ral5002); text-decoration: underline; text-decoration-color: var(--ral5002); }

.pub-list { list-style: none; margin: 0; padding: 0; font-size: 14px; font-weight: 700; line-height: 1.7; }

.about-footer {
  margin-top: 50px;
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- Projects list ---------- */

.projects-table { width: 100%; border-collapse: collapse; margin-top: 30px; }

.projects-table thead th {
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  padding: 0 12px 14px 0;
  border-bottom: 2px solid var(--ink);
}

.projects-table tbody tr {
  border-bottom: 1px dotted var(--line);
}
.projects-table tbody tr.has-link { }
.projects-table tbody tr.has-link:hover td { color: var(--ral5002); }

.projects-table tbody td {
  padding: 14px 12px 14px 0;
  font-size: 15px;
}

.projects-table td.name { font-weight: 700; }

@media (max-width: 640px) {
  .projects-table thead { display: none; }
  .projects-table, .projects-table tbody, .projects-table tr, .projects-table td {
    display: block;
    width: 100%;
  }
  .projects-table tr {
    border-bottom: none;
    padding: 16px 0;
    border-top: 1px solid var(--line);
  }
  .projects-table tr:first-child { border-top: none; }
  .projects-table tbody td {
    padding: 3px 0;
    font-size: 14px;
  }
  .projects-table td.name {
    font-size: 17px;
    margin-bottom: 6px;
  }
  .projects-table td:not(.name)::before {
    content: attr(data-label) ": ";
    color: var(--muted);
    font-weight: 600;
  }
}

/* ---------- Project detail ---------- */

.proj-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 40px;
  margin-top: 20px;
}

@media (max-width: 900px) {
  .proj-layout { grid-template-columns: 1fr; }
}

.proj-id {
  font-weight: 800;
  font-size: 44px;
  margin: 0;
  line-height: 1;
}

.proj-title {
  font-weight: 700;
  font-size: 20px;
  margin: 6px 0 24px;
}

.proj-meta-list { font-size: 13px; line-height: 2; }
.proj-meta-list b { font-weight: 700; }

.proj-desc { font-size: 14px; line-height: 1.7; margin-top: 28px; white-space: pre-line; text-align: justify; }

.proj-credits { margin-top: 28px; font-size: 13px; line-height: 2; }
.proj-credits b { font-weight: 700; margin-right: 6px; }

.proj-media { display: flex; flex-direction: column; gap: 20px; }

.proj-media .ph {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #ececea;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9d9c94;
}

.proj-media .ph-img {
  width: 100%;
  height: auto;
  display: block;
}

.back-link {
  display: inline-flex;
  color: var(--muted);
  padding: 14px;
  margin: 6px 0 -4px -14px;
}
.back-link:hover { color: var(--ral5002); }

.icon-arrow { display: block; width: 29.25px; height: 25.5px; }
.icon-arrow--left { transform: rotate(-90deg); }

.site-footer a { display: inline-flex; }
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 500;
  padding: 14px;
  margin: 0;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  pointer-events: none;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
@media (max-width: 640px) {
  .back-to-top { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); }
}

/* ---------- Team tiles (About page) ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-top: 60px;
  border-top: 1px solid var(--line);
  padding-top: 60px;
}

@media (max-width: 900px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .team-grid { grid-template-columns: 1fr; }
}

.team-tile {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #ececea;
}

.team-photo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ececea;
  overflow: hidden;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.team-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 56, 123, 0.94);
  color: #fff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.team-tile.active .team-overlay {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  .team-tile:hover .team-overlay {
    opacity: 1;
    transform: translateY(0);
  }
}

.team-overlay h4 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.team-overlay .team-role {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a9c0dc;
  margin: 0 0 14px;
}

.team-overlay p {
  font-size: 12.5px;
  line-height: 1.6;
  margin: 0 0 12px;
}



.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;
}

/* ---------- 404 page ---------- */

.notfound {
  padding: 80px 0 100px;
  text-align: center;
}
.notfound h1 {
  font-weight: 800;
  font-size: clamp(64px, 14vw, 160px);
  line-height: 1;
  margin: 0;
  color: var(--olive);
}
.notfound p {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--muted);
  margin: 16px 0 32px;
}
.notfound a.home-link {
  display: inline-block;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 2px solid var(--ral5002);
  padding-bottom: 4px;
}
.notfound a.home-link:hover { color: var(--ral5002); }

/* ---------- Skip to content (keyboard accessibility) ---------- */

.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 1000;
  background: var(--ral5002);
  color: #fff;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 12px;
}

/* ---------- Smooth scrolling & reduced motion ---------- */

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* When the cookie notice is on screen, lift the floating back-to-top
   button above it so the banner never blocks the button. */
body.has-cookie-notice .back-to-top {
  bottom: calc(120px + env(safe-area-inset-bottom));
}
@media (max-width: 640px) {
  body.has-cookie-notice .back-to-top {
    bottom: calc(190px + env(safe-area-inset-bottom));
  }
}
