:root {
  --font-heading: 'Alegreya', serif;
  --font-body: 'Open Sans', sans-serif;
  --font-mono: "Menlo", "Monaco", "Consolas", "Courier New", monospace;

  /* Typography Colors */
  --color-text: #333;
  --color-heading: #222;
  --color-text-light: #666;
  --color-border: #eee;
  --color-link: #2A7AE2;
  --color-link-hover: #111;
  --color-bg-alt: #f9f9f9;

  --width-container: 840px;

  /* Backgrounds & Shadows */
  --color-bg: #ffffff;
  --color-bg-card: #ffffff;
  --color-shadow: rgba(0, 0, 0, 0.1);
  --color-overlay: rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-text: #e6e6e6;
    --color-heading: #f7f7f7;
    --color-text-light: #b0b0b0;
    --color-border: #333333;
    --color-link: #58a6ff;
    --color-link-hover: #ffffff;

    --color-bg: #0d1117;
    --color-bg-alt: #161b22;
    --color-bg-card: #161b22;
    --color-shadow: rgba(0, 0, 0, 0.7);
    --color-overlay: rgba(0, 0, 0, 0.6);
  }
}

/* Minimal Reset & Base */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  color: var(--color-heading);
}

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

a:hover {
  text-decoration: underline;
}

/* Navbar Modernization */
.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: 10px 0;
  margin-bottom: 25px;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: bold;
  color: var(--color-heading);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
  color: #555;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  gap: 6px;
  width: 30px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--color-text);
  transition: all 0.3s ease;
}

/* Burger Animation */
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 6px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -6px);
}

.site-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 20px;
}

.site-nav a {
  color: var(--color-text-light);
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.site-nav a:hover,
.site-nav a.active {
  color: #111;
  text-decoration: none;
}

/* Mobile Nav (Burger) */
@media (max-width: 600px) {
  .nav-wrapper {
    flex-wrap: wrap;
    /* Allow wrapping for menu to drop down */
  }

  .nav-toggle {
    display: flex;
    /* Show burger */
  }

  .site-nav {
    width: 100%;
    display: none;
    /* Hide by default */
    margin-top: 20px;
    border-top: 1px solid var(--color-border);
  }

  .site-nav.open {
    display: block;
    /* Show when open */
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
  }

  .site-nav a {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-bg-alt);
  }
}

p {
  font-size: 18px;
}

.img-responsive {
  width: 100%;
}

.img-index-responsive {
  width: 100%;
  height: auto;
}

blockquote {
  border-left: none;
}

blockquote:before {
  content: "❝";
  font-size: 40px;
  padding-right: 10px;
  line-height: 0.1;
  display: block;
  margin-bottom: 20px;
  margin-top: 20px;
}

blockquote:after {
  content: "❞";
  font-size: 40px;
  line-height: 0.1;
  display: block;
  text-align: right;
  margin-top: 20px;
  margin-bottom: 10px;
}

blockquote footer {
  text-align: right;
  font-style: italic;
}

img {
  max-width: 100%;
  height: auto;
}

/* Archive Page Styling */
.archive-container {
  max-width: 740px;
  margin: 0 auto;
}

.archive-year {
  font-size: 28px;
  /* Slightly smaller font */
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 5px;
  /* Reduced from 10px */
  margin-top: 20px;
  /* Reduced from 40px */
  margin-bottom: 10px;
  /* Reduced from 20px */
  color: #111;
}

.archive-year:first-child {
  margin-top: 0;
}

.archive-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Remove custom bullets from archive lists when nested in post-content */
.post-content .archive-list li::before {
  content: none;
  display: none;
}


.archive-item {
  display: flex;
  align-items: center;
  /* Changed from baseline to center for images */
  padding: 4px 0;
  /* Reduced from 8px */
  border-bottom: 1px solid var(--color-bg-alt);
  min-height: 40px;
  /* Ensure click target is still decent */
}

.archive-item:last-child {
  border-bottom: none;
}

.archive-date {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--color-text-light);
  width: 80px;
  flex-shrink: 0;
}

.archive-thumb {
  width: 32px;
  /* Reduced from 40px */
  height: 32px;
  /* Reduced from 40px */
  margin-left: 15px;
  /* Changed to margin-left */
  flex-shrink: 0;
  border-radius: 4px;
  /* Soft square */
  overflow: hidden;
  background-color: var(--color-border);
  display: block;
}

.archive-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.archive-thumb:hover img {
  transform: scale(1.1);
}

.archive-link {
  font-size: 18px;
  font-weight: 500;
  color: var(--color-heading);
  /* No margin-left needed if thumb manages spacing, 
     but we need logic for no-thumb case? 
     Actually let's keep margin-left on link 0 and rely on 
     margin-right on date/thumb */
  flex-grow: 1;
}

.archive-link:hover {
  color: var(--color-link);
}

body {
  /* padding-top: 40px; */
  /* 40px to make the container go all the way to the bottom of the topbar */
  font-family: "Alegreya", "Open Sans", "Century Gothic", "Avant Garde", sans-serif;
}

h1,
h2,
h3,
h4 {
  font-family: "Alegreya", "Open Sans", "Century Gothic", "Avant Garde", sans-serif;
  font-weight: bold;
}

.page-header {
  font-family: "Alegreya", "Open Sans", "Century Gothic", "Avant Garde", sans-serif;
  margin-top: 25px;
}

.pagination {
  text-align: center;
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 30px 0;
}

.pagination li {
  display: inline-block;
}

.post-content .pagination li::before {
  content: none;
  display: none;
}

.container-narrow>footer p {
  text-align: center;
  /* center align it with the container */
  margin-top: 40px;
  font-size: 12px;
}

.map div {
  font-size: 14px;
}

.container {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  /* downsize our container to make the content feel a bit tighter and more cohesive. NOTE: this removes two full columns from the grid, meaning you only go to 14 columns and not 16. */
}

.banner {
  margin-top: -20px;
  width: 100%;
}

.post-full {
  margin-left: 2em;
  margin-right: 2em;
}

.post-full p,
.post-full ol,
.post-full ul,
.post-full blockquote {
  font-size: 22px;
  line-height: 175%;
  margin-bottom: 30px;
}

/* Custom container */
.container-narrow {
  margin: 0 auto;
  max-width: 840px;
  width: 100%;
  padding: 0 20px;
}

.container-narrow>hr {
  margin: 30px 0;
}

.navbar .nav {
  font-family: "Alegreya", "Open Sans", "Century Gothic", "Avant Garde", sans-serif;
  float: right;
}

.navbar-brand {
  font-family: "Alegreya", "Open Sans", "Century Gothic", "Avant Garde", sans-serif;
}

/* posts index */
.post>h3.title {
  position: relative;
  padding-top: 10px;
  color: var(--color-heading);
}

.post>h3.title a {
  color: var(--color-heading);
}

.date {
  margin-right: 1em;
}

.post>h3.title span.date {
  position: absolute;
  right: 0;
  font-size: 0.9em;
}

.post>.more {
  margin: 10px 0;
  text-align: left;
}

/* post-full*/
.post-full .date {
  margin-bottom: 20px;
  font-weight: bold;
}

/* tag_box */
.tag_box {
  list-style: none;
  margin: 0;
  overflow: hidden;
}

.tag_box li {
  line-height: 28px;
}

.tag_box li i {
  opacity: 0.9;
}

.tag_box.inline li {
  float: left;
}

.tag_box a {
  padding: 3px 6px;
  margin: 2px;
  background: var(--color-border);
  color: var(--color-text-light);
  border-radius: 3px;
  text-decoration: none;
  border: 1px dashed #cccccc;
}

.tag_box a span {
  vertical-align: super;
  font-size: 0.8em;
}

.tag_box a:hover {
  background-color: #e5e5e5;
}

.tag_box a.active {
  background: #57A957;
  border: 1px solid #4c964d;
  color: #FFF;
}

/* Center tags and remove duplicate bullets */
.tag_box {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 30px auto;
}

.tag_box.inline li {
  float: none;
  display: inline-block;
}

/* Override post-content custom bullets */
.post-content .tag_box li::before {
  content: none;
  display: none;
}

.hw {
  font-family: "Nothing You Could Do", cursive;
}

@media only screen and (max-width: 840px) {
  h1 {
    font-size: 26px;
    margin-bottom: 30px;
  }

  h2 {
    font-size: 30px;
    margin-bottom: 30px;
  }

  .post-full p ol ul blockquote {
    font-size: 16px;
  }

  .page-header h1 {
    margin-left: 0.5em;
  }

  .post-header h1 {
    margin-left: 0.5em;
  }

  .logo {
    font-size: 22px;
  }
}


/* Post Cards */
.post-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  margin-bottom: 30px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.post-card:hover {
  box-shadow: 0 4px 12px var(--color-shadow);
}

.post-card-image-link {
  display: block;
  overflow: hidden;
  max-height: 240px;
  /* Limit height to keep cards reasonable */
}

.post-card-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.post-card:hover .post-card-image {
  transform: scale(1.02);
}

.post-card-content {
  padding: 20px 25px;
}

.post-card-title {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 24px;
}

.post-card-title a {
  color: var(--color-heading);
  text-decoration: none;
}

.post-card-meta {
  color: var(--color-text-light);
  font-size: 14px;
  margin-bottom: 15px;
}

.post-card-excerpt {
  color: var(--color-text);
  line-height: 1.6;
}

.post-card-excerpt p {
  font-size: 16px;
  /* Slightly smaller than main body text for cards */
}

.post-card-readmore {
  display: inline-block;
  margin-top: 15px;
  font-weight: bold;
}

/* Post Layout */
.post-header-container {
  position: relative;
  background-size: cover;
  background-position: center;
  /* Fallback */
  color: white;
  margin-bottom: 40px;
  margin-top: -25px;
}

.post-header-container h1,
.post-header-container h2,
.post-header-container .post-title {
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.post-header-overlay {
  background: var(--color-overlay);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);
  padding: 80px 0;
}

.post-header-content {
  text-align: center;
}

.post-title {
  font-size: 48px;
  margin-top: 0;
  /* Override global h1 margin */
  margin-bottom: 10px;
  line-height: 1.2;
  color: var(--color-heading);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.post-tagline {
  font-size: 24px;
  font-weight: 300;
  opacity: 0.9;
  margin-top: 0;
  margin-bottom: 20px;
}

/* Mobile Post Header Optimization */
@media (max-width: 768px) {
  .post-header-overlay {
    padding: 40px 0;
  }

  .post-title {
    font-size: 32px;
  }

  .post-tagline {
    font-size: 18px;
    margin-bottom: 10px;
  }
}

.post-meta {
  font-size: 16px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.post-content {
  font-size: 19px;
  line-height: 1.8;
  color: var(--color-text);
}

.post-content p,
.post-content ul,
.post-content ol {
  font-size: 19px;
  margin-bottom: 25px;
}

.post-content>*:first-child {
  margin-top: 0;
}

.post-content li {
  margin-bottom: 10px;
}

.post-content h2 {
  font-size: 32px;
  margin-top: 50px;
  margin-bottom: 25px;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 10px;
}

.post-content h3 {
  font-size: 26px;
  margin-top: 40px;
  margin-bottom: 20px;
}

/* Enhanced Code Blocks */
pre,
code {
  font-family: "Menlo", "Monaco", "Consolas", "Courier New", monospace;
  font-size: 15px;
}

pre {
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 30px;
  overflow-x: auto;
  line-height: 1.5;
}

/* Remove old post-full styling interference */
.post-full {
  margin: 0;
}

/* Cleanup Header */
.post-header-clean {
  margin-top: 30px;
  margin-bottom: 40px;
  text-align: center;
}

.post-header-clean .post-title {
  font-size: 48px;
  margin-top: 0;
  /* Override global h1 margin */
  margin-bottom: 10px;
  line-height: 1.2;
  color: var(--color-heading);
  text-shadow: none;
}

.post-header-clean .post-tagline {
  font-size: 24px;
  font-weight: 300;
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--color-text-light);
}

.post-header-clean .post-meta {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-light);
}

/* Mobile Clean Header Optimization */
@media (max-width: 768px) {
  .post-header-clean {
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .post-header-clean .post-title {
    font-size: 32px;
  }
}

/* Blockquote Improvements */
blockquote {
  border-left: 5px solid #eee;
  padding: 15px 20px;
  margin: 0 0 20px;
  background-color: var(--color-bg-alt);
  font-family: 'Alegreya', serif;
  font-style: italic;
  font-size: 19px;
  color: #555;
}

blockquote p {
  margin-bottom: 0;
  margin-left: 20px;
  margin-right: 20px;
}

/* Mobile Margins */
@media (max-width: 768px) {
  .container-narrow {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Table Improvements */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
}

table th {
  text-align: left;
  padding: 12px;
  border-bottom: 2px solid var(--color-border);
  font-family: 'Alegreya', serif;
  font-weight: bold;
}

table td {
  padding: 12px;
  border-bottom: 1px solid var(--color-border);
}

table tr:last-child td {
  border-bottom: none;
}

/* List Improvements - Scoped to post content */
.post-content ul li {
  margin-bottom: 10px;
}

.post-content ul li ul li {
  margin-bottom: 5px;
  color: var(--color-text-light);
}

/* Custom bullet for content lists */
.post-content ul {
  list-style-type: none;
  /* Remove default bullets */
  padding-left: 20px;
}

.post-content ul li::before {
  content: "•";
  color: var(--color-text);
  /* Darker bullet */
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

.post-content ul li ul li::before {
  content: "◦";
  color: var(--color-text-light);
}

/* Unified Content Grid & Cards */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
  margin-bottom: 50px;
}

.content-grid-1-col {
  grid-template-columns: 1fr;
}

.content-card {
  display: block;
  border-radius: 6px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  background: var(--color-bg-card);
  text-decoration: none;
}

.content-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

/* Image Card Variant (Places, Cycling) */
.content-card-image {
  height: 240px;
  background-size: cover;
  background-position: center;
  background-color: var(--color-bg-alt);
  box-shadow: 0 4px 15px var(--color-shadow);
}

.content-card-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  transition: background 0.2s;
}

.content-card-image:hover::before {
  background: var(--color-overlay);
}

.content-card-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

/* Text Card Variant (Archive) */
.content-card-text {
  border: 1px solid var(--color-border);
  padding: 25px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.content-card-text .content-card-content {
  display: block;
  padding: 0;
}

.content-card-text:hover {
  border-color: var(--color-text-light);
  box-shadow: 0 5px 15px var(--color-shadow);
}

/* Card Titles */
.content-card-title {
  margin: 0 0 5px 0;
  font-weight: bold;
}

.content-card-image .content-card-title {
  color: white;
  font-size: 24px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.content-card-text .content-card-title {
  font-size: 22px;
  margin-bottom: 10px;
}

.content-card-text .content-card-title a {
  color: var(--color-heading);
  text-decoration: none;
}

/* Meta Info */
.content-card-meta {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.content-card-image .content-card-meta {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  font-weight: 500;
}

.content-card-text .content-card-desc {
  color: var(--color-text-light);
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
}

/* Stats (Cycling logs) */
.content-card-stats {
  margin-top: 15px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 10px;
  text-align: right;
}

.content-card-stats a {
  color: white;
  text-decoration: underline;
  font-weight: bold;
}

.content-card-stats a:hover {
  text-decoration: none;
  background-color: var(--color-overlay);
}

/* Static Cards (e.g. Outdoors) */
.content-card-static:hover {
  transform: none;
  box-shadow: 0 4px 15px var(--color-shadow);
  cursor: default;
}

.content-card-static:hover::before {
  background: var(--color-overlay);
}

.content-card-static .content-card-stats {
  text-align: center;
  font-size: 16px;
}

.content-card-static .content-card-stats a {
  background: none;
  text-decoration: underline;
}

.content-card-static .content-card-stats a:hover {
  opacity: 0.8;
  text-decoration: none;
}

/* Small Variant */
.content-card-small {
  min-height: 200px;
  height: auto;
}

/* Section Title (Places) */
.content-category-title {
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  margin-top: 20px;
  margin-bottom: 25px;
  font-size: 28px;
  color: var(--color-heading);
  border-bottom: 2px solid var(--color-border);
}




/* Banner Credit Styling */
.banner-credit {
  text-align: center;
  font-size: 14px;
  color: var(--color-text-light);
  margin-top: 40px;
  margin-bottom: 20px;
  font-family: var(--font-body);
}

.banner-credit:before {
  content: "";
  display: block;
  width: 100px;
  height: 1px;
  background: var(--color-border);
  margin: 0 auto 20px auto;
}

.banner-credit p {
  display: inline;
  margin: 0;
}

.banner-credit a {
  color: var(--color-text-light);
  text-decoration: underline;
}

.banner-credit a:hover {
  color: var(--color-link);
}

/* Responsive Video Container */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 20px auto;
}

@media (min-width: 600px) {
  .video-container {
    max-width: 640px;
    padding-bottom: 360px;
    /* 16:9 of 640px */
  }
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Global Page Styling */
.page-content p {
  font-family: 'Alegreya', serif;
  font-size: 22px;
  line-height: 1.5;
  color: var(--color-text-light);
  margin-bottom: 20px;
}

/* About Page Styles */
.about-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 30px;
  display: block;
  box-shadow: 0 4px 10px var(--color-shadow);
}

.about-intro {
  font-size: 32px;
  font-weight: 300;
  font-weight: 300;
  margin-bottom: 40px;
  color: var(--color-text);
}

.about-text {
  text-align: left;
  margin-bottom: 40px;
}

.about-contact {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #eee;
  color: #666;
}

.about-license {
  margin-top: 50px;
  font-size: 12px;
  color: #999;
}