@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;700&family=IBM+Plex+Sans:wght@300;500&display=swap");

:root {
  --ink: #161413;
  --muted: #5a605f;
  --paper: #f6f2ea;
  --panel: #ffffff;
  --accent: #d56b30;
  --accent-deep: #9a4c2b;
  --line: #ded8cd;
  --shadow: rgba(22, 20, 19, 0.08);
  --site-admin-bar-bg: #f5efe6;
  --site-admin-bar-hamburger-bg: #6b6a69;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(120deg, #f5efe6 0%, #f8f4ee 60%, #fbfaf7 100%);
  background-image: linear-gradient(
      120deg,
      #f5efe6 0%,
      #f8f4ee 60%,
      #fbfaf7 100%
    ),
    url("../img/pattern.svg");
  font-family: "IBM Plex Sans", "Avenir", "Trebuchet MS", sans-serif;
  line-height: 1.6;
}

.theme-webstead {
  min-height: 100vh;
}

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

a {
  color: var(--accent-deep);
  text-decoration: none;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--accent-deep);
  color: #fff;
  border-radius: 999px;
  z-index: 10;
}

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

.site-header {
  padding: 3rem 6vw 2rem;
  border-bottom: 1px solid var(--line);
}

.site-title a {
  font-family: "Fraunces", "Iowan Old Style", "Palatino", serif;
  font-size: clamp(2rem, 3vw, 3.25rem);
  letter-spacing: 0.02em;
  color: var(--ink);
}

.site-tagline {
  max-width: 55ch;
  margin-top: 0.5rem;
  color: var(--muted);
}

.site-nav {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 6px 18px var(--shadow);
}

.site-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 6vw 4rem;
}

.site-footer {
  padding: 2.5rem 6vw 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-meta,
.footer-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.footer-admin a {
  font-size: 0.9rem;
  color: var(--muted);
}

.author-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 30px var(--shadow);
  animation: rise 0.6s ease;
}

.author-details h1 {
  font-family: "Fraunces", "Iowan Old Style", "Palatino", serif;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.author-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.author-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 3rem;
}

.section-link {
  font-size: 0.9rem;
  color: var(--muted);
}

.recent-post-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.recent-post-list li {
  display: flex;
  gap: 1rem;
  align-items: baseline;
}

.entry-header h1,
.entry-header h3 {
  font-family: "Fraunces", "Iowan Old Style", "Palatino", serif;
}

.entry-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}

.entry-article,
.entry-activity,
.entry-note,
.entry-summary,
.entry-photo {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 24px var(--shadow);
  animation: rise 0.6s ease;
}

.entry-summary .entry-link {
  display: inline-flex;
  margin-top: 1rem;
  font-weight: 500;
}

.entry-note .entry-meta,
.entry-photo .entry-meta {
  margin-top: 1rem;
}

.tags {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tags a {
  background: #f3eee5;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--accent-deep);
}

.post-filter {
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
}

.post-filter form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.post-filter label {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.paginator {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

.pagination-item {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.pagination-status {
  color: var(--muted);
}

.photo-slider {
  margin: 2rem 0;
  padding: 0 1.5rem 1.5rem;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #fff7ec 0%, #ffffff 100%);
  box-shadow: 0 16px 32px var(--shadow);
  overflow: hidden;
}

.slides {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(100%, 1fr);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.slide,
.slides > li {
  scroll-snap-align: start;
}

.photo-frame,
.photo-container {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  background: #fff;
  border: none;
  box-shadow: none;
}

.photo-frame::before,
.photo-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--photo-image);
  background-size: cover;
  background-position: center;
  filter: blur(26px) saturate(1.1);
  transform: scale(1.1);
  opacity: 0.65;
}

.photo-frame img,
.photo-container img {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(18rem, 70vh, 44rem);
  object-fit: contain;
}

.slider-nav ol {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: flex;
  gap: 0.6rem;
  justify-content: center;
}

.slider-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--accent-deep);
  font-size: 0.8rem;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    border 0.2s ease;
}

.slider-nav a:hover,
.slider-nav a:focus {
  transform: translateY(-1px);
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  outline: none;
}

.photo-slider figcaption {
  margin-top: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff7ec;
  color: var(--muted);
  font-size: 0.9rem;
}

.entry-activity {
  background: linear-gradient(160deg, #fff9f1 0%, #ffffff 85%);
  border-color: #e8ddcd;
}

.entry-activity .entry-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.activity-kicker {
  align-self: flex-start;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff3e6;
  color: var(--accent-deep);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.entry-activity .entry-header h1.p-name,
.entry-activity .entry-header h3.p-name {
  margin: 0;
}

.activity-map {
  height: clamp(16rem, 45vh, 30rem);
  margin: 1.25rem 0 1rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 18px 32px var(--shadow);
  background: linear-gradient(145deg, #f3ede2 0%, #ffffff 100%);
  z-index: 0;
}

.activity-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.9rem;
  margin: 0.75rem 0 1.5rem;
  padding: 0;
}

.activity-stats div {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  background: var(--panel);
  box-shadow: 0 10px 20px var(--shadow);
}

.activity-stats dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.activity-stats dd {
  margin: 0.35rem 0 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.activity-elevation {
  margin: 0.5rem 0 1.5rem;
  padding: 0.9rem 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 12px 24px var(--shadow);
}

.activity-elevation__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 0.5rem;
  color: var(--muted);
}

.activity-elevation__header p {
  margin: 0;
}

.activity-elevation__totals strong {
  color: var(--ink);
}

.activity-elevation__chart {
  width: 100%;
  height: 8rem;
  display: block;
}

.activity-elevation__fill {
  fill: rgba(213, 107, 48, 0.18);
}

.activity-elevation__line {
  stroke: var(--accent);
  stroke-width: 2;
  fill: none;
}

.activity-elevation__cursor {
  fill: var(--accent);
  stroke: #ffffff;
  stroke-width: 2;
  display: none;
}

.activity-elevation__overlay {
  fill: transparent;
  cursor: crosshair;
}

.activity-elevation__empty {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.activity-track {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.activity-track--missing {
  opacity: 0.8;
  font-style: italic;
}

.staff-controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}

.button-secondary {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
}

.error-page {
  text-align: center;
  padding: 4rem 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 2.5rem 6vw 1.5rem;
  }

  .author-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .author-links {
    justify-content: center;
  }

  .entry-article,
  .entry-activity,
  .entry-note,
  .entry-summary,
  .entry-photo {
    padding: 1.5rem;
  }

  .slides {
    grid-auto-columns: 92vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
