/* Global */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: rgb(15, 15, 41);
  color: white;
}

html {
  scroll-behavior: smooth;
}

/* Header */
header {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 100;
  justify-content: space-between;
  align-items: center;
  background-color: rgb(5, 5, 85);
  color: lavender;
}

header h2 {
  padding: 20px;
}

.right {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-right: 20px;
}

.right a {
  text-decoration: none;
  color: lavender;
  padding: 10px;
  margin: 2px 4px;
  background-color: rgb(85, 21, 189);
  border-radius: 5px;
  cursor: pointer;
  transition:
    background-color 0.15s,
    opacity 0.15s;
}

.right a:hover {
  background-color: rgb(127, 67, 223);
}

.right a:active {
  opacity: 0.5;
}

/* Hero Section */
.s1 {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  background-color: rgb(15, 15, 41);
  color: white;
  min-height: 300px;
}

.left-s1 {
  padding-left: 30px;
}

.available {
  background-color: rgb(25, 25, 66);
  padding: 8px 13px;
  border-radius: 18px;
  border: 1px solid blueviolet;
  font-size: 15px;
}

.available::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  vertical-align: middle;
  background-color: limegreen;
  border-radius: 50%;
  box-shadow: 0 0 6px limegreen;
}

.left-s1 h4 {
  font-size: 45px;
  margin-top: 20px;
  margin-bottom: 10px;
}

.me {
  color: rgb(154, 93, 211);
}

.pls1 {
  color: aqua;
}

.right-s1 img {
  height: 160px;
  width: 156px;
  object-fit: cover;
  border: 2px solid blueviolet;
  border-radius: 80px;
  margin-right: 100px;
}

.buttons1 .pbutton,
.buttons1 .cbutton {
  padding: 12px 10px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition:
    background-color 0.15s,
    opacity 0.15s,
    box-shadow 0.3s ease;
}

.buttons1 .pbutton {
  background-color: rgb(183, 130, 233);
  color: rgb(15, 15, 41);
  border: 1px solid transparent;
}

.buttons1 .pbutton:hover {
  background-color: rgb(15, 15, 41);
  color: lavender;
  border: 1px solid blueviolet;
  box-shadow: 0 0 10px rgba(154, 93, 211, 0.7);
}

.buttons1 .cbutton {
  background-color: rgb(15, 15, 41);
  color: lavender;
  margin-left: 10px;
  border: 1px solid blueviolet;
}

.buttons1 .cbutton:hover {
  background-color: rgb(183, 130, 233);
  color: rgb(15, 15, 41);
  border: 1px solid transparent;
  box-shadow: 0 0 10px rgba(154, 93, 211, 0.7);
}

/* Generic Section Styling */
.section-about,
.section-skill,
.section-proj,
.section-tools,
.section-contact {
  padding: 50px;
  background-color: rgb(25, 25, 66);
  margin: 30px;
  border-radius: 10px;
}

.section-about h3,
.section-skill h3,
.section-proj h3,
.section-tools h3,
.section-contact h3 {
  color: rgb(154, 93, 211);
  margin-bottom: 20px;
  font-size: 24px;
}

/* About */
.about-stats {
  list-style: none;
  padding: 0;
}

.about-stats li {
  margin: 8px 0;
}

/* Skills */
.skill {
  margin: 15px 0;
}

.bar {
  background-color: rgb(45, 45, 90);
  border-radius: 5px;
  overflow: hidden;
  height: 20px;
}

.fill {
  background-color: rgb(154, 93, 211);
  height: 100%;
  transition:
    width 1s ease-in-out,
    background-color 0.3s ease;
}

.skill:hover .fill {
  background-color: aqua;
}

/* Projects */
.section-proj {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

h4 {
  font-size: 24px;
}

.project-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgb(45, 45, 90);
  padding: 20px;
  margin: 15px 0;
  border-radius: 8px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(154, 93, 211, 0.5);
}

.project-card a.click {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
  width: 100%;
}

.project-info {
  flex: 1;
  padding-right: 20px;
  padding-bottom: 20px;
}

.project-card img {
  width: 400px;
  height: 240px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  transition:
    transform 0.3s,
    filter 0.3s ease;
}

.project-card img:hover {
  transform: scale(1.05);
  filter: blur(5px);
}

.tags {
  font-size: 14px;
  color: aqua;
}

.click {
  text-decoration: none;
  color: lavender;
}

/* Tools */
.section-tools {
  background-color: rgb(25, 25, 66);
  border-radius: 10px;
}

.section-tools h3 {
  color: rgb(154, 93, 211);
  margin-bottom: 30px;
}

.track-wrapper {
  overflow: hidden;
  position: relative;
}

.track-wrapper::before,
.track-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}

.track-wrapper::before {
  left: 0;
  background: linear-gradient(to right, rgb(25, 25, 66), transparent);
}

.track-wrapper::after {
  right: 0;
  background: linear-gradient(to left, rgb(25, 25, 66), transparent);
}

.track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: scroll 28s linear infinite;
}

.track:hover {
  animation-play-state: paused;
}

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

.tool-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid blueviolet;
  background-color: rgb(15, 15, 41);
  white-space: nowrap;
  font-size: 14px;
  color: lavender;
  cursor: default;
  transition: background-color 0.2s;
}

.tool-chip:hover {
  background-color: rgb(45, 45, 90);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Contact */
.contact-info {
  list-style: none;
  padding: 0;
}

.contact-info li {
  margin: 8px 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
}

.contact-form input,
.contact-form textarea {
  margin: 8px 0;
  padding: 10px;
  border-radius: 5px;
  border: none;
}

.contact-form button {
  background-color: rgb(183, 130, 233);
  color: rgb(15, 15, 41);
  padding: 12px;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: rgb(127, 67, 223);
  color: white;
}

.email-button {
  display: inline-block;
  background-color: rgb(183, 130, 233);
  color: rgb(15, 15, 41);
  padding: 12px 20px;
  margin-top: 15px;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

.email-button:hover {
  background-color: rgb(127, 67, 223);
  color: white;
  box-shadow: 0 0 10px rgba(154, 93, 211, 0.7);
}

/* Footer */
footer {
  display: flex;
  text-align: center;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  gap: 20px;
  background-color: rgb(5, 5, 85);
}

footer .socials a {
  margin: 0 10px;
  color: lavender;
  text-decoration: none;
}

.logo {
  width: 30px;
  height: auto;
  filter: invert(1) sepia(1) saturate(5) hue-rotate(230deg);
  transition: filter 0.3s ease;
}

.logo path:hover {
  fill: aqua;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .s1 {
    flex-direction: column;
    text-align: center;
    height: auto;
    padding: 30px 20px;
  }

  .right-s1 img {
    margin: 20px 0;
    margin-right: 0; /* removes the 100px right margin */
  }

  .buttons1 {
    display: flex;
    justify-content: center;
    gap: 10px;
  }

  .left-s1 {
    padding-left: 0; /* removes left offset when centered */
  }
}

@media (max-width: 768px) {
  .project-card {
    flex-direction: column;
    align-items: center; /* centers both text and image */
  }

  .project-card a.click {
    flex-direction: column;
    align-items: center; /* centers the link content too */
    width: 100%;
  }

  .project-info {
    text-align: center; /* centers the title, description, tags */
    padding-right: 0; /* removes the desktop right padding */
    padding-bottom: 10px;
  }

  .project-card img {
    width: 100%;
    height: auto;
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  header {
    flex-direction: column; /* stack name and nav vertically */
    padding: 10px 0;
  }

  header h2 {
    padding: 10px; /* reduce the 20px padding */
    font-size: 18px; /* shrink the name text */
  }

  .right {
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 0 10px 0;
    gap: 6px;
  }

  .right a {
    padding: 6px 8px; /* smaller nav buttons */
    font-size: 13px;
  }

  .left-s1 h4 {
    font-size: 28px;
  }

  .right-s1 img {
    width: 120px;
    height: 120px;
  }

  .buttons1 {
    flex-direction: column;
    align-items: center;
  }

  .buttons1 .pbutton,
  .buttons1 .cbutton {
    width: 100%;
    margin: 6px 0;
  }

  .buttons1 .cbutton {
    margin-left: 0;
  }

  footer {
    flex-direction: column;
    gap: 10px;
  }
}

/* Global link styles - outside media query */
a {
  color: rgb(154, 93, 211);
  text-decoration: none;
}

a:hover {
  color: aqua;
}

footer .socials a:hover {
  color: lavender;
}

.logo:hover {
  filter: invert(1) sepia(1) saturate(5) hue-rotate(180deg);
}
