*, *::before, *::after { box-sizing: border-box; }

:root {
  --ink:    #1a1a1e;
  --bg:     #faf9f6;
  --accent: #37723a;
  --accent2: #c5171a;
  --muted:  #6b7280;
  --border: #e5e7eb;
  --font:   system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --sidebar: 200px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  margin: 0;
  line-height: 1.6;
  font-size: 0.8125rem;
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
}

/* ── Sidebar ── */

.sidebar {
  border-right: 1px solid var(--border);
  padding: 1.25rem 1rem 1.25rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.logo-wrap {
  display: block;
}

.logo {
  width: 93.5%;
  height: auto;
  border-radius: 50%;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

nav ul a {
  text-decoration: none;
  color: var(--accent);
  font-size: 0.8125rem;
  display: block;
  padding: 0.25rem 0;
}

nav ul a:hover { color: var(--accent2); }

/* ── Page (main + footer) ── */

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  max-width: 680px;
  padding: 2.5rem 2rem 4rem;
}

h1 {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 2rem 0 0.5rem;
}

p { margin: 0 0 1rem; }

em { font-style: italic; }

a { color: var(--accent); }
a:hover { color: var(--accent2); text-decoration: none; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* ── Footer ── */

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

footer a { color: var(--muted); }

/* ── Responsive ── */

@media (max-width: 600px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    gap: 1rem;
  }

  .logo { max-width: 48px; }

  nav ul {
    flex-direction: row;
    gap: 1.25rem;
  }

  h1 { font-size: 1.25rem; }
}
