:root {
    --page-bg: #0b0c10;     /* outer page */
    --wrap-bg: #14161b;     /* content container (a bit lighter) */
    --overlay: .10;         /* image darkening */
    --pan: 22s;             /* subtle drift speed */
    --hover-scale: 1.02;    /* zoom inside box */
    --wrap-radius: 18px;    /* container radius */
    --tile-radius: 14px;    /* image/tile radius */
    --gap: 12px;            /* spacing between tiles */
    --maxw: 2500px;         /* max content width */
  }

  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html,
  body {
    height: 100%;
  }

  body {
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: var(--page-bg);
    color: #fff;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  }

  header,
  footer {
    display: flex;
    align-items: center;
    padding: 10px 16px;
  }

  header {
    position: sticky;
    top: 0;
    z-index: 10;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
  }

  .header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    img{
      max-height:30px;
    }
  }

  .header-slogan {
    font-size: 12px;
    opacity: 0.75;
    color: #FFF;
    display: block;
    text-align: right;
  }

  .logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    opacity: .9;
  }

  .logo-badge {
    width: 26px;
    height: 26px;
    border-radius: 20px;
    background: linear-gradient(135deg, #0f74bc, #97b8ff, #a533e1, #6c5ce7, #fd79a8, #fdcb6e, #e17055, #00b894, #0984e3, #74b9ff);
    background-size: 400% 400%;
    animation: colorShift 6s ease-in-out infinite;
  }

  footer {
    font-size: 12px;
    opacity: .75;
    justify-content: space-between;
    
    a {
      color: #FFF;
      text-decoration: none;
    }
  }
  

  .masonry-wrap {
    width: min(var(--maxw), 100%);
    margin: 0 auto;
    min-height: calc(100dvh - 90px);
    background: var(--wrap-bg);
    border-radius: var(--wrap-radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .38);
    padding: var(--gap);
    overflow-x: hidden;
    overflow-y: auto;
  }

  .masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr;
    gap: var(--gap);
    align-items: stretch;
    height: calc(100vh - 140px);
    align-content: stretch;
  }

  @media (max-width: 1100px) {
    .masonry {
      grid-template-columns: repeat(3, 1fr);
      grid-template-rows: 1fr;
    }
  }

  @media (max-width: 768px) {
    .masonry {
      grid-template-columns: repeat(2, 1fr);
      grid-template-rows: repeat(2, 1fr);
    }
  }

  @media (max-width: 480px) {
    .masonry {
      grid-template-columns: 1fr;
      grid-template-rows: repeat(4, 1fr);
    }
  }

  .card {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
  }

  .media {
    position: relative;
    background: center / cover no-repeat;
    background-image: var(--img);
    border-radius: var(--tile-radius);
    box-shadow: 0px 1px 5px 0px rgba(0,0,0,0.29);
    border: 2px solid rgba(255, 255, 255, 0.80);
    overflow: hidden;
    animation: pan var(--pan) ease-in-out infinite;
    transition: transform .45s cubic-bezier(.2, .8, .2, 1), filter .45s;
    will-change: transform, filter, background-position;
    flex: 1;
    height: 100%;
  }

  .media::before {
    content: "";
    display: block;
    padding-top: 75%;
  }

  .media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, var(--overlay));
    transition: background .25s;
    pointer-events: none;
    z-index: 1;
  }

  .card:hover .media {
    transform: scale(var(--hover-scale));
    filter: saturate(1.06) contrast(1.04);
  }

  .card:hover .media::after {
    background: rgba(0, 0, 0, .5);
  }

  .card:focus-visible {
    outline: 3px solid #a533e1;
    outline-offset: 4px;
    border-radius: var(--tile-radius);
  }

  .media img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: calc(100% - 32px);
    max-height: 100px;
    width: auto;
    height: auto;
    padding: 16px;
    object-fit: contain;
    z-index: 2;
    transition: filter .25s;
  }

  .card .media img {
    filter: brightness(0) invert(1);
  }

  .card:nth-child(2n) .media {
    animation-direction: reverse;
  }

  .card:nth-child(3n) .media {
    animation-duration: calc(var(--pan) * 1.15);
  }

  .card:nth-child(5n) .media {
    animation-duration: calc(var(--pan) * 0.85);
  }

  @media (prefers-reduced-motion: reduce) {
    .media {
      animation: none;
      transition: none;
    }
  }

  @keyframes colorShift {
    0% {
      background-position: 0% 50%;
    }
    25% {
      background-position: 100% 50%;
    }
    50% {
      background-position: 100% 100%;
    }
    75% {
      background-position: 0% 100%;
    }
    100% {
      background-position: 0% 50%;
    }
  }

  @keyframes pan {
    0% {
      background-position: 46% 50%;
    }
    50% {
      background-position: 54% 50%;
    }
    100% {
      background-position: 46% 50%;
    }
  }