@media (max-width: 600px) {
  section {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 120px !important;
    margin: 0 !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    overflow-wrap: break-word !important;
    word-break: break-all !important;
    white-space: normal !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
/* -----------------------
  CARD GRID & CARD STYLES
------------------------*/
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  margin: 32px 0 0 0;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.18);
  border-radius: 16px;
  box-shadow: 0 4px 24px 0 rgba(31, 38, 135, 0.10), 0 1.5px 8px rgba(0,0,0,0.08);
  border: 1.5px solid rgba(255,255,255,0.22);
  padding: 32px 18px 22px 18px;
  text-align: center;
  color: #1d1c1c;
  text-decoration: none;
  transition: box-shadow 0.3s, transform 0.3s, background 0.3s;
  position: relative;
  overflow: hidden;
  min-height: 180px;
}


/* Colorful, animated, original icons for cards */
.card i {
  margin-bottom: 18px;
  font-size: 2.6em;
  background: linear-gradient(135deg, #00c6ff 0%, #ffb86c 40%, #43e97b 70%, #38f9d7 100%);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(0,198,255,0.18)) drop-shadow(0 1px 4px #ffb86c44);
  animation: iconColorPulse 3.5s ease-in-out infinite alternate;
  transition: filter 0.3s, transform 0.3s;
}

@keyframes iconColorPulse {
  0% {
    filter: drop-shadow(0 2px 8px rgba(0,198,255,0.18)) drop-shadow(0 1px 4px #ffb86c44);
    transform: scale(1) rotate(-2deg);
  }
  50% {
    filter: drop-shadow(0 4px 16px #43e97b88) drop-shadow(0 2px 8px #38f9d7aa);
    transform: scale(1.12) rotate(6deg);
  }
  100% {
    filter: drop-shadow(0 2px 8px #00c6ff88) drop-shadow(0 1px 4px #ffb86c44);
    transform: scale(1) rotate(-2deg);
  }
}

.card-title {
  font-size: 1.18rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #222;
}

.card-desc {
  font-size: 0.98rem;
  color: #444;
  margin-bottom: 0;
}

.card:hover, .card:focus {
  background: linear-gradient(120deg, #00c6ff22 0%, #0072ff22 100%);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18), 0 3px 16px rgba(0,198,255,0.10);
  transform: translateY(-6px) scale(1.03);
}

.card:hover i, .card:focus i {
  filter: drop-shadow(0 6px 24px #00c6ffcc) drop-shadow(0 2px 8px #ffb86c99);
  transform: scale(1.18) rotate(-8deg);
  background: linear-gradient(135deg, #ffb86c 0%, #00c6ff 40%, #43e97b 70%, #38f9d7 100%);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .card {
    padding: 22px 8px 16px 8px;
    min-height: 120px;
  }
  .card-title {
    font-size: 1.05rem;
  }
}
    /* -----------------------
  GLOBAL STYLES
------------------------*/

/* General body settings: font, background image, colors */
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  /* Modern, colorful, IT-inspired background */
  background-image:
    linear-gradient(120deg, rgba(34,193,195,0.32) 0%, rgba(253,187,45,0.18) 100%),
    url('../images/background2.png'),
    url('../images/background3.jpeg');
  background-color: #0e1a2b;
  background-size: cover, cover, cover;
  background-blend-mode: lighten, overlay, normal;
  background-attachment: fixed;
  color: #f3f6fa;
  min-height: 100vh;
  animation: bodyFadeIn 1.2s cubic-bezier(0.23, 1, 0.32, 1);
  text-shadow: 0 1px 6px rgba(0,0,0,0.18);
}

@keyframes bodyFadeIn {
  from { opacity: 0; filter: blur(8px); }
  to { opacity: 1; filter: blur(0); }
}

/* Transparent overlay background for entire content */
.overlay {
  background-color: rgba(0, 0, 0, 0.4);
  padding: 20px;
  min-height: 100vh;
}

/* Headings inside sections */
h2 {
  color: #c9c1c1;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
  border-bottom: 5px solid #1a1a1a;
  padding-bottom: 10px;
}


/* -----------------------
  HEADER STYLES
------------------------*/

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 48px 28px 48px;
  margin-top: 100px;
  background: rgba(34, 40, 49, 0.45);
  border-radius: 24px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18), 0 1.5px 8px rgba(0,0,0,0.10);
  border: 1.5px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  z-index: 100;
}

header h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px 0;
  letter-spacing: 1.5px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.18), 0 1.5px 8px rgba(0,198,255,0.10);
}

header h3 {
  font-size: 1.25rem;
  font-weight: 500;
  color: #e0e0e0;
  margin: 0 0 12px 0;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.12);
}

header img.profile-pic {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin: 18px 0 0 0;
  border: 4px solid #fff;
  box-shadow: 0 4px 24px 0 rgba(31, 38, 135, 0.13);
  background: #222;
}


/* -----------------------
  NAVIGATION
------------------------*/

/* Main navigation container */
nav {
  position: absolute;
  top: 20px;
  right: 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(30, 30, 30, 0.25);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  border-radius: 18px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  padding: 8px 24px;
  animation: navSlideDown 1s cubic-bezier(0.23, 1, 0.32, 1);
}

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

/* Nav links and dropdown buttons */
nav a,
.dropbtn {
  color: white;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: none;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
}

/* Hover and active styles */
nav a:hover,
.dropbtn:hover {
  background: linear-gradient(90deg, #00c6ff 0%, #0072ff 100%);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,198,255,0.15);
  transform: translateY(-2px) scale(1.07);
}

nav a.active,
.dropbtn.active {
  font-weight: bold;
}

/* Dropdown positioning */
.dropdown {
  display: inline-block;
  position: relative;
}


.dropdown-content {
  display: none;
  position: absolute;
  background: rgba(44, 62, 80, 0.95);
  min-width: 200px;
  box-shadow: 0px 8px 32px rgba(0, 0, 0, 0.25);
  z-index: 1;
  border-radius: 10px;
  top: 100%;
  left: 0;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.23, 1, 0.32, 1), transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}
.show {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.dropdown-content a {
  color: #fff;
  padding: 12px 18px;
  font-size: 15px;
  text-decoration: none;
  display: block;
  border-radius: 6px;
  transition: background 0.25s, color 0.25s, transform 0.2s;
}

.dropdown-content a:hover {
  background: linear-gradient(90deg, #00c6ff 0%, #0072ff 100%);
  color: #fff;
  transform: translateX(4px) scale(1.04);
}


/* -----------------------
  SECTION STYLES
------------------------*/

/* Section containers */
section {
  display: block;
  width: auto;
  max-width: 100%;
  min-width: 0;
  margin: 18px 0;
  padding: 32px 32px 32px 32px;
  box-sizing: border-box;
  border-radius: 16px;
  overflow: visible;
  font-size: 1.05em;
  background: linear-gradient(120deg, rgba(255,255,255,0.82) 0%, rgba(173,216,230,0.22) 50%, rgba(255,182,193,0.22) 100%);
  box-shadow: 0 4px 24px 0 rgba(31, 38, 135, 0.10);
  border: 2px solid transparent;
  transition: box-shadow 0.3s, transform 0.3s, background 1.2s linear;
  animation: sectionGradientMove 8s ease-in-out infinite alternate;
  word-break: break-word;
  white-space: normal;
  color: #1a2233;
  text-shadow: 0 1px 8px rgba(0,0,0,0.10);
}


@keyframes sectionGradientMove {
h2 {
  color: #1a9fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.22), 0 1.5px 8px rgba(0,198,255,0.10);
  border-bottom: 5px solid #1a1a1a;
  padding-bottom: 10px;
}
}


section:hover, section:focus-within {
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18), 0 0 0 4px #aee1f9;
  transform: scale(1.015) translateY(-2px);
  border: 2px solid #aee1f9;
  background: linear-gradient(120deg, rgba(255,255,255,0.9) 0%, rgba(135,206,250,0.25) 50%, rgba(255,182,193,0.25) 100%);
  transition: box-shadow 0.2s, transform 0.2s, background 0.7s;
}

section:active {
  transform: scale(0.98) translateY(1px);
  box-shadow: 0 2px 8px 0 rgba(31, 38, 135, 0.10);
  border: 2px solid #ffb6b9;
}

/* Section style override for intro section */
section.intro {
  color: #fff;
  background: rgba(0, 0, 0, 0.32);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18), 0 1.5px 8px rgba(0,0,0,0.10);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
}


/* -----------------------
  CONTACT SECTION
------------------------*/

#contact {
  background-color: rgba(78, 73, 73, 0.3);
  padding: 40px;
  border-radius: 16px;
  margin: 80px auto 60px auto;
  max-width: 800px;
  box-shadow: 0 0 20px rgba(14, 30, 209, 0.1);
}

#contact form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#contact input,
#contact textarea {
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  background-color: #1e1e1e;
  color: #fff;
  font-size: 1rem;
  outline: none;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.5);
}

#contact button {
  padding: 12px;
  background-color: #00aaff;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.2s ease;
}

#contact button:hover {
  background-color: #008fcc;
  transform: scale(1.03);
}

/* -----------------------
   LINKEDIN ALLIGMENT
------------------------*/
.linkedin-icon-wrapper {
  text-align: center;
  margin-top: 20px;
}

/* -----------------------
  DOWNLOAD RESUME BUTTON
------------------------*/

.download-btn {
  display: inline-block;
  padding: 4px 10px;
  background-color: #48484b;
  font-weight: bold;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  margin-top: 0;
}

.download-btn:hover {
  background-color: #4a8a7b;
  transform: scale(1.05);
}


/* -----------------------
  NESTED DROPDOWNS
------------------------*/

.nested-dropdown {
  position: relative;
}

.nested-dropdown > span {
  display: block;
  padding: 12px 16px;
  cursor: pointer;
  white-space: nowrap;
  color: #f0f0f0;
}

.nested-dropdown-content {
  display: none;
  position: absolute;
  right: 100%;
  top: 0;
  background-color: #353333;
  min-width: 200px;
  box-shadow: 0px 8px 16px rgba(248, 247, 247, 0.2);
  z-index: 1;
}

.nested-dropdown:hover .nested-dropdown-content {
  display: block;
}

.nested-dropdown-content a {
  padding: 12px 16px;
  display: block;
  text-decoration: none;
  color: white;
}

.nested-dropdown-content a:hover {
  background-color: #070707;
}


/* -----------------------
  FOOTER
------------------------*/

footer {
  text-align: center;
  padding: 20px;
  background-color: #1a1a1a;
  color: white;
  margin-top: 40px;
}


/* -----------------------
  PROJECT LISTING
------------------------*/

.projects ul {
  padding-left: 20px;
}

.projects li {
  margin-bottom: 10px;
}

@media screen and (max-width: 768px) {
  /* Nested dropdowns: force downward, full width, and visible on mobile */
  .nested-dropdown-content {
    position: absolute !important;
    left: 24vw !important;
    right: auto !important;
    top: 100% !important;
    min-width: 160px !important;
    width: 70vw !important;
    max-width: 90vw !important;
    z-index: 100001 !important;
    background: #353333 !important;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.18);
    border-radius: 8px;
    overflow-x: auto;
    display: block !important;
  }
}

@media screen and (max-width: 480px) {
  .nested-dropdown-content {
    left: auto !important;
    right: 100% !important;
    max-width: 70vw !important;
  }
}
@media screen and (max-width: 768px) {
  /* Prevent horizontal scroll and center background */
  html, body {
    width: 100vw;
    max-width: 100vw;
    min-width: 0;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  body {
    background-position: center center !important;
    background-size: cover !important;
    padding-left: 0;
    padding-right: 0;
    font-size: 14px;
  }


      /* Modern glassmorphism header for mobile */
      header {
        margin: 16px 8px 24px 8px;
        padding: 20px 12px 18px 12px;
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.18);
        box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1.5px solid rgba(255, 255, 255, 0.25);
        flex-direction: column;
        align-items: center;
        text-align: center;
        transition: background 0.3s, box-shadow 0.3s;
        z-index: 1002;
      }


      header h1 {
        font-size: 1.5em;
        font-weight: 700;
        letter-spacing: 1.5px;
        color: #222;
        text-shadow: 0 2px 8px rgba(0,0,0,0.08);
        margin-bottom: 6px;
        text-align: center;
      }
      header h3 {
        font-size: 1.05em;
        font-weight: 400;
        color: #444;
        margin-bottom: 10px;
        text-align: center;
        font-size: 18px;
      }


      header img.profile-pic {
        width: 90px;
        height: 90px;
        border-radius: 50%;
        border: 2.5px solid rgba(255,255,255,0.7);
        box-shadow: 0 4px 16px 0 rgba(31, 38, 135, 0.12);
        margin: 10px 0 14px 0;
        object-fit: cover;
        background: #fff;
      }

      /* Navigation to stack vertically */
      nav {
        margin-bottom: 20px;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        position: relative;
        padding: 10px 32px 10px 16px;
        gap: 10px;
        overflow-x: visible; /* Allow dropdowns to overflow nav */
        width: 100vw;
        max-width: 100vw;
        min-width: 0;
        box-sizing: border-box;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
        z-index: 99999 !important;
      }

      .dropdown-content {
        position: absolute !important;
        left: 0 !important;
        right: auto !important;
        min-width: 160px !important;
        max-width: 90vw !important;
        z-index: 100000 !important;
      }

      nav::-webkit-scrollbar {
        height: 6px;
        background: #eee;
      }
      nav::-webkit-scrollbar-thumb {
        background: #bbb;
        border-radius: 3px;
      }

      nav a,
      .dropbtn {
        font-size: 14px;
        padding: 10px 16px;
        white-space: nowrap;
      }


/* Animated, colorful, interactive sections for all views */
section {
  display: block;
  width: auto;
  max-width: 100%;
  min-width: 0;
  margin: 18px 0;
  padding: 32px 32px 32px 32px;
  box-sizing: border-box;
  border-radius: 16px;
  overflow: visible;
  font-size: 1.05em;
  background: linear-gradient(120deg, rgba(34,40,49,0.97) 0%, rgba(30,60,90,0.93) 100%);
  box-shadow: 0 4px 24px 0 rgba(31, 38, 135, 0.10);
  border: 2px solid transparent;
  transition: box-shadow 0.3s, transform 0.3s, background 1.2s linear;
  animation: sectionGradientMove 8s ease-in-out infinite alternate;
  word-break: break-word;
  white-space: normal;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.38), 0 1.5px 8px rgba(0,198,255,0.10);
}

      @keyframes sectionGradientMove {
        0% {
          background-position: 0% 50%;
        }
        100% {
          background-position: 100% 50%;
        }
      }

      section:hover, section:focus-within {
        box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18), 0 0 0 4px #aee1f9;
        transform: scale(1.015) translateY(-2px);
        border: 2px solid #aee1f9;
        background: linear-gradient(120deg, rgba(255,255,255,0.9) 0%, rgba(135,206,250,0.25) 50%, rgba(255,182,193,0.25) 100%);
        transition: box-shadow 0.2s, transform 0.2s, background 0.7s;
      }

      section:active {
        transform: scale(0.98) translateY(1px);
        box-shadow: 0 2px 8px 0 rgba(31, 38, 135, 0.10);
        border: 2px solid #ffb6b9;
      }

      #contact {
        padding: 20px;
        margin: 20px 10px;
      }

      .download-btn {
        font-size: 14px;
        padding: 6px 12px;
      }
    }

/* Force all main text, headings, and card text to pure white for maximum readability */
body, section, h2, .card-title, .card-desc {
  color: #fff !important;
}