:root {
	--header-height: 15dvh;
	--contact-menu-width: 8dvw;
}

html,
body {
	overflow-x: hidden;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	font-family: "Inter Tight", sans-serif;
	text-decoration: none;
	list-style: none;
	color: white;
}

body {
	min-height: 100%;
	background: rgb(0, 0, 0);
	background: linear-gradient(
		39deg,
		rgba(0, 0, 0, 1) 0%,
		rgba(0, 73, 68, 1) 53%
	);
}

header {
	background: rgb(0, 0, 0);
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0.8) 30%,
		rgba(0, 0, 0, 0.5) 60%,
		rgba(0, 0, 0, 0) 100%
	);
	position: fixed;
	top: 0;
	width: 100%;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--header-height);
	padding-inline: 5vw;
}

main {
	display: grid;
	grid-template-columns: var(--contact-menu-width) 1fr;
	margin-block-start: var(--header-height);
	margin-block-end: 1rem;
	min-height: calc(100dvh - var(--header-height) - 1rem);
}

section {
	margin-inline-end: 5vw;
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	column-gap: 5vh;
	row-gap: 2vh;
}

#home-link {
	font-size: 30px;
	font-weight: 800;
	cursor: pointer;
	display: flex;
	align-items: center;
	transition: transform 1s ease;
	img {
		height: 30px;
		margin-inline-end: 1rem;
	}
	&:hover {
		transform: scale(1.1);
	}
}

#navigation-list ul {
	display: flex;
}

#navigation-list li {
	margin-left: 3rem;
	font-size: 15px;
	font-weight: 600;
	border-bottom: 2px solid transparent;
	transition: border-bottom-color 0.5s ease;
}

#navigation-list li:hover {
	cursor: pointer;
	border-bottom-color: white;
}

#toggle-menu {
	display: none;
	cursor: pointer;
	z-index: 30;
	font-size: 40px;
	transition: all 0.5s ease;
}

#toggle-menu:hover {
	transform: scale(1.1);
}

.social-media-bar :is(nav, ul) {
	height: 100%;
}

.social-media-bar ul {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.social-media-bar li {
	font-size: 20px;
	margin: 20px;
}

.social-media-bar i {
	display: inline-block;
	transition: all 0.5s ease;
}

.social-media-bar i:hover {
	transform: translateY(-3px);
	color: rgb(84, 84, 84);
}

#toggle-social-bar {
	display: none;
	width: 60px;
	height: 60px;
	background-color: rgba(0, 0, 0, 0.6);
	border-radius: 50%;
	z-index: 30;
	position: fixed;
	bottom: 3vw;
	right: 3vw;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 0.5s ease;
}

#toggle-social-bar:hover {
	transform: translateY(-5px);
}

#hero-text h4 {
	font-size: 1.4rem;
	font-weight: 500;
}

#hero-text h1 {
	font-size: 2.8rem;
	margin-bottom: 30px;
}

#hero-text p {
	font-size: 0.9rem;
	margin-bottom: 30px;
}

.button {
	display: inline-block;
	font-size: 0.6rem;
	font-weight: 500;
	background-color: rgba(0, 0, 0, 0.6);
	border: 1px solid transparent;
	padding: 10px 15px;
	border-radius: 30px;
	text-transform: uppercase;
	transition: all 0.5s ease;
	&:hover {
		background-color: transparent;
		border: 1px solid white;
		transform: translateX(5px);
	}
	&.disabled {
		transform: none;
		cursor: default;
		background-color: rgba(0, 0, 0, 0.4);
		color: rgba(255, 255, 255, 0.6);
		border-color: rgba(255, 255, 255, 0.6);
	}
}

:has(> .tooltip) {
	position: relative;
	&:is(:hover, :focus) .tooltip {
		display: inline-flex;
	}
}

.tooltip {
	position: absolute;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	text-align: center;
	padding: 1em;
	background-color: rgba(0, 0, 0, 0.8);
	color: white;
	bottom: calc(100% + 1em * 2);
	border-radius: 5px;
	left: 0;
	width: 100%;
	display: none;
	&::after {
		content: "";
		display: block;
		position: absolute;
		top: 100%;
		left: calc(50% - 5px);
		border-top: 8px solid rgba(0, 0, 0, 0.8);
		border-left: 5px solid transparent;
		border-right: 5px solid transparent;
	}
}

#hero-img img {
	display: block;
	margin: auto;
	width: 26vw;
	border: 8px solid rgb(0, 53, 49);
	border-radius: 50%;
	transition-property: transform, opacity;
	transition-timing-function: ease;
	transition-duration: 3s;
}

#hero-img img:hover {
	transform: scale(1.1);
	opacity: 0.8;
}

/* Skills section */

.container {
	border: 1px solid white;
	border-radius: 10px;
	padding: 1rem;
	width: 100%;
}

#tools-and-skills {
	grid-column: 2;
	justify-content: start;
	align-items: start;
	grid-template-columns: 9fr 3fr;
	h3 {
		border-block-end: 1px solid white;
		padding-block-end: 1rem;
		margin-block-end: 1rem;
	}
}

.tool-category {
	font-weight: 600;
	margin-block-end: 1rem;
}

.skill {
	display: inline-flex;
	align-items: center;
	text-align: center;
	padding: 0.4rem 1.2rem;
	margin: 0 0.4rem 1rem 0;
	border-radius: 3rem;
	border: solid 1px black;
	background-color: rgba(0, 0, 0, 0.6);
	color: white;
	cursor: default;
	transition: all 0.2s ease-in;
	&:hover {
		transform: scale(1.1);
		background-color: rgba(0, 0, 0, 0.8);
		border: solid 1px white;
	}
}

/* Projects section */

#projects {
	grid-column: 2;
	align-items: stretch;
	grid-template-columns: repeat(3, 1fr);
	gap: 2vh;
}

.project {
	display: flex;
	flex-direction: column;
}

.project .header {
	display: flex;
	column-gap: 2vh;
	align-items: center;
	padding-bottom: 2vh;
	border-bottom: 1px solid white;
	img {
		height: 50px;
	}
	h4 {
		flex-grow: 1;
	}
}

.project .content {
	flex-grow: 1;
	p {
		margin-block: 2vh;
	}
	.tools {
		font-size: 0.8em;
	}
}

.project .footer {
	display: flex;
	justify-content: end;
	.button {
		margin-inline-start: 2vh;
		&.visit-demo {
			border-color: white;
		}
	}
}

/* Inicializacion de secciones */

section {
	display: none;
	&.visible {
		display: grid;
	}
}

/* Scroll Reveal UX Trick 
	https://scrollrevealjs.org/guide/user-experience.html
*/

html.sr :is(#hero-img, #hero-text, #tools, #skills, .project) {
	visibility: hidden;
}

@media screen and (max-width: 720px) {
	main {
		grid-template-columns: 1fr;
		margin-inline-end: 0;
	}

	section {
		margin-inline: 1rem;
		margin-block-end: 6vh;
		grid-template-columns: 1fr;
	}

	#hero,
	#tools-and-skills,
	#projects {
		grid-template-columns: 1fr;
		align-items: start;
	}

	#navigation-list {
		max-width: 90vw;
		background: rgb(0, 0, 0);
		background: radial-gradient(
			circle,
			rgba(0, 0, 0, 1) 0%,
			rgba(0, 0, 0, 0.7) 100%
		);
		position: absolute;
		top: var(--header-height);
		right: -100%;
		transition: right 0.5s ease;
		border-radius: 10px;
	}

	#navigation-list ul {
		padding: 5vh 10vw;
		flex-direction: column;
		justify-content: center;
	}

	#navigation-list li {
		display: inline-block;
		width: fit-content;
		margin: 15px 0;
	}

	#toggle-menu {
		display: block;
	}

	.social-media-bar ul {
		flex-direction: row;
		background: rgb(0, 0, 0);
		background: radial-gradient(
			circle,
			rgba(0, 0, 0, 1) 0%,
			rgba(0, 0, 0, 0.7) 100%
		);
		padding-inline: 3vh;
		height: 60px;
		border-radius: 10px;
		position: fixed;
		bottom: -100%;
		transition: bottom 0.5s ease;
		right: 1rem;
		z-index: 30;
	}

	#toggle-social-bar {
		display: inline-flex;
	}

	#hero-text {
		order: 1;
		margin-bottom: 5vw;
	}

	#hero-img img {
		width: 70vw;
	}
}
