@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* Table of Contents */

/* 1. Reset/Normalize */
/* 2. Base/Global Styles */
/* 3. Variables */
/* 4. Utilities */
/* 5. Layout */
/* 6. Components */
/* 7. Media Queries */

/* ===============================
   1. Reset/Normalize
================================== */
* {
    padding: 0;
    margin: 0;
    border: 0;
    outline: 0;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    box-shadow: none;
    box-sizing: border-box;
}


/* ===============================
   2. Variables
================================== */
.light-mode {
    --bg: #f4f5f6;
    --bg-alt: #ffffff;
    --fg: #333333;
    --fg-alt: #111111;
    --primary: #306cc4;
    --primary-alt: #185dc7;
    --primary-light: rgba(44, 93, 206, 0.1);
    --container-shadow-alt: rgba(0, 0, 0, 0.15) 0px 3px 3px 0px;
    --container-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark-mode {
    --bg: #0a0a23;
    --bg-alt: rgba(34, 40, 56, 0.35);
    --fg: #c4c4dd;
    --fg-alt: #e0e0ff;
    --primary: #6d67d0;
    --primary-alt: #5a54b0;
    --primary-light: rgba(109, 103, 208, 0.1);
    --container-shadow-alt: rgba(0, 0, 0, 0.15) 0px 3px 3px 0px;
    --container-shadow: rgba(0, 0, 0, 0.12) 0px 4px 6px -1px,
        rgba(0, 0, 0, 0.08) 0px 2px 4px -1px;
}


/* ===============================
   3. Base/Global Styles
================================== */
::-moz-selection {
    background: var(--primary);
    color: var(--bg);
}

::-webkit-selection,
::selection {
    background: var(--primary);
    color: var(--bg);
}

::-webkit-scrollbar {
    width: 16px;
}

::-webkit-scrollbar-track {
    background-color: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
    border: 4px solid var(--bg);
    background-color: var(--primary);
    border-radius: 0.5em;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-alt);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", sans-serif;
    line-height: 1.5;
    color: var(--fg);
    background-color: var(--bg);
    transition: background-color 0.3s, color 0.3s;
}

header {
    height: 8em;
    max-width: 1100px;
    width: 90%;
    margin: 0 auto;
    justify-content: space-between;
}

main {
    max-width: 1100px;
    width: 90%;
    margin: 0 auto;
}

footer {
    padding: 3em 0;
    margin-top: 4em;
    text-align: center;
}

h1,
h2,
h3,
h4 {
    line-height: 1.2;
    color: var(--fg-alt);
}

h1 {
    font-size: 2.441rem;
}

.h1 {
    font-size: 3.906rem;
}

h2 {
    font-size: 1.953rem;
}

h3 {
    font-size: 1.563rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1rem;
}

h6 {
    font-size: 0.85rem;
}

ul {
    list-style-type: none;
}

a {
    text-decoration: none;
}

button {
    cursor: pointer;
}


/* ===============================
   4. Utilities
================================== */
.center {
    display: flex;
    align-items: center;
}

.btn {
    display: block;
    padding: 0.8em 1.4em;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: lowercase;
    transition: transform 0.2s ease-in-out;
}

.link {
    color: var(--primary);
    padding: 0 0 0.3em 0;
    position: relative;
}

.link:hover {
    color: var(--primary);
}

.link::before {
    content: "";
    display: inline;
    width: 0%;
    height: 0.2em;
    position: absolute;
    bottom: 0;
    background-color: var(--primary);
    transition: width 0.2s ease-in;
}

.link:hover::before,
.link:focus::before {
    width: 100%;
}

.btn-outline {
    color: var(--primary);
    border: 2px solid var(--primary);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-outline:focus,
.btn-outline:hover {
    color: var(--bg);
}

.btn-outline:before {
    content: "";
    position: absolute;
    background-color: var(--primary);
    right: 100%;
    bottom: 0;
    left: 0;
    top: 0;
    z-index: -1;
    transition: right 0.2s ease-in-out;
}

.btn-outline:hover::before,
.btn-outline:focus::before {
    right: 0;
}


/* ===============================
   5. Layout
================================== */
.about {
    flex-direction: column;
    margin-top: 3em;
}

.section {
    margin-top: 5em;
}

.section-title {
    text-align: center;
    margin-bottom: 1em;
    text-transform: uppercase;
}

/* .projects {} */

/* .skills {} */

.contact {
    flex-direction: column;
}

.footer-link {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--fg);
}

.scroll-top {
    display: none;
    position: fixed;
    bottom: 1em;
    right: 2em;
    background-color: transparent;
    font-size: 1.8rem;
    transition: transform 0.2s ease-in-out;
}


/* ===============================
   6. Components
================================== */
/* header */
.menu-list {
    /* margin-right: 1.5em; */
    display: flex;
}

.menu-item {
    margin-left: 1.5em;
}

.menu-link {
    color: var(--fg);
    text-transform: lowercase;
    font-weight: 500;
}

.menu-list-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.btn-icon {
    margin-left: 1.5em;
    padding: 0;
    font-size: 1.2rem;
    background-color: inherit;
}

.btn-icon:hover,
.btn-icon:focus {
    color: var(--primary);
}

.btn-icon:active {
    transform: translateY(-5px);
}

.hamburger {
    display: none;
    width: 1em;
}

/* main */
.about-name {
    color: var(--primary);
}

.about-role {
    margin-top: 1.2em;
}

.about-desc {
    font-size: 1rem;
    max-width: 600px;
}

.about-desc,
.about-contact {
    margin-top: 2.4em;
}

.about .icon-link {
    margin-right: 0.8em;
}

.about .btn-outline {
    margin-right: 1em;
}

.projects-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.projects-grid>* {
    width: 100%;
}

.projects-button {
    flex-direction: column;
    margin-top: 2.4em;
}

.project {
    padding: 2em;
    margin: 0 auto;
    text-align: center;
    background-color: var(--bg-alt);
    box-shadow: var(--container-shadow);
    transition: transform 0.2s linear;
}

.project:hover {
    transform: translateY(-7px);
}

.project-description {
    margin-top: 1em;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 1.2em 0;
}

.project-stack-item {
    margin: 0.5em;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--fg-alt);
}

.project .icon-link {
    margin-left: 0.5em;
}

.icon-link {
    color: var(--fg);
    font-size: 1.2rem;
}

.skills-list {
    /* max-width: 450px; */
    width: 90%;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.skills-item {
    text-align: center;
    margin: 0.5em;
}

.btn-plain {
    text-transform: initial;
    background-color: var(--bg);
    box-shadow: var(--container-shadow-alt);
    border: 0;
}

.btn-plain:hover {
    transform: translateY(-4px);
}


/* ===============================
   7. Media Queries
================================== */
@media (max-width: 900px) {
    .h1 {
        font-size: 2.6rem;
    }
}

@media (min-width: 768px) {
    .projects-grid>* {
        width: calc((100% - 4rem) / 3);
    }
}

@media (max-width: 641px) {
    .header {
        height: 6em;
    }

    .section {
        margin-top: 4em;
    }

    .menu-list {
        flex-direction: column;
        padding: 4em 0;
        position: absolute;
        right: 0;
        left: 0;
        top: 5em;
        background-color: var(--bg);
        width: 0;
        overflow: hidden;
        transition: width 0.2s ease-in-out;
    }

    .display-menu-list {
        width: 100%;
        z-index: 99999;
        /* Un número alto para asegurarte de que esté encima de todo */
    }

    .menu-item {
        margin: 0.5em 0;
    }

    .hamburger {
        display: flex;
        /* margin-left: 0.8em; */
    }

    .about {
        align-items: flex-start;
        margin-top: 2em;
    }

    .footer {
        padding: 2em;
        margin-top: 3em;
    }

    /* .scroll-container {
        display: none;
    } */
}