/* ------------------------------------------------------------
   Font faces
------------------------------------------------------------ */
@font-face {
  font-family: charter;
  font-style: normal;
  font-weight: normal;
  font-stretch: normal;
  src: url('charter_regular.woff2') format('woff2');
}

@font-face {
  font-family: charter;
  font-style: italic;
  font-weight: normal;
  font-stretch: normal;
  src: url('charter_italic.woff2') format('woff2');
}

@font-face {
  font-family: charter;
  font-style: normal;
  font-weight: bold;
  font-stretch: normal;
  src: url('charter_bold.woff2') format('woff2');
}

@font-face {
  font-family: charter;
  font-style: italic;
  font-weight: bold;
  font-stretch: normal;
  src: url('charter_bold_italic.woff2') format('woff2');
}

/* ------------------------------------------------------------
   Color variables
------------------------------------------------------------ */
:root {
  --color-bg: #ffffff;
  --color-text: #111;
  --color-text-muted: #444;
  --color-border: #e0e0e0;
  --color-footer: #777;

  --color-logo: #111;
  --color-logo-accent: #ff4f00;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #111;
    --color-text: #eee;
    --color-text-muted: #ccc;
    --color-border: #333;
    --color-footer: #aaa;

    --color-logo: #eee;
    --color-logo-accent: #ff6b1c;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: charter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.35;
  color: var(--color-text);
  background-color: var(--color-bg);
}

/* ------------------------------------------------------------
   Header
------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 20px 32px;
  border-bottom: 1px solid var(--color-border);
  background-color: var(--color-bg);
}

.logo {
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  color: var(--color-logo);
  letter-spacing: 0.02em;
}

.logo-dot {
  font-size: 32px;
  color: var(--color-logo-accent);
}

/* ------------------------------------------------------------
   Navigation
------------------------------------------------------------ */
.site-nav {
  display: flex;
  gap: 24px;
  font-size: 16px;
}

.site-nav a {
  text-decoration: none;
  color: var(--color-text-muted);
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--color-text);
}

/* ------------------------------------------------------------
   Page layout
------------------------------------------------------------ */
.page-main {
  padding: 40px 20px 80px;
}

.content {
  max-width: 700px;
  margin: 0 auto;
}

/* ------------------------------------------------------------
   Sections
------------------------------------------------------------ */
.section + .section {
  margin-top: 56px;
}

.section h1,
.section h2,
.section h3 {
  margin: 0 0 12px;
  font-weight: bold;
  line-height: 1.2;
}

.section h1 {
  font-size: 32px;
}

.section h2 {
  font-size: 24px;
}

.section h3 {
  font-size: 20px;
  margin-top: 32px;
}

.section h3:first-of-type {
  margin-top: 20px;
}

.section p {
  margin: 0 0 16px;
}

.section p:last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------
   Links
------------------------------------------------------------ */
.section a {
  color: var(--color-logo-accent);
  text-decoration: none;
}

.section a:hover,
.section a:focus {
  text-decoration: underline;
}

/* ------------------------------------------------------------
   Footer
------------------------------------------------------------ */
.site-footer {
  text-align: center;
  padding: 32px 20px;
  font-size: 14px;
  color: var(--color-footer);
  margin-top: 60px;
  border-top: 1px solid var(--color-border);
}

/* ------------------------------------------------------------
   Mobile adjustments
------------------------------------------------------------ */
@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
  }

  .logo {
    font-size: 24px;
  }

  .site-nav {
    margin-top: 8px;
    gap: 12px;
    font-size: 15px;
    flex-wrap: wrap;
  }
}