@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
}

html {
  scroll-behavior: smooth;
  cursor: default;
}

body {
  margin: 0;
  background-color: white;
  transition:
    background 0.4s ease,
    color 0.4s ease;
}

/* streak color */
:root {
  --matrix-color: 255, 55, 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;

  /* center is clearer, edges darker */
  background: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.3) 60%,
    rgba(0, 0, 0, 0.7) 100%
  );

  opacity: 0;
  transition: opacity 0.6s ease;
}

.dark-theme body::after {
  opacity: 1;
}

#personal-logo {
  width: 120px;
  height: auto;
  margin: 0 auto;
  padding-top: 48px;
  position: relative;
}

.subtitle {
  font-size: 28px;
  margin-bottom: 16px;
}

li {
  list-style-type: none;
}

p {
  line-height: 1.5;
  font-size: 16px;
}

a {
  text-decoration: none;
}

button {
  cursor: pointer;
}

section {
  background-color: transparent;
  transition: all 300ms ease;
}

input,
textarea {
  width: 100%;
  background-color: #242424;
  color: white;
  outline: none;
  border: 1px solid #c0c4cc;
  border-top: none;
  border-left: none;
  border-right: none;
  height: 40px;
  transition: all 300ms ease;
}

textarea {
  resize: vertical;
  height: 100px;
  margin-top: 8px;
}

label {
  font-size: 14px;
  font-weight: bold;
}

input:hover,
textarea:hover {
  border-color: #dcdfe6;
}

input:focus,
textarea:focus {
  border-color: #f06449;
}

.container {
  padding: 50px 0;
  width: 100%;
}

.row {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 12px;
}

.click {
  cursor: pointer;
  transition: all 300ms ease;
}

.click:hover {
  transform: scale(1.1);
}

.click:active {
  transform: scale(0.8);
}

.title {
  font-size: 120px;
  margin-bottom: 12px;
  text-align: left;
  line-height: 1;
}

.white {
  color: white;
}
.orange {
  color: #f06449 !important;
}

#personal-logo {
  transform: none !important;
}

.link__hover-effect {
  position: relative;
}

.link__hover-effect:after {
  content: "";
  position: absolute;
  bottom: -3px;
  height: 3px;
  width: 0;
  right: 0;
  transition: all 300ms ease;
}

.link__hover-effect--white:after {
  background-color: #fff;
}

.link__hover-effect--black:after {
  background-color: #242424;
}

.link__hover-effect:hover:after {
  left: 0;
  width: 100%;
}

nav,
.scroll,
.header {
  opacity: 1;
  visibility: visible;
  transition: all 600ms 800ms;
}

.modal--open nav,
.modal--open .scroll,
.modal--open .header {
  opacity: 0;
  visibility: hidden;
  transition: all 400ms;
}
.dark-theme .title,
.dark-theme .section__title,
.dark-theme .section__sub-title,
.dark-theme .subtitle,
.dark-theme .nav__link--anchor,
.dark-theme .fa-circle-half-stroke,
.dark-theme .header__para {
  color: white;
}
.dark-theme {
  background-color: #0a0a0a;
}
.dark-theme #matrix {
  opacity: 1;
}
.dark-theme .logo {
  filter: brightness(0) saturate(100%) invert(53%) sepia(79%) saturate(495%) hue-rotate(327deg) brightness(96%) contrast(92%);
}
.dark-theme .scroll__icon {
  border-color: white;
}
.dark-theme .scroll__icon:after,
.dark-theme .link__hover-effect--black:after {
  background-color: white;
}
.dark-theme .mail__btn {
  background-color: #f06449;
  color: black;
}
.dark-theme .mail__btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgb(190, 110, 48);
}
.dark-theme .orange {
  color: #ff7a5c;
  text-shadow: 0 0 10px rgba(240, 100, 73, 0.4);
}
.dark-theme .social__link {
  color: black;
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

.project:nth-child(1) { transition-delay: 0.1s; }
.project:nth-child(2) { transition-delay: 0.2s; }
.project:nth-child(3) { transition-delay: 0.3s; }
.project:nth-child(4) { transition-delay: 0.4s; }

/*

    LANDING PAGE

*/

#landing-page,
.projects-section__wrapper {
  overflow: hidden;
}

#landing-page {
  position: relative;
  min-height: 100vh;
  background-image: url('./assets/landing.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#landing-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:rgba(255, 255, 255, 0.35);
  pointer-events: none; 
}

.projects-section__wrapper {
  position: relative;
  min-height: 100vh;
  background-image: url('./assets/projects.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.dark-theme .projects-section__wrapper {
  background: none !important;
}

.projects-section__wrapper::before {
  display: none;
}

#projects {
  position: relative;
}

#projects::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

#projects .container {
  position: relative;
  z-index: 2;
}

.dark-theme #landing-page {
  background: none;
}

.dark-theme #landing-page::before {
  display: none !important;
}

#matrix {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.9s ease;
}

#matrix-back,
#matrix-mid,
#matrix-front {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#matrix-back {
  z-index: -3;
  filter: blur(1px);
}

#matrix-mid {
  z-index: -2;
  filter: blur(1px);
}

#matrix-front {
  z-index: -1;
  filter: blur(1px);
}

.dark-theme #matrix-back,
.dark-theme #matrix-mid,
.dark-theme #matrix-front {
  opacity: 1;
}

.header {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 1000px;
  padding: 0 30px;
}

.header__para {
  font-size: 24px;
  line-height: 2;
  max-width: 450px;
}

.social__list {
  margin-top: 16px;
  display: flex;
}

.social__link {
  background-color: #f06449;
  color: white;
  padding: 6px;
  width: 32px;
  height: 32px;
  font-size: 14px;
  margin-right: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
}

.mail__btn {
  width: 70px;
  height: 70px;
  font-size: 32px;
  border-radius: 50%;
  border: none;
  background-color: #f06449;
  color: white;
  position: fixed;
  z-index: 1000;
  bottom: 32px;
  right: 40px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.mail__btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll__icon {
  width: 20px;
  height: 30px;
  border: 2px solid black;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll__icon:after {
  content: "";
  width: 4px;
  height: 6px;
  background-color: #242424;
  border-radius: 2px;
  animation: scroll 1000ms infinite alternate-reverse;
}

@keyframes scroll {
  0% {
    transform: translateY(3px);
  }

  100% {
    transform: translateY(-3px);
  }
}

/*

    NAVIGATION

*/

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  height: 100px;
  padding: 0 20px;
}

.nav__close {
  top: 24px;
  right: 24px;
  font-size: 28px;
  cursor: pointer;
}

.nav__link--list {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
}

.nav__link {
  margin: 0 12px;
}

.nav__link--anchor {
  text-decoration: none;
  font-size: 16px;
  color: #242424;
  font-weight: 700;
  display: inline-block;
  transition: transform 0.25s ease;
}
.nav__link--anchor::after {
  display: none;
}
.nav__link--anchor:hover {
  transform: scale(1.15);
}

.fa-circle-half-stroke {
  font-size: 20px;
}

/* HAMBURGER */
.nav__menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 101;
}

.nav__menu-btn span {
  width: 24px;
  height: 3px;
  background: #242424;
  transition: all 0.3s ease;
  transform-origin: center;
}

.dark-theme .nav__menu-btn span {
  background: white;
}

.menu--open .nav__menu-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
}

/* 🔥 Animate to X */
.menu--open .nav__menu-btn span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu--open .nav__menu-btn span:nth-child(2) {
  opacity: 0;
}

.menu--open .nav__menu-btn span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/*

    MODAL

*/
.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 1100px;
  height: 700px;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  visibility: hidden;
  z-index: -1;
  transition:
    visibility 1s,
    z-index 1s,
    box-shadow 0.5s ease;
}
.modal--open .modal {
  z-index: 60;
  box-shadow: 0 20px 80px 0 rgb(0, 0, 0, 0.55);
  visibility: visible;
}
.modal__half {
  width: 50%;
  padding: 40px 72px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  transition: all 300ms ease-in;
}

.modal--open .modal__about,
.modal--open .modal__contact {
  transform: translateX(0%);
}

.modal__about {
  background-color: rgb(245, 245, 245);
  transform: translateX(-110%);
  height: 100vh;
}

.modal__languages {
  display: flex;
  flex-wrap: wrap;
}

.modal__language {
  width: 25%;
  padding: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 300ms ease;
}

.modal__language:hover .language__name {
  transform: scale(1);
}

.modal__language:hover {
  filter: brightness(80%);
  transform: scale(0.9);
}

.language__name {
  position: absolute;
  bottom: -10px;
  transform: scale(0);
  transition: all 300ms ease;
}

.modal__language--img {
  width: 100%;
}

.modal__contact {
  position: relative;
  overflow: visible;
  background-color: #242424;
  color: white;
  transform: translateX(110%);
  z-index: 1;
}

.modal__title {
  font-size: 26px;
}

.modal__sub-title {
  margin: 12px 0 24px 0;
  font-size: 14px;
}

.modal__para {
  margin-bottom: 12px;
  line-height: 1.75;
}

.form__item {
  margin-bottom: 20px;
}

.form__submit {
  background-color: #f06449;
  border: 2px solid #f06449;
  color: white;
  font-weight: bold;
  width: 100%;
  max-width: 240px;
  padding: 12px 24px;
  font-size: 20px;
  transition: all 300ms ease;
}

.form__submit:hover {
  border-color: #fff;
  background-color: transparent;
}

.form__submit:active {
  border-color: #f06449;
  background-color: #f06449;
}

.modal__overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  font-size: 32px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  z-index: 9999;
  transition: opacity 300ms ease;
}

.modal__overlay.visible {
  opacity: 1;
  visibility: visible;
}

.modal__overlay--loading {
  background-color: #242424;
  font-size: 80px;
}

.modal__overlay--success {
  background-color: black;
  font-size: 40px;
  font-weight: 700;
  text-align: center;
  padding: 28px;
}

.modal__overlay--visible {
  z-index: 1;
  display: flex;
}

.fa-spinner {
  animation: spinner 750ms infinite linear;
}

@keyframes spinner {
  0% {
    transform: rotate(0);
  }
  100% {
    transform: rotate(360deg);
  }
}

.modal__exit {
  position: absolute;
  top: 30px;
  right: 40px;
  color: #fff;
  font-size: 18px;
  z-index: 100;
}

/*

    PROJECTS

*/
.project__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.section__title {
  text-align: center;
  font-size: 48px;
  margin-bottom: 60px;
}

.project__img {
  width: 100%;
  height: 320px;
  display: block;
  object-fit: cover;
  transition: all 600ms ease;
}


.project__wrapper {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  pointer-events: auto;
  position: relative;
  border-radius: 20px;
  box-shadow: 0 20px 80px 0 rgb(0, 0, 0, 0.45);
  overflow: hidden;
}

.project__wrapper:hover .project__description {
  opacity: 1;
  transform: translateY(-50%);
}

.project__wrapper:hover .project__img {
  transform: scale(1.07);
  filter: blur(5px);
}

.project__description {
  position: absolute;
  top: 50%;
  left: 40px;
  transform: translateY(100%);
  opacity: 0;
  transition:
    opacity 300ms,
    transform 450ms ease;
  color: white;
  max-width: 400px;
}

.project__wrapper:hover .project__wrapper--bg {
  opacity: 0.7;
}

.project__wrapper--bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #1c1d25;
  opacity: 0;
  transition: all 450ms ease;
}

.project__description--title {
  font-size: 28px;
}

.project__description--sub-title {
  margin-top: 8px;
}

.project__description--para {
  font-size: 14px;
  margin: 16px 0;
}

.project__link {
  display: flex;
  justify-content: center;
  color: inherit;
  pointer-events: none;
}

.project__link:active .project__wrapper {
  transform: scale(0.98);
}

/*

    FOOTER

*/

footer {
  position: relative;
  background: rgba(0, 0, 0, 0.15); /* subtle, not white */
  backdrop-filter: blur(6px);
  display: flex;
  padding: 24px 0;
}

footer .container {
  padding: 16px 0;
}

.dark-theme footer {
  background: rgba(255, 255, 255, 0.095);
  backdrop-filter: blur(7px);
}

.footer__row {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
}

.footer__social--list {
  width: 100%;
  max-width: 500px;
  display: flex;
  justify-content: space-around;
  gap: 72px;
}

.footer__social--link {
  color: #a9e4f3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  font-size: 16px;
  gap: 6px;
  transition: all 0.3s ease;
}
.footer__social--link i {
  font-size: 22px;
  color: #6c9cc1;
  transition: all 0.3s ease;
}
.footer__social--link:hover {
  transform: translateY(-4px) scale(1.05);
}

.footer__social--link:hover i {
  color: #f06449;
}
.dark-theme .footer__social--link:hover {
  color: #f06449;
}
.dark-theme .footer__social--link:hover i {
  color: #f06449;
  filter: drop-shadow(0 0 6px rgba(240, 100, 73, 0.5));
}
.dark-theme .footer__social--link {
  color: white;
}
.dark-theme .footer__social--link i {
  color: white;
}

.footer__logo--img {
  width: 50px;
  height: 30px;
}
.footer__copyright {
  font-size: 13px;
  color: rgb(255, 255, 255);
  opacity: 0.7;
  position: absolute;
  display: flex;
  flex-direction: column-reverse;
  gap: 6px;
  left: 3%;
  bottom: 30%;
}

.dark-theme .footer__copyright {
  color: #c6b3af;
}

.mobile-only { display: none; }

.project__info-btn {
  display: none;
}

/* 1024px */
@media (max-width: 1024px) {

  .footer__social--list {
    gap: 48px;
  }

  .footer__social--link {
    font-size: 14px;
  }

  .footer__social--link i {
    font-size: 20px;
    color: black;
  }

  .footer__logo--img {
    width: 40px;
    height: 24px;
  }
}

/* SMALL PHONES, TABLETS, LARGE SMARTPHONES */
@media (max-width: 768px) {
  .title {
    font-size: 80px;
  }
  .header {
    top: 440px;
  }
  .header__para {
    font-size: 20px;
  }
  .desktop-only { display: none; }
  .mobile-only { display: inline; }
  .modal {
    top: 0;
    left: 0;
    transform: none;
    height: auto;
    width: 100%;
    flex-direction: column-reverse;
    border-radius: 0;
  }
  .modal__half {
    width: 100%;
  }
  .project__list {
    grid-template-columns: 1fr;
  }

  .project__img {
    height: 200px;
  }

  .project__info-btn {
    display: flex;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
  }

  /* disable hover behavior on mobile */
  .project__wrapper:hover .project__description {
    opacity: 0;
    transform: translateY(100%);
  }

  .project__wrapper:hover .project__wrapper--bg {
    opacity: 0;
  }

  /* ACTIVE STATE (click replaces hover) */
  .project__wrapper.active .project__description {
    opacity: 1;
    transform: translateY(-50%);
  }

  .project__wrapper:hover .project__img {
    transform: none;
    filter: none;
  }

  .project__wrapper.active .project__wrapper--bg {
    opacity: 0.7;
  }
  
  .nav__menu-btn {
    display: flex;
  }

  .mail__btn {
    display: none;
  }

  .nav__link--list {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.3s ease;
    padding: calc(56px + env(safe-area-inset-top)) 0 56px;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    z-index: 100;
  }
   .dark-theme .nav__link--list {
    background: rgba(36, 36, 36, 0.25);
    backdrop-filter: blur(10px);
  }

  .menu--open .nav__link--list {
    transform: translateY(0);
    opacity: 1;
  }

  .nav__link {
    margin: 16px 0;
  }

  footer {
    padding: 0px 0 20px;
  }

  .footer__row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
  }

  .footer__social--list {
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
  }

  .footer__social--link {
    color: black;
  }
  
  .footer__logo--img {
    margin: 0px auto 4px;
  }

  .footer__copyright {
    position: static;
    text-align: center;
    transform: translateY(50%);
  }
}

/* SMALL PHONES */
@media (max-width: 480px) {
  .title {
    font-size: 52px;
  }
  .header {
    top: 300px;
  }
  .header__para {
    font-size: 18px;
  }
  .project__description--para {
    display: none;
  }
  .project__description {
    left: 0;
    padding: 0;
    width: 100%;
    text-align: center;
  }
  .project__description--sub-title {
    margin-bottom: 8px;
  }
  .modal__half {
    padding: 40px;
  }
}

@media (max-width: 324px) {
  .header {
    top: 34%;
  }
}
