*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --base: #555;
  --base-100: #f1f1f1;
  --base-200: #dbd4d3;
  --base-400: #555;
  --base-800: #000;
  --yellow: #ffda4b;
  --yellow-100: #f5d105;
  --yellow-400: #ffda4b;
  --yellow-800: #8b6f00;
  --blue: #0a61ae;
  --blue-100: #e2f8ff;
  --blue-400: #61dafb;
  --blue-800: #0a61ae;
  --red-100: #7d1102;
  --red-400: #bd0e0b;
  --red-500: #d90a07;
  --red-800: #ff0505;
}

a {
  text-decoration: none;
  color: var(--blue);
  &:hover {
    text-decoration: underline;
  }
}

body {
  background-color: var(--base-800);
  font-family: "Open Sans", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-size: 20px;
}

header {
  padding-top: 10px;
  padding-bottom: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 32px;
  max-width: 1440px;
  margin: auto;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);

  .logo-holder {
    display: flex;
    padding: 10px;
    font-weight: 600;
    .logo {
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: var(--red-400);
      color: var(--base-800);
      height: 64px;
      width: 64px;
      margin-right: 20px;
      border-radius: 50%;
    }
    .logo-text {
      flex: 1; /*logo uses all of the space*/
      color: var(--red-500);
    }
    &:hover {
      text-decoration: none;
    }
  }

  nav {
    display: flex;
    align-items: center;
    ul {
      display: flex;
      list-style-type: none;
      gap: 5px;
      li {
        display: inline-block;
        a {
          display: inline-block;
          padding: 10px 20px;
          color: var(--red-400);
          &:hover {
            color: var(--red-800);
            text-decoration: none;
          }
        }
      }
    }
    .mobile-toggle {
      display: none;
      color: var(--red-400);
      padding: 10px;
      @media (max-width: 768px) {
        display: inline-block;
        position: absolute;
        top: 20px;
        right: 20px;
      }
    }
  }

  /* table view port */
  @media (max-width: 1024px) {
    flex-direction: column;
    align-items: center;
  }

  /* mobile view port */
  @media (max-width: 768px) {
    flex-direction: column;
    align-items: center;
    nav {
      margin-top: 10px;
      width: 100%;
      ul {
        display: none;
        flex-direction: column;
        text-align: center;
        width: 100%;
        &.active {
          display: flex;
        }
      }
    }
  }
}

.container {
  max-width: 1440px;
  margin: auto;
  gap: 30px;
  margin-top: 30px;
  margin-bottom: 30px;

  @media (max-width: 1440px) {
    padding-left: 30px;
    padding-right: 30px;
  }
}

.button {
  display: inline-block;
  padding: 10px 30px;
  color: var(--base-100);
  background-color: var(--base-400);
  border-radius: 10px;
  transition: ease 0.3s all;
  &:hover {
    text-decoration: none;
    background-color: var(--base-800);
    color: var(--base-100);
  }
  &.black {
    background-color: var(--base-800);
    color: var(--base-100);
    &:hover {
      background-color: var(--base-400);
      color: var(--red-800);
    }
  }
  &.red {
    background-color: var(--red-500);
    color: var(--base-800);
    &:hover {
      background-color: var(--red-100);
      color: var(--base-100);
    }
  }
}

h1 {
  background-color: var(--base-200);
  font-size: 64px;
  line-height: 1;
  margin-bottom: 10px;
  small {
    background-color: var(--base-200);
    display: block;
    font-weight: 100;
  }
  @media (max-width: 1024px) {
    font-size: 48px;
  }
}

p {
  background-color: var(--base-200);
}

.hero {
  display: flex;
  @media (max-width: 1024px) {
    flex-direction: column;
  }

  .hero-white {
    flex: 1;
    background-color: var(--base-200);
    border-radius: 30px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    span {
      background-color: var(--base-200);
      @media (max-width: 1024px) {
        display: none;
      }
    }
    .call-to-action {
      background-color: var(--base-200);
      margin-top: 20px;
      margin-bottom: 10px;
      a {
        margin-right: 10px;
        margin-bottom: 10px;
      }
    }
    .social-links {
      gap: 200px;
      background-color: var(--base-200);
      a {
        display: inline-block;
        padding: 10px;
        transition: box-shadow 0.3s ease-in-out;
        border-radius: 50px;
        background-color: var(--base-200);
        img {
          width: 48px;
          height: 48px;
          background-color: var(--base-200);
        }
        transition: box-shadow 0.3s ease-in-out, filter 0.3s ease-in-out;
        &:hover {
          text-decoration: none;
          color: var(--red-400);
          box-shadow: 0 0 10px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 0, 0, 0.7),
            0 0 30px rgba(0, 0, 0, 0.7);
        }
      }
    }
  }
  .hero-black {
    flex: 1;
    background-color: var(--base-800);
    border-radius: 30px;
    padding: 0px 30px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    img {
      background-color: var(--base-800);
      max-width: 420px;
    }
  }
}
.logos {
  background-color: var(--base-800);
  border-radius: 30px;
  padding: 30px, 0px;
  @media (max-width: 1440px) {
    border-radius: 0px;
  }
  .marquee {
    width: 100vw;
    max-width: 100%;
    height: 128px;
    overflow: hidden;
    position: relative;
    .track {
      position: absolute;
      white-space: nowrap;
      will-change: transform;
      animation: marquee 40s linear infinite;
      display: flex;
      gap: 10px;
    }
  }
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

h2 {
  font-size: 64px;
  color: var(--red-400);
  line-height: 1;
  margin-bottom: 10px;
  text-align: center;
  padding: 30px;
  small {
    display: block;
    font-weight: 100;
    font-size: 0.5em;
    color: var(--red-500);
  }
  @media (max-width: 1024px) {
    font-size: 48px;
  }
}

h3 {
  background-color: var(--base-200);
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 20px;
  color: var(--base-800);
}

.skills {
  .holder-white {
    background-color: var(--base-200);
    border-radius: 30px;
    padding: 30px;
    display: flex;
    @media (max-width: 1024px) {
      flex-direction: column;
    }
    .left-column {
      flex: 1;
      ul {
        background-color: var(--base-200);
        list-style: none;
        gap: 20px;
        margin-right: 100px;
        margin-bottom: 30px;
        li {
          display: inline-block;
          background-color: var(--base-800);
          color: var(--base-100);
          padding: 10px 20px;
          border-radius: 15px;
          gap: 20px;
          margin-bottom: 5px;
        }
      }
    }
    .right-column {
      flex: 1;
      p {
        margin-bottom: 20px;
      }
    }
    .left-column,
    .right-column {
      background-color: transparent;
    }
  }
}

.work-experience {
  .jobs {
    display: flex;
    gap: 30px;
    @media (max-width: 1024px) {
      flex-direction: column;
    }
    article {
      background-color: var(--base-400);
      padding: 30px;
      border-radius: 30px;
      flex: 1;
      h3 {
        background-color: var(--base-400);
        color: var(--base-100);
        margin-top: 20px;
        margin-bottom: 10px;
      }
      div {
        font-weight: 600;
        margin-bottom: 5px;
        color: var(--base-100);
      }
      p {
        background-color: var(--base-400);
        color: var(--base-100);
        margin-bottom: 10px;
      }
      figure {
        width: 100%;
        padding: 50%;
        overflow: hidden;
        position: relative;
        border-radius: 15px;
        img {
          position: absolute;
          top: 0;
          left: 0;
          height: 100%;
          object-fit: cover;
          transition: ease 3s all;
        }
        figcaption {
          position: absolute;
          bottom: 0;
          left: 0;
          right: 0;
          background-color: var(--base-800);
          color: var(--base-100);
          text-align: center;
          padding: 10px;
          opacity: 0;
          visibility: hidden;
          transition: ease 0.3 all;
        }
        &:hover {
          figcaption {
            opacity: 1;
            visibility: visible;
          }
          img {
            transform: scale(1.2);
          }
        }
      }
    }
  }
}

.bento {
  .bento-grid {
    display: grid;
    gap: 20px; /* Reduce gap for a more compact layout */
    grid-template-columns: repeat(
      3,
      1fr
    ); /* Adjust columns to 3 for a uniform look */
    grid-template-rows: auto; /* Allow rows to auto-size based on content */
    @media (max-width: 1024px) {
      grid-template-columns: repeat(
        2,
        1fr
      ); /* Adjust columns for smaller screens */
      grid-template-rows: repeat(6, auto); /* Adjust rows for smaller screens */
    }
  }
  @media (max-width: 768px) {
    display: flex;
    flex-direction: column;
    gap: 30px;
    height: auto;
  }
  .bento-item {
    padding: 0; /* Remove padding */
    background-color: var(--base-200);
    border-radius: 10px; /* Adjust border radius for a softer look */
    position: relative;
    overflow: hidden;
    display: flex; /* Ensure the container stretches to fit the image */
    justify-content: center;
    align-items: center;
    height: 180px; /* Adjust height for better uniformity */
    img {
      width: 100%; /* Ensure the image takes the full width */
      height: 100%; /* Ensure the image takes the full height */
      object-fit: cover; /* Maintain aspect ratio while covering the box */
    }
    &:hover {
      figcaption {
        opacity: 1;
        visibility: visible;
      }
      img {
        transform: scale(1.2);
      }
    }
  }

  &:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
    @media (max-width: 1024px) {
      grid-column: span 2;
      grid-row: span 2;
    }
  }
  &:nth-child(2) {
    grid-column: span 2;
    grid-row: span 1;
    @media (max-width: 1024px) {
      grid-column: span 3;
      grid-row: span 2;
    }
  }
  &:nth-child(3) {
    grid-column: span 1;
    grid-row: span 1;
    @media (max-width: 1024px) {
      grid-column: span 3;
      grid-row: span 2;
    }
  }
  &:nth-child(4) {
    grid-column: span 1;
    grid-row: span 1;
    @media (max-width: 1024px) {
      grid-column: span 2;
      grid-row: span 4;
    }
  }
  &:nth-child(5) {
    grid-column: span 2;
    grid-row: span 1;
    @media (max-width: 1024px) {
      grid-column: span 3;
      grid-row: span 2;
    }
  }
  &:nth-child(6) {
    grid-column: span 5;
    grid-row: span 3;
    @media (max-width: 1024px) {
      grid-column: span 5;
      grid-row: span 2;
    }
  }
}

.chat-bot {
  .chat-bot-white {
    background-color: var(--base-200);
    border-radius: 30px;
    padding: 30px;
    gap: 30px;
    display: flex;
    @media (max-width: 1024px) {
      flex-direction: column;
    }

    p {
      margin-bottom: 30px;
    }
    .chat-info {
      flex: 3;
      padding-right: 30px;
      background-color: var(--base-200);
    }
    .chat-box {
      flex: 4;
      background-color: var(--base-200);
      border-radius: 15px;
      padding: 30px;
      display: flex;
      flex-direction: column;

      a {
        border-radius: 50px;
      }
      .scroll-area {
        background-color: var(--base-200);
        max-height: 300px;
        height: 300px;
        overflow-y: scroll;
        ul {
          background-color: var(--base-200);
          display: flex;
          flex-direction: column;
          justify-content: flex-end;
          gap: 15px;
          li {
            display: flex;
            background-color: var(--base-200);
            align-items: center;
            gap: 15px;

            &:nth-child(even) {
              text-align: right;
              justify-content: flex-end;
              flex-direction: row-reverse;
              span {
                border-radius: 50%;
                font-weight: bold;
                color: var(--base-200);
                background-color: var(--base-800);
              }
            }
            span {
              font-weight: bold;
              background-color: var(
                --red-500
              ); /* Ensure red bubble has same style */
              width: 64px;
              height: 64px;
              border-radius: 50%;
              display: inline-flex;
              justify-content: center;
              align-items: center;
              color: var(--base-100); /* Ensure text is readable */
              @media (max-width: 768px) {
                height: 48px;
                width: 48px;
              }
            }
          }
        }
      }
    }

    .message {
      background-color: var(--base-200);
    }

    .chat-message {
      background-color: var(--base-200); /* Set your desired background color */
      display: flex;
      gap: 10px;
      padding: 10px; /* Add some padding */
      border-radius: 15px; /* Optional: Add some border radius */
      margin-top: 10px; /* Optional: Add some margin at the top */
      input {
        flex: 1;
        padding: 10px;
        border: 1px solid var(--base-400);
        border-radius: 10px;
        background-color: var(
          --base-100
        ); /* Match the input field background */
        &:hover {
          outline: none;
          background-color: var(--base-800);
          color: var(--base-100);
        }
        &:focus {
          background-color: var(--base-800);
          color: var(--base-100);
        }
      }
      button {
        padding: 10px 20px;
        border: none;
        border-radius: 10px;
        background-color: var(--red-400);
        color: var(--base-800);
        font-weight: bolder;
        font-size: large;
        cursor: pointer;
        transition: background-color 0.3s ease;
        &:hover {
          background-color: var(--red-800);
        }
      }
    }
  }
}

/* Add animations */
.hero h1,
.hero p,
.hero .call-to-action,
.hero .social-links,
.hero img {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.hero h1.loaded,
.hero p.loaded,
.hero .call-to-action.loaded,
.hero .social-links.loaded,
.hero img.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll to top button */
.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  background-color: var(--base-800);
  color: var(--base-100);
  border: none;
  padding: 10px 20px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
}
.scroll-to-top:hover {
  background-color: var(--red-800);
}
