/* Global styles */
html {
  scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
  }

  img, video, iframe {
    max-width: 100%;
    height: auto;
  }

  button, input, textarea, select {
    min-width: 0;
  }
  
  body {
    margin: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  main {
    flex: 1;
  }
  
  /* Container to centralize content */
  .container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
  }
  
  /* Navbar Styles */
  .navbar {
    position: sticky;
    top: 0;
    background-color: #0e0e0e;
    padding: 15px 0;
    color: #fff;
    z-index: 1000;
    
  }
  
  .navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    font-size: 1.5em;
    font-weight: bold;
    position: relative;
    display: inline-block;
  }

  .logo::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 31px;
    height: 4px;
    background-color: #750ff1;
    border-radius: 2px;
  }

  .logo a {
    color: inherit;
    text-decoration: none;
    outline: none;
  }

  .logo a:focus{
    outline: none;
    box-shadow: none;
    text-decoration: none;
  }
  
  .nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
  }
  
  .nav-links li {
    margin: 0 15px;
  }
  
  .nav-links li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
  }
  
  .nav-links li a:hover {
    color: #750ff1;
  }
  
  /* Hero Section */
  .hero {
    background: none;
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: #fff;
    background-color: #000; /* Fallback color */
    position: relative;
  }

  .hero-bg {
    background: none;
    position: relative;
  }

  .hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url('img/hero-bg.png') center/cover no-repeat;
    filter: brightness(0.8);
    animation: pulseGlow 4s ease-in-out infinite;
  }
  
  @keyframes pulseGlow {
    0%, 100% { filter: brightness(0.8); }
    50% { filter: brightness(1.4); }
  }
  
  .hero::before {
    /* Optional overlay for better text readability */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.7);
  }
  
  .hero-content {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: auto;
    padding: 20px;
    z-index: 1;
  }
  
  .hero h1 {
    font-size: 3em;
    margin-bottom: 0.5em;
    display: inline-block;
    width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    border-right: 2px solid rgba(255,255,255,0.85);
    animation: typing 2.8s steps(20, end) forwards 0.4s, blink 0.75s step-end infinite 0.4s;
  }
  
  .hero p {
    font-size: 1.2em;
    margin-bottom: 1em;
    opacity: 0;
    transform: translateY(18px);
    animation: fade-up 0.8s ease forwards 3.4s;
  }

  .hero .btn {
    opacity: 0;
    transform: translateY(18px);
    animation: fade-up 0.8s ease forwards 3.8s;
  }

  .hero .btn:nth-of-type(2) {
    animation-delay: 4.1s;
  }
  
  @keyframes typing {
    from { width: 0; }
    to { width: 20ch; }
  }

  @media (max-width: 780px) {
    .nav-links {
      flex-wrap: wrap;
      justify-content: center;
    }

    .nav-links li {
      margin: 8px 10px;
    }

    .hero {
      min-height: 100vh;
    }

    .hero-content {
      padding: 18px;
    }

    .project {
      flex: 1 1 100%;
      max-width: 100%;
    }

    .blog-container,
    .post-content,
    .container {
      width: 95%;
    }

    section {
      padding: 40px 0;
    }
  }

  @media (max-width: 640px) {
    .hero h1 {
      font-size: 2em;
      animation: typing 2.6s steps(18, end) forwards 0.4s, blink 0.75s step-end infinite 0.4s;
    }

    .hero p {
      font-size: 1em;
      animation-delay: 3.2s;
    }

    .hero .btn {
      width: 100%;
      text-align: center;
    }

    .hero .btn + .btn {
      margin-top: 10px;
    }

    .project-grid {
      gap: 15px;
    }

    .skills-list,
    .Technologies-used {
      justify-content: center;
    }

    .skills-list li,
    .Technologies-used li {
      margin: 4px 6px;
      padding: 8px 10px;
    }

    .blog-header {
      padding: 40px 16px;
    }

    .blog-header h1 {
      font-size: 2em;
    }

    .blog-header p {
      font-size: 1em;
    }

    input, textarea {
      font-size: 0.95em;
    }
  }
  
  @keyframes blink {
    from, to { border-color: transparent; }
    50% { border-color: rgba(255,255,255,0.85); }
  }

  @keyframes fade-up {
    from {
      opacity: 0;
      transform: translateY(18px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Button Style */
  .btn {
    display: inline-block;
    background-color: #750ff1;
    color: #ffffff;
    padding: 10px 20px;
    text-decoration: none;
    margin-top: 15px;
    border-radius: 5px;
    transition: background 0.3s ease;
  }
  
  .btn:hover {
    background-color: #7b0ffe;
  }
  
  /* Section Styles */
  section {
    padding: 60px 0;
  }
  
  section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2em;
  }

  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    will-change: opacity, transform;
  }

  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* About Section */
  #about p {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1em;
  }
  
  /* Skills Section */
  .skills-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
  }
  
  .skills-list li {
    background-color: #ddd;
    margin: 5px 10px;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 0.9em;
  }
  
  /* Technologies Used in Projects */
  .Technologies-used {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin-top: 10px;
  }
  
  .Technologies-used li {
    background-color: #ddd;
    margin: 3px 6px;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.75em;
  }
  
  /* Projects Section */
  .project-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
  }
  
  .project {
    flex: 1 1 300px;
    background-color: #f4f4f4;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
  }
  
  .project img {
    width: 100%;
    height: 290px;
    object-fit: cover;
    border-radius: 5px;
  }
  
  .project h3 {
    margin-top: 15px;
    font-size: 1.3em;
  }
  
  .project p {
    font-size: 0.95em;
  }
  
  /* Contact Section */
  form {
    max-width: 600px;
    margin: auto;
    display: flex;
    flex-direction: column;
  }
  
  input, textarea {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1em;
    resize: vertical;
  }

  textarea {
    min-height: 300px;
  }
  
  input:focus, textarea:focus {
    outline: 2px solid #7b0ffe;
  }
  
  button.btn {
    align-self: center;
    padding: 10px 30px;
    cursor: pointer;
    border: none;
  }
  
  .back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 15px;
    background-color: #7b0ffe;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    display: none; /* Initially hidden */
    transition: opacity 0.3s ease-in-out;
    z-index: 999;
  }
  
  .back-to-top:hover {
    background-color: #474849;
  }
  
  /* Footer */
  footer {
    background-color: #0e0e0e;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9em;
  }
  .social-links {
    margin-top: 10px;
  }
  
  .social-links a {
    display: inline-block;
    margin-right: 15px;
  }
  
  .social-links a:hover i {
    color: #0077b5; /* LinkedIn Blue */
  }

  /* Blog Header */
.blog-header {
    background: url('img/hero-bg.png') center/cover no-repeat;
    text-align: center;
    padding: 60px 20px;
    background-color: #0e0e0e;
    color: white;
    position: relative;
  }

  .blog-header::before {
    /* Optional overlay for better text readability */
    content:"";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.7);
  }
  
  .blog-header h1 {
    font-size: 2.5em;
    position: relative;
    z-index: 1;
  }
  
  .blog-header p {
    font-size: 1.2em;
    position: relative;
    z-index: 1;
  }
  
  /* Blog Container */
  .blog-container {
    width: 90%;
    max-width: 800px;
    margin: 40px auto;
  }
  
  .blog-post {
    background-color: #f4f4f4;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
  }
  
  .blog-post h2 {
    margin-bottom: 10px;
  }
  
  .blog-post .date {
    font-size: 0.9em;
    color: #777;
  }
  
  .read-more {
    display: inline-block;
    margin-top: 10px;
    color: #7b0ffe;
    text-decoration: none;
  }
  
  .read-more:hover {
    text-decoration: underline;
  }
  
  .post-content {
    width: 90%;
    max-width: 800px;
    margin: 40px auto;
  }

  .markdown-content {
    background-color: #f4f4f4;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  }

  .markdown-content h1,
  .markdown-content h2,
  .markdown-content h3,
  .markdown-content h4,
  .markdown-content h5,
  .markdown-content h6 {
    margin-top: 1.5em;
  }

  .markdown-content p {
    line-height: 1.8;
    margin-bottom: 1em;
  }

  .markdown-content hr {
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    margin: 2em 0;
  }

  .markdown-content ul {
    margin: 15px 0;
    padding-left: 1.3em;
  }

  .markdown-content li {
    margin-bottom: 0.5em;
  }

  .markdown-content pre {
    background-color: #1e1e2b;
    color: #e6e8ff;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    border-left: 5px solid #7b0ffe;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
    font-family: "Fira Code", "JetBrains Mono", Consolas, Monaco, monospace;
    line-height: 1.7;
    margin: 1.5em 0;
  }

  .markdown-content code {
    background-color: #eef0ff;
    color: #1f1f38;
    padding: 3px 6px;
    border-radius: 5px;
    font-family: "Fira Code", "JetBrains Mono", Consolas, Monaco, monospace;
    font-size: 0.95em;
  }
  
  