/*** From Kev Quirk ***/
.post-link {
  font-size: 1.6rem;
  font-weight: bold;
}

.meta {
  color: var(--text-light);
  font-size: 1rem;
  margin: 1rem 0 0.5rem 0.1rem;
}

nav a.current {
  color: var(--accent) !important;
  border-color: var(--accent) !important;
}

.medium {
  font-size: 1.4rem;
}

/*** For Bludit ***/
body {
  grid-template-columns: 1fr min(65rem, 90%) 1fr;
  transition: background-color 0.5s ease, color 0.5s ease;
}

.small {
  font-size: smaller;
}

.wrapper {
  display: flex;
  gap: 1rem;
  margin-top: 3rem;
}

/** Header **/
.site-logo {
  width: 10rem;
  height: 10rem;
  object-fit: cover;
  opacity: 0.85;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  vertical-align: middle;
}

header > a, header > a:visited {
  color: inherit;
  text-decoration: none;
}

header > a:hover {
  color: var(--accent);
  .site-logo {
    opacity: 1;
    outline: 3px solid var(--accent);
  }
}

/** Main **/
main {
  min-width: 66%;
  padding-top: 0;
}

main h2 {
  margin-top: 0;
}

article h2, .cover-image + h2 {
  margin: 1rem 0;
}

article + nav {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
}

.blog-item {
  margin-bottom: 1rem;
}

.meta-icon {
  vertical-align: middle;
  transform: translateY(-10%);
}

.meta-icon:not(:first-child) {
  margin-left: 1rem;
}

.meta-tag {
  margin: 0 0.1rem;
  font-size: smaller;
}

.meta-profile-picture {
  border-radius: 50%;
  float: left;
}

.cover-image {
  display: flex;
  margin: 0 auto;
  width: 100%;
  object-fit: cover;
}

/** Sidebar **/
aside {
  min-width: 30%;
}

/* Pagination */
a.active {
  font-weight: bolder;
  color: var(--text);
  text-decoration: none;
}

/** Footer **/
footer ul {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    list-style: none;
    font-size: x-large;
    padding: 0;
}

footer ul li img {
	max-width: 1.375rem;
	min-height: 1.375rem;
	aspect-ratio: 1 / 1;
  padding: 0.1rem;
  border-radius: 40%;
}

/* Socials */
.social a {
  display: block;
  background-color: #f5f7ff;
  height: 2.5rem;
  width: 2.5rem;
  border-radius: 50%;
  position: relative;
}

.social a::after {
  z-index: 1;
  content: '';
  display: block;
  height: 1.4rem;
  width: 1.4rem;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  position: absolute;
  left: 50%;
  right: 0;
  top: 50%;
}

.social a:hover {
  background-color: var(--marked);
}

.social span {
  clip      : rect(1px, 1px, 1px, 1px);
  clip-path : inset(50%);
  height    : 1px;
  width     : 1px;
  margin    : -1px;
  overflow  : hidden;
  padding   : 0;
  border    : 0;
  position  : absolute;
}

.social .social-bluesky a::after {
  background-image: url(../img/socials/bluesky.svg);
}

.social .social-codepen a::after {
  background-image: url(../img/socials/codepen.svg);
}

.social .social-facebook a::after {
  background-image: url(../img/socials/facebook.svg);
}

.social .social-github a::after {
  background-image: url(../img/socials/github.svg);
}

.social .social-gitlab a::after {
  background-image: url(../img/socials/gitlab.svg);
}

.social .social-googleplus a::after {
  background-image: url(../img/socials/googleplus.svg);
}

.social .social-instagram a::after {
  background-image: url(../img/socials/instagram.svg);
}

.social .social-linkedin a::after {
  background-image: url(../img/socials/linkedin.svg);
}

.social .social-mastodon a::after {
  background-image: url(../img/socials/mastodon.svg);
}

.social .social-rss a::after {
  background-image: url(../img/socials/rss.svg);
}

.social .social-telegram a::after {
  background-image: url(../img/socials/telegram.svg);
}

.social .social-twitter a::after {
  background-image: url(../img/socials/twitter.svg);
}

.social .social-xing a::after {
  background-image: url(../img/socials/xing.svg);
}

.social .social-youtube a::after {
  background-image: url(../img/socials/youtube.svg);
}

/* From blogx theme */
.plugin {
	margin-top: 3rem;
}

.plugin-label {
	font-size: 1em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.plugin ul {
	list-style: none;
	padding: 0 0 0 10px;
}

/* Zoekwidget — input en knop als één geheel */
.plugin form,
.plugin-search form,
.search-plugin-form,
form.search-plugin-form {
	display: flex !important;
	flex-direction: row !important;
	border: 1px solid var(--border);
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 0;
}

.plugin form input[type="search"],
.plugin-search input[type="search"],
.search-plugin-form input[type="search"] {
	flex: 1 !important;
	width: auto !important;
	padding: 0.5rem 0.75rem;
	border: none !important;
	border-radius: 0 !important;
	background: var(--accent-bg);
	color: var(--text);
	font-size: 1rem;
	outline: none;
	min-width: 0;
	margin: 0 !important;
}

.plugin form:focus-within,
.plugin-search form:focus-within,
.search-plugin-form:focus-within {
	outline: 2px solid var(--accent);
	outline-offset: 1px;
}

.plugin form button,
.plugin-search button,
.search-plugin-form button {
	flex-shrink: 0 !important;
	width: auto !important;
	padding: 0.5rem 1rem;
	border: none !important;
	border-left: 1px solid var(--border) !important;
	border-radius: 0 !important;
	background: var(--accent) !important;
	color: #fff !important;
	font-size: 1rem;
	font-weight: bold;
	cursor: pointer;
	white-space: nowrap;
	transition: filter 0.2s ease;
	margin: 0 !important;
}

.plugin form button:hover,
.plugin-search button:hover,
.search-plugin-form button:hover {
	filter: brightness(1.15);
}

/* From Bootstrap */
.sr-only {
	position: absolute;
	width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* === Dark/Light Toggle Uil === */
.theme-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  transition: transform 0.3s ease;
  display: block;
  position: absolute;
  right: 1rem;
  top: 0.4rem;
}

.theme-toggle-btn:hover {
  transform: scale(1.08);
}

nav { position: relative; }

/* Alle SVG-onderdelen animeren soepel */
.owl-switcher * {
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Light mode (standaard) --- */
.sky-bg        { fill: #EDE5D8; }
.sky-border    { stroke: #B09080; }
.sun-element   { fill: #FFEB3B; opacity: 1; }
.moon-element  { fill: #FFF9C4; opacity: 0; transform: translateY(50px); transform-box: view-box; }
.bg-stars      { opacity: 0; }
.owl-stars     { opacity: 0; }
.lens-glass    { fill: #0D1220; }

.telescope {
  transform: rotate(0deg);
  transform-origin: 213px 198px;
  transform-box: view-box;
}

/* --- Dark mode (via data-theme="dark" op <html>) --- */
html[data-theme="dark"] .sky-bg { fill: #171310; }
html[data-theme="dark"] .sky-border { stroke: #715E4F; }

html[data-theme="dark"] .sun-element {
  opacity: 0;
  transform: translateY(-55px);
  transform-box: view-box;
}

html[data-theme="dark"] .moon-element {
  opacity: 1;
  transform: translateY(0);
}

html[data-theme="dark"] .bg-stars { opacity: 1; }

html[data-theme="dark"] .telescope {
  transform: rotate(-32deg);
  transform-origin: 213px 198px;
  transform-box: view-box;
}

html[data-theme="dark"] .pupil-left  { transform: translate(5px, -4px); transform-box: fill-box; transform-origin: center; }
html[data-theme="dark"] .pupil-right { transform: translate(5px, -4px); transform-box: fill-box; transform-origin: center; }

html[data-theme="dark"] .owl-stars {
  opacity: 1;
  animation: pulseStars 2s infinite alternate;
}

html[data-theme="dark"] .lens-glass {
  fill: #261E17;
  filter: drop-shadow(0 0 4px rgba(212,133,26,0.6));
}

@keyframes pulseStars {
  0%   { filter: drop-shadow(0 0 2px rgba(255,220,0,0.5)); }
  100% { filter: drop-shadow(0 0 7px rgba(255,220,0,1)); }
}

/* Knipperanimatie op de ogen (elke 4 seconden) */
.theme-toggle-btn:not(:hover) .owl-switcher {
  animation: owlBlink 4s infinite;
}

@keyframes owlBlink {
  0%, 88%, 96%, 100% { --blink: scaleY(1); }
  92%                 { --blink: scaleY(0.05); }
}

.theme-toggle-btn:not(:hover) .pupil-left,
.theme-toggle-btn:not(:hover) .pupil-right {
  animation: blinkPupil 4s infinite;
}

@keyframes blinkPupil {
  0%, 88%, 96%, 100% { transform: scaleY(1);    transform-box: fill-box; transform-origin: center; }
  92%                 { transform: scaleY(0.05); transform-box: fill-box; transform-origin: center; }
}

/* Forceer licht thema — hogere specificiteit (0,1,1) dan Simple.css media query (0,1,0) */
html[data-theme="light"] {
  color-scheme: light;
  --bg:            #fff;
  --accent-bg:     #f5f7ff;
  --text:          #212121;
  --text-light:    #585858;
  --border:        #898EA4;
  --accent:        #0d47a1;
  --code:          #d81b60;
  --preformatted:  #444;
  --marked:        #ffdd33;
  --disabled:      #efefef;
}

/* Zorg dat form controls ook licht zijn als light mode actief is */
html[data-theme="light"] body { color-scheme: light; }
html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
  background-color: var(--bg);
  color: var(--text);
  border-color: var(--border);
  color-scheme: light;
}

/* Override Bludit zoek-plugin dark media query (plugin specificiteit 0,2,1 → onze regel 0,2,2) */
html[data-theme="light"] .search-inline-form input[type="search"],
html[data-theme="light"] .plugin-search .search-plugin-form input[type="search"] {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
}

/* Warm-bruin donker thema — afgeleid van gemeten #715E4F */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg:            #171310;
  --accent-bg:     #261E17;
  --text:          #F0E8DC;
  --text-light:    #A38872;
  --accent:        #D4851A;
  --border:        #715E4F;
  --code:          #E09060;
  --preformatted:  #261E17;
  --marked:        #3D3028;
  --disabled:      #0A0806;
}

/* Social achtergrond fix voor dark mode */
html[data-theme="dark"] .social a {
  background-color: #3D2E1E;
}

html[data-theme="dark"] .social a::after {
  filter: invert(1) sepia(1) saturate(1.5) hue-rotate(345deg) brightness(1.1);
}

html[data-theme="dark"] .social a:hover {
  background-color: var(--accent);
}

html[data-theme="dark"] .social a:hover::after {
  filter: invert(1) brightness(1.3);
}

/* Smaller screens */
@media only screen and (max-width: 720px) {
  body > header {
    padding: 0 .5rem 1rem;
  }

  body > header p {
    margin: 0.5rem auto;
  }

  .wrapper {
    flex-wrap: wrap;
  }

  aside {
    margin-top: 2rem;
  }

  article + nav {
    gap: 0.375rem;    
    flex-wrap: wrap;
    justify-content: space-around;
  }

  body > footer {
    margin-top: 2rem;
  }
}