/* ===== LAYOUT & COMPONENTS =====
 * Structural styles. Most theming should happen in theme.css.
 * Edit here for layout changes (sidebar width, frame style, etc).
 */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 16px;
}

a {
  color: var(--link);
  text-decoration: underline;
}
a:visited { color: var(--link-visited); }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--fg);
  margin-top: 0;
}
h1 { font-size: 1.8rem; }
h2 { font-size: 1.3rem; border-bottom: 1px dashed var(--frame-border); padding-bottom: 0.25rem; }
h3 { font-size: 1.1rem; }

code {
  font-family: var(--font-mono);
  background: rgba(0,0,0,0.06);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.95em;
}
pre code {
  display: block;
  padding: 0.75rem;
  overflow-x: auto;
  background: rgba(0,0,0,0.08);
}

blockquote {
  border-left: 4px solid var(--accent);
  margin: 1rem 0;
  padding: 0.25rem 1rem;
  color: var(--muted);
  font-style: italic;
}

img { max-width: 100%; height: auto; }

/* ===== HEADER ===== */
.site-header {
  background: var(--header-bg);
  color: var(--header-fg);
  padding: 0.75rem 1rem;
}
.header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--gap);
}
.site-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--header-fg);
  text-decoration: none;
  font-weight: bold;
}
.top-nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.top-nav a {
  color: var(--header-fg);
  text-decoration: none;
}
.top-nav a:hover { color: var(--accent); }

/* ===== LAYOUT ===== */
.layout {
  max-width: var(--content-width);
  margin: var(--gap) auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: var(--gap);
}
@media (max-width: 720px) {
  .layout { grid-template-columns: 1fr; }
}

.sidebar { display: flex; flex-direction: column; gap: var(--gap); }
.content { display: flex; flex-direction: column; gap: var(--gap); }

/* ===== FRAMES (the boxed cards) ===== */
.frame {
  background: var(--frame-bg);
  border: 2px solid var(--frame-border);
  border-radius: var(--radius);
  padding: var(--frame-pad);
  box-shadow: var(--frame-shadow);
}
.frame > *:last-child { margin-bottom: 0; }

/* ===== LISTS ===== */
.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-list li {
  padding: 0.25rem 0;
  border-bottom: 1px dotted var(--frame-border);
}
.nav-list li:last-child { border-bottom: none; }

.changelog, .post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.changelog li, .post-list li {
  padding: 0.4rem 0;
  border-bottom: 1px dotted var(--frame-border);
}
.changelog li:last-child, .post-list li:last-child { border-bottom: none; }
.changelog time, .post-list time {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 0.9em;
  margin-right: 0.5rem;
}

/* ===== POSTS ===== */
.post-meta {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.9em;
  margin-bottom: 1rem;
}
.tag {
  display: inline-block;
  background: var(--accent);
  color: var(--frame-bg);
  padding: 0.1em 0.5em;
  border-radius: 3px;
  font-size: 0.8em;
  margin-right: 0.25rem;
  text-decoration: none;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-fg);
  text-align: center;
  padding: 1rem;
  margin-top: var(--gap);
  font-size: 0.9em;
}
.site-footer a { color: var(--footer-fg); }
.site-footer a:hover { color: var(--accent); }
