:root {
  --dark-bg: #000d2b;
  --text-color: #e2e8f0;
  --nav-bg: rgba(51, 48, 48, 0.95);
  --gradient: linear-gradient(to bottom right, #008cff, #e100ff);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background-color: #0f172a;
  color: #e2e8f0;
  overflow-x: hidden;
}

header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(10, 10, 30, 0.9);
  position: fixed;
  top: 0;
  z-index: 999;
  padding: 10px 20px;
}

.portfolio,
.hero-name {
  font-weight: bold;
  background-image: var(--gradient);
  background-clip: text;
  color: transparent;
}

.portfolio {
  font-size: 25px;
  margin-left: 20px;
}

nav {
  display: flex;
  align-items: center;
}

nav > ul {
  list-style: none;
  display: flex;
}

nav > ul > li > a {
  text-decoration: none;
  text-align: center;
  display: block;
  width: 100px;
  font-size: 15px;
  padding: 15px 10px;
  color: white;
  position: relative;
}

nav > ul > li > a::after {
  content: "";
  position: absolute;
  left: 10%;
  bottom: 1px;
  width: 0%;
  border-radius: 20px;
  height: 3px;
  background-image: var(--gradient);
}

nav > ul > li > a:hover::after,
nav > ul > li > a:active::after {
  width: 80%;
  animation: animate 0.3s linear;
}

@keyframes animate {
  0% {
    left: 10%;
    width: 0%;
  }
  100% {
    left: 10%;
    width: 80%;
  }
}

.bars-icon,
.close-icon {
  position: absolute;
  top: 15px;
  right: 18px;
  color: white;
  font-size: 30px;
  cursor: pointer;
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}

#menu-toggle {
  display: none;
}

.hero {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  height: 100vh;
  margin-top: 40px;
  padding: 0 10px;
  gap: 40px;
  position: relative;
}

.hero-content {
  max-width: 600px;
  text-align: left;
  padding-left: 10px;
  padding-right: 5px;
}

.hero-content h1 {
  font-size: 50px;
  font-weight: bold;
  margin-bottom: 15px;
}

.hero-content h3 {
  display: inline-block;
  font-size: 32px;
}

.hero-content h3 span {
  display: inline-block;
  position: relative;
  color: transparent;
  animation: display-text 9s linear infinite;
  animation-delay: calc(-3s * var(--i));
}

@keyframes display-text {
  33.33%,
  100% {
    display: none;
  }
}

@keyframes fill-color {
  10%,
  100% {
    width: 0;
  }
  70%,
  90% {
    width: 100%;
  }
}

@keyframes border-right {
  0%,
  20%,
  40%,
  60%,
  80%,
  100% {
    border-right: transparent;
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    border-right: 2px solid white;
  }
}

.hero-content h3 span::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  width: 0%;
  color: white;
  border-right: 2px solid white;
  white-space: nowrap;
  overflow: hidden;
  animation: fill-color 3s linear infinite, border-right 3s linear infinite;
}

.hero-content p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 20px;
  margin: 20px 0;
}

.profile-picture-container {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.profile-picture-container img {
  width: 100%;
  height: 100%;
  object-position: center top;
}

.social-icons {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 15px;
  margin-top: 35px;
}

.social-icons a {
  font-size: 35px;
  color: white;
  margin-right: 15px;
  transition: color 0.3s;
}

.social-icons a:hover {
  color: #19b2fa;
  box-shadow: 0 0 30px rgb(0, 208, 255, 0.5);
}

.about {
  background-color: rgb(10, 10, 30);
  width: 100%;
  height: auto;
}

.about-content,
.projects-container {
  padding: 50px 20px;
}

/* Headings */
.about-content h2,
.skills h2,
.projects-container h2,
.contact .git {
  font-size: 40px;
  margin-top: 50px;
  text-align: center;
  position: relative;
}

.contact .git {
  margin-top: 65px;
}

.about-content h2 span,
.skills h2 span,
.projects-container h2 span,
.contact .git span {
  background-image: var(--gradient);
  background-clip: text;
  color: transparent;
}

.about-content h2::after,
.skills h2::after,
.projects-container h2::after,
.contact .git::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 20px;
  height: 3px;
  width: 8%;
  background-image: var(--gradient);
}

/* About section */
.about-content .profile-picture {
  width: 280px;
  height: 280px;
  border-radius: 10%;
  box-shadow: 0 0 20px rgb(18, 18, 43);
  margin: 10%;
}

.about-content .about-me {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.about-content h3 {
  font-size: 30px;
  color: rgba(255, 255, 255, 0.9);
}

.about-content .about-me p {
  margin: 55px 0 80px 0;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.8);
  opacity: 0.9;
  line-height: 1.3;
}

/* Experience section */
.experience h3 {
  text-align: center;
  margin: 60px 0 120px;
}

.experience h3 span {
  background-image: var(--gradient);
  background-clip: text;
  color: transparent;
  position: relative;
}

.experience h3 span::after {
  content: "";
  position: absolute;
  top: 80px;
  left: 33%;
  transform: translateX(-50%);
  border-radius: 20px;
  height: 550px;
  width: 0.7%;
  background-image: var(--gradient);
}

.experience-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 15%;
  margin: 0 60px;
}

#exp-i2 {
  margin-top: 250px;
}

.experience-item {
  background-color: rgba(35, 62, 101, 0.3);
  padding: 20px;
  border-radius: 10px;
  max-width: 360px;
  box-shadow: 0 0 20px rgba(21, 30, 44, 0.3);
  transition: transform 0.4s ease-in-out, box-shadow 0.3s ease-in-out;
}

.experience-item:hover {
  transform: scale(1.1);
  box-shadow: 0 0px 50px rgba(29, 19, 81, 0.4);
}

.experience h4 {
  font-size: 22px;
}

.experience p {
  font-size: 18px;
}

.experience p:first-of-type {
  font-size: 14px;
  padding: 12px 0;
  color: rgba(255, 255, 255, 0.8);
}

.experience ul {
  list-style: none;
}

.experience ul li {
  padding: 5px 0px;
}

/* Skills & contact */
.skills,
.contact {
  border: 2px solid #0f172a;
}

.skills h2 {
  margin: 70px 0;
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 80px;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
}

.skills-item ul {
  list-style: none;
}

.skills-item h3 {
  font-size: 30px;
  color: rgba(255, 255, 255, 0.9);
  margin: 20px 0 40px 0;
}

.skills-item ul li {
  font-size: 18px;
  margin-bottom: 60px;
  position: relative;
  width: 400px;
}

.skills-container .skills-item ul li > span {
  position: absolute;
  right: 0;
  color: rgba(225, 225, 225, 0.8);
}

/* Skill bar pseudo elements */
.skills-item:first-child ul li:nth-child(1)::before,
.skills-item:first-child ul li:nth-child(2)::before,
.skills-item:first-child ul li:nth-child(3)::before,
.skills-item:first-child ul li:nth-child(4)::before,
.skills-item:first-child ul li:nth-child(5)::before,
.skills-item:first-child ul li:nth-child(6)::before,
.skills-item:nth-child(2) ul li:nth-child(1)::before,
.skills-item:nth-child(2) ul li:nth-child(2)::before,
.skills-item:nth-child(2) ul li:nth-child(3)::before {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 0%;
  border-radius: 20px;
  height: 8px;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.9);
}

.skills-item:first-child ul li:nth-child(1)::after,
.skills-item:first-child ul li:nth-child(2)::after,
.skills-item:first-child ul li:nth-child(3)::after,
.skills-item:first-child ul li:nth-child(4)::after,
.skills-item:first-child ul li:nth-child(5)::after,
.skills-item:first-child ul li:nth-child(6)::after,
.skills-item:nth-child(2) ul li:nth-child(1)::after,
.skills-item:nth-child(2) ul li:nth-child(2)::after,
.skills-item:nth-child(2) ul li:nth-child(3)::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 0%;
  border-radius: 20px;
  height: 8px;
  background-image: var(--gradient);
  animation: skill 2s ease-in-out forwards;
}

.skills-item:first-child ul li:nth-child(1)::after {
  --skill-width: 95%;
}

.skills-item:first-child ul li:nth-child(3)::after,
.skills-item:nth-child(2) ul li:nth-child(2)::after {
  --skill-width: 75%;
}

.skills-item:first-child ul li:nth-child(2)::after,
.skills-item:first-child ul li:nth-child(4)::after,
.skills-item:first-child ul li:nth-child(5)::after {
  --skill-width: 85%;
}

.skills-item:nth-child(2) ul li:nth-child(1)::after,
.skills-item:nth-child(2) ul li:nth-child(3)::after,
.skills-item:first-child ul li:nth-child(6)::after {
  --skill-width: 80%;
}

@keyframes skill {
  from {
    width: 0;
  }
  to {
    width: var(--skill-width);
  }
}

/* Buttons */
#btns {
  display: flex;
  gap: 30px;
  margin-top: 50px;
}

.btn {
  background-color: #161a21;
  color: white;
  padding: 15px 20px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-size: 16px;
  margin-right: 10px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  z-index: 0;
  box-shadow: 10px 0 50px #008cff, -10px 0 100px #e100ff;
}

.btn::after {
  content: "";
  position: absolute;
  border-radius: 50px;
  width: 105%;
  height: 107%;
  background-image: var(--gradient);
  z-index: -1;
}

@media screen and (min-width: 1200px) {
  .hero-content {
    position: absolute;
    left: 5%;
    max-width: 600px;
    text-align: left;
    padding-left: 20px;
    padding-right: 5px;
  }

  .profile-picture-container {
    position: absolute;
    right: 15%;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    overflow: hidden;
    object-fit: contain;
  }

  .c1,
  .c2 {
    flex: 1 1 100%;
    max-width: 100%;
    margin-top: 20px;
  }
}

/* Keyframes for animations */
@keyframes slideTop {
  from {
    transform: translateY(-200px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideBottom {
  from {
    transform: translateY(200px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideLeft {
  from {
    transform: translateX(-200px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideRight {
  from {
    transform: translateX(200px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Header animation */
header {
  animation: slideTop 0.8s ease-in-out;
}

header nav ul li:nth-child(1) {
  animation: slideTop 0.8s ease-in-out;
  animation-delay: 0.1s;
}

header nav ul li:nth-child(2) {
  animation: slideTop 0.8s ease-in-out;
  animation-delay: 0.2s;
}

header nav ul li:nth-child(3) {
  animation: slideTop 0.8s ease-in-out;
  animation-delay: 0.3s;
}

header nav ul li:nth-child(4) {
  animation: slideTop 0.8s ease-in-out;
  animation-delay: 0.4s;
}

header nav ul li:nth-child(5) {
  animation: slideTop 0.8s ease-in-out;
  animation-delay: 0.8s;
}

/* Hero & profile animations */
.hero-content {
  animation: slideLeft 1s ease-in-out;
}

.profile-picture-container {
  margin-bottom: 60px;
  animation: slideRight 1s ease-in-out !important;
}

.profile-picture-container .profile-picture {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Scroll-triggered animations */
.exp-i1,
.about-content .profile-picture,
.s1 h3,
.p1 {
  animation: slideLeft 1s ease-in-out;
  animation-timeline: view();
  animation-range: entry 0% cover 20%;
}

.p2 {
  animation: slideBottom 1s ease-in-out;
  animation-timeline: view();
  animation-range: entry 0% cover 20%;
}

.profile-picture-container,
.about-content .about-me div,
#exp-i2,
.s2 h3,
.p3 {
  animation: slideRight 1s ease-in-out;
  animation-timeline: view();
  animation-range: entry 0% cover 20%;
}

.about-content h2,
.experience h3,
.skills h2,
.projects h2,
.contact .git {
  animation: fade 1s ease-in-out;
  animation-timeline: view();
  animation-range: entry 0% cover 25%;
}

/* Individual list animations */
.s1 ul li:nth-child(1),
.s1 ul li:nth-child(2),
.s1 ul li:nth-child(3),
.s1 ul li:nth-child(4),
.s1 ul li:nth-child(5),
.s1 ul li:nth-child(6) {
  animation: slideLeft 0.8s ease-in-out;
  animation-timeline: view();
  animation-range: entry 0% cover 20%;
}

.s2 ul li:nth-child(1),
.s2 ul li:nth-child(2),
.s2 ul li:nth-child(3) {
  animation: slideRight 0.8s ease-in-out;
  animation-timeline: view();
  animation-range: entry 0% cover 20%;
}

.c1 h2,
.c1 p,
.location h3,
.location p,
.email h3,
.email p,
.phone h3,
.phone p,
.c1 h3 {
  animation: slideLeft 0.8s ease-in-out;
  animation-timeline: view();
  animation-range: entry 0% cover 15%;
}

.follow-me-link a {
  animation: slideLeft 0.8s ease-in-out;
  animation-timeline: view();
  animation-range: entry 0% cover 10%;
}

.c2 h2,
.c2 label,
.c2 input,
.c2 textarea {
  animation: slideRight 0.8s ease-in-out;
  animation-timeline: view();
  animation-range: entry 0% cover 15%;
}

.c2 button {
  animation: slideRight 0.8s ease-in-out;
  animation-timeline: view();
  animation-range: entry 0% cover 5%;
}

/* Projects section */
.projects {
  background-color: #0a0a1a;
}

.projects-card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 80px;
  justify-content: center;
  padding: 20px;
}

.project-card {
  width: 350px;
  min-height: 380px;
  background-color: #0f1624;
  color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.project-card:hover {
  box-shadow: 0px 0px 50px #172545;
  transform: translateY(-5px);
}

.project-image {
  width: 100%;
  height: 190px;
  object-fit: cover;
  object-position: top;
}

.project-content {
  padding: 15px;
}

.project-title {
  font-size: 1.2rem;
  margin: 0 0 10px;
}

.project-desc {
  font-size: 0.9rem;
  color: #ccc;
  margin-bottom: 12px;
}

.tech-stack {
  margin-bottom: 12px;
}

.tag {
  display: inline-block;
  background: #1f2636;
  color: #ddd;
  padding: 4px 10px;
  margin: 2px;
  border-radius: 8px;
  font-size: 0.8rem;
}

.project-links .link {
  display: inline-block;
  margin-right: 15px;
  color: #4da8ff;
  text-decoration: none;
  font-weight: bold;
}

.project-links .link:hover {
  color: red;
}

.projects-container h2 {
  margin-bottom: 80px;
}

/* Contact section */
.contact-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 30px;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.c1,
.c2 {
  flex: 1 1 350px;
  max-width: 600px;
  width: 100%;
  margin-top: 40px;
}

.c1 {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 50px;
  width: 40%;
  margin-top: 80px;
}

.c1 h2,
.c2 h2 {
  font-size: 30px;
}

.c1 p {
  color: rgba(255, 255, 255, 0.8);
}

.c1 i {
  color: #19b2fa;
}

.location,
.email,
.phone {
  display: flex;
  gap: 26px;
}

.location i,
.email i,
.phone i {
  font-size: 30px;
}

.follow-me-link {
  font-size: 40px;
  display: flex;
  gap: 30px;
  margin: 20px;
}

.follow-me-link a,
.social-icons a {
  font-size: 35px;
  background-color: #000c2b;
  padding: 8px;
  border-radius: 50%;
  transition: color 0.3s ease, box-shadow 0.3s ease;
}

.follow-me-link a i {
  color: #fff;
}

.c2 {
  display: flex;
  flex-direction: column;
  width: 40%;
  margin-top: 80px;
}

.c2 h2 {
  margin-bottom: 40px;
}

form {
  display: flex;
  flex-direction: column;
}

.c2 input,
.c2 textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background-color: #232d43;
  color: #fff;
  margin-bottom: 6px;
  font-size: 15px;
  outline: none;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

.c2 input:focus,
.c2 textarea:focus {
  border: 1px solid #19b2fa;
  box-shadow: 0 0 5px rgba(25, 178, 250, 0.5);
}

.send-btn {
  background: linear-gradient(to right, #00c6ff, #7d2ae8);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 25px;
  font-size: 16px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.send-btn:hover {
  opacity: 0.85;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media screen and (max-width: 600px) {
  header {
    padding: 15px;
  }

  nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 70px;
    right: 2px;
    width: 85%;
    padding: 10px;
    border-radius: 30px;
    height: auto;
    z-index: 1002;
    background-color: rgba(10, 10, 30, 0.95);
  }

  nav > ul > li > a:hover::after,
  nav > ul > li > a:active::after {
    left: 0%;
    width: 100%;
  }

  nav > ul {
    margin-top: 5px;
    flex-direction: column;
    width: 100%;
  }

  nav > ul > li > a {
    width: 100%;
    padding: 20px 20px;
  }

  .hero-content {
    margin-top: 50px;
  }

  .portfolio {
    text-align: center;
    width: 100%;
    margin: 0;
    padding: 5px 0;
  }

  .bars-icon {
    opacity: 1;
    pointer-events: auto;
  }

  #menu-toggle:checked ~ nav {
    display: flex;
  }

  #menu-toggle:checked ~ .bars-icon {
    opacity: 0;
    pointer-events: none;
  }

  #menu-toggle:checked ~ .close-icon {
    opacity: 1;
    pointer-events: auto;
  }

  .about {
    margin-top: 100px;
  }

  .about-content h2::after,
  .skills h2::after,
  .projects-container h2::after {
    bottom: -10px;
    width: 35%;
  }

  .about-content .about-me img {
    margin: 15% 10%;
  }

  .about-content .about-me p {
    margin: 40px 0 60px 0;
  }

  .experience h3 {
    margin: 60px 0;
  }

  #exp-i2 {
    margin-top: 500px;
  }

  .experience h3 span::after {
    height: 920px;
  }

  .skills-item ul li {
    max-width: 300px;
  }

  /* Slide-right animation for mobile menu items */
  #menu-toggle:checked ~ nav ul li:nth-child(1) {
    animation: slideRight 0.8s ease-in-out forwards;
    animation-delay: 0.1s;
  }

  #menu-toggle:checked ~ nav ul li:nth-child(2) {
    animation: slideRight 0.8s ease-in-out forwards;
    animation-delay: 0.2s;
  }

  #menu-toggle:checked ~ nav ul li:nth-child(3) {
    animation: slideRight 0.8s ease-in-out forwards;
    animation-delay: 0.3s;
  }

  #menu-toggle:checked ~ nav ul li:nth-child(4) {
    animation: slideRight 0.8s ease-in-out forwards;
    animation-delay: 0.4s;
  }

  #menu-toggle:checked ~ nav ul li:nth-child(5) {
    animation: slideRight 0.8s ease-in-out forwards;
    animation-delay: 0.8s;
  }

  .contact .git::after {
    width: 30%;
  }

  .hero-content h3 span::after {
    animation: fill-color 3s linear infinite;
    border-right: none;
  }

  .exp-i1,
  .about-content .profile-picture,
  .s1 h3,
  .p1,
  .p3,
  .profile-picture-container,
  .about-content .about-me div,
  #exp-i2,
  .s2 h3,
  .contact .git {
    animation: slideBottom 1s ease-in-out;
    animation-timeline: view();
    animation-range: entry 0% cover 20%;
  }

  .s1 ul li:nth-child(1),
  .s1 ul li:nth-child(2),
  .s1 ul li:nth-child(3),
  .s1 ul li:nth-child(4),
  .s1 ul li:nth-child(5),
  .s1 ul li:nth-child(6),
  .s2 ul li:nth-child(1),
  .s2 ul li:nth-child(2),
  .s2 ul li:nth-child(3),
  .c1 h2,
  .c1 p,
  .location h3,
  .location p,
  .email h3,
  .email p,
  .phone h3,
  .phone p,
  .c1 h3,
  .follow-me-link a,
  .c2 h2,
  .c2 label,
  .c2 input,
  .c2 textarea {
    animation: slideBottom 1s ease-in-out;
    animation-timeline: view();
    animation-range: entry 0% cover 15%;
  }

  .c2 button {
    animation: fade 0.8s ease-in-out;
    animation-timeline: view();
    animation-range: entry 0% cover 5%;
  }

  .experience-item:hover {
    transform: none;
    box-shadow: 0 0 20px rgba(21, 30, 44, 0.3);
  }

  .btn {
    z-index: 0;
  }
  .project-card:hover {
    box-shadow: none;
    transform: none;
  }
}
