/* === VARIABLES & RESET === */
:root {
    --bg-dark: #0e0e10;
    --bg-light: #1a1a1d;
    --text: #f3f3f3;
    --accent: #4f92ff;
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.08);
    --radius: 16px;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    --transition: 0.3s ease;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
    scroll-behavior: smooth;
  }
  
  body {
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
  }
  
  /* === CONTAINERS === */
  .container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 4rem 0;
  }
  main {
    background: url('https://cdn.discordapp.com/attachments/1395389388112003102/1396888224378519552/Mitten_Development_3.png?ex=687fb909&is=687e6789&hm=eab48232e3644d34449ac6d76f3836b20873daf1f09b7d345c9e9b412e3b1266&') center center/cover no-repeat fixed;
    position: relative;
    overflow: hidden;
  }
  
  main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.438);
    z-index: 1;
  }
  
  .blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(0px);
    transition: backdrop-filter 0.05s ease-out;
    z-index: 2;
    pointer-events: none;
  }
  
  main > *:not(.blur-overlay) {
    position: relative;
    z-index: 3;
  }
  
  
  /* === NAV === */
  .nav {
    position: sticky;
    top: 0;
    z-index: 99;
    backdrop-filter: blur(12px);
    background: var(--glass);
    border-bottom: 1px solid var(--border);
  }
  
  .nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .2rem 0;
  }
  
  .logo {

    height: 80px;
  }
  
  .nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
  }
  
  .nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: var(--transition);
  }
  
  .nav-links a:hover {
    color: var(--accent);
  }
  
  /* === HERO === */
  .hero {
    text-align: center;
    padding: 6rem 0 4rem;
  }
  
  .hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
  
  .hero h2 span {
    color: var(--accent);
  }
  
  .hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #cfcfcf;
  }
  
  .btn {
    padding: 0.9rem 2rem;
    font-size: 1rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
  }
  
  .btn.primary {
    background: #90cdff5b;
    color: #fff;
    backdrop-filter: blur(10px);
  }
  
  .btn.primary:hover {
    background: #4385ff67;
    transform: translatey(-2px);
  }
  
  /* === SECTIONS === */
  .section {
    padding: 5rem 0;
  }
  
  .section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
  }
  
  .section.dark {
    background: var(--bg-light);
  }
  
  /* === ABOUT === */
  #about p {
    max-width: 700px;
    margin: auto;
    font-size: 1.1rem;
    color: #c8c8c8;
    text-align: center;
  }
  
  /* === SKILLS === */
  .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    text-align: center;
  }
  
  .skills-grid li {
    list-style: none;
    background: var(--glass);
    border: 1px solid var(--border);
    padding: 1.2rem;
    border-radius: var(--radius);
    transition: var(--transition);
  }
  
  .skills-grid li:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
  }
  
  /* === PORTFOLIO === */
  .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
  }
  
  .card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    backdrop-filter: blur(10px);
  }
  
  .card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: var(--accent);
  }
  
  /* === TESTIMONIALS === */
  .testimonial-carousel {
    max-width: 800px;
    margin: auto;
    text-align: center;
  }
  
  .testimonial-carousel blockquote {
    font-style: italic;
    font-size: 1.1rem;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
  }
  
  .testimonial-carousel blockquote:hover {
    border-color: var(--accent);
  }
  
  /* === FOOTER === */
  .footer {
    text-align: center;
    padding: 2rem 0;
    font-size: 0.9rem;
    color: #999;
    background: var(--bg-light);
  }
  
  /* === RESPONSIVE === */
  @media (max-width: 768px) {
    .nav-links {
      gap: 1rem;
      flex-wrap: wrap;
      justify-content: center;
    }
  
    .hero h2 {
      font-size: 2rem;
    }
  
    .btn {
      font-size: 0.95rem;
      padding: 0.8rem 1.5rem;
    }
  
    .skills-grid,
    .portfolio-grid {
      grid-template-columns: 1fr;
    }
  }
  /* Typewriter effect styles */
#typewriter {
  font-size: 2.5rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
  width: fit-content;
  border-right: 2px solid rgba(255, 255, 255, 0.75); /* Blinking cursor */
  animation: blinkCursor 0.75s step-end infinite;
}

@keyframes blinkCursor {
  50% { border-color: transparent; }
}
.hero h2 {
    color: #fff;
    font-size: 2rem;
    font-weight: 600;
}
.hero h2 span {
    color: #425dd8;
    position: relative;
    font-weight: bold;
}
.hero h2 span::before {
    content: "";
    height: 30px;
    width: 2px;
    position: absolute;
    top: 50%;
    right: -8px;
    background: #539bed;
    transform: translateY(-45%);
    animation: blink 0.7s infinite;
}
.hero h1 span.stop-blinking::before {
    animation: none;
}
@keyframes blink {
    50% { opacity: 0 }
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    width: 270px;
    height: 100vh;
    background: #151A2D;
    transition: all 0.4s ease;
  }
  .sidebar.collapsed {
    width: 85px;
  }
  .sidebar .sidebar-header {
    display: flex;
    position: relative;
    padding: 25px 20px;
    align-items: center;
    justify-content: space-between;
  }
  .sidebar-header .header-logo img {
    width: 46px;
    height: 46px;
    display: block;
    object-fit: contain;
    border-radius: 50%;
  }
  .sidebar-header .sidebar-toggler,
  .sidebar-menu-button {
    position: absolute;
    right: 20px;
    height: 35px;
    width: 35px;
    color: #151A2D;
    border: none;
    cursor: pointer;
    display: flex;
    background: #EEF2FF;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: 0.4s ease;
  }
  .sidebar.collapsed .sidebar-header .sidebar-toggler {
    transform: translate(-4px, 65px);
  }
  .sidebar-header .sidebar-toggler span,
  .sidebar-menu-button span {
    font-size: 1.75rem;
    transition: 0.4s ease;
  }
  .sidebar.collapsed .sidebar-header .sidebar-toggler span {
    transform: rotate(180deg);
  }
  .sidebar-header .sidebar-toggler:hover {
    background: #d9e1fd;
  }
  .sidebar-nav .nav-list {
    list-style: none;
    display: flex;
    gap: 4px;
    padding: 0 15px;
    flex-direction: column;
    transform: translateY(15px);
    transition: 0.4s ease;
  }
  .sidebar .sidebar-nav .primary-nav {
    overflow-y: auto;
    scrollbar-width: thin;
    padding-bottom: 20px;
    height: calc(100vh - 227px);
    scrollbar-color: transparent transparent;
  }
  .sidebar .sidebar-nav .primary-nav:hover {
    scrollbar-color: #EEF2FF transparent;
  }
  .sidebar.collapsed .sidebar-nav .primary-nav {
    overflow: unset;
    transform: translateY(65px);
  }
  .sidebar-nav .nav-item .nav-link {
    color: #fff;
    display: flex;
    gap: 12px;
    white-space: nowrap;
    border-radius: 8px;
    padding: 11px 15px;
    align-items: center;
    text-decoration: none;
    border: 1px solid #151A2D;
    transition: 0.4s ease;
  }
  .sidebar-nav .nav-item:is(:hover, .open)>.nav-link:not(.dropdown-title) {
    color: #151A2D;
    background: #EEF2FF;
  }
  .sidebar .nav-link .nav-label {
    transition: opacity 0.3s ease;
  }
  .sidebar.collapsed .nav-link :where(.nav-label, .dropdown-icon) {
    opacity: 0;
    pointer-events: none;
  }
  .sidebar.collapsed .nav-link .dropdown-icon {
    transition: opacity 0.3s 0s ease;
  }
  .sidebar-nav .secondary-nav {
    position: absolute;
    bottom: 35px;
    width: 100%;
    background: #151A2D;
  }
  .sidebar-nav .nav-item {
    position: relative;
  }
  /* Dropdown Stylings */
  .sidebar-nav .dropdown-container .dropdown-icon {
    margin: 0 -4px 0 auto;
    transition: transform 0.4s ease, opacity 0.3s 0.2s ease;
  }
  .sidebar-nav .dropdown-container.open .dropdown-icon {
    transform: rotate(180deg);
  }
  .sidebar-nav .dropdown-menu {
    height: 0;
    overflow-y: hidden;
    list-style: none;
    padding-left: 15px;
    transition: height 0.4s ease;
  }
  .sidebar.collapsed .dropdown-menu {
    position: absolute;
    top: -10px;
    left: 100%;
    opacity: 0;
    height: auto !important;
    padding-right: 10px;
    overflow-y: unset;
    pointer-events: none;
    border-radius: 0 10px 10px 0;
    background: #151A2D;
    transition: 0s;
  }
  .sidebar.collapsed .dropdown-menu:has(.dropdown-link) {
    padding: 7px 10px 7px 24px;
  }
  .sidebar.sidebar.collapsed .nav-item:hover>.dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(12px);
    transition: all 0.4s ease;
  }
  .sidebar.sidebar.collapsed .nav-item:hover>.dropdown-menu:has(.dropdown-link) {
    transform: translateY(10px);
  }
  .dropdown-menu .nav-item .nav-link {
    color: #F1F4FF;
    padding: 9px 15px;
  }
  .sidebar.collapsed .dropdown-menu .nav-link {
    padding: 7px 15px;
  }
  .dropdown-menu .nav-item .nav-link.dropdown-title {
    display: none;
    color: #fff;
    padding: 9px 15px;
  }
  .dropdown-menu:has(.dropdown-link) .nav-item .dropdown-title {
    font-weight: 500;
    padding: 7px 15px;
  }
  .sidebar.collapsed .dropdown-menu .nav-item .dropdown-title {
    display: block;
  }
  .sidebar-menu-button {
    display: none;
  }
  .portfolio-grid a {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    transition: all 0.3s ease;
  }
  .portfolio-grid a:hover {
    color: #50a5d6;
    text-decoration: none;
    font-weight: bold;
    
  }
  .logo {
  transition: all 0.3s ease;
  }
  .logo:hover {
    transform: rotate(-10deg);
    scale: 1.2;

  }
  /* Responsive media query code for small screens */
  @media (max-width: 768px) {
    .sidebar-menu-button {
      position: fixed;
      left: 20px;
      top: 20px;
      height: 40px;
      width: 42px;
      display: flex;
      color: #F1F4FF;
      background: #151A2D;
    }
    .sidebar.collapsed {
      width: 270px;
      left: -270px;
    }
    .sidebar.collapsed .sidebar-header .sidebar-toggler {
      transform: none;
    }
    .sidebar.collapsed .sidebar-nav .primary-nav {
      transform: translateY(15px);
    }
  }

  #testimonials {
    position: relative;
    backdrop-filter: blur(10px);
    background: var(--glass);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: var(--radius);
  }
  #skills {
    position: relative;
    backdrop-filter: blur(10px);
    background: var(--glass);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: var(--radius);
  }