:root {
  --bg: #f7f2e6;          /* light cream paper */
  --card: #fffdf7;        /* photo mounts and cards */
  --ink: #2a2520;         /* typewriter ink */
  --muted: #5d544a;
  --accent: #9a4c12;      /* burnt amber, readable on cream */
  --stamp: #b3342b;       /* rubber stamp red */
  --line: rgba(42,37,32,.18);
  --panel: #2e4440;       /* old receiver green, kept for the footer */
  --panel-text: #e9e3d4;
  --display: "Alfa Slab One", Georgia, serif;
  --body: "Courier Prime", "Courier New", Courier, monospace;
  /* Header photo: Moraine Lake, Banff National Park. Photo by Gorgo, public domain (Wikimedia Commons).
     To host it yourself, save the image as photos/moraine-lake.jpg and it will be used first. */
  --header-photo: url("photos/moraine-lake.jpg"), url("https://upload.wikimedia.org/wikipedia/commons/c/c5/Moraine_Lake_17092005.jpg");
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  position: relative;
}
/* Faint, oversized azimuthal map centred on Edmonton, fixed behind the page */
body::before {
  content: "";
  position: fixed;
  left: 50%; top: 50%;
  width: 165vmax; height: 165vmax;
  transform: translate(-50%, -50%);
  background: url("images/azimuth-edmonton.svg") center / contain no-repeat;
  opacity: .1;
  z-index: -1;
  pointer-events: none;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1rem; }

/* ---------- Header: Moraine Lake ---------- */
.masthead {
  position: relative;
  color: #fff;
  background-color: #35556a;
  background-image: linear-gradient(rgba(10,20,30,.55), rgba(10,20,30,.05) 30%, rgba(10,20,30,.1) 60%, rgba(10,20,30,.6)), var(--header-photo);
  background-size: cover;
  background-position: center 60%;
  min-height: clamp(26rem, 72vh, 42rem);
  display: flex; flex-direction: column;
}
.masthead.small { min-height: clamp(14rem, 34vh, 20rem); }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-top: 1rem; padding-bottom: 1rem; }
.brand { font-family: var(--display); font-size: 1.5rem; color: #fff; text-decoration: none; letter-spacing: .02em; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
nav a { color: #fff; text-decoration: none; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
nav a:hover { text-decoration: underline; }
.masthead-title { margin-top: auto; padding-bottom: 2.25rem; }
.callsign {
  font-family: var(--display);
  font-size: clamp(3.5rem, 13vw, 7.5rem);
  line-height: .95;
  margin: 0 0 .5rem;
  letter-spacing: .01em;
  text-shadow: 0 2px 18px rgba(0,0,0,.45);
}
.place { margin: 0 0 1rem; font-weight: 700; font-size: 1.05rem; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.credit { position: absolute; right: .75rem; bottom: .4rem; margin: 0; font-size: .7rem; color: rgba(255,255,255,.8); text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.credit a { color: inherit; }

/* ---------- Intro ---------- */
.hero { padding: 3.5rem 0 3rem; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.intro h1 { font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.15; margin: 0 0 1rem; }
.intro p { margin: 0 0 1rem; max-width: 36rem; }
.facts { padding: 1.25rem 1.5rem; margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .35rem 1.25rem; background: rgba(255,253,247,.85); border: 1px solid var(--line); }
.facts dt { color: var(--accent); font-weight: 700; }
.facts dd { margin: 0; }

/* ---------- Sections ---------- */
section.block { padding: 3.5rem 0; border-top: 1px solid var(--line); }
h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.75rem, 3.5vw, 2.25rem); margin: 0 0 .5rem; }
.lede { color: var(--muted); margin: 0 0 2rem; max-width: 42rem; }

/* Log (blog) */
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: 10rem 1fr; gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px dashed var(--line); }
.log li:first-child { padding-top: 0; }
.log time { color: var(--accent); font-variant-numeric: tabular-nums; font-weight: 700; }
.log .freq { display: block; color: var(--muted); font-size: .95rem; font-weight: 400; }
.log h3 { margin: 0 0 .35rem; font-size: 1.25rem; line-height: 1.3; }
.log h3 a { color: var(--ink); text-decoration: none; }
.log h3 a:hover { color: var(--accent); text-decoration: underline; }
.log p { margin: 0; color: var(--muted); max-width: 42rem; }

/* Station */
.station { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2rem 3rem; margin: 0; }
.station dt { font-family: var(--display); font-size: 1.15rem; color: var(--accent); margin-bottom: .25rem; }
.station dd { margin: 0; }

/* Photos: album prints */
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 2rem; }
.photo { margin: 0; background: var(--card); padding: .75rem .75rem 1rem; color: var(--ink); position: relative; box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 12px 22px -12px rgba(60,45,25,.45); }
.photo:nth-child(odd) { transform: rotate(-1deg); }
.photo:nth-child(even) { transform: rotate(1.2deg); }
.photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo figcaption { margin-top: .6rem; font-style: italic; font-size: .92rem; }

/* Contact */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 2rem; }
.contact h3 { margin: 0 0 .35rem; font-size: 1.2rem; }
.contact p { margin: 0; color: var(--muted); }

footer { background: var(--panel); color: var(--panel-text); padding: 2rem 0; margin-top: 2rem; }
footer p { margin: 0; color: #b9c2b5; }
footer .sign { font-family: var(--display); color: var(--panel-text); font-size: 1.4rem; margin-bottom: .25rem; }

@media (max-width: 760px) {
  body { font-size: 1rem; }
  .hero { padding: 2.25rem 0 2.5rem; }
  .hero .wrap { grid-template-columns: 1fr; gap: 2rem; }
  .log li { grid-template-columns: 1fr; gap: .4rem; }
  .masthead { min-height: 30rem; background-position: 40% 60%; }
  .masthead-title { padding-bottom: 3.25rem; }
  .credit { left: 1rem; right: 1rem; font-size: .62rem; }
  .masthead.small { min-height: 13rem; }
}

/* ---------- Log entry (blog post) pages ---------- */
.post { padding: 3rem 0 4rem; }
.post .wrap { max-width: 46rem; }
.back { display: inline-block; margin-bottom: 2rem; font-weight: 700; }
.post-head h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; margin: 0 0 1.5rem; }
.entry-card {
  background: var(--card);
  color: var(--ink);
  padding: 1rem 1.25rem 1.1rem;
  border-radius: 4px;
  transform: rotate(-.6deg);
  box-shadow: 0 12px 24px -14px rgba(60,45,25,.5);
  margin-bottom: 2.5rem;
}
.entry-card table { width: 100%; border-collapse: collapse; font-size: .9rem; text-align: center; font-variant-numeric: tabular-nums; }
.entry-card th { font-weight: 700; padding: .3rem .2rem; border: 1.5px solid var(--ink); background: rgba(42,37,32,.06); }
.entry-card td { padding: .45rem .2rem; border: 1.5px solid var(--ink); font-style: italic; color: #1f3a8a; }
.prose { font-size: 1.08rem; line-height: 1.75; }
.prose p { margin: 0 0 1.25rem; }
.prose h2 { font-size: 1.6rem; margin: 2.5rem 0 .75rem; }
.prose ul, .prose ol { margin: 0 0 1.25rem; padding-left: 1.4rem; }
.prose li { margin-bottom: .4rem; }
.prose blockquote { margin: 1.5rem 0; padding: .25rem 0 .25rem 1.25rem; border-left: 3px solid var(--accent); font-style: italic; color: var(--muted); }
.prose .photo { margin: 2rem 0; }
.post-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px dashed var(--line); }
.post-nav a { font-weight: 700; }
.post-nav span { display: block; color: var(--muted); font-weight: 400; font-size: .95rem; }

@media (max-width: 760px) {
  .post { padding: 2rem 0 3rem; }
  .entry-card { padding: .75rem .6rem .8rem; }
  .entry-card table { font-size: .75rem; }
  .prose { font-size: 1rem; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Morse callsign (in the header) ---------- */
.morse { display: flex; flex-wrap: wrap; gap: .35rem .8rem; margin: 0 0 1.25rem; }
.mc { display: inline-flex; align-items: center; gap: .3rem; }
.dit, .dah { display: inline-block; height: .55rem; background: #fff; border-radius: 999px; box-shadow: 0 1px 4px rgba(0,0,0,.4); transition: background-color .04s; }
.dit { width: .55rem; }
.dah { width: 1.4rem; }
.dit.on, .dah.on { background: #ffb347; }
.play {
  font: inherit; font-weight: 700; font-size: 1rem;
  background: rgba(0,0,0,.25); color: #fff;
  border: 2px solid #fff; border-radius: 999px;
  padding: .45rem 1.1rem; margin: 0; cursor: pointer;
}
.play:hover:not(:disabled) { background: #fff; color: var(--ink); }
.play:disabled { opacity: .75; cursor: default; }
@media (max-width: 760px) {
  .morse { gap: .3rem .6rem; }
  .dit, .dah { height: .45rem; }
  .dit { width: .45rem; }
  .dah { width: 1.3rem; }
}

/* ---------- POTA activations ---------- */
.table-scroll { overflow-x: auto; }
.activations { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 34rem; }
.activations th { text-align: left; color: var(--accent); font-weight: 700; padding: .5rem .75rem .5rem 0; border-bottom: 2px solid rgba(42,37,32,.35); }
.activations td { padding: .65rem .75rem .65rem 0; border-bottom: 1px dashed var(--line); }
.activations td:last-child, .activations th:last-child { text-align: right; padding-right: 0; }
.parks-link { margin: 1.5rem 0 0; font-weight: 700; }

/* ---------- Clubs ---------- */
h3.sub { font-family: var(--display); font-weight: 400; font-size: 1.4rem; margin: 3rem 0 1rem; }
.clubs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem 3rem; }
.clubs li { font-weight: 700; }
.clubs a { color: var(--ink); }
.clubs a:hover { color: var(--accent); }
.clubs span { display: block; color: var(--accent); font-weight: 400; font-variant-numeric: tabular-nums; }
.ditdit { font-family: var(--body); font-size: 1rem; font-style: italic; color: #e8a23a; margin-left: .4rem; }
