:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #666666;
  --accent: #a32a2a;
  --border: #dddddd;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

@font-face {
  font-family: "Iosevka";
  src: url("/assets/fonts/iosevka-extendedmedium.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body {
  margin: 0;
  padding: 0;
  font-family:  "Iosevka", monospace;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0 1rem;
  background: var(--bg);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.branding {
  display: flex;
  align-items: flex-end;
  gap: 1.0rem;
}

.logo-link {
  display: inline-flex;
}

.logo-link .logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
}

.title-block h1 {
  margin: 0;
  font-size: 4.0rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.title-block h1 a {
  color: var(--text);
}

.title-block .tagline {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.title-block nav {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 420px; /* match .search */
  gap: 0;
}

.title-block nav a {
  font-size: 1rem;
}

.search {
  position: relative;
  max-width: 420px;
  margin-top: 0.75rem;
}

.search input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: #fafafa;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.search-results {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  width: 100%;
  border: 1px solid var(--border);
  background: #ffffff;
  padding: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  z-index: 10;
}

.search-results .result {
  margin-bottom: 0.6rem;
}

.search-results .result:last-child {
  margin-bottom: 0;
}

.search-results p {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

main {
  padding: 2rem 0 3rem;
}

h1,
h2,
h3,
h4 {
  color: var(--text);
  font-weight: 600;
  font-size: 2.0rem;
  letter-spacing: 0.5px;
}

code,
pre {
  background: #f7f7f7;
  padding: 0.1rem 0.2rem;
  border-radius: 3px;
  border: 1px solid #e0e0e0;
  font-size: 0.95em;
}

pre {
  padding: 0.75rem;
  overflow-x: auto;
}

blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
  padding-left: 1rem;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .site-header .container {
    flex-direction: column;
  }

  .branding {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .logo-link .logo {
    width: 96px;
    height: 96px;
  }
}
