@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800;900&family=Source+Sans+Pro:wght@300;400;600;700&display=swap');

:root {
  /* Journal Theme Colors */
  --primary-color: #2c3e50;
  --secondary-color: #34495e;
  --accent-color: #e74c3c;
  --text-color: #2c3e50;
  --text-light: #7f8c8d;
  --bg-color: #ffffff;
  --bg-light: #f8f9fa;
  --border-color: #ecf0f1;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

[data-theme="dark"] {
  --primary-color: #ecf0f1;
  --secondary-color: #bdc3c7;
  --accent-color: #e74c3c;
  --text-color: #ecf0f1;
  --text-light: #95a5a6;
  --bg-color: #2c3e50;
  --bg-light: #34495e;
  --border-color: #34495e;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

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

.site-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  margin: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 30px;
}

.nav-menu a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
  position: relative;
}

.nav-menu a:hover {
  color: var(--accent-color);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: var(--transition);
}

.nav-menu a:hover::after {
  width: 100%;
}

/* Profile Section */
.profile {
  text-align: center;
  padding: 60px 0;
  background: var(--bg-light);
  margin-bottom: 60px;
}

.profile-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-color);
  box-shadow: var(--shadow);
  margin-bottom: 30px;
  transition: var(--transition);
}

.profile-image:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-hover);
}

.profile-about h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0 0 15px 0;
}

.profile-bio {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 2px solid var(--border-color);
  transition: var(--transition);
  text-decoration: none;
}

.social-links a:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.social-icon {
  width: 24px;
  height: 24px;
  filter: brightness(0) saturate(100%) invert(30%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(1) contrast(1);
  transition: var(--transition);
}

.social-links a:hover .social-icon {
  filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(1) contrast(1);
}

/* Theme Toggle */
.mode {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 1001;
  box-shadow: var(--shadow);
}

.mode:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-hover);
}

.mode span {
  font-size: 20px;
  transition: var(--transition);
}

/* Search and Filter */
.search-filter-container {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
}

.search-box {
  margin-bottom: 25px;
}

.search-input {
  width: 100%;
  padding: 15px 20px;
  font-size: 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-color);
  color: var(--text-color);
  transition: var(--transition);
  font-family: inherit;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.search-input::placeholder {
  color: var(--text-light);
}

.filter-tabs {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-tab {
  padding: 10px 20px;
  border: 2px solid var(--border-color);
  border-radius: 25px;
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.filter-tab:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.filter-tab.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.results-info {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 500;
}

/* Post Cards */
.post-container {
  margin-bottom: 40px;
}

.post-list {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
}

.post-list:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.post-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
  position: relative;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.post-list:hover .post-image img {
  transform: scale(1.05);
}

.post-content {
  padding: 30px;
}

.post-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  margin-bottom: 15px;
  line-height: 1.3;
  transition: var(--transition);
  display: block;
}

.post-title:hover {
  color: var(--accent-color);
}

.post-date {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  display: block;
}

.post-excerpt {
  color: var(--text-light);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 25px;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 25px;
  border-top: 1px solid var(--border-color);
}

.post-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.post-tag {
  background: var(--bg-light);
  color: var(--text-color);
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.post-tag:hover {
  background: var(--accent-color);
  color: white;
}

.post-stats {
  display: flex;
  gap: 20px;
  align-items: center;
}

.read-time, .post-category {
  color: var(--text-light);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Social Actions */
.social-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
  padding-top: 25px;
  border-top: 1px solid var(--border-color);
}

.action-buttons {
  display: flex;
  gap: 15px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border: 2px solid var(--border-color);
  border-radius: 25px;
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.action-btn:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.action-btn.liked {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.share-buttons {
  display: flex;
  gap: 10px;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  background: var(--bg-color);
  color: var(--text-color);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.share-btn:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  transform: translateY(-3px);
}

/* Medium Posts */
.medium-posts-container {
  margin-bottom: 40px;
}

.medium-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
}

.medium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.medium-post {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 30px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.medium-post:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.medium-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  margin-bottom: 15px;
  line-height: 1.3;
  transition: var(--transition);
  display: block;
}

.medium-title:hover {
  color: var(--accent-color);
}

.medium-date {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.medium-excerpt {
  color: var(--text-light);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 25px;
}

.medium-read-more {
  color: var(--accent-color);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
}

.medium-read-more:hover {
  color: var(--primary-color);
}

/* Loading */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px;
  color: var(--text-light);
}

.loading {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* No Results */
.no-results {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-light);
}

.no-results-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.no-results-content p {
  font-size: 18px;
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
  font-size: 14px;
  border-top: 1px solid var(--border-color);
  margin-top: 60px;
  background: var(--bg-light);
}

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

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

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 40px 0;
}

.pagination a, .pagination span {
  padding: 12px 20px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 14px;
}

.pagination a:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.pagination .current {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

/* Responsive Design */
@media only screen and (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  .header-content {
    flex-direction: column;
    gap: 20px;
  }
  
  .site-title {
    font-size: 1.5rem;
  }
  
  .nav-menu {
    gap: 20px;
  }
  
  .nav-menu a {
    font-size: 12px;
  }
  
  .profile {
    padding: 40px 0;
  }
  
  .profile-image {
    width: 120px;
    height: 120px;
  }
  
  .profile-about h2 {
    font-size: 2rem;
  }
  
  .search-filter-container {
    padding: 20px;
  }
  
  .filter-tabs {
    gap: 10px;
  }
  
  .filter-tab {
    padding: 8px 15px;
    font-size: 12px;
  }
  
  .medium-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .medium-post {
    padding: 20px;
  }
  
  .post-content {
    padding: 20px;
  }
  
  .post-title {
    font-size: 1.5rem;
  }
  
  .post-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .social-actions {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }
  
  .action-buttons, .share-buttons {
    justify-content: center;
  }
  
  .mode {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-list {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.post-list:nth-child(1) { animation-delay: 0.1s; }
.post-list:nth-child(2) { animation-delay: 0.2s; }
.post-list:nth-child(3) { animation-delay: 0.3s; }
.post-list:nth-child(4) { animation-delay: 0.4s; }
.post-list:nth-child(5) { animation-delay: 0.5s; }

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus States */
.post-list:focus-within,
.medium-post:focus-within {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}