/* chrisjlocke.co.uk — dead simple blog styles */

:root {
  --royal-blue: #3b5fe2;
  --royal-blue-dark: #2a47b8;
  --bg-grey: #e9eaed;
  --card-bg: #f5f5f7;
  --footer-blue: #0a1330;
  --text-dark: #1c1f2a;
  --text-muted: #5c6072;
  --border: #d5d7dd;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-grey);
  color: var(--text-dark);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

/* Header */

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

.header-inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.logo {
  font-family: 'Pacifico', cursive;
  font-size: 2.6rem;
  color: var(--royal-blue-dark);
  line-height: 1;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--text-dark);
}

.site-nav a:hover {
  color: var(--royal-blue);
}

/* Main content */

main {
  flex: 1;
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* Homepage gets a bit more width to give the two-column grid room to
   breathe — category and post pages stay at the narrower reading width. */

main.main--wide {
  max-width: 1000px;
}

.page-title {
  font-size: 1.5rem;
  margin: 0 0 1.5rem;
  color: var(--text-dark);
}

/* Post list */

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Two-column layout, used on the homepage only. Category and single-post
   pages keep the plain single-column .post-list above. */

.post-list--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 700px) {
  .post-list--grid {
    grid-template-columns: 1fr;
  }
}

.post-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
}

.post-card--with-thumb {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.post-thumb {
  width: 100px;
  height: 74px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.post-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.post-card h2 a {
  color: var(--text-dark);
}

.post-card h2 a:hover {
  color: var(--royal-blue);
}

.post-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.category-tag {
  display: inline-block;
  background: var(--royal-blue);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  text-decoration: none;
}

.category-tag:hover {
  background: var(--royal-blue-dark);
  text-decoration: none;
}

.post-excerpt {
  margin: 0.5rem 0 0;
  color: var(--text-dark);
}

/* Categories sidebar-style list (used on index) */

.categories-line {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.categories-line a {
  margin-right: 0.75rem;
}

/* Single post */

.post-header h1 {
  margin: 0 0 0.4rem;
  font-size: 1.75rem;
}

.post-body p {
  margin: 0 0 1.1rem;
}

.back-link {
  display: inline-block;
  margin-top: 2rem;
  font-size: 0.9rem;
}

/* Footer */

.site-footer {
  background: var(--footer-blue);
  color: #cdd3e6;
  text-align: center;
  padding: 1.25rem;
}

.site-footer a {
  color: #ffffff;
  font-weight: 600;
}

.site-footer a:hover {
  color: #cdd3e6;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 480px;
}

.contact-form label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.75rem;
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card-bg);
  color: var(--text-dark);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--royal-blue);
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  margin-top: 1.25rem;
  align-self: flex-start;
  background: var(--royal-blue);
  color: #fff;
  border: none;
  padding: 0.65rem 1.5rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.contact-form button:hover {
  background: var(--royal-blue-dark);
}