/*
Theme Name: Tyler IO Custom
Theme URI: https://tyler.io
Author: Tyler Hall
Author URI: https://tyler.io
Description: Clean, editorial, light/dark theme for posts, notes, and links.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tyler-io
*/

/* Base variables */
:root {
  --bg: #f8f7f4;
  --text: #1f1f1a;
  --muted: #5c5b55;
  --extramuted: #b2b0a6;
  --accent: #d97128;
  --surface: #ffffff;
  --border: #e1dfd9;
  --code-bg: #f1efe9;
  --blockquote: #f0ece4;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
  --button-text: #fffaf5;
  --token-comment: #7d7d71;
  --token-keyword: #c03524;
  --token-string: #2f7c3c;
  --token-function: #2b5fb3;
  --token-operator: #a65f2b;
  --token-number: #b7551d;
  /* Swatch palette references */
  --swatch-default-1: #d97128;
  --swatch-default-2: #1f1f1a;
  --swatch-neon-1: #ff0077;
  --swatch-neon-2: #12002f;
  --swatch-pastel-1: #ff9aa2;
  --swatch-pastel-2: #2d2b32;
  --swatch-greyscale-1: #3a3a3a;
  --swatch-greyscale-2: #1f1f1f;
  --swatch-retro-1: #e60012;
  --swatch-retro-2: #1c1a1b;
  --swatch-bold-1: #ff3366;
  --swatch-bold-2: #0f172a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c11;
    --text: #f5f4f1;
    --muted: #9f9ea1;
    --accent: #f28d3a;
    --surface: #17171d;
    --border: #2b2b33;
    --code-bg: #1f1f26;
    --blockquote: #1c1c24;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    --button-text: #fffaf5;
    --token-comment: #8f908a;
    --token-keyword: #f08d3c;
    --token-string: #8cd67a;
    --token-function: #7ab7ff;
    --token-operator: #f0c674;
    --token-number: #ff9d61;
  }
}

/* Optional manual dark theme toggle */
:root[data-theme="dark"],
body.theme-dark {
  --bg: #0c0c11;
  --text: #f5f4f1;
  --muted: #9f9ea1;
  --accent: #f28d3a;
  --surface: #17171d;
  --border: #2b2b33;
  --code-bg: #1f1f26;
  --blockquote: #1c1c24;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  --button-text: #fffaf5;
  --token-comment: #8f908a;
  --token-keyword: #f08d3c;
  --token-string: #8cd67a;
  --token-function: #7ab7ff;
  --token-operator: #f0c674;
  --token-number: #ff9d61;
}

:root[data-theme="neon"], body.theme-neon {
  --bg: #0b0c1a;
  --text: #f4f7ff;
  --muted: #9ac0ff;
  --accent: #ff4ef7;
  --surface: #101127;
  --border: #2a2d4a;
  --code-bg: #131533;
  --blockquote: #111a30;
  --shadow: 0 18px 38px rgba(255, 78, 247, 0.35);
}

:root[data-theme="pastel"], body.theme-pastel {
  --bg: #f9faf6;
  --text: #2d2b32;
  --muted: #7a7783;
  --accent: #ff9aa2;
  --surface: #ffffff;
  --border: #e6e5eb;
  --code-bg: #f1f2ed;
  --blockquote: #f4f1f7;
  --shadow: 0 12px 30px rgba(45, 43, 50, 0.08);
}

:root[data-theme="greyscale"], body.theme-greyscale {
  --bg: #f5f5f5;
  --text: #1f1f1f;
  --muted: #666666;
  --accent: #3a3a3a;
  --surface: #ffffff;
  --border: #dcdcdc;
  --code-bg: #efefef;
  --blockquote: #e8e8e8;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

:root[data-theme="retro"], body.theme-retro {
  --bg: #f7f4eb;
  --text: #1c1a1b;
  --muted: #6a6763;
  --accent: #e60012;
  --surface: #ffffff;
  --border: #d7cfc2;
  --code-bg: #f0e9da;
  --blockquote: #f3ebdf;
  --shadow: 0 12px 28px rgba(230, 0, 18, 0.18);
}

:root[data-theme="bold"], body.theme-bold {
  --bg: #fff2e8;
  --text: #0f172a;
  --muted: #43506a;
  --accent: #ff3366;
  --surface: #ffffff;
  --border: #ffd9b8;
  --code-bg: #fff0f6;
  --blockquote: #ffe6f0;
  --shadow: 0 18px 38px rgba(255, 51, 102, 0.18);
}

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

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.16em;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

main {
  width: 100%;
}

.layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) {
  .site-header {
    background: color-mix(in srgb, var(--surface) 92%, transparent);
  }
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.brand {
  font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--text);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.brand:hover {
  border-color: var(--border);
}

.nav-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.98rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  border-color: var(--border);
}

.nav-links .active {
  border-color: var(--accent);
  color: var(--accent);
}

.page-title {
  font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  font-size: 2rem;
  margin: 8px 0 16px;
}

.lead {
  color: var(--muted);
  max-width: 70ch;
}

.section {
  margin-bottom: 40px;
}

.type-label {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.post-card h2,
.stream-item h3 {
  margin: 6px 0 8px;
  font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  line-height: 1.3;
}

.post-meta,
.note-meta,
.link-meta {
  color: var(--muted);
  font-size: 0.93rem;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.post-excerpt {
  margin: 10px 0 14px;
}

.stream-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.stream-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.stream-item:hover {
  box-shadow: var(--shadow);
}

.stream-item.note {
  border-left: 4px solid var(--accent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent);
}

.stream-item.link {
  border-left: 4px solid var(--accent);
}

.domain {
  font-size: 0.92rem;
  color: var(--muted);
}

.permalink {
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: underline;
}

a.permalink {
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: none;
}

a.permalink:hover {
  text-decoration: underline;
}

.permalink:hover {
  color: var(--accent);
}

.note-content {
  margin-top: 6px;
}

.sidebar {
  position: relative;
}

.sidebar .widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.sidebar h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
}

.sidebar .intro {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 80%;
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--text));
  flex-shrink: 0;
}

.sidebar form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

input[type="search"],
input[type="email"],
input[type="text"] {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

button,
input[type="submit"] {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--button-text);
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

button:hover,
input[type="submit"]:hover {
  filter: brightness(0.96);
}

.more-links,
.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.more-links a,
.recent-list a {
  text-decoration: none;
  color: var(--text);
}

.more-links a:hover,
.recent-list a:hover {
  color: var(--accent);
}

.recent-list span {
  color: var(--muted);
  font-size: 0.8rem;
  display: block;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 24px 20px 36px;
  color: var(--muted);
  background: var(--surface);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 8px;
}

.footer-nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-nav a {
  text-decoration: none;
  color: var(--muted);
}

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

.muted {
  color: var(--muted) !important;
}

.extramuted {
  color: var(--extramuted) !important;
}

.divider {
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

.article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.article.link-single {
  border-left: 4px solid var(--accent);
}

.article h1,
.article h2,
.article h3,
.article h4 {
  font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  line-height: 1.3;
}

.article h1 {
  margin: 0 0 10px;
  font-size: 1.6rem;
}

.article h2 {
  margin-top: 24px;
}

.article p {
  max-width: 70ch;
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 18px;
}

.tag {
  background: var(--code-bg);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.88rem;
  border: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) {
  .tag {
    color: var(--text);
  }
}

.article figure {
  margin: 20px 0;
  text-align: center;
}

.article figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 8px;
}

blockquote {
  margin: 22px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--accent);
  background: var(--blockquote);
  font-size: 1.1rem;
  font-style: italic;
  border-radius: 10px;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  overflow-x: auto;
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
}

code {
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* Syntax highlighting */
.token.comment { color: var(--token-comment); font-style: italic; }
.token.keyword { color: var(--token-keyword); }
.token.string { color: var(--token-string); }
.token.function { color: var(--token-function); }
.token.operator { color: var(--token-operator); }
.token.number { color: var(--token-number); }

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 26px 0 8px;
}

.pagination a {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--surface);
}

.pagination a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.meta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.95rem;
}

.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
}

.prev-next a {
  text-decoration: none;
  color: var(--text);
}

.prev-next a:hover {
  color: var(--accent);
}

.single-link-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
}

.link-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.link-title {
  margin: 6px 0;
}

.note-title,
.link-title {
  font-size: 1.05rem;
  color: var(--text);
}

.single-link-header #post-title a {
  color: --var(--text);
}

.domain-chip {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 5px;
  font-size: 0.7rem;
  color: var(--muted);
}

.hero-about {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}

.hero-about img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 18px;
}

.single-column {
  max-width: 760px;
  margin: 0 auto;
}

.list-inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  list-style: none;
}

.callout {
  border: 1px solid var(--border);
  background: var(--blockquote);
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text);
}

.theme-swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-swatch {
  border: 1px solid var(--border);
  background: var(--swatch-a, var(--accent));
  color: transparent;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-swatch span {
  font-size: 0;
}

.theme-swatch::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--swatch-b, var(--text));
  border: 2px solid var(--border);
}

.theme-swatch:hover {
  box-shadow: var(--shadow);
}

.theme-swatch[data-theme="default"] { --swatch-a: var(--swatch-default-1); --swatch-b: var(--swatch-default-2); }
.theme-swatch[data-theme="neon"] { --swatch-a: var(--swatch-neon-1); --swatch-b: var(--swatch-neon-2); }
.theme-swatch[data-theme="pastel"] { --swatch-a: var(--swatch-pastel-1); --swatch-b: var(--swatch-pastel-2); }
.theme-swatch[data-theme="greyscale"] { --swatch-a: var(--swatch-greyscale-1); --swatch-b: var(--swatch-greyscale-2); }
.theme-swatch[data-theme="retro"] { --swatch-a: var(--swatch-retro-1); --swatch-b: var(--swatch-retro-2); }
.theme-swatch[data-theme="bold"] { --swatch-a: var(--swatch-bold-1); --swatch-b: var(--swatch-bold-2); }

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

.stack-16 > * + * {
  margin-top: 16px;
}

.stack-18 > * + * {
  margin-top: 18px;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.title-compact {
  font-size: 1.6rem;
  margin: 4px 0;
}

.mt-0 {
  margin-top: 0;
}

.form-spaced {
  margin: 18px 0;
}


.grid-table {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  margin-bottom: 40px;
}

.grid-table-row {
  display: contents;
}

.grid-table-cell {
  flex: 1;
  padding-right: 8px;
  padding-bottom: 4px;
}

article a.continue,
#link-title a {
  text-decoration: none !important;
}

article a.continue:hover,
#link-title a:hover {
  text-decoration: underline !important;
}
