* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
--sweep-duration: 640ms;
}

@font-face {
    font-family: custom;
    src: url('../fonts/custom.woff2');
}

@font-face {
    font-family: custom-regular;
    src: url('../fonts/custom-regular.woff2');
}

::-moz-selection {
    color: #fbfbfb;
    background: rgb(0, 0, 0);
}

::selection {
    color: #fbfbfb;
    background: rgb(0, 0, 0);
}

.dark-mode ::-moz-selection {
    color: rgb(0, 0, 0);
    background: #fbfbfb;
}

.dark-mode ::selection {
    color: rgb(0, 0, 0);
    background: #fbfbfb;
}

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #fbfbfb;
    font-family: custom;
    text-align: center;
    align-items: center;
}

body::-webkit-scrollbar {
    width: 0.45em;
}

body::-webkit-scrollbar-thumb {
    background-color: rgb(140, 140, 140);
}

.dark-mode {
    background: #000000;
    color: #fbfbfb;
    sweep-duration: 640ms;
}

.dark-mode h1,
.dark-mode h2,
.dark-mode a,
.dark-mode .category li {
    color: #fbfbfb;
}

h1 {
    font-size: 24px;
}

h2 {
    font-size: 20px;
}

#loader {
    position: fixed;
    width: 100%;
    height: 100%;
    background: #fbfbfb;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.dark-mode #loader {
    background: black;
}

.spinner {
    width: 65px;
    height: 65px;
    border: 4px solid #d1d0d0;
    border-top-color: black;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.dark-mode .spinner {
    border: 4px solid #636363;
    border-top-color: #fbfbfb;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.download-icon {
    height: 25px;
    vertical-align:middle;
    filter: invert(1);
    transform: rotate(180deg);
    transition-duration: 0.3s;
}

.broken-link-icon {
    height: 26px;
    vertical-align:middle;
    padding: 0px 0px 0px 10px;
}

.theme-switch {
    position: absolute;
    cursor: pointer;
    font-size: 20px;
    padding: 1px 10px 10px 10px;
    background: none;
    border: none;
    color: inherit;
    margin: 0px 0px 0px -12px;
}

.theme-switch-mobile-view {
    cursor: pointer;
    position: absolute;
    padding: 15px 2px 10px 10px;
    background: none;
    border: none;
    display: none;
}

.theme-icon {
    height: 22px;
}

p {
    font-size: 17px;
    padding: 20px 0px 0px 0px;
    text-align: justify;
    text-justify: inter-word;
    color: rgb(51, 51, 51);
    font-family: custom-regular;
}

.dark-mode p {
    color: rgb(200, 200, 200);
}

nav {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    color: black;
    font-family: custom-regular;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-mode nav {
    background: rgba(0, 0, 0, 0.1);
    color: #fbfbfb;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 78px;
}

.nav-links li {
    display: inline;
}

.nav-links li a {
    text-decoration: none;
    color: black;
    font-size: 18px;
}

.dark-mode .nav-links li a {
    color: #fbfbfb;
}

.nav-links li a:hover {
    text-decoration: underline;
}

.hamburger {
    cursor: pointer;
    padding: 10px;
    position: absolute;
    left: 20px;
    display: none;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 4.5px;
    background: none;
    border: none;
}

.hamburger-icon span {
    display: block;
    width: 22px;
    height: 2.5px;
    background-color: black;
}

.dark-mode .hamburger-icon span {
    background-color: #fbfbfb;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    transition: left 0.3s ease-in-out;
    padding-top: 60px;
    z-index: 500;
    text-align: left;
    font-family: custom-regular;
}

.dark-mode .sidebar {
    background: rgba(0, 0, 0, 0.1);
    color: #fbfbfb;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    padding: 15px 30px;
    border-bottom: 1px solid #ddd;
}

.dark-mode .sidebar ul li {
    border-bottom: 1px solid #242424;
}

.sidebar ul li a {
    text-decoration: none;
    color: black;
    font-size: 18px;
    display: block;
}

.dark-mode .sidebar ul li a {
    color: #fbfbfb;
}

.sidebar ul li a:hover {
    text-decoration: underline;
}

.sidebar.active {
    left: 0;
}

.close-btn {
    position: absolute;
    top: 2px;
    left: 20px;
    font-size: 31px;
    margin: 10px 10px 0px 0px;
    padding: 0px 10px 5px 10px;
    cursor: pointer;
}

.close-div {
    height: 20px;
}

.div-for-signature {
    margin: 0 auto;
    display: none;
}

.signature {
    height: 25px;
}

.secdevided {
    padding: 25px 0px 0px 0px;
}

.general-button {
    background-color: black;
    border: 1px solid black;
    color: #fbfbfb;
    padding: 14px 20px 14px 30px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    cursor: pointer;
    transition-duration: 0.3s;
    font-family: custom;
}

.general-button:hover {
    border: 1px solid rgb(255, 255, 255);
    filter: invert(1);
}

.dark-mode .general-button {
    filter: invert(1);
}

.dark-mode .general-button:hover {
    filter: invert(0);
    border: 1px solid rgb(255, 255, 255);

}

.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    margin-top: 80px;
    padding: 20px 50px;
}

.dp {
    border-radius: 50%;
}

.dark-mode img:not(.dp) {
    filter: invert(1);
}

.image {
    flex: 1;
    text-align: center;
    padding: 70px 0px 35px 0px;
}

.image img {
    width: 100%;
    max-width: 250px;
}

.about {
    flex: 1;
    text-align: left;
    padding: 20px 20px 20px 3px;
}

.container2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1000px;
    width: 85%;
    padding: 20px 0px 0px 0px;
}

.card-div {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f4f4f4;
    width: 1000px;
}

.card {
    background: rgb(255, 255, 255);
    border-radius: 0px;
    border: 1px solid rgb(0, 0, 0);
    box-shadow: 0px black;
    transition: box-shadow 0.3s ease-in-out, transform 0.2s;
    overflow: hidden;
    text-align: center;
    height: 300px;
    z-index: 1;
}

.card:hover {
    box-shadow: 3px 3px 0px rgb(0, 0, 0);
    transform: translate(-4px, -4px);
}

.dark-mode .card {
    background: rgb(12, 12, 12);
    border-color: #c2c2c2;
}

.dark-mode .card:hover {
    box-shadow: 3px 3px 0px #c2c2c2;
    transform: translate(-4px, -4px);
}

.card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    background-color: white;
}

#card-img-for-full-size {
    padding: 4px;
}

#card-img-for-full-size2 {
    padding: 3px;
}

.cardtitle {
    font-family: custom;
}

.uptitle {
    padding: 30px 0px 50px 0px;
    background: #ffffff;
    color: rgb(0, 0, 0);
    font-family: custom;
}

.bottitle {
    padding: 50px 0px 30px 0px;
    background: #ffffff;
    color: rgb(0, 0, 0);
}

.dark-mode .uptitle {
    background: rgb(12, 12, 12);
}

.dark-mode .bottitle {
    background: rgb(12, 12, 12);
}

.researchsec {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    width: 80%;
    max-width: 1050px;
    padding-top: 30px;
    text-align: left;
}

.dark-mode researchsec {
    color: #fbfbfb;
}

.category {
    list-style: square;
    padding: 0px 0px 20px 40px;
}

.category li {
    margin: 5px 0;
    color: #000000;
    text-decoration: none;
    font-family: custom-regular;
}

.education-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 1000px;
    margin: auto;
    padding-top: 20px;
}

.dark-mode .education-container {
    background-color: black;
}

.education-entry {
    display: flex;
    align-items: left;
    background-color: white;
    padding: 20px;
    border: 1px solid rgb(0, 0, 0);
    box-shadow: 0px black;
    border-radius: 0px;
    box-shadow: 0px #000000;
    padding-right: 50px;
    transition: box-shadow 0.3s ease-in-out, transform 0.2s;
}

.education-entry:hover {
    box-shadow: 3px 3px 0px rgb(0, 0, 0);
    transform: translate(-4px, -4px);
}

.dark-mode .education-entry {
    background: rgb(12, 12, 12);
    border-color: #c2c2c2;
}

.dark-mode .education-entry:hover {
    box-shadow: 3px 3px 0px #c2c2c2;
    transform: translate(-4px, -4px);
}

.uni_img {
    width: 170px;
    object-fit: contain;
    margin-right: 20px;
    padding: 0px 10px 0px 30px;
    text-align: center;
    align-items: center;
}

.college_img {
    width: 145px;
    object-fit: contain;
    margin-right: 50px;
    padding: 0px 5px 0px 30px;
}

.education-info-for-uni {
    flex: 1;
    padding: 0px;
}

.education-info-for-clg {
    flex: 1;
    padding: 0px 0px 0px 0px;
}

.institution_name {
    text-align: left;
    margin: 0;
}

.location,
.duration,
.degree {
    margin: 5px 0;
    font-size: 16px;
    text-align: left;
}

.duration {
    font-style: italic;
    color: #767676;
    text-align: left;
}

.dark-mode .duration {
    color: rgb(152, 152, 152);
}

/*footer design starts here*/
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fbfbfb;
    color: rgb(0, 0, 0);
    padding: 50px 50px 50px 50px;
    width: 100%;
    max-width: 1100px;
    text-align: center;
    font-family: custom;
    margin-top: auto;
}

.dark-mode .footer {
    background-color: #000000;
    color: #fbfbfb;
}

.copyright {
    padding: 0px 50px 0px 0px;
    font-family: custom-regular;
}

.social-icons {
    padding: 0px 0px 0px 0px;
    gap: 30px;
}

.social-icons a {
    padding: 2px;
}

.social-svg {
    width: 38px;
    height: 38px;
    fill: black;
    background-color: #fbfbfb;
    border: 0.1px solid rgb(126, 126, 126);
    border-radius: 0px;
    padding: 6.5px;
}

.dark-mode .social-svg {
    filter: invert(1);
}

.social-svg:hover {
    background-color: rgb(240, 240, 240);
    transition-delay: 80ms;
    border: 0.1px solid black;
}

.dark-mode .social-svg:hover {
    background-color: rgb(230, 230, 230);
    transition-delay: 80ms;
}

/*education page design starts here*/
.achievement {
    max-width: 600px;
    margin: auto;
    width: 90%;
    padding: 0px;
    background: #fbfbfb;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.dark-mode .achievement {
    background: black;
}

.scholarship {
    text-align: left;
    padding: 0px 0px 10px 0px;
    font-family: custom-regular;
}

.scholarship-info {
    text-align: left;
    color: rgb(51, 51, 51);
    font-family: custom-regular;
}

.dark-mode .scholarship-info {
    color: rgb(200, 200, 200);
}

/*404 page design starts here*/
.alert-content {
    max-width: 380px;
    margin: auto;
    width: 90%;
    padding: 0px;
    background: #fbfbfb;
    position: absolute;
    top: calc(50% - 50px);
    left: 50%;
    transform: translate(-50%, -50%);
}

.dark-mode .alert-content {
    background: black;
}

.fourofour {
    font-size: 10rem;
    font-family: custom-regular;
    text-align: center;
}

.not-found {
    font-family: custom;
    font-size: 26px;
    font-weight: bold;
    text-align: center;
    display:inline-block;
    vertical-align:middle;
}

.button-for-404 {
    display: flex;
    justify-content: center;
    padding: 0px 0px 10px 0px;
}

.p-for-404 {
    text-align: center;
    text-align: none;
    padding: 0px 0px 10px 0px;
}

/*contact page design starts here*/
.main-content {
    position: relative;
    width: 100vw;
    height: 100vh;
}

.contact-form {
    max-width: 365px;
    margin: auto;
    width: 90%;
    padding: 20px;
    background: #fbfbfb;
    border: 1px solid black;
}

.dark-mode .contact-form {
    background: black;
    color: #fbfbfb;
    border: 1px solid #fbfbfb;
}

.h2-for-contact {
    color: rgb(0, 0, 0);
    font-family: custom-regular;
}

.p-for-contact-form {
    text-align: center;
    font-family: custom-regular;
}

.secdiv2 {
    padding: 10px 0px 10px 0px;
}

.button-for-contact {
    width: calc(100% - 20px);
    margin: 12px 0 10px;
    padding: 10px;
    background: white;
    border: 1px solid white;
    color: black;
    cursor: pointer;
    transition: all .3s ease;
    font-size: 16px;
    filter: invert(1);
}

.send-icon {
    height: 25px;
    vertical-align:middle;
    transform: rotate(0deg);
    transition-duration: 0.3s;
}

.button-for-contact:hover {
    border: 1px solid black;
    filter: invert(0);
}

.dark-mode .button-for-contact {
    border: 1px solid black;
    background: black;
    color: white;
    filter: invert(1);
}

.dark-mode .button-for-contact:hover {
    border: 1px solid white;
    background: black;
    color: white;
    filter: invert(0);
}

input {
    width: calc(100% - 20px);
    margin: 8px 0;
    padding: 10px;
    font-size: 16px;
    background-color: transparent;
    border: 1px solid black;
    font-family: custom-regular;
    color: back;
}

.dark-mode input {
    color: #fbfbfb;
    border: 1px solid white;
}

textarea {
    width: calc(100% - 20px);
    margin: 8px 0 10px;
    padding: 10px;
    font-size: 16px;
    background-color: transparent;
    border: 1px solid #000000;
    font-family: custom-regular;
    color: back;
    resize: vertical;
    min-height: 110px;
    max-height: 200px;
    font-family: custom-regular;
    color: black;
}

.dark-mode textarea {
    color: #fbfbfb;
    border: 1px solid white;
}

.h-captcha {
    data-theme: dark;
}

input:focus {
    border-color: black;
    outline: none;
}

textarea:focus {
    border-color: black;
    outline: none;
}

.dark-mode input:focus {
    border-color: #fbfbfb;
    outline: none;
}

.dark-mode textarea:focus {
    border-color: #fbfbfb;
    outline: none;
}

.h-captcha {
  width: 100% !important;   /* expand to same width as input */
  max-width: 100% !important;
  display: block;
  margin: 0 auto;
}

/*submitted page design starts here*/
.contact-update-icon {
    width: 130px;
    padding: 0px 0px 15px 0px;
}

.dark-mode .contact-update-icon {
    filter: invert(0) !important;
}

.success-text {
    font-family: custom-regular;
    text-align: center;
    padding: 0px 0px 10px 0px;
    color: #00b55b;
}

.alert-text {
    font-family: custom-regular;
    text-align: center;
    padding: 0px 0px 10px 0px;
    color: #FFC300;
}

.failed-text {
    font-family: custom-regular;
    text-align: center;
    padding: 0px 0px 10px 0px;
    color: #FF4F4F;
}

.dark-mode .success-text {
    color: #00b55b;
}

.dark-mode .alert-text {
    color: #FFC300;
}

.dark-mode .failed-text {
    color: #FF4F4F;
}

/*projects css starts here */
.check-out {
    margin-top: 35px;
}

.check-out-button {
    background-color: #fbfbfb;
    border: 1px solid black;
    color: #000000;
    padding: 12px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    cursor: pointer;
    transition-duration: 0.3s;
    font-family: custom;
    font-weight: bold;
}

.check-out-button:hover {
    color: #fbfbfb;
    background-color: #000000;
}

.dark-mode .check-out-button {
    background-color: #fbfbfb;
    border: 1px solid #fbfbfb;
    color: #000000;
}

.dark-mode .check-out-button:hover {
    background-color: #000000;
    color: #fbfbfb;
}


.link-for-checkout {
    text-decoration: none;
}

.link-for-checkout:hover {
    text-decoration: underline;
    color: black;
}

.for-project-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #5b5b5b;
}

.dark-mode {
    background-color: black;
    color: white;
}

.container-for-projects {
    width: 1000px;
    max-width: 95%;
    background: #fbfbfb;
    padding: 20px;
    display: flex;
    justify-content: center;

    /* have to remove css after this if full page has lists*/
    position: relative;
    width: 100vw;
    height: 100vh;
}

.dark-mode .container-for-projects {
    background: black;
}

.list-wrapper {
    text-align: left;
    padding-left: 20px;

    /* have to remove css after this if full page has lists*/
    max-width: 1000px;
    margin: auto;
    width: 100%;
    /*padding: 0px 0px 0px 40px;*/
    background: #fbfbfb;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.dark-mode .list-wrapper {
    background: black;
}

.list-wrapper ul {
    list-style-type: square;
    list-style-position: inside;
    padding: 0;
    margin: 0;
}

.list-wrapper li {
    padding: 10px;
    font-size: 18px;
}

.list-wrapper li:last-child {
    border-bottom: none;
}

.container-for-projects {
    list-style: square;
    padding: 0px 0px 0px 20px;
}

.container-for-projects li {
    margin: 5px 0;
    color: black;
    text-decoration: none;
    font-family: custom-regular;
}

.container-for-projects li a {
    color: black;
    text-decoration: underline;
}

.container-for-projects li a:hover {
    text-decoration: none;
}


.dark-mode .container-for-projects li a {
    color: #fbfbfb;
}

.dark-mode .container-for-projects li {
    margin: 5px 0;
    color: #fbfbfb;
    text-decoration: none;
    font-family: custom-regular;
}

/*experience page starts here*/
.xp-list {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: grid;
    gap: 14px;
    width: 1020px;
    text-align: left;
  }

  .xp-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 25px 20px;
    margin: 0px 10px;
    border: 1px solid rgb(0, 0, 0);
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
  }

    .xp-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex: 1;
    min-width: 0;
  }

  .dark-mode .xp-item {
    background: rgb(12, 12, 12);
    border-color: #c2c2c2;
  }

  .xp-item:hover {
    box-shadow: 2px 2px 0px rgb(0, 0, 0);
    transform: translate(-4px, -4px);
  }

  .dark-mode .xp-item:hover {
    box-shadow: 2px 2px 0px #c2c2c2;
    transform: translate(-4px, -4px);
  }


  .xp-num {
    font-family: custom-regular;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    width: 2.4ch;
    text-align: right;
    flex-shrink: 0;
  }

  .dark-mode .xp-num {
    color: #9ca3af;
  }

  .xp-headline {
    font-family: custom-regular;
    font-size: 17px;
    font-weight: 500;
    color: black;
    flex: 1;
    min-width: 0;
    word-break: break-word;
  }
  
  .dark-mode .xp-headline {
      color: white;
  }

  .xp-actions {
    display: inline-flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
    padding: 0px 15px 0px 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  }

  .xp-btn {
    appearance: none;
    border: 1px solid #000000;
    background-color: #000000;
    padding: 12px 18px;
    font-family: custom;
    font-weight: 500;
    font-size:14px;
    color: #ffffff;
    cursor: pointer;
    transition-duration: 0.3s;
    white-space: nowrap;

  }

  .xp-btn:hover {
    background-color: #fff;
    color: #000000;
 }

 .dark-mode .xp-btn {
    border: 1px solid #fbfbfb;
    background-color: #fbfbfb;
    color: #000000;
  }

  .dark-mode .xp-btn:hover {
    background-color: #000000;
    color: #fbfbfb;
  }

  .view-full {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  }

  .xp-btn:active { transform: translateY(1px); }

  /* Modal (native <dialog>) */
  dialog.modal {
  width: min(1000px, 94vw);
  border: none;
  padding: 0;
  overflow-y: auto; /* allow scrolling */
  max-height: 90vh; /* prevent it from exceeding screen */
  box-shadow: 0 15px 45px rgba(0,0,0,.25);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.dark-mode dialog.modal {
    box-shadow: 0 15px 45px rgba(255, 255, 255, 0.22);
}

  dialog::backdrop { backdrop-filter: blur(5px);}

  .dark-mode dialog::backdrop { background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(5px);}

  .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 30px;
    border: 0px 0px 1px 0px solid #777777;
    background: #ffffff;
    position: sticky;
    top: -1px;
  }

  .dark-mode .modal-header {
    background: #000000;
    /*border-bottom: 1px solid #444444;*/
  }

  .modal-title {
    font-family: custom-regular;
    font-size: 16px;
    font-weight: 400;
    color: #000000;
  }

    .dark-mode .modal-title {
        color: white;
    }
  .modal-close {
    appearance: none;
    border: none;
    background: #000000;
    color: #ffffff;
    width: 34px; height: 34px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: 1px solid #000000;
    transition-duration: 0.3s;
  }

  .modal-close:hover {
    filter: invert(1);
    border: 1px solid white;
  }

  .dark-mode .modal-close {
    filter: invert(1);
  }

.dark-mode .modal-close:hover {
    filter: invert(0);
  }

    /* === Close button style for full view === */
.full-image .close-btn-for-full-view {
  position: absolute;
  top: 20px;          /* adjust vertical offset as you like */
  right: 20px;        /* right side of the modal */
  background: rgba(0,0,0,0.4);
  border: none;
  color: #fff;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 20px;
  z-index: 3;         /* above the image and arrows */
  line-height: 1;
}
.full-image .close-btn-for-full-view:hover {
  background: rgba(0,0,0,0.65);
}

  .modal-body {
    padding: 30px;
    background: #f0f0f3;
  }

  .dark-mode .modal-body {
    background: #121212;
  }

  /* Gallery grid */
  .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
  }
  .gallery figure {
    margin: 0;
    background: #fff;
    border: 1px solid #000000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .dark-mode .gallery figure {

    border: 1px solid #ffffff;
  }
  .gallery img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }
  .gallery button {
    padding: 15px;
    border: 1px solid #000;
    background: #000;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    font-family: custom-regular;
    transition-duration: 0.3s;
  }

  .gallery button:hover {
    background: #ffffff;
    color: rgb(0, 0, 0);
  }

  .dark-mode .gallery button{
    background: #ffffff;
    border: 1px solid #fbfbfb;
    color: #000000;
  }

  .dark-mode .gallery button:hover{
    background: #000000;
    color: #ffffff;
  }

/* Full image modal */
dialog.full-image {
  max-width: 100vw;
  max-height: 100vh;
  border: none;
  padding: 0;
  overflow: hidden;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  position: fixed;
}
dialog.full-image img {
  width: 100%;
  height: auto;
  display: block;
}
dialog.full-image .modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
}






.full-image .nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  border: none;
  color: #fff;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 20px;
  z-index: 2;
}
.full-image .nav-btn:hover {
  background: rgba(0,0,0,0.65);
}
.full-image .prev-btn { left: 10px; }
.full-image .next-btn { right: 10px; }








.dark-mode .gallery img,
.dark-mode .gallery picture img,   /* in case you use <picture> */
.dark-mode dialog.full-image img,
.dark-mode #full-image-viewer img,
.dark-mode dialog.modal img {
  /* Cancel parent filter so XP images look normal */
  filter: none !important;
  -webkit-filter: none !important;
}

/* Small screens: full width with margin 10px */

@media (max-width: 1400px) {
  dialog.full-image {
    width: calc(65% - 20px);
    max-width: calc(65% - 20px);


    top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  }
  dialog.full-image img {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 1000px) {
  dialog.full-image {
    width: calc(80% - 20px);
    max-width: calc(80% - 20px);


    top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  }
  dialog.full-image img {
    width: 100%;
    height: auto;
  }
}


@media (max-width: 850px) {
  dialog.full-image {
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);


    top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  }
  dialog.full-image img {
    width: 100%;
    height: auto;
  }
}

  /* Small screens */
  @media (max-width: 550px) {
    .xp-item {
      flex-direction: column;
      align-items: flex-start;
    }
    .xp-header {
      width: 100%;
    }
    .xp-actions {
      width: 100%;
      margin-top: 5px;
      margin-left: 14px;
    }
  }

  /* Buttons vertical between 551px and 700px */
  @media (min-width: 551px) and (max-width: 700px) {
    .xp-actions {
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
    }
    .xp-btn {
      width: 100%;
    }
  }

  @media (max-width: 1020px) {
.xp-list {
    width: 98%;
    }
}

#secdevided-for-mobile {
    display: none;
}

.project-cards-for-mobile-view {
    display: none;
}

@media (max-width: 1400px) {
    .container-for-projects {
        max-width: 95%;
    }
}

@media (max-width: 1095px) {
    .nav-links {
        gap: 70px;
    }

    .list-wrapper {
        padding: 0px;
    }

    .container-for-projects {
        max-width: 90%;
    }
}

@media (max-width: 1010px) {
    .nav-links {
        gap: 60px;
    }
}

@media (max-width: 960px) {
    .nav-links {
        gap: 55px;
    }

    .container-for-projects {
        max-width: 95%;
    }
}

@media (max-width: 920px) {
    .nav-links {
        gap: 48px;
    }

    .education-entry {
        margin-left: 20px;
        margin-right: 20px;
        align-content: center;
    }
}

@media (max-width: 890px) {
    .nav-links {
        gap: 40px;
    }
}

@media (max-width: 840px) {
    nav {
        justify-content: space-between;
        padding: 15px;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    }

    .dark-mode nav {
        box-shadow: 2px 0 5px rgba(255, 255, 255, 0.3);
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .div-for-signature {
        display: inline;
    }

    .theme-switch {
        display: none;
    }

    .theme-switch-mobile-view {
        font-size: 22px;
        cursor: pointer;
        position: absolute;
        right: 20px;
        display: inline;
    }
}

@media (max-width: 780px) {
    .header_align {
        text-align: left;
    }

    .cardtitle {
        padding: 10px 0px 0px 0px;
    }

    .container {
        flex-direction: column;
        text-align: center;
        width: 90%;
        padding: 0;
        margin-top: 50px;
    }

    .about {
        text-align: center;
    }

    .education-entry {
        margin-left: 20px;
        margin-right: 20px;
        align-content: center;
    }

    .container-for-projects {
        max-width: 95%;
    }
}

@media (max-width: 615px) {
    .footer {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 10px;
    }

    .copyright {
        order: -1;
        padding-top: 30px;
        padding-bottom: 30px;
        padding-right: 0px;
        text-align: center;
        width: 100%;
    }

    .social-icons {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
        padding-bottom: 15px;
        padding-right: 0px;
    }
}

@media (max-width: 600px) {
    .education-entry {
        flex-direction: column;
        padding: 25px;
        margin-left: 20px;
        margin-right: 20px;
        text-align: left;
        align-content: left;
    }

    .uni_img {
        width: 130px;
        padding: 0px;
        margin: 0 0 5px 0;
        text-align: center;
        align-items: center;
    }

    .college_img {
        width: 100px;
        padding: 0px;
        margin: 0 0 5px 0;
    }

    .institution_name {
        padding-top: 20px;
    }

    .institution_name,
    .location,
    .duration,
    .degree {
        padding-left: 0px;
    }
}

@media (max-width: 450px) {
    .contact-form {
        padding: 20px 15px 20px 15px;
    }

    #secdevided-for-mobile {
        display: block;
    }
}

@media (max-width: 454px) {
    .education-entry {
        display: flex;
        align-items: center;
    }
}

@media (max-width: 375px) {
    .social-icons {
        gap: 7px;
    }

    .h-captcha {
    transform: scale(0.85);   /* shrink proportionally */
    transform-origin: 0 0;    /* anchor to left */
  }
}

@media (max-width: 355px) {
    .social-icons {
        gap: 5px;
    }
}