:root {
  --page-bg: #315c78;
  --page-bg-dark: #24455b;
  --window: #d8d4c6;
  --window-light: #f7f5ec;
  --window-mid: #c2beb1;
  --window-dark: #5c5a54;
  --title: #000080;
  --title-light: #1084d0;
  --text: #111111;
  --link: #0000cc;
  --visited: #551a8b;
  --accent: #fff8cc;
  --green: #0a7f22;
  --mono: "Courier New", Courier, monospace;
  --sans: Verdana, Geneva, Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  background-color: var(--page-bg);
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.05) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.05) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}

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

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

a:hover,
a:focus-visible {
  background: #ffff66;
  color: #000000;
}

code {
  font-family: var(--mono);
  font-size: 0.95em;
  background: #eeeeee;
  border: 1px solid #888888;
  padding: 1px 4px;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 999;
  padding: 8px 10px;
  background: #ffffff;
  border: 2px solid #000000;
}

.skip-link:focus {
  top: 8px;
}

.site-shell {
  width: min(920px, calc(100% - 24px));
  margin: 24px auto;
}

.site-header,
.panel,
.site-footer,
.error-box {
  background: var(--window);
  border-top: 2px solid var(--window-light);
  border-left: 2px solid var(--window-light);
  border-right: 2px solid var(--window-dark);
  border-bottom: 2px solid var(--window-dark);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.25);
}

.site-header,
.panel {
  margin-bottom: 18px;
}

.title-bar,
.panel__heading {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 7px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--title), var(--title-light));
  font-weight: 700;
}

.title-bar__icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #000000;
  background: #ffffff;
  border: 1px solid #000000;
  font-family: var(--mono);
  font-size: 10px;
}

.header-body,
.panel__body {
  padding: 16px;
}

.eyebrow {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.1;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.tagline {
  max-width: 700px;
  margin-bottom: 16px;
}

.nav-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px dotted #777777;
}

.nav-bar a,
.button-link,
.project-card__links a {
  display: inline-block;
  padding: 5px 10px;
  color: #000000;
  text-decoration: none;
  background: var(--window);
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #555555;
  border-bottom: 2px solid #555555;
}

.nav-bar a:visited,
.button-link:visited,
.project-card__links a:visited {
  color: #000000;
}

.nav-bar a:hover,
.nav-bar a:focus-visible,
.button-link:hover,
.button-link:focus-visible,
.project-card__links a:hover,
.project-card__links a:focus-visible {
  background: #eeeeee;
  outline: 1px dotted #000000;
  outline-offset: -4px;
}

.nav-bar a:active,
.button-link:active,
.project-card__links a:active {
  border-top-color: #555555;
  border-left-color: #555555;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
}

.panel__heading {
  justify-content: flex-start;
}

.panel__heading h2 {
  margin: 0;
  font-size: 14px;
}

.panel__heading--split {
  justify-content: space-between;
}

.counter {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(220px, 0.8fr);
  gap: 18px;
}

.status-box {
  align-self: start;
  padding: 10px;
  background: #ffffff;
  border: 1px inset #999999;
  font-family: var(--mono);
  font-size: 12px;
}

.status-box > strong {
  display: block;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px dashed #777777;
}

.status-box dl,
.status-box dd {
  margin: 0;
}

.status-box dl > div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 8px;
  padding: 3px 0;
}

.status-box dt {
  font-weight: 700;
}

.status-light {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  background: var(--green);
  border: 1px solid #004d10;
}

.section-intro {
  padding: 9px 10px;
  background: var(--accent);
  border: 1px solid #a79745;
}

.project-list {
  display: grid;
  gap: 14px;
}

.project-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  background: #eeeeee;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #777777;
  border-bottom: 2px solid #777777;
}

.project-card--featured {
  outline: 2px solid #a79745;
  outline-offset: 2px;
}

.project-card__media {
  position: relative;
  min-height: 150px;
  background: #111111;
  border-right: 1px solid #777777;
  overflow: hidden;
}

.project-card__image {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  display: block;
}

.project-card__image[hidden],
.project-card__placeholder[hidden] {
  display: none;
}

.project-card__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  color: #7dff80;
  background:
    repeating-linear-gradient(0deg, rgba(0, 255, 0, 0.05) 0 1px, transparent 1px 3px),
    #101710;
  font-family: var(--mono);
  font-size: 12px;
  text-align: center;
}

.project-card__content {
  min-width: 0;
  padding: 12px;
}

.project-card__title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
  margin-bottom: 8px;
  border-bottom: 1px dotted #777777;
}

.project-card__title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
}

.project-card__year {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 11px;
}

.project-card__summary {
  margin-bottom: 10px;
}

.project-card__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0;
  margin: 0 0 12px;
  list-style: none;
}

.project-card__tech li {
  padding: 2px 5px;
  background: #ffffff;
  border: 1px solid #888888;
  font-family: var(--mono);
  font-size: 11px;
}

.project-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.big-link {
  display: block;
  padding: 12px;
  color: #000000;
  text-decoration: none;
  background: #ffffff;
  border: 1px inset #999999;
}

.big-link:visited {
  color: #000000;
}

.big-link__label,
.big-link__detail {
  display: block;
}

.big-link__label {
  margin-bottom: 2px;
  font-weight: 700;
  text-decoration: underline;
}

.big-link__detail {
  font-size: 12px;
}

.site-footer {
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 11px;
  text-align: center;
}

.site-footer p {
  margin: 2px 0;
}

.last-updated {
  color: #333333;
}

.error-page {
  display: grid;
  place-items: center;
  padding: 20px;
}

.error-box {
  width: min(560px, 100%);
}

.error-box__body {
  padding: 20px;
}

.error-box h1 {
  font-size: 24px;
}

@media (max-width: 680px) {
  body {
    font-size: 13px;
  }

  .site-shell {
    width: min(100% - 12px, 920px);
    margin: 6px auto;
  }

  .about-grid,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-card__media {
    min-height: 190px;
    border-right: 0;
    border-bottom: 1px solid #777777;
  }

  .project-card__image {
    min-height: 190px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
