@import url("https://fonts.googleapis.com/css2?family=Syne:wght@400..800&display=swap");

:root {
  /* Colors */
  --hue: 230;
  --first-color: hsl(var(--hue), 55%, 55%);
  --first-color-light: hsl(var(--hue), 55%, 65%);
  --first-color-alt: hsl(var(--hue), 50%, 50%);
  --title-color: hsl(var(--hue), 30%, 95%);
  --text-color: hsl(var(--hue), 20%, 80%);
  --body-color: hsl(var(--hue), 40%, 16%);
  --container-color: hsl(var(--hue), 40%, 20%);

  /* Typography */
  --body-font: "Syne", sans-serif;
  --biggest-font-size: 3rem;
  --big-font-size: 1.5rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: 0.938rem;
  --small-font-size: 0.813rem;

  /* Font weight */
  --font-regular: 400;
  --font-semi-bold: 600;
  --font-bold: 700;

  /* z-index */
  --z-tooltip: 10;
  --z-fixed: 100;
}

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

html {
  scroll-behavior: smooth;
}

body,
input,
textarea,
button {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
}

body {
  background-color: var(--body-color);
  color: var(--text-color);
}

input,
button,
textarea {
  border: none;
  outline: none;
}

h1,
h2,
h3 {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
}

p {
  line-height: 130%;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Reusable classes */
.container {
  max-width: 1120px;
  margin-inline: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding-block: 5rem 2rem;
}

.section__title {
  text-align: center;
  font-size: var(--h1-font-size);
  font-weight: var(--font-bold);
  margin-bottom: 2rem;
  color: #e0e6ed;
}

.section__subtitle {
  font-size: 1rem;
  color: #a8c0e0;
  margin-bottom: 2rem;
}

.main {
  overflow: hidden;
}

/* Animations */
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  0% {
    opacity: 0;
    transform: translateX(20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeInRotate {
  0% {
    opacity: 0;
    transform: rotate(10deg);
  }
  100% {
    opacity: 1;
    transform: rotate(0);
  }
}

@keyframes fadeInScaleRotate {
  0% {
    opacity: 0;
    transform: scale(0.8) rotate(10deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: #1e2a38;
}

header .logo {
  font-size: var(--big-font-size);
  font-weight: var(--font-bold);
  color: var(--first-color);
}

header nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

header nav a {
  color: #e0e6ed;
  font-size: var(--normal-font-size);
  transition: color 0.3s ease;
}

header nav a:hover {
  color: #a8c0e0;
}

header .theme-toggle {
  background-color: #e0e6ed;
  color: #1e2a38;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-left: auto;
}

header .theme-toggle:hover {
  background-color: #a8c0e0;
}

/* Home Section */
.home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  text-align: center;
  background-color: var(--body-color);
  animation: fadeIn 2s ease-in-out;
}

.home__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.home__text {
  flex: 1;
}

.home__text h1 {
  font-size: var(--biggest-font-size);
  margin-bottom: 1rem;
  color: var(--first-color);
}

.home__text p {
  font-size: var(--h2-font-size);
  margin-bottom: 2rem;
  color: var(--text-color);
}

.resume-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #4a90e2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  font-size: inherit;
  transition: all 0.3s ease;
}

.resume-button:hover {
  background-color: #357ab8;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Profile Photo */
.home__photo {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background: radial-gradient(square, #1e2a38, #0b1120);
  border-radius: 50%;
  padding: 2rem;
}

.home__photo img {
  max-width: 100%;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.home__photo::after {
  content: "";
  position: absolute;
  bottom: -20px;
  width: 150px;
  height: 20px;
  background: radial-gradient(circle, rgba(173, 216, 230, 0.5), transparent);
  border-radius: 50%;
  z-index: -1;
  animation: pulse 2s infinite;
}

.home__photo img:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  border: 4px solid var(--first-color);
  box-shadow: 0 0 15px var(--first-color);
}

/* Separator */
.separator {
  width: 80%;
  height: 2px;
  background: linear-gradient(to right, #4a90e2, transparent);
  margin: 2rem auto;
  border: none;
}

/* Info Section */
.info {
  padding: 4rem 2rem;
  background-color: #0b1120;
  text-align: center;
}

.info__container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.info__text {
  max-width: 600px;
  font-size: 1rem;
  color: #e0e6ed;
  line-height: 1.6;
}

.info__skills {
  background-color: #1e2a38;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  text-align: left;
}

.info__skills h3 {
  font-size: 1.5rem;
  color: #4a90e2;
  margin-bottom: 1rem;
}

.info__skills ul {
  list-style: none;
  padding: 0;
}

.info__skills li {
  font-size: 1rem;
  color: #a8c0e0;
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
}

.info__skills li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: #4a90e2;
  font-size: 1rem;
}

/* Works Section */
.work {
  padding: 4rem 2rem;
  background-color: #0b1120;
  text-align: center;
}

.work__container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.work__category h3 {
  font-size: 1.5rem;
  color: #4a90e2;
  margin-bottom: 1rem;
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.project {
  background-color: #1e2a38;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.project img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.project p {
  font-size: 1rem;
  color: #e0e6ed;
  margin-bottom: 0.5rem;
}

.project__link {
  font-size: 0.9rem;
  color: #4a90e2;
  text-decoration: none;
  transition: color 0.3s ease;
}

.project__link:hover {
  color: #357ab8;
}

/* Services Section */
.services__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.service {
  background-color: #1e2a38;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.service__icon {
  font-size: 3rem;
  color: #4a90e2;
  margin-bottom: 1rem;
}

.service__title {
  font-size: 1.5rem;
  color: #e0e6ed;
  margin-bottom: 1rem;
}

.service__description {
  font-size: 1rem;
  color: #a8c0e0;
  line-height: 1.6;
}

/* Contact Section */
.contact {
  padding: 4rem 2rem;
  background-color: #0b1120;
  text-align: center;
}

.contact__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.contact__form {
  width: 100%;
  max-width: 500px;
  background-color: #1e2a38;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.form__group {
  margin-bottom: 1rem;
}

.form__input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #a8c0e0;
  border-radius: 5px;
  font-size: 1rem;
  color: #e0e6ed;
  background-color: #0b1120;
}

.form__input:focus {
  outline: none;
  border-color: #4a90e2;
}

.button {
  padding: 0.75rem 1.5rem;
  background-color: #4a90e2;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: #357ab8;
}

#form-feedback {
  font-size: 1rem;
  color: #4caf50;
  text-align: center;
}

#form-feedback.error {
  color: #f44336;
}

#form-feedback.loading {
  color: #2196f3;
}

.contact__socials {
  display: flex;
  gap: 1.5rem;
}

.social__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #e0e6ed;
  font-size: 1rem;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social__link:hover {
  color: #4a90e2;
  transform: scale(1.1);
}

.social__link i {
  font-size: 1.5rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social__link:hover i {
  color: #4a90e2;
  transform: scale(1.2);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  background-color: var(--container-color);
  color: var(--text-color);
}

footer a {
  color: var(--first-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--title-color);
}

/* Scroll Up Button */
#scrollUp {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--first-color);
  color: var(--title-color);
  padding: 0.75rem;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

#scrollUp:hover {
  background-color: var(--first-color-alt);
}

/* Light Mode Styles */
body.light-mode {
  background-color: #ffffff;
  color: #000000;
}

body.light-mode .header {
  background-color: #f0f0f0;
  color: #000000;
}

body.light-mode nav a {
  color: #000000;
}

body.light-mode nav a:hover {
  color: #555555;
}

body.light-mode .theme-toggle {
  background-color: #000000;
  color: #ffffff;
}

body.light-mode .home {
  background-color: #f9f9f9;
  color: #000000;
}

body.light-mode .home__text h1,
body.light-mode .section__title {
  color: #000000;
}

body.light-mode .home__text p,
body.light-mode .section__subtitle,
body.light-mode .info__text {
  color: #000000;
}

body.light-mode .project p {
  color: #4a90e2;
  opacity: 1;
}

body.light-mode .info,
body.light-mode .services,
body.light-mode .work,
body.light-mode .contact {
  background-color: #f9f9f9;
  color: #000000;
}

body.light-mode .project {
  background-color: #ffffff;
  color: #000000;
  border: 1px solid #e0e0e0;
}

body.light-mode .project:hover {
  background-color: #f0f0f0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.light-mode .service {
  background-color: #ffffff;
  color: #000000;
  border: 1px solid #e0e0e0;
}

body.light-mode .service:hover {
  background-color: #f0f0f0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.light-mode .service__title {
  color: #4a90e2;
}

body.light-mode .service__description {
  color: #555555;
}

body.light-mode .service__icon {
  color: #4a90e2;
}

body.light-mode .contact__form {
  background-color: #ffffff;
  color: #000000;
  border: 1px solid #e0e0e0;
}

body.light-mode .form__input {
  background-color: #f9f9f9;
  color: #000000;
  border: 1px solid #e0e0e0;
}

body.light-mode .form__input:focus {
  border-color: #4a90e2;
}

body.light-mode .info__skills {
  background-color: #ffffff;
  color: #000000;
  border: 1px solid #e0e0e0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.light-mode .info__skills h3 {
  color: #4a90e2;
}

body.light-mode .info__skills li {
  color: #555555;
}

body.light-mode .info__skills li::before {
  color: #4a90e2;
}

body.light-mode .contact__socials .social__link {
  color: #87ceeb;
}

body.light-mode .contact__socials .social__link:hover {
  color: #87ceeb;
}

body.light-mode footer a {
  color: #000000;
}

body.light-mode footer a:hover {
  color: #555555;
}

body.light-mode #scrollUp {
  background-color: #000000;
  color: #ffffff;
}

body.light-mode #scrollUp:hover {
  background-color: #333333;
}

/* Breakpoints */
@media screen and (max-width: 768px) {
  header nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .home h1 {
    font-size: var(--big-font-size);
  }

  .home p {
    font-size: var(--h3-font-size);
  }

  .work .projects {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .home__photo img {
    max-width: 70%;
  }
}

@media screen and (max-width: 480px) {
  header .logo {
    font-size: var(--h2-font-size);
  }

  header nav a {
    font-size: var(--small-font-size);
  }

  .home h1 {
    font-size: var(--h1-font-size);
  }

  .home p {
    font-size: var(--normal-font-size);
  }

  .home button {
    font-size: var(--small-font-size);
    padding: 0.5rem 1rem;
  }

  .work .projects {
    grid-template-columns: 1fr;
  }

  .home__photo img {
    max-width: 60%;
  }
}
