/* Custom styles — Blog KC */
/* Brutalist: zero gradientów, cieni, zaokrągleń */
/* Kolory definiowane w theme-light.scss / theme-dark.scss */

/* === Base layout === */
p {
  text-align: justify;
  hyphens: none !important;
  overflow-wrap: normal;
  word-break: normal;
}

.nav-footer p {
  text-align: inherit;
}

/* === No-justify pages (publications etc.) === */
.no-justify #quarto-content p {
  text-align: left;
  overflow-wrap: break-word;
  word-break: break-word;
}

h1 {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

html {
  scroll-behavior: smooth;
}

/* === Brutalist reset — kill all roundness === */
*,
*::before,
*::after {
  border-radius: 0 !important;
}

/* === Links === */
a {
  transition: color 0.15s ease;
}

/* === Focus-visible (keyboard accessibility) === */
a:focus-visible,
button:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid #C41E3A;
  outline-offset: 2px;
}

/* === Navbar — layout only (colors via SCSS) === */
.navbar {
  border-bottom: 3px solid #C41E3A;
  font-weight: 600;
}

.navbar .navbar-brand,
.navbar .nav-link {
  font-weight: 400;
}

.navbar .nav-link.active {
  font-weight: 700;
}

/* === Hide page titles === */
#title-block-header {
  display: none;
}

/* === About page (trestles) === */
.quarto-about-trestles {
  max-width: 1200px !important;
}

.about-entity {
  flex: 0 0 auto !important;
  max-width: fit-content !important;
  padding-right: 2rem;
}

.about-contents p {
  text-align: left;
}

.about-entity .about-image {
  border: none;
}

body.quarto-dark .about-entity .about-image,
[data-bs-theme="dark"] .about-entity .about-image {
  content: url("images/photo-dark.svg");
  -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

/* === Cards / listing === */
.quarto-listing-default .listing-item {
  border: 1px solid #1A1A1A;
  padding: 1.2rem;
  margin-bottom: 1rem;
  transition: border-color 0.15s ease;
}

.quarto-listing-default .listing-item:hover {
  border-color: #C41E3A;
}

[data-bs-theme="dark"] .quarto-listing-default .listing-item {
  border-color: #F0EBE0;
}

[data-bs-theme="dark"] .quarto-listing-default .listing-item:hover {
  border-color: #C41E3A;
}

/* === Listing toolbar (sort/filter) === */
.quarto-listing-sort .form-select,
.quarto-listing-filter .form-control {
  font-size: 0.85rem;
  box-shadow: none !important;
  background-color: transparent;
  color: inherit;
  border: none;
  border-bottom: 1px solid currentColor;
}

.quarto-listing-sort .input-group-text,
.quarto-listing-filter .input-group-text {
  font-size: 0.85rem;
  box-shadow: none !important;
  background-color: transparent;
  color: inherit;
  border: none;
  border-bottom: 1px solid currentColor;
}

.quarto-listing-sort .form-select:focus,
.quarto-listing-filter .form-control:focus {
  border-color: #C41E3A !important;
}

/* dark mode inherits via currentColor — no override needed */

.quarto-listing-sort .form-select option {
  background-color: #F0EBE0;
  color: #1A1A1A;
}

body.quarto-dark .quarto-listing-sort .form-select option {
  background-color: #1A1A1A;
  color: #F0EBE0;
}

/* === Footer — layout (colors stay, no Bootstrap vars for footer) === */
.nav-footer {
  background-color: #1A1A1A !important;
  border-top: 3px solid #C41E3A;
  color: #8A8580 !important;
  font-size: 0.85rem;
}

.nav-footer-left,
.nav-footer-center,
.nav-footer-right {
  flex: 1 1 33.33%;
}

.nav-footer-right {
  text-align: right;
}

.nav-footer a {
  color: #F0EBE0 !important;
}

.nav-footer a:hover {
  color: #C41E3A !important;
}

/* === Blockquotes (wiersze) === */
blockquote {
  border-left: 4px solid #C41E3A;
  padding: 1rem 1.5rem;
  font-style: italic;
  background: none;
  font-size: 1.1rem;
}

blockquote p {
  text-align: left;
  color: #1A1A1A;
}

body.quarto-dark blockquote p,
[data-bs-theme="dark"] blockquote p {
  color: #FFFFFF;
}

/* === Code blocks === */
pre {
  border: 1px solid #1A1A1A;
}

[data-bs-theme="dark"] pre {
  border-color: #F0EBE0;
}

/* === Categories / tags === */
.listing-category .listing-category-item,
.quarto-category {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === Language switcher === */
.navbar .nav-link[href*="en/index"],
.navbar .nav-link[href*="../index"] {
  background-color: transparent;
  padding: 0.5rem 0.75rem !important;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid #F0EBE0;
}

.navbar .nav-link[href*="en/index"]:hover,
.navbar .nav-link[href*="../index"]:hover {
  background-color: #C41E3A;
  border-color: #C41E3A;
}

/* === Muted text (dates, meta) === */
.listing-date,
.listing-author,
.metadata-value,
.article-date,
.article-author {
  color: #6B6660;
}

body.quarto-dark .listing-date,
body.quarto-dark .listing-author,
body.quarto-dark .metadata-value,
body.quarto-dark .article-date,
body.quarto-dark .article-author {
  color: #8A8580;
}

/* === Selection === */
::selection {
  background-color: rgba(196, 30, 58, 0.25);
}

/* === Touch target — dark mode toggle === */
.navbar .quarto-color-scheme-toggle {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* === Dark mode toggle — moon/sun icons === */
.navbar .quarto-color-scheme-toggle:not(.alternate) .bi::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgba(240,235,224,1)" viewBox="0 0 16 16"><path d="M6 .278a.77.77 0 0 1 .08.858 7.2 7.2 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.79.79 0 0 1 .81.316.73.73 0 0 1-.031.893A8.35 8.35 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.75.75 0 0 1 6 .278z"/></svg>') !important;
}

.navbar .quarto-color-scheme-toggle.alternate .bi::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgba(240,235,224,1)" viewBox="0 0 16 16"><path d="M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8M8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0M8 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13m8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5M3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8m10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0m-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0m9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707M4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708"/></svg>') !important;
}

/* === Language switcher — mobile (outside collapse) === */
.lang-mobile {
  display: none;
}

@media (max-width: 991px) {
  .lang-mobile {
    display: inline-flex;
    align-items: center;
    color: #F0EBE0;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0 0.4rem;
  }

  .lang-mobile:hover {
    color: #C41E3A;
  }

  .navbar-collapse .navbar-nav.ms-auto {
    display: none !important;
  }
}

/* === Mobile responsiveness === */
@media (max-width: 768px) {
  p {
    text-align: left;
    hyphens: auto !important;
    -webkit-hyphens: auto !important;
    overflow-wrap: break-word;
  }

  blockquote {
    padding: 0.75rem 1rem;
  }

  blockquote p {
    hyphens: none !important;
    -webkit-hyphens: none !important;
  }
}

/* === Horizontal rules as red separators === */
hr {
  border: none;
  border-top: 2px solid #C41E3A;
  opacity: 1;
}
