/* .prefix {
  display: none;
} */

/* background color div */
.section-hightligh {
  background-color: var(--highlighted-section);
  /* To display curve SVG */
  position: relative;
}

.blackbox {
  background-color: var(--dk-section-color);
  padding: 1rem;
  border-radius: 10px;
  font-size: 1rem;
  line-height: 1.5;
  position: relative;
  z-index: 10;
}

.gradient {
  background: linear-gradient(
    90deg,
    var(--gradient-color) 10%,
    var(--gradient-color-shade2) 50%,
    var(--gradient-color) 90%
  );
  height: 2px;
}

/* typing */
.cursor {
  display: inline-block;
  background-color: var(--text-color-shade2);
  margin-left: 0.1rem;
  width: 3px;
  height: 3rem;
  animation: blink 1s infinite;
  -moz-animation: blink 1s infinite;
}

.small-cursor {
  display: inline-block;
  background-color: var(--text-color-shade2);
  margin-left: 0.1rem;
  width: 3px;
  height: 1.5rem;
  animation: blink 1s infinite;
  -moz-animation: blink 1s infinite;
  visibility: hidden;
}

.cursor.typing {
  animation: none;
}

/* contact section */
#contact {
  max-width: 800px;
  text-align: center;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.contact input:not([type="submit"]),
.contact textarea {
  border: none;
  padding: 1rem;
  padding-top: 2rem;
  width: 100%;
  height: 40%;
  transition: 200ms;

  background: transparent;
  color: var(--text-color);
  font-size: 1.3rem;
  box-shadow: none;
  outline: none;
}

.contact input:not([type="submit"]):not(:focus),
.contact textarea:not(:focus) {
  border-bottom: 1px solid var(--white);
}

.contact input:not([type="submit"]):focus,
.contact textarea:focus {
  border-bottom: 1px solid var(--text-color-shade2);
}

#contact p:last-child {
  margin-top: 3rem;
}

/* navigation */
nav {
  font-family: var(--mono);
  font-size: 80%;
  padding: 1rem;
  position: fixed;
  top: 0px;
  background-color: var(--primary);
  opacity: 0.95;
  width: 100svw;
  box-shadow: 0 0px 15px 0 var(--shadow);
  z-index: 100;
}

.theme-icon .tooltip {
  position: relative;
  visibility: hidden;
  top: 8px;
  right: 57px;
  padding: 0.5rem;
  overflow: hidden;
  width: 136px;
  white-space: nowrap;
  background-color: var(--text-color);
  color: var(--primary);
  opacity: 0.5;
  border-radius: 0.5rem;
}

nav .theme-icon {
  /* width: calc(2rem - 4px); */
  height: 28px;
  width: 28px;
  aspect-ratio: 1/1;
  margin-left: 1rem;
  cursor: pointer;
  position: relative;

  -webkit-animation-duration: 1s;
  animation-duration: 1s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
  -webkit-animation-timing-function: ease-in-out;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  -webkit-animation-iteration-count: infinite;
}

#theme-icon {
  height: 28px;
  width: 28px;
}

.theme-icon:hover #theme-icon {
  animation: bounce 1s infinite;
  -moz-animation: bounce 1s infinite;
}

.theme-icon:hover .tooltip {
  visibility: visible;
  animation: tooltip-animation 0.5s;
  -moz-animation: tooltip-animation 0.5s;
}

nav h1 a {
  font-family: var(--sans);
  height: calc(2rem + 2px);
}

nav h1 a span {
  float: left;
  transition: transform 0.25s;
}

nav h1 a span:hover {
  /*have to   */
  transform: translateY(-3px);
}

nav ul {
  margin: 0;
  padding: 0 2rem 0 1rem;
  list-style-type: none;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

@media screen and (max-width: 1010px) and (min-width: 910px) {
  nav ul {
    font-size: 14px;
  }
  
}

nav li > a:not(.Call-to-action-button):not([class*="fa-"]) {
  height: 32px;
}

nav h1 a:hover,
nav li > a:hover:not(.Call-to-action-button):not([class*="fa-"]) {
  border-bottom: 2px solid var(--button-color);
}

nav li > a:not(.Call-to-action-button) {
  display: flex;
  align-items: center;
}

nav li:first-child {
  margin-right: auto;
  text-align: center;
}
nav [class*="fa-"] {
  font-size: 150%;
  color: var(--text-color);
}
nav h1 [class*="fa-"] {
  font-size: 100%;
  color: var(--button-color);
}

nav a {
  color: var(--text-color);
  text-decoration: none;
  display: block;
}

.alias {
  cursor: alias;
}

.pointer {
  cursor: pointer;
}

/* nav a:hover,
nav [class*="fa-"]:hover {
  color: var(--button-color-shade2);
} */

.Call-to-action-button {
  background-color: var(--button-color);
  padding: 0.5rem;
  border-radius: 5px;
  font-family: var(--mono);
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  border: unset;
}

.Call-to-action-button:hover {
  color: var(--primary);
  background-color: var(--button-color-shade2);
}

#skills,
#projects {
  padding: 4rem 2rem;
  background-color: var(--primary);
}

#skills .sidebar {
  width: 185px;
  height: 100%;
}

#skills ul {
  padding: 0px;
}

#skills .categories {
  list-style-type: none;
  padding: 1rem 1rem;
  border-left: 2px solid var(--gradient-color);
  cursor: pointer;
}

#skills .selected-categories,
#skills .categories:hover {
  list-style-type: none;
  padding: 1rem 1rem;
  cursor: pointer;
  border-left: 2px solid var(--text-color-shade2);
}

#skills .selected-categories {
  color: var(--text-color-shade2);
}

#skills .sidebar {
  display: grid;
  width: 100%;
  grid-template-columns: 185px auto;
}

#skills .skills {
  display: flex !important;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  /* -webkit-transition: all 0.3s ease-in-out;
  -moz-transition: all 0.3s ease-in-out;
  -o-transition: all 0.3s ease-in-out;
  -ms-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out; */
  animation: appear 1s;
}

#skills .skills-invisible {
  display: none;
}

#skills .skill {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem;
  box-shadow: 0 0 4px 0 var(--shadow);
  height: fit-content;
  max-height: 90px;
  cursor: context-menu;
}

#skills .skill-logo {
  width: 2rem;
  aspect-ratio: 1/1;
}

#uni-loadmore {
  color: var(--text-color);
}

#projects h2 {
  margin-bottom: calc(2.5rem * 1.5);
}

#projects h3 {
  color: var(--text-color-shade2);
}

#projects h4 {
  font-size: 1rem;
  font-family: var(--mono);
}
#projects ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-flow: row wrap;
  justify-content: flex-start;
  gap: 1rem;
  font-size: 1rem;
}

#projects .carousel-wrapper,
#projects img {
  margin: 2rem 0 4rem 0;
  border-radius: 25px;
  padding: 1rem;
  position: relative;
}

#projects .subtitle {
  font-size: 30px;
  font-weight: 500;
  margin-bottom: calc(2.5rem * 0.75);
}

#projects .subtitle svg {
  height: 24px;
  width: 24px;
}

#projects .subtitle path {
  fill: var(--text-color);
}

footer {
  text-align: center;
  padding: 1rem 1rem;
}

footer ul {
  list-style-type: none;
  padding: 0;
  margin: 1rem 0rem;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  gap: 3rem;
  font-size: 2rem;
}

footer div {
  font-size: 3.75vw;
}

footer a {
  color: var(--text-color);
  cursor: alias;
}

footer a:hover {
  border-bottom: 2px solid var(--button-color);
}

footer a span:hover {
  transform: translateY(-2px);
}

#timeline {
  background-color: var(--primary-shade2);
  padding: 4rem 2rem;
}

#timeline h2 {
  margin-bottom: calc(2.5rem);
}

.timeline {
  position: relative;
  width: 800px;
  margin: 0 auto;
  /* margin-top: 20px; */
  padding: 1em 0;
  list-style-type: none;
}

.timeline:before {
  position: absolute;
  left: 50%;
  top: 0;
  content: " ";
  display: block;
  width: 6px;
  height: 100%;
  margin-left: -3px;
  background: rgb(80, 80, 80);
  background: -moz-linear-gradient(
    top,
    rgba(80, 80, 80, 0) 0%,
    rgb(80, 80, 80) 8%,
    rgb(80, 80, 80) 92%,
    rgba(80, 80, 80, 0) 100%
  );
  background: -webkit-gradient(
    linear,
    left top,
    left bottom,
    color-stop(0%, rgba(30, 87, 153, 1)),
    color-stop(100%, rgba(125, 185, 232, 1))
  );
  background: -webkit-linear-gradient(
    top,
    rgba(80, 80, 80, 0) 0%,
    rgb(80, 80, 80) 8%,
    rgb(80, 80, 80) 92%,
    rgba(80, 80, 80, 0) 100%
  );
  background: -o-linear-gradient(
    top,
    rgba(80, 80, 80, 0) 0%,
    rgb(80, 80, 80) 8%,
    rgb(80, 80, 80) 92%,
    rgba(80, 80, 80, 0) 100%
  );
  background: -ms-linear-gradient(
    top,
    rgba(80, 80, 80, 0) 0%,
    rgb(80, 80, 80) 8%,
    rgb(80, 80, 80) 92%,
    rgba(80, 80, 80, 0) 100%
  );
  background: linear-gradient(
    to bottom,
    rgba(80, 80, 80, 0) 0%,
    rgb(80, 80, 80) 8%,
    rgb(80, 80, 80) 92%,
    rgba(80, 80, 80, 0) 100%
  );
}

.timeline li {
  padding: 1em 0;
}

.timeline li:after {
  content: "";
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;
}

.direction-l {
  position: relative;
  width: 370px;
  float: left;
  text-align: right;
}

.flag-flex {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.move-from-right {
  animation: move-from-right 5s ease-in;
}

.direction-r {
  position: relative;
  width: 369px;
  float: right;
}

.flag-wrapper {
  position: relative;
  display: inline-block;

  text-align: center;
}

.flag {
  position: relative;
  display: inline;
  background: var(--primary);
  padding: 6px 10px;
  border-radius: 5px;
  z-index: 2;
  font-weight: 600;
  text-align: left;
}

.flag:hover {
  background-color: var(--highlighted-section);
}

.flag a {
  text-decoration: none;
  color: var(--text-color);
  cursor: alias;

  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  max-width: 340px;
}

.direction-l .flag {
  -webkit-box-shadow: -1px 1px 1px var(--shadow), 0 0 1px var(--shadow);
  -moz-box-shadow: -1px 1px 1px var(--shadow), 0 0 1px var(--shadow);
  box-shadow: -1px 1px 1px var(--shadow), 0 0 1px var(--shadow);
}

.direction-r .flag {
  -webkit-box-shadow: 1px 1px 1px var(--shadow), 0 0 1px var(--shadow);
  -moz-box-shadow: 1px 1px 1px var(--shadow), 0 0 1px var(--shadow);
  box-shadow: 1px 1px 1px var(--shadow), 0 0 1px var(--shadow);
}

.direction-l .flag:before,
.direction-r .flag:before {
  position: absolute;
  top: 50%;
  content: " ";
  display: block;
  width: 20px;
  aspect-ratio: 1/1;
  margin-top: -10px;
  background: var(--primary-shade2);
  border-radius: 10px;
  border: 4px solid var(--text-color-shade2);
}

.direction-r .flag:before {
  left: -40px;
}
.direction-l .flag:before {
  right: -45px;
}

.direction-l .flag:after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  height: 0;
  width: 0;
  margin-top: -8px;
  border: solid transparent;
  border-left-color: var(--text-color);
  border-width: 8px;
  pointer-events: none;
}

.direction-r .flag:after {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  height: 0;
  width: 0;
  margin-top: -8px;
  border: solid transparent;
  border-right-color: var(--text-color);
  border-width: 8px;
  pointer-events: none;
}

.time-wrapper {
  display: inline;

  line-height: 1em;
  font-size: 0.66666em;
  color: var(--text-color-shade2);
  vertical-align: middle;
}

.direction-l .time-wrapper {
  float: left;
}

.direction-r .time-wrapper {
  float: right;
}

.time {
  display: inline-block;
  padding: 4px 6px;
  background: var(--primary);
  padding-top: 0.5rem;
}

.desc {
  margin: 1em 0.75em 0 0;

  font-size: 0.77777em;
  font-style: italic;
  line-height: 1.5em;
  padding: 8px;
}

.overflow-card {
  height: fit-content;
  /* white-space: nowrap; */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  /* max-width: 400px; */
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  animation: height-shrink 5s;
}

.overflow-visible-card {
  height: fit-content;
  overflow: hidden;
}

.desc span {
  color: var(--text-color-shade2);
}


/* ================ Timeline Media Queries ================ */

@media screen and (max-width: 825px) {
  /* Have to add this on specific width */
  .timeline {
    width: 100%;
    padding: 4em 0 1em 0;
  }

  .timeline li {
    padding: 2em 0;
  }

  .direction-l,
  .direction-r {
    float: none;
    width: 100%;

    text-align: center;
  }

  .flag-wrapper {
    text-align: center;
  }

  .direction-l .flag:before,
  .direction-r .flag:before {
    position: absolute;
    top: -30px;
    left: 50%;
    content: " ";
    display: block;
    margin-left: -9px;
  }

  .direction-l .flag:after,
  .direction-r .flag:after {
    content: "";
    position: absolute;
    left: 50%;
    top: -8px;
    height: 0;
    width: 0;
    margin-left: -8px;
    border: solid transparent;
    border-bottom-color: rgb(255, 255, 255);
    border-width: 8px;
    pointer-events: none;
  }

  .time-wrapper {
    display: block;
    position: relative;
    margin: 4px 0 0 0;
  }

  .flag-flex {
    display: unset !important;
  }

  .direction-l .time-wrapper {
    float: none;
  }

  .direction-r .time-wrapper {
    float: none;
  }

  .desc {
    position: relative;
    margin: 1em 0 0 0;
    padding: 1rem 0.5em;
    background: var(--primary);
    border-radius: 5px;
    -webkit-box-shadow: 0 0 1px desc;
    -moz-box-shadow: 0 0 1px desc;
    box-shadow: 0 0 1px desc;
  }

  .direction-l .desc,
  .direction-r .desc {
    position: relative;
    padding: 1em;
  }

  #skills .skill {
    padding: 0.75rem;
  }
}

/* ============== for gradient =============== */
.background-gradient {
  background: var(--background-gradient);
}

@media (min-width: 550px) {
  article {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 1rem;
  }

  #projects .carousel-wrapper,
  #projects img {
    /*  from column 1 to 6    */
    grid-column: 1/6;
    grid-row: 1/2;
    border-left: 1px solid var(--text-color-shade2);
    border-top: 1px solid var(--text-color-shade2);
  }
  /*  reverse the order. Because image itself has no order associated to it so it comes first  */
  .text {
    order: 2;
    text-align: right;
    grid-column: 5/11;
    grid-row: 1/2;
  }

  #projects ul {
    justify-content: flex-end;
  }

  #projects .reverse .carousel-wrapper,
  #projects .reverse img {
    grid-column: 6/11;
    grid-row: 1/2;
    border-left: none;
    border-right: 1px solid var(--text-color-shade2);
    border-top: 1px solid var(--text-color-shade2);
  }

  #projects .reverse .text {
    order: 2;
    text-align: left;
    grid-column: 1/7;
    grid-row: 1/2;
  }

  #projects .reverse ul {
    justify-content: flex-start;
  }
}

/* ========== media query for navigation ============ */
@media (min-width: 985px) {
  h2 {
    font-size: 3rem !important;
  }
}
@media (min-width: 850px) {
  .prefix {
    display: inline;
  }

  #intro {
    margin-top: 70px;
    min-height: calc(100svh - 73px);
  }

  h2 {
    font-size: 2.5rem;
  }

  .name span {
    font-size: 4rem;
  }

  nav li:first-child {
    flex-basis: auto;
    text-align: left;
    margin-right: auto;
  }

  footer div {
    font-size: 2rem;
  }
}

@media (max-width: 562px) {
  #intro {
    margin-top: 61px;
    min-height: calc(100svh - 64px);
  }

  h2 {
    font-size: 2rem;
  }

  .cursor {
    height: 20px;
  }

  p,
  div,
  span {
    font-size: 16px;
  }

  pre,
  pre + span {
    font-size: 1.3rem;
  }

  .name span {
    font-size: 7.5vw;
  }

  nav li:first-child {
    font-size: 1rem;
  }

  footer div {
    font-size: 5vw;
  }
}

@media (max-width: 344px) {
  #intro {
    margin-top: 115px;
    min-height: calc(100svh - 119px);
  }

  .name span {
    font-size: 16px;
  }

  nav li:first-child {
    font-size: 0.7rem;
  }

  #menuToggle span {
    width: 16px !important;
    height: 2px !important;
  }

  footer div {
    font-size: 5vw;
  }
}

/* scroll */
.scroll {
  position: absolute;
  bottom: 12px;
  left: 50%;
  width: 10px;
  /* font-size: 2.5vw; */
  color: var(--text-color);
  z-index: 11;
  opacity: 1;
  filter: alpha(opacity=100);
  cursor: pointer;
  -webkit-animation: glow 4s infinite;
  animation: glow 4s infinite;
}

.fa-angle-double-down:before {
  position: absolute;
  left: -7px;
  bottom: 4px;
}

.st1 {
  fill: var(--primary-shade2);
}

.scroll-background {
  display: block;
  position: absolute;
  bottom: -14px;
  width: 220px;
  left: 0;
  right: 0;
  margin: 0 auto;
}

.scroll-background path {
  stroke: var(--gradient-color-shade2);
  fill: var(--primary-shade2);
}

.curve {
  fill: var(--primary);
  stroke-width: 1px;
}

.svgcolor-light {
  position: relative;
  top: -2px;
  display: inline-block;
  width: 120%;
  left: -10%;
}

#menuToggle {
  display: block;
  position: fixed;
  top: 1.4rem;
  right: 1rem;
  cursor: pointer;
  z-index: 110;

  -webkit-user-select: none;
  user-select: none;
  display: none;
}

@media (max-width: 910px) {
  #menuToggle {
    display: block;
  }
  [role="web-menu-item"] {
    display: none;
  }
}

#menuToggle a {
  text-decoration: none;
  color: #232323;

  transition: color 0.3s ease;
}

#menuToggle input {
  display: block;
  width: 40px;
  height: 32px;
  position: absolute;
  top: -7px;
  left: -5px;

  cursor: pointer;

  opacity: 0; /* hide this */
  z-index: 2; /* and place it over the hamburger */

  -webkit-touch-callout: none;
}

#menuToggle span {
  display: block;
  width: 33px;
  height: 4px;
  margin-bottom: 5px;
  position: relative;

  background: #cdcdcd;
  border-radius: 3px;

  z-index: 1;

  transform-origin: 4px 0px;

  transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1),
    background 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), opacity 0.55s ease;
}

#menuToggle span:first-child {
  transform-origin: 0% 0%;
}

#menuToggle span:nth-last-child(2) {
  transform-origin: 0% 100%;
}

#menuToggle input:checked ~ span {
  opacity: 1;
  transform: rotate(45deg) translate(-2px, -1px);
  /* background: #232323; */
}

#menuToggle input:checked ~ span:nth-last-child(3) {
  opacity: 0;
  transform: rotate(0deg) scale(0.2, 0.2);
}

#menuToggle input:checked ~ span:nth-last-child(2) {
  transform: rotate(-45deg) translate(0, -1px);
}

#menu li {
  padding: 10px 0;
  font-size: 22px;
}

#menuToggle input:checked ~ ul {
  transform: translate(-100%, 0);
}

.mobile-menu {
  height: 100vh;
  width: 100vw;
  font-size: 5vw;
  list-style-type: circle;
  gap: 2rem;
}

.mobile-menu.none {
  display: none;
  animation: slide-to-right 1s;
  -moz-animation: slide-to-right 1s;
}

.mobile-menu.flex {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 3rem;
  animation: slide-from-right 1s;
  -moz-animation: slide-from-right 1s;
}

/* Scroll bar */
html::-webkit-scrollbar {
  width: 0px;
}

.milestone {
  position: relative;
  padding: 20px;
  background-color: var(--dk-section-color);
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  text-align: left;
  /* animation: shadowPulse 2s infinite;
  animation-delay: calc(0.5s * var(--i)); */
}

.milestone p {
  margin: 8px 0px;
}

.view-details-button {
  font-size: 14px;
}

.view-details-btn {
  background-color: #ecf0f1;  /* Light background color for the button */
  border: none;
  color: #2c3e50;  /* Dark text color to match the dark theme */
  padding: 4px 8px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.5s ease;
}

.view-details-btn:hover {
  background-color: #bdc3c7;  /* Slightly darker background color on hover */
}

.details {
  max-height: 0;
  overflow: hidden;
  margin-top: 10px;
  padding: 0 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: max-height 0.5s ease-in-out;
}
.details.open {
  max-height: 550px; /* Adjust this value as needed */
  padding: 0px 10px;
}
.details.open .content {
  opacity: 1;
  transform: translateY(0);
}

.content {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.detail-list {
  padding: 0px;
}

.detail-list li {
  list-style: none;
  padding-left: 36px;
  position: relative;
}

.detail-list li:before {
  content: "";
  position: absolute;
  left: 5px;
  display: inline-block;
  height: 22px;
  width: 22px;
  background-size: contain;
  background-image: url("../img/laptop-electronics.svg");
}

.carousel {
  /* width: 500px; */
  height: 300px;
  overflow: hidden;
  position: relative;
}

.slide {
  width: 100%;
  height: 100%;
  background-size: 100% 80%;
  background-repeat: no-repeat;
  background-position: center;
  position: absolute;
  transition: 0.5s ease;
}
