/* Variables */
:root {
  --primary-color: #4cca77;
  --secondary-color: #22ac4e;
  --background-color: #f4f4f4;
  --text-color: #333;
  --text-color-light: #666;
  --text-color-lighter: #444;
  --white-color: #fff;
  --border-color: #ddd;
  --hover-scale: 1.2;
  --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: var(--background-color);
}

section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

/* Header */
header {
  background-color: var(--white-color);
  padding: 0.5rem 0;
  box-shadow: var(--box-shadow);
}

header .logo {
  width: 50px;
  height: 50px;
}

header .logo svg {
  width: 100%;
  height: 100%;
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  flex-wrap: wrap;
}

nav ul {
  width: 30%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav ul li a {
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s ease;
}

nav ul li:hover a {
  color: var(--secondary-color);
}

.is-open {
  display: block;
  width: 100%;
  margin-top: 0.7rem;
}

.is-open li {
  margin-top: 0.3rem;
}

header nav button {
  background-color: transparent;
  border: none;
  cursor: pointer;
  display: none;
}

header nav button svg {
  width: 30px;
  height: 30px;
}

/* Landing */
.landing {
  min-height: calc(100vh - 66px);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 2rem;
  width: 100%;
}

.circular-image {
  width: 290px;
  height: 310px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary-color);
}

.circular-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.info {
  max-width: 900px;
  margin-right: 1.2rem;
}

.info h1 {
  font-size: 2.5rem;
  margin-bottom: -12px;
  color: var(--text-color);
}

.info h2,
.typed-cursor {
  display: inline-block;
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.info p {
  color: var(--text-color-lighter);
}

.cta {
  margin-top: 1rem;
}

.download-cv {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white-color);
  padding: 0.5rem 3rem;
  border-radius: 5px;
  font-weight: 500;
  transition: background-color 0.3s ease;
  margin-top: 0.7rem;
}

.download-cv:hover {
  background-color: var(--secondary-color);
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.social-links li {
  transition: transform 0.2s ease;
}

.social-links li:hover {
  transform: scale(var(--hover-scale));
}

.social-links svg {
  width: 30px;
  height: 30px;
}

.social-links a.linkedin {
  fill: #0077b5;
}

.social-links a.facebook {
  fill: #1877f2;
}

.social-links a.twitter {
  fill: #1da1f2;
}

.social-links a.github {
  fill: #181717;
}

/* Skills */
.skills-tools {
  background-color: var(--white-color);
}

.section-title {
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  text-transform: uppercase;
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3.2rem;
  color: transparent;
  background-image: linear-gradient(
    to right,
    #00f260,
    #604f8c,
    #f79d00,
    #0575e6
  );
  background-size: 300%;
  -webkit-background-clip: text;
  background-clip: text;
  background-position: 0%;
  animation: colorChange 3s infinite alternate;
}

@keyframes colorChange {
  to {
    background-position: 100%;
  }
}

.skills,
.tools {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.skills::before,
.skills::after,
.tools::before,
.tools::after {
  content: "";
  position: absolute;
  top: 0;
  width: 9rem;
  height: 100%;
  z-index: 4;
}

.skills::before,
.tools::before {
  left: 0;
  background: linear-gradient(
    to right,
    var(--white-color),
    rgba(255, 255, 255, 0)
  );
}

.skills::after,
.tools::after {
  right: -1px;
  background: linear-gradient(
    to left,
    var(--white-color),
    rgba(255, 255, 255, 0)
  );
}

.skills:hover .skills-list,
.tools:hover .tools-list {
  animation-play-state: paused;
}

.tools {
  margin-top: 4rem;
}

.skills-list,
.tools-list {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding-right: 1rem;
}

.skills-list {
  animation: scroll-to-left 20s infinite linear;
}

.tools-list {
  animation: scroll-to-right 15s infinite linear;
}

.skills-list li,
.tools-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
}

.skills-list li p,
.tools-list li p {
  color: var(--text-color-lighter);
}

.skills-list li svg,
.tools-list li svg,
.skills-list li img,
.tools-list li img {
  width: 40px;
  height: 40px;
}

@keyframes scroll-to-right {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes scroll-to-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.project-card {
  background: var(--white-color);
  border-radius: 10px;
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-card h3 {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin: 1rem;
}

.project-card p {
  color: var(--text-color-light);
  margin: 0 1rem 1rem;
  flex-grow: 1;
  line-height: 1.5;
}

.project-card span {
  color: var(--primary-color);
  font-weight: 570;
}

.project-links {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
}

.project-links a {
  padding: 0.5rem 1rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.demo-btn {
  background-color: var(--primary-color);
  color: var(--white-color);
}

.demo-btn:hover {
  background-color: var(--secondary-color);
}

.github-btn {
  background-color: var(--text-color);
  color: var(--white-color);
}

.github-btn:hover {
  background-color: #1a1a1a;
}

/* Contact */
.contact {
  background-color: #f8f9fa;
}

.contact form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact input,
.contact textarea {
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 1rem;
  width: 100%;
}

.contact input:focus,
.contact textarea:focus {
  outline: none;
  box-shadow: 0 0 10px var(--text-color);
  border-color: var(--text-color);
}

.contact textarea {
  font-family: inherit;
  resize: vertical;
  min-height: 150px;
}

.name-error,
.email-error,
.message-error {
  color: red;
  font-size: 0.8rem;
  margin-top: -1rem;
  display: none;
}

.contact button {
  padding: 1rem 2rem;
  background-color: var(--primary-color);
  color: var(--white-color);
  border: none;
  border-radius: 5px;
  outline: none;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact button:hover {
  background-color: var(--secondary-color);
  outline: 2px solid var(--secondary-color);
}

/* Container&responsive */
.container {
  max-width: 70%;
  margin: 0 auto;
}

/* Large screens */
@media (min-width: 1200px) {
  nav ul {
    width: 20%;
  }
  .container {
    max-width: 1140px;
  }
}

/* Medium screens */
@media (max-width: 992px) {
  .container {
    max-width: 80%;
  }
  header nav ul {
    display: none;
  }
  header nav button {
    display: block;
  }
  .landing {
    flex-direction: column;
  }
  .info {
    text-align: center;
  }
}

/* Small screens */
@media (max-width: 768px) {
  .container {
    max-width: 90%;
  }
  .social-links {
    position: relative;
    top: 50%;
    transform: translateY(-50%);
  }
}

/* Extra small screens */
@media (max-width: 576px) {
  .container {
    max-width: 95%;
    padding: 0 0.5rem;
  }
}

footer {
  padding: 1rem 0;
  text-align: center;
  font-size: 1.2rem;
}

footer p a {
  color: var(--primary-color);
}

/* notify */
.notify-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
}

.notify {
  padding: 1rem;
  background-color: #333;
  text-align: center;
  color: var(--white-color);
  border-radius: 10px;
}

.notify p {
  font-size: 1.3rem;
  text-align: center;
  margin-bottom: 1rem;
}

.notify a {
  color: var(--white-color);
  text-decoration: none;
  font-weight: 500;
  background-color: var(--secondary-color);
  padding: 0.5rem 1.5rem;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  margin-left: 1rem;
}

.notify a:hover {
  background-color: var(--primary-color);
}

.notify-close {
  background-color: var(--white-color);
  color: black;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
