@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Light Mode - Strong Pastel Blue Palette */
  --bg-color: #eaf4fa; /* Prominent pastel blue background */
  --bg-secondary: #ffffff; /* White cards */
  --sidebar-bg: #dcedf7; /* Slightly darker pastel for sidebar */
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #bbdefb; /* Stronger blue hover */
  --accent-text: #1d4ed8;
  --border-color: #cce0f0;
  --card-shadow: 0 8px 24px -4px rgba(75, 163, 227, 0.15), 0 4px 8px -2px rgba(75, 163, 227, 0.1);
  --sidebar-width: 280px;
  --font-main: 'Inter', sans-serif;
  --border-radius: 16px;
  --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

[data-theme='dark'] {
  /* Dark Mode - Pastel Blue Accent */
  --bg-color: #0d131a;
  --bg-secondary: #16202b;
  --sidebar-bg: #111820;
  --text-primary: #f0f4f8;
  --text-secondary: #b6c2cb;
  --text-muted: #7d8f9b;
  --accent: #1e3a5f;
  --accent-text: #82b1ff;
  --border-color: #263645;
  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition), color var(--transition);
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-text);
}

/* Layout */
.app-container {
  display: flex;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  min-height: 100vh;
}

/* Left Sidebar */
.sidebar-left {
  width: var(--sidebar-width);
  flex-shrink: 0;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--border-color);
  background-color: var(--sidebar-bg);
  animation: slideInLeft 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

/* Hide scrollbar for sidebar */
.sidebar-left::-webkit-scrollbar {
  display: none;
}
.sidebar-left {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.profile-section {
  text-align: center;
  margin-bottom: 2rem;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: #bbf7d0; /* Fallback light green/blue */
  margin: 0 auto 1rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.profile-bio {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.4;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.nav-item a {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-item a i {
  width: 24px;
  font-size: 1.1rem;
  margin-right: 0.5rem;
  text-align: center;
}

.nav-item a:hover {
  background-color: var(--accent);
  color: var(--text-primary);
}

.nav-item a.active {
  background-color: var(--accent);
  color: var(--text-primary);
}

.sidebar-footer {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  color: var(--text-secondary);
}

.sidebar-footer a, .sidebar-footer button {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition);
}

.sidebar-footer a:hover, .sidebar-footer button:hover {
  color: var(--text-primary);
}

/* Main Content Wrapper */
.main-wrapper {
  flex-grow: 1;
  display: flex;
  padding: 3.5rem 4rem;
  gap: 4rem;
  animation: fadeInUp 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

/* Main Feed */
.main-content {
  flex: 1;
  min-width: 0;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.search-bar {
  position: relative;
  width: 250px;
}

.search-bar input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
}

.search-bar i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Horizontal Post Card */
.post-card {
  display: flex;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  height: 220px;
}

.post-card:hover {
  box-shadow: 0 15px 30px -5px rgba(75, 163, 227, 0.15);
  transform: translateY(-4px) scale(1.01);
}

.post-content {
  flex: 1;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.post-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.post-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.post-image {
  width: 320px;
  flex-shrink: 0;
}

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

/* Right Sidebar */
.sidebar-right {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  position: sticky;
  top: 2.5rem;
  height: fit-content;
}

.widget {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
}

.widget-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.widget-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background-color: var(--accent-text);
  margin-right: 8px;
  border-radius: 2px;
}

.recent-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.recent-list a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: block;
}

.recent-list a:hover {
  color: var(--accent-text);
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tag-pill {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-secondary);
  background-color: var(--bg-secondary);
  transition: var(--transition);
}

.tag-pill:hover {
  background-color: var(--accent);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar-right {
    display: none; /* Hide right sidebar on medium screens */
  }
}

@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }
  
  .sidebar-left {
    width: 100%;
    height: auto;
    position: relative;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
  }
  
  .nav-menu {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .main-wrapper {
    padding: 1.5rem;
  }
  
  .post-card {
    flex-direction: column;
    height: auto;
  }
  
  .post-image {
    width: 100%;
    height: 200px;
    order: -1; /* Image on top */
  }
}
