/* --- Base Styles & Fonts --- */
@import url("https://fonts.googleapis.com/css2?family=Lora:wght@400;700&family=Poppins:wght@600;700&family=Roboto:wght@400;700&display=swap");

:root {
  --primary-color: #00bfff;
  --secondary-color: #ffffff;
  --background-color: #0d1117;
  --surface-color: #161b22;
  --border-color: #30363d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto", sans-serif;
  background-color: var(--background-color);
  color: var(--secondary-color);
  overflow-x: hidden;
}

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
}

header {
  position: fixed;
  width: 100%;
  top: 0;
  padding: 15px 5%;
  z-index: 100;
  transition: background-color 0.4s ease, padding 0.4s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header.scrolled {
  background-color: var(--surface-color);
  padding: 10px 5%;
  border-bottom: 1px solid var(--border-color);
}

.logo-link {
  flex-shrink: 0;
  z-index: 101;
}

.logo-img {
  height: 50px;
  width: auto;
  transition: height 0.4s ease;
  position: relative;
  top: 8px;
}

.nav-links {
  list-style: none;
  display: flex;
  border: 1px solid var(--border-color);
  padding: 12px 15px;
  border-radius: 10px;
  transition: transform 0.3s ease-in-out;
}

.nav-links li {
  margin: 0 5px;
}

.nav-links a {
  text-decoration: none;
  color: var(--secondary-color);
  font-weight: 600;
  padding: 10px 20px;
  font-size: 1rem;
  border-radius: 20px;
  transition: all 0.3s ease;
  background-color: var(--surface-color);
}

.nav-links a:hover,
.nav-links a.active {
  background-color: var(--primary-color);
  color: var(--background-color);
}

.cta-button {
  background-color: var(--primary-color);
  color: var(--background-color);
  padding: 10px 25px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px var(--primary-color);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 101;
}

.menu-toggle .bar {
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 10px;
  transition: all 0.3s ease-in-out;
}

.menu-toggle.is-active .bar:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}
.menu-toggle.is-active .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-active .bar:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 100px 5%;
  text-align: center;
}

/* --- Scroll Animation Styling --- */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  transition-delay: var(--delay, 0s);
}
.animate-on-scroll.fade-in {
  transform: translateY(20px);
}
.animate-on-scroll.slide-in-from-left {
  transform: translateX(-50px);
}
.animate-on-scroll.slide-in-from-right {
  transform: translateX(50px);
}
.animate-on-scroll.slide-in-from-bottom {
  transform: translateY(50px);
}
.animate-on-scroll.zoom-in {
  transform: scale(0.9);
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateX(0) translateY(0) scale(1);
}

h2 {
  font-family: "Poppins", sans-serif;
  font-size: 2.8rem;
  margin-bottom: 40px;
  word-wrap: break-word;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  background-color: var(--primary-color);
  color: var(--background-color);
  text-decoration: none;
  font-weight: 600;
  border: 2px solid var(--primary-color);
  transition: all 0.3s ease;
  border-radius: 8px;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 191, 255, 0.3);
}
.btn i {
  margin-right: 8px;
}
.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--border-color);
  color: var(--secondary-color);
}
.btn-secondary:hover {
  background-color: var(--border-color);
  color: var(--primary-color);
  transform: translateY(-3px);
}

/* --- Hero Section & Entry Animation --- */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 25px;
}
.hero-content .initial-hidden {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.hero-content .animate {
  opacity: 1;
  transform: translateY(0);
}

.hero #name-line {
  position: relative;
  display: inline-block;
}
.hero #name-line::after {
  content: "|";
  display: inline-block;
  animation: blink 0.7s infinite;
  color: var(--primary-color);
  font-weight: normal;
}
.hero #name-line.typing-done::after {
  animation: none;
  opacity: 0;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.hero h3 {
  font-family: "Lora", serif; /* Same as h2 */
  font-size: 3.5rem; /* Bigger, but smaller than name */
  font-weight: 700; /* Bold */
  margin-bottom: 0; /* Reduced space */
  word-wrap: break-word;
}
.hero h1 {
  font-family: "Poppins", sans-serif;
  font-size: 6rem;
  font-weight: 700;
  margin: 10px 0 20px 0; /* Adjusted vertical space */
  color: var(--primary-color);
  word-wrap: break-word;
  min-height: 1.2em;
}
.hero h2 {
  font-family: "Lora", serif;
  font-size: 2.5rem;
  word-wrap: break-word;
}
#typed-text {
  color: var(--primary-color);
}
.social-links {
  margin: 10px 0;
}
.social-links a {
  color: var(--secondary-color);
  font-size: 1.8rem;
  margin: 0 15px;
  transition: color 0.3s;
}
.social-links a:hover {
  color: var(--primary-color);
}
.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 20px;
  flex-wrap: wrap;
}

#about,
#skills,
#projects,
#contact,
#lets-talk {
  background-color: transparent;
}
#skills,
#projects,
#contact,
#lets-talk {
  border-top: 1px solid var(--border-color);
}

.about-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 100px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1200px;
}
.profile-pic {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
}
.about-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 600px;
}
.about-text p {
  line-height: 1.8;
  letter-spacing: 1px;
  text-align: left;
}
.about-buttons {
  display: flex;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

#skills h2 {
  margin-bottom: 60px;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 50px 30px;
  width: 100%;
  max-width: 1200px;
}
.skill-card {
  background: transparent;
  text-align: center;
  transition: transform 0.3s ease;
}
.skill-card:hover {
  transform: translateY(-8px);
}
.skill-circle {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(22, 27, 34, 0.5);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: box-shadow 0.3s ease;
}
.skill-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 5px;
}
.skill-card p {
  color: #a0a0a0;
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.skill-level {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.skill-percent {
  font-weight: 700;
  color: var(--secondary-color);
  width: 45px;
}
.percent-bar {
  width: 50px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}
.percent-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: calc(1% * var(--percent));
  border-radius: 3px;
  transition: width 1s ease-out;
}
.progress-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
}
.progress-ring__track {
  stroke: var(--border-color);
}
.progress-ring__circle {
  transform-origin: center;
  transform: rotate(-90deg);
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease-out;
  stroke-dasharray: 339.3;
  stroke-dashoffset: calc(339.3 * (1 - var(--percent) / 100));
}
.skill-circle i {
  font-size: 4rem;
  color: #ffffff;
}
.skill-card:nth-child(1) .skill-circle {
  box-shadow: 0 0 20px #e34f26;
}
.skill-card:nth-child(1) .progress-ring__circle,
.skill-card:nth-child(1) .percent-bar::after {
  stroke: #e34f26;
  background: #e34f26;
}
.skill-card:nth-child(2) .skill-circle {
  box-shadow: 0 0 20px #1572b6;
}
.skill-card:nth-child(2) .progress-ring__circle,
.skill-card:nth-child(2) .percent-bar::after {
  stroke: #1572b6;
  background: #1572b6;
}
.skill-card:nth-child(3) .skill-circle {
  box-shadow: 0 0 20px #f7df1e;
}
.skill-card:nth-child(3) .progress-ring__circle,
.skill-card:nth-child(3) .percent-bar::after {
  stroke: #f7df1e;
  background: #f7df1e;
}
.skill-card:nth-child(4) .skill-circle {
  box-shadow: 0 0 20px #61dafb;
}
.skill-card:nth-child(4) .progress-ring__circle,
.skill-card:nth-child(4) .percent-bar::after {
  stroke: #61dafb;
  background: #61dafb;
}
.skill-card:nth-child(5) .skill-circle {
  box-shadow: 0 0 20px #339933;
}
.skill-card:nth-child(5) .progress-ring__circle,
.skill-card:nth-child(5) .percent-bar::after {
  stroke: #339933;
  background: #339933;
}
.skill-card:nth-child(6) .skill-circle {
  box-shadow: 0 0 20px #7952b3;
}
.skill-card:nth-child(6) .progress-ring__circle,
.skill-card:nth-child(6) .percent-bar::after {
  stroke: #7952b3;
  background: #7952b3;
}
.skill-card:nth-child(7) .skill-circle {
  box-shadow: 0 0 20px #ffffff;
}
.skill-card:nth-child(7) .progress-ring__circle,
.skill-card:nth-child(7) .percent-bar::after {
  stroke: #ffffff;
  background: #ffffff;
}
.skill-card:nth-child(8) .skill-circle {
  box-shadow: 0 0 20px #3178c6;
}
.skill-card:nth-child(8) .progress-ring__circle,
.skill-card:nth-child(8) .percent-bar::after {
  stroke: #3178c6;
  background: #3178c6;
}
.skill-card:nth-child(9) .skill-circle {
  box-shadow: 0 0 20px #3776ab;
}
.skill-card:nth-child(9) .progress-ring__circle,
.skill-card:nth-child(9) .percent-bar::after {
  stroke: #3776ab;
  background: #3776ab;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}
.project-card {
  background-color: #0d1117;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 30px rgba(0, 191, 255, 0.2);
}
.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.project-card h3 {
  margin: 20px 20px 10px;
  color: var(--primary-color);
  text-align: center;
}
.project-card p {
  padding: 0 20px;
  font-size: 0.9rem;
  text-align: left;
  flex-grow: 1;
}
.project-card .btn {
  margin: 20px;
  align-self: center;
}

.lets-talk-content h1 {
  font-family: "Poppins", sans-serif;
  font-size: 8rem;
  color: transparent;
  -webkit-text-stroke: 1px var(--primary-color);
  text-stroke: 1px var(--primary-color);
  margin-bottom: -20px;
  word-wrap: break-word;
}
.lets-talk-content h2 {
  font-family: "Poppins", sans-serif;
  font-size: 3.5rem;
  margin-top: 20px;
  word-wrap: break-word;
}
.lets-talk-content h2 span {
  color: var(--primary-color);
}
.lets-talk-content p {
  max-width: 600px;
  margin: 10px auto 40px;
  color: #a0a0a0;
  letter-spacing: 0.8px;
  line-height: 1.6;
  font-size: 1.1rem;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  width: 100%;
  max-width: 1200px;
  text-align: left;
}
.contact-info .subtitle {
  margin-bottom: 40px;
  color: #a0a0a0;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.contact-card {
  background: rgba(22, 27, 34, 0.5);
  backdrop-filter: blur(10px);
  padding: 25px;
  border-radius: 15px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}
.contact-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
}
.contact-card i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}
.contact-card h3 {
  margin-bottom: 5px;
  color: #ffffff;
}
.contact-card p {
  color: #a0a0a0;
  margin-bottom: 15px;
}
.contact-card a,
.contact-card span {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  word-break: break-all;
}
.contact-form-container {
  background: rgba(22, 27, 34, 0.5);
  backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 15px;
  border: 1px solid var(--border-color);
}
.contact-form-container h3 {
  margin-bottom: 30px;
}
.contact-form .form-group {
  margin-bottom: 20px;
}
.contact-form label {
  display: block;
  margin-bottom: 8px;
  color: #a0a0a0;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  background: #0d1117;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #ffffff;
  font-family: "Roboto", sans-serif;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}
.contact-form .btn {
  width: 100%;
  font-size: 1rem;
}

footer {
  background-color: var(--surface-color);
  padding: 20px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

@media (max-width: 1024px) {
  .nav-links a {
    padding: 8px 15px;
    font-size: 0.9rem;
  }
  .about-container {
    gap: 50px;
  }
}

@media (max-width: 768px) {
  h2 {
    font-size: 2.4rem;
  }
  .hero h1 {
    font-size: 4.5rem;
  }
  .hero h3 {
    font-size: 3rem;
  }
  .hero h2 {
    font-size: 2rem;
  }
  .menu-toggle {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 60%;
    max-width: 300px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background-color: var(--surface-color);
    border: none;
    border-left: 1px solid var(--border-color);
    border-radius: 0;
    transform: translateX(100%);
  }
  .nav-links.nav-active {
    transform: translateX(0);
  }
  .nav-links li {
    width: 100%;
    text-align: center;
  }
  .nav-links a {
    padding: 15px;
    display: block;
    width: 90%;
    margin: 0 auto;
  }
  .cta-button {
    display: none;
  }
  .about-container {
    flex-direction: column;
    text-align: center;
  }
  .about-text {
    align-items: center;
  }
  .about-text p {
    text-align: center;
  }
  .about-buttons {
    justify-content: center;
  }
  .contact-container {
    grid-template-columns: 1fr;
  }
  .contact-info,
  .contact-form-container {
    text-align: center;
  }
  .contact-info .subtitle,
  .contact-info h2 {
    margin-left: 0;
  }
  .contact-card {
    text-align: center;
  }
  .lets-talk-content h1 {
    font-size: 5rem;
  }
  .lets-talk-content h2 {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  section {
    padding: 80px 5%;
  }
  .hero h1 {
    font-size: 2.8rem;
    line-height: 1.2;
  }
  .hero h3 {
    font-size: 2rem;
  }
  .hero h2 {
    font-size: 1.5rem;
    line-height: 1.3;
  }
  .social-links a {
    font-size: 1.5rem;
    margin: 0 10px;
  }
  .profile-pic {
    width: 200px;
    height: 200px;
  }
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px 20px;
  }
  .skill-circle {
    width: 120px;
    height: 120px;
  }
  .skill-circle i {
    font-size: 3rem;
  }
  .progress-ring {
    width: 90px;
    height: 90px;
  }
  .progress-ring circle {
    r: 40;
    cx: 45;
    cy: 45;
    stroke-width: 6;
    stroke-dasharray: 251.3;
    stroke-dashoffset: calc(251.3 * (1 - var(--percent) / 100));
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .project-card .btn {
    align-self: center;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .lets-talk-content h1 {
    font-size: 3.5rem;
  }
  .lets-talk-content h2 {
    font-size: 2rem;
  }
  .contact-form-container {
    padding: 25px;
  }
}
