:root {
  color-scheme: light;
  /* Warm light theme (2026-10-10): cream paper, indigo ink, pink and teal accents,
     matching the Instagram slides and the checklist PDF. */
  --bg: #f6efe3;
  --bg-raised: #fffaf0;
  --fg: #26215c;
  --muted: #5d5884;
  --accent: #4338ca;
  --accent2: #d6337f;
  --accent3: #0f8f6c;
  --border: rgba(38, 33, 92, 0.13);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-mono: "Courier Prime", "Courier New", ui-monospace, Menlo, Consolas, monospace;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background:
    radial-gradient(600px circle at 12% 0%, rgba(67, 56, 202, 0.07), transparent 60%),
    radial-gradient(700px circle at 90% 10%, rgba(214, 51, 127, 0.07), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.grad-text {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent2) 60%, var(--accent3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-accent {
  font-style: italic;
  color: var(--accent3);
}

header.site-header {
  border-bottom: 1px solid var(--border);
  padding: 36px 0 28px;
}

header.site-header .brand-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

header.site-header .avatar {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(67, 56, 202, 0.4), 0 8px 24px rgba(67, 56, 202, 0.25);
}

header.site-header .brand h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--fg) 20%, var(--accent) 70%, var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

header.site-header .brand p {
  margin: 4px 0 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

nav.site-nav ul {
  list-style: none;
  display: flex;
  gap: 22px;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

nav.site-nav a {
  position: relative;
  color: var(--fg);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.75;
  padding-bottom: 2px;
}

nav.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: right 0.2s ease;
}

nav.site-nav a:hover {
  opacity: 1;
  color: var(--fg);
  text-decoration: none;
}

nav.site-nav a:hover::after {
  right: 0;
}

main {
  flex: 1;
  padding: 48px 0 72px;
}

.hero {
  position: relative;
  padding: 12px 0 8px;
}

.hero .eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 12px;
}

.hero h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

.hero p {
  color: var(--muted);
  max-width: 62ch;
  font-size: 1.05rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg);
  margin: 56px 0 20px;
}

.section-title::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  flex-shrink: 0;
}

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

.post-list li {
  position: relative;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, var(--bg-raised), rgba(38, 33, 92, 0.02));
  border-radius: 12px;
  padding: 20px 22px 20px 26px;
  box-shadow: 0 2px 10px rgba(38, 33, 92, 0.05);
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.post-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  opacity: 0.85;
}

.post-list li:hover {
  transform: translateX(2px);
  border-color: rgba(67, 56, 202, 0.4);
  box-shadow: 0 12px 32px rgba(67, 56, 202, 0.12);
}

.post-list h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 700;
}

.post-list .meta {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.post-list p.summary {
  margin: 0;
  color: var(--muted);
}

.view-all {
  margin-top: 24px;
}

.btn-ghost {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(67, 56, 202, 0.08), rgba(214, 51, 127, 0.08));
  color: var(--fg);
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.btn-ghost:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  text-decoration: none;
}

article.single {
  max-width: 720px;
}

article.single h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 4px;
}

article.single .meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

article.single h2 {
  margin-top: 40px;
  font-size: 1.4rem;
}

article.single pre {
  background: #1f1b3a;
  color: #f5f6f8;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
}

article.single code {
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

article.single blockquote {
  border-left: 3px solid var(--accent);
  margin: 20px 0;
  padding: 4px 20px;
  color: var(--muted);
}

.mermaid-wrap {
  border: 1px solid var(--border);
  background: var(--bg-raised);
  border-radius: 10px;
  padding: 12px;
  margin: 24px 0;
}

.mermaid-wrap .mermaid-hint {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

pre.mermaid {
  background: transparent;
  border: none;
  padding: 0;
  height: 420px;
  overflow: hidden;
}

pre.mermaid svg {
  width: 100%;
  height: 100%;
}

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

footer.site-footer p {
  margin: 0;
}

.social-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0;
  margin: 0 0 16px;
  flex-wrap: wrap;
}

.social-links a {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease, filter 0.15s ease;
}

.social-links a:hover {
  color: var(--accent);
  text-decoration: none;
  filter: drop-shadow(0 0 6px rgba(67, 56, 202, 0.6));
}

.social-links .social-text {
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.gh-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin: 0 0 32px;
}

.gh-stats-card {
  position: relative;
  display: block;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--bg-raised), rgba(38, 33, 92, 0.02));
  border-radius: 14px;
  padding: 20px 22px;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.gh-stats-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3));
}

.gh-stats-card:hover {
  border-color: rgba(67, 56, 202, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(67, 56, 202, 0.15);
  text-decoration: none;
}

.gh-stats-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.gh-stats-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--bg-raised), 0 0 0 3px rgba(67, 56, 202, 0.4);
}

.gh-stats-name {
  color: var(--fg);
  font-weight: 700;
  font-size: 0.95rem;
}

.gh-stats-name em {
  color: var(--muted);
  font-style: normal;
  font-weight: 400;
}

.gh-stats-row {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.gh-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gh-stat strong {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--fg), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gh-stat em {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gh-stat-error {
  color: var(--muted);
  font-size: 0.85rem;
}

.gh-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.gh-lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: rgba(38, 33, 92, 0.02);
  border-radius: 999px;
  padding: 3px 10px 3px 8px;
  font-size: 0.75rem;
  color: var(--fg);
}

.gh-lang-pill em {
  font-style: normal;
  color: var(--muted);
}

.gh-lang-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.gh-lang-pill[data-lang="Rust"] .gh-lang-dot { background: #dea584; }
.gh-lang-pill[data-lang="TypeScript"] .gh-lang-dot { background: #3178c6; }
.gh-lang-pill[data-lang="JavaScript"] .gh-lang-dot { background: #f1e05a; }
.gh-lang-pill[data-lang="Python"] .gh-lang-dot { background: #4ee8b5; }
.gh-lang-pill[data-lang="HTML"] .gh-lang-dot { background: #ff6bd6; }
.gh-lang-pill[data-lang="CSS"] .gh-lang-dot { background: #8b9dff; }
.gh-lang-pill[data-lang="C#"] .gh-lang-dot { background: #a06be0; }
.gh-lang-pill[data-lang="C"] .gh-lang-dot { background: #a8b9cc; }
.gh-lang-pill[data-lang="C++"] .gh-lang-dot { background: #f47a7a; }
.gh-lang-pill[data-lang="Go"] .gh-lang-dot { background: #4ee8b5; }
.gh-lang-pill[data-lang="Shell"] .gh-lang-dot { background: #9aa2b1; }
.gh-lang-pill[data-lang="HCL"] .gh-lang-dot { background: #ff6bd6; }

.gh-account {
  margin-bottom: 40px;
}

.repo-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.repo-card {
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--bg-raised), rgba(38, 33, 92, 0.02));
  border-radius: 12px;
  padding: 18px 20px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.repo-card:hover {
  transform: translateY(-2px);
  border-color: rgba(67, 56, 202, 0.4);
}

.repo-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.repo-card-head a {
  font-weight: 700;
  font-size: 1.02rem;
}

.repo-stars {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.repo-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 8px 0;
}

.repo-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 10px;
}

.repo-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.repo-lang-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.repo-empty {
  color: var(--muted);
  font-size: 0.9rem;
  list-style: none;
}

.hero-p {
  color: var(--muted);
  max-width: 62ch;
}

.now-callout {
  display: block;
  position: relative;
  border: 1px solid rgba(15, 143, 108, 0.35);
  background: linear-gradient(145deg, rgba(15, 143, 108, 0.07), rgba(67, 56, 202, 0.05));
  border-radius: 14px;
  padding: 18px 22px 14px;
  margin: 24px 0 8px;
}

.now-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent3);
  margin-bottom: 8px;
}

.now-body {
  color: var(--fg);
  font-size: 0.92rem;
}

.now-body p:first-child {
  color: var(--muted);
  font-style: italic;
  font-size: 0.82rem;
  margin-top: 0;
}

.now-body h2 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 14px 0 6px;
}

.now-body ul {
  margin: 0 0 10px;
  padding-left: 20px;
}

.now-body li {
  margin-bottom: 4px;
}

.now-link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent3);
  margin-top: 4px;
}

.now-link:hover {
  text-decoration: underline;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--fg);
  font-size: 0.9rem;
  font-weight: 600;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.tag-pill:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.tag-count {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.78rem;
}

.tag-cloud {
  align-items: center;
}

.tag-size-0 { font-size: 0.78rem; opacity: 0.75; }
.tag-size-1 { font-size: 0.92rem; opacity: 0.85; }
.tag-size-2 { font-size: 1.08rem; opacity: 0.92; }
.tag-size-3 { font-size: 1.28rem; opacity: 0.97; }
.tag-size-4 { font-size: 1.5rem; font-weight: 800; opacity: 1; }

.tag-size-3 .tag-count,
.tag-size-4 .tag-count {
  font-size: 0.7em;
}

.tag-link {
  color: var(--accent);
  font-size: inherit;
}

.rss-link {
  color: var(--muted);
}

.rss-link:hover {
  color: var(--accent2);
  filter: drop-shadow(0 0 6px rgba(214, 51, 127, 0.6));
}

.arch-gallery {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.arch-card {
  display: block;
  position: relative;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--bg-raised), rgba(38, 33, 92, 0.02));
  border-radius: 14px;
  padding: 22px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.arch-card:hover {
  transform: translateY(-4px);
  border-color: rgba(67, 56, 202, 0.5);
  box-shadow: 0 16px 40px rgba(67, 56, 202, 0.15);
  text-decoration: none;
}

.arch-icon {
  font-size: 1.6rem;
  margin-bottom: 10px;
  display: block;
}

.arch-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--fg);
}

.arch-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.diagram-embed {
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.diagram-embed iframe {
  width: 100%;
  height: 560px;
  border: 0;
  display: block;
}

.diagram-open-full {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.diagram-open-full a {
  font-weight: 600;
}

/* Typewriter accents live on UI chrome only — body copy stays readable sans-serif. */
nav.site-nav a,
.hero .eyebrow,
.section-title,
.post-list .meta,
article.single .meta,
footer.site-footer,
.gh-stats-name em,
.gh-stat em,
.gh-lang-pill,
.now-badge,
.tag-pill,
.tag-count,
.arch-badge,
.repo-meta,
.social-links .social-text {
  font-family: var(--font-mono);
}

.arch-badge {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent2);
}

/* Newsletter signup box at the end of posts (added 2026-10-10, restyled for the light theme) */
.subscribe{margin:56px 0 12px;padding:28px;border:1px solid var(--border);border-radius:16px;
  background:linear-gradient(135deg,rgba(67,56,202,.07),rgba(214,51,127,.06)),var(--bg-raised);
  box-shadow:0 6px 24px rgba(38,33,92,.07);}
.subscribe-kicker{margin:0;font-family:var(--font-mono);font-size:.85rem;color:var(--accent2);}
.subscribe-title{margin:.3rem 0 .4rem;font-family:var(--font-display);font-style:italic;font-size:1.9rem;color:var(--fg);}
.subscribe-sub{margin:0 0 16px;color:var(--muted);}
.subscribe-form{display:flex;gap:10px;flex-wrap:wrap;max-width:520px;}
.subscribe-form input[type=email]{flex:1 1 240px;padding:12px 16px;border:1px solid var(--border);border-radius:999px;
  background:#fff;color:var(--fg);font:inherit;font-size:1rem;}
.subscribe-form input[type=email]:focus{outline:2px solid var(--accent);outline-offset:1px;}
.subscribe-form button{padding:12px 22px;border:0;border-radius:999px;background:var(--accent2);color:#fff;
  font:inherit;font-weight:700;cursor:pointer;}
.subscribe-form button:hover{filter:brightness(1.08);}
.subscribe-fine{margin:10px 0 0;font-size:.78rem;color:var(--muted);}

/* Diagrams keep a light background inside articles (code blocks are dark) */
article.single pre.mermaid{background:transparent;color:inherit;border:none;padding:0;}
