/* shared.css */
body {
  display: flex;
  box-sizing: border-box;
  --base: 3px;
  --step-1: calc(var(--base) * 1.618);
  --step-2: calc(var(--step-1) * 1.618);
  --step-3: calc(var(--step-2) * 1.618);
  --step-4: calc(var(--step-3) * 1.618);
  --cell-size: var(--step-1);
  --gap: var(--step-2);
  --page-padding: var(--step-4);
  padding: var(--page-padding);
  background-color: #2a2a2a;
  justify-content: center;
  align-items:  center;
  min-height: 100vh;
  margin: 0;
}

.bloom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.bloom-cell {
  width: var(--cell-size);
  height: var(--cell-size);
  opacity: 0;
  position: relative;
}

.bloom-cell:before, .bloom-cell:after {
  content: "";
  position: absolute;
  background: inherit;
  filter: blur(var(--cell-size)) brightness(80%) opacity(.8);
  z-index: -1;
  background-size: 100% 100%;
  width: 100%;
  height: 100%;
}

.bloom-cell:before {
  top: -10%;
  left: -10%;
}

.bloom-cell:after {
  bottom: -10%;
  left: -10%;
}

.github-link {
  position: fixed;
  top: var(--step-3);
  right: var(--step-3);
  display: flex;
  z-index: 10;
  background: #09090b;
  border-radius: 50%;
  justify-content: center;
  align-items:  center;
  width: 40px;
  height: 40px;
  transition: background .2s;
}

.github-link:hover {
  background: #18181b;
}

.github-link svg {
  fill: #fff;
  width: 20px;
  height: 20px;
}

/* main.css */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  justify-items: center;
  width: 100%;
  max-width: 720px;
}

.bloom-btn {
  border-radius: var(--step-4);
  padding: var(--step-3) var(--step-4);
  cursor: pointer;
  display: flex;
  align-items:  center;
  gap: var(--step-3);
  background: #09090b;
  border: none;
  width: -moz-fit-content;
  width: fit-content;
  transition: background .2s;
}

.bloom-label {
  color: #fff;
  filter: brightness(1.5);
  letter-spacing: .02em;
  font-family: Martian Mono, monospace;
  font-size: 16px;
  line-height: 1;
}

.bloom-btn:hover {
  background: #18181b;
}

.gallery-footer {
  grid-column: 1 / -1;
  display: flex;
  padding-top: var(--step-3);
  justify-content: center;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  border-radius: var(--step-4);
  padding: var(--step-3) var(--step-4);
  letter-spacing: .02em;
  background: #09090b;
  transition: background .2s;
  font-family: Martian Mono, monospace;
  font-size: 16px;
  line-height: 1;
}

.nav-link:hover {
  background: #18181b;
}

@media (max-width: 640px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 641px) and (max-width: 960px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}
