/* Courtesy of https://www.joshwcomeau.com/css/custom-css-reset/,
   with some modifications for my own website. */

/* 1. Box Sizing: Standard reset to make padding/borders not increase element size. */
*, *::before, *::after {
    box-sizing: border-box;
}

/* 2. Remove default margins */
*:not(dialog) {
    border: 0;
    margin: 0;
    padding: 0;
}

/* 3a. Full viewport size */
html, body {
    height: 100%;
    width: 100%;
}

/* 3b. General improvements */
html {
    background-color: #ffffff;          /* Default background colour */
}
body {
    line-height: 1.5;                     /* More accessible line height */
    -webkit-font-smoothing: antialiased;  /* Turn off sub-pixel antialiasing (on Macbooks) */
    background-color: transparent;        
}

/* 4. Improve media defaults */
img, picture, video, canvas, svg {
    display: block;   /* A block-level element always starts on a new line and takes up the full width available */
    max-width: 100%;
}

/* 5. Inherit fonts for inputs/buttons */
input, button, textarea, select {
    font: inherit;
}

/* 6. Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

/* 7. Improve line wrapping */
p {
    text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
}