.browser-frame {
  overflow: hidden;
  border: 1px solid #0e0f1340;
  border-radius: 7px;
  background: var(--white);
  min-width: 0;
}
.browser-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 5px 10px;
  background: var(--periwinkle-pale);
  border-bottom: 1px solid #0e0f1326;
  color: var(--periwinkle-deep);
  font: 400 11px/1.3 'JetBrains Mono', monospace;
}
.browser-dots {
  flex: none;
  width: 25px;
  height: 7px;
  background: radial-gradient(circle, currentColor 2px, transparent 2.5px) left center / 8px 7px repeat-x;
}
.browser-frame img { display: block; width: 100%; height: auto; }
.project-gallery-window {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.81;
  background: #f1f0ec;
}
.project-gallery-window [data-slide] { position: absolute; inset: 0; }
.project-gallery .project-gallery-window img {
  position: absolute;
  top: -4.1%;
  width: 101.17%;
  max-width: none;
  height: auto;
  aspect-ratio: auto;
}
.project-gallery .project-gallery-window .project-gallery-clean img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.project-gallery-controls,
.project-gallery-buttons { display: flex; align-items: center; }
.project-gallery-controls {
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px;
  border-top: 1px solid #0e0f1326;
}
.project-gallery-label { padding-block: 8px; font-size: 12px; line-height: 1.3; }
.project-gallery-buttons button {
  min-width: 38px;
  min-height: 44px;
  padding: 4px 7px;
  border: 0;
  background: transparent;
  color: var(--periwinkle-deep);
  font-size: 12px;
}
.project-gallery-buttons button:hover { background: var(--periwinkle-pale); }
.project-gallery-buttons button:focus-visible { outline-offset: -3px; }
.project-gallery-buttons button[data-gallery-step] { font-size: 18px; }

.portfolio-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 72px) clamp(20px, 4vw, 56px);
  padding-block: clamp(36px, 6vw, 90px);
}
.portfolio-tile a { display: block; text-decoration: none; }
.portfolio-tile-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.75;
  background: #f1f1ef;
  border: 1px solid #0e0f1326;
}
.portfolio-tile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  filter: grayscale(1);
}
.portfolio-tile-image .portfolio-tile-capture {
  position: absolute;
  top: -4%;
  width: 101.17%;
  max-width: none;
  height: auto;
}
@media (hover: hover) {
  .portfolio-tile a:hover img { filter: grayscale(0); }
}
.portfolio-tile a:is(:focus-visible, :active) img { filter: grayscale(0); }
@media (prefers-reduced-motion: no-preference) {
  .portfolio-tile-image img { transition: filter .28s ease; }
}
.portfolio-tile-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 14px;
}
.portfolio-tile-title h2 { font-size: clamp(26px, 3vw, 43px); }
.portfolio-tile-title span { color: var(--periwinkle-deep); font-size: 22px; }
.portfolio-tile-scope { margin-top: 8px; color: var(--periwinkle-deep); font-weight: 600; }
.portfolio-tile p:not(.portfolio-tile-scope) { margin-top: 3px; max-width: 50ch; }

.case-screens h2 { margin-bottom: clamp(20px, 3vw, 36px); }
.case-screen-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 4vw, 48px);
}
.case-screen-grid figure,
.case-screen-phone { margin: 0; }
.case-screen-grid img,
.case-screen-phone img { border: 1px solid #0e0f1326; }
.case-screen-grid figcaption,
.case-screen-phone figcaption { margin-top: 8px; font-size: 14px; }
.case-screen-phone { max-width: 310px; }
.case-screens .project-gallery { max-width: 960px; }

@media (max-width: 680px) {
  .portfolio-tiles,
  .case-screen-grid { grid-template-columns: minmax(0, 1fr); }
}
