:root {
  --bg: #121212;
  --text: #f5f5f5;
  --card: #1e1e1e;
  --link: #58a6ff;
}

body.light {
  --bg: #ffffff;
  --text: #222;
  --card: #f5f5f5;
  --link: #0077cc;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  transition: background 0.3s, color 0.3s;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid #ccc;
}

header h1 {
  margin: 0;
}

header .actions {
  display: flex;
  gap: 0.5rem;
}

#theme-toggle {
  border: none;
  background: var(--card);
  cursor: pointer;
  border-radius: 50%;
  padding: 0.5rem 0.7rem;
  font-size: 1.2rem;
}

main {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.post-card {
  display: flex;
  gap: 1rem;
  background: var(--card);
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  transition: transform 0.2s;
}

.post-card:hover {
  transform: scale(1.01);
}

.post-card img {
  width: 150px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
}

.post-card h2 {
  margin-top: 0;
}

.post-card a {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
}

footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  color: #777;
}

/* --- Blog Post Content --- */
article {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
  line-height: 1.7;
}

article img {
  width: 100%;
  border-radius: 10px;
  margin: 1rem 0;
}

article a {
  color: var(--link);
  text-decoration: none;
}

article a:hover {
  text-decoration: underline;
}

.back {
  display: inline-block;
  margin: 1rem;
  color: var(--link);
  text-decoration: none;
}

.group {
  display: flex;
  line-height: 28px;
  align-items: center;
  position: relative;
  max-width: 190px;
}

.input {
  width: 100%;
  height: 45px;
  padding-left: 2.5rem;
  box-shadow: 0 0 0 1.5px #2b2c37, 0 0 25px -17px #000;
  border: 0;
  border-radius: 12px;
  background: var(--card);
  outline: none;
  color: var(--text);
  transition: all 0.25s cubic-bezier(0.19, 1, 0.22, 1);
  cursor: text;
  z-index: 0;
}

.input:hover {
  box-shadow: 0 0 0 2.5px #2f303d, 0px 0px 25px -15px #000;
}

.input:active {
  transform: scale(0.95);
}

.input:focus {
  box-shadow: 0 0 0 2.5px #2f303d;
}

.search-icon {
  position: absolute;
  left: 1rem;
  fill: #bdbecb;
  width: 1rem;
  height: 1rem;
  pointer-events: none;
  z-index: 1;
}
