/* GOOGLE FONTS */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap");

/* VARIABLES CSS */
:root {
    --header-height: 3.5rem;
    --section-height: 65vh;

    /* Colors */
    /* Color mode HSL (hue, saturation, lightness) */
    --black-color: hsl(220, 24%, 12%);
    --black-color-light: hsl(220, 24%, 15%);
    --black-color-lighten: hsl(220, 20%, 18%);
    --grey-one: hsl(0, 0%, 20%);
    --grey-two: hsl(0, 0%, 97%);
    --white-color: hsl(0, 0%, 100%);
    --acent-color: hsl(212, 97%, 43%);
    --body-color: linear-gradient(135deg, hsl(240, 22%, 15%), hsl(240, 16%, 20%));

    /* Font and typography */
    /* .5rem = 8px | 1rem = 16px ... */
    --body-font: "Montserrat", sans-serif;
    --normal-font-size: .938rem;

    /* Font weight */
    --font-regular: 400;
    --font-semi-bold: 600;

    /* z-index */
    --z-tooltip: 10;
    --z-fixed: 100;
}

/* Responsive typography */
@media screen and (min-width: 1024px) {
    :root {
        --normal-font-size: 1rem;
    }
}

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

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background: var(--body-color);
    color: var(--white-color);
    line-height: 1.6;
}
.accent {
    color: var(--acent-color);
    font-style: var(--font-semi-bold);
}

ul {
    list-style: none;
    /*-webkit-tap-highlight-color: transparent;*/
    /* optional: remove tap highlight on mobile */
}

a {
    text-decoration: none;
}

/* REUSABLE CSS CLASSES */
.container {
    max-width: 1120px;
    margin-inline: 1.5rem;
}

/* HEADER */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-fixed);
}

/* NAV */
.nav {
    height: var(--header-height);
}

.nav__logo,
.nav__burger,
.nav__close {
    color: var(--white-color);
}

.nav__data {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    display: inline-flex;
    align-items: center;
    column-gap: .25rem;
    font-weight: var(--font-semi-bold);
    /*-webkit-tap-highlight-color: transparent;*/
    /* optional: remove tap highlight on mobile */
}

.nav__logo i {
    font-weight: initial;
    font-size: 1.25rem;
}

.nav__toggle {
    position: relative;
    width: 32px;
    height: 32px;
}

.nav__burger,
.nav__close {
    position: absolute;
    width: max-content;
    height: max-content;
    inset: 0;
    margin: auto;
    font-size: 1.25rem;
    cursor: pointer;
    transition: opacity .1s, transform .4s;
}

.nav__close {
    opacity: 0;
}

/* Navigation for mobile devices */
@media screen and (max-width: 1118px) {
    .nav__menu {
        position: absolute;
        left: 0;
        top: 2.5rem;
        width: 100%;
        height: calc(100vh - 3.5rem);
        overflow: auto;
        pointer-events: none;
        opacity: 0;
        transition: top .4s, opacity .3s;
    }

    .nav__menu::-webkit-scrollbar {
        width: 0;
    }

    .nav__list {
        padding-top: 1rem;
    }
}

.nav__link {
    color: var(--white-color);
    font-weight: var(--font-semi-bold);
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color .3s;
}

.nav__link:hover {
    background-color: var(--black-color-light);
}

/* Show menu */
.show-menu {
    opacity: 1;
    top: var(--header-height);
    pointer-events: initial;
}

/* Show icon */
.show-icon .nav__burger {
    opacity: 0;
    transform: rotate(90deg);
}

.show-icon .nav__close {
    opacity: 1;
    transform: rotate(90deg);
}

/* DROPDOWN */
.dropdown__item {
    cursor: pointer;
}

.dropdown__arrow {
    font-size: 1.25rem;
    font-weight: initial;
    transition: transform .4s;
}

.dropdown__link,
.dropdown__sublink {
    padding: 1.25rem 1.25rem 1.25rem 2.5rem;
    color: var(--white-color);
    background-color: var(--black-color-light);
    display: flex;
    align-items: center;
    column-gap: .5rem;
    font-weight: var(--font-semi-bold);
    transition: background-color .3s;
}

.dropdown__link i,
.dropdown__sublink i {
    font-size: 1.25rem;
    font-weight: initial;
}

.dropdown__link:hover,
.dropdown__sublink:hover {
    background-color: var(--black-color);
}

.dropdown__menu,
.dropdown__submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease-out;
}

/* Show dropdown menu & submenu */
.dropdown__item:hover .dropdown__menu,
.dropdown__subitem:hover>.dropdown__submenu {
    max-height: 1000px;
    transition: max-height .4s ease-in;
}

/* Rotate dropdown icon */
.dropdown__item:hover .dropdown__arrow {
    transform: rotate(180deg);
}

/* DROPDOWN SUBMENU */
.dropdown__add {
    margin-left: auto;
}

.dropdown__sublink {
    background-color: var(--black-color-lighten);
}

/* BREAKPOINTS */
/* For small devices */
@media screen and (max-width: 340px) {
    .container {
        margin-inline: 1rem;
    }

    .nav__link {
        padding-inline: 1rem;
    }
}

/* For large devices */
@media screen and (min-width: 1118px) {
    .container {
        margin-inline: auto;
    }

    .nav {
        height: calc(var(--header-height) + 2rem);
        display: flex;
        justify-content: space-between;
    }

    .nav__toggle {
        display: none;
    }

    .nav__list {
        height: 100%;
        display: flex;
        column-gap: 3rem;
    }

    .nav__link {
        height: 100%;
        padding: 0;
        justify-content: initial;
        column-gap: .25rem;
    }

    .nav__link:hover {
        background-color: transparent;
    }

    .dropdown__item,
    .dropdown__subitem {
        position: relative;
    }

    .dropdown__menu,
    .dropdown__submenu {
        max-height: initial;
        overflow: initial;
        position: absolute;
        left: 0;
        top: 6rem;
        opacity: 0;
        pointer-events: none;
        transition: opacity .3s, top .3s;
    }

    .dropdown__link,
    .dropdown__sublink {
        padding-inline: 1rem 3.5rem;
    }

    .dropdown__subitem .dropdown__link {
        padding-inline: 1rem;
    }

    .dropdown__submenu {
        position: absolute;
        left: 100%;
        top: .5rem;
    }

    /* Show dropdown menu */
    .dropdown__item:hover .dropdown__menu {
        opacity: 1;
        top: 5.5rem;
        pointer-events: initial;
        transition: top .3s;
    }

    /* Show dropdown submenu */
    .dropdown__subitem:hover>.dropdown__submenu {
        opacity: 1;
        top: 0;
        pointer-events: initial;
        transition: top .3s;
    }
}

/* Section Base Style */
.section {
    height: var(--section-height);
    padding: 50px 20px;
    text-align: center;
}

/* Hero Section Styles */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.hero .content h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.hero .content p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Button Base Style */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: var(--font-semi-bold);
    color: var(--white-color);
    background-color: #24292e;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease-in-out;
}

.btn:hover {
    background-color: var(--acent-color);
    transform: scale(1.05);
}

/* Technologies Section Styles */
.technologies h2 {
    font-size: 28px;
    margin-bottom: 20px;
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.tech {
    background-color: #333;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: var(--font-semi-bold);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.tech:hover {
    transform: scale(1.1);
    background-color: var(--acent-color);
}

/* Projects Section Styles */
.projects h2 {
    font-size: 28px;
    margin-bottom: 40px;
}

.projects-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background-color: #2a2a3a;
    padding: 20px;
    border-radius: 8px;
    width: 300px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: scale(1.05);
}

.project-card h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.project-card p {
    font-size: 16px;
    margin-bottom: 15px;
}

.btn-project {
    display: inline-block;
    padding: 10px 20px;
    background-color: #24292e;
    color: var(--white-color);
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn-project:hover {
    background-color: #0366d6;
}

/* Footer Styles */
footer {
    padding: 20px;
    background: #1e1e2f;
    text-align: center;
    font-size: 14px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .navbar ul {
        flex-direction: column;
    }

    .navbar li {
        margin: 10px 0;
    }

    .hero .content h1 {
        font-size: 28px;
    }

    .hero .content p {
        font-size: 16px;
    }

    .technologies h2,
    .projects h2 {
        font-size: 24px;
    }

    .tech {
        font-size: 14px;
        padding: 10px 14px;
    }

    .project-card {
        width: 90%;
    }
}