:root {
  color-scheme: light dark;
  --primary-color: light-dark(#226655, #4850E0);
  --text-color: light-dark(#000000, #ffffff);
  --background-color-primary: light-dark(#ffffff, #000000);
  --background-color-secondary: light-dark(#dbdbdb, #303030);
  --background-color-tr: light-dark(#ddddddbb, #55555588);
  --font-size: 16px;
  --font-family: "Roboto", sans-serif;
  --font-weight: 400;
  --blur: 0.5em;
  --contrast: 0;
  --radius-in: 15px;
  --radius-out: 20px;

  /*  change this for scaling  */
  --m: 4rem;

  --red: #ff6565;
  --pink: #ff64f9;
  --purple: #6b5fff;
  --blue: #4d8aff;
  --green: #5bff89;
  --yellow: #ffee55;
  --orange: #ff6d1b;
}

/* use teh font from ../assets/fonts/Harmond-ExtraBoldExpanded.otf */
@font-face {
  font-family: "sugar-magic";
  src: url("../assets/fonts/sugarmagicpersonaluseonly-jemyo.otf")
    format("opentype");
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  scrollbar-color: var(--primary-color) var(--background-color-primary);
}

body {
  background-color: var(--background-color-primary);
  font-family: var(--font-family);
  font-size: var(--font-size);
  font-weight: var(--font-weight);
  line-height: 1.5;
  color: var(--text-color);
  text-align: center;
  align-items: center;
  justify-content: center;
  scroll-behavior: smooth;
  margin: 0;
  padding: 4em 0 0 0;
  /* overflow-x: hidden; */
  height: 100vh;
  width: 100vw;
  transition: all 0.5s ease-in-out;

  @media screen and (max-width: 300px) {
    opacity: 0.5;
  }
}

h1 {
  font-family: "sugar-magic", sans-serif;
  width: 100vw;
  height: fit-content;
  transition: all 0.5s ease-in-out;
  z-index: 1;
  text-align: right;
  font-size: calc(100vw / 6);
  line-height: 0.9;
  padding: 0;
  margin: 0;
  @media screen and (max-width: 500px) {
    text-align: center;
  }
  strong {
    color: var(--primary-color);
  }
}

h2 {
  padding: 0.75em;
  font-size: 1.25rem;
  border-radius: var(--radius-out);
  color: var(--primary-color);
  background-color: var(--background-color-secondary);
  transition: all 0.5s ease-in-out;
}

h3 {
  padding: 0.75em;
  margin: 0;
  font-size: 1.25rem;
  border-radius: var(--radius-out);
  color: var(--text-color);
  background-color: var(--background-color-tr);
  backdrop-filter: blur(var(--blur));
  transition: all 0.5s ease-in-out;
}

nav {
  position: fixed;
  left: 1em;
  top: 50vh;
  transform: translateY(-50%);
  background-color: var(--background-color-tr);
  backdrop-filter: blur(var(--blur));
  color: var(--background-color-primary);
  width: fit-content;
  height: fit-content;
  border-radius: var(--radius-out);
  transition: all 0.5s ease-in-out;
  z-index: 100;
  padding: 40px auto;

  ul {
    justify-content: space-between;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0.1em;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s;
    li {
      margin: 0.25em;
      transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s;
      a {
        width: 3em;
        height: 3em;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        color: var(--text-color);
        padding: 1rem;
        border-radius: var(--radius-in);
        text-decoration: none;
        font-size: 0.75rem;
        text-align: center;
        transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s;
        opacity: 0.4;
        .caption {
          height: 0px;
          scale: 0;
          transition: all 0.5s ease-in-out;
        }
        @media screen and (min-width: 500px) {
          &:hover {
            opacity: 1;
            .caption {
              height: 100%;
              scale: 1;
            }
          }
        }
        i {
          scale: 1.75;
          padding: 0.5rem;
          transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s;
        }
      }
    }

    @media screen and (max-width: 750px) {
      display: flex;
    }
  }

  .active {
    background-color: var(--primary-color);
    color: var(--background-color-secondary);
    opacity: 1;
    .caption {
      height: 100%;
      scale: 1;
    }
  }

  &.mini {
    border-radius: 10em;
    a {
      border-radius: 10em;
      width: 1em !important;
      height: 1em !important;
      .caption {
        display: none;
      }
      i {
        scale: 1 !important;
      }
    }
  }

  @media screen and (max-width: 750px) {
    display: flex;
    flex-direction: column;
    bottom: 1em !important;
    left: 50%;
    top: auto;
    transform: translateX(-50%);
  }

  @media screen and (max-width: 500px) {
    a {
      width: 2em !important;
      height: 2em !important;
      span {
        display: none;
      }
      i {
        scale: 1.5 !important;
      }
    }
  }
}

.item {
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s;
  opacity: 0;
  transform: translate(0, 100px);
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100vw;
  .heading {
    display: flex;
    align-items: center;
    flex-direction: column;
  }

  #logo {
    background-color: var(--primary-color);
    height: 250px;
    width: 250px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: var(--radius-out);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    margin: 10px;
    padding: 0;
    position: fixed;
    top: 0;
    right: 0;

    @media screen and (max-height: 850px) {
      height: 50px;
      width: 50px;
    }

    @media screen and (max-width: 500px) {
      position: fixed;
      top: 0;
      margin: 0;
      right: 0;
      width: 100vw;
      height: 100vw;
      border-radius: 0 0 var(--radius-out) var(--radius-out);
    }

    &.macos-logo {
      background-image: url("../assets/img/articles/macos/article-icon-macos.png");
    }
    &.home-logo {
      background-image: url("../assets/img/notion.png");
    }
    &.pixel-logo {
      background-image: url("../assets/img/articles/pixel/article-icon-pixel.png");
    }
    &.scrolled {
      position: fixed;
      top: 0;
      right: 0;
      width: 50px;
      height: 50px;
      border-radius: 50%;
      margin: 10px;
      /* transition: all 0.5s ease-in-out; */
      z-index: 100;
    }
  }
}

.container p {
  overflow: hidden;
  white-space: nowrap;
  font-size: 1.2em;

  span.typed-text {
    color: var(--primary-color);
  }
  span.cursor {
    display: inline-block;
    background-color: var(--primary-color);
    margin-left: 0.1rem;
    width: 3px;
    animation: blink 1s infinite;
  }
  span.cursor.typing {
    animation: none;
  }
}

.button-view {
  background-color: var(--background-color-secondary);
  padding: 0.5em 1em;
  margin-bottom: 4em;
  border: 0.1em solid var(--text-color);
  border-radius: var(--radius-out);
  @media screen and (min-width: 500px) {
    &:hover {
      background-color: var(--primary-color);
      color: var(--background-color-secondary);
      cursor: none;
    }
  }
}

#photo {
  background-color: var(--background-color-secondary);
  animation: photos 20s infinite;
  transition: all 0.5s ease-in-out;
  width: 15em;
  height: 15em;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-out);
  margin: 3em;

  &:hover {
    scale: 1.2;
    border-radius: var(--radius-in);
    /* pause the animation */
    animation-play-state: paused;
  }
}

@keyframes photos {
  0% {
    background-image: url("../assets/img/photos/sameerasw-1.jpeg");
  }
  15% {
    background-image: url("../assets/img/photos/sameerasw-1.jpeg");
  }
  20% {
    background-image: url("../assets/img/photos/sameerasw-2.jpeg");
  }
  35% {
    background-image: url("../assets/img/photos/sameerasw-2.jpeg");
  }
  40% {
    background-image: url("../assets/img/photos/sameerasw-3.jpeg");
  }
  55% {
    background-image: url("../assets/img/photos/sameerasw-3.jpeg");
  }
  60% {
    background-image: url("../assets/img/photos/sameerasw-4.jpeg");
  }
  75% {
    background-image: url("../assets/img/photos/sameerasw-4.jpeg");
  }
  80% {
    background-image: url("../assets/img/photos/sameerasw-5.jpeg");
  }
  95% {
    background-image: url("../assets/img/photos/sameerasw-5.jpeg");
  }
  100% {
    background-image: url("../assets/img/photos/sameerasw-1.jpeg");
  }
}

@keyframes opacity {
  0% {
    opacity: 1;
  }
  25% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
  75% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}

#highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1em;
  width: 90vw;
  margin: 2em auto;
  transition: all 0.5s ease-in-out;
  a {
    text-decoration: none;
    transition: all 0.5s ease-in-out;
    border: 0.15em solid var(--text-color);
    /* overflow: hidden; */
    height: 15em;
  }

  .highlight-item {
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-out);
  }
  #edc {
    background-image: url("../assets/img/articles/edc/edc.jpeg");
  }
  #macos {
    background-image: url("../assets/img/articles/macos.png");
  }
  #foldericons {
    background-image: url("../assets/img/articles/folder-icons.png");
  }
  #tidwib {
    background-image: url("../assets/img/articles/telegram-tidwib.png");
  }
  #macro {
    background-image: url("../assets/img/articles/numpad-macros.png");
  }
  #more-github {
    background-image: url("../assets/img/articles/github.png");
  }
  #pixel {
    background-image: url("../assets/img/articles/pixel-notes.png");
  }
  #website {
    background-image: url("../assets/img/articles/website-source.png");
  }
  #menubar {
    background-image: url("../assets/img/articles/menu-bar.png");
  }
  #zen-i {
    background-image: url("../assets/img/articles/zen-i.jpeg");
  }
  #zen-t {
    background-image: url("../assets/img/articles/zen-t.jpeg");
  }

  @media screen and (max-width: 1000px) {
    grid-template-columns: repeat(2, 1fr);
    gap: 2em;
    @media screen and (max-width: 500px) {
      grid-template-columns: repeat(1, 1fr);
    }
  }
}

.content {
  margin: 0 25%;
  @media screen and (max-width: 1000px) {
    margin: 15%;
    @media screen and (max-width: 500px) {
      margin: 0 10%;
    }
  }

  p {
    padding: 0;
    text-wrap: wrap;
    text-align: justify;
  }

  .details {
    margin: 2em 2em;
    text-align: left;
    line-height: 2;
  }
}

#contact {
  margin-bottom: 20em;
}

.skills {
  margin: 4em auto;
  img {
    width: 50vw;
    @media screen and (max-width: 500px) {
      width: 80vw;
    }
  }
}

.stats {
  margin-top: 2em;
  filter: invert(1);
}

form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 2em 0;
  input {
    width: 50%;
    padding: 1.5em;
    margin: 1em;
    border: 0.1em solid var(--text-color);
    background-color: var(--background-color-secondary);
    color: var(--text-color);
    border-radius: var(--radius-out);
    transition: all 0.5s ease-in-out;
    &:focus {
      border: 0.1em solid var(--primary-color);
    }
    @media screen and (min-width: 500px) {
      &:hover {
        border: 0.1em solid var(--primary-color);
      }
    }
    &#btn {
      background-color: var(--primary-color);
      color: var(--background-color-secondary);
      border: 0.1em solid var(--primary-color);
      @media screen and (min-width: 500px) {
        &:hover {
          background-color: var(--background-color-secondary);
          color: var (--primary-color);
          cursor: pointer;
        }
      }
    }
  }
  textarea {
    width: 50%;
    padding: 1.5em;
    margin: 1em;
    border: 0.1em solid var(--text-color);
    border-radius: var(--radius-out);
    transition: all 0.5s ease-in-out;
    background-color: var(--background-color-secondary);
    color: var(--text-color);
    @media screen and (min-width: 500px) {
      &:focus {
        border: 0.1em solid var(--primary-color);
      }
      &:hover {
        border: 0.1em solid var(--primary-color);
      }
    }
  }
}

#resume {
  text-decoration: none;
  color: var(--text-color);
  padding: 0;
  margin: 0;
  div {
    width: 50%;
    margin: 7.5em 25%;
    padding: 1em 0;
  }
}

.accent {
  color: var(--primary-color);
}

.hidden {
  display: none;
}

.wip {
  width: 30%;
  margin: auto;
  transform: translate(-50%, 50%);
}

.new-article {
  position: absolute;
  /* filter: invert(1); */
  top: 0;
  left: 0;
  transform: translate(-20%, -30%);
  max-width: 5em;
  max-height: 5em;
  z-index: 10000;
}

#email-btn {
  width: fit-content;
  margin: 2em auto;
  background-color: var(--background-color-primary);
  border-radius: var(--radius-out);
  /* border: solid 0.1em var(--primary-color); */
  a {
    text-decoration: none;
    color: var(--text-color);
    /* background-color: var(--primary-color); */
    align-items: center;
    justify-content: center;
    display: flex;

    span {
      margin: 0.1em 0.25em;
    }
  }

  &:hover {
    background-color: var(--primary-color);
    border-radius: 10em;
    a {
      color: var(--background-color-primary);
    }
  }
}

#coffee-holder {
  #coffee {
    border-radius: var(--radius-out);
    background-color: var(--background-color-secondary);
    color: var(--primary-color);
    padding: 0.5em 1em;
    height: 25px;
    align-items: center;
    justify-content: center;
    display: flex;
    text-decoration: none;
    font-size: 1em;
    width: fit-content;
    margin: auto !important;
    &:hover {
      background-color: var(--primary-color);
      color: var(--background-color-primary) !important;
      border-radius: 10em;
    }
  }
}

#social-list {
  /* position: sticky; */
  width: 98vw;
  display: flex;
  flex-wrap: wrap;
  justify-content: left;
  align-items: center;
  margin: 20px 0 100px 0;
  @media screen and (max-width: 750px) {
    justify-content: center;
    margin: 20px 0 20vw 0;
    /* margin-bottom: -50px; */
  }
  a {
    margin: 0.25em;
    text-decoration: none;
    text-transform: uppercase;
    color: var(--text-color);
    transition: all 0.5s ease-in-out;
    padding: 0.5em 1em;
    border-radius: var(--radius-out);
    animation: opacity 4s infinite reverse;
    animation-delay: calc(var(--i) * 0.2s);
    &:hover {
      color: var(--background-color-primary);
      background-color: var(--primary-color);
    }
    i {
      font-size: 1em !important;
      margin-right: 0.5em;
      display: none;
    }
  }
}

.container-mini {
  position: relative;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  align-items: end;
  justify-content: end;
  display: flex;
  flex-direction: column;
  @media screen and (max-width: 750px) {
    bottom: 50px;
    margin-top: 50vw;
    height: fit-content;
    
    @media screen and (max-width: 500px) {
      bottom: 0;
      margin-top: 100vw;
      /* height: 50vh; */
    }
  }
}

#last {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--background-color-tr);
  backdrop-filter: blur(var(--blur));
  color: var(--text-color);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-in);
  display: flex;
  flex-direction: column;
  align-items: start;
  text-align: left;
  padding: 10px;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform: translateX(-120%);

  #eq{
    width: 30px;
    height: 30px;
    margin: 1em;
    filter: saturate(0);
    @media (prefers-color-scheme: light) {
      filter: saturate(0) invert(1);
    }
  }

  .history {
    height: 0;
    width: 0;
    opacity: 0;
    transition: all 0.2s ease-in-out;
  }

  &:hover {
    .history {
      height: 100%;
      width: 100%;
      opacity: 1;
      margin: 1em auto 0 auto;
    }
  }

  #music-holder {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
  }

  &.show {
    transform: translateX(0);
  }

  img,
  a {
    height: 60px;
    width: 60px;
    border-radius: 4px;
    margin-right: 10px;
    object-fit: cover; /* Ensure the image is fully visible */
  }

  #track {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    strong {
      color: var(--primary-color);
    }
  }

  #track p {
    margin: 0;
    font-size: 14px;
  }

  #track p:first-child {
    font-weight: bold;
  }

  #controls {
    display: flex;
    align-items: center;
  }
}
