/* ==========================================================================
   Light mode — based on hexo-theme-cactus' light color scheme
   Activated by <html data-theme="light">
   ========================================================================== */

html[data-theme="light"] {
  color-scheme: light;
  border-top-color: #b9b6b2;
  --bg: #e2e0de;
  --bg-code: #d7d4d1;
  --bg-mobile: #dad8d5;
  --bg-mobile-2: #ccc9c5;
  --text: #363533;
  --text-strong: #111111;
  --muted: #666666;
  --border: #666666;
  --accent: #d44375;
  --accent-dark: #ab2251;
  --link: #1f8a65;
  --tag: #c23a67;
  --quote: #ab2251;
}

html[data-theme="light"] body {
  background-color: var(--bg);
  color: var(--text);
}

html[data-theme="light"] ::selection {
  background: rgba(188, 144, 43, 0.25);
  color: #111;
}

/* Links and typography --------------------------------------------------- */
html[data-theme="light"] .content a {
  color: var(--link);
  background-image: linear-gradient(transparent, transparent 5px, rgba(31, 138, 101, .55) 5px, rgba(31, 138, 101, .55));
}
html[data-theme="light"] .content a:hover {
  color: var(--accent-dark);
  background-image: linear-gradient(transparent, transparent 4px, var(--accent) 4px, var(--accent));
}
html[data-theme="light"] .content a.icon {
  background: none;
  color: var(--link);
}
html[data-theme="light"] .content a.icon:hover {
  background: none;
  color: var(--accent);
}

html[data-theme="light"] .content h1 a,
html[data-theme="light"] .content h2 a,
html[data-theme="light"] .content h3 a,
html[data-theme="light"] .content h4 a,
html[data-theme="light"] .content h5 a,
html[data-theme="light"] .content h6 a,
html[data-theme="light"] .content .h1 a {
  background: none;
  color: inherit;
}
html[data-theme="light"] .content h1 a:hover,
html[data-theme="light"] .content h2 a:hover,
html[data-theme="light"] .content h3 a:hover,
html[data-theme="light"] .content .h1 a:hover {
  background-image: linear-gradient(transparent, transparent 6px, var(--accent) 6px, var(--accent));
  background-position: bottom;
  background-size: 100% 6px;
  background-repeat: repeat-x;
}

html[data-theme="light"] body .h1,
html[data-theme="light"] body h1 {
  color: var(--accent);
}
html[data-theme="light"] body h2 {
  color: var(--text-strong);
}
html[data-theme="light"] body h3 {
  color: var(--text-strong);
}
html[data-theme="light"] body h4,
html[data-theme="light"] body h5,
html[data-theme="light"] body h6 {
  color: #444;
}
html[data-theme="light"] body hr {
  border-color: #999;
}
html[data-theme="light"] body th {
  color: var(--text-strong);
  border-bottom-color: var(--border);
}
html[data-theme="light"] body td {
  border-bottom-color: rgba(0, 0, 0, .12);
}

/* Header, home and lists ------------------------------------------------ */
html[data-theme="light"] #header .h1,
html[data-theme="light"] #header h1 {
  color: var(--text);
}
html[data-theme="light"] #header #nav ul a {
  color: var(--link);
}
html[data-theme="light"] #header #nav ul a:hover {
  background-image: linear-gradient(transparent, transparent 5px, var(--link) 5px, var(--link));
}
html[data-theme="light"] #header #nav ul a.active {
  border-bottom-color: var(--link);
}
html[data-theme="light"] #header #nav ul li {
  border-right-color: var(--link);
}
html[data-theme="light"] #about sup { color: var(--accent); }

html[data-theme="light"] .post-list .post-item .meta {
  color: var(--muted);
}
html[data-theme="light"] .pagination .page-number {
  color: var(--text);
}
html[data-theme="light"] .pagination a {
  color: var(--text);
}
html[data-theme="light"] .pagination a:hover {
  color: var(--text-strong);
}

/* Article ---------------------------------------------------------------- */
html[data-theme="light"] article header .meta * {
  color: var(--muted);
}
html[data-theme="light"] article header .article-readtime {
  color: #777;
}
html[data-theme="light"] article header .article-category i {
  color: var(--muted);
}
html[data-theme="light"] article .content h2:before {
  color: var(--accent);
}
html[data-theme="light"] article .content figcaption,
html[data-theme="light"] article .content .image-caption {
  color: var(--muted);
}
html[data-theme="light"] article .content blockquote {
  color: var(--quote);
}
html[data-theme="light"] article .content blockquote:before {
  color: var(--quote);
}
html[data-theme="light"] article .content blockquote footer {
  color: var(--muted);
}
html[data-theme="light"] .article-tag .tag-link,
html[data-theme="light"] .article-category .category-link {
  color: var(--text);
  background-image: linear-gradient(transparent, transparent 10px, var(--tag) 10px, var(--tag));
}
html[data-theme="light"] .article-tag .tag-link:before {
  color: var(--tag);
}
html[data-theme="light"] .post-footer {
  border-top-color: rgba(0, 0, 0, .18);
}

/* Post navigation -------------------------------------------------------- */
html[data-theme="light"] .post-nav {
  border-top-color: #b9b6b2;
}
html[data-theme="light"] .post-nav-label {
  color: var(--muted);
}
html[data-theme="light"] .post-nav-title {
  color: var(--text);
}
html[data-theme="light"] .post-nav a:hover .post-nav-title {
  color: var(--accent-dark);
}

/* Fixed post header / TOC ------------------------------------------------ */
html[data-theme="light"] #header-post a.icon:hover {
  color: var(--accent);
}
html[data-theme="light"] #header-post #menu-icon:hover,
html[data-theme="light"] #header-post #menu-icon.active,
html[data-theme="light"] #header-post #top-icon-tablet:hover {
  color: var(--accent);
}
html[data-theme="light"] #header-post #toc .toc-level-1,
html[data-theme="light"] #header-post #toc .toc-level-1:before {
  color: var(--accent);
}
html[data-theme="light"] #header-post #toc .toc-level-2 {
  color: var(--text);
}
html[data-theme="light"] #header-post #toc .toc-level-2:before {
  color: var(--accent);
}
html[data-theme="light"] #header-post #toc .toc-level-3 {
  color: var(--muted);
}
html[data-theme="light"] #header-post #toc .toc-level-4 {
  color: #888;
}
html[data-theme="light"] #header-post #toc a:hover {
  color: var(--accent-dark);
}
html[data-theme="light"] #header-post #toc li.active > a {
  color: var(--accent-dark);
}

/* Mobile bottom bar ------------------------------------------------------ */
html[data-theme="light"] #footer-post {
  border-top-color: #b9b6b2;
  background: var(--bg-mobile);
}
html[data-theme="light"] #footer-post a.icon:hover {
  color: var(--accent);
}
html[data-theme="light"] #footer-post #nav-footer {
  background: var(--bg-mobile-2);
}
html[data-theme="light"] #footer-post #nav-footer a {
  color: var(--link);
}
html[data-theme="light"] #footer-post #actions-footer a {
  color: var(--link);
}
html[data-theme="light"] #footer-post #toc-footer {
  background: var(--bg-mobile-2);
}
html[data-theme="light"] #footer-post #toc-footer a {
  color: var(--text);
}
html[data-theme="light"] #footer-post #toc-footer .toc-level-1,
html[data-theme="light"] #footer-post #toc-footer .toc-level-1:before,
html[data-theme="light"] #footer-post #toc-footer .toc-level-2:before {
  color: var(--accent);
}
html[data-theme="light"] #footer-post #toc-footer .toc-level-3 {
  color: var(--muted);
}

/* Archive / categories / tags -------------------------------------------- */
html[data-theme="light"] .archive-year {
  color: var(--accent);
  border-bottom-color: rgba(0, 0, 0, .15);
}
html[data-theme="light"] .archive-filter {
  color: var(--muted);
}
html[data-theme="light"] .category-list-item {
  border-bottom-color: rgba(0, 0, 0, .15);
}
html[data-theme="light"] .category-list-count {
  color: var(--muted);
}
html[data-theme="light"] #tag-cloud .tag-cloud-title,
html[data-theme="light"] #tag-cloud .tag-cloud-count {
  color: var(--muted);
}
html[data-theme="light"] .empty-hint {
  color: var(--muted);
}

/* Search ----------------------------------------------------------------- */
html[data-theme="light"] .search-input {
  background-color: #f5f3f1;
  border-color: #b9b6b2;
  color: var(--text);
}
html[data-theme="light"] .search-input::placeholder {
  color: #888;
}
html[data-theme="light"] .search-input:focus {
  border-color: var(--link);
}
html[data-theme="light"] #search-result a.search-result-title {
  color: var(--text);
}
html[data-theme="light"] #search-result a.search-result-title:hover {
  color: var(--link);
}
html[data-theme="light"] #search-result .search-result-meta {
  color: var(--muted);
}
html[data-theme="light"] #search-result p.search-result {
  color: #555;
}
html[data-theme="light"] #search-result em.search-keyword {
  color: var(--tag);
  border-bottom-color: var(--tag);
}
html[data-theme="light"] .search-no-result {
  color: var(--text);
}

/* Footer ----------------------------------------------------------------- */
html[data-theme="light"] #footer {
  color: var(--muted);
}
html[data-theme="light"] #footer li {
  border-color: #b9b6b2;
}
html[data-theme="light"] #footer a {
  color: var(--muted);
}
html[data-theme="light"] #footer a:hover {
  color: #333;
}
html[data-theme="light"] #footer a.active {
  color: var(--link);
}

/* Code ------------------------------------------------------------------- */
html[data-theme="light"] pre {
  border-color: #b9b6b2;
}
html[data-theme="light"] code {
  border-color: #b9b6b2;
  background: rgba(0, 0, 0, .035);
}
html[data-theme="light"] .highlight {
  background: var(--bg-code);
  color: #24292e;
}
html[data-theme="light"] .highlight code {
  background: transparent;
}
html[data-theme="light"] .highlight td.gutter {
  opacity: .45;
}
html[data-theme="light"] .highlight .btn-copy {
  color: var(--muted);
}
html[data-theme="light"] .highlight .btn-copy:hover {
  color: var(--link);
}

/* GitHub-style light syntax highlighting */
html[data-theme="light"] .highlight .comment,
html[data-theme="light"] .highlight .quote {
  color: #6a737d;
}
html[data-theme="light"] .highlight .addition,
html[data-theme="light"] .highlight .keyword,
html[data-theme="light"] .highlight .literal,
html[data-theme="light"] .highlight .selector-tag,
html[data-theme="light"] .highlight .type {
  color: #d73a49;
}
html[data-theme="light"] .highlight .number,
html[data-theme="light"] .highlight .selector-attr,
html[data-theme="light"] .highlight .selector-pseudo {
  color: #005cc5;
}
html[data-theme="light"] .highlight .doctag,
html[data-theme="light"] .highlight .regexp,
html[data-theme="light"] .highlight .string {
  color: #032f62;
}
html[data-theme="light"] .highlight .built_in,
html[data-theme="light"] .highlight .name,
html[data-theme="light"] .highlight .section,
html[data-theme="light"] .highlight .title {
  color: #6f42c1;
}
html[data-theme="light"] .highlight .class .title,
html[data-theme="light"] .highlight .selector-id,
html[data-theme="light"] .highlight .template-variable,
html[data-theme="light"] .highlight .variable {
  color: #e36209;
}
html[data-theme="light"] .highlight .bullet,
html[data-theme="light"] .highlight .link,
html[data-theme="light"] .highlight .meta,
html[data-theme="light"] .highlight .subst,
html[data-theme="light"] .highlight .symbol {
  color: #005cc5;
}
html[data-theme="light"] .highlight .deletion {
  color: #b31d28;
  background: #ffeef0;
}
html[data-theme="light"] .highlight .attr,
html[data-theme="light"] .highlight .attribute {
  color: #005cc5;
}

/* Links page ------------------------------------------------------------- */
html[data-theme="light"] .card:hover {
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, .12), 0 0 6px 0 rgba(0, 0, 0, .05);
}
html[data-theme="light"] .card .card-header a {
  background: none;
  color: var(--link);
}
html[data-theme="light"] .card .card-header a:hover {
  background: none;
  color: var(--accent);
}
html[data-theme="light"] .card .card-header .info {
  color: #777;
}

/* Theme toggle ----------------------------------------------------------- */
html[data-theme="light"] .theme-toggle {
  background: rgba(255, 255, 255, .65);
  border-color: rgba(54, 53, 51, .25);
  color: var(--link);
}
html[data-theme="light"] .theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}
html[data-theme="light"] .theme-toggle .theme-icon-sun {
  display: none;
}
html[data-theme="light"] .theme-toggle .theme-icon-moon {
  display: inline-block;
}
