
:root {
	--ground: #a8503c;
	--surface-deep: #7a3324;
	--soot-black: #2b1813;
	--soot-dark: #1a0e0b;
	--bone-white: #f5efeb;
	--bone-muted: #f8f4f0;
	--accent-sage: #e8f7f0;
	--border-oxide: rgba(245, 239, 235, 0.18);
	--border-oxide-strong: rgba(245, 239, 235, 0.38);
	--border-soot: rgba(43, 24, 19, 0.4);

	--guku-3df: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--guku-f1c: 'IBM Plex Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	--guku-74b: 'IBM Plex Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

	--sidebar-w: 320px;
	--sidebar-w-collapsed: 0px;

	--space-2xs: 0.25rem;
	--space-xs: 0.5rem;
	--space-sm: 0.75rem;
	--space-md: 1.25rem;
	--space-lg: 2rem;
	--space-xl: 3rem;
	--space-2xl: 4.5rem;
	--space-3xl: 6.5rem;

	--fs-xs: clamp(0.72rem, 0.7rem + 0.15vw, 0.8rem);
	--fs-sm: clamp(0.82rem, 0.8rem + 0.2vw, 0.92rem);
	--fs-base: clamp(0.92rem, 0.88rem + 0.25vw, 1.05rem);
	--fs-md: clamp(1.1rem, 1.02rem + 0.4vw, 1.3rem);
	--fs-lg: clamp(1.35rem, 1.2rem + 0.75vw, 1.75rem);
	--fs-xl: clamp(1.8rem, 1.5rem + 1.5vw, 2.5rem);
	--fs-2xl: clamp(2.3rem, 1.9rem + 2.2vw, 3.4rem);
	--fs-display: clamp(2.8rem, 2.2rem + 3.8vw, 5.2rem);

	--lh-tight: 1.05;
	--lh-heading: 1.15;
	--lh-snug: 1.35;
	--lh-body: 1.65;

	--ease-standard: cubic-bezier(0.2, 0, 0, 1);
	--ease-out: cubic-bezier(0, 0, 0.2, 1);

	--duration-fast: 140ms;
	--duration-normal: 220ms;
	--duration-slow: 380ms;

	--focus-ring: 2px solid var(--bone-white);
	--focus-offset: 3px;
}

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

html {
	font-size: 16px;
	background-color: var(--ground);
	color: var(--bone-white);
	font-family: var(--guku-f1c);
	line-height: var(--lh-body);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	scroll-behavior: smooth;
	height: 100%;
}

body {
	min-height: 100%;
	background-color: var(--ground);
	color: var(--bone-white);
	font-family: var(--guku-f1c);
	font-size: var(--fs-base);
	font-weight: 400;
	line-height: var(--lh-body);
	letter-spacing: -0.01em;
	overflow-x: hidden;
	position: relative;
}

input, button, textarea, select {
	font: inherit;
	letter-spacing: inherit;
}

img, svg, picture, canvas {
	display: block;
	max-width: 100%;
}

img { height: auto; }

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

ul, ol { list-style: none; }

table {
	border-collapse: collapse;
	width: 100%;
}

button {
	background: none;
	border: none;
	cursor: pointer;
	color: inherit;
}

:focus-visible {
	outline: var(--focus-ring);
	outline-offset: var(--focus-offset);
}

::selection {
	background-color: var(--soot-black);
	color: var(--bone-white);
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--guku-3df);
	font-weight: 800;
	line-height: var(--lh-heading);
	letter-spacing: -0.03em;
	color: var(--bone-white);
	text-transform: uppercase;
}

h1 {
	font-size: var(--fs-display);
	line-height: var(--lh-tight);
}

h2 { font-size: var(--fs-2xl); }

h3 { font-size: var(--fs-xl); }

h4 { font-size: var(--fs-lg); }

h5 { font-size: var(--fs-md); }

h6 { font-size: var(--fs-base); }

p {
	margin-bottom: var(--space-md);
	max-width: 62ch;
	line-height: var(--lh-body);
}

p:last-child { margin-bottom: 0; }

strong, b {
	font-weight: 600;
	color: var(--bone-white);
}

small {
	font-size: var(--fs-sm);
	line-height: var(--lh-snug);
}

code, kbd, samp, pre {
	font-family: var(--guku-74b);
	font-size: 0.9em;
}

hr {
	border: none;
	border-top: 1px solid var(--border-oxide);
	margin: var(--space-xl) 0;
}

/* Prose block */
.prose {
	font-family: var(--guku-f1c);
	font-size: var(--fs-base);
	line-height: var(--lh-body);
	color: var(--bone-muted);
}

.prose p { margin-bottom: var(--space-md); }

.prose h2, .prose h3, .prose h4 {
	color: var(--bone-white);
	margin-top: var(--space-xl);
	margin-bottom: var(--space-sm);
}

.prose ul, .prose ol {
	margin-bottom: var(--space-md);
	padding-left: var(--space-md);
}

.prose li {
	position: relative;

	margin-bottom: var(--space-xs);
	padding-left: 1.2ch;
}

.prose ul li::before {
	content: '—';
	position: absolute;
	left: 0;
	color: var(--accent-sage);
}

.prose ol {
	list-style: decimal;
	padding-left: 1.8ch;
}

.prose blockquote {
	border-left: 3px solid var(--accent-sage);
	padding-left: var(--space-md);
	margin: var(--space-lg) 0;
	font-style: italic;
	color: var(--bone-white);
}

/* Layout Primitives */
.skip-link {
	position: fixed;
	top: -100px;
	left: var(--space-md);
	background-color: var(--soot-black);
	color: var(--bone-white);
	padding: var(--space-xs) var(--space-md);
	z-index: 1000;
	font-family: var(--guku-74b);
	font-size: var(--fs-sm);
	text-transform: uppercase;
	border: 1px solid var(--border-oxide-strong);
	transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus { top: var(--space-md); }

/* Shell Layout */
.site-wrapper {
	display: flex;
	min-height: 100vh;
	width: 100%;
	position: relative;
}

.site-sidebar {

	width: var(--sidebar-w);
	flex-shrink: 0;
	background-color: var(--surface-deep);
	border-right: 1px solid var(--border-oxide);
	display: flex;
	flex-direction: column;
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	z-index: 100;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.site-main {
	flex: 1 1 0;
	min-width: 0;
	margin-left: var(--sidebar-w);
	background-color: var(--ground);
	position: relative;
}

/* Responsive sidebar shell */
@media (max-width: 1023px) {
	.site-sidebar {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		width: min(340px, 86vw);
		transform: translateX(-100%);
		visibility: hidden;
		pointer-events: none;
		transition: transform var(--duration-slow) var(--ease-standard), visibility 0s var(--duration-slow);
		z-index: 500;
		box-shadow: 10px 0 30px rgba(0, 0, 0, 0.45);
	}

	.site-sidebar.is-open {
		visibility: visible;
		pointer-events: auto;
		transition: transform var(--duration-slow) var(--ease-standard);
	}

	.site-sidebar.is-open { transform: translateX(0); }

	.site-main {
		margin-left: 0;
		width: 100%;
	}

	.mobile-bar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: var(--space-sm) var(--space-md);
		background-color: var(--surface-deep);
		border-bottom: 1px solid var(--border-oxide);
		position: sticky;
		top: 0;
		z-index: 200;
	}

	.sidebar-backdrop {
		position: fixed;
		inset: 0;
		background-color: rgba(26, 14, 11, 0.7);
		backdrop-filter: blur(4px);
		z-index: 450;
		opacity: 0;
		pointer-events: none;
		transition: opacity var(--duration-normal) var(--ease-standard);
	}

	.sidebar-backdrop.is-visible {
		opacity: 1;
		pointer-events: auto;
	}
}

@media (min-width: 1024px) {
	.mobile-bar { display: none !important; }
	.sidebar-backdrop { display: none !important; }
}

/* Fluid Grids and Columns */
.grid {
	display: grid;
	gap: var(--space-lg);
}

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

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

.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1200px) {
	.grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Container & Sections */
.panel {
	padding: var(--space-2xl) var(--space-xl);
	border-bottom: 1px solid var(--border-oxide);
	position: relative;
}

@media (max-width: 767px) {
	.panel { padding: var(--space-xl) var(--space-md); }
}

.panel-deep { background-color: var(--surface-deep); }

.panel-soot { background-color: var(--soot-black); }

.panel-soot-dark { background-color: var(--soot-dark); }

/* Swiss Grid Lines */
.swiss-grid {
	display: grid;
	border-top: 1px solid var(--border-oxide);
	border-left: 1px solid var(--border-oxide);
}

.swiss-cell {
	border-right: 1px solid var(--border-oxide);
	border-bottom: 1px solid var(--border-oxide);
	padding: var(--space-lg);
	position: relative;
}

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

/* Visually Hidden */
.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;
}

/* Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
