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

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
}

body {
  margin: 0;
  line-height: inherit;
}

/* Modern Baseline */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout Container */
body {
  max-width: 65ch;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Header */
header {
  border-bottom: 2px solid #333;
  padding-bottom: 20px;
  margin-bottom: 40px;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

header h1 a {
  color: #333;
  text-decoration: none;
}

header h1 a:hover {
  text-decoration: underline;
}

header nav {
  display: flex;
  gap: 20px;
}

header nav a {
  color: #666;
  text-decoration: none;
  font-size: 0.95rem;
}

header nav a:hover {
  color: #333;
  text-decoration: underline;
}

/* Main Content */
main {
  margin-bottom: 60px;
}

article {
  margin-bottom: 40px;
}

article header {
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

article h1 {
  font-size: 1.8rem;
  margin-bottom: 5px;
  line-height: 1.2;
}

article time {
  color: #666;
  font-size: 0.9rem;
}

/* Lists */
ul {
  list-style: none;
}

ul li {
  margin-bottom: 15px;
  display: flex;
  gap: 10px;
  align-items: baseline;
}

ul li time {
  color: #999;
  font-size: 0.85rem;
  min-width: 80px;
  flex-shrink: 0;
}

ul li a {
  color: #0066cc;
  text-decoration: none;
}

ul li a:hover {
  text-decoration: underline;
}

/* Content Formatting */
p {
  margin-bottom: 1rem;
}

a {
  color: #0066cc;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
}

/* Links Page */
.links-day {
  margin-bottom: 40px;
}

.links-day h2 {
  font-size: 1.4rem;
  margin-bottom: 5px;
}

.links-content h3 {
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.links-content h3 a {
  color: #0066cc;
}

/* Tags */
.tags {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tags a {
  background: #f0f0f0;
  padding: 4px 10px;
  border-radius: 3px;
  text-decoration: none;
  color: #666;
  font-size: 0.85rem;
}

.tags a:hover {
  background: #e0e0e0;
  color: #333;
}

/* Footer */
footer {
  border-top: 1px solid #eee;
  padding-top: 20px;
  text-align: center;
  color: #999;
  font-size: 0.85rem;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.gallery-item {
  overflow: hidden;
  border-radius: 4px;
}

.gallery-item a {
  display: block;
  line-height: 0;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.2s ease;
  margin: 0;
}

.gallery-item a:hover img {
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 600px) {
  body {
    padding: 15px;
  }

  header h1 {
    font-size: 1.5rem;
  }

  article h1 {
    font-size: 1.4rem;
  }

  ul li {
    flex-direction: column;
    gap: 5px;
  }

  ul li time {
    min-width: auto;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
  }
}
