/* BrianLi.com Style - Minimalist Dark Theme */

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

html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.7;
  color: #e0e0e0;
  background: #111;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 4rem;
}

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: #666;
}

a:hover {
  text-decoration-color: #fff;
}

/* Container - Narrow column like BrianLi.com */
.container {
  max-width: 660px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header - Minimal */
.site-header {
  padding: 2.5rem 0 2rem;
  margin-bottom: 1rem;
}

.site-nav {
  max-width: 660px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.site-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: #e0e0e0;
  text-decoration: none;
  letter-spacing: -0.3px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: #888;
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: #fff;
}

/* Posts List */
.posts-list {
  margin-top: 0.5rem;
}

.post-item {
  margin-bottom: 2.5rem;
}

.post-item:last-child {
  margin-bottom: 0;
}

.post-meta {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0.25rem;
}

.post-title {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.post-title a {
  color: #e0e0e0;
  text-decoration: none;
}

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

.post-excerpt {
  font-size: 1rem;
  line-height: 1.7;
  color: #ccc;
  margin-bottom: 0.25rem;
}

.post-tags-inline {
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}

.tag-link {
  color: #888;
  margin-right: 0.4rem;
}

.tag-link:hover {
  color: #fff;
  text-decoration: none;
}

.read-more {
  font-size: 0.9rem;
  color: #888;
}

.read-more:hover {
  color: #fff;
}

/* Pagination */
.pagination {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #222;
}

.pagination a {
  font-size: 0.9rem;
  color: #888;
}

.pagination a:hover {
  color: #fff;
}

/* Post Content */
.post-content {
  margin-top: 0.5rem;
}

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

.post-body {
  font-size: 1.05rem;
  line-height: 1.8;
}

.post-body p {
  margin-bottom: 1.25rem;
}

/* Images in posts */
.post-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: 4px;
}

.post-body figure {
  margin: 1.5rem 0;
}

.post-body figure img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.post-body figure figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: #888;
  margin-top: 0.5rem;
  font-style: italic;
}

.post-body h1,
.post-body h2,
.post-body h3 {
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}

.post-body h2 {
  font-size: 1.3rem;
}

.post-body h3 {
  font-size: 1.1rem;
}

.post-body a {
  text-decoration: underline;
  text-decoration-color: #666;
}

.post-body a:hover {
  text-decoration-color: #fff;
}

.post-body ul,
.post-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.25rem;
}

.post-body li {
  margin-bottom: 0.25rem;
}

.post-body blockquote {
  margin: 1.25rem 0;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 2px solid #333;
  color: #999;
  font-style: italic;
}

/* Post Footer */
.post-footer {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #222;
  display: flex;
  justify-content: space-between;
}

.post-footer a {
  font-size: 0.9rem;
  color: #888;
}

.post-footer a:hover {
  color: #fff;
}

/* Archive */
.archive-stats {
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: #888;
}

.archive-count {
  font-weight: 600;
  margin-right: 0.4rem;
}

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

.archive-list li {
  margin-bottom: 0.35rem;
}

.archive-list time {
  color: #666;
  margin-right: 0.4rem;
  font-size: 0.85rem;
}

.archive-list a {
  color: #ccc;
  text-decoration: none;
}

.archive-list a:hover {
  text-decoration: underline;
}

/* Tags */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.tags-cloud .tag-link {
  padding: 0.2rem 0.4rem;
  background: #1a1a1a;
  font-size: 0.8rem;
  color: #888;
}

.tags-cloud .tag-link:hover {
  background: #222;
  color: #fff;
  text-decoration: none;
}

/* Page Content */
.page-content {
  margin-top: 0.5rem;
}

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

.page-title {
  font-size: 1.6rem;
  font-weight: 600;
}

.page-body {
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Photos */
.photos-intro {
  margin-bottom: 1.25rem;
  color: #888;
  font-size: 0.9rem;
}

.photos-list {
  margin-top: 0.5rem;
}

.photos-list .photo-item {
  margin-bottom: 0.25rem;
}

.photos-list .photo-item a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.95rem;
}

/* Photos Grid - BrianLi.com Style */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0;
  margin-top: 1.5rem;
}

.photos-grid .photo-item {
  margin-bottom: 0;
  aspect-ratio: 3/2;
  overflow: hidden;
}

.photos-grid .photo-item a {
  display: block;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
}

.photos-grid .photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin-bottom: 0;
  border-radius: 0;
  transition: transform 0.2s ease;
}

.photos-grid .photo-placeholder {
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  color: #666;
  font-size: 0.9rem;
}

.photos-grid .photo-item h3,
.photos-grid .photo-item time {
  display: none;
}

.photos-grid .photo-item a:hover img {
  transform: scale(1.03);
}

@media (max-width: 768px) {
  .photos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
  }
  
  .photos-grid .photo-item img,
  .photos-grid .photo-placeholder {
    height: auto;
    aspect-ratio: 3/2;
  }
}

.photos-list .photo-item a:hover {
  text-decoration: underline;
}

/* EXIF Info */
.exif-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.6rem;
  padding: 0.6rem;
  background: #1a1a1a;
  font-size: 0.8rem;
  border-radius: 2px;
}

.exif-item {
  color: #888;
}

.exif-item strong {
  color: #999;
  font-weight: 500;
}

/* Photo Gallery */
.photo-gallery {
  margin-top: 1.25rem;
}

.photo-figure {
  margin: 0 0 1.25rem 0;
}

.photo-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 2px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.97);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #888;
  font-size: 2rem;
  cursor: pointer;
}

.lightbox-close:hover {
  color: #fff;
}

/* Footer */
.site-footer {
  padding: 2.5rem 0;
  margin-top: 3rem;
  border-top: 1px solid #222;
}

.site-footer .container {
  max-width: 660px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.85rem;
  color: #666;
}

.site-footer a {
  color: #666;
  text-decoration: none;
}

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

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

.social-links a {
  color: #666;
  display: flex;
  align-items: center;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.social-links a:hover {
  opacity: 1;
  color: #999;
}

.social-links svg {
  width: 16px;
  height: 16px;
}

/* Mobile */
@media (max-width: 768px) {
  html {
    font-size: 16px;
  }
  
  .container {
    padding: 0 1.25rem;
  }
  
  .site-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }
  
  .nav-links {
    gap: 1rem;
    flex-wrap: wrap;
  }
  
  .post-title {
    font-size: 1.3rem;
  }
  
  .site-footer .container {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  
  .post-footer {
    flex-direction: column;
    gap: 0.5rem;
  }
}
