/* ─────────────────────────────────────────
   RESET & CUSTOM PROPERTIES
───────────────────────────────────────── */
*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root {
	--paper: #f4edd8;
	--paper-mid: #ecddc0;
	--paper-dark: #d9c89f;
	--ink: #1a1108;
	--ink-mid: #3d2e18;
	--ink-faded: #7a6347;
	--red-ribbon: #8c1c13;
	--blue-ribbon: #163560;
	--border: #c4aa7e;
	--border-light: #ddd0b3;
	--shadow: rgba(60, 40, 10, 0.15);

	--font-type: 'Special Elite', cursive;
	--font-mono: 'Courier Prime', 'Courier New', monospace;

	--nav-h: 56px;
	--max-w: 860px;
}

html {
	scroll-behavior: smooth;
	font-size: 16px;
}

body {
	background-color: var(--paper);
	color: var(--ink);
	font-family: var(--font-mono);
	line-height: 1.75;
	overflow-x: hidden;
	/* Very subtle horizontal rule lines like paper */
	background-image:
		repeating-linear-gradient(transparent,
			transparent 27px,
			rgba(180, 155, 100, 0.12) 27px,
			rgba(180, 155, 100, 0.12) 28px);
	background-size: 100% 28px;
}

/* ─────────────────────────────────────────
   GRAIN OVERLAY — paper texture via SVG filter
───────────────────────────────────────── */
.grain {
	position: fixed;
	inset: -50%;
	width: 200%;
	height: 200%;
	pointer-events: none;
	z-index: 9998;
	opacity: .045;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23g)'/%3E%3C/svg%3E");
	background-size: 200px 200px;
	animation: grainShift 6s steps(5) infinite;
}

@keyframes grainShift {
	0% {
		transform: translate(0, 0);
	}

	20% {
		transform: translate(-3%, -4%);
	}

	40% {
		transform: translate(-6%, 2%);
	}

	60% {
		transform: translate(3%, -5%);
	}

	80% {
		transform: translate(5%, 3%);
	}

	100% {
		transform: translate(0, 0);
	}
}

/* Paper aging corners */
body::before {
	content: '';
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	background:
		radial-gradient(ellipse at 0% 0%, rgba(100, 70, 20, .10) 0%, transparent 45%),
		radial-gradient(ellipse at 100% 0%, rgba(80, 50, 10, .07) 0%, transparent 40%),
		radial-gradient(ellipse at 100% 100%, rgba(120, 85, 30, .09) 0%, transparent 50%),
		radial-gradient(ellipse at 0% 100%, rgba(90, 60, 15, .08) 0%, transparent 45%);
}

/* ─────────────────────────────────────────
   UTILITY
───────────────────────────────────────── */
.container {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 0 24px;
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

strong {
	font-weight: 700;
}

em {
	font-style: italic;
}

/* Ink imperfection on headings */
.ink-text {
	text-shadow:
		.4px .3px 0 rgba(0, 0, 0, .25),
		-.3px -.2px 0 rgba(0, 0, 0, .10),
		.8px -.4px 0 rgba(0, 0, 0, .05);
}

/* ─────────────────────────────────────────
   BLINKING CURSOR
───────────────────────────────────────── */
.blink {
	animation: blink 1.05s step-end infinite;
}

@keyframes blink {

	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: 0;
	}
}

/* ─────────────────────────────────────────
   NAVIGATION
───────────────────────────────────────── */
.nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: var(--nav-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 28px;
	z-index: 1000;
	background: rgba(244, 237, 216, .88);
	backdrop-filter: blur(6px);
	border-bottom: 1px solid var(--border-light);
	transition: background .3s;
}

.nav.scrolled {
	background: rgba(244, 237, 216, .97);
	box-shadow: 0 1px 8px var(--shadow);
}

.nav-logo {
	font-family: var(--font-type);
	font-size: 1.35rem;
	letter-spacing: .05em;
	color: var(--ink);
	text-decoration: none;
	text-shadow: .5px .4px 0 rgba(0, 0, 0, .2), -.3px -.2px 0 rgba(0, 0, 0, .08);
}

.nav-logo:hover {
	text-decoration: none;
	opacity: .8;
}

.nav-links {
	display: flex;
	gap: 28px;
	list-style: none;
}

.nav-links a {
	font-family: var(--font-mono);
	font-size: .82rem;
	letter-spacing: .12em;
	text-transform: lowercase;
	color: var(--ink-mid);
	position: relative;
	padding-bottom: 2px;
	transition: color .2s;
}

.nav-links a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 1px;
	background: var(--ink);
	transition: width .25s;
}

.nav-links a:hover {
	color: var(--ink);
	text-decoration: none;
}

.nav-links a:hover::after,
.nav-links a.active::after {
	width: 100%;
}

.nav-links a.active {
	color: var(--ink);
}

.nav-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
}

.nav-toggle span {
	display: block;
	width: 22px;
	height: 1.5px;
	background: var(--ink-mid);
	transition: all .3s;
}

@media (max-width: 640px) {
	.nav-toggle {
		display: flex;
	}

	.nav-links {
		position: fixed;
		top: var(--nav-h);
		left: 0;
		right: 0;
		flex-direction: column;
		gap: 0;
		background: var(--paper);
		border-bottom: 1px solid var(--border);
		padding: 12px 0;
		transform: translateY(-100%);
		opacity: 0;
		pointer-events: none;
		transition: transform .3s, opacity .3s;
	}

	.nav-links.open {
		transform: translateY(0);
		opacity: 1;
		pointer-events: auto;
	}

	.nav-links li {
		padding: 10px 28px;
	}

	.nav-links a {
		font-size: .9rem;
	}
}

/* ─────────────────────────────────────────
   SECTION COMMON
───────────────────────────────────────── */
.section {
	position: relative;
	padding: 88px 0 72px;
	border-top: 1px solid var(--border-light);
}

.section-mark {
	position: absolute;
	top: 10px;
	right: 18px;
	font-family: var(--font-type);
	font-size: clamp(3.5rem, 7vw, 6rem);
	line-height: 1;
	color: rgba(139, 90, 43, 0.14);
	filter: blur(1.4px) contrast(0.8);
	mix-blend-mode: multiply;
	letter-spacing: -.05em;
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
}

.section-title {
	font-family: var(--font-type);
	font-size: clamp(1.7rem, 4vw, 2.4rem);
	font-weight: normal;
	letter-spacing: .04em;
	margin-bottom: 44px;
	display: flex;
	align-items: center;
	gap: 16px;
	/* Ink imperfection */
	text-shadow:
		.5px .4px 0 rgba(0, 0, 0, .22),
		-.4px -.3px 0 rgba(0, 0, 0, .09),
		1px -.5px 0 rgba(0, 0, 0, .04);
}

.title-rule {
	flex: 1;
	display: block;
	height: 1px;
	background: linear-gradient(to right, var(--border), transparent);
}

/* ─────────────────────────────────────────
   SCROLL REVEAL
───────────────────────────────────────── */
.reveal-title,
.reveal-block,
.reveal-item {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity .6s ease, transform .6s ease;
}

.reveal-title.visible,
.reveal-block.visible,
.reveal-item.visible {
	opacity: 1;
	transform: none;
}

.reveal-item:nth-child(2) {
	transition-delay: .1s;
}

.reveal-item:nth-child(3) {
	transition-delay: .2s;
}

.reveal-item:nth-child(4) {
	transition-delay: .3s;
}

.reveal-item:nth-child(5) {
	transition-delay: .4s;
}

/* ─────────────────────────────────────────
   HERO
───────────────────────────────────────── */
.hero {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
	padding-top: var(--nav-h);
	text-align: center;
}

/* Horizontal ruled lines */
.hero-bg-lines {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-evenly;
	pointer-events: none;
}

.h-line {
	width: 100%;
	height: 1px;
	background: linear-gradient(to right, transparent, rgba(180, 150, 90, .14) 20%, rgba(180, 150, 90, .14) 80%, transparent);
}

/* Scattered type fragments */
.fragments {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
}

.frag {
	position: absolute;
	font-family: var(--font-mono);
	font-size: .72rem;
	color: var(--ink-faded);
	opacity: .22;
	letter-spacing: .08em;
	white-space: nowrap;
	animation: floatFrag 18s ease-in-out infinite;
}

.f1 {
	top: 12%;
	left: 4%;
	animation-delay: 0s;
	transform: rotate(-2deg);
}

.f2 {
	top: 18%;
	right: 5%;
	animation-delay: 2.5s;
	transform: rotate(1.5deg);
}

.f3 {
	top: 72%;
	left: 6%;
	animation-delay: 5s;
	transform: rotate(-1deg);
}

.f4 {
	top: 78%;
	right: 4%;
	animation-delay: 1s;
	transform: rotate(2deg);
}

.f5 {
	top: 42%;
	left: 2%;
	animation-delay: 7s;
	transform: rotate(-3deg);
}

.f6 {
	top: 55%;
	right: 3%;
	animation-delay: 3.5s;
	transform: rotate(1deg);
}

.f7 {
	top: 30%;
	left: 8%;
	animation-delay: 9s;
	transform: rotate(-1.5deg);
}

.f8 {
	bottom: 15%;
	right: 8%;
	animation-delay: 4s;
	transform: rotate(3deg);
}

@keyframes floatFrag {

	0%,
	100% {
		opacity: .22;
	}

	50% {
		opacity: .38;
	}
}

.hero-content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.hero-name {
	font-family: var(--font-type);
	font-size: clamp(2.6rem, 8vw, 5.2rem);
	line-height: 1;
	letter-spacing: .03em;
	/* Ink imperfection — stronger on hero */
	text-shadow:
		.6px .5px 0 rgba(0, 0, 0, .28),
		-.5px -.4px 0 rgba(0, 0, 0, .11),
		1.2px -.6px 0 rgba(0, 0, 0, .05),
		.3px 1px 0 rgba(0, 0, 0, .04);
	filter: contrast(1.05);
}

.hero-cursor {
	font-family: var(--font-type);
	font-size: clamp(2.6rem, 8vw, 5.2rem);
	line-height: 1;
	margin-left: .05em;
	color: var(--ink-mid);
}

.hero-identity {
	margin-top: 12px;
	font-family: var(--font-mono);
	font-size: clamp(.85rem, 2.2vw, 1.1rem);
	color: var(--ink-mid);
	letter-spacing: .15em;
	display: flex;
	align-items: center;
	gap: 8px;
}

.identity-dash {
	opacity: .5;
}

.identity-word {
	min-width: 160px;
	transition: opacity .3s;
}

.identity-word.fade {
	opacity: 0;
}

.hero-location {
	margin-top: 16px;
	font-size: .8rem;
	letter-spacing: .2em;
	color: var(--ink-faded);
	text-transform: uppercase;
}

.hero-visitor {
	margin-top: 10px;
	font-family: var(--font-mono);
	font-size: .72rem;
	letter-spacing: .08em;
	color: rgba(122, 99, 71, 0.45);
	user-select: none;
	-webkit-user-select: none;
}

.hero-scroll-hint {
	position: absolute;
	bottom: 28px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	font-size: .72rem;
	letter-spacing: .18em;
	color: var(--ink-faded);
	text-decoration: none;
	animation: breathe 2.5s ease-in-out infinite;
}

.hero-scroll-hint:hover {
	text-decoration: none;
}

.scroll-arrow {
	font-size: 1.1rem;
}

.scroll-text {
	text-transform: lowercase;
}

@keyframes breathe {

	0%,
	100% {
		opacity: .55;
		transform: translateX(-50%) translateY(0);
	}

	50% {
		opacity: .9;
		transform: translateX(-50%) translateY(4px);
	}
}

/* ─────────────────────────────────────────
   SOBRE
───────────────────────────────────────── */
.sobre-grid {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 52px;
	align-items: start;
}

.sobre-text p {
	margin-bottom: 16px;
	font-size: .97rem;
}

.sobre-text p:last-child {
	margin-bottom: 0;
}

/* Drop cap */
.dropcap::first-letter {
	font-family: var(--font-type);
	font-size: 3.4em;
	line-height: .8;
	float: left;
	margin: .04em .1em 0 0;
	color: var(--ink);
	text-shadow: 1px 1px 0 rgba(0, 0, 0, .18);
}

/* Typewriter card */
.typewriter-card {
	border: 1px solid var(--border);
	padding: 24px 22px;
	background: rgba(255, 252, 240, .55);
	position: relative;
	box-shadow: 2px 3px 0 rgba(180, 150, 90, .12), inset 0 0 30px rgba(200, 170, 100, .06);
}

/* Torn top edge effect */
.typewriter-card::before {
	content: '';
	position: absolute;
	top: -1px;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(to right,
			var(--border) 0%, var(--border) 15%, transparent 15.5%,
			transparent 16%, var(--border) 16.5%, var(--border) 35%, transparent 35.5%,
			transparent 36%, var(--border) 36.5%, var(--border) 60%, transparent 60.5%,
			transparent 61%, var(--border) 61.5%, var(--border) 80%, transparent 80.5%,
			transparent 81%, var(--border) 81.5%, var(--border) 100%);
	opacity: .4;
}

.tc-row {
	display: flex;
	gap: 12px;
	padding: 6px 0;
	border-bottom: 1px dashed rgba(180, 150, 90, .2);
	font-size: .82rem;
	line-height: 1.4;
}

.tc-row.tc-divider {
	border-bottom: 2px solid var(--border-light);
	padding: 2px 0;
	margin: 4px 0;
}

.tc-key {
	min-width: 88px;
	color: var(--ink-faded);
	letter-spacing: .06em;
	flex-shrink: 0;
}

.tc-key::after {
	content: ':';
}

.tc-val {
	color: var(--ink-mid);
}

.tc-val a {
	color: var(--blue-ribbon);
	text-decoration: underline;
}

.tc-val a:hover {
	color: var(--ink);
}

@media (max-width: 780px) {
	.sobre-grid {
		grid-template-columns: 1fr;
	}
}

/* ─────────────────────────────────────────
   TRAJETÓRIA — Chapter tabs
───────────────────────────────────────── */
.chapter-tabs {
	display: flex;
	gap: 0;
	border-bottom: 1px solid var(--border);
	margin-bottom: 40px;
}

.c-tab {
	background: none;
	border: 1px solid transparent;
	border-bottom: none;
	padding: 10px 22px;
	font-family: var(--font-mono);
	font-size: .82rem;
	letter-spacing: .1em;
	color: var(--ink-faded);
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	position: relative;
	bottom: -1px;
	transition: color .2s, background .2s, border-color .2s;
}

.c-tab:hover {
	color: var(--ink);
	background: rgba(255, 252, 240, .5);
}

.c-tab.active {
	color: var(--ink);
	background: var(--paper);
	border-color: var(--border);
	border-bottom-color: var(--paper);
	z-index: 2;
}

.c-tab-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.c-tab-icon svg {
	display: block;
}

.c-tab-label {
	text-transform: lowercase;
}

@media (max-width: 500px) {
	.c-tab-label {
		display: none;
	}

	.c-tab {
		padding: 10px 16px;
	}
}

/* Chapter panels */
.chapter {
	display: none;
	position: relative;
}

.chapter.active {
	display: block;
	animation: chapterIn .28s ease forwards;
}

.chapter.ch-leaving {
	display: block;
	animation: chapterOut .21s ease forwards;
	pointer-events: none;
}

@keyframes chapterIn {
	from {
		opacity: 0;
		transform: translateX(14px);
	}

	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes chapterOut {
	from {
		opacity: 1;
		transform: translateX(0);
	}

	to {
		opacity: 0;
		transform: translateX(-14px);
	}
}

/* Chapter stamp */
.chapter-deco {
	position: relative;
	margin-bottom: 32px;
}

.ch-stamp {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	border: 2px solid;
	border-radius: 4px;
	padding: 8px 14px;
	font-family: var(--font-type);
	font-size: .78rem;
	letter-spacing: .18em;
	text-align: center;
	opacity: .35;
	transform: rotate(-2deg);
	line-height: 1.3;
	gap: 4px;
}

.stamp-icon {
	font-size: 1.5rem;
	letter-spacing: 0;
	line-height: 1;
}

.gastro-stamp {
	border-color: var(--red-ribbon);
	color: var(--red-ribbon);
}

.direito-stamp {
	border-color: var(--blue-ribbon);
	color: var(--blue-ribbon);
}

/* Timeline */
.timeline {
	display: flex;
	flex-direction: column;
	gap: 0;
	padding-left: 20px;
	border-left: 1px solid var(--border-light);
}

.tl-item {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 24px;
	padding: 20px 0;
	border-bottom: 1px dashed rgba(180, 150, 90, .2);
	position: relative;
}

.tl-item:last-child {
	border-bottom: none;
}

/* Stamp hover */
.tl-item::after {
	content: '✓';
	position: absolute;
	top: 16px;
	right: 2px;
	font-family: var(--font-type);
	font-size: .7rem;
	letter-spacing: .12em;
	color: var(--ink-faded);
	border: 1.5px solid var(--border);
	padding: 2px 7px;
	border-radius: 2px;
	transform: rotate(7deg) scale(.3);
	opacity: 0;
	transition: opacity .2s ease, transform .25s cubic-bezier(.2, .8, .3, 1.4);
	pointer-events: none;
}

.tl-item:hover::after {
	opacity: .45;
	transform: rotate(7deg) scale(1);
}

/* Timeline dot */
.tl-item::before {
	content: '';
	position: absolute;
	left: -24px;
	top: 28px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--border);
	border: 1.5px solid var(--paper);
	box-shadow: 0 0 0 1px var(--border);
}

.tl-year {
	font-family: var(--font-mono);
	font-size: 0.9rem;
	color: var(--ink-faded);
	letter-spacing: .06em;
	white-space: nowrap;
}

.tl-body h3 {
	font-family: var(--font-type);
	font-size: 1.05rem;
	font-weight: normal;
	margin-bottom: 4px;
	text-shadow: .4px .3px 0 rgba(0, 0, 0, .18), -.3px -.2px 0 rgba(0, 0, 0, .07);
}

.tl-body p {
	font-size: .87rem;
	color: var(--ink-mid);
}

@media (max-width: 500px) {
	.tl-item {
		grid-template-columns: 1fr;
		gap: 4px;
	}

	.tl-year {
		font-size: 0.9rem;
	}
}

/* Legal quote */
.legal-quote {
	margin-top: 36px;
	padding: 20px 28px;
	border-left: 3px solid var(--border);
	color: var(--ink-faded);
	font-style: italic;
	font-size: .9rem;
	position: relative;
}

.lq-mark {
	position: absolute;
	top: -10px;
	left: 20px;
	font-family: serif;
	font-size: 3rem;
	color: var(--border);
	line-height: 1;
}

.legal-quote cite {
	display: block;
	margin-top: 8px;
	font-size: .78rem;
	font-style: normal;
	letter-spacing: .06em;
}

/* ─────────────────────────────────────────
   TERMINAL
───────────────────────────────────────── */
.terminal-window {
	margin-bottom: 40px;
	border: 1px solid #333;
	border-radius: 6px;
	overflow: hidden;
	background: #0d0d0d;
	box-shadow: 0 4px 24px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .04);
	max-width: 640px;
}

.term-bar {
	display: flex;
	align-items: center;
	gap: 6px;
	background: #1e1e1e;
	padding: 8px 14px;
	border-bottom: 1px solid #292929;
}

.term-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
}

.dot-r {
	background: #ff5f57;
}

.dot-y {
	background: #febc2e;
}

.dot-g {
	background: #28c840;
}

.term-title {
	margin-left: 8px;
	font-family: var(--font-mono);
	font-size: .75rem;
	color: #888;
	letter-spacing: .08em;
}

.term-body {
	padding: 16px 18px;
	font-family: var(--font-mono);
	font-size: .82rem;
	line-height: 1.65;
	color: #c8c8c8;
	min-height: 120px;
}

.t-line {
	display: flex;
	gap: 8px;
	white-space: pre;
}

.t-prompt {
	color: #5af;
	user-select: none;
}

.t-out {
	color: #8cc;
	padding-left: 18px;
}

.t-cmd {
	color: #fff;
}

.t-cursor-term {
	display: inline-block;
	width: .55em;
	height: 1em;
	background: #5af;
	animation: blink 1s step-end infinite;
	vertical-align: text-bottom;
}

/* ─────────────────────────────────────────
   STACK / KEYS
───────────────────────────────────────── */
.keys-board {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.key-group-title {
	font-family: var(--font-mono);
	font-size: .72rem;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--ink-faded);
	margin-bottom: 10px;
}

.keys-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.key {
	font-family: var(--font-mono);
	font-size: .83rem;
	padding: 7px 16px;
	border: 1px solid var(--border);
	background: linear-gradient(180deg, rgba(255, 253, 245, .9) 0%, rgba(240, 228, 200, .5) 100%);
	box-shadow:
		0 2px 0 var(--border),
		0 3px 4px rgba(0, 0, 0, .1),
		inset 0 1px 0 rgba(255, 255, 255, .6);
	border-radius: 3px;
	cursor: default;
	transition: transform .1s, box-shadow .1s, background .1s;
	animation: keyAppear .4s calc(var(--d, 0ms) + .2s) both;
	letter-spacing: .04em;
}

.key:hover {
	transform: translateY(2px);
	box-shadow:
		0 0 0 var(--border),
		0 1px 2px rgba(0, 0, 0, .08),
		inset 0 1px 0 rgba(255, 255, 255, .4);
	background: linear-gradient(180deg, rgba(240, 228, 200, .9) 0%, rgba(225, 208, 175, .6) 100%);
}

.key:active {
	transform: translateY(2px);
	box-shadow: 0 0 0 var(--border), inset 0 2px 3px rgba(0, 0, 0, .15);
}



@keyframes keyAppear {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ─────────────────────────────────────────
   CONTATO — Letter
───────────────────────────────────────── */
.letter-wrap {
	max-width: 640px;
}

.letter {
	position: relative;
	background: rgba(255, 252, 240, .7);
	border: 1px solid var(--border);
	padding: 48px 48px 44px;
	box-shadow:
		2px 4px 0 rgba(180, 150, 80, .12),
		4px 8px 16px rgba(0, 0, 0, .08),
		inset 0 0 60px rgba(200, 170, 100, .04);
}

/* Paper fold corner */
.letter::after {
	content: '';
	position: absolute;
	bottom: 0;
	right: 0;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 0 0 28px 28px;
	border-color: transparent transparent var(--paper-mid) transparent;
}

/* Postmark stamp */
.postmark {
	position: absolute;
	top: 28px;
	right: 48px;
	transform: rotate(12deg);
}

@media (max-width: 540px) {
	.postmark {
		top: 16px;
		right: 16px;
	}

	.pm-circle {
		width: 50px;
		height: 50px;
		font-size: .6rem;
	}

	.pm-sub {
		font-size: .5rem;
	}
}

.pm-circle {
	width: 68px;
	height: 68px;
	border: 2px solid rgba(140, 28, 19, .3);
	border-radius: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	font-family: var(--font-type);
	font-size: .75rem;
	color: rgba(140, 28, 19, .35);
	letter-spacing: .1em;
	line-height: 1.1;
	text-align: center;
}

.pm-sub {
	font-size: .6rem;
}

.letter-header {
	margin-bottom: 20px;
}

.letter-city {
	font-size: .8rem;
	color: var(--ink-faded);
	letter-spacing: .08em;
	margin-bottom: 12px;
}

.letter-to {
	font-size: .94rem;
	color: var(--ink-mid);
}

.letter-body {
	margin-bottom: 28px;
	font-size: .94rem;
	line-height: 1.8;
	color: var(--ink-mid);
}

.letter-contacts {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-bottom: 32px;
	border-top: 1px dashed var(--border-light);
	border-bottom: 1px dashed var(--border-light);
	padding: 16px 0;
}

.lc-item {
	display: grid;
	grid-template-columns: 24px 88px 1fr;
	gap: 10px;
	align-items: center;
	padding: 5px 0;
	font-size: .84rem;
	color: var(--ink-mid);
	transition: color .2s;
}

.lc-item:hover {
	color: var(--ink);
	text-decoration: none;
}

/* ─────────────────────────────────────────
   UNDERLINE TINTA ESCORRENDO
   Aplica-se em links de texto (nav, footer, contato)
───────────────────────────────────────── */
.nav-links a,
.footer a,
.tc-val a {
	position: relative;
	text-decoration: none;
}

.nav-links a::before,
.footer a::before,
.tc-val a::before {
	content: '';
	position: absolute;
	bottom: -1px;
	left: 0;
	width: 100%;
	height: 1.5px;
	background: var(--ink);
	transform-origin: top left;
	transform: scaleY(0);
	opacity: 0;
	transition: transform .22s ease, opacity .22s ease;
}

.nav-links a:hover::before,
.footer a:hover::before,
.tc-val a:hover::before {
	transform: scaleY(1);
	opacity: 1;
}

/* mantém o ::after do nav (underline de active) intacto */
.nav-links a::after {
	z-index: 1;
}

.lc-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: .55;
}

.lc-icon svg {
	display: block;
	flex-shrink: 0;
}

.lc-label {
	color: var(--ink-faded);
	letter-spacing: .06em;
	font-size: .78rem;
}

.lc-value {
	letter-spacing: .04em;
}

.letter-signature {
	padding-top: 8px;
	font-size: .88rem;
	color: var(--ink-mid);
	line-height: 1.8;
}

.sig-name {
	font-family: var(--font-type);
	font-size: 1.2rem;
	margin-top: 4px;
	text-shadow: .4px .3px 0 rgba(0, 0, 0, .18);
}

.sig-roles {
	font-size: .76rem;
	letter-spacing: .1em;
	color: var(--ink-faded);
}

@media (max-width: 600px) {
	.letter {
		padding: 32px 24px 32px;
	}

	.lc-item {
		grid-template-columns: 20px 70px 1fr;
	}
}

/* ─────────────────────────────────────────
   PROJETOS
───────────────────────────────────────── */
.proj-intro {
	font-size: .88rem;
	color: var(--ink-faded);
	margin-bottom: 40px;
	letter-spacing: .03em;
}

.proj-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

@media (max-width: 900px) {
	.proj-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.proj-card {
	position: relative;
	background: var(--paper);
	border: 1px solid var(--border);
	padding: 24px 24px 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	transition: transform .2s ease, box-shadow .2s ease;
	/* slight paper curl shadow */
	box-shadow: 2px 3px 0 rgba(26, 17, 8, .08);
}

.proj-card::before {
	content: '';
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(transparent,
			transparent 22px,
			rgba(196, 170, 126, .13) 22px,
			rgba(196, 170, 126, .13) 23px);
	pointer-events: none;
}

.proj-card:hover {
	transform: translateY(-3px) rotate(.3deg);
	box-shadow: 4px 6px 0 rgba(26, 17, 8, .12);
}

.pc-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.pc-lang {
	font-family: 'Courier Prime', monospace;
	font-size: .68rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ink-faded);
	border: 1px solid var(--border);
	padding: 2px 7px;
}

.pc-badge {
	font-family: 'Courier Prime', monospace;
	font-size: .62rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--red-ribbon);
	opacity: .75;
}

.pc-badge-pub {
	color: var(--blue-ribbon);
}

.pc-name {
	font-family: 'Special Elite', serif;
	font-size: 1.1rem;
	color: var(--ink);
	line-height: 1.2;
	margin: 0;
}

.pc-desc {
	font-size: .82rem;
	line-height: 1.65;
	color: var(--ink);
	opacity: .8;
	flex: 1;
	margin: 0;
}

.pc-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 4px;
}

.pc-tag {
	font-family: 'Courier Prime', monospace;
	font-size: .66rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ink-faded);
	border: 1px solid var(--border-light);
	padding: 2px 6px;
}

.pc-link {
	font-family: 'Courier Prime', monospace;
	font-size: .72rem;
	letter-spacing: .06em;
	color: var(--red-ribbon);
	text-decoration: none;
	margin-top: 4px;
	align-self: flex-start;
}

.pc-link:hover {
	text-decoration: none;
	background-image: linear-gradient(to right, var(--red-ribbon), var(--red-ribbon));
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 100% 1px;
}

.proj-footnote {
	margin-top: 40px;
	font-family: 'Courier Prime', monospace;
	font-size: .82rem;
	color: var(--ink-faded);
	font-style: italic;
	letter-spacing: .03em;
	opacity: .65;
}

@media (max-width: 480px) {
	.proj-grid {
		grid-template-columns: 1fr;
	}
}

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.footer {
	padding: 32px 28px;
	text-align: center;
	border-top: 1px solid var(--border-light);
	font-size: .78rem;
	color: var(--ink-faded);
	letter-spacing: .08em;
	line-height: 2;
}

.footer-sep {
	margin: 0 10px;
	opacity: .4;
}

.footer a {
	color: var(--ink-faded);
	text-decoration: underline;
}

.footer a:hover {
	color: var(--ink);
}

.footer-sub {
	font-size: .7rem;
	opacity: .5;
}

/* ─────────────────────────────────────────
   SCROLLBAR — subtle
───────────────────────────────────────── */
::-webkit-scrollbar {
	width: 5px;
}

::-webkit-scrollbar-track {
	background: var(--paper-mid);
}

::-webkit-scrollbar-thumb {
	background: var(--border);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: var(--ink-faded);
}

/* ─────────────────────────────────────────
   SELECTION
───────────────────────────────────────── */
::selection {
	background: rgba(140, 100, 40, .25);
	color: var(--ink);
}

/* ─────────────────────────────────────────
   PRELOADER
───────────────────────────────────────── */
#preloader {
	position: fixed;
	inset: 0;
	background: var(--paper-bg, #f0e8d0);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	transition: opacity .5s ease, visibility .5s ease;
}

#preloader.hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.pl-text {
	font-family: var(--mono);
	font-size: clamp(1.6rem, 4vw, 2.4rem);
	color: var(--ink, #1a1108);
	letter-spacing: .05em;
}

.pl-cursor {
	font-family: var(--mono);
	font-size: clamp(1.6rem, 4vw, 2.4rem);
	color: var(--red-ribbon, #8c1c13);
	animation: blink .7s step-end infinite;
}

/* ─────────────────────────────────────────
   READ PROGRESS BAR
───────────────────────────────────────── */
#read-progress {
	position: fixed;
	top: 0;
	left: 0;
	height: 3px;
	width: 0%;
	background: var(--red-ribbon);
	z-index: 9998;
	transition: width .1s linear;
}

/* ─────────────────────────────────────────
   BACK TO TOP
───────────────────────────────────────── */
#back-to-top {
	position: fixed;
	bottom: 2rem;
	right: 2rem;
	background: var(--paper);
	border: 1px solid var(--border);
	color: var(--ink);
	width: 42px;
	height: 42px;
	border-radius: 3px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .3s, transform .3s, border-color .2s;
	z-index: 800;
}

#back-to-top.visible {
	opacity: 1;
	transform: translateY(0);
}

#back-to-top:hover {
	border-color: var(--ink-faded);
	color: var(--red-ribbon);
}

#back-to-top svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ─────────────────────────────────────────
   CAREER STATS
───────────────────────────────────────── */
.career-stats {
	display: flex;
	gap: 2rem;
	margin-top: 1.5rem;
	flex-wrap: wrap;
}

.cs-item {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.cs-num {
	font-family: var(--mono);
	font-size: 2rem;
	font-weight: 700;
	color: var(--red-ribbon);
	line-height: 1;
}

.cs-label {
	font-size: .75rem;
	color: var(--ink-faded);
	text-transform: uppercase;
	letter-spacing: .08em;
	margin-top: .25rem;
}

/* ─────────────────────────────────────────
   TERMINAL INPUT ROW
───────────────────────────────────────── */
.term-input-row {
	display: flex;
	align-items: center;
	gap: .4rem;
	padding: 6px 12px;
	border-top: 1px solid rgba(255, 255, 255, .08);
}

.term-input-field {
	flex: 1;
	background: none;
	border: none;
	outline: none;
	color: #c8d0b0;
	font-family: var(--mono);
	font-size: 16px;
}

/* ─────────────────────────────────────────
   PRINT STYLESHEET
───────────────────────────────────────── */
@media print {

	#preloader,
	#read-progress,
	#back-to-top,
	.nav-toggle,
	.site-nav,
	.grain-overlay,
	.animate-on-scroll,
	.reveal-block {
		opacity: 1 !important;
		transform: none !important;
	}

	body {
		background: #fff !important;
		color: #000 !important;
		font-size: 11pt;
	}

	a {
		color: #000 !important;
		text-decoration: underline;
	}

	.section-title::before {
		color: #000 !important;
	}

	.stack-grid {
		columns: 2;
	}

	.proj-grid {
		columns: 2;
	}

	.terminal-window,
	nav,
	footer {
		display: none !important;
	}

	@page {
		margin: 2cm;
	}
}

/* ─────────────────────────────────────────
   STACK KEYS — TOOLTIPS (aprimorado)
───────────────────────────────────────── */
.key[data-tip] {
	position: relative;
}

/* balão do tooltip */
.key[data-tip]::after {
	content: attr(data-tip);
	position: absolute;
	bottom: calc(100% + 10px);
	left: 50%;
	transform: translateX(-50%) translateY(6px);
	background: var(--ink);
	color: var(--paper);
	font-family: var(--font-mono);
	font-size: .62rem;
	padding: .25rem .65rem;
	border-radius: 2px;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	transition: opacity .2s, transform .2s;
	z-index: 100;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
	letter-spacing: .06em;
}

/* seta do tooltip */
.key[data-tip]::before {
	content: '';
	position: absolute;
	bottom: calc(100% + 5px);
	left: 50%;
	transform: translateX(-50%) translateY(6px);
	border: 5px solid transparent;
	border-top-color: var(--ink);
	pointer-events: none;
	opacity: 0;
	transition: opacity .2s, transform .2s;
	z-index: 100;
}

.key[data-tip]:hover::after {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.key[data-tip]:hover::before {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* ─────────────────────────────────────────
   DISPONÍVEL STAMP
───────────────────────────────────────── */
.letter {
	position: relative;
}

.disponivel-stamp {
	position: absolute;
	bottom: 3.5rem;
	right: 2.5rem;
	font-family: var(--font-type);
	font-size: 1rem;
	letter-spacing: .2em;
	color: var(--red-ribbon);
	border: 3px solid var(--red-ribbon);
	padding: .3rem .85rem;
	border-radius: 2px;
	transform: rotate(-14deg);
	transform-origin: center;
	opacity: 0;
	pointer-events: none;
	user-select: none;
}

@media (max-width: 540px) {
	.disponivel-stamp {
		font-size: .65rem;
		border-width: 2px;
		padding: .2rem .55rem;
		bottom: .75rem;
		right: .75rem;
		letter-spacing: .12em;
	}
}

.disponivel-stamp.stamped {
	animation: stampIn .4s cubic-bezier(.2, .8, .3, 1.3) forwards;
}

@keyframes stampIn {
	0% {
		opacity: 0;
		transform: rotate(-14deg) scale(2.8);
	}

	50% {
		opacity: .9;
		transform: rotate(-14deg) scale(.9);
	}

	75% {
		transform: rotate(-14deg) scale(1.06);
	}

	100% {
		opacity: .82;
		transform: rotate(-14deg) scale(1);
	}
}

/* ─────────────────────────────────────────
   KONAMI OVERLAY
───────────────────────────────────────── */
#konami-overlay {
	position: fixed;
	inset: 0;
	background: rgba(26, 17, 8, .88);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	animation: konamiFadeIn .25s ease;
}

@keyframes konamiFadeIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

.konami-box {
	background: var(--paper);
	border: 1px solid var(--border);
	padding: 3rem 4rem;
	text-align: center;
	max-width: 420px;
	width: 90%;
}

.konami-code {
	font-family: var(--font-type);
	font-size: 4rem;
	color: var(--red-ribbon);
	line-height: 1;
}

.konami-msg {
	font-family: var(--font-mono);
	font-size: .9rem;
	color: var(--ink-faded);
	margin-top: .75rem;
}

.konami-ascii {
	font-family: var(--font-mono);
	font-size: .8rem;
	color: var(--ink-mid);
	margin-top: .5rem;
	letter-spacing: .08em;
}

.konami-close {
	margin-top: 2rem;
	display: inline-block;
	font-family: var(--font-mono);
	font-size: .8rem;
	color: var(--ink);
	background: none;
	border: 1px solid var(--border);
	padding: .4rem 1.2rem;
	cursor: pointer;
	border-radius: 2px;
	transition: border-color .2s, color .2s;
}

.konami-close:hover {
	border-color: var(--ink-faded);
	color: var(--red-ribbon);
}

/* ─────────────────────────────────────────
   CURSOR PERSONALIZADO — mira + gota de tinta
   (apenas dispositivos com mouse)
───────────────────────────────────────── */
@media (pointer: fine) {

	/* Cursor padrão: mira fina com ponto central (hotspot ao centro) */
	* {
		cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cline x1='10' y1='1' x2='10' y2='8' stroke='%231a1108' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='10' y1='12' x2='10' y2='19' stroke='%231a1108' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='1' y1='10' x2='8' y2='10' stroke='%231a1108' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='12' y1='10' x2='19' y2='10' stroke='%231a1108' stroke-width='1.5' stroke-linecap='round'/%3E%3Ccircle cx='10' cy='10' r='2' fill='%231a1108'/%3E%3C/svg%3E") 10 10, crosshair;
	}

	/* Cursor interativo: gota de tinta vermelha (hotspot no topo da gota) */
	a,
	a *,
	button,
	button *,
	[role='tab'],
	[role='tab'] *,
	.key,
	.key *,
	.lc-item,
	.lc-item *,
	.c-tab,
	.c-tab *,
	label,
	input,
	select,
	textarea,
	[onclick],
	.hero-scroll-hint,
	.hero-scroll-hint *,
	#back-to-top,
	#back-to-top * {
		cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='22' viewBox='0 0 16 22'%3E%3Cpath d='M8 1 C8 1 15 10 15 14 C15 18.4 11.9 21 8 21 C4.1 21 1 18.4 1 14 C1 10 8 1 8 1 Z' fill='%238c1c13' opacity='.88'/%3E%3Ccircle cx='8' cy='14' r='2.5' fill='rgba(255,255,255,.25)'/%3E%3C/svg%3E") 8 1, pointer !important;
	}
}
