/* Coder / AI vibe layer — loaded after theme.css, uses its colour variables */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root { --mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace; }

/* Animated neural-network canvas (js/dev-vibe.js) */
#neural-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* Page titles as a terminal prompt: ~/ Title▍ */
.section-title-block .section-title,
.page-title-wrap h2.page-title {
  font-family: var(--mono) !important;
  font-weight: 700 !important;
  font-size: 28px !important;
  letter-spacing: -0.02em !important;
}
.section-title-block .section-title::before {
  content: "~/";
  color: var(--accent-color);
  margin-right: 10px;
  font-weight: 500;
}
.dev-cursor {
  display: inline-block;
  width: 0.3em; height: 1em;
  margin-left: 6px;
  vertical-align: -0.12em;
  background: var(--accent-color);
  animation: dev-blink 1.1s steps(1) infinite;
}
@keyframes dev-blink { 50% { opacity: 0; } }

/* The title underline becomes a glowing accent rule */
.section-title-block.second-style .section-title:after {
  height: 2px !important;
  background: linear-gradient(90deg, var(--accent-color), rgba(var(--accent-rgb), 0.15) 70%, transparent) !important;
}

/* Section descriptions look like code comments */
.section-title-block.second-style .section-description {
  font-family: var(--mono);
  font-size: 13px !important;
  color: var(--placeholder-color) !important;
}
.section-title-block.second-style .section-description::before { content: "// "; color: var(--accent-color); }

/* Rotating subtitle on the home page: "> Applied Scientist" */
.sp-subtitle { font-family: var(--mono) !important; color: var(--accent-color) !important; }
.sp-subtitle::before { content: "> "; opacity: .7; }

/* Sidebar */
.site-title, .mobile-site-title a { font-family: var(--mono) !important; font-size: 17px; letter-spacing: -0.02em; }
.site-main-menu li a span { font-family: var(--mono); font-size: 13px; letter-spacing: 0; }
.site-main-menu li.active a { text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.55); }
.copyrights { font-family: var(--mono); font-size: 11px; }

/* Cards: thin accent glow on hover */
.blog-card, .timeline-item, .contact-card { transition: box-shadow .25s ease, border-color .25s ease; }
.blog-card:hover, .contact-card:hover {
  border-color: rgba(var(--accent-rgb), 0.55) !important;
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.35), 0 12px 40px rgba(var(--accent-rgb), 0.12) !important;
}

/* Small mono touches in the contact form */
.cf-field label { font-family: var(--mono); letter-spacing: .04em; text-transform: lowercase; }
.cf-field label::before { content: "$ "; color: var(--accent-color); }
.cf-submit { font-family: var(--mono); }
.cf-input input, .cf-input textarea { font-family: var(--mono); font-size: 14px; }

/* Inline code reads like an editor chip */
code:not(pre code) { font-family: var(--mono); background: rgba(var(--accent-rgb), .12); color: var(--accent-color); padding: 2px 6px; }

@media (prefers-reduced-motion: reduce) { .dev-cursor { animation: none; } }
@media (max-width: 767px) { .section-title-block .section-title { font-size: 22px !important; } }

/* About Me: let the neural-network background show through the page surfaces */
.pt-page[data-id="about-me"] .section-inner,
.pt-page[data-id="about-me"] .section-inner.custom-page-content,
.pt-page[data-id="about-me"] .section-inner.start-page-full-width + .section-inner.custom-page-content,
.pt-page[data-id="about-me"] .hp-text-block,
.pt-page[data-id="about-me"] .inner-content .fill-block,
body.light-theme .pt-page[data-id="about-me"] .hp-text-block,
body.light-theme .pt-page[data-id="about-me"] .page-content,
.pt-page[data-id="about-me"] .page-content {
  background-color: transparent !important;
}

/* "//" comment marker: vertically centred with the text/link and a bit larger */
.section-title-block.second-style .section-description {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.section-title-block.second-style .section-description::before {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  margin-right: 10px;
  white-space: pre;
}
.pt-page[data-id="contact"] .section-title-block .section-description { display: flex; }

/* ============ Developer panels on About Me ============ */
.dev-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin: 0 0 34px; }
.dev-window { background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden; min-width: 0; box-shadow: 0 10px 30px var(--shadow-color); }
.dev-titlebar { display: flex; align-items: center; gap: 12px; padding: 9px 14px; background: var(--bg-tertiary); border-bottom: 1px solid var(--border-color); }
.dev-dots { display: inline-flex; gap: 6px; }
.dev-dots i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f56; }
.dev-dots i:nth-child(2) { background: #ffbd2e; }
.dev-dots i:nth-child(3) { background: #27c93f; }
.dev-filename { font-family: var(--mono); font-size: 12px; color: var(--placeholder-color); }
.dev-body, .dev-code { font-family: var(--mono); font-size: 12.5px; line-height: 1.75; margin: 0; padding: 16px 18px; min-height: 270px; color: var(--text-primary); }
.dev-code { background: transparent; border: 0; border-radius: 0; overflow-x: auto; white-space: pre; }
.dev-code code { background: transparent !important; color: inherit !important; padding: 0 !important; font-family: var(--mono); font-size: inherit; }
.t-line { white-space: normal; word-break: break-word; }
.t-prompt { color: var(--accent-color); font-weight: 700; }
.t-cmd { color: var(--text-secondary); }
.t-out { padding-left: 16px; }
.t-hl { color: var(--accent-color); font-weight: 600; }
.t-dim { color: var(--placeholder-color); }
.dev-body .dev-cursor { width: 0.5em; height: 1em; }
.dev-body kbd, .cp-trigger kbd { font-family: var(--mono); font-size: 10.5px; padding: 1px 5px; border: 1px solid var(--border-color); border-bottom-width: 2px; border-radius: 4px; background: var(--bg-tertiary); color: var(--text-primary); box-shadow: none; }

/* syntax colours (readable on dark and light) */
.tk-kw { color: #c678dd; } .tk-cls { color: #e5a64a; } .tk-fn { color: #4a9eed; }
.tk-str { color: #4dbf7a; } .tk-var { color: #e06c75; } .tk-self { color: #d19a66; font-style: italic; }
.tk-cm { color: var(--placeholder-color); font-style: italic; }
body.light-theme .tk-kw { color: #8e3bb5; } body.light-theme .tk-cls { color: #a86a00; } body.light-theme .tk-fn { color: #1b64c4; }
body.light-theme .tk-str { color: #1f8a4c; } body.light-theme .tk-var { color: #c2323f; } body.light-theme .tk-self { color: #a8590e; }

@media (max-width: 900px) { .dev-grid { grid-template-columns: 1fr; } .dev-body, .dev-code { min-height: 0; } }

/* ============ Sidebar search button ============ */
.cp-trigger { display: flex; align-items: center; gap: 8px; width: calc(100% - 24px); margin: 6px 12px 12px; padding: 7px 8px; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: 8px; color: var(--placeholder-color); font-family: var(--mono); font-size: 10px; cursor: pointer; transition: border-color .2s, color .2s; }
.cp-trigger:hover { border-color: var(--accent-color); color: var(--text-secondary); }
.cp-trigger i { color: var(--accent-color); font-size: 11px; }
.cp-trigger span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============ Command palette ============ */
.cp-overlay { position: fixed; inset: 0; z-index: 10000; display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 0; background: rgba(5, 8, 14, 0.6); backdrop-filter: blur(4px); }
.cp-overlay.open { display: flex; }
.cp-box { width: 100%; max-width: 600px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 0 1px rgba(var(--accent-rgb), .25); overflow: hidden; font-family: var(--mono); }
.cp-bar { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border-color); }
.cp-prompt { color: var(--accent-color); font-weight: 700; }
.cp-input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text-secondary); font-family: var(--mono); font-size: 15px; }
.cp-input::placeholder { color: var(--placeholder-color); }
.cp-esc { font-size: 10.5px; padding: 2px 6px; border: 1px solid var(--border-color); border-radius: 4px; color: var(--placeholder-color); }
.cp-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.cp-group { padding: 10px 10px 4px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--placeholder-color); }
.cp-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; cursor: pointer; color: var(--text-primary); font-size: 13px; }
.cp-item i { width: 18px; text-align: center; color: var(--placeholder-color); }
.cp-item .cp-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-item .cp-hint { font-size: 11px; color: var(--placeholder-color); white-space: nowrap; }
.cp-item.active { background: rgba(var(--accent-rgb), .14); color: var(--text-secondary); }
.cp-item.active i { color: var(--accent-color); }
.cp-empty { padding: 22px 12px; text-align: center; color: var(--placeholder-color); font-size: 13px; }
.cp-foot { padding: 9px 16px; border-top: 1px solid var(--border-color); font-size: 11px; color: var(--placeholder-color); }

.cp-trigger kbd { font-size: 9px; padding: 0 4px; }

/* rashad.py replaces the bullet list in the intro; terminal below goes full width */
.dev-grid-single { grid-template-columns: 1fr; margin: 18px 0 0; }
.dev-grid-single .dev-code { min-height: 0; }
.dev-grid:not(.dev-grid-single) { grid-template-columns: 1fr; }

/* make the rashad.py block more compact */
.dev-grid-single .dev-code { font-size: 11.5px; line-height: 1.55; padding: 10px 14px; }
.dev-grid-single .dev-titlebar { padding: 6px 12px; }
.dev-grid-single .dev-window { max-width: 640px; }

/* rashad.py: smaller still */
.dev-grid-single .dev-code { font-size: 10.5px; line-height: 1.45; padding: 8px 12px; }
.dev-grid-single .dev-titlebar { padding: 5px 10px; }
.dev-grid-single .dev-filename { font-size: 11px; }
.dev-grid-single .dev-dots i { width: 8px; height: 8px; }
.dev-grid-single .dev-window { max-width: 540px; }

/* About Me: slightly smaller name, image nudged down */
.pt-page[data-id="about-me"] .hp-main-title { font-size: 30px; }
.pt-page[data-id="about-me"] .hp-main-title img { position: relative; top: 14px; }

/* rashad.py: a bit wider */
.dev-grid-single .dev-window { max-width: 680px; }

.name-accent { color: var(--accent-color); }

/* Greeting: logo sits beside "Hi there" */
.hp-greeting { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.hp-greeting h4 { margin: 0; }
.hp-greeting-logo { height: 64px; width: auto; flex: 0 0 auto; }

/* rashad.py: less tall */
.dev-grid-single .dev-code { line-height: 1.32; padding: 6px 12px; }
.dev-grid-single .dev-titlebar { padding: 4px 10px; }
.dev-grid-single { margin-top: 10px; }

/* Greeting + logo now sit above the hero photo (left column) */
.hp-greeting { margin: 28px 5% 0; flex-wrap: wrap; gap: 8px 12px; }
.hp-greeting h4 { font-size: 16px; line-height: 1.4; }
.hp-greeting-logo { height: 48px; }
.pt-page[data-id="about-me"] .section-inner.start-page-full-width .inner-content .fill-block::before { margin-top: 14px; }

/* Logo in the sidebar, under the search button */
.sidebar-logo { text-align: center; margin: 4px 0 6px; }
.sidebar-logo img { height: 46px; width: auto; }

/* rashad.py: slightly larger font */
.dev-grid-single .dev-code { font-size: 12px; }

/* Desktop: rashad.py stretches so its bottom lines up with the bottom of the photo */
@media only screen and (min-width: 992px) {
  .pt-page[data-id="about-me"] .hp-text-block .dev-grid-single { flex: 1; display: flex; margin-bottom: 0; }
  .pt-page[data-id="about-me"] .hp-text-block .dev-grid-single .dev-window { display: flex; flex-direction: column; width: 100%; max-width: 680px; }
  .pt-page[data-id="about-me"] .hp-text-block .dev-grid-single .dev-code { flex: 1; }
}

/* Desktop: the photo stretches (cover-cropped) so its bottom edge matches rashad.py's bottom edge */
@media only screen and (min-width: 992px) {
  .pt-page[data-id="about-me"] .start-page-full-width .inner-content:has(> .fill-block) { display: flex; flex-direction: column; }
  .pt-page[data-id="about-me"] .start-page-full-width .inner-content > .fill-block {
    flex: 1 1 auto; align-self: stretch; display: flex; flex-direction: column; height: auto;
  }
  .pt-page[data-id="about-me"] .section-inner.start-page-full-width .inner-content .fill-block::before {
    flex: 1 1 auto; aspect-ratio: auto; height: auto; min-height: 280px;
    background-size: cover; background-position: 50% 12%;
  }
}

/* ================= Mobile / tablet ================= */
.cp-mobile-btn { display: none; }
body { overflow-x: hidden; }
img { max-width: 100%; }

@media only screen and (max-width: 991px) {
  /* header bar: fit title + search + theme + menu buttons */
  .cp-mobile-btn { display: flex; align-items: center; justify-content: center; position: absolute; top: 9px; right: 105px; width: 32px; height: 32px; background: transparent; border: 1px solid var(--border-color); border-radius: 0; color: var(--accent-color); font-size: 14px; cursor: pointer; z-index: 2; }
  .mobile-site-title { max-width: calc(100vw - 215px); }
  .mobile-site-title a { font-size: 13px !important; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-header-image img { max-height: 30px; margin: 10px 8px 10px 0; }

  /* drawer: search button + logo */
  .cp-trigger { display: flex; }
  .cp-trigger { font-size: 12px; padding: 9px 10px; }
  .cp-trigger kbd { display: none; }
  .sidebar-logo img { height: 40px; }

  /* about page */
  .hp-greeting { margin: 20px 5% 0; }
  .dev-grid-single .dev-window { max-width: 100%; }
  .dev-grid-single .dev-code { font-size: 11px; }
  .pt-page[data-id="about-me"] .hp-text-block .dev-grid-single { display: block; }

  /* titles */
  .section-title-block.second-style .section-description { flex-wrap: wrap; justify-content: flex-start; }
  .pt-page[data-id="publications"] .section-title-block .section-description { margin-top: 8px; }
}

@media only screen and (max-width: 600px) {
  /* 16px inputs stop iOS zooming into the contact form */
  .cf-input input, .cf-input textarea { font-size: 16px; }
  .cp-input { font-size: 16px; }
  .cp-overlay { padding-top: 8vh; }
  .cp-item .cp-hint { display: none; }
  .cp-foot { display: none; }
  .contact-side h3 { font-size: 22px; }
  .cf-actions { flex-direction: column; align-items: stretch; }
  .cf-submit { justify-content: center; }
  .dev-titlebar { padding: 6px 10px; }
}

/* contact page title row: description must not collide with the title on narrow screens */
@media only screen and (max-width: 480px) {
  .pt-page[data-id="contact"] .section-title-block .section-description { position: static; margin-top: 6px; justify-content: flex-start; }
}

/* ===== Day / night toggle: always visible, top right ===== */
#theme-toggle {
  display: flex !important;
  position: fixed !important;
  top: 12px; right: 14px; left: auto;
  width: 36px; height: 36px; min-width: 36px; min-height: 36px;
  z-index: 10001;
  visibility: visible !important; opacity: 1 !important; margin: 0 !important;
}
@media only screen and (max-width: 991px) {
  /* sits just left of the hamburger inside the 50px mobile header */
  #theme-toggle { top: 9px; right: 62px; width: 32px; height: 32px; min-width: 32px; min-height: 32px; }
  .cp-mobile-btn { right: 102px; }
  .mobile-site-title { max-width: calc(100vw - 225px); }
}

/* ===== Blog posts: readable text in the dark theme ===== */
body:not(.light-theme) .entry-content,
body:not(.light-theme) .entry-content p,
body:not(.light-theme) .entry-content ul,
body:not(.light-theme) .entry-content ol,
body:not(.light-theme) .entry-content li,
body:not(.light-theme) .entry-content td,
body:not(.light-theme) .entry-content blockquote,
body:not(.light-theme) .note-box,
body:not(.light-theme) .note-box li { color: var(--text-primary) !important; }

body:not(.light-theme) .post-content strong,
body:not(.light-theme) .entry-content strong,
body:not(.light-theme) .entry-content b { color: var(--text-secondary) !important; }

body:not(.light-theme) .entry-content h3,
body:not(.light-theme) .entry-content h4,
body:not(.light-theme) .entry-content h5,
body:not(.light-theme) .model-comparison-table th,
body:not(.light-theme) .note-box strong { color: var(--accent-color) !important; }

body:not(.light-theme) .entry-content code:not(pre code),
body:not(.light-theme) .note-box code { color: var(--accent-hover) !important; background-color: rgba(var(--accent-rgb), .14) !important; }

body:not(.light-theme) .model-comparison-table td { color: var(--text-primary) !important; border-bottom-color: var(--border-color); }
body:not(.light-theme) .model-comparison-table th { border-bottom-color: var(--accent-color); }
body:not(.light-theme) .entry-content a { color: var(--accent-hover); }
body:not(.light-theme) .highlight-text { color: var(--text-secondary); background-color: rgba(var(--accent-rgb), .22); }
body:not(.light-theme) .entry-meta a,
body:not(.light-theme) .post-timestamp,
body:not(.light-theme) .post-read-time,
body:not(.light-theme) .post-author { color: var(--text-primary); }
body:not(.light-theme) .meta-separator { color: var(--text-primary); }

/* ===== Blog: tags, table of contents, reading progress ===== */
#read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 10002; opacity: 0; background: linear-gradient(90deg, var(--accent-color), var(--accent-hover)); box-shadow: 0 0 10px rgba(var(--accent-rgb), .6); transition: width .1s linear, opacity .2s; pointer-events: none; }
.post-toc { margin: 0 0 28px; padding: 14px 18px; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-left: 3px solid var(--accent-color); font-family: var(--mono); }
.post-toc .toc-title { cursor: pointer; font-size: 12px; color: var(--accent-color); user-select: none; }
.post-toc .toc-title::after { content: " ▾"; }
.post-toc.collapsed .toc-title::after { content: " ▸"; }
.post-toc.collapsed ol { display: none; }
.post-toc ol { margin: 10px 0 0; padding-left: 20px; }
.post-toc li { margin: 5px 0; font-size: 13px; line-height: 1.5; }
.post-toc a { color: var(--text-primary) !important; text-decoration: none !important; }
.post-toc a:hover { color: var(--accent-color) !important; }
.entry-content h3[id] { scroll-margin-top: 16px; }

/* ===== GitHub activity (Resume) ===== */
.gh-section { margin-top: 24px; }
.gh-summary { font-family: var(--mono); font-size: 13px; color: var(--placeholder-color); margin: 0 0 12px; min-height: 18px; }
.gh-heatmap-wrap { overflow-x: auto; padding-bottom: 6px; }
.gh-heatmap { display: grid; grid-template-rows: repeat(7, 11px); grid-auto-flow: column; grid-auto-columns: 11px; gap: 3px; width: max-content; }
.gh-cell { display: block; width: 11px; height: 11px; background: var(--bg-tertiary); border-radius: 2px; }
.gh-cell.pad { background: transparent; }
.gh-cell.l1, .gh-legend .l1 { background: rgba(var(--accent-rgb), .28); }
.gh-cell.l2, .gh-legend .l2 { background: rgba(var(--accent-rgb), .5); }
.gh-cell.l3, .gh-legend .l3 { background: rgba(var(--accent-rgb), .75); }
.gh-cell.l4, .gh-legend .l4 { background: var(--accent-color); }
.gh-legend { display: flex; align-items: center; gap: 4px; margin: 10px 0 22px; font-family: var(--mono); font-size: 11px; color: var(--placeholder-color); }
.gh-legend i { display: block; width: 11px; height: 11px; border-radius: 2px; background: var(--bg-tertiary); }
.gh-legend span:first-child { margin-right: 4px; } .gh-legend span:last-child { margin-left: 4px; }
.gh-repos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 18px; }
.gh-repo { display: block; padding: 14px 16px; background: var(--bg-tertiary); border: 1px solid var(--border-color); text-decoration: none !important; transition: border-color .2s, transform .2s; }
.gh-repo:hover { border-color: var(--accent-color); transform: translateY(-2px); }
.gh-repo-name { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--accent-color); display: flex; align-items: center; gap: 8px; overflow: hidden; }
.gh-repo-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gh-repo-desc { margin: 8px 0 10px; font-size: 13px; line-height: 1.5; color: var(--text-primary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gh-repo-meta { display: flex; flex-wrap: wrap; gap: 12px; font-family: var(--mono); font-size: 11px; color: var(--placeholder-color); }
.gh-more { font-family: var(--mono); font-size: 13px; color: var(--accent-color) !important; }

/* ===== Word-by-word intro streaming ===== */
.tok { opacity: 0; filter: blur(4px); transition: opacity .25s ease, filter .25s ease; white-space: pre-wrap; }
.tok.on { opacity: 1; filter: none; }

/* ===== Theme switch "compile" transition ===== */
#theme-flash { position: fixed; inset: 0; z-index: 20000; display: flex; align-items: center; justify-content: center; background: #0b0e14; opacity: 0; pointer-events: none; transition: opacity .16s ease; }
#theme-flash.show { opacity: 1; pointer-events: all; }
#theme-flash.hide { opacity: 0; transition: opacity .4s ease; }
#theme-flash .tf-text { font-family: var(--mono); font-size: 15px; color: #2dd4bf; text-shadow: 0 0 14px rgba(45, 212, 191, .6); }
#theme-flash .tf-text::after { content: "▍"; margin-left: 4px; animation: dev-blink 1s steps(1) infinite; }

/* Pinned repositories */
.gh-pinned-block { margin-bottom: 8px; }
.gh-pin { border-left: 3px solid var(--accent-color); }
.gh-lang::first-letter { color: var(--lang, var(--accent-color)); }
.gh-pin .gh-repo-desc { -webkit-line-clamp: 3; }

/* Compact table of contents */
.post-toc { margin: 0 0 20px; padding: 8px 12px; border-left-width: 2px; }
.post-toc .toc-title { font-size: 11px; }
.post-toc ol { margin: 6px 0 0; padding-left: 18px; column-width: 240px; column-gap: 24px; }
.post-toc li { margin: 2px 0; font-size: 12px; line-height: 1.4; break-inside: avoid; }

/* Blog post page: title + content sit higher, title a bit smaller */
.pt-page[data-id="blog"] .section-inner { padding-top: 24px; }
.pt-page[data-id="blog"] .section-title-block.second-style { margin-bottom: 14px; }
#blog-post-view .block-title { margin-bottom: 8px; }
#blog-post-view .block-title h3, #blog-post-view .block-title a { margin-bottom: 0; }
.post .entry-title { font-size: 27px; margin: 0 0 8px; }
.post .entry-header { padding-bottom: 12px; margin-bottom: 16px; }
.post .post-author { margin-top: 2px; }
.post .post-thumbnail img { margin-bottom: 12px; }
.post .post-content, .single-page-content .post-content { margin-top: 0; }
@media (max-width: 576px) { .post .entry-title { font-size: 22px; } }

/* Blog post body text: slightly smaller */
.post .entry-content p, .post .entry-content li, .entry-content p, .entry-content li { font-size: 15.5px; line-height: 1.75; }
.post .entry-content h3 { font-size: 1.4em; }
.post .entry-content table { font-size: 13.5px; }
@media (max-width: 576px) { .post .entry-content p, .post .entry-content li { font-size: 14.5px; } }

/* Blog post: pull the title (and everything after it) up a little */
#blog-post-view .block-title { margin-bottom: 0; }
#blog-post-view .post .post-content { margin-top: -14px !important; padding-top: 0 !important; }
#blog-post-view .post .entry-header { padding-top: 0; margin-top: 0; }

/* "Back to posts" lines up with the left edge of the page title; the post text stays centred */
#blog-post-view { max-width: none; margin: 0; }
#blog-post-content { max-width: 800px; margin: 0 auto; }

/* Back-to-posts button: slightly smaller (overrides inline styles) */
#blog-post-back { padding: 4px 12px !important; font-size: 12px !important; gap: 5px !important; }
#blog-post-back i { font-size: 10px !important; }

/* Post meta on a single line: date · read time · author */
.post .entry-header { display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; }
.post .entry-header > *:not(.post-meta):not(.post-author) { flex: 0 0 100%; }
.post .post-meta, .post .post-author { margin: 0 !important; font-size: 12px !important; gap: 4px 10px; }
.post .post-timestamp, .post .post-read-time, .post .post-author, .post .meta-separator { font-size: 12px !important; }
.post .post-meta i, .post .post-author i { font-size: 11px !important; margin-right: 4px; }
.post .post-author::before { content: "·"; margin-right: 10px; opacity: .5; }

/* ===== Blog post footer ===== */
.blog-share-section { display: flex !important; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 40px 0 0 !important; padding: 12px 16px !important; text-align: left !important; background: var(--bg-tertiary) !important; border: 1px solid var(--border-color) !important; border-left: 3px solid var(--accent-color) !important; }
.blog-share-section .share-title { margin: 0 !important; text-align: left !important; font-family: var(--mono); font-size: 12px !important; font-weight: 600; color: var(--accent-color) !important; }
.blog-share-section .share-title::before { content: "// "; opacity: .7; }
.blog-share-section .share-buttons { gap: 6px; }
.blog-share-section .share-btn { width: 32px; height: 32px; margin: 0; border-radius: 0; background: var(--bg-primary) !important; border: 1px solid var(--border-color); color: var(--text-primary) !important; transition: background .2s, color .2s, border-color .2s, transform .15s; }
.blog-share-section .share-btn i { line-height: 30px; font-size: 13px; }
.blog-share-section .share-twitter i { color: #1d9bf0 !important; }
.blog-share-section .share-linkedin i { color: #0a66c2 !important; }
.blog-share-section .share-facebook i { color: #1877f2 !important; }
.blog-share-section .share-reddit i { color: #ff4500 !important; }
.blog-share-section .share-email i { color: #ea4335 !important; }
.blog-share-section .share-copy i { color: #2dd4bf !important; }
.blog-share-section .share-btn:hover i { color: #fff !important; }
.blog-share-section .share-btn:hover { color: #fff !important; transform: translateY(-2px); }
.share-twitter:hover { background: #1d9bf0 !important; border-color: #1d9bf0 !important; }
.share-linkedin:hover { background: #0a66c2 !important; border-color: #0a66c2 !important; }
.share-facebook:hover { background: #1877f2 !important; border-color: #1877f2 !important; }
.share-reddit:hover { background: #ff4500 !important; border-color: #ff4500 !important; }
.share-email:hover, .share-copy:hover { background: var(--accent-color) !important; border-color: var(--accent-color) !important; }

.post-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 12px; padding: 16px; border: 1px solid var(--border-color); border-top: 0; background: var(--card-bg); }
.pf-author { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pf-author img { width: 44px; height: 44px; object-fit: cover; border: 2px solid var(--accent-color); border-radius: 0 !important; margin: 0 !important; }
.pf-text { display: flex; flex-direction: column; min-width: 0; }
.pf-text strong { color: var(--text-secondary) !important; font-size: 14px; }
.pf-text span { font-family: var(--mono); font-size: 11.5px; color: var(--placeholder-color); }
.pf-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; font-family: var(--mono); font-size: 12px; color: var(--accent-color); background: transparent; border: 1px solid var(--accent-color); border-radius: 0; cursor: pointer; transition: background .2s, color .2s; }
.pf-btn:hover { background: var(--accent-color); color: #fff; }
@media (max-width: 576px) { .blog-share-section, .post-footer { flex-direction: column; align-items: flex-start; } }

/* Resume: university names styled exactly like company names (bold, same font) */
.timeline-second-style .item-company-name,
.timeline-second-style span.item-company-name,
.timeline-second-style h6.item-company-name {
  font-family: Poppins, "Inter", Helvetica, sans-serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.45em;
}

/* Theme toggle: slightly smaller */
#theme-toggle { width: 30px; height: 30px; min-width: 30px; min-height: 30px; }
#theme-toggle i { font-size: 14px; }
@media only screen and (max-width: 991px) {
  #theme-toggle { top: 10px; right: 62px; width: 28px; height: 28px; min-width: 28px; min-height: 28px; }
  #theme-toggle i { font-size: 13px; }
}

/* ===== Token meter ===== */
.tm-chip { position: fixed; right: 14px; bottom: 14px; z-index: 9000; display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; font-family: var(--mono); font-size: 11.5px; color: var(--text-primary); background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 0; cursor: pointer; box-shadow: 0 6px 20px var(--shadow-color); transition: border-color .2s, color .2s; }
.tm-chip:hover { border-color: var(--accent-color); color: var(--text-secondary); }
.tm-chip i { color: var(--accent-color); font-size: 12px; }
.tm-panel { position: fixed; right: 14px; bottom: 54px; z-index: 9001; width: 340px; max-width: calc(100vw - 28px); max-height: 72vh; overflow-y: auto; padding: 14px 16px 12px; display: none; background: var(--card-bg); border: 1px solid var(--border-color); border-left: 3px solid var(--accent-color); box-shadow: 0 20px 60px rgba(0, 0, 0, .45); font-family: var(--mono); color: var(--text-primary); }
.tm-panel.open { display: block; }
.tm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tm-title { font-size: 12px; font-weight: 600; color: var(--accent-color); }
.tm-x { background: transparent; border: 0; color: var(--placeholder-color); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; }
.tm-x:hover { color: var(--text-secondary); }
.tm-big { display: flex; align-items: baseline; gap: 8px; }
.tm-num { font-size: 28px; font-weight: 700; color: var(--text-secondary); letter-spacing: -.02em; }
.tm-unit { font-size: 12px; color: var(--placeholder-color); }
.tm-sub { margin-top: 2px; font-size: 11px; color: var(--placeholder-color); }
.tm-mode { margin: 4px 0 12px; font-size: 10.5px; color: var(--accent-color); opacity: .85; }
.tm-ctx { margin-bottom: 12px; }
.tm-ctx-row { display: grid; grid-template-columns: 82px 1fr 44px; align-items: center; gap: 8px; margin: 5px 0; font-size: 11px; }
.tm-bar, .tm-sec-bar { height: 5px; background: var(--bg-tertiary); }
.tm-bar i, .tm-sec-bar i { display: block; height: 100%; background: var(--accent-color); }
.tm-ctx-pct { text-align: right; color: var(--text-secondary); }
.tm-label { margin: 4px 0 6px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--placeholder-color); }
.tm-secs { max-height: 200px; overflow-y: auto; margin-bottom: 10px; }
.tm-sec { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; padding: 6px 4px; text-align: left; font-family: var(--mono); background: transparent; border: 0; border-bottom: 1px solid var(--border-color); color: var(--text-primary); cursor: pointer; }
.tm-sec:hover { background: rgba(var(--accent-rgb), .08); }
.tm-sec-name { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-sec-n { font-size: 11.5px; color: var(--text-secondary); }
.tm-sec-bar { grid-column: 1 / -1; height: 3px; }
.tm-acts { display: flex; flex-direction: column; gap: 6px; }
.tm-btn { padding: 7px 10px; font-family: var(--mono); font-size: 11.5px; color: var(--accent-color); background: transparent; border: 1px solid var(--accent-color); border-radius: 0; cursor: pointer; transition: background .2s, color .2s; }
.tm-btn:hover:not(:disabled) { background: var(--accent-color); color: #fff; }
.tm-btn:disabled { opacity: .6; cursor: progress; }
.tm-note { margin-top: 8px; font-size: 10px; line-height: 1.5; color: var(--placeholder-color); }
@media (max-width: 576px) { .tm-chip { right: 10px; bottom: 10px; font-size: 11px; } .tm-panel { right: 10px; bottom: 48px; } }

/* Token chip: top-right, beside the theme toggle */
.tm-chip { top: 12px; right: 52px; bottom: auto; height: 30px; padding: 0 11px; }
.tm-panel { top: 52px; right: 14px; bottom: auto; max-height: calc(100vh - 70px); }
@media only screen and (max-width: 991px) {
  .tm-chip { top: 10px; right: 138px; height: 28px; padding: 0 8px; font-size: 11px; z-index: 10001; }
  .tm-chip-word { display: none; }
  .tm-panel { top: 56px; right: 10px; }
  .mobile-site-title { max-width: calc(100vw - 275px); }
}

/* Footer copyright: one line, small */
.header .copyrights, .copyrights { white-space: nowrap; font-size: 9.5px !important; letter-spacing: 0; padding-left: 4px; padding-right: 4px; text-align: center; }

/* ===== Private analytics dashboard ===== */
.an-card { padding: 16px 18px; margin-bottom: 16px; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-left: 3px solid var(--accent-color); }
.an-card[hidden], #an-dash[hidden] { display: none; }
.an-card h3 { margin: 0 0 8px; font-size: 18px; }
.an-card ol { padding-left: 20px; line-height: 1.7; font-size: 14px; }
.an-card-title { margin-bottom: 10px; font-family: var(--mono); font-size: 12px; color: var(--accent-color); }
.an-muted { font-size: 13px; color: var(--placeholder-color); }
.an-error { margin-top: 10px; font-size: 13px; color: #e5484d; font-family: var(--mono); }
.an-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; font-family: var(--mono); font-size: 13px; color: #fff; background: var(--accent-color); border: 0; border-radius: 0; cursor: pointer; }
.an-btn:hover { background: var(--accent-hover); }
.an-small { padding: 6px 12px; font-size: 12px; background: transparent; color: var(--accent-color); border: 1px solid var(--accent-color); }
.an-small:hover { background: var(--accent-color); color: #fff; }
.an-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.an-range { display: flex; gap: 6px; }
.an-range button { padding: 6px 12px; font-family: var(--mono); font-size: 12px; color: var(--text-primary); background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: 0; cursor: pointer; }
.an-range button.on { color: #fff; background: var(--accent-color); border-color: var(--accent-color); }
.an-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.an-kpi { padding: 14px 16px; background: var(--bg-tertiary); border: 1px solid var(--border-color); }
.an-kpi-n { font-size: 26px; font-weight: 700; color: var(--text-secondary); letter-spacing: -.02em; }
.an-kpi-l { margin-top: 2px; font-family: var(--mono); font-size: 11px; color: var(--placeholder-color); }
.an-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.an-grid .an-card { margin-bottom: 0; }
.an-chart svg { width: 100%; height: auto; display: block; }
.an-grid-line { stroke: var(--border-color); stroke-width: 1; }
.an-axis { fill: var(--placeholder-color); font-size: 10px; font-family: var(--mono); }
.an-line { fill: none; stroke-width: 2; stroke-linejoin: round; }
.an-line-0 { stroke: var(--accent-color); }
.an-line-1 { stroke: #c084fc; }
.an-legend { display: flex; gap: 16px; margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--placeholder-color); }
.an-lg::before { content: ""; display: inline-block; width: 10px; height: 3px; margin-right: 6px; vertical-align: middle; background: var(--accent-color); }
.an-lg-1::before { background: #c084fc; }
.an-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 6px 0; border-bottom: 1px solid var(--border-color); font-size: 13px; }
.an-row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); }
.an-row-n { font-family: var(--mono); color: var(--text-secondary); }
.an-row-bar { grid-column: 1 / -1; height: 3px; background: var(--bg-primary); }
.an-row-bar i { display: block; height: 100%; background: var(--accent-color); }
