/* General Styles */
:root {
  --background: #fafafa;
  --white: #ffffff;
  --black: #000000;
  --text-color: #4d4d4d;
  --error-msg: #990000;
  --links: #007bff;
  transition: 0.4s ease;
  font-size: 16px;
}

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

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.d-none {
  display: none;
}
.d-block {
  display: block;
}

.subheading {
  color: var(--black);
  font-family: "Varguina", sans-serif;
  font-size: 40px;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
}
.subheading:hover .star {
  animation-play-state: paused;
}

a {
  text-decoration: none;
  color: var(--black);
}

.btn {
  background-color: var(--black);
  color: var(--white);
  padding: 16px 32px;
  font-family: "Varguina", sans-serif;
  font-weight: 400;
  font-size: 16px;
}
.star {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: 3s infinite normal rotateItem;
}

.star img {
  width: 24px;
  height: 24px;
}

.fix-padding {
  padding-top: 100px;
}

.top-line {
  width: 100%;
  position: absolute;
  height: 1px;
  background-color: var(--black);
  top: 100px;
  z-index: 9;
}

.bottom-line {
  width: 100%;
  position: absolute;
  height: 1px;
  background-color: var(--black);
  bottom: 100px;
  z-index: 99;
}

.sidebar {
  position: fixed;
  top: 110px;
  right: 4%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.theme-toggle-desktop {
  height: 32px;
  width: 32px;
  background-color: var(--black);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  margin-bottom: 24px;
}
.theme-toggle-desktop img {
  width: 16px;
  height: auto;
}

.theme-toggle-mobile {
  height: 40px;
  width: 40px;
  background-color: var(--black);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
}
.theme-toggle-mobile img {
  width: 16px;
  height: auto;
}

.page-progress-path {
  width: 10px;
  height: 200px;
  border: 1px solid var(--black);
  overflow: hidden;
  position: relative;
  margin-bottom: 32px;
}
.pp-bar {
  position: absolute;
  top: 0;
  width: 100%;
  height: 0%;
  background-color: var(--black);
}

.sidebar-social-links {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.s-link {
  height: 35px;
  width: 35px;
  border: 1px solid var(--black);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}
.s-link-inner {
  background-color: var(--black);
  height: 25px;
  width: 25px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.s-link-inner::before {
  position: absolute;
  content: "";
  width: 2.5px;
  height: 2.5px;
  background-color: var(--black);
  border-radius: 50%;
  top: 50%;
  left: -3px;
  transform: translateY(-50%);
}
.s-link-inner::after {
  position: absolute;
  content: "";
  width: 2.5px;
  height: 2.5px;
  background-color: var(--black);
  border-radius: 50%;
  top: 50%;
  right: -3px;
  transform: translateY(-50%);
}
.s-link-inner img {
  width: 14px;
  height: auto;
}

@media screen and (max-width: 820px) {
  .subheading {
    font-size: 32px;
  }
}

/* ==== Main Styles ==== */
body {
  font-family: "Ubuntu", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  background-color: var(--background);
  color: var(--black);
  transition: 0.5s ease;
  transition-property: background-color, color;
  position: relative;
  overscroll-behavior-y: none;
}

p {
  color: var(--text-color);
}

.main-container {
  width: 80%;
  max-width: 1320px;
  margin-inline: auto;
  border-inline: 1px solid var(--black);
  overflow: hidden;
}

/* ==== header ===== */
header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 100px;
  background-color: var(--background);
  z-index: 999;
  border-bottom: 1px solid var(--black);
}

.header-inner {
  width: 80%;
  height: 100%;
  margin-inline: auto;
  border-inline: 1px solid var(--black);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-inline: 16px;
}

#logo {
  width: auto;
}
#logo img {
  animation: rotateItem 5s infinite;
  width: 70px;
  height: auto;
}
#logo:hover img {
  animation-play-state: paused;
}

nav {
  width: 50%;
}

nav ul {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
}

nav ul li {
  list-style-type: none;
}

nav a {
  font-size: 16px;
  font-family: "Varguina", sans-serif;
  font-weight: 400;
}

/* ==== Mobile Header ==== */
.mobile-header {
  position: fixed;
  display: none;
  top: 0;
  width: 100%;
  background-color: var(--background);
  padding: 8px 24px;
  z-index: 999;
  border-bottom: 1px solid var(--black);
}
.mobile-header-inner {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.m-logo {
  width: 50%;
}
.m-logo img {
  width: 60px;
  height: auto;
  animation: rotateItem 5s infinite;
}

.burger {
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 10px;
}
.burger div {
  background-color: var(--black);
  height: 2px;
}
.burger .line-1 {
  width: 20px;
  transition: 0.4s ease;
}
.burger .line-2 {
  width: 35px;
  transition: 0.4s ease;
}

.burger.active {
  align-items: center;
  gap: 0;
  position: relative;
}
.burger.active .line-1 {
  position: absolute;
  top: 50%;
  width: 35px;
  transform: rotate(-45deg) translateY(-50%);
}
.burger.active .line-2 {
  position: absolute;
  bottom: 50%;
  width: 35px;
  transform: rotate(45deg) translateY(50%);
}

.mobile-navbar {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 70px;
  background-color: var(--background);
  z-index: 99;
  transform: translateY(-200%);
  transition: transform 0.4s ease;
}
.overlay {
  position: fixed;
  z-index: 8;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transform: translateY(-200%);
  transition: 0.4s ease-in-out;
  display: none;
}

.mobile-navbar.active,
.overlay.active {
  transform: translateY(0);
}

.mobile-navbar-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.mobile-navbar li {
  list-style-type: none;
  margin-bottom: 24px;
}
.mobile-navbar li a {
  font-size: 48px;
  font-weight: 300;
}

.mobile-social-links {
  display: flex;
  width: 100%;
  justify-content: center;
  gap: 32px;
  margin-top: 32px;
}

.mobile-social-links .s-link {
  height: 64px;
  width: 64px;
}

.mobile-social-links .s-link-inner {
  width: 40px;
  height: 40px;
}

.mobile-social-links .s-link-inner img {
  width: 20px;
  height: auto;
}

.mobile-social-links .s-link-inner::before {
  width: 5px;
  height: 5px;
  left: -8px;
}
.mobile-social-links .s-link-inner::after {
  width: 5px;
  height: 5px;
  right: -8px;
}

@media screen and (max-width: 820px) {
  body {
    font-size: 16px;
  }
  .sidebar {
    display: none;
  }
  .header-inner {
    width: 95%;
  }
  .main-container {
    width: 95%;
  }
}

@media screen and (max-width: 520px) {
  header {
    display: none;
  }

  .mobile-header {
    display: block;
  }

  .main-container {
    width: 100%;
    border: none;
  }
}

/* ==== hero ===== */
.hero {
  display: flex;
  justify-content: space-between;
  height: 500px;
  position: relative;
}

.hero-first-half {
  width: 50%;
  height: 100%;
  border-right: 1px solid var(--black);
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  padding: 16px;
}

.hero-name {
  font-family: "Varguina", sans-serif;
  font-size: 100px;
  font-weight: 400;
  margin: 0;
}

.hero-text {
  line-height: 1.4;
}

.hero-btn {
  width: 200px;
  position: relative;
}
.hero-btn a {
  text-align: center;
  display: block;
  width: 100%;
}
.hero-btn::before {
  position: absolute;
  content: "";
  height: 100%;
  width: 100%;
  border: 1px solid var(--black);
  left: -5px;
  top: 5px;
  transition: top 0.1s ease, left 0.2s ease-in-out;
  z-index: -1;
}
.hero-btn:hover::before {
  left: 0;
  top: 0;
  border: none;
}

.hero-second-half {
  width: 50%;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 16px;
}
.hero-second-half img {
  width: 350px;
  height: auto;
  filter: grayscale(90%);
}
.hero-second-half img:hover {
  filter: grayscale(0);
}

.hero-rotator {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 50px;
  width: 100px;
}

.hero-rotator img {
  width: 100px;
  height: auto;
  animation: rotateItem 10s infinite;
}
.hero-rotator:hover img {
  animation-play-state: paused;
}

.hero-bg {
  position: absolute;
  width: 90%;
  margin-inline: auto;
  height: 80%;
  bottom: 100px;
  background-image: url("/assets/fe-bg.webp");
  aspect-ratio: 16/9;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  background-size: 700px;
  z-index: 9;
}

@media screen and (max-width: 820px) {
  .hero {
    height: 400px;
  }

  .hero-name {
    font-size: 64px;
  }

  .hero-second-half img {
    width: 300px;
    height: auto;
  }

  .hero-rotator {
    bottom: 30px;
    width: 80px;
  }

  .hero-rotator img {
    width: 80px;
    height: auto;
  }
}

@media screen and (max-width: 520px) {
  .hero {
    height: auto;
    flex-direction: column;
    padding: 24px;
  }
  .hero-first-half,
  .hero-second-half {
    width: 100%;
    border: none;
    padding: 0;
    margin-bottom: 32px;
  }

  .hero-second-half {
    margin-bottom: 64px;
  }

  .hero-first-half {
    position: relative;
    z-index: 9;
    gap: 16px;
  }

  .hero-name {
    font-size: 54px;
  }

  .hero-second-half {
    align-items: center;
    justify-content: center;
  }

  .hero-bg {
    background-attachment: unset;
    background-size: cover;
    height: 200px;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    bottom: unset;
  }

  .hero-rotator {
    bottom: unset;
    top: 310px;
    z-index: 10;
  }
}

/* ==== skills ==== */
.skills {
  width: 100%;
  border-block: 1px solid var(--black);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}
.skill-title {
  width: 20%;
  background-color: var(--white);
  height: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding-left: 16px;
  border-right: 1px solid var(--black);
}
.skill-list {
  width: 80%;
  height: 100%;
  overflow: hidden;
}
.skill-slider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: scrollingSkills 13s linear infinite;
  height: 100%;
}
.skill-list:hover .skill-slider {
  animation-play-state: paused;
}
.skill {
  width: 30%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-family: "Ubuntu";
  font-weight: 300;
  text-transform: uppercase;
  flex-shrink: 0;
  white-space: nowrap;
}
.skill-line {
  display: flex;
  align-items: center;
  width: fit-content;
}

.skill-line img {
  width: 50px;
  height: auto;
}

@media screen and (max-width: 820px) {
  .skills {
    height: 60px;
  }
  .skill {
    font-size: 14px;
  }
}

@media screen and (max-width: 520px) {
  .skill-title {
    width: 35%;
  }
  .skill-list {
    width: 65%;
  }
  .skill {
    width: 80%;
  }
  .skill-slider {
    animation: scrollingSkillsMobile 20s linear infinite;
  }
}

/* ==== projects ==== */
#projects {
  width: 100%;
  padding-inline: 16px;
}

#projects .subheading {
  margin-block: 32px;
  text-align: center;
  justify-content: center;
}

#projects .paragraph {
  text-align: center;
  margin-bottom: 16px;
  max-width: 800px;
  margin-inline: auto;
  line-height: 1.5;
}

#projects .paragraph a {
  color: var(--links);
  font-weight: 400;
}

.projects-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.project-cursor {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--black);
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  transform: scale(0);
  z-index: 99;
  pointer-events: none;
}
.project-cursor.active {
  transform: translate(-50%, -50%) scale(1);
}
.project-cursor img {
  width: 20px;
  height: 20px;
}

.project-timeline {
  width: 60px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.project-number {
  width: 28px;
  height: 28px;
  padding: 18px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--black);
  border-radius: 50%;
  font-size: 24px;
  font-family: "Ubuntu", sans-serif;
  font-weight: 300;
}

.timeline-path {
  width: 8px;
  height: 150px;
  border: 1px solid var(--black);
  position: relative;
}
.timeline-fill {
  width: 100%;
  height: 20%;
  position: absolute;
  top: 0;
  background-color: var(--black);
}

.project-cards-container {
  padding-inline: 16px;
  width: 100%;
  flex-shrink: 1;
}

.project-cards-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  margin-bottom: 24px;
}

.project-card {
  background-color: var(--white);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  border: 1px solid var(--black);
  cursor: none;
}

.hide {
  display: none;
  transform: scale(0);
  transition: scale 0.4s ease;
}

.show {
  display: flex;
  transform: scale(1);
  visibility: visible;
  transition: scale 0.4s ease;
}

.project-img {
  width: 150px;
  flex-shrink: 0;
  height: 150px;
  overflow: hidden;
}

.project-img img {
  width: 150px;
  height: 150px;
  object-fit: cover;
}

.project-details {
  width: 90%;
  flex-shrink: 1;
}

.project-name {
  font-weight: 500;
  font-family: "Ubuntu", sans-serif;
  margin-bottom: 16px;
  font-size: 24px;
}

.project-desc {
  line-height: 1.4;
  margin-bottom: 16px;
}

.project-tools {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.project-tools span {
  background-color: var(--black);
  color: var(--white);
  border-radius: 32px;
  padding: 8px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.load-project {
  display: block;
  width: auto;
  margin: 20px auto;
  outline: none;
  border: none;
  cursor: pointer;
}

@media screen and (max-width: 520px) {
  #projects {
    padding-inline: 24px;
  }

  .projects-container {
    display: block;
  }

  .project-timeline {
    display: none;
  }

  .project-cards-container {
    padding: 0;
  }

  .project-card {
    flex-direction: column;
    padding: 16px;
  }

  .project-img {
    width: 100%;
    height: 300px;
  }
  .project-img img {
    display: block;
    width: 300px;
    height: 300px;
    margin-inline: auto;
  }

  .project-details {
    width: 100%;
  }

  .project-tools {
    flex-wrap: wrap;
    gap: 8px;
  }
  .project-tools span {
    padding: 8px;
    flex-shrink: 0;
  }
}

#contact {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 500px;
  border-top: 1px solid var(--black);
}

#contact > div {
  height: 100%;
}

.contact-first-half {
  width: 50%;
  border-right: 1px solid var(--black);
  padding: 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.contact-first-half p {
  padding-block: 8px;
}

.contact-form {
  margin-top: 24px;
}
.form-group {
  width: 100%;
  position: relative;
}

.contact-form,
.contact-form :is(form, input, label, textarea) {
  width: 100%;
}
.contact-form input,
.contact-form textarea {
  padding: 8px;
  border: 1px solid var(--black);
  margin-bottom: 16px;
  position: relative;
  font-family: inherit;
  font-size: inherit;
  background-color: var(--white);
  resize: none;
}

.form-group-input {
  position: relative;
  color: var(--black);
}

.form-group label,
.form-group-input:placeholder-shown.form-group-input:not(:focus) ~ label {
  position: absolute;
  left: 16px;
  top: 8px;
  color: var(--text-color);
  transition: 0.1s ease-in;
  transition-property: top, left;
  width: auto;
  cursor: text;
}

.form-group-input:focus ~ label,
.form-group-input:not(:placeholder-shown).form-group-input:not(:focus) ~ label {
  top: -0.4rem;
  left: 8px;
  font-size: 0.8rem;
  color: var(--black);
  font-weight: 700;
  background-color: var(--white);
}

.contact-form input[type="submit"] {
  background-color: var(--black);
  color: var(--white);
  font-family: "Varguina", sans-serif;
  cursor: pointer;
}

.contact-second-half {
  width: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.contact-second-half img {
  width: 200px;
  height: auto;
  animation: rotateItem 10s infinite;
}
.contact-second-half img:hover {
  animation-play-state: paused;
}

.error-msg {
  font-size: 14px;
  color: var(--black);
  display: none;
}
.error-msg.error {
  color: var(--error-msg);
}

.error-msg.active {
  display: block;
}

footer {
  height: 100px;
  border-top: 1px solid var(--black);
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media screen and (max-width: 820px) {
  #contact {
    height: 450px;
  }
}

@media screen and (max-width: 520px) {
  .order-1 {
    order: 1;
  }
  .order-2 {
    order: 2;
  }
  #contact {
    flex-direction: column;
    height: auto;
    padding: 24px;
  }

  #contact > div {
    border: none;
    width: 100%;
    padding: 0;
  }
  .contact-second-half {
    margin-bottom: 24px;
  }
}

/* ==== Rotating Effect ==== */
@keyframes rotateItem {
  0% {
    transform: rotate(0) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.2);
  }
  75% {
    transform: rotate(360deg) scale(0.9);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes scrollingSkills {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-330%);
  }
}

@keyframes scrollingSkillsMobile {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-120%);
  }
}
