@font-face {
  font-family: "PT Sans";
  src: url("../../assets/fonts/PTSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "PT Sans";
  src: url("../../assets/fonts/PTSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  font-family: "PT Sans", sans-serif;
  font-synthesis: none;
  color: #222;
  background: #fff;
  --line-color: rgb(0 0 0 / 40%);
}
* { box-sizing: border-box; }
body { margin: 0; }
.portal { width: min(100% - 48px, 1000px); margin: 0 auto; padding-block: 48px; }
.portal__header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4em;
  margin-bottom: 32px;
  font-size: clamp(18px, 2.2vw, 28px);
}
.portal__header h1 { margin: 0; font: inherit; }
.portal__logout { margin: 0; }
.portal__logout button {
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.portal__logout button:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.projects {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  list-style: none;
  padding: 0;
  margin: 0;
}
.project { position: relative; min-width: 0; aspect-ratio: 1; }
.project__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 12%;
  color: inherit;
  text-decoration: none;
  text-align: center;
}
.project__link:focus-visible { outline: 2px solid currentColor; outline-offset: -8px; }
.project__name { font-weight: 700; overflow-wrap: anywhere; }
.project__visual { display: block; width: 100%; height: 100%; transform-origin: center; }
.project__logo { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Open line fragments follow the existing brand grid, without closed boxes. */
.project::before, .project::after {
  content: "";
  position: absolute;
  background: var(--line-color);
  pointer-events: none;
}
.project::before { top: 20%; right: 0; width: 1px; height: 60%; display: none; }
.project::after { bottom: 0; left: 20%; width: 60%; height: 1px; }
.project:last-child::after { display: none; }
@media (min-width: 480px) {
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project:nth-child(n)::before { display: block; }
  .project:nth-child(2n)::before { display: none; }
  .project:nth-last-child(-n + 2):nth-child(2n + 1)::after,
  .project:nth-last-child(-n + 2):nth-child(2n + 1) ~ .project::after { display: none; }
}
@media (min-width: 720px) {
  .projects { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .project:nth-child(n)::before, .project:nth-child(n)::after { display: block; }
  .project:nth-child(3n)::before { display: none; }
  .project:nth-last-child(-n + 3):nth-child(3n + 1)::after,
  .project:nth-last-child(-n + 3):nth-child(3n + 1) ~ .project::after { display: none; }
}
@media (min-width: 960px) {
  .portal { width: min(100% - 96px, 1000px); }
  .projects { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .project:nth-child(n)::before, .project:nth-child(n)::after { display: block; }
  .project:nth-child(5n)::before { display: none; }
  .project:nth-last-child(-n + 5):nth-child(5n + 1)::after,
  .project:nth-last-child(-n + 5):nth-child(5n + 1) ~ .project::after { display: none; }
}

/* Match the public landing page: 10 percent zoom, 300 ms ease-out. */
@media (min-width: 960px) and (hover: hover) {
  .project__visual {
    transform: translateZ(0) scale(1);
    transition: transform 300ms ease-out;
    will-change: transform;
  }
  .project__link:hover .project__visual,
  .project__link:focus-visible .project__visual { transform: translateZ(0) scale(1.10); }
}
@media (prefers-reduced-motion: reduce) {
  .project__visual { transition: none; will-change: auto; }
  .project__link:hover .project__visual,
  .project__link:focus-visible .project__visual { transform: none; }
}

.portal--login { max-width: 400px; }
.portal--login h1 { margin: 0 0 32px; font-size: clamp(20px, 4vw, 28px); font-weight: 400; }
.login-form { display: grid; gap: 12px; }
.login-form input:not([type="hidden"]), .login-form button, .login-home {
  min-width: 0; min-height: 44px; width: 100%; padding: 10px 12px;
  border: 1px solid var(--line-color); border-radius: 0;
  background: #fff; color: inherit; font: inherit;
}
.login-form button { margin-top: 12px; cursor: pointer; }
.login-form button:hover, .login-home:hover { background: #222; color: #fff; }
.login-form :focus-visible, .login-home:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.login-form button, .login-home { line-height: 1.4; text-align: center; }
.login-home { display: block; margin-top: 28px; text-decoration: none; }
.login-message { line-height: 1.5; }
