/*
  Classic visual layer for ethanmacdonald.ca.

  The site intentionally inherits a browser-like, low-design feel:
  plain white page background, dark text, blue underlined links, a centered
  roughly 900px page, and a 200px left navigation column on desktop. Layout
  classes are explicit so generated fragments do not depend on historical
  table/inline-style inheritance.
*/
:root {
  color-scheme: light;
  --page-bg: #ffffff;
  --text: #000000;
  --muted: #333333;
  --link: #0000ee;
  --visited: #551a8b;
  --focus: #000000;
  --rule: #999999;
  --container-width: 900px;
  --nav-width: 200px;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.4;
  font-family: Arial, Helvetica, sans-serif;
}

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

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

a:hover,
a:focus {
  color: var(--link);
}

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.17rem;
}

ul,
ol {
  padding-left: 1.4rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--page-bg);
  color: var(--link);
  padding: 0.25rem 0.5rem;
  z-index: 10;
}

.skip-link:focus {
  left: 0.5rem;
}

.page-shell {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0.5rem;
}

.site-title {
  text-align: center;
  padding: 1rem 0 0.75rem;
}

.site-title h1 {
  margin: 0;
  font-size: 2.25rem;
  font-weight: bold;
}

.site-title p {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.classic-layout {
  display: grid;
  grid-template-columns: var(--nav-width) 1fr;
  gap: 1rem;
  align-items: start;
}

.side-nav {
  padding-top: 2rem;
  overflow-wrap: anywhere;
}

.site-nav p {
  margin: 0;
}

.site-nav strong {
  display: block;
  margin-bottom: 0.25rem;
}

.site-nav a {
  display: block;
  color: var(--link);
  text-decoration: underline;
  margin: 0.1rem 0;
}

.site-nav a:visited {
  color: var(--visited);
}

.main-content {
  min-width: 0;
  overflow-wrap: anywhere;
}

.main-content h1:first-child,
.main-content h2:first-child {
  margin-top: 0;
}

.profile-caricature {
  max-width: min(100%, var(--nav-width));
  height: auto;
  display: block;
  margin: 0 0 1rem 0;
}

.side-nav .profile-caricature {
  max-width: calc(var(--nav-width) - 0.5rem);
}

.publication-list li {
  margin-bottom: 0.75rem;
}

.profile-icon {
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.2em;
  margin-right: 0.4em;
}

.file-list,
.blog-index-entry {
  margin-bottom: 1rem;
}

.file-meta,
.post-date,
.muted,
figcaption {
  color: #555555;
}

figure {
  margin: 1.5rem 0;
}

figcaption {
  font-size: 0.95rem;
}

.site-footer {
  margin-top: 1rem;
  text-align: center;
  color: var(--text);
  font-size: 0.95rem;
}

.site-footer hr {
  border: 0;
  border-top: 1px solid var(--rule);
}

.site-footer p {
  margin: 0.5rem 0;
}

@media (max-width: 700px) {
  .page-shell {
    max-width: none;
    padding: 0.75rem;
  }

  .site-title {
    padding-top: 0.75rem;
  }

  .site-title h1 {
    font-size: 1.8rem;
  }

  .classic-layout {
    display: block;
  }

  .side-nav {
    padding-top: 0;
    margin-bottom: 1rem;
  }

  .site-nav a {
    padding: 0.15rem 0;
  }
}

@media print {
  body {
    background: white;
    color: black;
  }

  .side-nav,
  .skip-link {
    display: none;
  }

  .page-shell {
    max-width: none;
    padding: 0;
  }
}
