/* GOOGLE FONTS */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700&display=swap');

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* VARIABLES */
:root {
  --bg: #f9f9f9;
  --text: #111;
  --accent: #ff3c3c;
  --card-bg: #fff;
  --header-bg: #fff;
  --border: #ddd;
}
body.dark {
  --bg: #121212;
  --text: #f0f0f0;
  --accent: #ff5656;
  --card-bg: #1f1f1f;
  --header-bg: #1a1a1a;
  --border: #333;
}

/* BODY */
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', sans-serif;
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
  padding-bottom: 3rem;
}

/* HEADER */
header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
header h1 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 2.5rem;
  color: var(--accent);
  letter-spacing: 1px;
}
#toggle-theme {
  background: none;
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 0.4rem 1rem;
  font-size: 1rem;
  border-radius: 25px;
  cursor: pointer;
  transition: 0.3s;
  margin-top: 0.5rem;
}
#toggle-theme:hover {
  background-color: var(--accent);
  color: white;
}

/* NAVIGATION */
nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1rem;
  gap: 0.5rem;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: center;
}
nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
}
nav a:hover {
  text-decoration: underline;
  color: var(--accent);
}

/* MAIN */
main {
  padding: 2rem;
}
.articles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}
.card {
  background-color: var(--card-bg);
  padding: 1.5rem;
  border-radius: 15px;
  border: 1px solid var(--border);
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  transition: transform 0.2s ease;
}
.card:hover {
  transform: scale(1.02);
}
.card h2 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
}
.card p {
  margin-bottom: 0.8rem;
}
.card a {
  display: inline-block;
  text-decoration: none;
  color: var(--accent);
  font-weight: bold;
}
.card a:hover {
  text-decoration: underline;
}

/* ARTICLE IMAGE */
.article-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  object-fit: cover;
  max-height: 200px;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  background-color: var(--header-bg);
  color: var(--text);
  margin-top: 2rem;
  font-size: 0.9rem;
}
