/* TECH-MINIMAL Design System Styles */

:root {
  --primary: #e11d48;
  --secondary: #fff1f2;
  --accent: #7c3aed;
  --text: #4c0519;
  --bg: #fdf2f8;
}

body {
  background: #fafafa;
  color: #18181b;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

section {
  padding: 64px 16px;
}

.card {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 4px;
}

.btn {
  border-radius: 4px;
  border: 1px solid #18181b;
  font-weight: 500;
  background-color: var(--primary);
  color: #ffffff;
  transition: all 0.2s ease-in-out;
}

.btn:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.03em;
}

/* Screen Reader Only Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* CSS Gallery Implementation */
.gallery-main {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* Strict height constraint */
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.3s ease-in-out;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Slide Visibility Logic based on Checked Radio */
#img-1:checked ~ .gallery-main .slide-1,
#img-2:checked ~ .gallery-main .slide-2,
#img-3:checked ~ .gallery-main .slide-3,
#img-4:checked ~ .gallery-main .slide-4 {
  opacity: 1;
  z-index: 10;
}

/* Thumbnail Layout and Active States */
.thumbnails {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.thumbnails label {
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0.6;
  transition: opacity 0.2s, border-color 0.2s;
  width: 25%;
}

.thumbnails label img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

.thumbnails label:hover {
  opacity: 1;
}

#img-1:checked ~ .thumbnails label[for="img-1"],
#img-2:checked ~ .thumbnails label[for="img-2"],
#img-3:checked ~ .thumbnails label[for="img-3"],
#img-4:checked ~ .thumbnails label[for="img-4"] {
  border-color: var(--primary);
  opacity: 1;
}

/* Responsive Typography Adjustments */
body {
  font-size: clamp(14px, 4vw, 16px);
}

h1 {
  font-size: clamp(20px, 5vw, 28px);
}

h2 {
  font-size: clamp(22px, 5vw, 36px);
}