 html {
      scroll-behavior: smooth;
    }

    /* Reset & Base Variables */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    /* Preloader Fullscreen */
    #preloader {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: var(--bg);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 9999;
    }

    .loader-box {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      color: var(--fg);
      font-family: 'Fira Code', monospace;
    }

    /* SVG Icon */
    .loader-icon {
      font-size: 3rem;
      stroke: var(--accent);
      margin-bottom: 1.2rem;
      animation: bounce 1.2s infinite;
    }

    /* Text Typing */
    .loader-text .line1 {
      font-size: 1.3rem;
      margin-bottom: 1.5rem;
      white-space: nowrap;
      color: var(--accent);
    }


    .dots::after {
      content: '';
      animation: dotdotdot 1.4s steps(4, end) infinite;
    }

    @keyframes dotdotdot {
      0% {
        content: '';
      }

      25% {
        content: '.';
      }

      50% {
        content: '..';
      }

      75% {
        content: '...';
      }

      100% {
        content: '';
      }
    }

    /* Progress Bar */
    .progress-container {
      width: 200px;
      height: 8px;
      background: rgba(0, 255, 208, 0.1);
      border-radius: 5px;
      overflow: hidden;
      display: flex;
      justify-content: flex-start;
    }

    .progress-bar {
      width: 0%;
      height: 100%;
      background: var(--accent);
      border-radius: 5px;
      animation: loadProgress 4s forwards;
    }

    @keyframes loadProgress {
      0% {
        width: 0%;
      }

      100% {
        width: 100%;
      }
    }

    /* Bounce Animation for Icon */
    @keyframes bounce {

      0%,
      100% {
        transform: translateY(0);
      }

      50% {
        transform: translateY(-8px);
      }
    }

    :root {
      --bg: #0c1121;
      --fg: #f0f0f5;
      --accent: #00ffd0;
      --card: #162030;
      --input: #1b2340;
    }

    body {
      background: var(--bg);
      color: var(--fg);
      font-family: 'Space Grotesk', Poppins, sans-serif;
      overflow-x: hidden;
    }

    a {
      color: var(--accent);
      text-decoration: none;
    }

    button {
      background: var(--accent);
      border: none;
      padding: 12px 24px;
      border-radius: 30px;
      font-weight: 600;
      font-family: 'Space Grotesk', sans-serif;
      color: #000;
      cursor: pointer;
      transition: transform 0.2s, background 0.2s, box-shadow 0.3s;
      box-shadow: 0 0 0 rgba(0, 255, 208, 0);
      animation: pulseGlow 2s infinite alternate;

    }

    button:hover {
      background: #00c4a8;
      transform: scale(1.05);
      box-shadow: 0 0 15px rgba(0, 255, 208, 0.5), 0 0 30px rgba(0, 255, 208, 0.3);
    }

    @keyframes pulseGlow {
      from {
        box-shadow: 0 0 15px rgba(0, 255, 208, 0.3), 0 0 30px rgba(0, 255, 208, 0.15);
      }

      to {
        box-shadow: 0 0 25px rgba(0, 255, 208, 0.5), 0 0 40px rgba(0, 255, 208, 0.25);
      }
    }

    /* Canvas Background */
    #bgCanvas {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: -1;
    }

    /* Custom Cursor */
    .cursor,
    .cursor2 {
      position: fixed;
      top: 0;
      left: 0;
      pointer-events: none;
      border-radius: 50%;
      transform: translate(-50%, -50%);
      transition: transform 0.1s ease-out;
      mix-blend-mode: difference;
      z-index: 9999;
    }


    .cursor {
      width: 8px;
      height: 8px;
      background: var(--accent);
      border-radius: 50%;
      position: fixed;
      top: 0;
      left: 0;
      pointer-events: none;
      z-index: 9999;
      transition: transform 0.1s ease-out, background 0.3s ease;
      mix-blend-mode: difference;
      box-shadow: 0 0 10px var(--accent), 0 0 30px var(--accent);
      animation: pulseCursor 1.5s infinite ease-in-out;
    }

    .cursor2 {
      width: 40px;
      height: 40px;
      border: 2px solid var(--accent);
      border-radius: 50%;
      position: fixed;
      top: 0;
      left: 0;
      pointer-events: none;
      z-index: 9998;
      opacity: 0.5;
      mix-blend-mode: difference;
      transition: transform 0.2s ease-out, border 0.3s ease;
      animation: rotateBorder 3s linear infinite;
    }

    /* Navigation Bar */
    nav {
      position: fixed;
      top: 0;
      width: 100%;
      padding: 1rem 2rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: rgba(12, 17, 33, 0.5);
      backdrop-filter: blur(8px);
      z-index: 100;
    }

    nav.scrolled {
      background: rgba(12, 17, 33, 0.8);
    }

    .menu a {
      margin-left: 1.5rem;
      font-size: 0.95rem;
    }

    section {
      padding: 120px 2rem;
      min-height: 100vh;
    }

    .container {
      max-width: 1000px;
      margin: auto;
    }

    /* Animated Text */
    .glow {
      background: linear-gradient(90deg, #00ffd0, #0078ff);
      background-clip: text;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      animation: glowFade 2.5s infinite alternate;
    }


    @keyframes rotateBorder {
      0% {
        transform: rotate(0deg);
      }

      100% {
        transform: rotate(360deg);
      }
    }

    .pulse {
      padding: 18px 36px;
      font-size: 1.1rem;
      animation: pulseGlow 2s infinite;
    }

    @keyframes pulseCursor {

      0%,
      100% {
        transform: scale(1);
        box-shadow: 0 0 10px var(--accent), 0 0 30px var(--accent);
      }

      50% {
        transform: scale(1.3);
        box-shadow: 0 0 20px var(--accent), 0 0 40px var(--accent);
      }
    }

    /* Scroll Reveal */
    .reveal {
      opacity: 0;
      transform: translateY(40px);
      transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }

    .active {
      opacity: 1;
      transform: translateY(0);
    }

    /* Hero Section */
    #hero {
      text-align: center;
    }

    #hero h1 {
      font-size: 4.5rem;
      margin-bottom: 0.5rem;
    }

    #hero #typed-text {
      font-size: 2rem;
      font-weight: 600;
      color: var(--accent);
      margin-bottom: 1rem;
    }

    #hero h1,
    #hero #typed-text,
    .card .desc h3,
    .timeline-content h3 {
      font-family: 'Space Grotesk', sans-serif;
    }

    #hero p:not(#typed-text) {
      font-size: 1.5rem;
      font-weight: 500;
      opacity: 0.85;
    }

    #hero p {
      font-size: 1.1rem;
      color: var(--fg);
      opacity: 0.8;
    }

    .about-text {
      line-height: 1.6;
    }

    .about-text {
      hyphens: auto;
      word-break: break-word;
    }

    /* Skill Bars */
    .skill-bar {
      margin-bottom: 1.5rem;
    }

    .label {
      display: flex;
      justify-content: space-between;
      margin-bottom: 5px;
      font-size: 1rem;
      margin-bottom: 0.3rem;
      opacity: 0.9;
    }

    .bar {
      background-color: #e0e0e0;
      height: 10px;
      border-radius: 10px;
      overflow: hidden;
    }

    .progress {
      height: 100%;
      width: 0;
      background: linear-gradient(to right, var(--accent), #00c4a8);
      box-shadow: 0 0 10px var(--accent);
      transition: width 1.4s ease-out;
      border-radius: 6px;
    }

    /* Radial Skills */
    .radial-skills {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 2rem;
      margin-top: 2rem;
    }

    .radial {
      position: relative;
      width: 120px;
      height: 120px;
      border-radius: 50%;
      background: conic-gradient(var(--accent) 0deg, #222 0deg);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: bold;
      font-size: 0.9rem;
      cursor: pointer;
      transition: transform 0.3s;
    }

    .radial:hover {
      transform: scale(1.1);
    }

    .radial::before {
      content: attr(data-label);
      position: absolute;
      bottom: -1.6rem;
      font-size: 0.85rem;
      opacity: 0.6;
    }

    .radial::after {
      content: attr(data-percent) '%';
      position: absolute;
      font-size: 1.2rem;
    }

    /* Project Cards */
    #projects .grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 1.5rem;
    }

    .card {
      background: var(--card);
      border-radius: 8px;
      overflow: hidden;
      cursor: pointer;
      transition: transform 0.3s;
      position: relative;
    }


    .card:hover {
      transform: translateY(-8px);
    }

    .card img {
      width: 100%;
      display: block;
    }

    .card .desc {
      padding: 1rem;
      position: relative;
    }

    .card .desc h3 {
      margin-bottom: 0.5rem;
    }

    .card .overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.6);
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 1rem;
      opacity: 0;
      transition: opacity 0.3s;
    }

    .card:hover .overlay {
      opacity: 2;
    }

    .timeline {
      position: relative;
      margin-top: 3rem;
    }

    .timeline-item {
      width: 100%;
      max-width: 600px;
      position: relative;
      margin: 40px auto;
      opacity: 0;
      transform: translateY(30px);
      transition: all 0.8s ease;
    }

    .timeline-item.active {
      opacity: 1;
      transform: translateY(0);
    }

    .timeline-item.left {
      margin-left: 0;
      margin-right: auto;
    }

    .timeline-item.right {
      margin-left: auto;
      margin-right: 0;
    }

    .timeline-icon {
      position: absolute;
      left: -34px;
      top: 0;
      background: var(--accent);
      color: #000;
      font-size: 1.5rem;
      width: 36px;
      height: 36px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 0 10px var(--accent);
    }

    .timeline-content {
      background: var(--card);
      padding: 1.2rem 1.6rem;
      border-radius: 8px;
      box-shadow: 0 4px 12px rgba(0, 255, 208, 0.1);
    }

    .timeline-content h3 {
      margin-bottom: 0.3rem;
      color: var(--accent);
    }

    .timeline-content p {
      opacity: 0.85;
      font-size: 1rem;
      line-height: 1.6;
    }

    /* Fun Facts */
    .facts-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 1.5rem;
      margin-top: 2rem;
    }

    .fact-card {
      background: var(--card);
      padding: 1.5rem;
      border-radius: 10px;
      border-left: 4px solid var(--accent);
      box-shadow: 0 0 12px rgba(0, 255, 208, 0.05);
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .fact-card:hover {
      transform: translateY(-8px);
      box-shadow: 0 0 18px rgba(0, 255, 208, 0.2);
    }

    .fact-card h3 {
      margin-bottom: 0.5rem;
      color: var(--accent);
      font-size: 1.1rem;
    }

    .fact-card p {
      opacity: 0.85;
      font-size: 0.95rem;
      line-height: 1.5;
    }

    /* Contact Form */
    form {
      max-width: 500px;
      margin: auto;
      background: var(--card);
      padding: 2rem;
      border-radius: 8px;
    }

    .group {
      position: relative;
      margin-bottom: 1.5rem;
    }

    .group input,
    .group textarea {
      width: 100%;
      padding: 1rem;
      background: var(--input);
      border: none;
      border-radius: 6px;
      color: var(--fg);
    }

    .group label {
      position: absolute;
      top: 1rem;
      left: 1rem;
      opacity: 0.6;
      transition: all 0.2s;
    }

    .group input:focus,
    .group textarea:focus {
      outline: none;
      box-shadow: 0 0 0 2px var(--accent);
    }

    input:focus+label,
    textarea:focus+label,
    input:not(:placeholder-shown)+label,
    textarea:not(:placeholder-shown)+label {
      top: 0.2rem;
      font-size: 0.85rem;
      color: var(--accent);
    }

    /* Footer */
    footer {
      text-align: center;
      padding: 2rem 1rem;
      font-size: 0.9rem;
    }

    /* Theme Toggle */
    #theme-toggle {
      font-size: 1.5rem;
      cursor: pointer;
      transition: transform 0.3s ease;
      transform-origin: center;
      position: fixed;
      top: 1.5rem;
      right: 1.5rem;
      z-index: 1000;
      padding: 0.5rem;
      pointer-events: auto !important;
    }

    #theme-toggle:hover {
      transform: rotate(20deg);
    }

    /* Light Theme Overrides */
    .light-theme {
      --bg: #f7f7fc;
      --fg: #1a1a2e;
      --accent: #0078ff;
      --card: #ffffff;
      --input: #eeeeee;
    }

    /* Social Icons */
    .social-links a img {
      width: 30px;
      margin: 0 10px;
      opacity: 0.7;
      transition: transform 0.3s ease, opacity 0.3s;
    }

    .social-links a:hover img {
      transform: scale(1.2);
      opacity: 1;
    }

    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(30px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @media (max-width: 768px) {
      #hero h1 {
        font-size: 3rem;
        line-height: 1.4;
      }

      #hero #typed-text {
        font-size: 1.2rem;
      }

      #hero p {
        font-size: 1rem;
      }

      section {
        padding: 80px 1rem;
      }

      .container {
        padding: 0 1rem;
      }

      .about-text {
        width: 100%;
        font-size: 1rem;
        text-align: center !important;
      }

      .skill-bar .label {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
      }

      .radial {
        width: 90px;
        height: 90px;
      }

      .radial::after {
        font-size: 1rem;
      }

      .radial::before {
        font-size: 0.75rem;
        bottom: -1.2rem;
      }

      #projects .grid {
        grid-template-columns: 1fr;
      }

      .card .desc h3 {
        font-size: 1.5rem;
      }

      .card .desc p {
        font-size: 1rem;
      }

      .timeline-content {
        padding: 1rem;
      }

      .timeline-content p {
        font-size: 1rem;
      }

      .timeline-item {
        margin: 20px auto;
      }

      .facts-grid {
        grid-template-columns: 1fr;
      }

      .fact-card {
        font-size: 0.95rem;
      }

      form {
        padding: 1rem;
      }

      .group input,
      .group textarea {
        padding: 0.8rem;
        font-size: 1rem;
      }

      button {
        width: 100%;
        font-size: 0.95rem;
        padding: 0.8rem 1.2rem;
      }

      nav {
        padding: 0.8rem 1rem;
        flex-direction: column;
        align-items: flex-start;
        overflow-x: auto;
      }

      .menu a {
        margin: 0.5rem 1rem 0 0;
        display: inline-block;
        font-size: 0.9rem;
      }

      #theme-toggle {
        top: 1rem;
        right: 1.5rem;
        font-size: 1.2rem;
      }

      .card:hover .overlay {
        opacity: 1;
      }
    }