/* Keep portfolio media at its original aspect ratio and source resolution. */
.gallery img {
  aspect-ratio: 16 / 9;
  object-fit: contain;
  image-rendering: auto;
}

.gallery {
  display: block;
}

.gallery-main {
  width: 100%;
  margin-bottom: 14px;
}

.gallery-side {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Detailed portrait feature guides, shown whole at their original proportions. */
.system-detail-gallery .gallery-main {
  display: block;
  max-width: 720px;
  margin: 0 auto 24px;
}
.system-detail-gallery .gallery-side {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.system-detail-gallery img {
  aspect-ratio: 1122 / 1402;
  height: auto;
  object-fit: contain;
  background: #f5f3e9;
}
.system-detail-gallery button:hover img { transform: none; }
@media (max-width: 680px) {
  .system-detail-gallery .gallery-side { grid-template-columns: 1fr; gap: 18px; }
}

.video-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.video-card:first-child {
  grid-column: auto;
}

.video-card video {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #050605;
}

@media (max-width: 1050px) {
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .video-grid { grid-template-columns: 1fr; }
  .gallery-side { grid-template-columns: 1fr; }
}

.about-tags a {
  border: 1px solid var(--line);
  padding: 8px 11px;
  font-size: 10px;
  letter-spacing: .1em;
  transition: border-color .2s, color .2s, background .2s;
}

.about-tags a:hover,
.about-tags a:focus-visible {
  border-color: var(--lime);
  background: rgba(184, 255, 61, .08);
  color: var(--lime);
}

/* Actual homepage captures replace scaled-down live iframe embeds. */
.website-grid { align-items: stretch; }
.website-card { display: flex; flex-direction: column; border-radius: 16px; }
.website-card:focus-visible { outline: 3px solid #55750b; outline-offset: 5px; }
.preview-browser {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #e9e8e1;
  border-bottom: 1px solid rgba(11,13,12,.14);
  color: #50564e;
  font-size: 11px;
}
.preview-dots { display: flex; gap: 5px; }
.preview-dots i { width: 6px; height: 6px; border-radius: 50%; background: #a8ada7; }
.preview-browser b { margin-left: auto; color: #456009; font-size: 9px; letter-spacing: .12em; }
.website-card .site-preview {
  height: auto;
  aspect-ratio: 1348 / 926;
  border-bottom: 1px solid rgba(11,13,12,.14);
  background: #0b0d0c;
}
.site-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  transition: filter .25s ease;
}
.website-card:hover .site-preview img { filter: brightness(1.06); }
.website-card .site-card-copy { flex: 1; padding: 24px; }
@media (max-width:680px) {
  .preview-browser { padding: 10px 13px; gap: 10px; font-size: 10px; }
  .website-card .site-card-copy { padding: 20px; }
}
