* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  transition: color 0.3s, background-color 0.3s;
}

body {
  font-family: 'Segoe UI', sans-serif;
  line-height: 1.6;
  background-color: var(--bg);
  color: var(--text);
  padding: 1rem;
}

/* ====================
   COLOR THEMES
==================== */
:root {
  --bg: #ffffff;
  --text: #1f2937;        /* text-gray-800 */
  --section-bg: #f3f4f6;   /* gray-100 */
  --accent: #2563eb;       /* blue-600 */
  --accent-hover: #1d4ed8; /* blue-700 */
  --border: #e5e7eb;       /* gray-200 */
  --btn-text: #ffffff;
  --btn-bg: #111827;       /* gray-900 */
  --btn-hover: #1f2937;    /* gray-800 */
}

body.dark-mode {
  --bg: #111827;
  --text: #f9fafb;
  --section-bg: #1f2937;
  --accent: #60a5fa;       /* blue-400 */
  --accent-hover: #3b82f6; /* blue-500 */
  --border: #374151;
  --btn-text: #111827;
  --btn-bg: #f9fafb;
  --btn-hover: #e5e7eb;
}

/* ====================
   CONTAINER & LAYOUT
==================== */
.container {
  max-width: 768px;
  margin: 0 auto;
  background-color: var(--section-bg);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.section {
  margin-bottom: 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.section:last-child {
  border-bottom: none;
}

h1, h2 {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
  color: var(--accent);
}

/* ====================
   IMAGES
==================== */
img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* ====================
   BUTTONS
==================== */
button, .btn {
  display: inline-block;
  background-color: var(--accent);
  color: var(--btn-text);
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
  text-decoration: none;
  margin-top: 0.5rem;
}

button:hover, .btn:hover {
  background-color: var(--accent-hover);
}

/* Theme toggle button */
.theme-toggle {
  float: right;
  margin-bottom: 1rem;
  background-color: var(--btn-bg);
  color: var(--btn-text);
}

.theme-toggle:hover {
  background-color: var(--btn-hover);
}

/* ====================
   LINKS
==================== */
a {
  color: var(--accent);
  text-decoration: underline;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

/* ====================
   LISTS
==================== */
ul {
  list-style: disc;
  padding-left: 1.5rem;
}

/* ====================
   FOOTER
==================== */
footer {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .container {
    padding: 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }
}
