@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap");

:root {
  --primary-color: #8b0000;
  --secondary-color: #4a0e0e;
  --text-color: #e0e0e0;
  --bg-color: #121212;
}

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

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  min-height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background-color: #fff;
  border-radius: 50%;
  animation: twinkle linear infinite;
}

@keyframes twinkle {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.shooting-star {
  position: absolute;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #fff 0%, #fff 15px, transparent 15px);
  border-radius: 50px;
  animation: shootingStarStraight 2s linear infinite;
}

.shooting-star::before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 6px #fff;
}

@keyframes shootingStarStraight {
  0% {
    transform: translateX(100vw);
    opacity: 1;
  }
  100% {
    transform: translateX(-60px);
    opacity: 0;
  }
}

header {
  background-color: rgba(0, 0, 0, 0.8);
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: transform 0.3s ease-in-out;
  backdrop-filter: blur(10px);
}

header.header-hidden {
  transform: translateY(-100%);
}

nav ul {
  display: flex;
  justify-content: center;
  list-style-type: none;
  flex-wrap: wrap;
}

nav ul li {
  margin: 0.5rem;
}

nav ul li a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

nav ul li a:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(139, 0, 0, 0.3);
}

section {
  padding: 4rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

section.show {
  opacity: 1;
  transform: translateY(0);
}

section.animate {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  display: inline-block;
  padding-bottom: 0.5rem;
  position: relative;
  overflow: hidden;
  font-size: 1.8rem;
  margin-bottom: 2rem;
  animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
  0%,
  100% {
    text-shadow: 0 0 10px rgba(139, 0, 0, 0.5);
  }
  50% {
    text-shadow: 0 0 20px rgba(139, 0, 0, 0.8), 0 0 30px rgba(139, 0, 0, 0.6);
  }
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  animation: underline 2s ease-in-out infinite;
}

@keyframes underline {
  0%,
  100% {
    left: -100%;
  }
  50% {
    left: 100%;
  }
}

#hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 120px 1rem 2rem 1rem;
}

.hero-content {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(139, 0, 0, 0.1));
  padding: 3rem;
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(139, 0, 0, 0.3);
  animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.profile-image {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--primary-color);
  margin-bottom: 1.5rem;
  animation: profilePulse 3s infinite;
  box-shadow: 0 0 30px rgba(139, 0, 0, 0.5);
}

@keyframes profilePulse {
  0% {
    box-shadow: 0 0 30px rgba(139, 0, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 50px rgba(139, 0, 0, 0.8), 0 0 70px rgba(139, 0, 0, 0.4);
  }
  100% {
    box-shadow: 0 0 30px rgba(139, 0, 0, 0.5);
  }
}

.typing-effect {
  overflow: hidden;
  border-right: .15em solid var(--primary-color);
  white-space: nowrap;
  margin: 0 auto;
  letter-spacing: .15em;
  animation: typing 4s steps(40, end), blink-caret 1s step-end infinite;
  font-size: 2rem;
  font-weight: 700;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: var(--primary-color);
  }
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  animation: subtitleSlide 2s ease-out 1s both;
  max-width: 100%;
  word-wrap: break-word;
}

@keyframes subtitleSlide {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.about-content {
  background: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 15px;
  border-left: 4px solid var(--primary-color);
  animation: contentSlideIn 1s ease-out;
}

@keyframes contentSlideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.skills-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.skill-card {
  background: rgba(40, 40, 40, 0.8);
  border: 1px solid rgba(139, 0, 0, 0.3);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.skill-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(139, 0, 0, 0.3);
  border-color: var(--primary-color);
}

.skill-card h3 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.skill-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skill-items span {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  padding: 0.3rem 0;
  transition: color 0.3s ease;
}

.skill-items span:hover {
  color: var(--primary-color);
}

.coding-platform-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.platform-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(139, 0, 0, 0.05));
  padding: 2rem;
  border-radius: 15px;
  transition: all 0.3s ease;
  border: 1px solid rgba(139, 0, 0, 0.2);
  max-width: 500px;
  text-align: center;
  width: 100%;
}

.platform-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(139, 0, 0, 0.3);
}

.platform-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.platform-card .credentials-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.languages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.language-item {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(139, 0, 0, 0.05));
  padding: 2rem;
  border-radius: 15px;
  transition: all 0.3s ease;
  border: 1px solid rgba(139, 0, 0, 0.2);
  text-align: center;
}

.language-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(139, 0, 0, 0.3);
}

.language-item h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.language-item p {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

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

.project-card,
.experience-item,
.education-item {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(139, 0, 0, 0.05));
  padding: 2rem;
  border-radius: 15px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(139, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.project-card::before,
.experience-item::before,
.education-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(139, 0, 0, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.project-card:hover::before,
.experience-item:hover::before,
.education-item:hover::before {
  transform: translateX(100%);
}

.project-card:hover,
.experience-item:hover,
.education-item:hover {
  transform: translateY(-10px) rotateX(5deg);
  box-shadow: 0 15px 35px rgba(139, 0, 0, 0.3);
  border-color: var(--primary-color);
}

.project-card h3,
.experience-item h3,
.education-item h3 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
  color: var(--primary-color);
  position: relative;
  z-index: 1;
}

.project-subtitle {
  color: var(--primary-color);
  font-style: italic;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.project-link {
  display: inline-block;
  margin-top: auto;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: var(--text-color);
  text-decoration: none;
  border-radius: 25px;
  transition: all 0.3s ease;
  align-self: flex-start;
  font-size: 0.9rem;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.project-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.project-link:hover::before {
  left: 100%;
}

.project-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(139, 0, 0, 0.4);
}

.date {
  color: var(--secondary-color);
  font-style: italic;
  font-size: 0.9rem;
}

.achievement-list,
.contact-list {
  list-style-type: none;
  padding-left: 0;
  max-width: 800px;
  margin: 0 auto;
}

.achievement-list li,
.contact-list li {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  margin-bottom: 1rem;
  background: linear-gradient(90deg, rgba(139, 0, 0, 0.1), rgba(255, 255, 255, 0.05));
  padding: 1.5rem;
  border-radius: 10px;
  border-left: 4px solid var(--primary-color);
  position: relative;
  overflow: hidden;
}

.achievement-list li:hover,
.contact-list li:hover {
  background: linear-gradient(90deg, rgba(139, 0, 0, 0.2), rgba(255, 255, 255, 0.1));
  transform: translateX(10px) scale(1.02);
  box-shadow: 0 8px 25px rgba(139, 0, 0, 0.3);
}

.achievement-list.animate li,
.contact-list.animate li {
  opacity: 1;
  transform: translateX(0);
}

.contact-list a {
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-list a:hover {
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(139, 0, 0, 0.5);
}

.credential-button {
  display: inline-block;
  margin: 0.5rem 0.5rem 0.5rem 0;
  padding: 0.6rem 1.2rem;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  text-decoration: none;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(139, 0, 0, 0.3);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.credential-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.credential-button:hover::before {
  left: 100%;
}

.credential-button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(139, 0, 0, 0.5);
}

.credentials-container {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

footer {
  text-align: center;
  padding: 3rem;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(139, 0, 0, 0.1));
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(139, 0, 0, 0.3);
}

@media (max-width: 768px) {
  #hero {
    padding-top: 100px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .typing-effect {
    font-size: 1.5rem;
  }

  .profile-image {
    width: 200px;
    height: 200px;
  }

  .hero-content {
    padding: 2rem 1.5rem;
    width: 95%;
  }

  .hero-subtitle {
    font-size: 1rem;
    white-space: normal;
    line-height: 1.4;
  }

  .skills-masonry {
    grid-template-columns: repeat(auto-fit, 1fr);
  }

  .skill-category {
    padding: 1.2rem;
  }

  .skill-category h3 {
    font-size: 1rem;
  }

  .skill-category p {
    font-size: 0.9rem;
    line-height: 1.7;
  }

  .skills-container {
    gap: 0.6rem;
  }

  .skill-box {
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
  }

  .languages-grid {
    grid-template-columns: 1fr;
  }

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

  .project-card,
  .experience-item,
  .education-item {
    padding: 1.5rem;
  }

  nav ul li a {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
  }

  section {
    padding: 3rem 1rem;
  }
}

@media (max-width: 480px) {
  #hero {
    padding-top: 90px;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .typing-effect {
    font-size: 1.2rem;
  }

  .profile-image {
    width: 180px;
    height: 180px;
  }

  .hero-content {
    padding: 1.5rem 1rem;
    width: 95%;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    line-height: 1.3;
  }

  nav ul li {
    margin: 0.3rem;
  }

  nav ul li a {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }

  .skill-category {
    padding: 1rem;
  }

  .skill-category h3 {
    font-size: 0.95rem;
  }

  .skill-category p {
    font-size: 0.85rem;
  }
}
