/* ==========================================================================
   Felipe Castello — style.css
   Versão estática. Baseada no layout original "Empathy" (pixelwars).
   ========================================================================== */

:root {
	--primary: #8acb82;
	--primary-dark: #7db376;
	--sidebar-bg: #1c262b;
	--sidebar-title-bg: #2ba163;
	--text: #345;
	--text-muted: rgba(28, 38, 43, 0.5);
	--link: #096;
	--sidebar-w: 120px;
	--header-h: 50px;
	--font-body: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	--font-head: "Montserrat", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

/* ----- Base ----- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--text);
	background: #2e363a;
}

h1, h2, h3, h4, h5, h6,
.h2, .h4,
.nav-menu,
.button {
	font-family: var(--font-head);
}

h1, h2, h3, h4, h5, h6 {
	margin: 0;
	line-height: 1.2;
}

p {
	margin: 0 0 1.2em;
	line-height: 1.5;
}

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

a:hover {
	color: var(--primary);
}

:focus-visible {
	outline: 2px solid var(--primary);
	outline-offset: 2px;
}

img {
	max-width: 100%;
	height: auto;
}

ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

::selection {
	color: #333;
	background: #ffffcf;
	text-shadow: none;
}

.icon {
	display: inline-block;
	width: 1em;
	height: 1em;
	fill: currentColor;
	vertical-align: middle;
	flex-shrink: 0;
}

.center {
	text-align: center;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ==========================================================================
   Header / menu lateral
   ========================================================================== */
.header {
	position: fixed;
	z-index: 200;
	top: 0;
	left: 0;
	width: 100%;
	height: var(--header-h);
	background: var(--sidebar-bg);
}

.menu-toggle {
	position: absolute;
	top: 0;
	left: 0;
	display: grid;
	place-items: center;
	width: var(--header-h);
	height: var(--header-h);
	padding: 0;
	font-size: 18px;
	color: #fff;
	cursor: pointer;
	background: none;
	border: 0;
	border-right: 2px solid rgba(255, 255, 255, 0.08);
}

.menu-toggle:hover {
	color: rgba(255, 255, 255, 0.8);
}

.site-title {
	display: none;
	margin: 0;
	font-family: var(--font-head);
	font-size: 12px;
	font-weight: 700;
	color: #fff;
}

.mobile-title {
	display: block;
	position: absolute;
	top: 0;
	left: 70px;
	line-height: var(--header-h);
}

.header-wrap {
	position: fixed;
	z-index: 2000;
	top: 0;
	bottom: 0;
	left: calc(var(--sidebar-w) * -1);
	width: var(--sidebar-w);
	overflow-x: hidden;
	overflow-y: auto;
	text-align: center;
	background: var(--sidebar-bg);
	visibility: hidden;
	transition: visibility 0s 0.2s;
}

.avatar {
	display: block;
	width: 100%;
	max-width: var(--sidebar-w);
}

/* Navegação */
.nav-menu li {
	font-size: 10px;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	border-bottom: 1px solid rgba(225, 246, 255, 0.07);
}

.nav-menu a {
	display: block;
	padding: 1.3em 1em;
	color: rgba(225, 246, 255, 0.45);
	transition: color 0.1s;
}

.nav-menu a:hover {
	color: rgba(225, 246, 255, 0.7);
}

.nav-menu a[aria-current="page"] {
	color: #fff;
}

.nav-menu .icon {
	display: block;
	margin: 0 auto 0.2em;
	font-size: 2.5em;
}

.header-bottom {
	width: 100%;
	margin-top: 2em;
}

.header .social {
	margin: 1em 0;
	padding: 0 6px;
}

.header .social a {
	width: 22px;
	height: 22px;
	margin: 0;
	font-size: 14px;
	color: rgba(225, 246, 255, 0.3);
	border: 0;
}

.header .social a:hover {
	color: rgba(255, 255, 255, 0.7);
	background: none;
}

.copy-text {
	margin: 0 0 1em;
	font-size: 12px;
	color: rgba(225, 246, 255, 0.3);
}

/* Menu aberto (mobile) */
.site {
	transition: transform 0.2s ease-out;
}

.menu-open .site {
	transform: translateX(var(--sidebar-w));
}

.menu-open .header-wrap {
	visibility: visible;
	transition-delay: 0s;
}

/* ==========================================================================
   Layout das páginas
   ========================================================================== */
.site-main {
	padding-top: var(--header-h);
}

.page {
	position: relative;
	min-height: 100vh;
	background-color: #fff;
	background-position: center;
	background-size: cover;
}

/* Com JS: cada seção ocupa a tela e há transição entre elas */
.js,
.js body {
	height: 100%;
	overflow: hidden;
}

.js .site {
	position: fixed;
	inset: 0;
}

.js .site-main {
	position: absolute;
	inset: var(--header-h) 0 0 0;
	padding: 0;
	overflow: hidden;
}

.js .page {
	position: absolute;
	inset: 0;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	visibility: hidden;
	scrollbar-width: thin;
	scrollbar-color: rgba(28, 38, 43, 0.2) transparent;
}

.js .page.is-current {
	visibility: visible;
	z-index: 1;
}

/* Cores de fundo das seções */
#home    { background-color: #2e2f2d; }
#resume  { background-color: #ebf0df; }
#contact { background-color: #e5dcc5; }

.content {
	position: relative;
	z-index: 10;
}

.layout-medium {
	width: 90%;
	max-width: 1040px;
	margin: 0 auto;
	padding: 2em 0 3em;
}

.light-text {
	color: #fff;
}

/* Transições de página (equivalentes às animações 15/16 do tema original) */
.pt-ontop { z-index: 999 !important; }
.pt-move-to-top      { animation: pt-to-top 0.7s ease-in-out both; }
.pt-move-to-bottom   { animation: pt-to-bottom 0.7s ease-in-out both; }
.pt-move-from-bottom { animation: pt-from-bottom 0.6s ease both; }
.pt-move-from-top    { animation: pt-from-top 0.6s ease both; }

@keyframes pt-to-top      { to   { transform: translateY(-100%); } }
@keyframes pt-to-bottom   { to   { transform: translateY(100%); } }
@keyframes pt-from-bottom { from { transform: translateY(100%); } }
@keyframes pt-from-top    { from { transform: translateY(-100%); } }

/* ==========================================================================
   Módulos
   ========================================================================== */

/* Título da página */
.page-title {
	margin: 0;
	padding: 0.6em 0;
	font-size: 1.8em;
	letter-spacing: -2px;
	text-align: center;
}

.page-title .icon {
	display: block;
	margin: 0 auto;
	font-size: 50px;
}

/* Título de seção (fita) */
.section-title {
	position: relative;
	isolation: isolate;
	width: fit-content;
	margin: 2em auto;
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0.2em;
	text-align: center;
	text-transform: uppercase;
	max-width: calc(100% - 3em);
}

@media (min-width: 480px) {
	.section-title {
		white-space: nowrap;
	}
}

.section-title::before,
.section-title::after {
	content: "";
	position: absolute;
	z-index: -1;
	width: 2em;
	height: 100%;
	background-color: var(--primary-dark);
	pointer-events: none;
}

.section-title::before {
	top: -0.5em;
	left: -1.57em;
}

.section-title::after {
	bottom: -0.5em;
	right: -1.57em;
}

.section-title span {
	position: relative;
	display: inline-block;
	padding: 0.8em 3em;
	color: #fff;
	background-color: var(--primary);
}

.section-title span::before,
.section-title span::after {
	content: "";
	position: absolute;
	width: 0;
	height: 0;
	pointer-events: none;
}

.section-title span::before {
	top: -0.5em;
	left: -0.05em;
	border-bottom: 0.5em solid rgba(8, 11, 12, 0.2);
	border-left: 0.5em solid transparent;
}

.section-title span::after {
	bottom: -0.5em;
	right: -0.05em;
	border-top: 0.5em solid rgba(8, 11, 12, 0.2);
	border-right: 0.5em solid transparent;
}

/* Botão */
.button {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	padding: 1.1em 2em;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--text);
	background: none;
	border: 2px solid var(--text);
	transition: all 0.1s;
}

.button .icon {
	font-size: 16px;
}

.button:hover {
	color: #fff;
	background-color: var(--primary);
	border-color: transparent;
}

.button:active {
	opacity: 0.8;
}

.light-text .button {
	color: rgba(255, 255, 255, 0.9);
	border-color: rgba(255, 255, 255, 0.7);
}

.light-text .button:hover {
	color: #fff;
	border-color: transparent;
}

/* Redes sociais */
.social {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4em;
}

.social a {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	font-size: 16px;
	color: inherit;
	border: 1px solid rgba(28, 38, 43, 0.1);
	border-radius: 50%;
	transition: all 0.1s;
}

.light-text .social-large a {
	border: 2px solid rgba(255, 255, 255, 0.26);
}

.social a:hover {
	color: #fff;
	background: #333;
	border-color: transparent;
}

.social-large { margin: 2em 0 4em; }
.social-large a.facebook:hover { background-color: #3c5fac; }
.social-large a.x:hover        { background-color: #000; }
.social-large a.linkedin:hover { background-color: #2089b5; }

/* ==========================================================================
   Home
   ========================================================================== */
.home-section {
	overflow: hidden !important;
}

.home-bg {
	position: absolute;
	inset: 0;
	overflow: hidden;
	container-type: size;
}

.home-bg iframe {
	position: absolute;
	top: 50%;
	left: 50%;
	width: max(100cqw, 177.78cqh);
	height: max(100cqh, 56.25cqw);
	border: 0;
	pointer-events: none;
	opacity: 0;
	transform: translate(-50%, -50%);
	transition: opacity 1s;
}

.home-bg iframe.is-loaded {
	opacity: 1;
}

.home-section::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	background: rgba(73, 92, 95, 0.75);
}

.home-section .content {
	position: absolute;
	z-index: 100;
	bottom: 0;
	width: 100%;
	padding: 2em 5% 3em;
	font-size: 140%;
	text-align: center;
}

.home-section .content > * {
	max-width: 940px;
	margin-left: auto;
	margin-right: auto;
}

.home-section .h2 {
	font-size: 1.2em;
	line-height: 1.2;
	letter-spacing: -2px;
}

.home-section .h4 {
	margin: 1em auto 0;
	font-size: 0.75em;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -1px;
}

.home-section .h4:first-child {
	margin-top: 0;
}

/* ==========================================================================
   Currículo
   ========================================================================== */
.resume-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2em;
}

/* Linha do tempo */
.event {
	position: relative;
	isolation: isolate;
	padding: 0 1em 2em 2.4em;
}

.event::before {
	content: "";
	position: absolute;
	top: 10px;
	bottom: -10px;
	left: 12px;
	width: 4px;
	background: rgba(255, 255, 255, 0.5);
}

.event::after {
	content: "";
	position: absolute;
	top: 6px;
	left: 7px;
	width: 14px;
	height: 14px;
	background: #fff;
	border-radius: 50%;
}

.timeline > .event:nth-child(2)::after {
	background-color: var(--primary);
}

.timeline > .event:last-child {
	padding-bottom: 0;
	margin-bottom: 3em;
}

.timeline > .event:last-child::before {
	bottom: 4px;
}

.event-heading h3 {
	margin: 0 0 0.4em 0.6em;
	font-size: 1.3em;
	font-weight: 400;
	letter-spacing: 0;
}

.event-icon {
	position: absolute;
	z-index: 120;
	top: -14px;
	left: -10px;
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	font-size: 22px;
	color: #fff;
	background: var(--primary);
	border-radius: 50%;
}

.event-heading {
	padding-bottom: 3.2em;
}

.event-date {
	position: relative;
	display: inline-block;
	margin: 0 0 1.5em;
	padding: 3px 8px;
	font-family: var(--font-head);
	font-size: 11px;
	line-height: 1.3;
	text-transform: uppercase;
	color: #fff;
	background: var(--primary);
}

.event-date::before {
	content: "";
	position: absolute;
	z-index: -1;
	bottom: 0;
	left: -1.2em;
	border: 10px solid var(--primary);
	border-left-color: transparent;
}

.event h4 {
	margin: 0 0 0.2em;
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
}

.event .event-place {
	margin: 0;
	padding: 0 0 0.3em;
	font-family: var(--font-head);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--text-muted);
}

.event p:not([class]) {
	margin: 0.6em 0 0;
	font-size: 15px;
}

/* Habilidades */
.skills .section-title:first-child {
	margin-top: 0.6em;
}

.skill-list li {
	padding: 0 32px 1.1em 0;
}

.skill-name {
	position: relative;
	z-index: 1;
	display: block;
	margin-bottom: 4px;
	font-family: var(--font-head);
	font-size: 14px;
}

.bar {
	position: relative;
	display: block;
	height: 8px;
}

.bar .progress {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0;
	background: #fff;
	border-radius: 16px;
	transition: width 1s ease-out;
}

.is-visited .bar .progress,
html:not(.js) .bar .progress {
	width: calc(var(--value) * 1%);
}

.bar .progress::after {
	content: attr(data-value);
	position: absolute;
	top: -19px;
	left: 100%;
	width: 42px;
	margin-left: -2px;
	font-size: 13px;
	font-weight: 700;
	line-height: 42px;
	text-align: center;
	color: var(--text);
	background: rgba(255, 255, 255, 0.46);
	border-radius: 50%;
}

/* ==========================================================================
   Contato
   ========================================================================== */
.contact .map {
	position: fixed;
	inset: var(--header-h) 0 0 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}

.contact .map iframe {
	width: 100%;
	height: 100%;
	border: 0;
	filter: grayscale(1) contrast(0.9) brightness(1.05);
}

.contact .map::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(17, 61, 74, 0.55);
}

.contact-info {
	display: grid;
	gap: 1.4em;
}

.contact-info li {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	font-family: var(--font-head);
	font-size: 12px;
	line-height: 1.2;
	text-align: center;
	text-transform: uppercase;
}

.contact-info .icon {
	font-size: 38px;
	color: rgba(255, 255, 255, 0.9);
}

.contact-info a {
	color: inherit;
}

.contact-info a:hover {
	text-decoration: underline;
}

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (min-width: 768px) {
	.page-title {
		font-size: 3em;
		letter-spacing: -4px;
	}

	/* Menu lateral fixo */
	.header {
		width: var(--sidebar-w);
		height: 100%;
	}

	.header-wrap {
		left: 0;
		visibility: visible;
	}

	.menu-toggle,
	.header .mobile-title {
		display: none;
	}

	.site-title {
		display: block;
		padding: 0.8em;
		line-height: 1.2;
		background: var(--sidebar-title-bg);
	}

	.nav-menu a {
		padding: 2em 1em;
	}

	.nav-menu .icon {
		font-size: 2.8em;
	}

	.header-bottom {
		position: absolute;
		bottom: 0;
	}

	.menu-open .site {
		transform: none;
	}

	.site-main {
		margin-left: var(--sidebar-w);
		padding-top: 0;
	}

	.js .site-main {
		inset: 0 0 0 var(--sidebar-w);
		margin: 0;
	}

	/* Home */
	.home-section .content {
		font-size: 150%;
	}

	.home-section .h2 {
		font-size: 2em;
		line-height: 1;
		letter-spacing: -4px;
	}

	/* Currículo */
	.resume-grid {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: 30px;
	}

	.event {
		padding: 0 1em 3em 4em;
	}

	.event-heading {
		padding-bottom: 3.6em;
	}

	.event-date {
		margin-left: -1.6em;
	}

	/* Contato */
	.contact .map {
		inset: 0 0 0 var(--sidebar-w);
	}

	.contact-info {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Menu: compacta em telas baixas */
@media (min-width: 768px) and (max-height: 630px) {
	.nav-menu a {
		padding: 1em 0.5em;
	}

	.nav-menu .icon {
		display: none;
	}
}

@media (min-width: 768px) and (min-height: 600px) and (max-height: 790px) {
	.nav-menu a {
		padding: 1.1em 0.5em;
	}

	.nav-menu .icon {
		font-size: 2.2em;
	}
}

@media (min-width: 992px) {
	.section-title {
		margin: 3em auto 2em;
	}
}

@media (min-width: 1200px) {
	.page-title {
		font-size: 4em;
		line-height: 1;
	}

	.resume-grid {
		gap: 60px;
	}

	.contact-info li {
		flex-direction: row;
		gap: 16px;
		text-align: left;
		font-size: 14px;
	}

	.contact-info .icon {
		font-size: 66px;
	}
}

@media (min-width: 1400px) {
	.section-title {
		margin: 4.4em auto 2.4em;
	}

	.home-section .content {
		font-size: 250%;
	}

	.home-section .h4 {
		font-size: 0.6em;
	}
}

@media (min-width: 1660px) {
	.section-title {
		margin: 6em auto 3em;
	}
}

/* Acessibilidade: menos movimento */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
