@font-face {
	font-family: --inter;
	src: url(/fonts/inter.woff2);
}

@font-face {
	font-family: --inter;
	font-style: italic;
	src: url(/fonts/inter-italic.woff2);
}

* {
	margin: 0;
	padding: 0;
}

:root {
	--pill: 50vmax;

	font-family: --inter;
}

body {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 720px 480px 1fr;
	column-gap: 80px;
	padding-bottom: 50vh;
	color: #222;

	> header {
		grid-row: 1;
		grid-column: 2 / -2;
		padding-top: 104px;

		> nav {
			display: flex;
			align-items: center;
			column-gap: 26px;
			font-weight: 500;

			a {
				text-decoration: none;
			}

			> ol {
				display: flex;
				align-items: center;
				column-gap: 6px;
				margin-right: auto;

				> li {
					display: block;

					> select {
						appearance: none;
						padding-block: 5px;
						padding-left: 15px;
						padding-right: 58px;
						border: none;
						border: 1px solid #ccc;
						border-radius: var(--pill);
						background-color: white;
						background-image: url(/icons/keyboard-arrow-down.svg);
						background-repeat: no-repeat;
						background-position: center right 6px;
					}
				}
			}

			> a {
				display: flex;
				align-items: center;

				> img {
					width: 16px;
				}
			}
		}
	}

	> main {
		display: contents;

		> * {
			grid-column: 2;
		}

		> img {
			grid-row: 1;
			grid-column: 1 / -1;
			width: 100%;
			height: 645px;
			z-index: -1;
		}

		> hgroup {
			margin-top: 70px;

			> h1 {
				anchor-name: --title;
				font-size: 48px;
				font-weight: 600;
			}

			> p {
				margin-top: 8px;
				font-size: 26px;
				font-weight: 500;
			}
		}

		> aside {
			grid-column: 3 / span 1;
			anchor-name: --aside;
			position: absolute;
			top: max(anchor(--title top), anchor(--aside bottom, 0px));
			width: 100%;

			a {
				text-decoration: none;
			}

			> h2 {
				display: flex;
				align-items: center;
				column-gap: 7px;
				border-top: 1px solid #ccc;
			}

			> ul {
				display: grid;
				row-gap: 10px;
				margin-top: 16px;

				> li {
					display: flex;
					align-items: center;
					column-gap: 10px;

					> img {
						width: 32px;
					}
				}
			}
		}

		> #details {
			> div {
				display: flex;
				align-items: center;
				column-gap: 7px;
				font-weight: 500;
			}

			> h2 {
				margin-top: 26px;
				padding-top: 38px;
			}

			> ul > li > img {
				border-radius: var(--pill);
			}
		}

		> p {
			margin-top: 28px;
			line-height: 1.5;
		}

		> #featured-content {
			margin-top: 53px;

			> h2 {
				display: flex;
				align-items: center;
				column-gap: 7px;
			}

			> div {
				display: grid;
				grid-template-columns: repeat(2, 1fr);
				gap: 20px;
				margin-top: 32px;

				> article {
					border-radius: 10px;

					> img {
						width: 100%;
						height: 118px;
						border-top-left-radius: inherit;
						border-top-right-radius: inherit;
					}

					> div {
						display: grid;
						grid-template-columns: auto 1fr;
						row-gap: 3px;
						column-gap: 5px;
						padding: 16px;
						padding-top: 18px;
						border: 1px solid #eee;
						border-bottom-left-radius: inherit;
						border-bottom-right-radius: inherit;

						> h3 {
							align-self: center;
							font-size: 16px;
							font-weight: 500;
						}

						> p {
							grid-column: 2;
							font-size: 14px;
							color: #999;
						}
					}
				}
			}
		}

		> #updates {
			margin-top: 48px;
			border-radius: 10px;
			outline: 1px solid #ccc;
			outline-offset: -1px;
			font-weight: 500;

			> hgroup {
				display: flex;
				align-items: center;
				padding-block: 14px;
				padding-inline: 20px;
				border-top-left-radius: inherit;
				border-top-right-radius: inherit;
				background-color: #eee;

				> p {
					display: flex;
					align-items: center;
					column-gap: 11px;
					margin-left: auto;
					color: #666;
				}
			}

			> table {
				width: 100%;
				border-spacing: 0;

				> tbody > tr > td {
					padding-block: 10px;
					padding-inline: 19px;
					border-top: 1px solid #ccc;

					&:first-child {
						display: flex;
						align-items: center;
						column-gap: 6px;
					}

					&:not(:first-child) {
						color: #999;
					}

					&:last-child {
						text-align: right;
					}
				}
			}
		}

		> #related-projects {
			font-weight: 500;

			> h2 {
				margin-top: 36px;
				padding-top: 40px;
			}

			> ul > li > img {
				border-radius: 10px;
			}

			> a {
				box-sizing: border-box;
				display: grid;
				align-items: center;
				width: 285px;
				margin-top: 29px;
				padding-block: 9px;
				padding-inline: 15px;
				border: 1px solid #ccc;
				border-radius: 10px;

				> * {
					grid-column: 1;
					grid-row: 1;
				}

				> span {
					justify-self: center;
				}

				> img {
					width: 16px;
					justify-self: end;
				}
			}
		}
	}
}

a {
	color: inherit;
}

select {
	font: inherit;
}

img {
	display: block;

	&[src="/icons/image.svg"] {
		object-fit: none;
		background-color: #eee;
	}
}

h2 {
	font-size: 18px;
	font-weight: 600;
}
