/* troytroy.com — refreshed 2026, keeping the spirit of the 2003 design */

:root {
  --accent: #b90303;
  --ink: #222;
  --paper: #fff;
  --backdrop: #666;
  --rule: #ddd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 24px 12px;
  color: var(--ink);
  background-color: var(--backdrop);
  font-family: Charter, Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

#content {
  max-width: 780px;
  margin: 0 auto;
  padding: 28px 36px;
  background-color: var(--paper);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

/* Header: the train */

#site-header {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}

#site-header img.train {
  max-width: 100%;
  height: auto;
}

.print-only {
  display: none;
}

/* Middle: nav + content, side by side on wide screens */

#middle {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 24px;
  padding-top: 20px;
}

#site-nav {
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 0.9375rem;
}

#site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#site-nav ul ul {
  margin: 2px 0 2px 14px;
  font-size: 0.875rem;
}

#site-nav li {
  margin: 2px 0;
}

#site-nav a {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
  text-decoration: none;
}

#site-nav a:hover,
#site-nav a:focus-visible {
  color: #fff;
  background-color: var(--accent);
}

/* Content */

main {
  min-width: 0;
}

main h1,
main h2,
main h3 {
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  line-height: 1.25;
}

main h1 {
  margin-top: 0;
}

main h2 {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 4px;
}

main a {
  color: #0b5394;
  text-decoration: underline;
  text-underline-offset: 2px;
}

main a:hover {
  color: var(--accent);
}

main img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

/* Photo thumbnails sit side by side with a little breathing room */

main a:has(img) {
  text-decoration: none;
}

main a img {
  margin: 4px 6px 4px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Footer */

#site-footer {
  margin-top: 28px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 0.8125rem;
  color: #777;
}

/* Small screens: nav flows horizontally above the content */

@media (max-width: 640px) {
  body {
    padding: 0;
  }

  #content {
    border-radius: 0;
    padding: 20px 18px;
  }

  #middle {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #site-nav ul,
  #site-nav ul ul,
  #site-nav li {
    display: inline;
    margin: 0;
    font-size: 0.9375rem;
  }

  #site-nav a {
    padding: 4px 8px;
    margin: 2px 2px 2px 0;
  }
}

/* Print: static train, no nav or chrome, just the words */

@media print {
  body {
    padding: 0;
    background: #fff;
    font-size: 12pt;
  }

  #content {
    max-width: none;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
  }

  .screen-only,
  #site-nav,
  #site-footer {
    display: none;
  }

  .print-only {
    display: inline;
  }

  #middle {
    display: block;
  }

  main a {
    color: #000;
    text-decoration: none;
  }
}
