/* navbar */
nav {
  background-color: transparent;
  padding: 1.5rem 3rem;
  display: block;
  height: 5.375rem;
  z-index: 50;
  position: relative;
}

nav div {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
}

nav div a {
  font-family: var(--font-alt);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
}

nav div a span {
  color: var(--primary-color);
}

.classic-menu {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-left: auto;
}

.nav-link {
  font-family: var(--font-primary);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.home .nav-link {
  color: var(--text-primary);
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link.active {
  color: var(--primary-color);
}

#hamburger {
  display: none;
  margin-left: auto;
}

.mobile-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  padding-right: 1.5rem;
  padding-bottom: 1.5rem;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-end;
  margin-top: 1.5rem;
  background-color: var(--bg-primary);
  animation: fade-in 0.2s ease-in;
}

.mobile-menu-visible {
  display: none;
}

/* buttons */
button {
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: white;
  background-color: var(--primary-color);
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: var(--font-medium);
  text-align: center;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

button span.material-symbols-rounded {
  color: white;
  font-size: 1.25rem;
  font-weight: var(--font-medium);
  text-align: center;
}

button:hover {
  background-color: var(--primary-dark);
}

button:active {
  background-color: var(--primary-darker);
}

.secondary-button {
  background-color: var(--secondary-color);
}

.secondary-button:hover {
  background-color: var(--secondary-dark);
}

.secondary-button:active {
  background-color: var(--secondary-darker);
}

button.icon-button {
  min-height: unset;
  background-color: transparent;
  color: var(--text-primary);
  padding: 0.5rem;
}

button.icon-button span {
  color: inherit;
  font-size: 1.375rem;
}

button.icon-button:hover {
  background-color: var(--bg-light);
  filter: unset;
}

body {
  background-color: var(--bg-primary);
}

.hero {
  height: calc(100vh - 5.375rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 5rem 1rem 5rem;
}

.hero-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 5rem;
  height: 100%;
}

.hero-text h1 {
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--text-primary);
  text-transform: uppercase;
  animation: fade-in 0.8s ease-in;
}

.hero-text h4 {
  font-size: 1.125rem;
  font-weight: 400;
  margin-top: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text-light);
  letter-spacing: 0.025rem;
  line-height: 2rem;
  text-align: justify;
  animation: fade-in 0.4s ease-in;
  animation-fill-mode: backwards;
  animation-delay: 0.2s;
}

.hero-text .hero-text-highlight {
  color: var(--primary-color);
}

.hero-icons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.hero-icons a {
  text-decoration: none;
  animation: fade-in 0.4s ease-in;
  animation-fill-mode: backwards;
}

.hero-icons .material-symbols-rounded {
  font-size: 1.5rem;
}

.hero-icons a:nth-child(1) {
  animation-delay: 0.2s;
}
.hero-icons a:nth-child(2) {
  animation-delay: 0.3s;
}
.hero-icons a:nth-child(3) {
  animation-delay: 0.4s;
}
.hero-icons a:nth-child(4) {
  animation-delay: 0.5s;
}

#discord-button {
  font-weight: 400;
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.hero-buttons a {
  text-decoration: none;
  animation: fade-in 0.4s ease-in;
  animation-fill-mode: backwards;
}

.hero-buttons a:nth-child(1) {
  animation-delay: 0.2s;
}
.hero-buttons a:nth-child(2) {
  animation-delay: 0.3s;
}

.hero-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in 0.4s ease-in;
  animation-fill-mode: backwards;
  animation-delay: 0.2s;
}

.hero-image svg {
  display: block;
}

.hero-image img {
  position: absolute;
  max-height: 320px;
  max-width: 320px;
  aspect-ratio: 1;
  border-radius: 50%;
}

#linear-gradient {
  animation: gradient-lines 2s linear 0s infinite;
}

#linear-gradient-end {
  animation: gradient-lines-alt 2s linear 0s infinite;
}

.about {
  padding: 2rem 5rem;
}

.about .hero-content {
  align-items: flex-start;
}

.about .hero-text h1 {
  font-size: 2.25rem;
  text-transform: none;
}

.stack {
  padding: 2rem 5rem;
}

.stack h1 {
  font-size: 2.25rem;
  font-weight: 500;
  color: var(--text-primary);
  animation: fade-in 0.4s ease-in;
  animation-fill-mode: backwards;
  animation-delay: 0.4s;
}

.stack-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.stack-grid .stack-card:nth-child(1) {
  animation-delay: 0.4s;
}
.stack-grid .stack-card:nth-child(2) {
  animation-delay: 0.5s;
}
.stack-grid .stack-card:nth-child(3) {
  animation-delay: 0.6s;
}
.stack-grid .stack-card:nth-child(4) {
  animation-delay: 0.7s;
}

.stack-card {
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius);
  padding: 1rem;
  animation: fade-in 0.4s ease-in;
  animation-fill-mode: backwards;
}

.stack-card h4 {
  font-size: 1.25rem;
  font-weight: var(--font-regular);
  color: var(--text-primary);
  margin-bottom: 1.125rem;
  position: relative;
}

.stack-card h4::after {
  display: block;
  position: absolute;
  content: "";
  top: 1.625rem;
  width: 2rem;
  height: 2px;
  background-color: var(--primary-color);
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.stack-card-content {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
  gap: 0.75rem;
}

.stack-chip {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  background-color: var(--secondary-color);
  padding: 0.5rem;
  border-radius: var(--border-radius);
  cursor: default;
}

.stack-chip p {
  color: #ffffff;
  font-size: 1rem;
  font-family: var(--font-primary);
}

.experience {
  padding: 0rem 5rem 0rem calc(5rem - 16px);
}

.experience h1 {
  font-size: 2.25rem;
  font-weight: 500;
  color: var(--text-primary);
  animation: fade-in 0.4s ease-in;
  animation-fill-mode: backwards;
  animation-delay: 0.4s;
}

.experience-content {
  display: flex;
  flex-direction: row;
  gap: 2.5rem;
  margin: 1.25rem 0;
  padding-bottom: 2rem;
  width: 100%;
}

.experience-line {
  padding: 1.5rem 0 1.5rem 16px;
}

.experience-line svg {
  height: 100%;
  animation: fade-in 0.4s ease-in;
  animation-fill-mode: backwards;
  /* using 0.42 to avoid main content delaying more than 0.5s */
  animation-delay: 0.42s;
}

.experience-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 1.5rem;
}

.experience-list .experience-card:nth-child(1) {
  animation-delay: 0.42s;
}
.experience-list .experience-card:nth-child(2) {
  animation-delay: 0.5s;
}
.experience-list .experience-card:nth-child(3) {
  animation-delay: 0.6s;
}

.experience-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius);
  padding: 1rem;
  animation: fade-in 0.4s ease-in;
  animation-fill-mode: backwards;
}

.experience-card h4 {
  font-size: 1.25rem;
  font-weight: var(--font-medium);
  color: var(--text-primary);
}

.experience-card h6 {
  font-size: 1rem;
  font-weight: var(--font-regular);
  color: var(--text-primary);
  margin: 0;
}

.experience-card p {
  font-size: 1rem;
  font-weight: var(--font-regular);
  color: var(--text-light);
}

.experience-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.experience-row img {
  height: 1rem;
}

.experience-card ul {
  margin: 0;
  margin-top: 0.25rem;
  padding: 0;
  padding-left: 1.25rem;
}

.experience-card li {
  margin-bottom: 0.25rem;
}

.experience-row .material-symbols-rounded {
  font-size: 1.125rem;
}

.experience-card li:last-child {
  margin: 0;
}

.experience-card svg {
  position: absolute;
  left: -3.5rem;
  top: calc(1rem - 4px);
}

.projects {
  padding: 2rem 5rem;
}

.projects .hero-text h1 {
  font-size: 2.25rem;
  text-transform: none;
}

.projects .hero-text h4 {
  margin-top: 0.75rem;
}

.project-grid {
  padding: 2rem 5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(408px, 1fr));
  gap: 1.5rem;
  margin: 0 auto;
}

.project-grid a {
  text-decoration: none;
  animation: fade-in 0.4s ease-in;
  animation-fill-mode: backwards;
}

.project-grid a:nth-child(1) {
  animation-delay: 0.2s;
}
.project-grid a:nth-child(2) {
  animation-delay: 0.3s;
}
.project-grid a:nth-child(3) {
  animation-delay: 0.4s;
}
.project-grid a:nth-child(4) {
  /* again, preventing going above 0.5s */
  animation-delay: 0.44s;
}
.project-grid a:nth-child(5) {
  animation-delay: 0.5s;
}
.project-grid a:nth-child(6) {
  animation-delay: 0.54s;
}

.project-card {
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius);
  cursor: pointer;
  position: relative;
  height: 100%;
  transition: background-color 0.2s ease-in-out;
}

.project-card:hover {
  background-color: var(--hover-highlight);
}

.project-card img {
  height: 320px;
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  border-radius: var(--border-radius);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.card-content {
  flex: 1;
}

.project-title {
  margin: 1rem 1rem 0 1rem;
  font-size: 1.25rem;
  font-weight: var(--font-medium);
  color: var(--text-primary);
}

.project-description {
  margin: 0.75rem 1rem 1rem 1rem;
  font-size: 1;
  color: var(--text-light);
  font-weight: var(--font-regular);
}

.tech-badges {
  display: flex;
  flex-direction: row;
  scrollbar-width: none;
  gap: 0.75rem;
}

.card-content .tech-badges {
  margin: 0.625rem 0;
  padding: 0 1rem;
  overflow-x: scroll;
}

.badge {
  padding: 0.25rem 0.5rem;
  background-color: var(--primary-color);
  color: #ffffff;
  border-radius: var(--border-radius);
  font-weight: var(--font-regular);
  word-break: keep-all;
  flex-shrink: 0;
}

.content-container {
  max-width: 1280px;
}

.project-info {
  padding: 2rem 1.5rem;
  margin: 0 auto;
}

.project-title-container {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0.5rem;
}

.project-title-container a {
  text-decoration: none;
  animation: fade-in 0.4s ease-in;
  animation-fill-mode: backwards;
}

.project-title-container a:nth-child(1) {
  animation-delay: 0.2s;
}
.project-title-container a:nth-child(2) {
  animation-delay: 0.3s;
}

.project-back-container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.5rem;
  animation: fade-in 0.8s ease-in;
}

.project-info hr {
  border: none;
  height: 1px;
  color: var(--border-primary);
  background-color: var(--border-primary);
  border-radius: var(--border-primary);
  margin: 1rem 0;
  animation: fade-in 0.4s ease-in;
  animation-fill-mode: backwards;
  animation-delay: 0.3s;
}

.project-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 0.75rem 0 1rem 0;
  animation: fade-in 0.4s ease-in;
  animation-fill-mode: backwards;
  animation-delay: 0.3s;
}

.project-info .tech-badges {
  margin-bottom: 0.5rem;
  overflow-x: auto;
  animation: fade-in 0.4s ease-in;
  animation-fill-mode: backwards;
  animation-delay: 0.3s;
}

.project-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-left: auto;
  gap: 1rem;
}

.mobile-actions {
  display: none;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.65rem;
}

.mobile-actions .icon-button {
  font-weight: var(--font-regular);
}

.project-cover {
  width: 100%;
  object-fit: cover;
  max-height: 420px;
  border-radius: var(--border-radius);
  margin-top: 0.75rem;
  animation: fade-in 0.4s ease-in;
  animation-fill-mode: backwards;
  animation-delay: 0.3s;
}

.project-content {
  margin-top: 1rem;
  animation: fade-in 0.4s ease-in;
  animation-fill-mode: backwards;
  animation-delay: 0.3s;
}

.project-info .title {
  font-size: 2.25rem;
  font-weight: var(--font-medium);
  color: var(--text-primary);
}

.project-info .description {
  font-size: 1.125rem;
  font-weight: var(--font-regular);
  color: var(--text-light);
  animation: fade-in 0.4s ease-in;
  animation-fill-mode: backwards;
  animation-delay: 0.3s;
}

.not-found {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: calc(100vh - 5.375rem);
}

.not-found img {
  max-height: 360px;
  margin-top: -3rem;
}

.not-found p {
  font-size: 1.25rem;
  margin-top: 1.5rem;
}

.not-found a {
  font-size: 1rem;
  margin-top: 0.5rem;
  color: var(--primary-color);
}

/* animations */
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes gradient-lines {
  0% {
    stop-color: var(--lines);
  }

  50% {
    stop-color: var(--primary-color);
  }

  100% {
    stop-color: var(--lines);
  }
}

@keyframes gradient-lines-alt {
  0% {
    stop-color: var(--primary-color);
  }

  50% {
    stop-color: var(--lines);
  }

  100% {
    stop-color: var(--primary-color);
  }
}

/* media queries */
@media screen and (max-width: 1024px) {
  .hero {
    height: unset;
    padding: 2rem 1.5rem;
  }

  .hero-content {
    flex-direction: column-reverse;
    align-items: flex-start;
    justify-content: center;
    gap: 1.5rem;
  }

  .hero-image-container {
    align-self: center;
  }

  .about {
    padding: 2rem 1.5rem;
    padding-bottom: 0;
  }

  .stack {
    padding: 2rem 1.5rem;
  }

  .experience {
    padding: 0rem 1.5rem;
  }

  .projects {
    padding: 2rem 1.5rem;
    padding-bottom: 0;
  }

  .project-grid {
    padding: 2rem 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .project-card img {
    height: 218px;
  }

  .content-container {
    max-width: 1024px;
  }

  .project-title-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-actions {
    display: none;
  }

  .mobile-actions {
    display: flex;
  }
}

@media screen and (max-width: 768px) {
  nav {
    padding: 1.5rem;
  }

  nav div {
    gap: 0.25rem;
  }

  .classic-menu {
    display: none;
  }

  .mobile-menu-visible {
    display: flex;
  }

  #hamburger {
    display: flex;
  }

  .hero-text h1 {
    font-size: 2.25rem;
  }

  .hero-image img {
    width: calc(100% - 100% / 3.9);
    object-fit: cover;
    aspect-ratio: 1;
  }

  .hero-image svg {
    width: 100%;
    height: 100%;
  }

  .not-found img {
    width: 100%;
  }

  .content-container {
    width: 100%;
    max-width: unset;
  }

  .experience-content {
    gap: 2rem;
  }

  .experience-card svg {
    position: absolute;
    left: -3rem;
    top: calc(1rem - 4px);
  }
}
