/*
Theme Name: Smudged Notes
Theme URI: https://smudgednotes.com
Author: Skip
Author URI: https://smudgednotes.com
Description: Raw knowledge. Still writing. Still figuring it out.
Version: 1.3
License: GNU General Public License v2 or later
Tags: blog, minimal, custom
*/

/* ============================================
   RESET & BASE
============================================ */

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

:root {
  --coral:     #E5553A;
  --cream:     #F2EDE0;
  --black:     #1A1A1A;
  --teal:      #3B8F8A;
  --offwhite:  #FAF8F4;
  --gray:      #888888;
  --font-mono: 'Courier New', Courier, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--offwhite);
  color: var(--black);
  font-family: var(--font-sans);
  line-height: 1.7;
}

a {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--coral);
}

::selection {
  background: var(--coral);
  color: #fff;
}

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

/* ============================================
   LAYOUT
============================================ */

.site-wrapper {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   HEADER
============================================ */

.site-header {
  padding: 48px 0 32px;
  border-bottom: 3px solid var(--black);
  margin-bottom: 56px;
}

.site-header .site-wrapper {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.site-title {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--black);
  line-height: 1;
}

.site-title:hover {
  color: var(--coral);
}

.site-title span {
  color: var(--coral);
}

.site-tagline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gray);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ============================================
   NAVIGATION
============================================ */

.site-nav {
  margin-top: 20px;
  width: 100%;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray);
  transition: color 0.15s;
}

.site-nav a:hover,
.site-nav a.current {
  color: var(--coral);
}

/* ============================================
   POST LIST (HOMEPAGE / ARCHIVE)
============================================ */

.post-list {
  list-style: none;
}

.post-list-item {
  padding: 0 0 48px 22px;
  margin-bottom: 48px;
  border-left: 2px solid var(--cream);
  transition: border-left-color 0.2s, padding-left 0.2s;
}

.post-list-item:hover {
  border-left-color: var(--coral);
  padding-left: 26px;
}

.post-list-title {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

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

.post-list-title a:hover {
  color: var(--coral);
}

.post-list-meta {
  font-size: 0.72rem;
  color: var(--gray);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.post-list-excerpt {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.65;
}

.post-list-excerpt p {
  margin: 0;
}

.read-more {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--coral);
  text-decoration: none;
  border-bottom: 1px solid var(--coral);
  padding-bottom: 1px;
}

.read-more:hover {
  color: var(--black);
  border-bottom-color: var(--black);
}

/* ============================================
   SINGLE POST
============================================ */

.post-header {
  margin-bottom: 48px;
  padding-bottom: 8px;
}

.post-header .post-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.post-header .post-category a {
  color: var(--coral);
  text-decoration: none;
}

.post-title {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--black);
}

/* ============================================
   POST CONTENT
============================================ */

.post-content {
  margin-bottom: 64px;
}

.post-content p {
  margin-bottom: 1.4em;
  line-height: 1.75;
}

.post-content h2 {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2.8em 0 0.75em;
  color: var(--black);
  line-height: 1.3;
  border-left: 3px solid var(--coral);
  padding-left: 14px;
}

.post-content h3 {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 2em 0 0.5em;
  color: var(--black);
}

.post-content strong {
  font-weight: 700;
  color: var(--black);
}

.post-content em {
  font-style: italic;
  color: #555;
}

.post-content hr {
  border: none;
  margin: 3.5em 0;
  text-align: center;
  height: 1.5em;
  line-height: 1.5em;
  overflow: visible;
}

.post-content hr::before {
  content: '*  *  *';
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.4em;
  color: var(--gray);
}

.post-content blockquote {
  border-left: 2px solid var(--coral);
  margin: 2em 0;
  padding: 4px 20px;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.7;
  font-style: italic;
}

.post-content blockquote p {
  margin: 0;
  color: #444;
}

.post-content ul,
.post-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.4em;
}

.post-content li {
  margin-bottom: 0.4em;
  line-height: 1.7;
}

/* Callout / highlight box */
.post-content .callout {
  background: var(--cream);
  border: 2px solid var(--black);
  padding: 20px 24px 20px;
  margin: 2.5em 0;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  position: relative;
}

.post-content .callout::before {
  content: 'NOTE';
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--coral);
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* The "short line" Skip style — single line paragraphs */
.post-content p:has(+ p:not(:empty)) {
  margin-bottom: 0.9em;
}

/* ============================================
   POST FOOTER / NAV
============================================ */

.post-footer {
  border-top: 3px solid var(--black);
  padding-top: 32px;
  margin-bottom: 64px;
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.post-nav-item {
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.post-nav-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray);
  margin-bottom: 6px;
}

.post-nav-title {
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  color: var(--black);
  line-height: 1.3;
}

.post-nav-title:hover {
  color: var(--coral);
}

.post-nav-item.next {
  text-align: right;
}

/* ============================================
   HOMEPAGE INTRO
============================================ */

.home-intro {
  margin-bottom: 64px;
  padding-bottom: 56px;
  border-bottom: 3px solid var(--black);
}

.home-intro p {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--black);
  font-weight: 400;
  margin-bottom: 0.25em;
}

.home-intro p:last-child {
  color: var(--coral);
  margin-bottom: 0;
  font-weight: 700;
}

/* ============================================
   FOOTER
============================================ */

.site-footer {
  border-top: 3px solid var(--black);
  padding: 32px 0 48px;
  margin-top: 64px;
}

.site-footer .site-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gray);
  font-style: italic;
}

/* ============================================
   PAGINATION
============================================ */

.pagination {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 40px 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.pagination a,
.pagination span {
  padding: 8px 14px;
  border: 1px solid var(--black);
  text-decoration: none;
  color: var(--black);
}

.pagination a:hover {
  background: var(--coral);
  border-color: var(--coral);
  color: white;
}

.pagination .current {
  background: var(--black);
  color: white;
}

/* ============================================
   CATEGORY / TAG BADGES
============================================ */

.tag-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border: 1px solid var(--coral);
  color: var(--coral);
  text-decoration: none;
  margin-right: 6px;
}

.tag-badge:hover {
  background: var(--coral);
  color: white;
}

/* ============================================
   PAGE (STATIC)
============================================ */

.page-title {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 40px;
  padding-bottom: 0;
}

/* ============================================
   404 / NONE FOUND
============================================ */

.nothing-found {
  text-align: center;
  padding: 64px 0;
  font-family: var(--font-mono);
}

.nothing-found h1 {
  font-size: 3rem;
  color: var(--coral);
  margin-bottom: 16px;
}

.nothing-found p {
  color: var(--gray);
  font-size: 0.9rem;
}

/* ============================================
   INLINE WORD HIGHLIGHT
   Usage via shortcodes (recommended — no HTML needed):
     [highlight]key phrase[/highlight]       — pen-stroke marker
     [pop]key phrase[/pop]                   — solid coral block
     [soft]key phrase[/soft]                 — subtle coral tint
     [coral]text[/coral]                     — coral coloured text
     [teal]text[/teal]                       — teal coloured text

   Raw HTML still works too:
     <mark>key phrase</mark>
     <span class="highlight-solid">key phrase</span>
============================================ */

/* Highlighter-pen style — transparent top, coral wash on bottom half.
   Looks like you dragged a marker across the text.
   NOTE: background-color is set explicitly to transparent FIRST so browsers
   don't bleed their default yellow UA stylesheet colour through. */
mark,
.highlight {
  background-color: transparent;
  background-image: linear-gradient(
    transparent 45%,
    rgba(229, 85, 58, 0.35) 45%
  );
  background-repeat: no-repeat;
  padding: 0 2px 2px;
  border-radius: 1px;
  color: inherit;
  font-style: normal;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Solid version — coral block, white text.
   Good for single important words you really want to pop. */
mark.highlight-solid,
.highlight-solid {
  background-color: var(--coral);
  background-image: none;
  color: #fff;
  padding: 0.05em 0.35em;
  border-radius: 2px;
  font-style: normal;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Softer tint — very light coral wash, dark text.
   For when you want subtle emphasis without the marker look. */
.highlight-soft {
  background-color: rgba(229, 85, 58, 0.12);
  background-image: none;
  color: var(--black);
  padding: 0.05em 0.3em;
  border-radius: 2px;
  font-style: normal;
}

/* Colour text spans — generated by [coral] and [teal] shortcodes */
.text-coral { color: var(--coral); }
.text-teal  { color: var(--teal); }

/* ============================================
   RESOURCE LINKS
   Generated by the [resources] shortcode.
   Usage in posts:
     [resources]
     Link Title | https://example.com
     Another Link | https://example.com/page
     [/resources]
============================================ */

.resource-links {
  border: 2px solid var(--black);
  padding: 20px 24px;
  margin: 2.5em 0;
  font-family: var(--font-mono);
}

.resource-links::before {
  content: 'LINKS';
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--coral);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.resource-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--black);
  padding: 6px 0;
  border-bottom: 1px solid var(--cream);
  transition: color 0.15s, padding-left 0.15s;
}

.resource-link:last-child {
  border-bottom: none;
}

.resource-link:hover {
  color: var(--coral);
  padding-left: 6px;
}

.resource-link .resource-label {
  flex: 1;
  font-weight: 700;
}

.resource-link .resource-url {
  font-size: 0.7rem;
  color: var(--gray);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.resource-link:hover .resource-url {
  color: var(--coral);
}

/* ============================================
   RESPONSIVE
============================================ */

@media (max-width: 600px) {
  html { font-size: 16px; }

  .site-header { padding: 32px 0 24px; }

  .site-title { font-size: 1.3rem; }

  .post-title { font-size: 1.4rem; }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav-item.next {
    text-align: left;
  }

  .site-footer .site-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }
}
