@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600;700&display=swap');

/* ===== Reset ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
}

html {
  box-sizing: border-box;
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: #e8e8f0;
  font-family: montserrat, sans-serif;
  background-color: #0b0b1a;
  overflow-x: hidden;
}

li {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  outline: none;
  background-color: transparent;
  color: inherit;
}

/* ===== Animations ===== */
@keyframes moveInLeft {
  0% {
    opacity: 0;
    transform: translateX(-10rem);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes moveInRight {
  0% {
    opacity: 0;
    transform: translateX(10rem);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes moveInBottom {
  0% {
    opacity: 0;
    transform: translateY(4rem);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-1rem); }
  100% { transform: translateY(0); }
}

@keyframes fadeIn {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(3rem);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 77, 90, 0.15); }
  50%      { box-shadow: 0 0 25px rgba(255, 77, 90, 0.3); }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  display: flex;
  height: 100vh;
  width: 100%;
  z-index: 999;
}

.canvas {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
  background-color: #0b0b1a;
  overflow: hidden;
}

.connecting-dots {
  height: 100%;
  width: 100%;
}

.heading {
  position: relative;
  align-self: center;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: normal;
  width: fit-content;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  color: #e8e8f0;
  font-weight: 300;
  z-index: 999;
}

.heading__line-1 {
  animation-name: moveInLeft;
}

.heading__line-1 span {
  color: #ff4d5a;
  font-weight: 400;
}

.heading__line-2 {
  animation-name: moveInRight;
}

.heading__line-1,
.heading__line-2 {
  font-size: 6rem;
  animation-duration: 1.4s;
  animation-timing-function: cubic-bezier(0.21, 1.11, 0.81, 0.99);
}

.heading-cta {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 2.4rem;
  padding: 0.8rem 3rem;
  width: 27.5rem;
  height: 4.8rem;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #ff4d5a;
  font-size: 2.4rem;
  font-weight: 500;
  cursor: pointer;
  animation: moveInBottom 0.7s 1.2s;
  animation-fill-mode: backwards;
  animation-timing-function: cubic-bezier(0.21, 1.11, 0.81, 0.99);
  transition: all 0.3s ease;
}

.heading-cta:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 77, 90, 0.4);
  box-shadow: 0 8px 32px rgba(255, 77, 90, 0.2), inset 0 0 20px rgba(255, 77, 90, 0.05);
}

.heading-cta:active {
  transform: translateY(-1px);
}

.heading__arrow {
  display: inline-block;
  height: 24px;
  width: 24px;
  margin-left: 15px;
  transform: rotate(90deg);
  fill: #ff4d5a;
  transition: all 0.3s;
}

/* ===== Navigation ===== */
.navigation {
  display: flex;
  margin-right: 10rem;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 1px;
}

.navigation-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 6rem;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  z-index: 99999999999;
}

.navigation__item {
  transition: all 0.3s ease;
  position: relative;
}

.navigation__item:not(:last-child) {
  margin-right: 3rem;
}

.navigation__item--active {
  color: #ff4d5a;
}

.navigation__item--active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #ff4d5a, #6c9fff);
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(255, 77, 90, 0.4);
}

.navigation__item:hover {
  color: #ff4d5a;
}

/* ===== Main Background ===== */
.main-bg {
  height: 100vh;
  position: fixed;
  top: 0;
  width: 100%;
  background: linear-gradient(135deg, #0b0b1a 0%, #111133 50%, #0b0b1a 100%);
}

/* ===== Section Headings ===== */
.section-heading {
  position: relative;
  font-size: 5.5rem;
  font-weight: 700;
  margin-top: 9rem;
  margin-bottom: 13rem;
  z-index: 9999;
  opacity: 0;
  transform: translateY(3rem);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-heading.revealed {
  opacity: 1;
  transform: translateY(0);
}

.section-heading::before {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, #ff4d5a, #6c9fff);
  border-radius: 1px;
  box-shadow: 0 0 10px rgba(255, 77, 90, 0.3);
  transition: width 0.8s ease 0.3s;
}

.section-heading.revealed::before {
  width: 100%;
}

/* ===== About ===== */
.about {
  width: 1300px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about__content {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.profile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 500;
  left: -300px;
  opacity: 0;
  transition: all 1.1s;
}

.profile__picture {
  height: 24rem;
  margin-bottom: 4rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.profile__picture svg {
  transition: all 1.1s;
  filter: drop-shadow(0 0 20px rgba(255, 77, 90, 0.2)) drop-shadow(0 0 40px rgba(108, 159, 255, 0.1));
}

.profile__blurb {
  font-size: 1.8rem;
  width: 500px;
  line-height: 2;
  font-weight: 300;
  color: rgba(232, 232, 240, 0.85);
}

.profile__fade-in {
  opacity: 1;
  transform: translateX(300px);
}

/* ===== Skills ===== */
.skills {
  display: flex;
  justify-content: center;
}

.skills__row {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.skills__row:not(:last-child) {
  margin-right: 25px;
}

.skills__item {
  opacity: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  height: 100px;
  width: 160px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  transition: transform 0.3s ease, opacity 1.2s, box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
}

.skills__item:hover {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(108, 159, 255, 0.15), 0 0 15px rgba(255, 77, 90, 0.1);
}

.skills__item:not(:last-child) {
  margin-bottom: 3rem;
}

.skills__item img {
  height: 60px;
  width: auto;
  transition: all 0.3s ease;
}

.skills__item:hover img {
  transform: scale(1.08);
}

.skills__item-name {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1;
  transition: all 0.3s ease;
  letter-spacing: 1px;
}

.skills__item-fade-in {
  opacity: 1;
}

.skills__item--js img {
  border-radius: 5px;
}

.skills__item--webpack img {
  border-radius: 50%;
}

/* ===== Projects ===== */
.projects {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.project {
  position: relative;
  display: flex;
  margin-bottom: 14rem;
  justify-content: flex-start;
}

.project__image-container {
  position: relative;
  height: 70rem;
  width: 100rem;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
  will-change: transform;
}

.project__image-container:hover {
  box-shadow: 0 20px 60px rgba(108, 159, 255, 0.12), 0 0 30px rgba(255, 77, 90, 0.08);
}

.project__image-image {
  width: 85%;
  position: relative;
}

.project__image-image img {
  width: 100%;
}

.project__info {
  position: relative;
  top: 8rem;
  height: fit-content;
  padding: 2rem;
  z-index: 9999999;
  border-radius: 12px;
  transition: background 0.3s ease;
}

.project__title {
  position: relative;
  z-index: 66;
  font-size: 3.5rem;
}

.project__description {
  position: relative;
  margin-top: 3rem;
  font-size: 1.8rem;
  font-weight: 400;
  color: rgba(232, 232, 240, 0.8);
  z-index: 999909999;
}

.project__live-2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 3px;
  line-height: 1;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: fit-content;
  padding: 1rem 1.2rem;
  position: relative;
  margin-top: 3rem;
  cursor: pointer;
  transition: color 0.25s ease;
}

.project__live-2:after {
  position: absolute;
  content: '';
  height: 2px;
  background: linear-gradient(90deg, #ff4d5a, #6c9fff);
  width: 100%;
  bottom: 1px;
  display: block;
  transform-origin: bottom;
  transition: all 0.25s ease;
  z-index: -1;
  border-radius: 1px;
}

.project__live-2:hover {
  color: #0b0b1a;
}

.project__live-2:hover:after {
  height: 100%;
  border-radius: 4px;
}

.project-left {
  align-self: flex-start;
  margin-left: 22rem;
}

.project-left .project__info {
  left: -8rem;
  margin-right: -2rem;
}

.project-right {
  align-self: flex-end;
  margin-right: 22rem;
}

.project-right .project__info {
  right: -8rem;
  margin-left: -2rem;
}

/* Project image layout helpers */
.retro {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.retro img {
  margin-bottom: -3px;
}

.todo {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.weather {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* ===== Contact ===== */
.contact {
  position: relative;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  width: 500px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  margin-bottom: 10rem;
}

.contact__heading {
  margin-top: -4rem !important;
  margin-bottom: 6rem !important;
}

.contact__text {
  font-size: 1.8rem;
  margin-bottom: 6rem;
  font-weight: 300;
  color: rgba(232, 232, 240, 0.8);
}

.contact__form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.contact__form-name,
.contact__form-email {
  margin-bottom: 8px;
  padding: 1.2rem;
  height: 4.5rem;
}

.contact__form-message {
  height: 14rem;
  padding: 1.2rem;
}

.contact__form-submit-2 {
  align-self: flex-start;
  margin-top: 0 !important;
}

.contact input,
.contact textarea {
  width: 500px;
  resize: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: inherit;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 1.6rem;
  font-family: montserrat, sans-serif;
  border-radius: 10px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact input:focus,
.contact textarea:focus {
  outline: none;
  border-color: rgba(255, 77, 90, 0.4);
  box-shadow: 0 0 16px rgba(255, 77, 90, 0.15), 0 0 4px rgba(108, 159, 255, 0.1);
}

.contact input::placeholder,
.contact textarea::placeholder {
  color: rgba(232, 232, 240, 0.4);
  opacity: 1;
}

.contact__form-error-submit {
  margin-top: 1.5rem;
  height: 7rem;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-error {
  align-self: start;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.5;
}

.form-error > * {
  display: none;
  color: #ff4d5a;
}

.input-error {
  border-color: rgba(255, 77, 90, 0.5) !important;
  box-shadow: 0 0 12px rgba(255, 77, 90, 0.2) !important;
}

/* ===== Footer ===== */
.footer {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 160px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.socials {
  display: flex;
  margin-bottom: 20px;
}

.socials__github,
.socials__email {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 35px;
  background-color: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.socials__github:hover,
.socials__email:hover {
  transform: scale(1.2);
  filter: drop-shadow(0 0 8px rgba(108, 159, 255, 0.5));
}

.socials__github {
  margin-right: 1rem;
}

.socials__email {
  margin-left: 1rem;
}

.socials img {
  height: 100%;
}

.copyright {
  color: rgba(232, 232, 240, 0.5);
  font-size: 10px;
  font-weight: 500;
}

.return-home {
  position: absolute;
  top: -25px;
  width: 44px;
  height: 44px;
  margin-right: auto;
  margin-left: auto;
  left: 0;
  right: 0;
  text-align: center;
  background: rgba(255, 77, 90, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  animation-duration: 1s;
  animation-fill-mode: both;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  transition: background 0.3s ease;
}

.return-home:hover {
  cursor: pointer;
  animation-name: bounce;
  background: rgba(255, 77, 90, 1);
  box-shadow: 0 0 20px rgba(255, 77, 90, 0.4);
}

.return-home svg {
  width: 100%;
}

/* ===== Responsive ===== */
@media (max-width: 1500px) {
  html { font-size: 57.25%; }
  .about { width: 1100px; }
  .heading-cta { width: auto; }
  .skills__item { height: 90px; width: 145px; }
  .skills__item img { height: 55px; }
  .project-left { margin-left: 11rem; }
  .project-right { margin-right: 11rem; }
}

@media (max-width: 1300px) {
  .about__content { flex-direction: column; }
  .profile {
    margin-bottom: 10rem;
    left: 0;
    opacity: 1;
  }
  .profile__fade-in { transform: translateX(0); }
  .skills__item {
    opacity: 1;
  }
}

@media (max-width: 1200px) {
  html { font-size: 50%; }
  .about { width: auto; }
  .navigation { margin-right: 3rem; }
  .section-heading { margin-bottom: 10rem; }
  .skills__item-name { font-size: 1.4rem; }
}

@media (max-width: 1100px) {
  .project__image-container { height: 64rem; width: 90rem; }
}

@media (max-width: 1000px) {
  .section-heading { margin-top: 6rem; }
  .profile { margin-bottom: 7rem; }
  .skills__item { height: 80px; width: 130px; }
  .skills__item img { height: 50px; }
  .project__info { width: fit-content; }
}

@media (max-width: 970px) {
  .project__image-container { height: 58rem; width: 80rem; }
}

@media (max-width: 900px) {
  .project__image-container { height: 54rem; width: 75rem; }
  .project__title { font-size: 3rem; }
}

@media (max-width: 820px) {
  .project__title { font-size: 2.7rem; }
}

@media (max-width: 800px) {
  .project-left .project__info { margin-right: -4rem; }
}

@media (max-width: 770px) {
  html { font-size: 43.75%; }
  .heading__arrow { height: 20px; width: 20px; }
  .project-left .project__info { margin-right: -4rem; }
  .project-right .project__info { margin-left: -4rem; }
}

@media (max-width: 700px) {
  .heading__line-1,
  .heading__line-2 {
    font-size: 5rem;
    text-align: center;
    margin-left: 4rem;
    margin-right: 4rem;
  }
  .heading-cta { margin-top: 1.8rem; }
  .navigation { margin-right: 0; }
  .navigation-bar { justify-content: center; }
  .project__image-container { height: 48rem; width: 64rem; }
  .project__info {
    background: rgba(11, 11, 26, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
  }
  .contact { width: 400px; }
  .contact input,
  .contact textarea { width: 400px; }
}

@media (max-width: 615px) {
  html { font-size: 40%; }
  .heading__arrow { margin-left: 10px; }
}

@media (max-width: 600px) {
  .profile__blurb { width: 80vw; margin-left: auto; margin-right: auto; }
  .skills__item { height: 70px; width: 115px; }
  .skills__item img { height: 45px; }
  .project-left .project__info { margin-right: -6rem; }
  .project-right .project__info { margin-left: -6rem; }
}

@media (max-width: 560px) {
  .project { margin-bottom: 12rem; }
  .project__image-container { height: 40rem; width: 52rem; }
  .project__info { top: 4rem; }
  .project__description { margin-top: 2rem; }
  .project__live-2 { margin-top: 2rem; }
}

@media (max-width: 550px) {
  .heading__line-1,
  .heading__line-2 { font-size: 5rem; }
  .heading-cta { padding: 0.8rem 2rem; }
  .heading__arrow { height: 16px; width: 16px; }
  .project__title { font-size: 2.5rem; }
}

@media (max-width: 500px) {
  .skills__item { height: 60px; width: 100px; }
  .skills__item img { height: 35px; }
}

@media (max-width: 470px) {
  .contact { width: 330px; }
  .contact input,
  .contact textarea { width: 330px; }
}

@media (max-width: 440px) {
  .project { margin-bottom: 10rem; }
  .project__image-container { height: 30rem; width: 39rem; }
  .project-left .project__info { left: -10rem; margin-right: -7rem; }
  .project-right .project__info { right: -10rem; margin-left: -7rem; }
  .project__info { top: 2rem; }
}

@media (max-width: 410px) {
  .skills__row:not(:last-child) { margin-right: 15px; }
  .skills__item { height: 50px; width: 80px; }
  .skills__item:not(:last-child) { margin-bottom: 15px; }
  .skills__item img { height: 26px; }
}

@media (max-width: 400px) {
  .contact { width: 260px; }
  .contact input,
  .contact textarea { width: 260px; }
  .project__info { top: 0; }
  .project__title { font-size: 2.2rem; }
}

@media (max-width: 350px) {
  html { font-size: 35%; }
}

@media (max-width: 340px) {
  .skills__item { height: 45px; width: 70px; }
}

@media (max-width: 300px) {
  .skills__row:not(:last-child) { margin-right: 10px; }
}
