/* Site header, with light/dark switch and site nav */
.site-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 2rem;
}
.home-link {
  display: flex;
}

.school-projects-article {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  text-align: center;
}

/* svg social icon bar */
.icons {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-flow: row wrap;
  gap: 2rem;
  justify-content: center;
}
ul svg {
  width: 44px;
  height: 44px;
}
.social-media-icon {
  fill: var(--ld-icon);
}
.social-media-icon:hover {
  fill: var(--ld-link-hover);
}
/* projects section */
main {
  margin-top: 3rem;
  margin-bottom: 3rem;
  text-align: center;
}
main h2 {
  margin-bottom: 1rem;
}
.project {
  background-color: var(--ld-project);
  padding: 2rem;
  border-radius: var(--reverse-corners);
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.projects {
  display: flex;
  flex-flow: column nowrap;
  gap: 2rem;
}
.project-text ul {
  list-style-type: none;
  display: flex;
  flex-flow: row wrap;
  gap: 1rem;
  justify-content: center;
  margin: 0;
  padding: 0;
}
.project-text li {
  background-color: var(--ld-project-pill);
  border-radius: var(--soft-corners);
  padding: 0.5rem;
  font-size: calc(var(--base-font-size) * 0.85);
}
.project img {
  grid-row: 1/2;
}
/* footer styling */
footer {
  text-align: center;
}
footer h2 {
  margin: 2rem 0;
}
footer .social-media-icon {
  fill: var(--ld-footer-icon);
}
.footer-text {
  line-height: 1.5;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.footer-text-box ul {
  list-style-type: none;
  font-size: calc(var(--base-font-size) * 0.85);
  margin: 0;
  padding: 0;
}
.footer-text-box h3 {
  font-size: calc(var(--base-font-size) * 0.85);
}
.footer-text-box li {
  line-height: 2;
}
/* light dark radio toggle */
/* credit https://codepen.io/scottohara/pen/zLZwNv */
@layer switch {
  .radio-switch {
    border: none;
    padding: 0;
    white-space: nowrap;
  }
  .radio-switch legend {
    font-size: 2px;
    opacity: 0;
    position: absolute;
  }
  .radio-switch label {
    display: inline-block;
    line-height: 2;
    font-size: calc(var(--base-font-size) * 0.9);
    position: relative;
    z-index: 2;
  }
  .radio-switch input {
    opacity: 0;
    position: absolute;
  }
  .radio-switch label:first-of-type {
    padding-right: 5em;
  }
  .radio-switch label:last-child {
    margin-left: -4.25em;
    padding-left: 5em;
  }
  .radio-switch:focus-within label:first-of-type:after {
    box-shadow:
      0 0 0 2px var(--pastel-light-blue),
      0 0 0 4px var(--pastel-dark-purple);
  }
  .radio-switch label:first-of-type:before,
  .radio-switch label:first-of-type:after {
    border: 1px solid #aaa;
    content: "";
    height: 2em;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    vertical-align: middle;
  }
  .radio-switch label:first-of-type:before {
    background: var(--pastel-cream);
    border: 1px solid #aaa;
    border-radius: 100%;
    position: absolute;
    right: -0.075em;
    transform: translateX(0em);
    transition: transform 0.2s ease-in-out;
    width: 2em;
    z-index: 2;
  }
  .radio-switch label:first-of-type:after {
    background: var(--pastel-black);
    border-radius: 1em;
    margin: 0 1em;
    transition: background 0.2s ease-in-out;
    width: 4em;
  }
  .radio-switch input:first-of-type:checked ~ label:first-of-type:after {
    background: var(--pastel-light-purple);
  }
  .radio-switch input:first-of-type:checked ~ label:first-of-type:before {
    transform: translateX(-2em);
  }
  .radio-switch input:last-of-type:checked ~ label:last-of-type {
    z-index: 1;
  }
}

/* desktop media queries */
@media (min-width: 750px) {
  :root {
    --base-font-size: 1.125rem;
  }
  .wrapper {
    padding: 5rem;
  }
  .site-header {
    gap: 0;
    justify-content: space-between;
  }
  .school-projects-article {
    grid-template-columns: 1fr;
    align-items: center;
    text-align: left;
  }
  .icons {
    justify-content: flex-start;
  }
  /* desktop footer styling */
  footer {
    text-align: left;
  }
  .footer-text {
    grid-template-columns: repeat(2, 1fr);
  }
  .radio-switch {
    justify-content: flex-end;
  }
}
@media (min-width: 850px) {
  main {
    text-align: left;
  }
  .project {
    grid-template-columns: 1fr 1fr;
  }
  .project img {
    grid-row: auto;
  }
  .project-text ul {
    justify-content: flex-start;
  }
}
