/* Keep Kita's palette and typography; arrange the portfolio like Blythe. */
.primary-link[aria-current="page"] {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45rem;
}

.portfolio-home .site-title { visibility: hidden; opacity: 0; pointer-events: none; }
.portfolio-home.show-header-title .site-title { visibility: visible; opacity: 1; pointer-events: auto; }

.mobile-theme-item { margin-top: .5rem; border-top: 1px solid rgba(128, 128, 128, .25); }
.mobile-theme-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  width: 100%;
  padding: .85rem 0 .35rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
}
.mobile-theme-icon {
  width: 1.5rem;
  height: 1.5rem;
  background: url(./icons/theme.svg) left center / cover no-repeat;
}
.dark .mobile-theme-icon { background-position: right center; filter: invert(1); }

.portfolio-intro {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  margin: 0 0 4rem;
}
.portfolio-avatar {
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
}
.portfolio-intro h1 { margin: 0 0 .4rem; }
.portfolio-intro p { margin: .4rem 0; }
.portfolio-social {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}
.portfolio-social a {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
}
.portfolio-social img { width: 1.65rem; height: 1.65rem; }
.dark .portfolio-social img { filter: invert(1); }
.portfolio-kicker {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .65;
}
.portfolio-sections { border-top: 1px solid currentColor; }
.portfolio-row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid currentColor;
}
.portfolio-row h2 {
  margin: .1rem 0 0;
  font-size: 1rem;
  font-weight: 700;
}
.portfolio-row p { margin-top: 0; }
.portfolio-section-content > :last-child { margin-bottom: 0; }
.portfolio-section-content h3 { margin: 0 0 .25rem; }
.portfolio-section-content h3:not(:first-child) { margin-top: 2.5rem; }
.portfolio-section-content h3 + p { margin: .15rem 0 .85rem; font-size: .9rem; line-height: 1.6; }
.portfolio-section-content h3 + p strong { font-size: 1rem; }
.portfolio-section-content ul { margin: .6rem 0 0; padding-left: 1.25rem; }
.portfolio-section-content li + li { margin-top: .35rem; }

.projects-page {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.projects-page > :not(.project-card) { grid-column: 1 / -1; }
.projects-page > h1 { margin-bottom: 2rem; }
.projects-page > h2 { margin: 2rem 0 .25rem; }
.projects-page > h3 { margin: 1.25rem 0 .25rem; }
.project-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 1.35rem;
  border: 1px solid rgba(24, 24, 27, .12);
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 3px 12px rgba(24, 24, 27, .04);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.project-card--image { min-height: 13rem; }
.project-card-accent {
  position: absolute;
  inset: 0 0 0 auto;
  width: 64%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: .62;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 105% 120% at 100% 50%, #000 8%, rgba(0, 0, 0, .9) 34%, transparent 86%);
  mask-image: radial-gradient(ellipse 105% 120% at 100% 50%, #000 8%, rgba(0, 0, 0, .9) 34%, transparent 86%);
}
.dark .project-card-accent { opacity: .52; }
.project-card--image .project-card-heading,
.project-card--image .project-card-description,
.project-card--image .project-card-tags { position: relative; z-index: 1; }
.project-card:hover,
.project-card:focus-within {
  transform: translateY(-2px);
  border-color: rgba(24, 24, 27, .28);
  box-shadow: 0 10px 24px rgba(24, 24, 27, .10);
}
.dark .project-card {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .055);
  box-shadow: 0 3px 12px rgba(0, 0, 0, .12);
}
.dark .project-card:hover,
.dark .project-card:focus-within {
  border-color: rgba(255, 255, 255, .3);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
}
.project-card h4 { margin: 0; font-size: 1.12rem; line-height: 1.35; }
.project-card h4 a { display: inline-flex; align-items: baseline; gap: .35rem; text-decoration: none; }
.project-card h4 a::after { content: ""; position: absolute; inset: 0; }
.project-card h4 a:hover { text-decoration: underline; }
.project-card-arrow { font-size: .9rem; opacity: .55; }
.project-card-description { flex: 1; margin: .75rem 0 1.25rem; font-size: .92rem; line-height: 1.55; opacity: .8; }
.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.project-card-tags li {
  margin: 0;
  padding: .22rem .6rem;
  border-radius: 999px;
  background: rgba(24, 24, 27, .08);
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.4;
}
.dark .project-card-tags li { background: rgba(255, 255, 255, .12); }

@media (max-width: 640px) {
  .portfolio-intro { grid-template-columns: 1fr; gap: 1rem; margin-bottom: 3rem; }
  .portfolio-avatar { width: 7rem; height: 7rem; }
  .portfolio-row { grid-template-columns: 1fr; gap: 1rem; }
  .projects-page { grid-template-columns: 1fr; }
}
