.portfolio-page {
  --portfolio-background: #000;
  --portfolio-ink: #fff;
  --portfolio-muted: #b8b8b8;
  margin: 0;
  background: var(--portfolio-background);
  color: var(--portfolio-ink);
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.portfolio-page *,
.portfolio-page *::before,
.portfolio-page *::after {
  box-sizing: border-box;
}

.portfolio-page [hidden] {
  display: none !important;
}

.portfolio-page a {
  color: inherit;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

.portfolio-page button,
.portfolio-page input {
  font: inherit;
}

.portfolio-page :focus-visible {
  outline: 2px solid var(--portfolio-ink);
  outline-offset: 5px;
}

.portfolio-page .page-width {
  width: min(100% - 64px, 1320px);
  margin-inline: auto;
}

.portfolio-page .skip-link {
  position: absolute;
  inset: 16px auto auto 16px;
  z-index: 1;
  padding: 12px 16px;
  border: 2px solid var(--portfolio-ink);
  border-radius: 4px;
  background: var(--portfolio-background);
  transform: translateY(-160%);
}

.portfolio-page .skip-link:focus {
  transform: translateY(0);
}

.portfolio-page .site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 28px;
}

.portfolio-page .site-header nav {
  flex: 0 0 auto;
}

.portfolio-page .contact-link {
  white-space: nowrap;
}

.portfolio-page .brand-link {
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.portfolio-page .site-identity {
  min-width: 0;
}

.portfolio-page .personal-intro {
  margin: 2px 0 0;
  color: var(--portfolio-muted);
  font-size: 14px;
  line-height: 1.5;
}

.portfolio-page .contact-link,
.portfolio-page .brand-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.portfolio-page .page-heading {
  padding-block: 24px 40px;
  text-align: center;
}

.portfolio-page h1 {
  margin: 0;
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: -0.025em;
}

.portfolio-page .project-controls {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.portfolio-page .category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portfolio-page .filter-button,
.portfolio-page .reset-button {
  min-height: 48px;
  padding: 10px 20px;
  border: 2px solid var(--portfolio-ink);
  border-radius: 4px;
  background: var(--portfolio-background);
  color: var(--portfolio-ink);
  cursor: pointer;
}

.portfolio-page .filter-button[aria-pressed="true"] {
  background: var(--portfolio-ink);
  color: var(--portfolio-background);
}

.portfolio-page .search-field {
  width: 300px;
  flex: 0 1 300px;
}

.portfolio-page .search-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.portfolio-page .search-field input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 2px solid var(--portfolio-ink);
  border-radius: 4px;
  background: var(--portfolio-background);
  color: var(--portfolio-ink);
  appearance: none;
}

.portfolio-page .search-field input::placeholder {
  color: var(--portfolio-muted);
  opacity: 1;
}

.portfolio-page .results-status {
  margin: 20px 0;
  color: var(--portfolio-muted);
  font-size: 14px;
}

.portfolio-page .project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portfolio-page .project-grid > li {
  display: flex;
  min-width: 0;
}

.portfolio-page .project-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 210px;
  padding: 24px;
  border: 2px solid var(--portfolio-ink);
  border-radius: 4px;
}

.portfolio-page .project-graphic {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: calc(100% + 48px);
  aspect-ratio: 16 / 9;
  max-height: 240px;
  margin: -24px -24px 24px;
  padding: 24px;
  overflow: hidden;
  border-bottom: 2px solid var(--portfolio-ink);
  border-radius: 2px 2px 0 0;
  background: #111;
}

.portfolio-page .project-graphic img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: contain;
}

.portfolio-page .project-graphic--light {
  background: #fff;
}

.portfolio-page .project-graphic--icon img {
  width: 96px;
  height: 96px;
  max-width: 75%;
  max-height: 100%;
}

.portfolio-page .project-graphic--artwork,
.portfolio-page .project-graphic--illustration {
  padding: 0;
}

.portfolio-page .project-graphic--artwork img,
.portfolio-page .project-graphic--illustration img {
  object-fit: cover;
}

.portfolio-page .project-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.portfolio-page .project-card p {
  margin: 0 0 24px;
  color: var(--portfolio-muted);
  overflow-wrap: anywhere;
}

.portfolio-page .project-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 44px;
  margin-top: auto;
  max-width: 100%;
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.portfolio-page .empty-results {
  padding-block: 48px;
  text-align: center;
}

.portfolio-page .empty-results p {
  margin: 0 0 20px;
}

.portfolio-page .site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-block: 48px 32px;
  text-align: center;
}

.portfolio-page .site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.portfolio-page .social-links {
  display: flex;
  gap: 12px;
}

.portfolio-page .social-link {
  width: 44px;
  justify-content: center;
}

.portfolio-page .social-link svg {
  display: block;
}

@media (hover: hover) {
  .portfolio-page a:hover {
    text-decoration-thickness: 2px;
  }

  .portfolio-page .social-link:hover {
    color: var(--portfolio-muted);
  }

  .portfolio-page .filter-button[aria-pressed="false"]:hover,
  .portfolio-page .reset-button:hover {
    background: #181818;
  }
}

@media (max-width: 1100px) {
  .portfolio-page .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 850px) {
  .portfolio-page .page-width {
    width: calc(100% - 48px);
  }

  .portfolio-page .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-page .project-controls {
    align-items: stretch;
    flex-direction: column;
    gap: 20px;
  }

  .portfolio-page .search-field {
    width: 100%;
    flex-basis: auto;
  }
}

@media (max-width: 560px) {
  .portfolio-page .page-width {
    width: calc(100% - 32px);
  }

  .portfolio-page .site-header {
    align-items: flex-start;
    padding-block: 16px;
    gap: 16px;
  }

  .portfolio-page .brand-link {
    font-size: 16px;
  }

  .portfolio-page .contact-link {
    font-size: 14px;
  }

  .portfolio-page .page-heading {
    padding-block: 36px 40px;
  }

  .portfolio-page .filter-button {
    flex: 1 1 auto;
    padding-inline: 12px;
  }

  .portfolio-page .project-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .portfolio-page .project-card {
    min-height: 210px;
  }

  .portfolio-page .project-graphic {
    max-height: 220px;
  }
}

.portfolio-page .private-project {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: auto;
  color: var(--portfolio-muted);
  font-size: 14px;
}

.portfolio-page .contact-section {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid #555;
  scroll-margin-top: 16px;
}

.portfolio-page .contact-frame {
  display: block;
  width: 100%;
  height: 820px;
  border: 0;
  background: #000;
}

@media (max-width: 560px) {
  .portfolio-page .contact-section {
    margin-top: 56px;
    padding-top: 8px;
  }

  .portfolio-page .contact-frame {
    height: 800px;
  }
}
