/* ========================
   Global Variables & Reset
========================= */
:root {
  --bgcolor: white;
  --fontcolor: #444;
  --linkcolor: #C71712;
  --visitedcolor: #C71712;
  --precolor: #fff;
  --prebgcolor: #000;
}

html {
  overflow-y: scroll;
}

/* ========================
   Fonts
========================= */
@font-face {
  font-family: 'Kurier-Regular';
  src: url('../fonts/Kurier-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ========================
   Typography & Layout
========================= */
body {
  font-family: 'Kurier-Regular';
  max-width: 720px;
  margin: 48px auto;
  padding: 0 10px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--fontcolor);
  background: var(--bgcolor);
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  lang: pl;
}

/* ========================
   Links
========================= */
a:link {
  color: var(--linkcolor);
  text-decoration: none;
}

a:visited,
a:active {
  color: var(--visitedcolor);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ========================
   Headings
========================= */
h1, h2, h3 {
  margin: 1em 0;
}

/* ========================
   Text & Code Blocks
========================= */
code,
p > code {
  color: var(--precolor);
  background: var(--prebgcolor);
  padding: 2px;
}

pre {
  color: var(--precolor);
  background: var(--prebgcolor);
  padding: 24px;
  overflow-x: auto;
}

/* ========================
   Lists
========================= */
li {
  margin: 0;
}

.post-list,
.post-item {
  list-style: none;
  text-align: left;
  margin: 0;
  padding: 0;
}

/* ========================
   Article Styling
========================= */
article {
  text-align: justify;
  margin: 0;
  padding: 0;
}

/* ========================
   Images & Media
========================= */
img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: auto;
}

.image-item {
  margin-bottom: 1em;
}

.center {
  display: block;
  margin: 0 auto;
  width: 100%;
}

.image-wrapper {
  position: relative;
  max-width: 100%;
  padding-bottom: 66.6667%;
  overflow: hidden;
}

.image-wrapper img {
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  cursor: zoom-in;
}

.video-wrapper {
  position: relative;
  aspect-ratio: 3 / 2;
  max-width: 100%;
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ========================
   Figures & Captions
========================= */
figure {
  margin: auto;
}

figcaption {
  color: #555;
  font: 0.75em/1.5 monospace;
  margin-top: 0.5em;
  text-align: justify;
}

/* ========================
   Meta Information
========================= */
.meta {
  display: inline;
  margin-right: 10px;
  min-width: 100px;
  color: #999;
  font-size: 14px;
}

/* ========================
   Lightbox Overlay
========================= */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  cursor: default;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  cursor: zoom-in;
  user-select: none;
}

.lightbox-overlay img {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-out;
}

.lightbox-overlay.active {
  display: flex;
}
