/* Common Styles */
html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  list-style: none;
  font-family: "Poppins", sans-serif;
}

img {
  width: 100%;
}

:root {
  --background: #0d1117;
  --second-background: #0b121f;
  --primary-color: #6c63ff;
  --secondary-color: #ff6584;
  --text-color: #2d2d2d;
  --light-text: #f5f5f5;
}

body {
  min-height: 100vh;
  background-color: var(--second-background);
  color: var(--light-text);
}

/* Header */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 0.5em 15%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--background);
  z-index: 1000;
}

ul {
  display: flex;
  align-items: center;
  gap: 3em;
}

nav ul a {
  color: var(--light-text);
  opacity: 0.7;
  transition: 0.2s ease-in-out;
}

nav ul a:hover {
  opacity: 1;
}

.logo {
  font-size: 2em;
  color: var(--light-text);
  font-weight: 800;
  opacity: 0.8;
  transition: 0.2s ease-in-out;
}

.logo:hover {
  opacity: 1;
}

.btn {
  padding: 0.5em 1em;
  color: var(--light-text);
  font-weight: 500;
  letter-spacing: 1px;
  border-radius: 0.5em;
  font-size: 1.1em;
  border: 2px solid var(--light-text);
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.btn:hover {
  background-color: var(--light-text);
  color: var(--second-background);
}

.cta-btn {
  background: linear-gradient(to right, #8fef16, #03c7be);
  color: var(--text-color);
  font-weight: bold;
  border: none;
}

.cta-btn:hover {
  background: linear-gradient(to right, #03c7be, #8fef16);
}

span {
  background: linear-gradient(to right, #8fef16, #03c7be);
  background-clip: text;
  color: transparent;
}

#menu {
  color: var(--light-text);
  font-size: 1.5em;
  display: none;
  cursor: pointer;
}

/* Hero Section */
#home {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2em;
  color: var(--light-text);
  position: relative;
  background-color: rgba(0, 0, 0, 0.6);
  overflow: hidden;
  padding: 5% 15%;
  animation: fadeIn 1s ease-in-out;
}

#home::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("../img/pc.webp");
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  z-index: -1;
}

#home img {
  width: 18vw;
  border-radius: 50%;
  margin-top: 3em;
}

.info-box {
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 0.5em;
  max-width: 600px;
}

.info-box h1 {
  font-size: 5em;
  font-weight: 500;
}

.info-box h3 {
  font-size: 2em;
  font-weight: 400;
}

.info-box p {
  opacity: 0.7;
}

.btn-box {
  display: flex;
  gap: 1em;
}

/* About Section */
#about {
  background-color: var(--background);
  padding: 5% 10%;
  overflow: hidden;
}

.about-container {
  display: flex;
  align-items: center;
  gap: 60px;
  margin: 0 auto;
}

.about-image {
  flex: 1;
  min-width: 300px;
}

.about-image img {
  width: 100%;
}
.about-content {
  width: 50%;
}
.section-title {
  font-size: 2.5rem;
  color: #8fef16;
  margin-bottom: 0.5em;
  position: relative;
}

.about-text p {
  color: #e6edf3;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.skills-title {
  color: #0ccab2;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.skills-container {
  width: 100%;
  overflow: hidden;
  margin: 20px 0;
}

.skills-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: scroll 20s linear infinite;
}

.skill {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f0f0f0;
  padding: 12px 20px;
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid rgba(12, 202, 178, 0.3);
  border-radius: 30px;
  white-space: nowrap;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.skill i {
  color: #0ccab2;
  font-size: 1.2rem;
}

.skill:hover {
  background: rgba(12, 202, 178, 0.1);
  border-color: #89ed1c;
  box-shadow: 0 5px 15px rgba(137, 237, 28, 0.2);
}

.skills-container:hover .skills-track {
  animation-play-state: paused;
}
.about-text p,
.skill {
  font-size: clamp(0.9rem, 1vw + 0.5rem, 1.1rem);
}
@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .about-container {
    flex-direction: column;
    gap: 40px;
  }

  .about-image {
    max-width: 400px;
    margin: 0 auto;
  }

  .about-content {
    text-align: center;
    width: 100%;
  }

  .section-title span::after,
  .skills-title::after {
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Education Section */
#education {
  background-color: var(--second-background);
  padding: 5% 15%;
}

#education .header {
  text-align: center;
  margin-bottom: 3em;
  font-size: 3em;
}

.education-container {
  display: flex;
  flex-direction: column;
  gap: 2em;
}

.education-item {
  background-color: var(--background);
  padding: 2em;
  border-radius: 1em;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.education-item h2 {
  font-size: 2em;
  color: #8fef16;
  margin-bottom: 0.5em;
}

.education-item p {
  opacity: 0.8;
  margin-bottom: 0.5em;
}

.education-item .date {
  font-style: italic;
  font-size: 0.9em;
  color: #03c7be;
}

/* Services Section */
#services {
  background-color: var(--background);
  padding: 5% 15%;
}

#services .header {
  text-align: center;
  margin-bottom: 2em;
  font-size: 3em;
}

.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2em;
}

.box {
  border: 3px solid var(--primary-color);
  border-radius: 0.5em;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 2em;
  gap: 1em;
  color: var(--light-text);
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.box:hover {
  border: 3px solid var(--secondary-color);
  transform: translateY(-10px);
}

.box h1 {
  font-size: 2em;
}

.box p {
  opacity: 0.8;
}

.box img {
  border-radius: 0.5em;
}

/* Portfolio Section */
#portfolio {
  background-color: var(--second-background);
  padding: 5% 15%;
}

#portfolio .header {
  text-align: center;
  margin-bottom: 2em;
  font-size: 3em;
}

.portfolio-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2em;
}

.card {
  background-color: var(--background);
  border-radius: 0.5em;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease-in-out;
}

.card:hover img {
  transform: scale(1.1);
}

.card .description {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  transform: translateY(20px);
  padding: 1.5em;
  text-align: center;
}

.card:hover .description {
  opacity: 1;
  transform: translateY(0);
}

.card .description h2 {
  font-size: 1.5em;
  margin-bottom: 0.5em;
  color: #8fef16;
}

.card .description p {
  font-size: 1em;
  opacity: 0.8;
  margin-bottom: 1em;
}

.card .links {
  display: flex;
  justify-content: center;
  gap: 1em;
}

.card .links a {
  color: #8fef16;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease-in-out;
}

.card .links a:hover {
  color: #03c7be;
}

/* Contact Section */
#contact {
  background-color: var(--background);
  padding: 5% 15%;
}

#contact .header {
  text-align: center;
  margin-bottom: 2em;
  font-size: 3em;
}

form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2em;
}

form .input-box {
  display: flex;
  flex-direction: column;
  gap: 1em;
  width: 100%;
  max-width: 600px;
}

form .input-box span {
  font-size: 1.2em;
}

form input,
form textarea {
  font-size: 1em;
  padding: 1em;
  border-radius: 0.5em;
  border: none;
  outline: none;
  width: 100%;
}

form input:focus,
form textarea:focus {
  background: #f0f0f0;
}

form button {
  background: linear-gradient(to right, #8fef16, #03c7be);
  color: var(--text-color);
  font-weight: bold;
  border: none;
  padding: 1em 2em;
  border-radius: 0.5em;
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

form button:hover {
  background: linear-gradient(to right, #03c7be, #8fef16);
}

#success-message {
  display: none;
  color: green;
  margin-top: 1em;
}

/* Footer Section */
footer {
  background-color: var(--background);
  padding: 5% 15%;
  color: var(--light-text);
}

#footer-wrapper {
  display: flex;
  justify-content: space-between;
  gap: 5em;
}

.col-left,
.col-right {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.col-box {
  display: flex;
  align-items: center;
  gap: 1em;
}

.col-box i {
  font-size: 1.2em;
}

.col-right .social-icons {
  display: flex;
  gap: 1em;
}

.col-right .social-icons a {
  color: var(--light-text);
  font-size: 1.5em;
  transition: 0.3s ease-in-out;
}

.col-right .social-icons a:hover {
  color: var(--primary-color);
}

#footer-copyright {
  text-align: center;
  margin-top: 2em;
  padding-top: 1em;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Media Queries */
@media (max-width: 980px) {
  section {
    padding: 8em 15%;
  }

  nav .btn {
    display: none;
  }

  #menu {
    display: block;
  }

  .links {
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    padding: 1em 3em;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    flex-direction: column;
    text-align: center;
  }

  .links.active {
    display: flex;
  }

  .links a {
    margin: 1em 0;
    font-size: 1.2em;
  }

  #home h1 {
    font-size: 4em;
  }

  #home h3 {
    font-size: 2em;
  }

  #about {
    flex-direction: column;
  }

  #about img {
    width: 80vw;
  }

  .skills {
    gap: 2em;
  }
}

@media (max-width: 768px) {
  #home h1 {
    font-size: 2.5em;
  }

  #home h3 {
    font-size: 1.5em;
  }

  #home img {
    width: 50vw;
  }

  #footer-wrapper {
    flex-direction: column;
    gap: 2em;
  }
}
