/* mobile first */

body {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  grid-template-areas:
    "header"
    "main"
    "footer";
  gap: 1rem;
  align-items: center;

  &::before {
    content: "";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
    height: 100vh;
    background-repeat: no-repeat;
    background-position: 50% 100%;
    background-image: url("../images/hero.jpg");
    background-size: cover;
  }
}

header {
  width: 100%;

  .hero {
    height: 100vh;
    width: 100%;
    display: flex;
    position: relative;

    .hero-text-container {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 100%;
      text-align: center;

      & > h1 {
        color: #fff;
      }
      & > h1 + h2 {
        color: #fff;
        font-size: 1.3rem;
      }
    }
  }
}

.portfolio-nav {
  display: none;
}

@counter-style animals {
  system: cyclic;
  symbols: "🕊️" "🦋" "🐢" "🐬" "🐳" "🐋" "🐠" "🐡" "🦈" "🐙";
  suffix: " ";
}

ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;

  li {
    padding: 0.05rem 1rem;
    border-radius: var(--border-radius);
    list-style: animals inside;

    span[class="label"] {
      font-weight: bold;
    }

    ul > li:first-child {
      margin-top: 0.5rem;
    }
  }
}

.my-joined-hackz-hackathon-section > ul > li {
  list-style: none;
}

#joined-event-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-gap: 1rem;
}

.hackathon-item {
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow-base);

  .hackathon-item-image {
    width: 100%;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    object-fit: cover;
  }

  .hackathon-item-details {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
  }

  .hackathon-item-title {
    font-weight: bold;
    font-size: var(--font-size-md);
    color: #333;
  }

  .hackathon-item-date {
    font-size: var(--font-size-xs);
    color: #666;
  }

  .hackathon-item-description {
    font-size: var(--font-size-sm);
    color: #444;
  }

  .hackathon-item-link {
    color: #007bff;
    font-weight: bold;
    display: inline-block;
    margin-top: 0.5rem;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: var(--font-size-sm);
    border: #007bff 1px solid;
    padding: 0.3rem 0.5rem;
    border-radius: var(--border-radius);
    background-color: #f8f9fa;
    text-align: center;
    width: 100%;
    &:focus {
      outline: none;
      box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
    }

    &:hover {
      text-decoration: underline;
      cursor: pointer;
      color: #0056b3;
      background-color: #e2e6ea;
      border-color: #0056b3;
    }
  }
}

main {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  grid-template-areas:
    "aside"
    "main-content";
  justify-items: center;
  gap: 1rem;

  aside {
    width: 95vw;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-base);
    background-color: white;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1.5rem 1rem;

    .my-profile-title {
      text-align: center;
    }

    section {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }

    figure {
      img {
        width: 144px;
        height: 144px;
        border-radius: 50%;
        margin: 0 auto;
        display: block;
      }
      figcaption {
        text-align: center;
        font-size: 0.9rem;
        color: #333;
        margin-top: 0.3rem;
        font-style: italic;
      }
    }
  }

  .main-content {
    width: 95vw;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-base);
    background-color: white;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;

    header {
      text-align: center;

      .portfolio-page-date {
        font-size: var(--font-size-xs);
        color: #333;
      }
    }

    section {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }
  }

  @media only screen and (min-width: 768px) {
    aside {
      width: 100%;
    }

    .main-content {
      width: 100%;
    }
  }

  @media only screen and (min-width: 1200px) {
    aside {
      width: 100%;
      padding: 1.5rem;
    }

    .main-content {
      width: 100%;
      padding: 1.5rem;
    }
  }
}

@media only screen and (min-width: 768px) {
  main {
    grid-template-columns: 1.5fr 3fr;
    grid-template-rows: auto;
    grid-template-areas: "aside main-content";
    justify-self: center;
    gap: 1rem;
    align-items: start;
    width: 95vw;
  }
}

@media only screen and (min-width: 1200px) {
  main {
    width: 1140px;
  }
}

.table-container {
  overflow-x: auto;

  table {
    border-collapse: collapse;
    border: 2px solid rgb(200, 200, 200);
    letter-spacing: 1px;
    font-size: 0.8rem;

    td,
    th {
      border: 1px solid rgb(190, 190, 190);
      padding: 10px 20px;
    }

    th {
      background-color: rgb(235, 235, 235);
    }

    td {
      text-align: center;
    }

    tr:nth-child(even) td {
      background-color: rgb(215, 215, 215);
    }

    tr:nth-child(odd) td {
      background-color: rgb(245, 245, 245);
    }

    caption {
      padding: 10px;
      text-align: left;
    }
  }
}

.github-repository-link {
  justify-self: center;
  img {
    width: 50px;
    height: 50px;
  }
}

footer {
  padding: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow-base);
  width: 95vw;
  margin-bottom: 1rem;
  background-color: white;
  justify-self: center;

  .footer-text {
    text-align: center;
    font-size: var(--font-size-xs);
    color: #333;
  }
}

@media only screen and (min-width: 1200px) {
  footer {
    width: 1140px;
  }
}
