:root {
    --vw: min(1vw, 15.5px);               /* 1vw, but it stops growing at a 1550px-wide screen */
    --bg: #000;
    --fg: #E3E3E3;
    --acc: #FFB58B;
    --mut: #8f8f8f;
    --line: #3a3a3a;
    --glass: rgba(78, 78, 78, 0.7);
    --pad: clamp(24px, 4.762 * var(--vw), 96px);   /* 72px at 1512 */
    --fs: clamp(16px, 1.587 * var(--vw), 32px);     /* 24px at 1512 */
    --nfs: clamp(16px, 1.587 * var(--vw), 24px);    /* nav (logo + Menu): 24px at 1512, never larger */
    --top: clamp(14px, 2.645 * var(--vw), 52px);    /* 40px at 1512 */
    --bot: clamp(17px, 3.571 * var(--vw), 70px);    /* 54px at 1512 */
    --e: cubic-bezier(.16, 1, .3, 1);
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px)
}

:root[data-theme=light] {
    --bg: #FFFBF1;
    --fg: #111;
    --mut: #5c5c5c;
    --line: #d4d4d0;
    --glass: rgba(255, 251, 241, .75)
}

@media(prefers-color-scheme:light) {
    :root:not([data-theme=dark]):not([data-theme=light]) {
        --bg: #FFFBF1;
        --fg: #111;
        --mut: #5c5c5c;
        --line: #d4d4d0;
        --glass: rgba(255, 251, 241, .75)
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent
}

html {
    scroll-padding-top: env(safe-area-inset-top, 0px)
}

body {
    background: transparent;
    color: var(--fg);
    font: 400 var(--t-lead, 24px)/1.25 Outfit, sans-serif;
    transition: background .6s, color .6s;
    overflow-x: hidden
}

html {
    overflow-x: hidden;
    background: var(--bg);
    transition: background .6s;
    overscroll-behavior: none
}

body {
    overflow-x: clip;
    max-width: 100vw
}

a {
    color: inherit;
    text-decoration: none
}

/* nav */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calc(var(--top) + env(safe-area-inset-top, 0px)) var(--pad) 18px;
    background: linear-gradient(var(--bg), transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    mask: linear-gradient(#000 70%, transparent)
}

nav>* {
    flex: 1
}

.nm {
    display: inline-block;
    font-size: var(--nfs);
    line-height: 1.2
}

.n1,
.n2 {
    display: block
}

.n2 {
    color: var(--acc)
}

/* logo: "Monirul I." <-> "Monirul Islam" */
.nx,
.nd {
    display: inline-block;
    vertical-align: top;
    overflow: hidden;
    white-space: pre;
    max-width: 0;
    transition: max-width .8s var(--e)
}

.nx>span,
.nd>span {
    display: inline-block;
    transition: opacity .5s var(--e), transform .8s var(--e), filter .6s var(--e)
}

.nx>span {
    opacity: 0;
    transform: translateX(-.5em);
    filter: blur(6px)
}

.nd {
    max-width: var(--w, .4em);
    transition: max-width .5s var(--e) .25s
}

.nd>span {
    transition-delay: .25s
}

.nm.open .nx {
    max-width: var(--w, 3em)
}

.nm.open .nx>span {
    opacity: 1;
    transform: none;
    filter: blur(0);
    transition-delay: .08s
}

.nm.open .nd {
    max-width: 0;
    transition-delay: 0s;
    transition-duration: .3s
}

.nm.open .nd>span {
    opacity: 0;
    transform: translateX(.3em);
    transition-delay: 0s;
    transition-duration: .25s
}

@media(prefers-reduced-motion:reduce) {

    .nx,
    .nd,
    .nx>span,
    .nd>span {
        transition: none
    }
}

#th {
    width: 26px;
    height: 26px;
    transition: transform .6s var(--e)
}

#th:hover {
    transform: rotate(90deg)
}

/* arrows + links */
.arr {
    display: inline-block;
    width: .55em;
    height: .55em;
    margin-left: .2em;
    color: var(--fg);
    transition: transform .45s var(--e), color .9s var(--e)
}

.arr svg {
    display: block;
    width: 100%;
    height: 100%
}

a:hover .arr {
    transform: translate(4px, -4px);
    color: var(--mut)
}

a:not(.it):not(.more):not(.nm):not(.xl) {
    display: inline-block;
    transform-origin: left center;
    color: transparent;
    background: linear-gradient(90deg, var(--mut) 0, var(--mut) 40%, var(--fg) 60%, var(--fg) 100%) 100% 0/250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    transition: background-position .9s var(--e), transform .4s var(--e)
}

a:not(.it):not(.more):not(.nm):not(.xl):hover,
a:not(.it):not(.more):not(.nm):not(.xl):active {
    background-position: 0 0;
    transform: scale(1.07)
}


/* Hide the page scroll bar */
html {
    scroll-behavior: smooth
}

/* Lenis smooth scroller */
html.lenis, html.lenis body { height: auto }
.lenis.lenis-smooth { scroll-behavior: auto !important }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain }
.lenis.lenis-stopped { overflow: hidden }

html, body {
    scrollbar-width: none;
    -ms-overflow-style: none
}

html::-webkit-scrollbar, body::-webkit-scrollbar, *::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0
}

@media(max-width:700px) {
    :root {
        --pad: 24px
    }
}
