:root {
  --turquoise: #4caac9;
  --turquoise-dark: #247f9d;
  --turquoise-pale: #dff3f8;
  --coral: #ef8158;
  --yellow: #f1c84c;
  --ink: #3f4345;
  --muted: #70777a;
  --paper: #ffffff;
  --canvas: #f4f4f1;
  --line: #d8dcdd;
  --slab: Rockwell, "Roboto Slab", "Courier New", Georgia, serif;
  --sans: "Trebuchet MS", Arial, Helvetica, sans-serif;
  --page: 62rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 9rem, rgba(76, 170, 201, .08) 0 3rem, transparent 3.1rem),
    radial-gradient(circle at 93% 34rem, rgba(239, 129, 88, .07) 0 4rem, transparent 4.1rem),
    var(--canvas);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--turquoise-dark); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: #b94e2e; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.skip-link {
  position: absolute;
  z-index: 50;
  top: .4rem;
  left: .4rem;
  padding: .55rem .8rem;
  color: #fff;
  background: var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.independent-banner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .25rem .7rem;
  padding: .6rem 1rem;
  border-bottom: 3px solid var(--turquoise);
  color: #fff;
  background: #34393b;
  font-size: .77rem;
  line-height: 1.4;
  text-align: center;
}
.independent-banner strong {
  color: #f8d76c;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.site-header {
  width: min(calc(100% - 2rem), var(--page));
  margin: 0 auto;
  padding: 2.25rem 0 0;
  background: var(--paper);
}
.masthead {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1rem;
  padding: 0 1.5rem 1.4rem;
}
.site-title {
  color: var(--turquoise);
  font-family: var(--slab);
  font-size: clamp(1.75rem, 5vw, 3.05rem);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  text-shadow: 1px 1px 0 #fff, 2px 2px 0 rgba(36, 127, 157, .13);
}
.hello { color: var(--muted); font-size: .86rem; }
.nav-toggle {
  min-height: 2.5rem;
  padding: .55rem .8rem;
  border: 1px solid var(--turquoise-dark);
  color: var(--turquoise-dark);
  background: #fff;
  font: 700 .75rem/1 var(--sans);
  text-transform: uppercase;
}

.site-nav {
  border-top: 1px solid var(--line);
  border-bottom: 5px solid var(--turquoise);
  background: #f9faf9;
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: block;
  padding: .78rem .8rem .72rem;
  border-right: 1px solid #e2e5e6;
  color: #555b5d;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .035em;
  text-decoration: none;
}
.site-nav li:last-child a { border-right: 0; }
.site-nav a:hover { color: #fff; background: var(--turquoise); }

main {
  width: min(calc(100% - 2rem), var(--page));
  margin: 0 auto;
  padding-bottom: 3rem;
  background: var(--paper);
}
.page-card { padding: clamp(1.4rem, 5vw, 3.35rem); }
.page-card > * { max-width: 46rem; margin-right: auto; margin-left: auto; }
.page-card > .image-grid { max-width: 55rem; }

.archive-source {
  margin-top: 0;
  margin-bottom: .7rem;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
h1, h2, h3 { font-family: var(--slab); line-height: 1.16; }
h1 {
  margin-top: 0;
  margin-bottom: 1.25rem;
  color: var(--turquoise);
  font-size: clamp(2.15rem, 7vw, 4.4rem);
  font-weight: 700;
}
h2 {
  margin-top: 2.6rem;
  margin-bottom: .65rem;
  padding-top: .75rem;
  border-top: 1px dotted #9ecfdd;
  color: #4e5658;
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: 700;
}
h3 { color: #b94e2e; }
p { margin-top: 0; margin-bottom: 1.05rem; }
.lede { color: #545b5e; font-size: 1.15rem; line-height: 1.6; }
code {
  padding: .08em .3em;
  border: 1px solid #c9e6ee;
  color: #36616f;
  background: #f1fafc;
  font-size: .9em;
}

.archive-notice {
  margin: 1.4rem auto 1.8rem;
  padding: 1rem 1.15rem;
  border: 1px solid #8fc9da;
  border-left: .55rem solid var(--turquoise);
  color: #36545e;
  background: var(--turquoise-pale);
  font-size: .89rem;
  line-height: 1.5;
}
.archive-notice strong { color: #235f72; }
.archive-quote {
  margin: 1.5rem auto;
  padding: 1.2rem 1.35rem .15rem;
  border: 1px solid #e2bba8;
  border-left: .55rem solid var(--coral);
  background: #fff8f4;
  font-family: Georgia, serif;
  font-size: 1.06rem;
  line-height: 1.65;
}

.image-grid {
  display: grid;
  gap: 1.2rem;
  margin-top: 1.7rem;
  margin-bottom: 2rem;
}
.portfolio-image {
  margin: 0;
  padding: .35rem;
  border: 1px solid #bfc5c6;
  background: #fff;
  box-shadow: 5px 5px 0 rgba(76, 170, 201, .14);
}
.portfolio-image img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.portfolio-image figcaption {
  padding: .65rem .35rem .35rem;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.4;
}
.post-date {
  margin: -.3rem 0 .7rem;
  color: #b94e2e;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.site-directory {
  display: grid;
  gap: 1.5rem;
  padding: 2rem clamp(1.4rem, 5vw, 3.35rem);
  border-top: 5px solid var(--turquoise);
  background: #f1f7f8;
}
.site-directory h2 {
  margin: 0 0 .65rem;
  padding: 0;
  border: 0;
  color: var(--turquoise-dark);
  font-family: var(--slab);
  font-size: 1rem;
}
.site-directory ul { margin: 0; padding: 0; list-style: none; }
.site-directory li + li { margin-top: .25rem; }
.site-directory a { font-size: .82rem; }

.site-footer {
  padding: 2rem max(1rem, calc((100% - var(--page)) / 2 + 1.5rem));
  border-top: .45rem solid var(--coral);
  color: #dce3e5;
  background: #34393b;
  font-size: .8rem;
  text-align: center;
}
.site-footer p { margin: .3rem auto; max-width: 45rem; }
.site-footer strong { color: #fff; font-family: var(--slab); }

.error-card { min-height: 46vh; display: grid; align-content: center; }

@media (max-width: 43rem) {
  .masthead { grid-template-columns: 1fr auto; align-items: center; }
  .hello { display: none; }
  .nav-enhanced .site-nav:not(.is-open) { display: none; }
  .site-nav li { width: 50%; }
  .site-nav a { border-bottom: 1px solid #e2e5e6; text-align: center; }
}

@media (min-width: 43.01rem) {
  .nav-toggle { display: none; }
  .site-directory { grid-template-columns: 1fr 1fr 1.15fr; }
  .image-grid:has(.portfolio-image + .portfolio-image) { grid-template-columns: 1fr 1fr; }
}

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