/* ========================================================================
   Step 1: Global Variables & Presets
   ======================================================================== */
   :root {
    /* Fonts */
    --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --heading-font: "Raleway", sans-serif;
    --nav-font: "Poppins", sans-serif;
  
    /* Global Colors */
    --background-color: #0a192f;
    --default-color: #272829;
    --heading-color: #050d18;
    --accent-color: #149ddd;
    --surface-color: #ffffff;
    --contrast-color: #ffffff;
    --nav-color: #a8a9b4;
    --nav-hover-color: #ffffff;
    --nav-mobile-background-color: #040b14;
    --nav-dropdown-background-color: #040b14;
    --nav-dropdown-color: #a8a9b4;
    --nav-dropdown-hover-color: #ffffff;
  
    /* Smooth Scroll */
    scroll-behavior: smooth;
  }
  
  /* Color Presets */
  .light-background {
    --background-color: #f4fafd;
    --surface-color: #ffffff;
  }
  
  .dark-background {
    --background-color: #040b14;
    --default-color: #ffffff;
    --heading-color: #ffffff;
    --surface-color: #151f2b;
    --contrast-color: #ffffff;
  }
  
  /* ========================================================================
     Step 2: Global Base Styles
     ======================================================================== */
  body {
    margin: 0;
    line-height: 1.6;
    font-family: var(--default-font);
    background-color: var(--background-color);
    color: var(--default-color);
  }
  
  a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s;
  }
  
  a:hover {
    color: color-mix(in srgb, var(--accent-color), transparent 25%);
  }
  
  /* Headings */
  h1, h2, h3, h4, h5, h6 {
    margin: 0 0 15px;
    font-family: var(--heading-font);
    color: var(--heading-color);
  }
  
  /* PHP Email Form Messages */
  .php-email-form .error-message,
  .php-email-form .sent-message,
  .php-email-form .loading {
    display: none;
    padding: 15px;
    margin-bottom: 24px;
    text-align: center;
    font-weight: 600;
  }
  .php-email-form .error-message {
    background: #df1529;
  }
  .php-email-form .sent-message {
    background: #059652;
  }
  .php-email-form .loading {
    background: var(--surface-color);
  }
  .php-email-form .loading:before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    margin: 0 10px -6px 0;
    border: 3px solid var(--accent-color);
    border-top-color: var(--surface-color);
    border-radius: 50%;
    animation: php-email-form-loading 1s linear infinite;
  }
  @keyframes php-email-form-loading {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }
  
  /* ========================================================================
     Step 3: Header & Navigation
     ======================================================================== */
  .header {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    padding: 0 15px;
    background-color: var(--background-color);
    color: var(--default-color);
    overflow-y: auto;
    z-index: 997;
    transition: left 0.3s ease-in-out;
    border-right: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
  }
  .header .profile-img img {
    display: block;
    margin: 15px auto;
    width: 120px;
    border: 8px solid color-mix(in srgb, var(--default-color), transparent 85%);
  }
  .header .logo {
    margin-bottom: 15px;
    line-height: 1;
  }
  .header .logo h1 {
    font-size: 24px;
    margin: 0;
    font-weight: 700;
    color: var(--heading-color);
  }
  .header .social-links {
    margin-bottom: 20px;
  }
  .header .social-links a {
    width: 40px;
    height: 40px;
    margin: 0 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: color-mix(in srgb, var(--default-color), transparent 90%);
    color: var(--default-color);
    border-radius: 50%;
    transition: background 0.3s, color 0.3s;
  }
  .header .social-links a:hover {
    background: var(--accent-color);
    color: var(--contrast-color);
  }
  @media (min-width: 1200px) {
    .header ~ main,
    .header ~ #footer {
      margin-left: 300px;
    }
  }
  @media (max-width: 1199px) {
    .header { left: -100%; }
  }
  .header.header-show { left: 0; }
  
  /* Header Toggle */
  .header .header-toggle {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background-color: var(--accent-color);
    color: var(--contrast-color);
    border-radius: 50%;
    cursor: pointer;
    z-index: 9999;
    transition: background-color 0.3s;
  }
  .header .header-toggle:hover {
    background-color: color-mix(in srgb, var(--accent-color), transparent 90%);
  }
  
  /* Navigation Menu */
  .mobile-nav-toggle { display: none; }
  .navmenu { z-index: 9997; padding: 0; }
  .navmenu ul {
    margin: 0;
    padding: 0 0 20px;
    list-style: none;
  }
  .navmenu a,
  .navmenu a:focus {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 15px 10px;
    font-family: var(--nav-font);
    font-size: 16px;
    color: var(--nav-color);
    white-space: nowrap;
    transition: color 0.3s;
  }
  .navmenu a .navicon,
  .navmenu a:focus .navicon {
    font-size: 20px;
    margin-right: 10px;
  }
  .navmenu a .toggle-dropdown,
  .navmenu a:focus .toggle-dropdown {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-left: auto;
    border-radius: 50%;
    background-color: color-mix(in srgb, var(--accent-color), transparent 90%);
    transition: background 0.3s, color 0.3s;
    flex-shrink: 0;
  }
  .navmenu a:hover,
  .navmenu .active,
  .navmenu a:focus { color: var(--nav-hover-color); }
  .navmenu a:hover .navicon,
  .navmenu .active .navicon,
  .navmenu .active:focus .navicon { color: var(--accent-color); }
  .navmenu .active .toggle-dropdown,
  .navmenu .active:focus .toggle-dropdown {
    background-color: var(--accent-color);
    color: var(--contrast-color);
    transform: rotate(180deg);
  }
  .navmenu .dropdown { display: block; }
  .navmenu .dropdown a,
  .navmenu .dropdown a:focus { color: var(--nav-dropdown-color); }
  .navmenu .dropdown a:hover,
  .navmenu .dropdown .active,
  .navmenu .dropdown .active:focus { color: var(--nav-dropdown-hover-color); }
  .navmenu .dropdown ul {
    position: static;
    display: none;
    z-index: 99;
    padding: 5px 10px;
    margin: 5px 10px;
    background-color: var(--nav-dropdown-background-color);
    border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
    transition: all 0.5s ease-in-out;
  }
  .navmenu .dropdown ul ul { background-color: rgba(33, 37, 41, 0.1); }
  .navmenu .dropdown > .dropdown-active {
    display: block;
    background-color: rgba(33, 37, 41, 0.03);
  }
  
  /* ========================================================================
     Step 4: Global Footer  and  Preloader
     ======================================================================== */
  .footer {
    padding: 40px 0;
    font-size: 14px;
    background-color: var(--background-color);
    color: var(--default-color);
    position: relative;
    border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
  }
  .footer .copyright p { margin: 0; }
  .footer .credits {
    margin-top: 4px;
    font-size: 13px;
    text-align: center;
  }
  
  #preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--background-color);
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
  }
  
  /* Hide preloader when page is loaded */
  #preloader.hidden {
    opacity: 0;
    visibility: hidden;
  }
  
  /* Fast Rotating Loader */
  #preloader:before {
    content: "";
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 5px solid transparent;
    border-top-color: var(--accent-color);
    animation: rotate-preloader 0.8s linear infinite;
  }
  
  @keyframes rotate-preloader {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }
  
  

  
  /* ========================================================================
     Step 5: Scroll Top Button & Page Titles
     ======================================================================== */
  .scroll-top {
    position: fixed;
    right: 15px;
    bottom: -15px;
    width: 44px;
    height: 44px;
    border-radius: 50px;
    background-color: var(--accent-color);
    opacity: 0;
    visibility: hidden;
    z-index: 99999;
    transition: all 0.4s;
  }
  .scroll-top.active {
    bottom: 15px;
    opacity: 1;
    visibility: visible;
  }
  .scroll-top i {
    font-size: 24px;
    line-height: 44px;
    color: var(--contrast-color);
  }
  .scroll-top:hover {
    background-color: color-mix(in srgb, var(--accent-color), transparent 20%);
  }
  
  .page-title {
    padding: 25px 0;
    background-color: var(--background-color);
    color: var(--default-color);
    position: relative;
  }
  .page-title h1 { font-size: 24px; font-weight: 700; }
  .page-title .breadcrumbs ol {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    font-size: 14px;
    font-weight: 400;
  }
  .page-title .breadcrumbs ol li+li {
    padding-left: 10px;
  }
  .page-title .breadcrumbs ol li+li::before {
    content: "/";
    padding-right: 10px;
    color: color-mix(in srgb, var(--default-color), transparent 70%);
  }
  
  /* ========================================================================
     Step 6: Global Sections & Section Titles
     ======================================================================== */
  section, .section {
    padding: 60px 0;
    background-color: var(--background-color);
    color: var(--default-color);
    overflow: hidden;
  }
  .section-title {
    padding-bottom: 60px;
    position: relative;
  }
  .section-title h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 20px;
    position: relative;
  }
  .section-title h2:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
  }
  .section-title p { margin: 0; }
  
/* ========================================================================
   Step 7: Home Section
   ======================================================================== */
   .home {
    min-height: 100vh;
    padding: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a192f;
  }
  
  .home .container {
    width: 90%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 3;
  }
  
  .home-text {
    flex: 1;
    text-align: left;
    color: #ffffff;
  }
  
  .home-text h2 {
    text-align: center;
    font-size: 48px;
    font-weight: 700;
    color: #00ffff;
  }
  
  .home-text p {
    font-size: 22px;
    margin-top: 10px;
  }
  
  .home-text p span {
    letter-spacing: 1px;
    border-bottom: 2px solid #00ffff;
  }
  
  .home-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .home-image img {
    width: 100%;
    height: auto;
    object-fit: cover;  /* Adjust as needed: 'cover' fills the container, 'contain' shows the full image */
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 255, 255, 0.5);
    animation: floatImage 3s ease-in-out infinite;
  }
 /* Floating Animation - Smoother and more performant */
@keyframes floatImage {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

/* Home Image Styles - Base */
.home-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 255, 255, 0.3);
  animation: floatImage 4s ease-in-out infinite;
  will-change: transform; /* Improves animation performance */
  aspect-ratio: 1/1; /* Maintains square ratio by default */
}

/* Tablet View (768px - 1024px) */
@media (max-width: 1024px) {
  .home, .home .container {
    flex-direction: column;
    text-align: center;
    padding: 40px 20px;
  }
  
  .home-text { 
    order: 2; /* Moves text below image */
    margin-bottom: 0;
    padding-top: 30px;
  }
  
  .home-image {
    order: 1;
    width: 80%;
    margin: 0 auto;
  }
  
  .home-image img {
    animation-duration: 5s; /* Slower animation on tablets */
  }
}

/* Mobile View (up to 767px) */
@media (max-width: 767px) {
  .home {
    min-height: 100vh;
    padding: 20px 15px;
    justify-content: flex-start;
    padding-top: 80px;
  }
  
  .home .container {
    flex-direction: column;
    height: auto;
  }
  
  .home-text {
    width: 100%;
    padding: 20px 0;
  }
  
  .home-text h2 {
    font-size: 28px;
    line-height: 1.3;
    margin-bottom: 15px;
  }
  
  .home-text p {
    font-size: 16px;
    line-height: 1.5;
  }
  
  .home-image {
    width: 100%;
    max-width: 100vw;
    margin: 0 -15px; /* Bleed to edges */
    padding-top: 20px;
  }
  
  .home-image img {
    width: 100vw;
    max-width: 100vw;
    height: auto;
    border-radius: 0;
    aspect-ratio: 4/5; /* Better mobile aspect ratio */
    object-position: center top;
    box-shadow: none;
    animation: none; /* Remove animation on small devices */
  }
  
  /* Special landscape mode adjustments */
  @media (max-height: 500px) and (orientation: landscape) {
    .home {
      min-height: 150vh;
    }
    .home-image img {
      aspect-ratio: 16/9;
      max-height: 60vh;
    }
  }
}

/* Very Small Devices (under 400px) */
@media (max-width: 400px) {
  .home-text h2 {
    font-size: 24px;
  }
  
  .home-text p {
    font-size: 15px;
  }
  
  .home-image img {
    aspect-ratio: 3/4;
  }
}
  
  /* ========================================================================
     Step 8: About Section
     ======================================================================== */
  .about {
    padding: 80px 0;
    background:  #0a192f;
    color: #ffffff;
  }
  .about .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .highlighted-text {
    color: #00ffff;
    text-shadow: 2px 2px 10px rgba(0, 255, 255, 0.8);
  }
  .about .content h2 {
    font-size: 28px;
    font-weight: 700;
    color: #00ffff;
  }
  .about .content ul {
    list-style: none;
    padding: 0;
  }
  .about .content ul li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
  }
  .about .content ul strong {
    margin-right: 10px;
    color: #00ffff;
  }
  .about .content ul i {
    font-size: 18px;
    margin-right: 5px;
    color: #00ffff;
    line-height: 0;
  }
  .about-img {
    width: 100%;
    max-width: 350px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 255, 255, 0.5);
  }
  @media (max-width: 1024px) {
    .about .container {
      flex-direction: column;
      text-align: center;
    }
    .about-img {
      max-width: 250px;
      margin-bottom: 20px;
    }
  }
  @media (max-width: 768px) {
    .about .content h2 { font-size: 24px; }
    .about .content ul li { font-size: 14px; }
  }
  
  /* ========================================================================
     Step 9: Skills Section
     ======================================================================== */

#skills {
  padding: 60px 0;
  background:  #0a192f;
  text-align: center;
}

#skills .section-title h2 {
  text-align: center;
  font-size: 36px;
  color: #00ffff;
  text-shadow: 2px 2px 10px rgba(0, 255, 255, 0.8);
}

#skills .section-title img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

/* Skill Titles */
.skill-title {
  font-size: 20px;
  color: #ffffff;
  margin: 30px 0 15px;
  text-align: center;
  font-weight: bold;
}

/* Technical Skills */
.tech-skills p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  padding: 10px;
}

.tech-skills a img {
  transition: transform 0.3s ease-in-out;
}

.tech-skills a img:hover {
  transform: scale(1.2);
}

/* GitHub Stats & Trophies */
.github-stats, .github-trophies {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px 0;
}

.github-stats img, .github-trophies img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  #skills {
      padding: 40px 0;
  }

  .skill-title {
      font-size: 24px;
  }

  .tech-skills p {
      gap: 10px;
  }

  .github-stats, .github-trophies {
      flex-direction: column;
      align-items: center;
  }
}

  
  /* ========================================================================
     Step 10: Education Section
     ======================================================================== */
  .education.section {
    padding: 80px 0;
   
    background: #0a192f;
    color: #ffffff;
  }

  .education .container { position: relative; z-index: 2; }
  .education .section-title h2 {
    text-align: center;
    font-size: 36px;
    color: #00ffff;
    text-shadow: 2px 2px 10px rgba(0, 255, 255, 0.8);
  }
  .education .section-title p { font-size: 18px; color: #ffffff; }
  .education .education-title {
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    margin: 20px 0;
  }
  .education .education-item {
    padding: 0 0 20px 20px;
    margin-top: -2px;
    border-left: 2px solid var(--accent-color);
    position: relative;
    color: #ffffff;
  }
  .education .education-item h4 {
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    color: #ffffff;
    line-height: 18px;
    margin-bottom: 10px;
  }
  .education .education-item h5 {
    font-size: 16px;
    display: inline-block;
    padding: 5px 15px;
    font-weight: 600;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.7);
  }
  .education .education-item ul { padding-left: 20px; }
  .education .education-item ul li {
    padding-bottom: 10px;
    color: rgba(255, 255, 255, 0.7);
  }
  .education .education-item:last-child { padding-bottom: 0; }
  .education .education-item::before {
    content: "";
    position: absolute;
    left: -9px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--background-color);
    border: 2px solid var(--accent-color);
  }
  
  /* ========================================================================
     Step 11: Portfolio Section
     ======================================================================== */
     
  .portfolio {
    --background-color: #0a192f;
    background-color: var(--background-color);
    color: #ffffff;
    padding: 60px 0;
  }
  .portfolio .section-title h2 { 
    text-align: center;
    font-size: 36px;
    color: #00ffff;
    text-shadow: 2px 2px 10px rgba(0, 255, 255, 0.8);
   }
  .portfolio .portfolio-filters {
    list-style: none;
    padding: 0;
    margin: 0 auto 20px;
    text-align: center;
  }
  .portfolio .portfolio-filters li {
    display: inline-block;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    margin: 0 10px 10px;
    transition: color 0.3s;
  }
  .portfolio .portfolio-filters li:hover,
  .portfolio .portfolio-filters li.filter-active {
    color: var(--accent-color);
  }
  .portfolio .portfolio-content {
    position: relative;
    overflow: hidden;
    background: #112240;
    border-radius: 10px;
  }
  .portfolio .portfolio-content img {
    width: 100%;
    transition: transform 0.3s;
  }
  .portfolio .portfolio-content:hover img { transform: scale(1.1); }
  .portfolio .portfolio-info {
    position: absolute;
    inset: 0;
    padding: 15px;
    background: rgba(10, 25, 47, 0.9);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 3;
    color: #ffffff;
  }
  .portfolio .portfolio-info h4 {
    font-size: 14px;
    font-weight: 400;
    padding: 5px 10px;
    background-color: var(--accent-color);
    color: #ffffff;
    display: inline-block;
  }
  .portfolio .portfolio-info p {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
  }
  .portfolio .portfolio-info .preview-link,
  .portfolio .portfolio-info .details-link {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 26px;
    line-height: 1.2;
    color: #fff;
    transition: color 0.3s;
  }
  .portfolio .portfolio-info .details-link_1 {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 26px;
    line-height: 1.2;
    color: #fff;
    transition: color 0.3s;
  }

  .portfolio .portfolio-info .preview-link { left: calc(50% - 40px); }
  .portfolio .portfolio-info .details-link {
    left: 50%;
    font-size: 34px;
  }
  .portfolio .portfolio-info .details-link_1 {
    left: 60%;
    font-size: 34px;
  }


  .portfolio:hover .portfolio-info { opacity: 1; }
  
  /* ========================================================================
     Step 12: Contact Section
     ======================================================================== */
  .contact {
    background-color: #0a192f;
    color: #ffffff;
  }

  #contact .section-title h2 {
    text-align: center;
    font-size: 36px;
    color: #00ffff;
    text-shadow: 2px 2px 10px rgba(0, 255, 255, 0.8);
  }
  #contact .info-item h3 {

    color: #ffffff;
 
  }
  .contact .info-wrap {
    padding: 30px;
    background-color: #112240;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
    border-radius: 10px;
    background: #0a192f;
  }
  .contact .info-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    
  }
  .contact .info-item i {
    width: 50px;
    height: 50px;
    font-size: 20px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
   
    border-radius: 50px;
    
  }
  .contact .info-item:hover i {
    background: #0a192f;
    box-shadow: 0 0 10px #64ffda;
    color: #ffffff;
  }
  .contact .php-email-form {
    padding: 30px;
    background: #0a192f;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
    border-radius: 10px;
  }
  .contact .php-email-form input,
  .contact .php-email-form textarea {
    padding: 10px 15px;
    font-size: 14px;
    background-color: #0a192f;
    border: 1px solid rgba(100, 255, 218, 0.5);
    color: #ffffff;
    border-radius: 5px;
  }
  .contact .php-email-form input:focus,
  .contact .php-email-form textarea:focus {
    border-color: #64ffda;
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.5);
  }
  .contact .php-email-form button {
    padding: 10px 30px;
    border: none;
    background: #64ffda;
    color: #0a192f;
    font-weight: bold;
    border-radius: 50px;
    transition: background 0.4s, box-shadow 0.4s;
  }
  .contact .php-email-form button:hover {
    background: rgba(100, 255, 218, 0.8);
    box-shadow: 0 0 10px #64ffda;
  }
  
  /* ========================================================================
     Step 13: Additional Responsive Tweaks
     ======================================================================== */
  @media screen and (max-width: 768px) {
    [data-aos-delay] { transition-delay: 0 !important; }
  }
  