/* Global Styles */
:root {
  --primary-color: #4158d0;
  --primary-gradient: linear-gradient(
    43deg,
    #4158d0 0%,
    #c850c0 46%,
    #ffcc70 100%
  );
  --secondary-color: #c850c0;
  --accent-color: #ffcc70;
  --dark-bg: #0a0a0a;
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --text-accent: #ffcc70;
  --border-color: rgba(255, 255, 255, 0.1);
  --card-bg: rgba(30, 30, 30, 0.5);
  --navbar-height: 70px;
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Fira Code", monospace;
  font-weight: 600;
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 2.5rem;
  text-align: center;
  position: relative;
  color: var(--text-primary);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  font-family: "Fira Code", monospace;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.primary-btn {
  background: var(--primary-gradient);
  color: white;
  border: none;
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 20px rgba(192, 88, 192, 0.3);
}

.secondary-btn {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--secondary-color);
}

.secondary-btn:hover {
  background-color: var(--secondary-color);
  color: white;
  transform: translateY(-3px);
}

.outline-btn {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--text-primary);
}

.outline-btn:hover {
  background-color: var(--text-primary);
  color: var(--dark-bg);
}

/* Background Animation */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.cube {
  position: absolute;
  top: 80vh;
  left: 45vw;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform-origin: top left;
  transform: scale(0) rotate(0deg) translate(-50%, -50%);
  animation: cube 12s ease-in forwards infinite;
  opacity: 0;
}

.cube:nth-child(1) {
  animation-delay: 0s;
  left: 25vw;
  top: 40vh;
}

.cube:nth-child(2) {
  animation-delay: 2s;
  left: 75vw;
  top: 50vh;
}

.cube:nth-child(3) {
  animation-delay: 4s;
  left: 25vw;
  top: 85vh;
}

.cube:nth-child(4) {
  animation-delay: 6s;
  left: 85vw;
  top: 20vh;
}

.cube:nth-child(5) {
  animation-delay: 8s;
  left: 50vw;
  top: 70vh;
}

@keyframes cube {
  0% {
    transform: scale(0) rotate(0deg) translate(-50%, -50%);
    opacity: 0;
    border-radius: 50%;
  }
  50% {
    opacity: 0.5;
    width: 100px;
    height: 100px;
    background: radial-gradient(
      circle,
      var(--primary-color) 0%,
      rgba(65, 88, 208, 0) 70%
    );
    border: none;
  }
  100% {
    transform: scale(1) rotate(1080deg) translate(-50%, -50%);
    opacity: 0;
    width: 200px;
    height: 200px;
  }
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  height: var(--navbar-height);
  border-bottom: 1px solid var(--border-color);
}

 .nav-menu {
        display: flex;
        list-style: none;
        margin: 0;
        padding: 0;
        gap: 2rem;
      }
      
      .nav-menu li {
        margin: 0;
      }
      
      .nav-menu a {
        text-decoration: none;
        color: inherit;
        padding: 0.5rem 1rem;
        border-radius: 4px;
        transition: all 0.3s ease;
        cursor: pointer;
      }
      
      .nav-menu a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        transform: translateY(-2px);
      }
      
      /* Smooth scrolling */
      html {
        scroll-behavior: smooth;
      }
      
      /* Add some top padding to sections for better scroll positioning */
      section {
        scroll-margin-top: 80px;
      }

.logo {
  font-family: "Fira Code", monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.logo::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-gradient);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.logo:hover::before {
  transform: translateX(0);
}


.bar {
  display: block;
  width: 25px;
  height: 2px;
  margin: 5px auto;
  background-color: var(--text-primary);
  transition: all 0.3s ease-in-out;
}

/* Hero Section */
#hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding-top: var(--navbar-height);
  text-align: center;
}

.hero-content {
  max-width: 800px;
}

#hero h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  position: relative;
}

#hero img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  object-fit: cover;
  object-position: center;
  position: relative;
  border: 3px solid transparent;
  background: linear-gradient(black, black) padding-box,
              linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7) border-box;
  animation: rotateBorder 3s linear infinite;
}

@keyframes rotateBorder {
  0% {
    background: linear-gradient(black, black) padding-box,
                linear-gradient(0deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7) border-box;
  }
  25% {
    background: linear-gradient(black, black) padding-box,
                linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7) border-box;
  }
  50% {
    background: linear-gradient(black, black) padding-box,
                linear-gradient(180deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7) border-box;
  }
  75% {
    background: linear-gradient(black, black) padding-box,
                linear-gradient(270deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7) border-box;
  }
  100% {
    background: linear-gradient(black, black) padding-box,
                linear-gradient(360deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7) border-box;
  }
}


.glitch {
  position: relative;
  color: var(--text-primary);
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip: rect(0, 0, 0, 0);
}

.glitch::before {
  left: 2px;
  text-shadow: -1px 0 var(--secondary-color);
  animation: glitch-animation 2s infinite linear alternate-reverse;
}

.glitch::after {
  left: -2px;
  text-shadow: 2px 0 var(--accent-color);
  animation: glitch-animation 3s infinite linear alternate-reverse;
}

@keyframes glitch-animation {
  0% {
    clip: rect(44px, 9999px, 56px, 0);
  }
  5% {
    clip: rect(36px, 9999px, 4px, 0);
  }
  10% {
    clip: rect(1px, 9999px, 25px, 0);
  }
  15% {
    clip: rect(75px, 9999px, 40px, 0);
  }
  20% {
    clip: rect(46px, 9999px, 78px, 0);
  }
  25% {
    clip: rect(60px, 9999px, 3px, 0);
  }
  30% {
    clip: rect(40px, 9999px, 19px, 0);
  }
  35% {
    clip: rect(89px, 9999px, 12px, 0);
  }
  40% {
    clip: rect(32px, 9999px, 43px, 0);
  }
  45% {
    clip: rect(67px, 9999px, 70px, 0);
  }
  50% {
    clip: rect(33px, 9999px, 61px, 0);
  }
  55% {
    clip: rect(50px, 9999px, 56px, 0);
  }
  60% {
    clip: rect(5px, 9999px, 29px, 0);
  }
  65% {
    clip: rect(8px, 9999px, 59px, 0);
  }
  70% {
    clip: rect(83px, 9999px, 73px, 0);
  }
  75% {
    clip: rect(10px, 9999px, 55px, 0);
  }
  80% {
    clip: rect(40px, 9999px, 52px, 0);
  }
  85% {
    clip: rect(8px, 9999px, 24px, 0);
  }
  90% {
    clip: rect(61px, 9999px, 36px, 0);
  }
  95% {
    clip: rect(82px, 9999px, 91px, 0);
  }
  100% {
    clip: rect(41px, 9999px, 87px, 0);
  }
}

.line {
  font-family: "Fira Code", monospace;
  font-size: 1.2rem;
  color: var(--text-accent);
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

.line::before,
.line::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40px;
  height: 1px;
  background: var(--text-accent);
}

.line::before {
  left: -60px;
}

.line::after {
  right: -60px;
}

.full-text {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 700px;
  color: var(--text-secondary);
  position: relative;
}

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

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

/* About Section */
#about {
  padding: 5rem 0;
}

#about-content {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.about-text {
  flex: 1;
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

#about h2 {
  font-size: 2.5rem;
  margin-bottom: 2.5rem;
  text-align: center;
  position: relative;
  color: var(--text-primary);
}

#about h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

#skill {
  flex: 1;
}

#skill h2 {
  font-size: 2.1rem;
  margin: 8rem 0 3rem 0;
  text-align: center;
  position: relative;
  color: var(--text-primary);
}

#skill h2::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 3px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  background: rgba(65, 88, 208, 0.2);
  border: 1px solid var(--primary-color);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.skill-tag:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

.skill-container {
  margin-bottom: 1.5rem;
}

.skill-item {
  margin-bottom: 1rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.skill-name {
  font-weight: 500;
  color: var(--text-primary);
}

.skill-percentage {
  color: var(--primary-color);
  font-weight: 500;
}

.progress-bar {
  height: 8px;
  background-color: rgba(65, 88, 208, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 10px;
  transition: width 1s ease-in-out;
}

/* Project Section */
#projects {
  padding: 5rem 0;
  text-align: center;
  cursor: pointer;
}

#projects h2 {
  font-size: 2.5rem;
  margin-bottom: 2.5rem;
  position: relative;
  color: var(--text-primary);
}

#projects h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 1.5rem;
}

.project-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.project-image {
  height: 200px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
}

.project-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.project-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-tech span {
  background: rgba(65, 88, 208, 0.2);
  border: 1px solid var(--primary-color);
  color: var(--text-primary);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
}

.project-links {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
}

.project-links a {
  color: var(--text-accent);
  transition: all 0.3s ease;
}

.project-links a:hover {
  color: var(--primary-color);
}

.project-links i {
  margin-right: 5px;
}

/* Blog Section */

.blogs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.blog-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-10px);
}

.blog-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.blog-header-image {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 20px;
}

.blog-content-image {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

.blog-content {
  padding: 1.5rem;
}

.blog-content h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.blog-date {
  display: block;
  color: #6c757d;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.blog-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.share-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
}

.share-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease-out;
}

.share-btn:active::after {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
}

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.toast.fade-out {
    animation: fadeOut 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, 1rem); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translate(-50%, 0); }
    to { opacity: 0; transform: translate(-50%, 1rem); }
}

.read-more {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--secondary-color);
  text-decoration: none;
}

/* Blog Modal Styles */
.blog-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.blog-modal-content {
  background-color: #ffff;
  color: #0a0a0a;
  padding: 2rem;
  border-radius: 8px;
  width: 80%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 2rem;
  cursor: pointer;
}

/* Code Block Styles */
pre {
  background-color: #f4f4f4;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
}

code {
  font-family: "Courier New", Courier, monospace;
}

.view-all-blogs-btn {
  display: block;
  margin: 2rem auto;
  padding: 0.8rem 1.8rem;
  background-color: transparent;
  border: 4px solid rgba(188, 137, 43, 0.808);
  color: white;
  border-radius: 15px;
  cursor: pointer;
  font-size: 1rem;
  transition: 0.2s ease;
}

.view-all-blogs-btn:hover {
  background-color: rgba(188, 137, 43, 0.808);
  color: var(--text-primary);
  border: none;
}

/* All Blogs Section */
#all-blogs-section {
  display: none;
}

#all-blogs-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* Footer */
footer {
  background-color: rgba(10, 10, 10, 0.8);
  padding: 3rem 0;
  margin-top: 3rem;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.footer-links {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  font-size: 1.5rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
  transform: translateY(-5px);
}

.copyright {
  color: var(--text-secondary);
  font-size: 0.7rem;
}
