/* =========================================================
   Biljana Zobenica - Light / Dark mode
   ========================================================= */

html {
  color-scheme: light;
}

html.dark-mode {
  color-scheme: dark;
}

body,
section,
footer,
.bg-light {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

html.dark-mode body {
  background-color: #12161c;
  color: #e7eaf0;
}

html.dark-mode header.masthead {
  position: relative;
}

html.dark-mode header.masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 12, 0.08);
  z-index: 0;
}

html.dark-mode header.masthead > * {
  position: relative;
  z-index: 1;
}

html.dark-mode .bg-light {
  background-color: #1b2028 !important;
}

html.dark-mode .text-muted,
html.dark-mode .text-secondary {
  color: #b7beca !important;
}

html.dark-mode h1,
html.dark-mode h2,
html.dark-mode h3,
html.dark-mode h4,
html.dark-mode h5,
html.dark-mode h6,
html.dark-mode p,
html.dark-mode li,
html.dark-mode .timeline-heading,
html.dark-mode .timeline-body {
  color: #e7eaf0;
}

html.dark-mode a:not(.btn):not(.nav-link) {
  color: #f05a5a;
}

html.dark-mode .portfolio-caption,
html.dark-mode .portfolio-item .portfolio-link {
  background-color: #1b2028;
}

html.dark-mode .portfolio-caption-heading,
html.dark-mode .portfolio-caption-subheading {
  color: #e7eaf0 !important;
}

.timeline-panel {
  background-color: transparent !important;
}

html.dark-mode .timeline-panel {
  background-color: transparent !important;
  border-color: #343b46;
}

html.dark-mode .timeline-panel:before {
  border-left-color: #343b46;
}

html.dark-mode .timeline-panel:after {
  border-left-color: transparent;
}

html.dark-mode hr {
  border-color: #343b46;
}

html.dark-mode footer {
  background-color: #0d1014 !important;
}

html.dark-mode .footer-col,
html.dark-mode .footer-col p,
html.dark-mode footer .quicklinks a {
  color: #c8ced8 !important;
}

html.dark-mode #contact {
  background-color: #212529;
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-left: 12px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(33, 37, 41, .04);
  color: #212529;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
  vertical-align: middle;
}

.navbar-nav .nav-item:last-child {
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background: rgba(33, 37, 41, .08);
  transform: scale(1.05);
}

.theme-toggle:focus {
  outline: 2px solid #fed136;
  outline-offset: 2px;
}

.theme-toggle .theme-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border-radius: 50%;
  background: rgba(33, 37, 41, .05);
  transition: opacity .18s ease, color .18s ease, background-color .18s ease;
}

.theme-toggle .theme-icon-moon {
  color: #1d1d1f;
  opacity: 1;
}

.theme-toggle .theme-icon-sun {
  color: #f0c14b;
  opacity: 0;
}

html:not(.dark-mode) .theme-toggle {
  border: none;
  background: rgba(33, 37, 41, .05);
}

html:not(.dark-mode) .theme-toggle .theme-icon-moon {
  opacity: 1;
}

html:not(.dark-mode) .theme-toggle .theme-icon-sun {
  opacity: 0;
}

html.dark-mode .theme-toggle,
html.dark-mode #mainNav.navbar-shrink .theme-toggle {
  border: none;
  background: rgba(255,255,255,.08);
}

html.dark-mode .theme-toggle .theme-icon-moon {
  opacity: 0;
}

html.dark-mode .theme-toggle .theme-icon-sun {
  opacity: 1;
}

#mainNav.navbar-shrink .theme-toggle {
  width: 37.8px;
  height: 37.8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.35);
}

#mainNav.navbar-shrink .theme-toggle .theme-icon {
  background: transparent;
  font-size: 14.4px;
}

#mainNav.navbar-shrink .theme-toggle .theme-icon-moon {
  color: #f5f7fa;
  opacity: 1;
}

#mainNav.navbar-shrink .theme-toggle .theme-icon-sun {
  color: #f5f7fa;
  opacity: 0;
}

html:not(.dark-mode) #mainNav.navbar-shrink .theme-toggle .theme-icon-moon {
  opacity: 1;
}

html:not(.dark-mode) #mainNav.navbar-shrink .theme-toggle .theme-icon-sun {
  opacity: 0;
}

html.dark-mode #mainNav.navbar-shrink .theme-toggle .theme-icon-moon {
  opacity: 0;
}

html.dark-mode #mainNav.navbar-shrink .theme-toggle .theme-icon-sun {
  opacity: 1;
  color: #f5f7fa;
}

html.dark-mode .theme-toggle:hover,
#mainNav.navbar-shrink .theme-toggle:hover {
  background: rgba(255,255,255,.12);
}

@media (max-width: 991px) {
  .theme-toggle {
    margin: 8px 15px 12px auto;
  }
}
