.projects-grid {
display: flex;
flex-wrap: wrap;
gap: 1.5rem;
margin-top: 1rem;
justify-content: center;
}

.inspo-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
gap: 1rem;
margin-top: 1rem;
}

/* tim page layout helpers */
.tim-grid { display:grid; gap:16px; }
.tim-cols-3 { grid-template-columns: repeat(3, 1fr); }
.tim-cols-2 { grid-template-columns: repeat(2, 1fr); }


/* split (likes/dislikes) */
.tim-split { display:grid; grid-template-columns:1fr 1fr; gap:16px; }

/* quick stats row */
.tim-row { display:flex; gap:12px; flex-wrap:wrap; }

/* shop layout */
.product-grid {
--gap: 1rem;
display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap);
max-width: 1100px; margin: 0 auto; padding: 0 0.25rem;
}

/* projects layout*/
.projects-shell{
  display:grid;
  grid-template-columns: 280px 1fr;
  gap: 1.25rem;
  max-width: 1300px;
  margin: 0 auto;
  padding: 1rem;
  align-items:start;
}

.projects-main{
  min-width: 0;
}

html { scroll-behavior: smooth; }
section { scroll-margin-top: 90px; }
details { scroll-margin-top: 90px; }

/* table of contents */
.projects-toc{
  position: sticky;
  top: 90px;
  align-self: start;

  padding: 1rem;
  border-radius: 14px;

  /* rainbow border and the white glass */
  background:
    linear-gradient(0deg, rgba(255,255,255,0.82), rgba(255,255,255,0.82)) padding-box,
    var(--rainbow) border-box;
  background-size: 100% 100%, 400% 400%;
  border: 2px solid transparent;
  animation: rainbow-flow 18s linear infinite;

  box-shadow: 0 10px 26px rgba(0,0,0,0.14);
  backdrop-filter: blur(3px);
}

.toc-title{
  margin: 0 0 .75rem;
  font-weight: 900;
  text-align: center;
}

.toc-link{
  display:block;
  padding: .55rem .75rem;
  margin: .35rem 0;
  border-radius: 12px;
  text-decoration: none;
  color: #111;
  font-weight: 800;

  background:
    linear-gradient(0deg, rgba(255,255,255,0.65), rgba(255,255,255,0.65)) padding-box,
    var(--rainbow) border-box;
  background-size: 100% 100%, 400% 400%;
  border: 2px solid transparent;
  animation: rainbow-flow 22s linear infinite;

  transition: transform .15s ease, filter .2s ease, box-shadow .2s ease;
}

.toc-link:hover{
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.toc-sub{
  margin-left: .65rem;
  font-weight: 700;
  opacity: .95;
}

.toc-top{
  width: 100%;
  margin-top: .75rem;
}

/* center */
@media (max-width: 980px){
  .projects-shell{
    grid-template-columns: 1fr;
  }
  .projects-toc{
    position: relative;
    top: 0;
  }
}
