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

main {
  width: 100%;
  max-width: clamp(42rem, 68vw, 68rem);
  margin: clamp(1rem, 3vh, 2rem) auto;
  padding: 0 2rem;
}

.layout {
	display: grid;
	grid-template-columns: 100%;
	grid-template-rows: auto 1fr auto;
	min-height: 100vh;
}

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

.post {
	h1 {
		margin-bottom: 2rem;
		max-width: 65ch;
	}

	.meta {
		font-size: 0.8rem;
		margin-bottom: 4rem;
	}

	img+h1 {
		margin-top: 1rem;
	}
}

li {
	margin-bottom: 0.25rem;
}

.posts-list {
	list-style-type: none;
	padding: 0;

	li {
		margin-bottom: 6rem;
	}

	img+h2 {
		margin-top: 1rem;
	}

	a {
		display: block;
	}
}

.post-footer__categories {
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.post-footer li {
	display: inline-block;
	font-size: 0.8rem;
}

.post-footer a {
	background-color: var(--lightAccent);
	padding: .5rem 0.75rem;
	text-transform: uppercase;
	font-family: var(--primaryFont);
	font-weight: bold;
}

.icon-link {
	position: relative;
}

.icon-link::before {
	content: url('/link.svg');
	fill: currentColor;
	position: absolute;
	left: -1rem;
	width: 1rem;
	height: 1rem;
	top: 0;
	opacity: 0.2;
	transition: opacity .2s;
}

@media (min-width: 48rem) {
	.icon-link::before {
		left: -1.5rem;
	}
}

.icon-link:hover::before {
	opacity: 1;
}

/* Markdown tables */
:global(table) {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
  font-size: 0.95em;
}

:global(th),
:global(td) {
  border: 1px solid #d1d5db;
  padding: 0.5rem 0.75rem;
  text-align: left;
}

:global(th) {
  background-color: #f9fafb;
  font-weight: 600;
}

:global(tr:nth-child(even)) {
  background-color: #f9fafb;
}

.callout {
  border-left: 4px solid var(--callout-color, #ccc);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  border-radius: 0 4px 4px 0;
  background: color-mix(in srgb, var(--callout-color, #ccc) 10%, transparent);
}

.callout-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.callout-blue   { --callout-color: #2ea8e5; }
.callout-green  { --callout-color: #5fb236; }
.callout-orange { --callout-color: #f19837; }
.callout-red    { --callout-color: #ff6666; }
.callout-purple { --callout-color: #ffd400; }
.callout-yellow { --callout-color: #a28ae5; }
.callout-default { --callout-color: #aaaaaa; }