:root {
  --bg: #f7f7fa;
  --text: #222;
  --accent: #3b5bdb;
  --accent-light: #eef1fd;
  --card-bg: #ffffff;
  --border: #e0e0e6;
  --muted: #555;
  --footer-text: #888;
}

[data-theme="dark"] {
  --bg: #1a1b1e;
  --text: #eaeaea;
  --accent: #7691ff;
  --accent-light: #262a3d;
  --card-bg: #242529;
  --border: #34363b;
  --muted: #b0b0b0;
  --footer-text: #888;
}

* { box-sizing: border-box; }

/* footer at the bottom */

/* Ensure the body takes up the full height of the viewport */
body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* 100% of the viewport height */
}

/* Make the main content area expand to push the footer down */
main {
  flex: 1;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.2s ease, color 0.2s ease;
}

header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.navbar {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.lang-switch {
  display: flex;
  gap: 0.5rem;
}

.lang-btn {
  border: 1px solid var(--border);
  background: var(--card-bg);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
}

.lang-btn:hover {
  background: var(--accent-light);
}

.lang-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  min-height: 60vh;
}

.link {
	color: var(--accent);
}

.page {
  display: none;
  animation: fadeIn 0.25s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero {
  text-align: center;
  padding: 3rem 1rem;
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.cta-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
}

.cta-btn:hover {
  opacity: 0.9;
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.2rem;
}

.project-card-empty {
  background: transparent;
  border: none;
  padding: 0;
}

.project-card h3 {
  margin-top: 0;
  color: var(--accent);
}

footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--footer-text);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

.controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.theme-btn {
  border: 1px solid var(--border);
  background: var(--card-bg);
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.theme-btn:hover {
  background: var(--accent-light);
}

@media (max-width: 600px) {
  .navbar {
    flex-direction: column;
    gap: 0.8rem;
  }
}
