/*** VARIABLES ***/

:root {
    /* Colores tema oscuro */
    --color-bg: #111d3b;
    --color-bg-card: rgba(177, 178, 181, 0.2);
    --color-bg-highlight: rgba(177, 178, 181, 0.4);
    --color-accent: #ff4f81;
    --color-accent-hover: #fd7a9f;
    --color-text: #f0f0f0;
    --color-link: #f0f0f0;
    --color-filter: invert(50%) sepia(100%) saturate(3323%) hue-rotate(316deg) brightness(105%) contrast(101%);

    /* Espacios y dimensiones */
    --separation: 1.5em;
    --shadow: 10px 10px 5px 0px rgba(0, 0, 0, 0.2);
    --radius: 0.5em;

    /* Tamano de fuentes */
    --font-xxl: 36px;
    --font-xl: 32px;
    --font-l: 28px;
    --font-m: 24px;
    --font-s: 18px;
}

/* Colores tema claro */

[data-theme="light"] {
    --color-bg: #f0f4ff;
    --color-bg-card: rgba(17, 29, 59, 0.05);
    --color-bg-highlight: rgba(17, 29, 59, 0.15);
    --color-accent: #4f80ff;
    --color-accent-hover: #7ea2fd;
    --color-text: #111d3b;
    --color-link: #f0f0f0;
    --color-filter: invert(45%) sepia(81%) saturate(3728%) hue-rotate(213deg) brightness(111%) contrast(101%);
}

/*** REINICIO DE PROPIEDADES ***/

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

/*** PROPIEDADES GENERALES Y DE BODY ***/

body {
    background-color: var(--color-bg);
    font-family: "Source Sans 3", sans-serif;
    font-size: var(--font-s);
    color: var(--color-text);
    transition: background-color 0.5s ease, color 0.5s ease;
}

/** TITULOS **/

h1, h2, h3, h4, h5, h6 {
    color: var(--color-accent);
    font-weight: normal;
}

h1 {
    font-size: var(--font-xxl);
    font-weight: bolder;
    letter-spacing: 1.5px;
}

h2 {
    font-size: var(--font-xl);
    letter-spacing: 1.5px;
}

h3 {
    font-size: var(--font-l);
}

/** ENLACES **/

a {
    color: var(--color-accent);
    text-decoration: none;
}

/** BOTONES **/

button, .project-source a, #hero-section > div:first-of-type a {
    background-color: var(--color-accent);
    color: var(--color-link);
    font-size: var(--font-s);
    border: none;
    border-radius: var(--radius);
    margin: 0.2em;
    padding: 1%;
    box-shadow: var(--shadow);
    transition: transform 0.7s ease-in-out;
}

button:hover, .project-source a:hover {
    cursor: pointer;
    background-color: var(--color-accent-hover);
    transform: scale(0.9);
}

.project-source a, #hero-section > div:first-of-type a {
    display: block;
    width: fit-content;
    padding: 0.5em 1.5em;
}

#hero-section > div:first-of-type a, #hero-section > div:first-of-type a:hover {
    position: absolute;
    transform: translateY(160px);
}

#hero-section > div:first-of-type a:hover {
    position: absolute;
    transform: translateY(160px) scale(1.1);
    cursor: pointer;
    background-color: var(--color-accent-hover);
}

/** CATEGORIAS **/

.categories {
    display: flex;
    margin: var(--separation);
}

/** WRAPPERS DE CONTENEDORES **/

.wrapper {
    margin: auto;
    width: 100%;
}

.wrapper > div, .wrapper section {
    margin: var(--separation) auto;
    width: 60%;
}

.wrapper > div {
    background-color: var(--color-bg-card);
    height: 76px;
}

.wrapper section {
    border: 1px dotted var(--color-accent);
    border-width: medium;
}

/*** CABECERA Y PIE DE PAGINA ***/

body .header-footer-buttons {
    background-color: transparent;
    box-shadow: none;
    color: var(--color-accent);
    padding: var(--separation);
    font-size: 150%;
}

body .header-footer-buttons:hover {
    transform: none;
    transition: none;
    color: var(--color-accent-hover);
}

#main-header h2, #main-footer h2 {
    padding: 2% 2% 2%;
}

/** CABECERA **/

#main-header {
    position: sticky;
    top: 0;
    background-color: var(--color-bg);
    z-index: 3;
}

#main-header > div  {
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

#main-header > div > div {
    display: flex;
    justify-content: start;
}

#toggle-lang {
    background-color: transparent;
    box-shadow: none;
}

#toggle-lang:hover {
    cursor: pointer;
    transition: none;
    transform: none;
}

#es {
    display: none;
}

#en {
    display: flex;
}

#light-theme, #dark-theme {
    display: none;
}

/* NAVEGACION */

#dropdown {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 35%;
    z-index: 2;
    background-color: var(--color-bg);
    border-left: 1px solid var(--color-accent);
    transition: transform 1.5s ease-in-out;
    transform: translateX(100%);
}

#dropdown div:first-of-type {
    display: flex;
    justify-content: flex-end;
}

#close-dropdown {
    font-size: var(--font-xxl);
    text-align: right;
    color: var(--color-accent);
    margin: 4%;
}

#dropdown ul {
    margin: 0 var(--separation);
}

#dropdown ul li {
    list-style: none;
    text-align: left;
}

#dropdown ul li:first-of-type {
    color: var(--color-text);
    margin-top: var(--separation); 
    font-size: var(--font-s);
}

#dropdown .header-footer-buttons {
    padding: 2%;
}

#dropdown ul li a {
    font-size: var(--font-l);
}

#dropdown ul li a:hover, #close-dropdown:hover {
    cursor: pointer;
    color: var(--color-accent-hover);
}

/** PIE DE PAGINA **/

#main-footer > div  {
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

#main-footer > div > div {
    display: flex;
}

/*** SECCIONES ***/

section {
    padding-bottom: var(--separation);
}

.section-title {
    width: fit-content;
    margin-top: -20px;
    margin-left: 12px;
    padding: 0 0.5em;
    background-color: var(--color-bg);
    transition: background-color 0.5s ease, color 0.5s ease;
}

/** SECCION HERO **/

#hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80vh;
    border: none;
}

#hero-section > div:first-of-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: var(--separation);
    height: 400px;
    width: 300px;
}

#hero-section > div:last-of-type div:last-of-type {
    background-color: var(--color-bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

#pink-portrait, #blue-portrait {
    height: 80%;
    display: none;
}

#hero-section h2 {
    margin: 0.5% auto 4%;
}

#hero-section-content {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    margin: var(--separation);
    height: 80%;
    width: 60%;
}

#hero-section .fa-brands {
    font-size: 150%;
    padding: 2%;
}

#hero-section .fa-brands:first-of-type {
    padding-left: 4%;
}

#hero-section .fa-brands:hover {
    cursor: pointer;
    color: var(--color-accent-hover);
}

/** SECCION DE HABILIDADES **/

#skills-wrapper {
    display: flex;
    justify-content: space-evenly;
}

#skills-wrapper > div {
    width: 28%;
}

#skills-wrapper div {
    margin: var(--separation) auto;
    text-align: center;
}

#skills-wrapper .skills-content {
    background-color: var(--color-bg-card);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

#skills-wrapper .skill-item {
    background-color: var(--color-bg-highlight);
    display: flex;
    margin: var(--separation);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    transition: transform 0.7s ease-in-out;
}

#skills-wrapper .skill-item:hover {
    cursor: pointer;
    transform: scale(1.1);
}

#skills-wrapper .skill-item:nth-child(2n) {
    margin: 0 var(--separation);
}

#skills-wrapper .skill-item:last-child {
    margin-bottom: var(--separation);
}

#skills-wrapper .item-icon svg {
    width: 56px;
    height: 56px;
    fill: var(--color-accent);
}

.skill-icon span {
    font-size: var(--font-xl);
}

#objectives div, #todo div {
    margin: var(--separation);
    background-color: var(--color-bg-card);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

#objectives div ul, #todo div ul {
    list-style-position: inside;
    padding: var(--separation);
    font-size: var(--font-m);
}

/** SECCION DE PROYECTOS **/

#projects h3 {
    font-size: var(--font-l);
    color: var(--color-text);
}

#projects .project-card {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.project-card article {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    min-width: 0;
    background-color: var(--color-bg-card);
    margin: var(--separation);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    transition: transform 0.7s ease-in-out;
}

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

#projects header {
    margin: var(--separation);
    margin-bottom: 0;
}

#projects .project-content {
    margin: var(--separation);
}

#projects footer {
    display: flex;
    justify-content: center;
    margin: var(--separation);
    gap: 1.5em;
    margin-top: auto;
}

#projects .project-tech {
    width: 60%;
    display: flex;
    align-items: center;
}

.project-tech img {
    width: 48px;
    height: 48px;
}

#projects .project-source {
    display: flex;
    justify-content: flex-end;
    width: 28%;
}

.project-card header img {
    width: 100%;
}

.no-image img {
    filter: var(--color-filter);
}

/** SECCIONES DE FORMACION Y EXPERIENCIA LABORAL **/ 

.experience article {
    background-color: var(--color-bg-card);
    margin: var(--separation);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.experience article:nth-child(2n+1) {
    flex-flow: row-reverse;
    text-align: right;
}

.experience article h2 {
    font-size: var(--font-l);
}

.experience article h3 {
    font-size: var(--font-m);
    color: var(--color-text);
}

.experience article div {
    margin: var(--separation);
}

.experience article div:first-of-type {
    width: 28%;
    display: flex;
    justify-content: center;
    margin: var(--separation) 0;
}

.experience article div:first-of-type img {
    max-width: 50%;
    filter: var(--color-filter);
}

.experience article div:last-of-type {
    width: 60%;
}

/*** BOTON VOLVER ARRIBA ***/

.btt-button {
	display: flex;
	position: fixed;
	right: 2%;
	bottom: 0;
	margin: 2% auto;
	opacity: 0;
	transition: opacity 1s ease, transform 0.7s ease-in-out;
}

.show {
	opacity: 1;
	pointer-events: auto;
	cursor: pointer;
}
