:root {
  --bg-color: #050510;
  --text-color: #a9b5c2;
  --heading-color: #f8f9fa;
  --accent-color: #00e5ff;
  --accent-glow: rgba(0, 229, 255, 0.3);
  --glass-bg: rgba(20, 20, 35, 0.4);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-hover: rgba(30, 30, 50, 0.6);
  --nav-height: 100px;
}

/* Dynamic Animated Background */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #050510 0%, #120b22 50%, #081122 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.05) 0%, transparent 60%);
  animation: bgMove 20s linear infinite;
  z-index: -1;
  pointer-events: none;
}

@keyframes bgMove {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-10%, -10%); }
  100% { transform: translate(0, 0); }
}

/* Section Entrance Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Additional color variables for the side menu */
:root {
  --menu-background: var(--bg-color);
  --menu-text-color: #b8c4d6;
  --menu-accent-color: #d9e4f5;
}

.side-menu {
  position: fixed;
  top: 0;
  right:0;
  width: 250px;
  height: 100vh;
  background: linear-gradient(180deg, rgba(8, 10, 24, 0.82), rgba(10, 13, 28, 0.76));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-left: 1px solid rgba(255,255,255,.07);
  transition: right 0.3s ease;
  z-index: 1000;
  padding: 100px 30px;
  box-shadow: -16px 0 34px rgba(0,0,0,.26), inset 1px 0 0 rgba(255,255,255,.03);
  transition: all 0.3s ease;
}

.menu-toggle {
  position: fixed;
  top: 18px;
  left: 18px;
  width: 62px;
  height: 62px;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
  background: linear-gradient(145deg, rgba(18,22,40,.52), rgba(10,13,28,.46));
  border: none;
  border-radius: 20px;
  box-shadow: 0 6px 16px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1100;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.menu-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,.26), 0 0 0 1px rgba(255,255,255,.1), inset 0 1px 0 rgba(255,255,255,.07);
  background: linear-gradient(145deg, rgba(22,27,46,.62), rgba(12,16,33,.54));
}

.menu-toggle:active {
  transform: scale(.92);
  box-shadow: 0 4px 18px rgba(0,0,0,.5), inset 0 2px 8px rgba(0,0,0,.4);
}

.menu-close {
  display: none;
}

.menu-backdrop {
  display: none;
}

.menu-hover-fill {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.menu-hover-fill li {
  position: relative;
  overflow: hidden;
}

.menu-hover-fill a {
  color: var(--menu-text-color);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: .01em;
  opacity: .92;
  position: relative;
  display: block;
  transition: color 0.3s ease, opacity .25s ease;
}

.menu-hover-fill li::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background-color: var(--menu-accent-color);
  transition: left 0.3s ease;
}

.menu-hover-fill li:hover::before {
  left: 0;
}

.menu-hover-fill li:hover a {
  color: var(--menu-accent-color);
  opacity: 1;
}

html.menu-solid-fallback .menu-toggle {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(9, 24, 42, 0.9);
  box-shadow: 0 8px 18px rgba(0,0,0,.28), 0 0 0 1px rgba(113,241,223,.12);
}

html.menu-solid-fallback .menu-backdrop {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(5, 7, 16, 0.5);
}

html.menu-solid-fallback .side-menu {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: linear-gradient(180deg, rgba(8, 10, 24, 0.93), rgba(10, 13, 28, 0.91));
  border-left: 1px solid rgba(255,255,255,.07);
  box-shadow: -16px 0 34px rgba(0,0,0,.28), inset 1px 0 0 rgba(255,255,255,.03);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .menu-backdrop {
      display: block;
      position: fixed;
      inset: 0;
      background: rgba(5, 7, 16, 0.44);
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      opacity: 0;
      pointer-events: none;
      transition: opacity .22s ease;
      z-index: 980;
  }

  .menu-backdrop.active {
      opacity: 1;
      pointer-events: auto;
  }

  header {
    background: transparent;
    border-bottom: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
  }

  .side-menu {
      width: min(248px, calc(100vw - 96px));
      height: auto;
      position: fixed;
      top: 18px;
    bottom: auto;
    left: 18px;
    right: auto;
      padding: 14px 14px 12px;
      background: linear-gradient(165deg, rgba(10, 11, 25, 0.92), rgba(12, 14, 30, 0.88));
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      z-index: 1000;
    box-shadow: 0 14px 30px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 26px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px) scale(0.96);
    transform-origin: top left;
    transition: opacity .22s ease, transform .24s ease, box-shadow .3s ease;
  }

    .menu-close {
      position: absolute;
        top: 12px;
        left: 12px;
        width: 38px;
        height: 38px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: none;
      border-radius: 12px;
      background: linear-gradient(145deg, rgba(20,24,42,.58), rgba(11,14,30,.5));
      box-shadow: 0 6px 16px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.06);
      color: #d9e4f5;
      font-size: 1.5rem;
      line-height: 1;
      opacity: 0;
      pointer-events: none;
      transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
    }

    .menu-close:hover {
      transform: translateY(-1px);
      box-shadow: 0 8px 18px rgba(0,0,0,.24), 0 0 0 1px rgba(255,255,255,.12), inset 0 1px 0 rgba(255,255,255,.08);
    }

  .menu-hover-fill {
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
      gap: 6px;
      padding-top: 42px;
  }

  .menu-hover-fill li {
    flex: 1 1 auto;
      text-align: left;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

    .menu-hover-fill li:last-child {
      border-bottom: none;
    }

  .menu-hover-fill a {
      font-size: 0.88rem;
      padding: 9px 4px;
    text-align: left;
      display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
      color: var(--text-color);
      transition: color 0.3s ease;
    white-space: normal;
      border-radius: 0;
    min-width: 0;
      background: transparent;
  }

  .menu-hover-fill a::before {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

    .menu-toggle.active {
      opacity: 0;
      pointer-events: none;
      transform: scale(.9);
    }

  .side-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
      transform: translateY(0) scale(1);
      box-shadow: 0 18px 40px rgba(0,0,0,.28), 0 0 0 1px rgba(113,241,223,.05), 0 0 24px rgba(113,241,223,.08);
  }

    .side-menu.active .menu-close {
      opacity: 1;
      pointer-events: auto;
    }

  .menu-hover-fill li:hover a {
      color: var(--accent-color);
  }

  .menu-hover-fill li::before {
      display: none; /* Remove the underline for mobile */
  }

  main {
      margin-right: 0;
      margin-bottom: 0;
  }

  body {
      padding-bottom: 0;
  }
}

/* Desktop Styles */
@media (min-width: 769px) {
    .menu-toggle {
      display: none;
    }

  .menu-close {
      display: none;
  }

  .menu-backdrop {
      display: none;
  }

  main {
      margin-right: 250px; /* Width of the side menu */
  }
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background-color: #71f1df;
  box-shadow: 0 0 10px rgba(113,241,223,.18);
  transition: transform .22s ease, opacity .18s ease, background-color .2s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.side-menu.active {
  right: 0;
}

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

  body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #050510 0%, #120b22 50%, #081122 100%);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
  }

  .container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
  }

  header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(5, 5, 16, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
  }

  nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--nav-height);
  }

  .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
  }

  nav ul {
    display: flex;
    list-style: none;
  }

  nav ul li {
    margin-left: 30px;
  }

  nav ul li a {
    color: var(--heading-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
  }

  nav ul li a:hover {
    color: var(--accent-color);
  }

  section {
    padding: 100px 0;
  }

  h1, h2, h3 {
    color: var(--heading-color);
  }

  .hero {
    height: 100vh;
    display: flex;
    align-items: center;
  }

  .hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 1.5rem;
    color: var(--heading-color);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.08;
    max-width: 14ch;
    text-wrap: balance;
    overflow-wrap: anywhere;
    animation: fadeInDown 1s ease-out forwards;
  }

  .hero-content h2 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    color: var(--text-color);
    margin-bottom: 2rem;
    font-weight: 600;
    line-height: 1.18;
    max-width: 22ch;
    text-wrap: balance;
    overflow-wrap: anywhere;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.2s forwards;
  }

  .hero-content p {
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 3rem;
    line-height: 1.8;
    color: var(--text-color);
    opacity: 0.8;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.4s forwards;
  }

  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .btn {
    display: inline-block;
    background: transparent;
    color: var(--accent-color);
    padding: 1rem 2rem;
    border: 1px solid var(--accent-color);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    animation: fadeIn 1.5s ease-out 0.6s forwards;
  }

  @keyframes fadeIn {
    to { opacity: 1; }
  }

  .btn:hover {
    background: rgba(0, 229, 255, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 229, 255, 0.2);
  }

  .section-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: var(--heading-color);
    position: relative;
    padding-bottom: 15px;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
    line-height: 1.2;
    max-width: 22ch;
    margin-left: auto;
    margin-right: auto;
    text-wrap: balance;
    overflow-wrap: anywhere;
  }

  .section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    border-radius: 2px;
  }

  .about-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }

  .about-text {
    flex: 1;
    margin-right: 2rem;
  }

  .skills-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 200px));
    gap: 0 10px;
    padding: 0;
    margin: 20px 0 0 0;
    overflow: hidden;
    list-style: none;
  }

  .skills-list li {
    position: relative;
    margin-bottom: 10px;
    padding-left: 20px;
    font-size: 0.9rem;
  }

  .skills-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-color);
  }

  .projects-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
  }

  #about {
    padding-bottom: 72px;
  }

  #projects {
    padding-top: 72px;
  }

  #about .section-title,
  #projects .section-title {
    margin-bottom: 2.1rem;
  }

  #about .projects-grid,
  #projects .projects-grid {
    margin-top: 0;
  }

  .project-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex: 1 1 calc(33.333% - 1.5rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
  }

  .project-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      120deg,
      transparent,
      rgba(0, 229, 255, 0.1),
      transparent
    );
    transition: all 0.6s;
  }

  .project-card:hover::after {
    left: 100%;
  }

  @media (max-width: 768px) {
    .project-card {
        flex: 1 1 calc(50% - 1.5rem);
    }
  }

  @media (max-width: 480px) {
    .project-card {
        flex: 1 1 100%;
    }
  }

  .project-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: var(--glass-hover);
    border-color: var(--accent-color);
    box-shadow: 0 15px 35px 0 var(--accent-glow);
  }

  .project-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  .project-description {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .project-tech-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin-bottom: 1rem;
  }

  .project-tech-list li {
    font-size: 0.8rem;
    margin-right: 1rem;
    color: var(--accent-color);
  }

  .project-links {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .project-links a {
    color: var(--heading-color);
    text-decoration: none;
    margin-right: 0;
    font-size: 0.95rem;
    font-weight: 600;
  }

  .project-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
  }

  footer {
    text-align: center;
    padding: 2rem 0;
  }

  .social-links {
    margin-top: 1rem;
  }

  .social-links a {
    color: var(--heading-color);
    font-size: 1.5rem;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s ease;
  }

  .social-links a:hover {
    color: var(--accent-color);
  }
  
  .about-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  }

  .about-card:hover {
    transform: translateY(-8px);
    background: var(--glass-hover);
    border-color: var(--accent-color);
    box-shadow: 0 15px 35px 0 var(--accent-glow);
  }

  .skills-title {
    color: var(--heading-color);
    font-size: 1rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
  }

  .about-card .project-tech-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin-bottom: 0;
  }

  .about-card .project-tech-list li {
    font-size: 0.8rem;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
  }
  
/* New styles for responsiveness */
@media (max-width: 768px) {
  .hero {
    min-height: 100vh;
    height: auto;
    align-items: flex-start;
    padding-top: 120px;
  }
  .hero-content {
    width: 100%;
  }
    .hero-content h1 {
    font-size: clamp(2rem, 10vw, 2.6rem);
    line-height: 1.1;
    overflow-wrap: anywhere;
    }
    .hero-content h2 {
    font-size: clamp(1.4rem, 7vw, 2rem);
    line-height: 1.2;
  }
    .section-title {
      font-size: clamp(1.6rem, 8vw, 2.2rem);
      margin-bottom: 2.2rem;
      max-width: 16ch;
    }
    #about {
      padding-bottom: 58px;
    }
    #projects {
      padding-top: 58px;
    }
    #about .section-title,
    #projects .section-title {
      margin-bottom: 1.6rem;
    }
  .hero-content p {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 100%;
  }
  .btn {
    width: 100%;
    text-align: center;
  }
  .projects-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    }
  .project-card {
    flex: 1 1 100%;
    }
}

/* Back to top button */
#back-to-top {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 1050;
  background: linear-gradient(145deg, rgba(13,37,64,.2), rgba(7,20,34,.14));
  color: #71f1df;
  border: none;
  border-radius: 20px;
  width: 62px;
  height: 62px;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 6px 16px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, opacity .22s ease;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(.92);
}

#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

#back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,.22), 0 0 0 1px rgba(113,241,223,.14), 0 0 14px rgba(113,241,223,.08), inset 0 1px 0 rgba(255,255,255,.08);
  background: linear-gradient(145deg, rgba(18,45,78,.26), rgba(9,27,48,.2));
}

#back-to-top:active {
  transform: scale(.92);
  box-shadow: 0 4px 18px rgba(0,0,0,.5), inset 0 2px 8px rgba(0,0,0,.4);
}

#back-to-top svg {
  transition: transform .2s ease;
}

#back-to-top:hover svg {
  transform: translateY(-2px);
}

#cursor-dot {
  width: 24px;
  height: 24px;
  background-color: transparent;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  user-select: none;
}

/* Hide the cursor on interactive elements */
a, button, input[type="submit"], input[type="button"] {
  cursor: none !important;
}

/* Scroll Animations (FORCED HORIZONTAL) */
.scroll-container {
    width: 100% !important;
    overflow: hidden !important;
    padding: 1rem 0 !important;
    display: block !important;
}

.scroll-content {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    width: 250% !important; /* Increased width to ensure horizontal overflow */
    animation: scroll 40s linear infinite !important;
}

.scroll-content-reverse {
    animation: scroll-reverse 40s linear infinite !important;
}

.scroll-item {
    flex: 0 0 auto !important;
    display: inline-block !important;
    padding: 10px 20px !important;
    margin: 0 15px !important;
    background: var(--glass-bg) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 10px !important;
    color: var(--accent-color) !important;
    font-size: clamp(0.75rem, 1.5vw, 1rem) !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    transition: all 0.3s ease !important;
    opacity: 0.8 !important; /* Increased opacity for visibility */
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scroll-reverse {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}


