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

body {
  font-family: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f7f5f2;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  gap: 20px;
}

.main-content {
  flex: 1;
  min-width: 0;
}

.sidebar {
  width: 200px;
  flex-shrink: 0;
}

.sidebar-section {
  background-color: #ffffff;
  border: 1px solid #d3cec4;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.sidebar-title {
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 12px;
  color: #243b53;
}

.year-link {
  display: block;
  padding: 8px 0;
  color: #b8742f;
  text-decoration: none;
  border-bottom: 1px solid #e8e4df;
  transition: color 0.2s;
}

.year-link:last-child {
  border-bottom: none;
}

.year-link:hover {
  color: #d68a42;
}

.year-link.active {
  font-weight: bold;
  color: #243b53;
  background-color: #faf8f5;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}

.year-count {
  float: right;
  color: #627d98;
  font-size: 14px;
  transition: color 0.2s;
}

.year-link:hover .year-count {
  color: #627d98;
}

@keyframes headerShimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

header {
  background: linear-gradient(135deg, #334e68 0%, #243b53 50%, #334e68 100%);
  background-size: 200% 100%;
  color: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(36, 59, 83, 0.15);
  position: relative;
  overflow: hidden;
  animation: headerShimmer 2.5s ease-in-out 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  animation: shimmerSweep 2.5s ease-in-out 1;
}

@keyframes shimmerSweep {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

h1 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

h1 a {
  color: white;
  text-decoration: none;
  cursor: pointer;
}

h1 a:hover {
  opacity: 0.9;
}

.header-socials {
  display: flex;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  font-size: 20px;
  width: 36px;
  height: 36px;
  padding: 4px;
  transition: opacity 0.2s;
}

.social-icon:hover {
  opacity: 0.7;
}

.post {
  background-color: #ffffff;
  border: 1px solid #d3cec4;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s;
}

.post:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.post-author {
  font-weight: bold;
  margin-bottom: 4px;
}

.post-author a {
  color: #243b53;
  text-decoration: none;
  transition: color 0.2s;
}

.post-author a:hover {
  color: #b8742f;
}

.post-content {
  color: #243b53;
  line-height: 1.5;
  margin-bottom: 8px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.post-content a {
  color: #b8742f;
  text-decoration: none;
  border-bottom: 1px solid #d4a574;
}

.post-content a:hover {
  color: #d68a42;
  border-bottom-color: #d68a42;
}

.post-content mark {
  background-color: #ffd54f;
  color: #243b53;
  padding: 2px 0;
  border-radius: 2px;
  font-weight: 500;
}

.post-photos {
  margin-top: 12px;
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.post-photos.single {
  grid-template-columns: 1fr;
}

.post-photo {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d3cec4;
}

.post-photos.single .post-photo {
  height: auto;
  max-height: 500px;
}

.post-timestamp a {
  color: #627d98;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}

.post-timestamp a:hover {
  color: #b8742f;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 12px 0;
}

.pagination a,
.pagination span {
  padding: 8px 12px;
  border: 1px solid #d3cec4;
  border-radius: 4px;
  text-decoration: none;
  color: #334e68;
  background-color: white;
  transition: all 0.2s;
}

.pagination a:hover {
  background-color: #334e68;
  color: white;
  border-color: #334e68;
}

.pagination .current {
  background-color: #c97d3e;
  color: white;
  border-color: #c97d3e;
  font-weight: bold;
}

.pagination .disabled {
  opacity: 0.5;
  pointer-events: none;
}

.pagination .ellipsis {
  border: none;
  background: none;
}

.stats {
  text-align: center;
  color: #627d98;
  font-size: 14px;
  margin-top: 4px;
}

/* Search form styles */
.search-form {
  display: flex;
  gap: 0;
}

.search-input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #d3cec4;
  border-radius: 4px 0 0 4px;
  font-family: inherit;
  font-size: 14px;
  min-width: 0;
}

.search-input:focus {
  outline: none;
  border-color: #c97d3e;
  box-shadow: 0 0 0 2px rgba(201, 125, 62, 0.1);
}

.search-button {
  padding: 8px 10px;
  background-color: #334e68;
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: background-color 0.2s;
}

.search-button:hover {
  background-color: #c97d3e;
}

/* Search results header */
.search-results-header {
  background-color: #faf8f5;
  border: 1px solid #d3cec4;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.search-results-header h2 {
  font-size: 20px;
  color: #243b53;
  margin-bottom: 8px;
}

.results-count {
  color: #627d98;
  font-size: 14px;
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
    gap: 16px;
  }

  .sidebar {
    width: 100%;
  }

  .sidebar-section {
    padding: 12px;
    margin-bottom: 12px;
  }

  .sidebar-title {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .year-link {
    padding: 6px 0;
    font-size: 14px;
  }

  .year-count {
    font-size: 13px;
  }

  .search-form {
    font-size: 13px;
  }

  .search-input {
    font-size: 13px;
    padding: 6px 8px;
  }

  .search-button {
    padding: 6px 8px;
    font-size: 13px;
  }

  body {
    padding: 12px;
  }

  header {
    padding: 16px;
    margin-bottom: 16px;
  }

  h1 {
    font-size: 24px;
  }

  .post {
    padding: 12px;
    margin-bottom: 8px;
  }
}

@media (max-width: 480px) {
  .container {
    gap: 12px;
  }

  body {
    padding: 8px;
  }

  header {
    padding: 12px;
    margin-bottom: 12px;
  }

  h1 {
    font-size: 20px;
  }

  .sidebar-section {
    padding: 10px;
    margin-bottom: 10px;
  }

  .post {
    padding: 10px;
    margin-bottom: 6px;
  }

  .post-author {
    font-size: 16px;
  }

  .post-content {
    font-size: 14px;
  }

  .post-timestamp a {
    font-size: 12px;
  }
}
