/* ================================================================== */
/* CSS Reset */
/* https://www.joshwcomeau.com/css/custom-css-reset/ */
*, *::before, *::after {
  box-sizing: border-box;
}

/* * {
  margin: 0;
} */

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* ================================================================== */
/* Fonts */

@font-face {
  font-family: 'Newsreader';
  src: url('fonts/Newsreader[opsz\,wght].woff2') format('woff2-variations');
  font-display: swap;
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 25% 100%;
}
@font-face {
  font-family: 'Newsreader';
  src: url('fonts/Newsreader-Italic[opsz\,wght].woff2') format('woff2-variations');
  font-display: swap;
  font-style: italic;
  font-weight: 100 900;
  font-stretch: 25% 100%;
}

:root {
	--system-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
}


/* ================================================================== */
/* Base Layout */

/* Sensible vertical rhythm */
/* * + * {
  margin-top: 1em;
} */


body {
  display: grid;
  margin: 0;
  min-height: 100vh;
  grid-template-rows: auto 1fr auto;
	gap: 2rem;
  /* font-family: Georgia, 'Times New Roman', Times, serif; */
  font-family: "Newsreader", Georgia, 'Times New Roman', Times, serif;
  font-size: 1.125rem;
	background-color: hsl(0, 100%, 100%);
	color: hsl(230, 92%, 7%);
}

header {
  display: grid;
  grid-template-columns: 1fr auto;
	align-items: center;
  padding: 1rem 1rem 0.75rem;
	border-bottom: solid 1px #ccc;

  .brand {
    font-size: 1.4rem;
    font-weight: 700;
  }
	nav {
		display: flex;
		gap: 1rem;
	}
	a, a:visited {
		text-decoration: none;
		color: #444;
	}
}

main {
  display: block;
	max-width: 1000px;
  margin-inline: auto;
  padding-inline: 1rem;
}

.homepage {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr 1fr;
}


a, a:visited {
	color: hsl(250,91%,24%);
}

a:hover {
	color: hsl(270,91%,48%);
}

.description > figure {
	border: solid 1px #ccc;
	margin: 1rem 0;
	padding: 0.5rem;
}
@media (min-width: 800px) {
	.description > figure {
		margin: 0 0 1rem 2rem;
		float: right;
		max-width: 50%;
	}
}

figcaption {
	color: #555;
	font-size: 0.85em;
	font-family: var(--system-font);
}

/* ================================================================== */
/* Artwork index */

.work-index {
  display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	grid-auto-flow: row;
	gap: 3rem 1rem;
}

.work-index img {
	margin: 0;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	transition: scale 0.2s ease;
}

.work-index a:hover img {
	scale: 1.05;
}


/* ================================================================== */
/* Individual artwork template */

article.work h1 { grid-area: title; }
article.work picture { grid-area: image; }
article.work .description { grid-area: description; }
article.work .metadata { grid-area: metadata; }

article.work {
  display: grid;
  gap: 1rem;  
  /* Default mobile layout */
  grid-template-areas:
    "title"
    "image"
    "description"
    "metadata";
}

article.work .metadata {
  border-top: solid 1px #ccc;
	color: #555;
	font-size: 0.85em;
	font-family: var(--system-font);
}

.categories p {
	margin: 0;
}
.categories ul {
	margin: 0;
	padding-left: 1em;
}

.singlework,
.multiwork {
	grid-area: image;
}


@media (min-width: 800px) {
  article.work {
    gap: 2rem;
    grid-template-columns: 1fr 250px;
    grid-template-areas:  "title title"
                          "image image"
                          "description metadata";
  }
  article.work .metadata {
    border-top: none;
    border-left: solid 1px #ccc;
    padding-left: 2rem;
  }
	
	article.work .metadata > * {
		grid-area: metadata;
		margin-top: 0;
	}
}

/* ================================================================== */
/* Footer */

footer {
  display: grid;
  padding: 2rem;
  margin-top: 5rem;
  place-content: center;
  font-size: 0.8em;
  color: #999;
}

