* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Typography scale - consistent across site */
:root {
  --font-body: 1rem;
  --font-small: 0.9rem;
  --font-h2: 1.25rem;
  --font-h1: 1.75rem;
  --font-article-title: 2rem;
  --line-height: 1.6;
}

body {
  font-family: 'Lora', Georgia, serif;
  font-size: var(--font-body);
  background: #fafafa;
  color: #1a1a1a;
  line-height: var(--line-height);
  min-height: 100vh;
}

/* Max's Musings typography - Lora throughout */
body, input, button, textarea, select, a, span, p, li, blockquote {
  font-family: 'Lora', Georgia, serif;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

.profile-image {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  margin: 0 0 1.5rem 0;
}

.intro-name {
  font-family: 'Lora', Georgia, serif;
  font-size: var(--font-h1);
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

.intro {
  font-family: 'Lora', Georgia, serif;
  font-size: var(--font-body);
  line-height: var(--line-height);
  margin-bottom: 1.25rem;
  color: #333;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.social-links .social-link {
  color: #555;
  transition: color 0.2s;
}

.social-links .social-link:hover {
  color: #1a1a1a;
}

.intro-blurb {
  font-family: 'Lora', Georgia, serif;
  font-size: var(--font-body);
  line-height: var(--line-height);
  color: #555;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

.intro-blurb .intro-note-p {
  margin-bottom: 1rem;
  font-size: var(--font-body);
}

.intro-blurb .intro-note-p:last-child {
  margin-bottom: 0;
}

section {
  margin-bottom: 2.5rem;
}

.section-blurb {
  font-size: var(--font-body);
  color: #555;
  margin-bottom: 1rem;
  font-style: italic;
}

h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: var(--font-h2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  color: #333;
}

ul {
  list-style: none;
}

li {
  margin-bottom: 1rem;
}

.post-date {
  display: block;
  font-family: 'Lora', Georgia, serif;
  font-size: var(--font-small);
  color: #666;
  margin-top: 0.15rem;
}

/* Coming soon posts - greyed out so published posts stand out */
li.post-coming-soon a,
li.post-coming-soon .post-date {
  color: #999;
}

li.post-coming-soon a:hover {
  color: #666;
}

a {
  color: #1a1a1a;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Blog post pages */
article {
  margin-top: 2rem;
}

article h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: var(--font-article-title);
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #1a1a1a;
}

article p {
  margin-bottom: 1rem;
}

article figure.blog-images,
article figure.blog-image-with-caption {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

article figure.blog-image-with-caption {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

article figure.blog-image-with-caption img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #eee;
}

article .image-caption,
article figure.blog-image-with-caption figcaption {
  font-size: var(--font-body);
  color: #555;
  margin-top: 0.25rem;
  text-align: center;
}

article figure.blog-images > div {
  display: flex;
  flex-direction: column;
}

article figure.blog-images img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #eee;
}

article .blog-image-missing {
  padding: 2rem;
  background: #f5f5f5;
  border-radius: 8px;
  border: 1px dashed #ccc;
  color: #666;
  font-size: var(--font-small);
}

article .blog-image-missing code {
  background: #eee;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.85em;
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: var(--font-small);
}

/* Swipe File carousel */
.swipe-file-section {
  margin-top: 3rem;
}

.swipe-file-section.hidden {
  display: none;
}

.carousel {
  position: relative;
  margin-top: 1rem;
}

.carousel.hidden {
  display: none;
}

.carousel-track-container {
  overflow: hidden;
  border-radius: 8px;
  background: #f0f0f0;
}

.carousel-track {
  display: flex;
}

.carousel-track--continuous {
  animation: carousel-scroll 20s linear infinite;
}

.carousel-track--continuous:hover {
  animation-play-state: paused;
}

@keyframes carousel-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.carousel-slide {
  flex: 0 0 33.333%;
  min-width: 33.333%;
  padding: 0 0.25rem;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: #ccc;
  cursor: pointer;
  transition: background 0.2s;
}

.carousel-dot:hover,
.carousel-dot.active {
  background: #666;
}

/* Swipe tile (compact card with preview) */
.swipe-tile {
  padding: 0 0.25rem;
}

.swipe-tile-link {
  display: block;
  text-decoration: none;
  color: #1a1a1a;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.swipe-tile-link:hover {
  border-color: #ccc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.swipe-tile-preview {
  aspect-ratio: 16 / 10;
  background: #f0f0f0;
  position: relative;
  overflow: hidden;
}

.swipe-tile-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.swipe-tile-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 100%);
}

.swipe-tile-placeholder.hidden {
  display: none;
}

.swipe-tile-icon {
  font-size: 2rem;
  opacity: 0.5;
}

.swipe-tile-info {
  padding: 0.75rem;
}

.swipe-tile-title {
  display: block;
  font-family: 'Lora', Georgia, serif;
  font-size: var(--font-small);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.swipe-tile-label {
  font-family: 'Lora', Georgia, serif;
  font-size: var(--font-small);
  color: #666;
}

/* View all swipe file */
.view-all-btn {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 0.65rem 1rem;
  font-family: 'Lora', Georgia, serif;
  font-size: var(--font-small);
  color: #555;
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.view-all-btn:hover {
  color: #1a1a1a;
  border-color: #999;
}

.swipe-file-full-list {
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.swipe-file-full-list.hidden {
  display: none;
}

.swipe-file-list-item {
  margin-bottom: 1.25rem;
}

.swipe-file-list-item:last-child {
  margin-bottom: 0;
}

.swipe-file-list-link {
  display: block;
  text-decoration: none;
  color: #1a1a1a;
}

.swipe-file-list-link:hover {
  text-decoration: underline;
}

.swipe-file-list-item .swipe-file-list-title {
  display: block;
  font-family: 'Lora', Georgia, serif;
  font-weight: 500;
}

.swipe-file-list-item .swipe-file-list-label {
  font-family: 'Lora', Georgia, serif;
  font-size: var(--font-small);
  color: #666;
}

.swipe-file-list-item--text .swipe-file-list-label {
  display: block;
  margin-bottom: 0.35rem;
}

.swipe-file-list-quote {
  margin: 0 0 0.5rem 0;
  padding-left: 1rem;
  border-left: 3px solid #ddd;
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  color: #444;
}

.swipe-file-list-source {
  font-family: 'Lora', Georgia, serif;
  font-size: var(--font-small);
  color: #666;
  text-decoration: underline;
}

.swipe-file-list-source:hover {
  color: #1a1a1a;
}
