@import url("https://googleapis.com");

* {
  padding: 0;
  margin: auto;
  box-sizing: border-box;
}

:root {
  --primary-color: #100E14;
  --secondary-color: #16101D;
  --border-color: #26232B;
  --border-hover-color: #443f4d;
  --button-color: #A855F7;
  --button-hover-color: #9743e4;
  --text-color: #c8daee;
  --shadow-color: #83898a;
  --primary-font: "poppins", sans-serif;
  --secondary-font: "montserrat", sans-serif;
}

html {
  background-color: var(--primary-color);
  scroll-behavior: smooth;
  margin: 0 10px;
}

/* NAVBAR */
.navbar {
  /* Keeps the navbar pinned to the top while scrolling */
  position: sticky;
  /* Keeps the navbar centered horizontally */
  top: 0;
  /* Keeps the navbar above other content */
  z-index: 1000;
  /* Sets the navbar width to stay compact on larger screens */
  width: min(92%, 560px);
  /* Centers the navbar on the page */
  margin: 0 auto 20px;
  /* Gives the navbar a glass effect */
  background: rgba(255, 255, 255, 0.2);
  /* Adds the blur backdrop effect */
  backdrop-filter: blur(32px);
  /* Gives the navbar a softer shadow */
  box-shadow: 3px 16px 32px 0 #2e2e2e;
  /* Uses a visible border with a soft color */
  border: 1px solid rgba(242, 231, 229, 0.3);
  /* Rounds the bottom corners of the navbar */
  border-bottom-left-radius: 16px;
  /* Rounds the bottom corners of the navbar */
  border-bottom-right-radius: 16px;
  /* Prevents the navbar content from overflowing */
  overflow: hidden;
}

/*  */
.nav-links {
  /* Displays the links in a row on desktop */
  display: flex;
  /* Keeps the links aligned horizontally */
  flex-direction: row;
  /* Adds spacing inside the navbar */
  padding: 10px;
  /* Centers the links inside the navbar */
  justify-content: center;
  /* Removes the default bullet points */
  list-style-type: none;
  /* Sets the text color to white */
  color: var(--text-color);
  /* Adds space between each link */
  gap: 1.25rem;
}

.menu-link {
  /* Positions the underline effect relative to the link */
  position: relative;
  /* Removes the default underline from links */
  text-decoration: none;
  /* Uses the theme detail color for the text */
  color: var(--text-color);
  font-family: var(--secondary-font);
}

.hamburger {
  /* Hides the hamburger button on desktop */
  display: none;
  /* Removes the default button border */
  border: none;
  /* Removes the default button background */
  background: transparent;
  /* Adds padding around the icon */
  padding: 10px;
  /* Makes the button clickable */
  cursor: pointer;
  /* Aligns the icon vertically */
  flex-direction: column;
  /* Centers the icon inside the button */
  align-stack-containers: center;
  /* Adds a small gap between icon bars */
  gap: 4px;
}

.hamburger span {
  /* Sets the width of each hamburger line */
  width: 24px;
  /* Sets the height of each hamburger line */
  height: 2px;
  /* Makes the hamburger lines visible */
  background: white;
  /* Adds rounded corners to the lines */
  border-radius: 999px;
  /* Keeps each line as a block element */
  display: block;
}

.menu-link::after {
  /* Creates the underline effect for the link */
  content: "";
  /* Positions the underline below the link */
  position: absolute;
  /* Starts the underline from the left */
  left: 0;
  /* Places the underline below the link text */
  bottom: -5px;
  /* Sets the underline width to the full link */
  width: 100%;
  /* Sets the underline thickness */
  height: 2px;
  /* Gives the underline a themed color */
  background-color: var(--primary-color);
  /* Hides the underline by default */
  transform: scaleX(0);
  /* Makes the underline grow from the left */
  transform-origin: left;
  /* Smooths the underline animation */
  transition: transform 0.5s ease-in-out;
}

.menu-link:hover::after {
  /* Shows the underline on hover */
  transform: scaleX(1);
}

h2 {
  text-align: center;
  color: var(--text-color);
  font-family: var(--primary-font);
  font-size: clamp(28px, 5vw, 40px);
}

.home {
  width: 100%;
  min-height: 350px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  padding: 10px 75px;
  flex-wrap: wrap;
}

.hero-section {
  position: relative;
  flex-shrink: 0;
  width: 250px;
  height: 250px;
  border-radius: 16px;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: -2px;
  width: 150%;
  height: 150%;
  top: -25%;
  left: -25%;

  background: conic-gradient(
    from 0deg,
    #751628 0deg 90deg,
    #6d1425 90deg 180deg,
    #4c0b17 180deg 270deg,
    #3b0610 270deg 360deg
  );

  animation: walk-color 5s linear infinite;
  z-index: 0;
}

@keyframes walk-color {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.hero-section::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 8px;
  z-index: 1;
}

.hero-section > img {
  position: absolute;
  z-index: 2;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  border-radius: 16px;
  object-fit: cover;
  object-position: top;
}

.biography {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.biography > h1 {
  font-family: var(--primary-font);
  font-size: clamp(36px, 8vw, 82px);
  color: var(--text-color);
  line-height: 1.1;
}

.biography > h3 {
  font-family: var(--secondary-font);
  font-size: clamp(14px, 2.2vw, 22px);
  overflow: hidden;
  border-right: 3px solid white;
  white-space: nowrap;
  width: 0;
  max-width: 30ch;
  color: var(--shadow-color);
  display: inline-block;
  animation:
    typing 7s steps(30, end) infinite,
    blink 3s step-end infinite;
}


@keyframes typing {
  0% {
    width: 0;
  }
  100% {
    width: 30ch;
  }
}

@keyframes blink {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: #fff;
  }
}

.biography > a {
  padding: 30px 0;
  display: flex;
  text-decoration: none;
}

.biography > a > .cv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 300px;
  padding: 14px 18px;
  height: auto;
  border: none;
  border-radius: 12px;
  background: var(--button-color);
  color: var(--text-color);
  font-family: var(--secondary-font);
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s ease;
}

.biography > a > .cv-btn:hover {
  background: var(--button-hover-color);
}

.about {
  overflow: hidden;
  width: 90%;
  min-height: 230px;
  height: auto;
  background: var(--secondary-color);
  padding: 30px;
  border-radius: 16px;
  gap: 10px;
  border: 3px solid var(--border-color);
  transition: transform 0.5s ease-in-out;
}

.about:hover {
  transform: translateY(5px);
  border: 3px solid var(--border-hover-color);
}

.about > h2 {
  font-family: var(--primary-font);
  margin-bottom: 30px;
}

.short-desc {
  font-size: clamp(14px, 1.8vw, 20px);
  letter-spacing: 1.5;
  word-break: break-word;
  color: var(--text-color);
  max-width: 100%;
  line-height: 1.6;
}

.tech-stack {
  width: 100%;
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.stack-container {
  width: 100%;
  max-width: 300px;
  height: 100px;
  display: flex;
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  background: var(--primary-color);
  border: 3px solid var(--border-color);
  transition: .20s ease;
}

.stack-container > img {
  width: 75px;
  filter: grayscale(85%);
  opacity: 0.8;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.stack-container:hover {
  border: 3px solid var(--border-hover-color);
  background: #30305b;
}

.stack-container:hover > img {
  filter: grayscale(0%);
  opacity: 1;
}

.project {
  width: 90%;
  padding: 30px;
  border-radius: 16px;
  gap: 10px;
  margin-bottom: 70px;
}

.list-project {
  padding-top: 15px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.card_project {
  width: 100%;
  height: 450px;
  min-height: 450px;
  font-family: var(--primary-font);
  background: var(--secondary-color);
  border-radius: 16px;
  margin-bottom: 70px;
  overflow: hidden;
  border: 3px solid var(--border-color);
  transform: translateY(0);
  display: flex;
  flex-direction: column;
  transition: transform 0.5s ease-in-out;
}


.card_project:hover {
  border: 3px solid var(--border-hover-color);
  transform: translateY(10px);
}

.card_project > a {
  text-decoration: none;
  display: block;
  height: 100%;
}

.img-project {
  width: 100%;
  height: 200px;
  flex-shrink: 0;
}

.img-project > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.desc-project {
  text-align: center;
  color: var(--text-color);
  padding: 10px;
}

.desc-project > h3 {
  font-family: var(--primary-font);
  font-size: clamp(20px, 2.5vw, 30px);
  margin-bottom: 30px;
  word-break: break-word;
}

.desc-project > p {
  padding: 0 20px;
  word-break: break-word;
  font-size: clamp(13px, 1.4vw, 16px);
  line-height: 1.5;
}

.gallery {
  width: 90%;
  background: var(--secondary-color);
  padding: 30px;
  border-radius: 16px;
  gap: 10px;
  margin-bottom: 70px;
}

.list-gallery {
  padding-top: 15px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.container-gallery {
  width: 100%;
  height: 250px;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.85s ease-in-out;
}

.container-gallery:hover {
  transform: scale(1.05);
  box-shadow: 3px 6px 12px var(--shadow-color);
}

.container-gallery > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.contact {
  width: 90%;
  height: auto;
  min-height: 700px;
  margin-bottom: 30px;
  padding: 80px 20px;
  border-radius: 30px;
  background: var(--secondary-color);
}

.contact h2 {
  text-align: center;
  font-size: clamp(28px, 4vw, 38px);
  margin-bottom: 50px;
}

.form-contact {
  max-width: 700px;
  margin: auto;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 25px;
}

label {
  font-size: clamp(18px, 2vw, 25px);
  color: var(--text-color);
  margin-bottom: 8px;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  padding: 15px;  
  border: 1px solid #d1d5db;

  border-radius: 12px;

  font-size: 16px;

  transition: 0.3s;
  max-width: 100%;
}

input:focus,
textarea:focus {
  outline: none;

  border-color: #2563eb;

  box-shadow: 0 0 10px rgba(37, 99, 235, 0.2);
}

.msg-btn, #toggleBtn {
  width: 100%;

  padding: 15px;

  border: none;

  border-radius: 12px;

  background: var(--button-color);

  color: var(--text-color);

  cursor: pointer;

  transition: 0.3s;
}

.msg-btn, #toggleBtn:hover {
  background: var(--button-hover-color);
}

footer {
  display: flex;
  flex-direction: row;
  justify-content: center;
  width: 100%;
  height: auto;
  min-height: 50px;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 10px 20px;
  color: var(--text-color);
  font-size: 16px;
}

.social-media {
  display: flex;
  flex-direction: row;
  gap: 15px;
}

@media (max-width: 768px) {
  .navbar {
    margin-bottom: 16px;
    width: min(96%, 520px);
  }

  .hamburger {
    display: flex;
    margin-left: auto;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
    padding: 12px;
  }

  .nav-links.active {
    display: flex;
  }

  .home {
    display: flex;  
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: auto;
    padding: 10px 0;
    gap: 20px;
  }

  .hero-section {
    width: 180px;
    height: 180px;
    flex-shrink: 0;
  }

  .hero-section > img {
    object-fit: cover;
  }

  .biography {
    /* Centers the biography text on mobile */
    text-align: center;
    width:100%;
  }

  .biography > h1 {
    font-size: clamp(30px, 8vw, 48px);
  }

  .biography > h3 {
    font-size: clamp(12px, 2.5vw, 16px);
    max-width: 20ch;
    animation: typingMobile 6s steps(20, end) infinite, blink 3s step-end infinite;
    display: inline-block;
  }

  @keyframes typingMobile {
    0% {
      width: 0;
    }
    100% {
      width: 20ch;
    }
  }

  .biography > a > .cv-btn {
    max-width: 100%;
  }

  .h2 {
    font-size: clamp(24px, 5vw, 30px);
  }

  .about {
    padding: 15px;
    min-height: auto;
    height: auto;
  }

  .about > h2 {
    margin-bottom: 10px;
  }

  .short-desc {
    font-size: clamp(13px, 2.5vw, 14px);
    text-align: center;
    line-height: 1.6;
  }

  .tech-stack {
    grid-template-columns: 1fr;
    justify-content: center;
  }

  .stack-container {
    max-width: 100%;
    width: 100%;
  }

  .list-project {
    display: grid;
    grid-template-columns: 1fr;
  }

  .card_project {
    min-height: auto;
    height: auto;
    margin-bottom: 40px;
  }

  .desc-project > h3 {
    margin-bottom: 15px;
    font-size: clamp(20px, 4vw, 26px);
  }

  .desc-project > p {
    font-size: clamp(13px, 2.5vw, 14px);
  }

  .list-gallery {
    display: grid;
    grid-template-columns: 1fr;
  }

  .container-gallery {
    height: 200px;
  }

  .contact {
    min-height: auto;
    height: auto;
    padding: 40px 15px;
  }

  .contact h2 {
    font-size: clamp(24px, 5vw, 30px);
    margin-bottom: 30px;
  }

  label {
    font-size: clamp(16px, 3vw, 20px);
  }

  input, textarea {
    font-size: 14px;
    padding: 12px;
  }

  footer {
    flex-direction: column;
    text-align: center;
    padding: 15px 10px;
    gap: 10px;
    min-height: auto;
  }

  .social-media {
    justify-content: center;
  }
}
