/* Reset and Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.65;
}

body {
  margin: 0;
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #333;
  background-color: #fff;
}

/* Container */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3 {
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 400;
  line-height: 1.3;
  margin-top: 0;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }

a {
  color: inherit;
  text-decoration: underline;
}

a:hover {
  color: #999;
}

.nav-link {
  text-decoration: none;
  color: #333;
}

.nav-link:hover {
  color: #999;
}

/* Site Header */
.site-header {
  border-bottom: 1px solid #eee;
  padding: 1rem 0;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: #333;
  text-decoration: none;
}

.site-title:hover {
  color: #999;
}

.site-nav a {
  margin-left: 1.5rem;
  color: #666;
  text-decoration: none;
}

.site-nav a:hover {
  color: #999;
}

.site-nav a.active {
  color: #333;
}

/* Main Content */
main {
  padding: 3rem 0;
}

/* Intro Section */
.intro {
  padding: 3rem 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.intro-photo {
  flex-shrink: 0;
}

.profile-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
}

.intro-text h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.intro-text .tagline {
  font-size: 1rem;
  color: #666;
  margin: 0 0 1.25rem 0;
}

.about-content {
  text-align: left;
  color: #444;
}

.about-content p:last-child {
  margin-bottom: 0;
}

/* Post List */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

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

.post-item a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  text-decoration: none;
}

.post-item a:hover {
  color: #999;
}

.post-title {
  text-decoration: underline;
}

.post-item time {
  color: #999;
  font-size: 0.875rem;
  flex-shrink: 0;
  margin-left: 1rem;
}

/* Recent Posts Section */
.recent-posts {
  padding: 2rem 0;
  border-top: 1px solid #eee;
}

.recent-posts h2 {
  margin-bottom: 1rem;
}

.view-all {
  margin-top: 1rem;
}

/* Blog List Page */
.blog-list {
  padding: 0 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header .description {
  color: #666;
  margin: 0;
}

/* Blog Post */
.blog-post {
  padding: 0 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}

.post-header {
  margin-bottom: 1.5rem;
}

.post-header h1 {
  margin-bottom: 0.5rem;
}

.post-header time {
  color: #999;
  font-size: 0.875rem;
}

.post-tags {
  color: #999;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.post-tags a {
  color: inherit;
  text-decoration: none;
  margin-right: 0.5rem;
}

.post-tags a:hover {
  color: #666;
}

.post-content {
  color: #444;
}

.post-content table {
  margin-bottom: 1rem;
}

.post-content pre {
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
}

.post-content code {
  font-family: "SF Mono", Monaco, Menlo, Consolas, monospace;
  font-size: 0.875rem;
}

.post-content blockquote {
  border-left: 3px solid #ddd;
  margin-left: 0;
  padding-left: 1rem;
  color: #666;
}

.post-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

/* Breadcrumbs */
.breadcrumbs {
  margin-bottom: 1rem;
}

.breadcrumb-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.875rem;
  color: #666;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item::after {
  content: "/";
  margin: 0 0.5rem;
  color: #ccc;
}

.breadcrumb-link {
  color: #999;
  text-decoration: none;
}

.breadcrumb-link:hover {
  color: #666;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 140px;
  grid-auto-flow: dense;
  gap: 0.5rem;
}

.gallery-item {
  display: block;
  grid-row: span 2;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-wide {
  grid-column: span 2;
}

.gallery-panorama {
  grid-column: span 3;
  grid-row: span 1;
}

/* Site Footer */
.site-footer {
  border-top: 1px solid #eee;
  padding: 2rem 0;
  text-align: center;
  color: #999;
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0;
}

/* Responsive */
@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  .site-header .container {
    flex-direction: column;
    gap: 0.75rem;
  }

  .site-nav a:first-child {
    margin-left: 0;
  }

  .intro-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }

  .intro-photo {
    display: flex;
    justify-content: center;
  }

  .profile-image {
    width: 150px;
    height: 150px;
  }

  .intro-text h1 {
    font-size: 1.5rem;
  }

  .post-item a {
    flex-direction: column;
  }

  .post-item time {
    margin-left: 0;
    margin-top: 0.25rem;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 120px;
  }

  .gallery-wide,
  .gallery-panorama {
    grid-column: span 2;
  }

  .gallery-panorama {
    grid-row: span 1;
  }

  .breadcrumb-list {
    font-size: 0.8125rem;
  }

  .breadcrumb-item::after {
    margin: 0 0.375rem;
  }
}

@media (max-width: 400px) {
  .gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }

  .gallery-item {
    grid-row: span 1;
  }

  .gallery-wide,
  .gallery-panorama {
    grid-column: span 1;
  }
}
