/* Reset */
* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
}
/* Define theme variables */
:root {
  --accent-color: #0070f3;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: #2d2d2d;
  background: #f9f9fa;
}

/* Header / Nav */
.site-header {
  border-bottom: 1px solid #e0e0e0;
  background: #ffffff;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-title {
  font-weight: 600;
  text-decoration: none;
  color: #111;
}
.site-nav {
  display: flex;
  gap: 1rem;
}
.site-nav a {
  text-decoration: none;
  color: #333333;
  font-size: 0.95rem;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background 0.2s ease;
}

/* Hover state for navigation links */
.site-nav a:hover {
  background: rgba(0, 112, 243, 0.1);
  text-decoration: none;
}

/* Active state for current page */
.site-nav a.active {
  font-weight: 600;
  border-bottom: 3px solid var(--accent-color);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
}

/* Main */
.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Cards (Home) */
.card-grid {
  display: grid;
  /* responsive columns with a minimum width */
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.card {
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  background: #ffffff;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.card h2 {
  margin: 0 0 0.5rem;
  color: #111;
  font-size: 1.2rem;
}

/* Sidebar layout (Section pages) */
.section-layout {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
}
/* Sidebar container */
.section-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 4px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.section-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.section-sidebar li + li {
  margin-top: 0.25rem;
}
.section-sidebar a {
  display: block;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: #333333;
  border-left: 3px solid transparent;
  border-radius: 4px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.section-sidebar a:hover {
  background: #f5f7fa;
  border-color: var(--accent-color);
  color: var(--accent-color);
}
/* Section content area */
.section-content {
  max-width: 800px;
  flex-grow: 1;
}

/* Mobile */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #ddd;
    flex-direction: column;
    padding: 1rem;
  }
  .site-nav.open {
    display: flex;
  }
  .section-layout {
    flex-direction: column;
  }
  .section-sidebar {
    width: auto;
  }
  .site-nav a.active {
    text-decoration: underline;
  }
}