/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Variables as CSS Custom Properties */
:root {
  --text-color: #333333;
  --loud-color: #1a1a1a;
  --quiet-color: #666666;
  --invert-color: #cccccc;
  --header-color: #222222;
  
  --link-color: #2772aa;
  --link-visited-color: #317497;
  --link-hover-color: #3481ef;
  
  --background-color: white;
  --banner-color: #222;
  --footer-color: #111;
  
  --base-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --base-font-size: 110%;
  --base-line-height: 1.4;
  
  --article-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --article-font-size: 110%;
  --article-line-height: 1.6;
  
  --body-margin-x: 15%;
  --default-border-radius: 8px;
}

/* Base Styles */
html, body {
  height: 100%;
  background: var(--background-color);
}

body {
  color: var(--text-color);
  font-family: var(--base-font-family);
  font-size: var(--base-font-size);
  line-height: var(--base-line-height);
}

/* Sticky Footer Layout */
#container {
  min-height: 100%;
  height: auto !important;
  margin: 0 auto -90px;
}

#footer, #push {
  height: 90px;
}

/* Header */
header[role="banner"] {
  background: var(--banner-color);
  padding: 20px var(--body-margin-x);
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header[role="banner"] h1 {
  margin: 0;
  font-size: 1.5em;
}

header[role="banner"] h1 a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

header[role="banner"] h1 a:hover {
  color: white;
}

header[role="banner"] nav ul {
  list-style: none;
  display: flex;
  gap: 1em;
}

header[role="banner"] nav a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  text-transform: lowercase;
}

header[role="banner"] nav a:hover {
  color: white;
}

/* Main Content */
section[role="main"] {
  padding: 1px var(--body-margin-x);
}

section[role="main"] article {
  max-width: 600px;
  margin: 2em auto 3em;
}

section[role="main"] article p {
  font-family: var(--article-font-family);
  font-size: var(--article-font-size);
  font-weight: 400;
  line-height: var(--article-line-height);
  margin: 1em 0;
}

/* Typography */
strong, b {
  color: var(--loud-color);
  font-weight: bold;
}

em, i {
  font-style: italic;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--header-color);
  margin: 1em 0;
}

h1 {
  font-weight: bold;
  font-size: 200%;
  line-height: 1.1;
  margin: 0.75em 0;
}

h2 {
  font-weight: bold;
  font-size: 170%;
  line-height: 1.1;
}

h3 {
  font-weight: bold;
  font-size: 140%;
  line-height: 1.2;
  margin: 1.25em 0 0.5em;
}

h4 {
  font-weight: bold;
  font-size: 110%;
  line-height: 1.25;
  margin: 0.5em 0;
}

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

a:visited {
  color: var(--link-visited-color);
}

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

/* Footer */
#footer {
  overflow: hidden;
  background: var(--footer-color);
  padding: 0 var(--body-margin-x) 20px;
  font-size: 85%;
  font-weight: 100;
  letter-spacing: 0.07em;
  color: var(--invert-color);
  display: flex;
  align-items: center;
}

#footer p {
  margin: 0;
}

#footer strong {
  font-weight: 500;
  color: inherit;
}

/* Images */
article img {
  max-width: 100%;
  height: auto;
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --body-margin-x: 5%;
  }
  
  header[role="banner"] {
    flex-direction: column;
    gap: 1em;
  }
}
