/* RESET */

article,
aside,
audio,
command,
datagrid,
details,
dialog,
embed,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section,
summary,
video,
wbr {
    display: block;
}

bdi,
figcaption,
keygen,
mark,
meter,
progress,
rp,
rt,
ruby,
time {
    display: inline;
}

acronym,
applet,
big,
center,
dir,
font,
frame,
frameset,
noframes,
s,
strike,
tt,
u,
xmp {
    display: none;
}

a,
abbr,
area,
article,
aside,
audio,
b,
bdo,
blockquote,
body,
button,
canvas,
caption,
cite,
code,
col,
colgroup,
command,
datalist,
dd,
del,
details,
dialog,
dfn,
div,
dl,
dt,
em,
embed,
fieldset,
figure,
form,
h1,
h2,
h3,
h4,
h5,
h6,
head,
header,
hgroup,
hr,
html,
i,
iframe,
img,
input,
ins,
keygen,
kbd,
label,
legend,
li,
map,
mark,
menu,
meter,
nav,
noscript,
object,
ol,
optgroup,
option,
output,
p,
param,
pre,
progress,
q,
rp,
rt,
ruby,
samp,
section,
select,
small,
span,
strong,
sub,
sup,
table,
tbody,
td,
textarea,
tfoot,
th,
thead,
time,
tr,
ul,
var,
video {
    background: transparent;
    border: 0;
    font-size: 100%;
    font: inherit;
    margin: 0;
    outline: none;
    padding: 0;
    text-align: left;
    text-decoration: none;
    vertical-align: baseline;
    z-index: 1;
}

body {
    line-height: 1;
}

blockquote,
q {
    quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
    margin-bottom: 1rem;
}

td:nth-child(1) {
    white-space: nowrap;
}

/* VARIABLES */

:root {
    --font-size: 16px;
    --line-height: 1.7;
    --monospace-font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'
}

@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #161616;
        --header-color: #fafafa;
        --text-color: #e7e7e7;
        --text-color-dim: #666;
        --text-color-dimmer: #444;
        --rule-color: #222;
        --nav-link-color: #fff;
        --nav-active-color: #eee;
        --link-color: #78aeed;
        --icon-color: #e7e7e7;
        --h1-color: #fff;
        --h2-color: #eee;
        --h3-color: #ddd;
        --code-snippet-background-color: #000;
        --code-snippet-text-color: #fafafa;
        --pill-text-color: #fff;
        --pill-background-color: #333;
    }
}

@media (prefers-color-scheme: light) {
    :root {
        --background-color: #fefefe;
        --text-color: #111;
        --text-color-dim: #666;
        --text-color-dimmer: #ccc;
        --rule-color: #eee;
        --nav-link-color: #111;
        --nav-active-color: #000;
        --link-color: #1c71d8;
        --icon-color: #111;
        --h1-color: #111;
        --h2-color: #333;
        --h3-color: #555;
        --code-snippet-background-color: #111;
        --code-snippet-text-color: #fafafa;
        --pill-text-color: #111;
        --pill-background-color: #eee;
    }
}

/* CORE */

html {
    font-size: var(--font-size);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Ubuntu', 'Cantarell', 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    font-size: var(--font-size);
    font-weight: var(--font-weight);
    line-height: var(--line-height);
    padding: 2rem;
    max-width: 70rem;
    margin: 0 auto;
}

code {
    font-family: var(--monospace-font-family);
}

p,
ul,
ol {
    margin-bottom: 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--header-color);
    margin: 2rem 0 1rem;
    line-height: 1.2;
    font-weight: bold;
}

h1 {
    font-size: 1.8rem;
    margin-top: 2rem;
    color: var(--h1-color);
}

h2 {
    font-size: 1.6rem;
    margin-top: 3rem;
    color: var(--h2-color);
}

h3 {
    font-size: 1.2rem;
    margin-top: 3rem;
    color: var(--h3-color);
}

h4 {
    font-size: 1rem;
}

h5 {
    font-size: 1rem;
}

ul,
ol {
    margin-left: 2rem;
    margin-top: 1rem;
}

ul {
    list-style: disc;
}

ul.task-list {
    list-style: none;
    margin-bottom: 1rem;
}

li>ul.task-list {
    margin-bottom: 0;
}

ul.task-list input[type="checkbox"] {
    margin: 0 0.5rem 0 -2rem;
}

li > ul {
    margin-top: 0;
    margin-bottom: 0;
}

th,
td {
    padding-right: 2rem;
}

th {
    font-weight: bold;
}

a {
    color: var(--link-color);
    text-decoration: underline;
}

a.back {
    color: var(--text-color-dim);
    text-decoration: none;
    font-weight: normal;
    display: inline-block;
    width: 2rem;
    margin-left: -2rem;
}

sup {
    position: relative;
    top: -0.5em;
    font-size: 80%;
}

img {
    max-width: 100%;
    margin: 2rem 0;
    display: block;
}

figcaption {
    display: block;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-color-dim);
}

blockquote {
    padding-left: 2rem;
    border-left: 0.25rem solid var(--rule-color);
}

strong {
    font-weight: bold;
}

em {
    font-style: italic;
}

del {
    text-decoration: line-through;
}

pre {
    margin-bottom: 1rem;
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.25rem;
    background: var(--code-snippet-background-color);
    color: var(--code-snippet-text-color);
}

dl {
    display: grid;
    grid-template-columns: max-content max-content;
    align-items: start;
    margin-bottom: 1rem;
}

dt,
dd {
    margin: 0;
}

dt {
    font-weight: bold;
    margin-right: 1rem;
}

dd {
    display: flex;
    flex-wrap: wrap;
}

small {
    font-size: 0.8rem;
}

hr {
    border: 0;
    border-top: 1px solid var(--rule-color);
    margin: 2rem 0;
}

a.footnote-ref {
    text-decoration: none;
    margin: 0 0.1rem;
    font-weight: bold;
    text-decoration: underline;
}

div.footnotes {
    margin-top: 3rem;
    font-size: 0.9rem;
}

div.footnotes hr {
    display: none;
}

div.footnotes p {
    line-height: 1.5;
}

div.footnotes a.footnote-back-ref {
    margin-left: 0.5rem;
}

/* HEADER */

header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--rule-color);
}

header h1 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
}

header p {
    font-size: 0.9rem;
    margin-top: 1rem;
}

header span.separator {
    color: var(--text-color-dim);
    margin: 0 0.25rem;
}

/* FOOTER */

footer {
    color: var(--text-color-dimmer);
    font-size: 0.8rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--rule-color);
}

footer p {
    margin: 0;
    text-align: center;
    max-width: 100%;
}

/* LIST */

.list {
    margin-bottom: 3rem;
}

.list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.list span {
    display: block;
}

.list h2 {
    font-size: 1rem;
    margin-top: 0;
}

.list li {
    line-height: 1.6;
    margin-bottom: 0.75rem;
    margin-left: 0;
}

.list ul li ul {
    margin-left: 2rem;
}

.list li > a {
}

.list span {
    font-size: 0.85rem;
}

/* HOMEPAGE */

.homepage {
    column-count: 1;
    column-gap: 2rem;
    margin-top: 2rem;
}

.homepage h2 {
    font-size: 1rem;
    margin-top: 0;
}

.homepage span {
    color: var(--text-color-dim);
}

.homepage small {
    font-family: var(--monospace-font-family);
    background: var(--pill-background-color);
    color: var(--pill-text-color);
    padding: 0 2px;
    display: inline-block;
}

@media (min-width: 600px) {
    .homepage {
        column-count: 2;
    }

    .homepage .list {
    	margin-bottom: 0;
	}

    .homepage .list.about {
    	break-after: avoid;
    	margin-bottom: 3rem;
    }

    .homepage .list.projects {
        break-after: column;
    }

    .homepage .list.recipes {
        margin-bottom: 3rem;
    }
}

@media (min-width: 992px) {
    .homepage {
        column-count: 3;
    }

    .homepage .list.about {
        break-after: avoid;
    }

    .homepage .list.projects {
        break-after: column;
    }

    .homepage .list.recipes {
        break-after: column;
        margin-bottom: 0;
    }

    .homepage .list.reference {
        break-after: auto;
    }
}

/* PAGE */

.page .list {
    margin-top: 2rem;
}

.gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (min-width: 600px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gallery img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
}

/* RECIPE */

.recipe-content {
    display: flex;
    flex-direction: column;
}

.ingredients, .instructions {
    width: 100%;
}

.ingredients ul li, .instructions ol li {
	margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
    .recipe-content {
        flex-direction: row;
    }
    .ingredients {
    	width: auto;
    	flex: 1;
        padding-right: 1rem;
    }
    .instructions {
    	flex: 3;
        padding-left: 1rem;
    }
}

/* PRINT */

@media print {
  header, footer {
    display: none;
  }
}
