:root {
    --color-white: #fff;
    --color-black: #000;
    --color-text-muted: #ababab;
    --color-text-dim: #4d4d4d;
    --color-nav-inactive: #929292;
}
* {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}
body {
    background: #000000;
    overflow-x: hidden;
}
#load {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    z-index: 100;
}
.no-highlight {
    -webkit-touch-callout: none; 
    -webkit-user-select: none; 
    -khtml-user-select: none; 
    -moz-user-select: none; 
    -ms-user-select: none; 
    user-select: none; 
    cursor: default;
  }
/* ----------header---------- */
.background {
    width: 100%;
    height: 100vh;
    top: 0;
    background-image: url(images/background.jpg);
    background-size: cover;
    background-position: center;
    position: sticky;
    z-index: -2;
}
.container {
    padding: 0 10%;
}
.header-text h1 {
    font-size: 3.75rem; 
    color: #080808;
    text-shadow: 0.1em 0.1em 0.25em rgba(0,0,0,0.2),
    0.3125em 0.3125em 4.375em rgba(255, 255, 255, 0.5); 
}
.header-text {
    position: absolute;
    top: 30%;
    font-size: 1.875em; 
    color: #353535;
    text-shadow: 0.1em 0.1em 0.25em rgba(0,0,0,0.2),
    0.3125em 0.3125em 4.375em rgba(255, 255, 255, 0.5); 
}

/* ----------navigation bar---------- */
nav {
    background-color: rgba(17, 17, 17, 0.9);
    box-shadow: 0 0 0.625em rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3.125em);
    -webkit-backdrop-filter: blur(3.125em);
    border-bottom-left-radius: 2.5em;
    border-bottom-right-radius: 0.3em;
    display: flex;
    align-items: center;
    position: sticky;
    justify-content: flex-end;
    top: 0;
    z-index: 2;
}
nav ul li {
    display: inline-block;
    list-style: none;
    margin: 0.625em 1.25em;
}
nav ul li a {
    font-size: 1.125em;
    position: relative;
    cursor: pointer;
    text-shadow: 0.125em 0.125em 0.3125em rgba(0,0,0,0.2),
    0.3125em 0.3125em 4.375em rgba(0, 0, 0, 0.5);
    transition: 0.3s;
}

/* ----------about---------- */
#about {
    margin-top: -2.5625em;
    background: #000000;
    padding-top: 4.9em;
    padding-bottom: 5%;
    color: var(--color-text-muted);
    position: relative;
}
.hide {
    position: absolute;
    background: rgb(0, 0, 0);
    width: 100%;
    height: 101%;
    top: 0;
    bottom: 0;
    z-index: -1;
}
.row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}
.about-col-1 {
    align-self: center;
    flex-basis: 35%;
}
.about-col-1 img {
    width: 100%;
    border-radius: 0.9375em;
    box-shadow: -0.375em 0.375em 0.375em rgba(88, 88, 88, 0.4);
}
.about-col-2 {
    flex-basis: 60%;
    overflow-x: auto;
}
.sub-title {
    font-size: 3.75em;
    font-weight: bold;
    color: var(--color-white);
}
.tab-titles {
    display: flex;
    margin: 1.25em 0 1.8em;
}
.tab-links {
    margin-right: 3.125em;
    font-size: 1.125em;
    font-weight: 500;
    color: var(--color-white);
    cursor: pointer;
    position: relative;
}
.tab-links::after {
    content: '';
    width: 0;
    height: 0.1875em;
    background: #858585;
    position: absolute;
    left: 0;
    bottom: -0.5em;
    transition: 0.5s;
}
.tab-links.active-link::after {
    width: 50%;
}
.tab-content {
    display: flex;
}
.tab-pane {
    display: block;
    visibility: hidden;
    margin-right: -100%;
    width: 100%;
}
.tab-pane.active-tab {
    visibility: visible;
}
.tab-pane ul li {
    margin: 0.625em 0;
}
.tab-pane ul li span {
    color: var(--color-text-dim);
    font-size: 0.875em;
}

/* ----------projects---------- */
#projects {
    padding: 3.125em 0;
    background: linear-gradient(0deg, #1d1d1d, #000000);
    position: relative;
}
.work-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(46.1%, 1fr));
    grid-gap: 2.5em;
    margin-top: 3.125em;
}
.work {
    border-radius: 0.625em;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0.5em 1.5em rgba(56, 56, 56, 0.6);
    transition: 1s;
    aspect-ratio: 1.35/1;
    z-index: 1;
}
.work img {
    border-radius: 0.625em;
    width: 100%;
    overflow: hidden;
    height: 100%;
    display: block;
    transition: all 0.6s ease-in-out;
}
.layer {
    opacity: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.6), #000000);
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 10% 10%;
    text-align: center;
    font-size: 0.9375em;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: opacity 0.3s ease-in-out;
}
.layer h3 {
    font-weight: bold;
    font-size: 1.125em;
    margin-bottom: 10%;
    color: var(--color-white);
}
.view {
    margin-top: 60%;
    font-size: 0.9375em;
    font-weight: bold;
    color: var(--color-text-dim);
    cursor: pointer;
    position: absolute;
}
.view::after {
    content: '';
    width: 0;
    height: 0.1875em;
    background: var(--color-text-dim);
    position: absolute;
    left: 0;
    bottom: -0.375em;
    transition: 0.6s;
}
.view:hover::after {
    width: 100%;
}


/* ----------project modals------------ */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 1s ease;
}
.modal {
    position: fixed;
    overflow: hidden;
    width: 100%;
    height: 100dvh;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: top 0.6s ease-out;
}
.modal-content {
    background: radial-gradient(#242527, #0d0d0d);
    padding: 0;
    width: 100%;
    position: relative;
    box-shadow: 0 0 0.625em rgba(0, 0, 0, 0.3);
    overflow: hidden;
    height: 100%;
}
.close-btn {
    position: absolute;
    top: 0.9em;
    right: 0.9em;
    width: 2em;
    height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #8a8a8a;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
    z-index: 7;
}
.close-btn:hover {
    color: var(--color-white);
    background-color: rgba(255, 255, 255, 0.08);
}
.close-btn.clicked {
    transform: scale(0.85);
}
.close-btn svg {
    width: 1em;
    height: 1em;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.content-wrapper {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    box-sizing: border-box;
    padding: 4em 1.25em 1em;
    overflow: hidden;
}
.box {
    top: 0;
    position: absolute;
    left: 50%; 
    transform: translateX(-50%);
    width: 80%; 
    height: 100%;
    z-index: 5;
    pointer-events: none;
}
.title-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 60%;
    max-width: 34em;
    margin: 0 auto;
    flex-shrink: 0;
    position: relative;
}
.modal-content h2 {
    grid-column: 2;
    position: relative;
    color: var(--color-white);
    text-align: center;
    font-weight: 700;
    font-size: clamp(1.5rem, 4vh, 2.5rem);
    line-height: 1.15;
    margin: 0;
    z-index: 6;
}
.details-box {
    position: relative;
    margin: 0.5em auto 0;
    width: 60%;
    max-width: 34em;
    text-align: left;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-shrink: 1;
    min-height: 0;
}
.modal-content p{
    position: relative;
    color: #aeaeae;
    font-weight: 400;
    font-size: clamp(0.95rem, 2vh, 1.15rem);
    line-height: 1.6;
    width: 100%;
}
.demo-btn {
    grid-column: 3;
    justify-self: end;
    position: relative; 
    right: auto;
    z-index: 6;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    text-decoration: none;
    color: #f2f2f2;
    background: linear-gradient(180deg,#1f1f1f, #171717);
    border: 0.0625em solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 0.3em 0.9em rgba(0, 0, 0, 0.2);
    font-weight: 600;
    font-size: clamp(0.75rem, 1.2vh, 0.9em);
    width: fit-content;
    flex-shrink: 0;
    padding: 0.4em 1.2em;
    border-radius: 0.5em;
    transition: 0.25s ease;
}
.demo-btn:hover {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0.4em 1.1em rgba(0, 0, 0, 0.3);
    transform: translateY(-0.1em);
    background: linear-gradient(180deg,#252525, #1d1d1d);
}
.demo-btn svg {
    width: 0.9em;
    height: 0.9em;
    fill: none;
    stroke: #cfcfcf;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.3s ease;
}
.demo-btn:hover svg {
    transform: translate(0.1em, -0.1em);
}

/* ----------Redesigned Modern Image Slider------------ */
.slider-container {
    position: relative;
    margin: 0.8em auto 0;
    width: 60%;
    max-width: 34em;
    overflow: hidden;
    background: rgba(18, 18, 20, 0.75);
    backdrop-filter: blur(0.75em);
    -webkit-backdrop-filter: blur(0.75em);
    border: 0.0625em solid rgba(255, 255, 255, 0.12);
    padding: 0.8em 0.8em 0.6em;
    border-radius: 1em;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 1;
    min-height: 0;
    box-shadow: 0 1em 2.5em rgba(0, 0, 0, 0.5);
}
.slider {
    width: 100%; 
    max-width: 100%;
    cursor: pointer;
    max-height: 38vh;
    object-fit: contain;
    flex-shrink: 1;
    min-height: 0;
    border-radius: 0.75em;
    box-shadow: 0 0.4em 1.2em rgba(0, 0, 0, 0.4);
    transition: opacity 0.3s ease-in-out;
}
.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    color: var(--color-white);
    background-color: rgba(30, 30, 35, 0.7);
    backdrop-filter: blur(0.5em);
    -webkit-backdrop-filter: blur(0.5em);
    box-shadow: 0 0.25em 0.75em rgba(0, 0, 0, 0.4);
    border: 0.0625em solid rgba(255, 255, 255, 0.2);
    font-size: 1.2em;
    transition: all 0.2s ease;
    width: 2.2em;
    height: 2.2em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.prev:hover, .next:hover {
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.6);
    background-color: rgba(60, 60, 70, 0.9);
    transform: translateY(-50%) scale(1.08);
}
.prev {
    left: 0.8em;
}
.next {
    right: 0.8em;
}
.slider-desc {
    text-align: center;
    margin-top: 0.5em;
    font-size: clamp(0.75rem, 1.2vh, 0.88rem);
    font-style: normal;
    color: #c0c0c5;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    flex-shrink: 0;
}
.slider-desc.show {
    opacity: 1;
}
.slider-circles {
    margin-top: 0.4em;
    flex-shrink: 0;
    display: flex;
    gap: 0.4em;
    align-items: center;
}
.circle {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: none;
    width: 0.55em;
    height: 0.55em;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}
.circle:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}
.circle.active {
    background: var(--color-white);
    width: 1.2em;
    border-radius: 0.3em;
    box-shadow: 0 0 0.6em rgba(255, 255, 255, 0.6);
}
.zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 8;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
.zoom-overlay.show {
    opacity: 1;
    visibility: visible;
}
.zoom-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 0.5em;
    box-shadow: 0 0 2em rgba(0, 0, 0, 0.8);
}

/* ----------footer------------ */
footer {
    padding-right: 2%;
    padding-top: 0.5em;
    padding-bottom: 0.75em;
    display: flex;
    justify-content: flex-end;
    background-color: rgb(0, 0, 0);
    box-shadow: 0 0 0.625em rgba(0, 0, 0, 0.5);
    color: #2c2c2c;
    position: relative;
}

/* ----------fade in scroll effect------------ */
.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease-in;
}
.fade-in.appear {
    opacity: 1;
}
.from-left {
    transform: translateX(-50%);
}
.from-right {
    transform: translateX(50%);
}
.from-bottom {
    transform: translateY(50%);
}
.from-left, .from-right, .from-bottom {
    transition: opacity 0.7s ease-in, transform 0.7s ease-in;
    opacity: 0;
}
.from-left.appear, .from-right.appear {
    transform: translateX(0);
    opacity: 1;
}
.from-bottom.appear {
    transform: translateY(0);
    opacity: 1;
}

/* ----------small screen support------------ */
@media only screen and (max-width: 45em) {
    .modal-content h2 {
        font-size: 1.8em;
    }
    .modal-content p {
        font-size: 0.9em;
    }
    .demo-btn {
        font-size: 0.85em;
    }
}
@media only screen and (max-width: 38.5em) {
    nav ul li {
        margin: 0.65em 0.9em;
    }
    nav ul li a {
        font-size: 1em;
    }
    #about {
        margin-top: -2.4375em;
        padding-top: 4.7em;
    }
    .about-col-1, .about-col-2 {
        flex-basis: 100%;
    }
    .about-col-1 {
        margin-bottom: 1.875em;
    }
    .about-col-2 {
        font-size: 0.9em;
    }
    .tab-links {
        font-size: 1.05em;
    }
    .modal-content h2 {
        font-size: 1.5em;
    }
    .modal-content p {
        font-size: 0.85em;
    }
    .demo-btn {
        font-size: 0.8em;
        padding: 0.4em 1.2em;
    }
    .slider {
        max-height: 25vh;
    }
    .slider-desc {
        font-size: 0.75em;
    }
    .title-row, .details-box, 
    .slider-container, .box {
        width: 100%;
    }
    .prev, .next {
        width: 1.8em;
        height: 1.8em;
        font-size: 1em;
    }
    .title-row {
        display: flex;
        flex-direction: column;
        gap: 0.6em;
    }
    .modal-content h2 {
        grid-column: auto;
    }
    .demo-btn {
        grid-column: auto;
        justify-self: center;
    }
}
@media only screen and (max-width: 28.125em) {
    .header-text h1 {
        font-size: 2.5rem; 
    }
    .header-text {
        font-size: 1.3em; 
    }
    nav ul li {
        margin: 0.5em 0.5em;
    }
    nav ul li a {
        font-size: 0.9em;
    }
    #about {
        margin-top: -2.125em;
        padding-top: 4em;
    }
    .sub-title {
        font-size: 2em;
        padding-bottom: 0.1em;
    }
    .layer {
        font-size: 0.8em;
    }
    .layer h3 {
        font-size: 1.25em;
    }
    .view {
        font-size: 1em;
    }
    .modal-content h2 {
        font-size: 1.3em;
    }
    .demo-btn {
        font-size: 0.75em;
        padding: 0.35em 1.2em;
    }
    .slider {
        max-height: 20vh;
    }
    .slider-desc, .modal-content p {
        font-size: 0.75em;
    }
}
@media only screen and (max-width: 16em) {
    .header-text h1 {
        font-size: 1.5rem; 
    }
    .header-text {
        font-size: 1em;  
    }
    nav {
        border-bottom-left-radius: 0.3em;
        border-bottom-right-radius: 0.3em;
        justify-content: center;
    }
    nav ul li {
        margin: 0.2em 0.58em;
    }
    nav ul li a {
        font-size: 0.6em;
    }
    #about {
        margin-top: -1em;
        padding-top: 17.5%;
    }
    .sub-title {
        font-size: 1.5em;
        padding-bottom: 0.2em;
    }
    .about-col-1 {
        margin-bottom: 5%;
    }
    .about-col-1 img {
        box-shadow: -0.12em 0.12em 0.12em rgba(88, 88, 88, 0.4);
    }
    .about-col-2 {
        font-size: 0.6em;
    }
    #projects {
        padding: 1.7em 0;
    }
    .work-list {
        grid-template-columns: repeat(auto-fit, minmax(50%, 1fr));
        grid-gap: 1em;
        margin-top: 0.8em;
    }
    .layer {
        font-size: 8px;
    }
    .layer h3 {
        font-size: 1em;
    }
    .view {
        font-size: 1em;
    }
    .content-wrapper {
        padding: 1.8em 0 0.8em;
    }
    .modal-content h2 {
        font-size: 1em;
    }
    .demo-btn {
        font-size: 0.65em;
        padding: 0.35em 1em;
        margin-top: 0.4em;
    }
    .slider-container {
        margin-top: 0.4em;
        padding: 0.4em 0.2em 0.2em;
        border-radius: 0.4em;
    }
    .slider-desc, .modal-content p {
        font-size: 0.6em;
    }
    .circle {
        width: 0.4em;
        height: 0.4em;
    }
    .circle.active {
        width: 0.9em;
    }
    .slider-circles {
        margin-top: 0px;
    }
    .prev, .next {
        width: 1.5em;
        height: 1.5em;
        font-size: 0.6em;
    }
    .close-btn {
        width: 1.7em;
        height: 1.7em;
        top: 0.6em;
        right: 0.6em;
    }
    footer {
        font-size: 0.5em;
    }
}
@media only screen and (max-width: 9.35em) {
    .header-text h1 {
        font-size: 0.8rem; 
    }
    .header-text {
        font-size: 6.5px;  
    }
    nav {
        border-bottom-left-radius: 0.15em;
        border-bottom-right-radius: 0.15em;
    }
    nav ul li {
        margin: 0 8px;
    }
    nav ul li a {
        font-size: 5.62px;
    }
    #about {
        padding-top: 25%;
    }
    .sub-title {
        font-size: 12px;
        padding-bottom: 0.3em;
    }
    .about-col-2 {
        font-size: 5px;
    }
    #projects {
        padding: 1em 0;
    }
    .layer {
        font-size: 5px;
    }
    .content-wrapper {
        padding: 1.5em 0 0.5em;
    }
    .modal-content h2 {
        font-size: 7px;
    }
    .demo-btn {
        font-size: 6px;
        padding: 0.3em 0.8em;
        margin-top: 0.3em;
    }
    .slider-container {
        margin-top: 0.3em;
        padding: 0.3em 0.1em 0.1em;
        border-radius: 0.2em;
    }
    .slider-desc, .modal-content p {
        padding-bottom: 0.1em;
        padding-top: 0.1em;
        padding-left: 0.15em;
        padding-right: 0.15em;
        font-size: 5.5px;
    }
    .circle {
        width: 0.3em;
        height: 0.3em;
        margin: 0 0.1em;
    }
    .circle.active {
        width: 0.7em;
    }
    .prev, .next {
        font-size: 5px;
        width: 1.4em;
        height: 1.4em;
    }
    .close-btn {
        width: 1.4em;
        height: 1.4em;
        top: 0.4em;
        right: 0.4em;
    }
    .close-btn svg {
        width: 0.8em;
        height: 0.8em;
    }
    footer {
        font-size: 4px;
    }
}
@media only screen and (max-width: 6.75em) {
    nav {
        border-bottom-left-radius: 0.15em;
        border-bottom-right-radius: 0.15em;
    }
    nav ul li {
        margin: 0 2px;
    }
    nav ul li a {
        font-size: 4.25px;
    }
    #about {
        padding-top: 30%;
    }
    .about-col-2 {
        font-size: 4.55px;
    }
    .layer {
        font-size: 3.5px;
    }
}
@media only screen and (min-width: 67.6em) {
    #about {
        padding-top: 7%;
    }
    .work-list {
        grid-template-columns: repeat(3, 1fr);
    }
    .work {
        border-radius: 0.8em;
    }
    .work img {
        border-radius: 0.8em;
    }
    .slider {
        max-height: 50vh;
    }
    .title-row, .details-box, 
    .slider-container, .box {
        width: 60%;
        max-width: 56em;
    }
}
@media (hover: hover) {
    .work:hover {
        box-shadow: 0 0.3em 0.2em rgb(61, 61, 61);
        transition: 1s;
    }
    .work:hover img {
        transform: scale(1.1);
    }
    .work:hover .layer {
        opacity: 1;
    }
}
@media (hover: none) {
    .work.hover {
        box-shadow: 0 0.3em 0.2em rgb(61, 61, 61);
        transition: 1s;
    }
    .work.hover img {
        transform: scale(1.1);
    }
    .layer {
        pointer-events: none;
    }
    .work.hover .layer {
        opacity: 1;
    }
    .prev, .next {
        transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    }
    .prev.clicked, .next.clicked {
        background-color: rgba(255, 255, 255, 0.14);
        border-color: rgba(255, 255, 255, 0.45);
        color: var(--color-white);
    }
    .view::after {
        transition: 0.3s;
    }
}