:root {
    --main-font-color: white;
    --secondary-font-color: #999999;
    --main-color: rgb(0, 0, 0);
    --secondary-color: rgb(8, 8, 8);
    --main-color-transparent: rgba(27, 27, 27, 0.658);
}

* {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    color: var(--main-font-color);
}

body {
    background-color: var(--main-color);
}

h1 {
    font-weight: 500;
}

h2 {
    font-weight: 500;
    font-size: 2rem;
}

h3 {
    font-weight: 500;
}

h4 {
    font-weight: 300;
}

p {
    font-weight: 300;
}

strong {
    font-weight: 500;
}

li {
    list-style-type: none;
}

a {
    text-decoration: none;
}

header {
    background: linear-gradient(
        180deg,
        var(--main-color) 10%,
        rgba(8, 8, 8, 0)
    );
    z-index: 2;
    display: flex;
    position: fixed;
    justify-content: space-between;
    width: 100%;
    top: 0;
}

footer {
    background-color: var(--secondary-color);
    height: 60px;
}

#logo {
    display: flex;
    align-items: center;
    transition: none;
    margin-left: 2em;
}

#logo img {
    height: 2.5em;
    aspect-ratio: 1;
}

/* NAVIGATION */

#navigation {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-right: 1em;
}

#navbar {
    position: relative;
}

#navbar-list {
    padding: 5px;
    display: flex;
    justify-content: space-evenly;
}

.navbar-element {
    display: flex;
    align-items: center;
    padding: 10px;
    font-size: 1.25em;
    margin: 0 20px;
    border-radius: 6px;
    transition: 50ms;
}

.navbar-element:hover {
    scale: 98%;
}

.dropdown:hover {
    scale: none;
}

.dropdown > button:hover {
    scale: none;
    cursor: pointer;
}

/* TRANSLATE SELECTOR */

.dropdown > button {
    background-color: var(--main-color-transparent);
    min-width: 130px;
    height: 35px;
    border-radius: 5px;
    color: white;
    padding: 5px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    justify-content: space-evenly;
    gap: 5px;
}
.dropdown > button span:not(.arrow-down),
#dropdown-content li span {
    width: 20px;
}
.dropdown > button,
#dropdown-content li {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
}
.arrow-down {
    width: 0;
    height: 0;
    display: inline-block;
    vertical-align: middle;
    border-style: solid;
    border-width: 4px 4px 0 4px;
    border-color: #fff transparent transparent transparent;
    margin: 0 0 0 5px;
}

/* Style for the dropdown content */

#dropdown-content {
    display: none;
    position: absolute;
    margin-top: 8.3em;
    padding: 0;
    background-color: #000000;
    border-radius: 5px;
}

/* Style for the dropdown content items */
#dropdown-content li {
    color: white;
    padding: 0.5em 1em 0.5em 0;
    margin: 0;
    gap: 1em;
    text-decoration: none;
    justify-content: end;
    min-width: 118px;
}

/* Style for the dropdown content items on hover */
#dropdown-content li:hover {
    background-color: var(--main-color-transparent);
    cursor: pointer;
    color: rgb(219, 219, 219);
    border-radius: 5px;
}
/* Show the dropdown content when the dropdown button is clicked */
.dropdown:focus-within #dropdown-content {
    display: block;
}
/* Animate the dropdown content */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
#dropdown-content {
    animation: slideIn 0.3s ease-out;
}

/* Scrollbar styles */
::-webkit-scrollbar {
    width: 8px;
    height: 10px;
}
::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: #525252;
}

.hamburger .line {
    width: 24px;
    height: 3px;
    background-color: #ecf0f1;
    display: block;
    margin: 7px auto;
    -webkit-transition: all 0.3s ease-in-out;
    -o-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
}

#hamburger {
    position: relative;
    display: none;
    -webkit-transition: all 0.3s ease-in-out;
    -o-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

#hamburger:hover {
    transition: 100ms;
    scale: 103%;
}

#hamburger.ham-active {
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    transform: rotate(45deg);
}

#hamburger:before {
    scale: 90%;
    content: "";
    position: absolute;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    width: 40px;
    height: 40px;
    border: 2px solid transparent;
    top: calc(50% - 20px);
    left: calc(50% - 20px);
    border-radius: 100%;
    -webkit-transition: all 0.3s ease-in-out;
    -o-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
}

#hamburger.ham-active:before {
    border: 3px solid #ecf0f1;
}

#hamburger.ham-active .line:nth-child(2) {
    opacity: 0;
}

#hamburger.ham-active .line:nth-child(1) {
    -webkit-transform: translateY(10px);
    -ms-transform: translateY(10px);
    -o-transform: translateY(10px);
    transform: translateY(10px);
}

#hamburger.ham-active .line:nth-child(3) {
    -webkit-transform: translateY(-10px) rotate(90deg);
    -ms-transform: translateY(-10px) rotate(90deg);
    -o-transform: translateY(-10px) rotate(90deg);
    transform: translateY(-10px) rotate(90deg);
}

#welcome-section {
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    justify-content: left;
    align-items: center;
    position: relative;
    max-height: 87vh;
    overflow: hidden;
}

#playing-video {
    position: relative;
    height: 100%;
    width: 100%;
    margin: auto;
}

#playing-video iframe {
    width: 100%;
    min-height: 100%;
}

.name_description {
    position: absolute;
    margin-left: 10%;
    z-index: 1;
    pointer-events: none;
}

#welcome-section h1 {
    font-size: 4.5vw;
}

#welcome-section h2 {
    font-size: 3vw;
    font-weight: 300;
}

/* Icons */

#net {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 4em 0;
    gap: 1em;
}

#net h2 {
    text-align: center;
}

#network-icons {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Ensure equal spacing */
    gap: 1em;
    justify-content: center;
    align-items: center;
}

.net-icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3em; /* Adjust the gap between icon and title */
}

.net-icon {
    text-align: center;
    position: relative;
    width: 50px;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, filter 0.3s ease; /* Smooth scaling and filter for anti-aliasing */
    transform-origin: center; /* Ensure scaling is smooth */
    backface-visibility: hidden; /* Prevents flickering */
}

.net-icon:hover {
    transform: scale(1.1); /* Scale the icon and its container */
    filter: brightness(1.2); /* Slightly brighten to smooth edges */
}

.net-icon i {
    font-smoothing: antialiased;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
}

.net-title {
    font-size: 0.75em; /* Smaller font size */
    margin: 0; /* Remove default margin */
    text-align: center;
    color: #ccc; /* Lighter color for better visibility */
}


/* About section */

#about {
    background-color: var(--secondary-color);
    display: grid;
    grid-template-areas:
        "A B"
        "A C";
    justify-content: center;
    align-items: center;
    padding: 2.5em 10em;
    font-size: 1.25rem;
}

#about-info {
    grid-area: A;
}

@media (min-width: 1500px) {
    #about {
        grid-template-areas: "A B C";
        grid-auto-columns: 40% auto auto;
        padding: 4em auto;
        gap: 4em;
    }
}
#about-info p {
    margin: 10px 0;
}

#list-container {
    display: flex;
    flex-direction: column;
    position: relative;
    align-items: center;
}

#list-container ul {
    margin: 10px 0;
    height: 7.5em;
    overflow-y: scroll;
    padding: 0;
}

#list-container ul::-webkit-scrollbar {
    display: none;
}

#list-container ul::before {
    position: absolute;
    height: 7rem;
    bottom: 0.5em;
    width: 100%;
    content: "";
    background: linear-gradient(
        to top,
        var(--secondary-color),
        rgba(34, 34, 34, 0) 100%
    );
    pointer-events: none;
}

#skills li {
    margin-bottom: 10px;
}

#name_accent {
    outline: solid rgba(255, 255, 255, 0);
    border-radius: 0.25em;
    outline-offset: 2px;
    background-color: transparent;
    transition: 200ms;
}

#name_accent:hover {
    outline: 1px solid;
}

#projects {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 80%;
    gap: 3em;
    margin: 10em auto;
}


.nowarp {
    white-space: nowrap;
}

#slider-container {
    user-select: none;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

#slider {
    width: max-content;
    display: flex;
    background-color: black;
    padding-bottom: 2em;
}

.project {
    display: flex;
    position: relative;
    justify-content: center;
    align-items: center;
    margin-inline: 1em;
    border-radius: 1em;
    background: linear-gradient(230deg, var(--gradient-2) 10%, var(--gradient-1) 100%);
    aspect-ratio: 3 / 4;
    overflow: hidden;
    scroll-margin: 8em;
    
    height: 40em;
    font-size: 0.9em;
}

.project_poster {
    z-index: 1;
    border-radius: 1em;
    max-width: 100%;
    max-height: 100%;
    position: absolute;
    transition: filter 0.3s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.4); /* Upwards shadow */
    cursor: pointer;
}

.active .project_poster {
    transform: translateY(94%);
    filter: brightness(0.7);
    pointer-events: none;
}

.project:hover:not(.active) > .project_poster {
    transform: translateY(-1%);
    filter: brightness(1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4); /* Upwards shadow */
}

.darken .project_poster {
    filter: brightness(.7);
}

.project_info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding-inline: 4em;
    gap: 3.1em; /* Default gap between items */
    margin-bottom: 2.2em;
}

/* Spans second and third items across both columns */
.project_info>div:nth-child(2),
.project_info>div:nth-child(3) {
    grid-column: span 2;
}

/* Creates an adaptive gap between the first items and the last two */
.project_info>div:nth-child(4),
.project_info>div:nth-child(5) {
    margin-top: auto; /* Adds space dynamically */
}

/* Specific adjustments for the 4th item */
.project_info>div:nth-child(4) {
    margin-right: -2.5em;
}

/* Specific adjustments for the 5th item */
.project_info>div:nth-child(5) {
    margin-right: -1.5em;
    text-align: center;
}

.project_info h4 {
    width: max-content;
    color: #ececec;
    font-weight: 500;
    margin: 0 auto;
    font-size: 2.6em;
    grid-column: span 2;
}

.project_info h5 {
    font-size: 1.75em;
    font-weight: 500;
    color: #c7c7c7;
}

.project_info h6 {
    font-size: 1.75em;
    font-weight: 500;
    text-wrap: balance;
}

.project_info a {
    justify-content: center;
    align-items: center;
    display: flex;
}

.company_link {
    margin-top: 1.25em;
    background-color: color-mix(in srgb, var(--gradient-1) 85%, white);
    padding: 1em;
    height: 4.3em;
    margin-left: -0.75em;
    border-radius: 0.75em;
}

.company_link>img {
    max-width: 100%;
    max-height: 100%;
}


.company_play {
    margin-top: 1em;
    background-color: color-mix(in srgb, var(--gradient-1) 85%, white);
    height: 6.5em;
    aspect-ratio: 1;
    margin-left: -0.75em;
    margin-inline: auto;
    border-radius: 50%;
}

.company_play i {
    font-size: 2.4em;
    margin-left: 0.1em;
}

.disabled {
    pointer-events: none;
    opacity: .4;
}


#contact {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    border-radius: 10px;
    width: 60%;
    margin: 20px auto;
}

#contact {
    margin: 40px auto;
    padding: 40px;
    background-color: var(--secondary-color);
}

#contact-text {
    padding-right: 15px;
    line-height: 1.5;
}

#contact form {
    border-radius: inherit;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: space-evenly;
}

#contact form div {
    padding: 5px;
    width: 25%;
}

#contact form input {
    margin: 5px 5px 5px 0;
    height: 30px;
    width: 100%;
    color: black;
}
#contact form button {
    padding: 12px 40px;
}

button {
    background-color: transparent;
    margin: 0 auto;
    border: none;
    outline: none;
    cursor: pointer;

}
.net-icon {
    background-color: var(--main-color-transparent);
    color: var(--main-font-color);
    border-radius: 18%;
    font-size: 1.1rem;
    cursor: pointer;
    margin: 0 auto;
    border: none;
    outline: none;
    transition: 100ms;
}

.larger {
    font-size: 1.12rem;
}

.smaller {
    font-size: 1rem;
}

#gallery {
    background-color: var(--secondary-color);
    padding: 3rem 0 3rem 0;
    margin-bottom: 3rem;
    text-align: center;
}
#gallery h2 {
    margin-bottom: 3rem;
}

#gallery-container {
    margin: 0 10%;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.img-panel {
    flex: 0 0 15%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.img {
    width: 100%;
    vertical-align: middle;
    aspect-ratio: 1;
    transition: 100ms;
    object-fit: cover;
}

.img-panel:hover > .img {
    transform: scale(1.01);
    filter: drop-shadow(0 0 1rem black);
}

.thumb-viewer {
    display: none;
}
.view-open {
    overflow: hidden;
}
.view-open .thumb-viewer {
    z-index: 5;
    display: block;
    background: rgba(0, 0, 0, 0.7);
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
}
.viewer-body {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    text-align: center;
    align-items: center;
    justify-content: center;
}
.viewer-body img {
    max-width: 90%;
    max-height: 90%;
}

.close,
.prev,
.next {
    display: inline-block;
    width: 35px;
    height: 35px;
    cursor: pointer;
    position: absolute;
    margin: auto 15px;
    opacity: 0.6;
    z-index: 5;
    top: 0;
    bottom: 0;
}
.prev {
    left: 15px;
    border-top: 5px solid #bbb;
    border-left: 5px solid #bbb;
    transform: rotate(-45deg);
    -moz-transform: rotate(-45deg);
    -webkit-transform: rotate(-45deg);
}
.next {
    left: auto;
    border-right: 5px solid #bbb;
    border-bottom: 5px solid #bbb;
    right: 15px;
    transform: rotate(-45deg);
    -moz-transform: rotate(-45deg);
    -webkit-transform: rotate(-45deg);
}
.close {
    bottom: auto;
    left: auto;
    top: 15px;
    right: 0;
}
.close::before,
.close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 35px;
    height: 3.5px;
    background-color: #bbb;
    transform-origin: center;
}

.close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}


close:hover,
.prev:hover,
.next:hover {
    opacity: 1;
}

#goup {
    color:#707070;
}

footer {
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 1500px) {
    
    #projects {
        width: 90%;
        flex-direction: column;
        gap:  2.5em;
        margin: 5em auto;
    }

    .project {
        font-size: 0.75em;
    }
    
    #welcome-section {
        margin-top: 65px;
    }
    #about {
        gap: 2em;
    }

    #about-info {
        justify-content: end;
        width: 100%;
    }

    #skills h2 {
        margin: auto;
    }

    #net {
        padding: 0;
    }
    #contact form {
        flex-direction: column;
    }

    #contact form div {
        padding: 5px;
        width: 98%;
    }

    .button {
        max-width: 160px;
        margin: 5px auto;
    }

    .img-panel {
        flex: 0 0 35%;
    }

    #welcome-section h1 {
        font-size: 7vw;
    }
    
    #welcome-section h2 {
        font-size: 5vw;
    }
}

@media (max-width: 1300px) {
    .navbar-element {
        margin: 0 10px;
    }

    #skills h2 {
        padding-left: 0;
    }

    #list-container ul {
        margin-left: 0;
    }

    #network-icons {
        grid-template-areas: "box1 box2" "box3 box4";
    }

    #about {
        grid-template-areas: "A A" "B C";
        padding: 4em 15%;
    }
}

@media (max-width: 732px) {

    .project {
        height: 80vw;
        font-size: 1.85vw;
    }

    header {
        flex-direction: row;
        justify-content: space-between;
        height: 3.5em;
    }

    #logo img {
        height: 70%;
    }

    #hamburger {
        display: block;
    }

    #logo img {
        font-size: 4em;
    }

    #navbar-list {
        top: 0;
        right: 0;
        height: 100%;
        position: fixed;
        background-color: rgba(10, 10, 10, 0.747);
        align-items: center;
        flex-direction: column;
        justify-content: flex-start;
        padding: 15% 10% 0 10%;
        transition: 200ms;
    }

    .navbar-element {
        margin: 0.5em 0;
        padding: 0;
        font-size: 1.5em;
    }

    .nav-active {
        opacity: 0;
        translate: 100%;
    }

    .dropdown {
        margin-top: auto;
        transform: translateY(-120px);
    }

    .dropdown > button {
        font-size: 1.2rem;
        padding: 20px;
        border-radius: 10px;
        outline: none;
        width: 160px;
    }

    /* Style for the dropdown content */
    #dropdown-content {
        display: none;
        transform: translate(-0.08em, -11em);
        position: absolute;
        background-color: var(--main-color-transparent);
        animation: none;
        padding: 0.2em;
    }

    #dropdown-content li {
        font-size: 1.1rem;
        padding: 1.2em 1em;
    }

    #welcome-section {
        margin-top: 3.5em;
        align-items: end;
    }

    .name_description {
        margin-left: 5%;
        margin-bottom: 4.5%;
    }

    #welcome-section h1 {
        font-size: 2.4em;
    }

    #welcome-section h2 {
        font-size: 1.6rem;
    }

    #about {
        grid-template-areas: "A" "B" "C";
        padding: 10%;
        flex-direction: column;
        font-size: 1em;
        align-items: start;
    }

    #about h1,
    #about h2 {
        text-align: center;
    }

    #skills {
        margin-top: 20px;
    }

    #list-container ul {
        margin: 10px auto;
        height: 10em;
    }

    #list-container ul::before {
        width: 11.5rem;
        overflow: hidden;
    }

    #contact {
        flex-direction: column;
    }

    #contact-text {
        padding-right: 0;
        padding-bottom: 15px;
    }
}
@media (max-width: 400px) {
    #welcome-section h1 {
        font-size: 9.6vw;
    }

    #welcome-section h2 {
        font-size: 6.4vw;
    }
}
