/* Importing font */
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap');

/* Reset */
*{
    margin: 0;
    padding: 0;
    border: none;
    box-sizing: border-box;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 3px;
    height: 3px;
    border-radius: 20px;
    border: none;
}

::-webkit-scrollbar-track {
    background:#101010;
}

::-webkit-scrollbar-thumb {
    border-radius: 20px;
    border: 3px solid #bbb;
    background:var(--primary);
    border-radius:999px;
}

/* Background blur glow effect */
body::before{
    content:"";
    position:fixed;
    width:600px;
    height:600px;
    background:#8b5cf630;
    border-radius:50%;
    filter:blur(180px);
    top:-200px;
    left:-150px;
    z-index:0;
}
 
body::after{
    content:"";
    position:fixed;
    width:500px;
    height:500px;
    background:#6d28d950;
    border-radius:50%;
    filter:blur(180px);
    bottom:-150px;
    right:-120px;
    z-index:0;
}

body{
    height: 100vh;
    width: 100vw;
    background:var(--void);
    color:white;
    overflow-x:hidden;
    position:relative;
    display: grid;
    grid-template-rows: auto 1fr;
    font-family: "Josefin Sans", serif;
}

/* Navigation */
.top-nav {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 998;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom:1px solid transparent;
    transition:background .4s ease, border-color .4s ease, backdrop-filter .4s ease;
}

.nav-container {
    width: 97%;
    margin: 0 auto;
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
    color: var(--text-muted);
}

.home-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--glass-glow);
}

.nav-title {
    letter-spacing: 2px;
    font-size: 1rem;
    font-family:"JetBrains Mono",monospace;
    color:var(--mist);
    display: block;
}

/* Menu bar (Hamburger menu) */
.menu-btn{
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
    color: var(--text-muted);
    cursor: pointer;
}

.menu-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--glass-glow);
}

.menu {
    font-size: 20px;
}

.mobile-menu{
    position:fixed;
    top:0;
    right:-100%;
    width:280px;
    height:100vh;
    background:rgba(10,10,15,.9);
    backdrop-filter:blur(20px);
    border-left:1px solid rgba(255,255,255,.1);
    display:flex;
    flex-direction:column;
    padding:100px 35px;
    gap:28px;
    transition:.4s ease;
    z-index:1000;
    font-family:"Inter",sans-serif;
}

.mobile-menu.active{
    right:0;
}

.mobile-menu a{
    color: #ffffff;
    text-decoration:none;
    font-size:18px;
    transition:.3s;
}

.mobile-menu a:hover{
    color:var(--amethyst);
    transform:translateX(6px);
}

.active-page::after {
    color: var(--amethyst);
    content: " ‹";
}

.close-btn{
    position:absolute;
    top:25px;
    right:25px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
    color: var(--text-muted);
    cursor: pointer;
}

.close-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--glass-glow);
}

.close {
    font-size: 20px;
}

.overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    opacity:0;
    visibility:hidden;
    transition:.3s;
    z-index:999;
}

.overlay.active{
    opacity:1;
    visibility:visible;
}

/* Main section */
.container-elements {
    display: grid;
    height: 100%;
    width: 100%;
    grid-template-rows: auto 1fr;
    overflow-y: hidden;
}

.dropdown {
    display: flex;
    position: relative;
    margin: 0 20px 5px 20px;
}

.selected-left, .selected {
    cursor: pointer;
    padding: 10px;
    width: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #1f1f1f;
    border: 1px solid rgb(255, 255, 255, 0.2);
    animation: fadeIn 1.5s ease forwards;

    background:rgba(255,255,255,.05);
    backdrop-filter:blur(15px);
    border:1px solid var(--border);
    border-radius:14px;
    transition:.35s;
    margin: 5px 0 0px 0;
}

.selected-left:hover, .selected:hover{
    border-color:var(--primary);
    box-shadow: 0 0 20px rgba(139,92,246,.2);
}

.selected-left:hover {
    .arrow-left {
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6));
    }
    .order-left {
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6));
    }
}

.selected:hover {
    .arrow {
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6));
    }
    .order {
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6));
    }
}

.dropdown-list-left, .dropdown-list {
    background-color: #1f1f1f;
    position: absolute;
    top: 100%;
    list-style: none;
    z-index: 100;
    display: none;
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
    background:#15151E;
    border-radius:14px;
    overflow:hidden;
    border:1px solid var(--border);
    border-top: none;
}

.dropdown-list-left {
    left: 0;
}

.dropdown-list {
    right: 0;
}

.dropdown-list-left li, .dropdown-list li {
    width: 120px;
    padding: 10px;
    display: flex;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid rgb(255, 255, 255, 0.2);
    transition:.3s;
}

.dropdown-list-left li:last-child, .dropdown-list li:last-child {
    border-bottom: none;
}

.dropdown-list-left li:hover, .dropdown-list li:hover {
    filter: drop-shadow(0 0 5px rgba(139,92,246, 1));
    background:var(--primary);
    color:white;
}

.show {
    display: block;
}

.second {
    display: flex;
    justify-content: end;
    width: 100%;
}

.skills {
    display: grid;
    grid-template-columns:  repeat(auto-fit, minmax(300px, 1fr));
    margin: 20px 20px 20px 0;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    overflow-x: hidden;
    gap: 20px;
    padding:25px;
    margin:0;
    z-index: 1;
    background: transparent;
}

.skills img {
    height: 100px;
    margin: 10px;
    filter: drop-shadow(0 0 15px rgba(139,92,246, 0.3));
    animation: scaleUp 1s ease forwards;
    animation-delay: calc(.1s * var(--i));
    animation-timeline: view();
    animation-range: entry 0% cover 15%;
    opacity: 0;
}

.skill-elements {
    height: 100%;
    width: 100%;
    margin: 0 10px 10px 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    animation: scaleUp 1s ease forwards;
    animation-delay: calc(.1s * var(--i));
    opacity: 0;
    background:rgba(255,255,255,.04);
    border:1px solid var(--border);
    backdrop-filter:blur(18px);
    border-radius:24px;
    transition:
        transform .35s,
        box-shadow .35s,
        border-color .35s;
}

.skill-elements:hover {
    transform: translateZ(-10px);
    border-color:var(--primary);
    box-shadow: 0 20px 45px rgba(139,92,246,.18);
}

/* Animations */

/* Slide down animation */
@keyframes slideDown {
    0% {
        transform: translateY(-50px);
        opacity: 0;
    }
    100% {
        transform: translateY(0px);
        opacity: 1;
    }
}

.slideDown {
    animation: slideDown 1s ease forwards;
}

/* Fade in animation */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.fadeIn {
    animation: fadeIn 1s ease forwards;
}

/* Fade out animation */
@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.fadeOut {
    animation: fadeOut 1s ease forwards;
}

.fadeOut7 {
    animation: fadeOut 0.7s ease forwards;
}

/* Scale up animation  */
@keyframes scaleUp {
    from {
        scale: 0.6;
        opacity: 0;
    }
    to {
        scale: 1;
        opacity: 1;
    }
}
.scaleUp {
    animation: scaleUp 1s ease forwards;
}

/* Responsive */
@media only screen and (min-width: 300px) and (max-width: 330px) {

    .nav-container {
        padding: 0.5rem 0;
        width: 95%;
    }

    .nav-title {
        font-size: 0.8rem;
    }

    .container-elements {
        font-size: 12px;
    }

    .skills img {
        height: 60px;
    }

    .skill-elements {
        margin: 0;
        width: 90%;
    }

}

@media only screen and (min-width: 330px) and (max-width: 400px) {

    .nav-container {
        padding: 0.5rem 0;
        width: 95%;
    }

    .nav-title {
        font-size: 0.8rem;
    }

    .container-elements {
        font-size: 12px;
    }

    .skills img {
        height: 70px;
    }

    .skill-elements {
        margin: 0 5px 10px 0px;
    }

}

@media only screen and (min-width: 400px) and (max-width: 600px) {

    .nav-container {
        padding: 0.6rem 0;
        width: 90%;
    }

    .home {
        font-size: 15px;
    }

    .skill-elements {
        margin: 0 5px 10px 0px;
    }

}

@media only screen and (min-width: 600px) and (max-width: 800px) {
    .nav-container {
        padding: 0.6rem 0;
        width: 90%;
    }

    .home {
        font-size: 15px;
    }

    .container-elements {
        font-size: 18px;
    }

    .selected, .selected-left {
        width: 120px;
    }

    .dropdown-list li, .dropdown-list-left li{
        width: 120px;
    }
}

@media only screen and (min-width: 800px) and (max-width: 992px) {
    .nav-container {
        padding: 0.6rem 0;
        width: 90%;
    }

    .home {
        font-size: 15px;
    }

    .container-elements {
        font-size: 18px;
    }

    .selected, .selected-left {
        width: 120px;
    }

    .dropdown-list li, .dropdown-list-left li{
        width: 120px;
    }
}

@media only screen and (min-width: 992px) and (max-width: 1200px) {
    .nav-container {
        padding: 0.6rem 0;
        width: 90%;
    }

    .home {
        font-size: 15px;
    }

    .container-elements {
        font-size: 20px;
    }

    .selected, .selected-left {
        width: 140px;
    }

    .dropdown-list li, .dropdown-list-left li{
        width: 140px;
    }

}

@media only screen and (min-width: 992px) and (max-width: 1200px) and (max-height: 600px) {
    .nav-container {
        padding: 0.6rem 0;
        width: 90%;
    }

    .home {
        font-size: 15px;
    }

    .container-elements {
        font-size: 14px;
    }

    .skill-elements img, .skill-elements span {
        margin: 20px;
    }

}
@media only screen and (max-width: 200px) and (max-height: 300px) {
    .nav-container {
        padding: 0.5rem 0;
        width: 95%;
    }

    .nav-title {
        font-size: 0.8rem;
    }

    .selected, .selected-left {
        width: 24px;
        height: 5px;
        font-size: 5px ;
        padding: 5px;
    }

    .skills {
        padding: 5px;
        margin: 5px 5px 5px 0;
        gap: 5px;
    }

    .skills img {
        height: 20px;
        margin: 5px;
    }

    .skill-elements {
        margin: 0 2px 2px 2px;
        font-size: 5px;
        width: 90vw;
    }
}

@media only screen and (max-width: 315px) {
    .nav-container {
        padding: 0.5rem 0;
        width: 95%;
    }

    .nav-title {
        font-size: 0.8rem;
    }

    .selected, .selected-left {
        width: 24px;
        height: 5px;
        font-size: 5px ;
        padding: 5px;
    }

    .skills {
        padding: 5px;
        margin: 5px 5px 5px 5px;
        gap: 5px;
    }

    .skills img {
        height: 20px;
        margin: 5px;
    }

    .skill-elements {
        margin: 0 2px 2px 2px;
        font-size: 5px;
        width: 90vw;
    }
}

@media only screen and (min-width: 200px) and (max-width: 300px) and (min-height: 100px) and (max-height: 200px) {
    .nav-container {
        padding: 0.5rem 0;
        width: 95%;
    }

    .nav-title {
        font-size: 0.8rem;
    }

    .selected, .selected-left {
        width: 24px;
        height: 5px;
        font-size: 5px ;
        padding: 5px;
    }

    .skills {
        padding: 5px;
        margin: 5px 5px 5px 5px;
        gap: 5px;
    }

    .skills img {
        height: 20px;
        margin: 5px;
    }

    .skill-elements {
        margin: 0 2px 2px 2px;
        font-size: 5px;
        width: 90vw;
    }
}

@media only screen and (min-width: 200px) and (max-width: 300px) and (min-height: 200px) and (max-height: 250px) {

    .skills {
        width: 90vw;
    }

    .skill-elements{ 
        width: 90vw;
    }
}