/* Default Dark Mode */
:root {
    --bg: #0a0a23;
    --text: #ffffff;
    --accent: #00ffcc;
    --secondary: #1e90ff;
    --card-bg: #1a1a3d;
  }
  
  .light-mode {
    --bg: #f0f0f5;
    --text: #333333;
    --accent: #007bff;
    --secondary: #00cc99;
    --card-bg: #d0d0d5; /* Darker off-white instead of #ffffff */
  }
  
  body {
    font-family: 'Roboto', sans-serif;
    color: var(--text);
    transition: all 0.3s ease;
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100vw;
    min-height: 100vh;
    position: relative;
    /* Starfield Background */
    background: var(--bg);
    background-image: 
      radial-gradient(2px 2px at 20% 30%, var(--accent), transparent),
      radial-gradient(1.5px 1.5px at 60% 70%, var(--accent), transparent),
      radial-gradient(1px 1px at 40% 10%, var(--secondary), transparent),
      radial-gradient(1.5px 1.5px at 80% 50%, var(--accent), transparent),
      radial-gradient(2px 2px at 10% 80%, var(--secondary), transparent);
    background-size: 100vw 100vh;
    animation: starfield 50s linear infinite;
  }
  
  body::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1; /* Behind content */
    background-image: 
      radial-gradient(1px 1px at 30% 40%, var(--card-bg), transparent),
      radial-gradient(0.8px 0.8px at 70% 20%, var(--card-bg), transparent),
      radial-gradient(1.2px 1.2px at 50% 60%, var(--card-bg), transparent);
    background-size: 100vw 100vh;
    animation: starfield-twinkle 30s linear infinite;
  }
  
  @keyframes starfield {
    0% {
      background-position: 0 0;
    }
    100% {
      background-position: -100vw -100vh;
    }
  }
  
  @keyframes starfield-twinkle {
    0% {
      background-position: 0 0;
      opacity: 0.7;
    }
    50% {
      opacity: 0.3;
    }
    100% {
      background-position: 100vw 100vh;
      opacity: 0.7;
    }
  }
  
  /* Mobile Styles - Adjust background size for smaller screens */
  @media (max-width: 600px) {
    body {
      background-size: 200vw 200vh; /* Larger pattern to fit smaller screens */
    }
    body::after {
      background-size: 200vw 200vh;
    }
  }
  header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.2);
    width: 100%;
  }
  
  nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
  }
  
  nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
  }
  
  nav a:hover, nav a.active {
    color: var(--accent);
  }
/* switch settings 👇 */

.ui-switch {
    /* switch */
    --switch-bg: rgb(135, 150, 165);
    --switch-width: 48px;
    --switch-height: 20px;
    /* circle */
    --circle-diameter: 32px;
    --circle-bg: rgb(0, 56, 146);
    --circle-inset: calc((var(--circle-diameter) - var(--switch-height)) / 2);
  }
  
  .ui-switch input {
    display: none;
  }
  
  .slider {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: var(--switch-width);
    height: var(--switch-height);
    background: var(--switch-bg);
    border-radius: 999px;
    position: relative;
    cursor: pointer;
  }
  
  .slider .circle {
    top: calc(var(--circle-inset) * -1);
    left: 0;
    width: var(--circle-diameter);
    height: var(--circle-diameter);
    position: absolute;
    background: var(--circle-bg);
    border-radius: inherit;
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHdpZHRoPSIyMCIgdmlld0JveD0iMCAwIDIwIDIwIj4KICAgIDxwYXRoIGZpbGw9IiNmZmYiCiAgICAgICAgZD0iTTkuMzA1IDEuNjY3VjMuNzVoMS4zODlWMS42NjdoLTEuMzl6bS00LjcwNyAxLjk1bC0uOTgyLjk4Mkw1LjA5IDYuMDcybC45ODItLjk4Mi0xLjQ3My0xLjQ3M3ptMTAuODAyIDBMMTMuOTI3IDUuMDlsLjk4Mi45ODIgMS40NzMtMS40NzMtLjk4Mi0uOTgyek0xMCA1LjEzOWE0Ljg3MiA0Ljg3MiAwIDAwLTQuODYyIDQuODZBNC44NzIgNC44NzIgMCAwMDEwIDE0Ljg2MiA0Ljg3MiA0Ljg3MiAwIDAwMTQuODYgMTAgNC44NzIgNC44NzIgMCAwMDEwIDUuMTM5em0wIDEuMzg5QTMuNDYyIDMuNDYyIDAgMDExMy40NzEgMTBhMy40NjIgMy40NjIgMCAwMS0zLjQ3MyAzLjQ3MkEzLjQ2MiAzLjQ2MiAwIDAxNi41MjcgMTAgMy40NjIgMy40NjIgMCAwMTEwIDYuNTI4ek0xLjY2NSA5LjMwNXYxLjM5aDIuMDgzdi0xLjM5SDEuNjY2em0xNC41ODMgMHYxLjM5aDIuMDg0di0xLjM5aC0yLjA4NHpNNS4wOSAxMy45MjhMMy42MTYgMTUuNGwuOTgyLjk4MiAxLjQ3My0xLjQ3My0uOTgyLS45ODJ6bTkuODIgMGwtLjk4Mi45ODIgMS40NzMgMS40NzMuOTgyLS45ODItMS40NzMtMS40NzN6TTkuMzA1IDE2LjI1djIuMDgzaDEuMzg5VjE2LjI1aC0xLjM5eiIgLz4KPC9zdmc+");
    background-repeat: no-repeat;
    background-position: center center;
    -webkit-transition: left 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
    -o-transition: left 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
    transition: left 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    box-shadow: 0px 2px 1px -1px rgba(0,0,0,0.2), 0px 1px 1px 0px rgba(0,0,0,0.14), 0px 1px 3px 0px rgba(0,0,0,0.12);
    ;
  }
  
  .slider .circle::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.75);
    border-radius: inherit;
    -webkit-transition: all 500ms;
    -o-transition: all 500ms;
    transition: all 500ms;
    opacity: 0;
  }
  
  /* actions */
  
  .ui-switch input:checked+.slider .circle {
    left: calc(100% - var(--circle-diameter));
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHdpZHRoPSIyMCIgdmlld0JveD0iMCAwIDIwIDIwIj4KICAgIDxwYXRoIGZpbGw9IiNmZmYiCiAgICAgICAgZD0iTTQuMiAyLjVsLS43IDEuOC0xLjguNyAxLjguNy43IDEuOC42LTEuOEw2LjcgNWwtMS45LS43LS42LTEuOHptMTUgOC4zYTYuNyA2LjcgMCAxMS02LjYtNi42IDUuOCA1LjggMCAwMDYuNiA2LjZ6IiAvPgo8L3N2Zz4=");
  }
  
  .ui-switch input:active+.slider .circle::before {
    -webkit-transition: 0s;
    -o-transition: 0s;
    transition: 0s;
    opacity: 1;
    width: 0;
    height: 0;
  }
  
  /* Hamburger Menu */
  .nav-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
  }
  
  .hero, .about, .projects, .contact, .services {
    padding: 3rem 1rem;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    color: var(--accent);
  }
  
  p {
    font-size: 1rem;
    line-height: 1.6;
  }
  
  
  .social-links a {
    color: var(--secondary);
    text-decoration: none;
    font-size: 1rem;
  }
  
  .profile-pic {
    max-width: 250px;
    width: 100%;
    border-radius: 50%;
    margin: 1rem auto;
    display: block;
    object-fit: cover;
  }
  
  .skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
  }
  
  .skills li {
    background: var(--card-bg);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
  }
  
  .project-card {
    background: var(--card-bg);
    padding: 1rem;
    margin: 1rem auto;
    max-width: 90%;
    border-radius: 10px;
    transition: transform 0.3s ease;
  }
  
  .project-card:hover {
    transform: scale(1.03);
  }
  
  .contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 90%;
    margin: 2rem auto;
  }
  
  .contact-form input, .contact-form textarea {
    padding: 0.8rem;
    border: none;
    border-radius: 5px;
    background: var(--card-bg);
    color: var(--text);
    font-size: 1rem;
  }
  
  .contact-form button {
    background: var(--accent);
    border: none;
    padding: 0.8rem;
    color: var(--text);
    cursor: pointer;
    border-radius: 5px;
  }
  
  /* Mobile Styles */
  @media (max-width: 600px) {
    h1 {
      font-size: 1.8rem;
    }
  
    p {
      font-size: 0.9rem;
    }
  
    nav ul {
      display: none;
      flex-direction: column;
      position: absolute;
      top: 60px;
      left: 0;
      width: 100%;
      background: var(--card-bg);
      padding: 1rem;
    }
  
    nav ul.active {
      display: flex;
    }
  
    .nav-toggle {
      display: block;
    }
  
    .hero, .about, .projects, .contact {
      padding: 2rem 1rem;
    }
  
    .profile-pic {
      max-width: 120px;
    }
  
    .project-card {
      max-width: 95%;
    }
  
    .contact-form {
      max-width: 95%;
    }
  
    #theme-toggle {
      padding: 0.4rem 0.8rem;
      font-size: 0.8rem;
    }
  }
  
  /* Desktop Styles */
  @media (min-width: 601px) {
    h1 {
      font-size: 3rem;
    }
  
    .project-card {
      max-width: 600px;
    }
  
    .contact-form {
      max-width: 500px;
    }
  }

  .skills-charts {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin: 2rem 0;
}

.chart {
  flex: 1;
  min-width: 250px;
  max-width: 350px;
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.chart h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  color: var(--accent);
  text-align: center;
  margin-bottom: 1rem;
}

.bar {
  display: flex;
  align-items: center;
  margin: 0.5rem 0;
}

.label {
  width: 100px;
  font-size: 0.9rem;
  color: var(--text);
}

.bar-fill {
  flex-grow: 1;
  height: 20px;
  background: var(--accent);
  border-radius: 5px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s ease-out;
}

.bar-fill::after {
  content: attr(data-percent) '%';
  position: absolute;
  right: 10px;
  color: var(--text);
  font-size: 0.8rem;
  line-height: 20px;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
  .skills-charts {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .chart {
    min-width: 90%;
  }

  .label {
    width: 80px;
    font-size: 0.8rem;
  }

  .bar-fill {
    height: 16px;
  }

  .bar-fill::after {
    font-size: 0.7rem;
    line-height: 16px;
  }
}

 /* Uiverse.io by Darlley - Scoped to Services Page */
 .figma-animation #cursor,
 .figma-animation #box,
 .figma-animation #text {
     cursor: pointer;
 }

 .figma-animation #cursor {
     overflow: visible;
     transform: translate3d(300px, 0, 0) scale(1);
     transform-origin: center center;
     transform-box: fill-box;
     animation: cursor 5s ease infinite alternate;
 }

 @keyframes cursor {
     0% {
         opacity: 0;
         transform: translate3d(300px, 0, 0) scale(1);
     }

     30% {
         opacity: 1;
         transform: translate3d(0, 0, 0) scale(1);
     }

     60% {
         opacity: 1;
         transform: translate3d(-200px, -200px, 0) scale(1);
     }

     65% {
         opacity: 1;
         transform: translate3d(-200px, -200px, 0) scale(0.95);
     }

     70% {
         opacity: 1;
         transform: translate3d(-200px, -200px, 0) scale(1);
     }

     100% {
         opacity: 1;
         transform: translate3d(-300px, -50px, 0) scale(1);
     }
 }

 .figma-animation #box {
     opacity: 0;
     animation: box 5s ease infinite alternate;
 }

 @keyframes box {

     0%,
     60% {
         opacity: 0;
     }

     65%,
     100% {
         opacity: 1;
     }
 }

 .figma-animation #text {
     fill: var(--text);
 }

 .figma-animation #figny9-box {
     fill: var(--card-bg);
     stroke: var(--accent);
 }

 .figma-animation #figny9-adjust-1,
 .figma-animation #figny9-adjust-2,
 .figma-animation #figny9-adjust-3,
 .figma-animation #figny9-adjust-4 {
     fill: var(--card-bg);
     stroke: var(--accent);
 }

 .figma-animation #Vector_273,
 .figma-animation #Rectangle_786 {
     fill: var(--accent);
     stroke: var(--text);
 }

 .figma-animation #Yuren_sasanka path {
     fill: var(--text);
 }

 /* Services Section */
.services {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: var(--text);
  }
  
  .services h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 20px;
  }
  
  .services .intro {
    font-family: 'Roboto', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
  }
  
  /* Services Grid */
  .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
  }
  
  .service-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  }
  
  .service-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 10px;
  }
  
  .service-card p {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
  }
  
  /* Sample Animations */
  .animation-demo {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 60px;
  }
  
  .demo-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    width: 200px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  }
  
  .demo-card p {
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    margin-top: 10px;
  }
  
  .hover-box {
    width: 100px;
    height: 100px;
    background: var(--accent);
    margin: 0 auto;
    border-radius: 10px;
    transition: transform 0.3s ease;
  }
  
  .demo-card:hover .hover-box {
    transform: scale(1.2);
  }
  
  .fade-box {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, var(--accent), transparent);
    margin: 0 auto;
    border-radius: 10px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
  }
  
  .demo-card:hover .fade-box {
    opacity: 1;
  }
  
  .rotate-box {
    width: 100px;
    height: 100px;
    background: var(--accent);
    margin: 0 auto;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .demo-card:hover .rotate-box {
    transform: rotate(45deg);
    box-shadow: 0 0 15px var(--accent);
  }
  
  /* Responsive Design */
  @media (max-width: 600px) {
    .services {
      padding: 60px 10px;
    }
  
    .services h1 {
      font-size: 2rem;
    }
  
    .services .intro {
      font-size: 1rem;
    }
  
    .services-grid {
      grid-template-columns: 1fr;
    }
  
    .service-card {
      padding: 15px;
    }
  
    .animation-demo {
      flex-direction: column;
      align-items: center;
    }
  
    .demo-card {
      width: 100%;
      max-width: 250px;
    }
  }

  /* From Uiverse.io by jeremyssocial */ 
@keyframes blinkCursor {
    50% {
      border-right-color: transparent;
    }
  }
  
  @keyframes typeAndDelete {
    0%,
    10% {
      width: 0;
    }
    45%,
    55% {
      width: 6.2em;
    } /* adjust width based on content */
    90%,
    100% {
      width: 0;
    }
  }
  
  .terminal-loader {
    border: 0.1em solid #333;
    background-color: #1a1a1a;
    color: #0f0;
    font-family: "Courier New", Courier, monospace;
    font-size: 1em;
    padding: 1.5em 1em;
    width: 12em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
  }
  
  .terminal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1.5em;
    background-color: #333;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    padding: 0 0.4em;
    box-sizing: border-box;
  }
  
  .terminal-controls {
    float: right;
  }
  
  .control {
    display: inline-block;
    width: 0.6em;
    height: 0.6em;
    margin-left: 0.4em;
    border-radius: 50%;
    background-color: #777;
  }
  
  .control.close {
    background-color: #e33;
  }
  
  .control.minimize {
    background-color: #ee0;
  }
  
  .control.maximize {
    background-color: #0b0;
  }
  
  .terminal-title {
    float: left;
    line-height: 1.5em;
    color: #eee;
  }
  
  .text {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    border-right: 0.2em solid green; /* Cursor */
    animation:
      typeAndDelete 4s steps(11) infinite,
      blinkCursor 0.5s step-end infinite alternate;
    margin-top: 1.5em;
  }

  
  #loader-overlay {
    position: fixed;
    inset: 0;
    background-color: #0a0a23;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
  }
  
.social-links {
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: .5em;
  }
  
  .up {
    display: flex;
    flex-direction: row;
    gap: 0.5em;
    justify-content: center;
  }
  
  .down {
    display: flex;
    flex-direction: row;
    gap: 0.5em;
    justify-content: center;
  }
  
  .card1 {
    width: 90px;
    height: 90px;
    outline: none;
    border: none;
    background: white;
    border-radius: 90px 5px 5px 5px;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
    transition: .2s ease-in-out;
  }
  
  .instagram {
    margin-top: 1.5em;
    margin-left: 1.2em;
    fill: #cc39a4;
  }
  
  .card2 {
    width: 90px;
    height: 90px;
    outline: none;
    border: none;
    background: white;
    border-radius: 5px 90px 5px 5px;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
    transition: .2s ease-in-out;
  }
  
  .telegram {
    margin-top: 1.5em;
    margin-left: -.9em;
    fill: #03A9F4;
  }
  
  .card3 {
    width: 90px;
    height: 90px;
    outline: none;
    border: none;
    background: white;
    border-radius: 5px 5px 5px 90px;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
    transition: .2s ease-in-out;
  }
  
  .github {
    margin-top: -.6em;
    margin-left: 1.2em;
  }
  
  .card4 {
    width: 90px;
    height: 90px;
    outline: none;
    border: none;
    background: white;
    border-radius: 5px 5px 90px 5px;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
    transition: .2s ease-in-out;
  }
  
  .discord {
    margin-top: -.9em;
    margin-left: -1.2em;
    fill: #8c9eff;
  }
  
  .card1:hover {
    cursor: pointer;
    scale: 1.1;
    background-color: #cc39a4;
  }
  
  .card1:hover .instagram {
    fill: white;
  }
  
  .card2:hover {
    cursor: pointer;
    scale: 1.1;
    background-color: #03A9F4;
  }
  
  .card2:hover .telegram {
    fill: white;
  }
  
  .card3:hover {
    cursor: pointer;
    scale: 1.1;
    background-color: black;
  }
  
  .card3:hover .github {
    fill: white;
  }
  
  .card4:hover {
    cursor: pointer;
    scale: 1.1;
    background-color: #8c9eff;
  }
  
  .card4:hover .discord {
    fill: white;
  }