:root {
  /* Light theme variables */
  --primary-color: #4a5568; /* Grey: Professional and neutral for primary actions */
  --secondary-color: #64748b; /* Slate: Better contrast, more professional */
  --accent-color: #0891b2; /* Cyan: Fresh complementary color */
  --highlight-color: #394150; /* Darker shade of primary color (--primary-color: #4a5568) */
  --bg-color: #ffffff;
  --text-color: #1e293b;
  --card-bg: #ffffff;
  --shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}

[data-theme="dark"] {
  --primary-color: #c5b6ff; /* Light Purple: S:35.1 */
  --secondary-color: #c5c5c9; /* Light Gray: S:13.8 */
  --accent-color: #e6c3c3; /* Pink: S:22.2 */
  --highlight-color: #9d8acc; /* Darker shade of primary color (--primary-color: #c5b6ff) */
  --bg-color: #1a1a1a;
  --text-color: #e5e5e5;
  --card-bg: #2d2d2d;
  --shadow: rgba(0, 0, 0, 0.3) 0px 4px 12px;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

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

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-color);
  position: relative;
}

h1::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  margin: 20px auto 0;
  border-radius: 2px;
}

.card-container {
  display: grid;
  grid-template-columns: repeat(3, 0.5fr);
  gap: 30px;
  padding: 20px;
}

.card {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--secondary-color);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: rgba(0, 0, 0, 0.2) 0px 8px 24px;
}

.card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.card h2 {
  margin: 0 0 12px 0;
  font-size: 1.5rem;
  color: var(--text-color);
}

.card p {
  margin: 0;
  color: #64748b;
  font-size: 1rem;
}

.card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.card .tag {
  background: var(--accent-color);
  color: var(--bg-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
}

.card-thumbnail {
  position: relative;
  width: 100%;
  height: 250px;
}

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

.thumbnail-fallback {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-color);
  color: var(--bg-color);
  font-size: 4rem;
  font-weight: bold;
  align-items: center;
  justify-content: center;
  border-radius: 16px; /* Match card's top corners */
}

.card-date {
  font-size: 0.875rem;
  color: #64748b;
  margin: 16px 0 8px 0;
}

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

  .container {
    padding: 20px 16px;
  }

  h1 {
    font-size: 2rem;
  }
}

.header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  margin-bottom: 40px;
}

.logo {
  width: 50px; /* Adjust this value based on your needs */
  height: 50px;
  object-fit: contain;
  border-radius: 8px;
}

.header h1 {
  margin: 0;
  font-size: 2rem;
  text-align: left;
}

/* Remove the underline from header h1 */
.header h1::after {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    text-align: center;
  }

  .header h1 {
    text-align: center;
    font-size: 1.75rem;
  }

  .logo {
    width: 40px;
    height: 40px;
  }
}

.filters {
  display: flex;
  gap: 20px;
  margin: 30px 0;
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
}

.search-box {
  flex: 1;
  max-width: 400px;
}

.filter-options {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.search-box input,
.filter-options select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--secondary-color);
  border-radius: 8px;
  font-size: 0.95rem;
  background: var(--card-bg);
  color: var(--text-color);
}

.filter-options select {
  min-width: 160px;
}

/* Responsive layout */
@media (max-width: 768px) {
  .filters {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    max-width: 100%;
  }

  .filter-options {
    flex-direction: column;
  }
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex: 1;
  padding: 0 20px;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.theme-toggle:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-color);
}

/* Default state (light theme) */
.theme-toggle-light {
  display: block;
}

.theme-toggle-dark {
  display: none;
}

/* Dark theme state */
.dark-theme .theme-toggle-light {
  display: none;
}

.dark-theme .theme-toggle-dark {
  display: block;
}

/* Update card styles for theme */
.card {
  background: var(--card-bg);
  box-shadow: var(--shadow);
}
