/* ==========================================================================
   Juliana Albarracin — Portfolio
   Hand-written design system. No frameworks, no build step.
   ========================================================================== */

/* ---------- Tokens ---------- */

:root {
	--paper: #faf6f0;
	--surface: #ffffff;
	--sand: #f1e9dd;
	--ink: #221c15;
	--ink-soft: #574e42;
	--line: #e7dfd3;
	--accent: #7a1408;
	--accent-deep: #520000;
	--accent-soft: #f6e1da;
	--accent-light: #e79c88;
	--footer-ink: #201a13;
	--footer-paper: #f3ece2;
	--footer-muted: #b7ac9c;

	--font-display: "Fraunces", "Georgia", serif;
	--font-body: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

	--fs-hero: clamp(2.7rem, 6vw + 0.9rem, 4.6rem);
	--fs-h2: clamp(1.65rem, 2.2vw + 0.9rem, 2.35rem);
	--fs-h3: 1.3rem;
	--fs-lede: clamp(1.08rem, 0.5vw + 0.95rem, 1.25rem);

	--container: 68rem;
	--radius: 16px;
	--shadow: 0 10px 30px -12px rgba(34, 28, 21, 0.18);
}

/* ---------- Reset (lite) ---------- */

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

body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
	margin: 0;
}

img {
	max-width: 100%;
	display: block;
}

/* ---------- Base ---------- */

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.7;
	color: var(--ink);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

a {
	color: var(--accent-deep);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

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

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 2px;
}

::selection {
	background: var(--accent-soft);
}

.container {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 1.5rem;
}

.section {
	padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.section-sand {
	background: var(--sand);
}

.eyebrow {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 1rem;
}

.section-title {
	font-size: var(--fs-h2);
	margin-bottom: 1rem;
}

.lede {
	font-size: var(--fs-lede);
	color: var(--ink-soft);
	max-width: 58ch;
}

/* ---------- Header / Nav ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(250, 246, 240, 0.92);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--line);
}

.site-header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 4.25rem;
}

.logo {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 1.15rem;
	color: var(--ink);
	text-decoration: none;
	letter-spacing: -0.01em;
}

.logo span {
	color: var(--accent);
}

.site-nav ul {
	display: flex;
	align-items: center;
	gap: 1.9rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-nav a {
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--ink);
	text-decoration: none;
	padding: 0.35rem 0;
}

.site-nav a:hover {
	color: var(--accent);
}

.site-nav a[aria-current="page"] {
	color: var(--accent-deep);
	box-shadow: inset 0 -2px 0 var(--accent);
}

.nav-resume {
	border: 1.5px solid var(--ink);
	border-radius: 999px;
	padding: 0.45rem 1.1rem !important;
}

.nav-resume:hover {
	border-color: var(--accent);
}

.nav-toggle {
	display: none;
	appearance: none;
	background: none;
	border: 0;
	padding: 0.5rem;
	margin-right: -0.5rem;
	cursor: pointer;
}

.nav-toggle .bars {
	display: block;
	position: relative;
	width: 24px;
	height: 2px;
	background: var(--ink);
	transition: background 0.2s;
}

.nav-toggle .bars::before,
.nav-toggle .bars::after {
	content: "";
	position: absolute;
	left: 0;
	width: 24px;
	height: 2px;
	background: var(--ink);
	transition: transform 0.25s;
}

.nav-toggle .bars::before {
	top: -7px;
}

.nav-toggle .bars::after {
	top: 7px;
}

.nav-open .nav-toggle .bars {
	background: transparent;
}

.nav-open .nav-toggle .bars::before {
	transform: translateY(7px) rotate(45deg);
}

.nav-open .nav-toggle .bars::after {
	transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Buttons ---------- */

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.9rem;
	margin-top: 2.2rem;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--font-body);
	font-size: 0.98rem;
	font-weight: 600;
	line-height: 1;
	padding: 0.95rem 1.7rem;
	border-radius: 999px;
	text-decoration: none;
	border: 1.5px solid transparent;
	transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn svg {
	width: 1em;
	height: 1em;
	flex: none;
}

.btn-primary {
	background: var(--accent);
	color: #fff;
}

.btn-primary:hover {
	background: var(--accent-deep);
	color: #fff;
	transform: translateY(-2px);
}

.btn-ghost {
	border-color: var(--ink);
	color: var(--ink);
	background: transparent;
}

.btn-ghost:hover {
	border-color: var(--accent);
	color: var(--accent-deep);
	transform: translateY(-2px);
}

/* ---------- Hero ---------- */

.hero {
	padding: clamp(4.5rem, 10vw, 8rem) 0 clamp(3.5rem, 8vw, 6rem);
}

.hero h1 {
	font-size: var(--fs-hero);
	max-width: 14ch;
	margin-bottom: 1.4rem;
}

.hero h1 em {
	font-style: italic;
	color: var(--accent);
}

/* ---------- Stats strip ---------- */

.stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2rem;
}

.stat {
	border-top: 2px solid var(--ink);
	padding-top: 1.1rem;
}

.stat strong {
	display: block;
	font-family: var(--font-display);
	font-size: clamp(1.9rem, 2.6vw, 2.6rem);
	font-weight: 600;
	color: var(--accent-deep);
	line-height: 1.1;
	margin-bottom: 0.35rem;
}

.stat span {
	font-size: 0.92rem;
	color: var(--ink-soft);
	line-height: 1.45;
	display: block;
}

/* ---------- Split (about teaser / footer-like layouts) ---------- */

.split {
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: start;
}

.split .section-title {
	margin-bottom: 1.2rem;
}

.split p + p {
	margin-top: 1rem;
}

/* ---------- Facts card ---------- */

.facts-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 1.9rem;
}

.facts-card h3 {
	font-size: 1.05rem;
	margin-bottom: 1.1rem;
}

.facts-card ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.95rem;
}

.facts-card li {
	display: flex;
	gap: 0.8rem;
	align-items: flex-start;
	font-size: 0.95rem;
	line-height: 1.5;
}

.facts-card li svg {
	width: 1.15rem;
	height: 1.15rem;
	flex: none;
	margin-top: 0.15rem;
	color: var(--accent);
}

.facts-card li strong {
	display: block;
	font-weight: 600;
}

.facts-card li span {
	color: var(--ink-soft);
}

/* ---------- Timeline ---------- */

.timeline {
	list-style: none;
	margin: 3rem 0 0;
	padding: 0;
	position: relative;
}

.timeline::before {
	content: "";
	position: absolute;
	top: 0.4rem;
	bottom: 0.4rem;
	left: 0.5rem;
	width: 2px;
	background: var(--line);
}

.timeline-item {
	position: relative;
	padding: 0 0 3.2rem 2.6rem;
}

.timeline-item:last-child {
	padding-bottom: 0.5rem;
}

.timeline-item::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.42rem;
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 50%;
	background: var(--paper);
	border: 3px solid var(--accent);
}

.timeline-header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.6rem 1rem;
	margin-bottom: 0.4rem;
}

.timeline-header h3 {
	font-size: var(--fs-h3);
}

.period {
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--accent-deep);
	background: var(--accent-soft);
	border-radius: 999px;
	padding: 0.25rem 0.85rem;
	white-space: nowrap;
}

.timeline-company {
	font-size: 0.95rem;
	color: var(--ink-soft);
	margin-bottom: 1rem;
}

.timeline-item ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.7rem;
}

.timeline-item ul li {
	position: relative;
	padding-left: 1.4rem;
	color: var(--ink-soft);
	font-size: 0.99rem;
}

.timeline-item ul li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.72em;
	width: 0.55rem;
	height: 2px;
	background: var(--accent);
}

.timeline-item ul li strong {
	color: var(--ink);
	font-weight: 600;
}

/* ---------- Skills ---------- */

.skill-groups {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 2.4rem 3rem;
	margin-top: 2.6rem;
}

.skill-group h3 {
	font-size: 0.85rem;
	font-family: var(--font-body);
	font-weight: 600;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--ink-soft);
	margin-bottom: 1rem;
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.chips li {
	font-size: 0.88rem;
	font-weight: 500;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 0.38rem 0.95rem;
	white-space: nowrap;
}

/* ---------- Cards ---------- */

.card-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.6rem;
	margin-top: 2.6rem;
}

.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.9rem;
}

.card .eyebrow {
	margin-bottom: 0.6rem;
}

.card h3 {
	font-size: var(--fs-h3);
	margin-bottom: 0.4rem;
}

.card p {
	color: var(--ink-soft);
	font-size: 0.97rem;
}

/* ---------- Blog placeholders ---------- */

.post-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.6rem;
	margin-top: 2.8rem;
}

.post-card {
	border: 1.5px dashed var(--line);
	border-radius: var(--radius);
	padding: 1.9rem;
	background: transparent;
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
	min-height: 13rem;
}

.post-card .tag {
	align-self: flex-start;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent-deep);
	background: var(--accent-soft);
	border-radius: 999px;
	padding: 0.28rem 0.8rem;
}

.post-card h3 {
	font-size: 1.15rem;
	color: var(--ink-soft);
}

.post-card p {
	color: var(--ink-soft);
	font-size: 0.93rem;
	opacity: 0.85;
}

/* ---------- Footer ---------- */

.site-footer {
	background: var(--footer-ink);
	color: var(--footer-paper);
	padding: clamp(3.5rem, 7vw, 5.5rem) 0 0;
	margin-top: clamp(3rem, 7vw, 5rem);
}

.site-footer .split {
	align-items: center;
}

.site-footer h2 {
	font-size: var(--fs-h2);
	color: var(--footer-paper);
	margin-bottom: 0.9rem;
}

.site-footer h2 em {
	font-style: italic;
	color: var(--accent-light);
}

.site-footer p {
	color: var(--footer-muted);
	max-width: 44ch;
}

.site-footer .actions {
	margin-top: 1.8rem;
}

.site-footer .btn-ghost {
	border-color: var(--footer-muted);
	color: var(--footer-paper);
}

.site-footer .btn-ghost:hover {
	border-color: var(--accent-light);
	color: var(--accent-light);
}

.contact-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1.1rem;
	justify-self: end;
}

.contact-list a {
	display: inline-flex;
	align-items: center;
	gap: 0.85rem;
	color: var(--footer-paper);
	text-decoration: none;
	font-size: 0.98rem;
}

.contact-list a:hover {
	color: var(--accent-light);
}

.contact-list li > span {
	display: inline-flex;
	align-items: center;
	gap: 0.85rem;
	color: var(--footer-muted);
	font-size: 0.98rem;
}

.contact-list svg {
	width: 1.2rem;
	height: 1.2rem;
	flex: none;
	color: var(--accent-light);
}

.footer-bottom {
	margin-top: clamp(2.5rem, 6vw, 4rem);
	border-top: 1px solid rgba(243, 236, 226, 0.14);
	padding: 1.4rem 0;
	font-size: 0.85rem;
	color: var(--footer-muted);
}

.footer-bottom .container {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	justify-content: space-between;
}

/* ---------- 404 ---------- */

.error-page {
	min-height: 55vh;
	display: grid;
	place-content: center;
	text-align: center;
	padding: 4rem 1.5rem;
}

.error-page .code {
	font-family: var(--font-display);
	font-size: clamp(4.5rem, 14vw, 8rem);
	font-weight: 600;
	color: var(--accent);
	line-height: 1;
}

.error-page h1 {
	font-size: var(--fs-h2);
	margin: 0.8rem 0 0.6rem;
}

.error-page p {
	color: var(--ink-soft);
}

.error-page .actions {
	justify-content: center;
}

/* ---------- Reveal on scroll ---------- */

.reveal {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.btn,
	.nav-toggle .bars,
	.nav-toggle .bars::before,
	.nav-toggle .bars::after {
		transition: none;
	}
}

/* ---------- Responsive ---------- */

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

	.site-nav {
		display: none;
	}

	.nav-open .site-nav {
		display: block;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--paper);
		border-bottom: 1px solid var(--line);
		box-shadow: var(--shadow);
	}

	.nav-open .site-nav ul {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 0.6rem 1.5rem 1.2rem;
	}

	.nav-open .site-nav a {
		display: block;
		padding: 0.85rem 0.25rem;
		font-size: 1.05rem;
		border-bottom: 1px solid var(--line);
	}

	.nav-open .site-nav li:last-child a {
		border-bottom: 0;
	}

	.nav-open .nav-resume {
		border: 0;
		border-radius: 0;
		padding: 0.85rem 0.25rem !important;
		color: var(--accent-deep);
	}

	.site-nav a[aria-current="page"] {
		box-shadow: none;
		color: var(--accent-deep);
	}

	.stats {
		grid-template-columns: repeat(2, 1fr);
	}

	.split,
	.skill-groups,
	.card-grid {
		grid-template-columns: 1fr;
	}

	.post-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.contact-list {
		justify-self: start;
	}
}

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

	.stats {
		gap: 1.4rem;
	}

	.actions .btn {
		width: 100%;
		justify-content: center;
	}
}
