/* Chris Hutchings, shared styles */

@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #ffffff;
  --ink: #1a1a1a;
  --ink-soft: #5a5a5a;
  --line: #e9e9e9;
  --accent: #ff5a00;
  --accent-tint: rgba(255, 90, 0, 0.07);
  --max: 680px;
  --font-head: 'Inter', system-ui, sans-serif;
  --font-body: 'Courier Prime', 'Courier New', monospace;
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main.wrap {
  flex: 1 0 auto;
  width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--ink);
}

li {
  font-family: var(--font-body);
  line-height: 1.7;
}

.now-photo {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 10px;
  margin: 2.5rem 0;
}

h1 { font-size: clamp(2.1rem, 5vw, 2.75rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 1rem; }
h2 { font-size: 1.4rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 1rem; }
h3 { font-size: 1.1rem; font-weight: 600; line-height: 1.3; margin: 0 0 0.75rem; }

p {
  font-family: var(--font-body);
}

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

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Nav */
header.site {
  padding: 2rem 0 1.25rem;
  margin-bottom: 3rem;
  flex-shrink: 0;
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  max-width: none;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.logo:hover { text-decoration: none; }

nav.main {
  display: flex;
  align-items: center;
}

nav.main a {
  font-family: var(--font-head);
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-left: 1.75rem;
}

nav.main a:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.25rem;
  height: 2.25rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

@media (max-width: 820px) {
  .nav-toggle {
    display: flex;
  }

  nav.main {
    display: none;
    position: absolute;
    top: calc(100% + 1.25rem);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1.5rem 1.5rem;
    z-index: 10;
  }

  nav.main.open {
    display: flex;
  }

  nav.main a {
    margin-left: 0;
    padding: 0.65rem 0;
    font-size: 1rem;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid var(--line);
  }

  nav.main a:last-child {
    border-bottom: none;
  }
}

/* Hero */
.hero h1 {
  margin: 0 0 1rem;
}

.hero p {
  font-family: var(--font-body);
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 58ch;
  margin: 0 0 0.5rem;
}

.hero .contact-line {
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

/* Section headings */
section.block {
  margin-top: 3.5rem;
}

section.block h2 {
  margin: 0 0 1.25rem;
}

/* Post list (with thumbnail) */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-list li {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.post-list li:first-child {
  padding-top: 0;
}

.post-thumb {
  flex-shrink: 0;
  width: 200px;
  height: 125px;
  border-radius: 8px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--accent) 0%, #ffd8b8 130%);
}

.post-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}

.post-thumb.placeholder svg {
  width: 28px;
  height: 28px;
  stroke: #fff;
  opacity: 0.8;
}

.post-content {
  flex: 1;
  min-width: 0;
}

.post-list .post-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  display: block;
}

.post-list a.post-title:hover {
  color: var(--accent);
  text-decoration: none;
}

.post-list .post-meta {
  font-family: var(--font-head);
  color: var(--ink-soft);
  font-size: 0.82rem;
  margin-top: 0.25rem;
}

.post-list .post-excerpt {
  font-family: var(--font-body);
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 0.5rem;
}

@media (max-width: 480px) {
  .post-thumb {
    width: 120px;
    height: 75px;
  }
}

/* Empty state */
.empty-state {
  background: var(--accent-tint);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 1.5rem 1.75rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.empty-state strong {
  color: var(--ink);
}

/* Footer */
footer.site {
  margin-top: 5rem;
  padding: 2rem 0 3rem;
  color: var(--ink-soft);
  font-family: var(--font-head);
  font-size: 0.85rem;
  flex-shrink: 0;
}

footer.site a { color: var(--ink-soft); }
footer.site a:hover { color: var(--accent); }

/* Post page */
article.post h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.4rem);
  margin: 0 0 0.5rem;
}

article.post .post-meta {
  font-family: var(--font-head);
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

article.post p {
  font-size: 1rem;
  line-height: 1.8;
  margin: 0 0 1.3rem;
}

/* Digest-style list (Stuff section) */
.digest-list {
  margin: 0 0 1.3rem;
  padding-left: 1.2rem;
}

.digest-list li {
  margin-bottom: 0.85rem;
  line-height: 1.7;
}

.back-link {
  font-family: var(--font-head);
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}
