/* Site layout: horizontal header on top, menu panel on the left, content on the right.
   style.css (HTML5 Boilerplate) provides the base styles; this file is ours. */

:root {
  --color-bg: #fafafa;
  --color-surface: #fff;
  --color-text: #222;
  --color-muted: #666;
  --color-border: #e2e2e2;
  --color-accent: #1f4e8c;
  --color-accent-soft: #e8eef7;

  --header-height: 4rem;
  --nav-width: 14rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  height: var(--header-height);
  padding: 0 1.5rem;
  background: var(--color-accent);
  color: #fff;
}

.site-header__brand {
  color: inherit;
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
}

/* Menu panel + content */

.site-body {
  flex: 1;
  display: flex;
}

.site-nav {
  flex: 0 0 var(--nav-width);
  padding: 1rem 0;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
}

.site-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 0.6rem 1.5rem;
  border-left: 3px solid transparent;
  color: var(--color-text);
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--color-accent-soft);
}

.site-nav a[aria-current="page"] {
  border-left-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-weight: 600;
}

.site-content {
  flex: 1;
  min-width: 0;
  padding: 2rem;
}

.site-content h1 {
  margin-top: 0;
}

/* Narrow screens: the menu turns into a row under the header */

@media (max-width: 40em) {
  .site-body {
    flex-direction: column;
  }

  .site-nav {
    flex-basis: auto;
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
  }

  .site-nav ul {
    display: flex;
    overflow-x: auto;
  }

  .site-nav a {
    padding: 0.75rem 1rem;
    border-left: 0;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
  }

  .site-nav a[aria-current="page"] {
    border-bottom-color: var(--color-accent);
  }

  .site-content {
    padding: 1.25rem 1rem;
  }
}
