/* style.css - Minimal, elegant Twitter Archive styling */

:root {
  --font-serif: "Iowan Old Style", "Apple Garamond", "Baskerville", "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  --bg-color: #fdfdfd;
  --text-color: #1a1a1a;
  --text-muted: #666;
  --border-color: #eee;
  --link-color: #0066cc;
  --accent-color: #7d5fff;
  --container-width: 900px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --text-muted: #999;
    --border-color: #333;
    --link-color: #4da6ff;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-serif);
  line-height: 1.6;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-size: 18px;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
  position: sticky;
  top: 0;
  background: var(--bg-color);
  z-index: 100;
}

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

.profile-info .home-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-right: 12px;
}

.names {
  display: flex;
  flex-direction: column;
}

.names .name {
  font-weight: bold;
  font-family: var(--font-sans);
}

.names .handle {
  font-size: 0.8em;
  color: var(--text-muted);
}

.main-nav {
  display: flex;
  gap: 20px;
}

.nav-item {
  text-decoration: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-weight: 500;
  padding: 5px 0;
}

.nav-item.active {
  color: var(--text-color);
  border-bottom: 2px solid var(--accent-color);
}

/* Layout */
main.container {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  padding-top: 40px;
}

@media (max-width: 768px) {
  main.container {
    grid-template-columns: 1fr;
  }
  .sidebar {
    order: 2;
  }
}

/* Sidebar */
.sidebar h3 {
  font-family: var(--font-sans);
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.year-filter ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.year-filter li {
  margin-bottom: 8px;
}

.year-filter a {
  text-decoration: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.9em;
}

.year-filter a.active {
  color: var(--accent-color);
  font-weight: bold;
}

/* Tweets */
.tweet {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
}

.tweet:last-child {
  border-bottom: none;
}

.tweet-author {
  font-size: 0.8em;
  color: var(--text-muted);
  font-family: var(--font-sans);
  margin-bottom: 8px;
}

.tweet-content {
  font-size: 1.1em;
  margin-bottom: 15px;
  word-wrap: break-word;
}

.tweet-media {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}

.media-item img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.tweet-embeds {
  margin-bottom: 15px;
}

.embed-item {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0,0,0,0.02);
}

.embed-item a {
  display: flex;
  text-decoration: none;
  color: inherit;
}

.embed-thumb {
  width: 120px;
  height: 90px;
  object-fit: cover;
}

.embed-meta {
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.embed-title {
  font-weight: bold;
  font-size: 0.9em;
  margin-bottom: 4px;
}

.embed-provider {
  font-size: 0.8em;
  color: var(--text-muted);
}

.tweet-footer {
  font-size: 0.85em;
  color: var(--text-muted);
  font-family: var(--font-sans);
  display: flex;
  gap: 15px;
}

.tweet-footer a {
  color: inherit;
  text-decoration: none;
}

.tweet-footer a:hover {
  text-decoration: underline;
}

/* Search */
.search-box {
  width: 300px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 0;
  font-family: var(--font-sans);
}

.pagination a {
  text-decoration: none;
  color: var(--accent-color);
  font-weight: bold;
}

.pagination .disabled {
  color: var(--text-muted);
  opacity: 0.5;
}

/* Site Footer */
.site-footer {
  margin-top: 80px;
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8em;
  font-family: var(--font-sans);
}

/* Pagefind overrides */
#search .pagefind-ui__search-input {
  font-family: var(--font-sans) !important;
}
