:root {
  --md-sys-color-primary: #2E6A38;
  --md-sys-color-on-primary: #FFFFFF;
  --md-sys-color-primary-container: #B6F2B8;
  --md-sys-color-on-primary-container: #002107;
  --md-sys-color-surface: #F7FBF1;
  --md-sys-color-on-surface: #191D19;
  --md-sys-color-surface-variant: #DEE5D9;
  --md-sys-color-on-surface-variant: #424940;
  --md-sys-color-outline: #72796F;
  --md-sys-color-background: #F7FBF1;
  --md-sys-color-on-background: #191D19;
  --md-sys-color-secondary-container: #DCE5D5;
  --md-sys-color-on-secondary-container: #151E15;
  --md-sys-shape-corner-medium: 12px;
  --md-sys-shape-corner-large: 16px;
  --md-sys-shape-corner-extra-large: 28px;
  --md-sys-elevation-1: 0px 1px 3px 1px rgba(0, 0, 0, 0.15), 0px 1px 2px 0px rgba(0, 0, 0, 0.30);
  --md-sys-elevation-2: 0px 2px 6px 2px rgba(0, 0, 0, 0.15), 0px 1px 2px 0px rgba(0, 0, 0, 0.30);
}

[data-theme="dark"] {
  --md-sys-color-primary: #9BD59D;
  --md-sys-color-on-primary: #003912;
  --md-sys-color-primary-container: #145223;
  --md-sys-color-on-primary-container: #B6F2B8;
  --md-sys-color-surface: #111411;
  --md-sys-color-on-surface: #E1E4DC;
  --md-sys-color-surface-variant: #424940;
  --md-sys-color-on-surface-variant: #C2C9BD;
  --md-sys-color-outline: #8C9388;
  --md-sys-color-background: #111411;
  --md-sys-color-on-background: #E1E4DC;
  --md-sys-color-secondary-container: #3E4A3D;
  --md-sys-color-on-secondary-container: #DCE5D5;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s, color 0.3s;
}

header {
  background-color: var(--md-sys-color-surface);
  border-bottom: 1px solid var(--md-sys-color-surface-variant);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--md-sys-elevation-1);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--md-sys-color-on-surface);
  font-weight: 700;
  font-size: 1.3rem;
}

.brand img {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--md-sys-color-on-surface-variant);
  padding: 0.5rem 1rem;
  border-radius: var(--md-sys-shape-corner-extra-large);
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.theme-btn {
  background: none;
  border: 1px solid var(--md-sys-color-outline);
  color: var(--md-sys-color-on-surface);
  padding: 0.4rem 0.8rem;
  border-radius: var(--md-sys-shape-corner-medium);
  cursor: pointer;
  font-size: 0.9rem;
}

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

.hero {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  padding: 3rem 2rem;
  border-radius: var(--md-sys-shape-corner-extra-large);
  margin-bottom: 2rem;
  text-align: center;
}

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

.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 1.5rem;
}

.btn {
  display: inline-block;
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--md-sys-shape-corner-extra-large);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.9;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.card {
  background-color: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-surface-variant);
  border-radius: var(--md-sys-shape-corner-large);
  padding: 1.5rem;
  box-shadow: var(--md-sys-elevation-1);
  display: flex;
  flex-direction: column;
}

.card h3 {
  color: var(--md-sys-color-primary);
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--md-sys-color-on-surface-variant);
  flex: 1;
}

.svg-illustration {
  width: 100%;
  max-width: 240px;
  height: auto;
  margin: 1rem auto;
  display: block;
}

footer {
  background-color: var(--md-sys-color-surface);
  border-top: 1px solid var(--md-sys-color-surface-variant);
  text-align: center;
  padding: 1.5rem;
  color: var(--md-sys-color-on-surface-variant);
  margin-top: auto;
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 1rem;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
}
