/* ============================================================
   Zdeněk Haman — Minimal Modern Design
   ============================================================ */

/* 1. Reset
   ------------------------------------------------------------ */
html, body, div, span, applet, object, iframe,
dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  vertical-align: baseline;
  background: transparent;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  line-height: 1;
}

blockquote, q { quotes: none; }
blockquote:before, blockquote:after,
q:before, q:after { content: ''; content: none; }

hr { display: none; }


/* 2. Table
   ------------------------------------------------------------ */
table {
  border: 1px solid #e5e5e5;
  border-left: none;
  border-top: none;
  position: relative;
  top: -3px;
  margin: 24px 0;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

th, td {
  border-top: 1px solid #e5e5e5;
  line-height: 1.6;
  padding: 10px 16px;
  position: relative;
}

th {
  background: #1a1a1a;
  color: #fff;
  font-weight: 500;
  letter-spacing: 0.03em;
  font-size: 0.85em;
  text-transform: uppercase;
}

td, th { border-left: 1px solid #e5e5e5; text-align: left; font-weight: normal; }
th:last-child, td:last-child { padding-right: 0; }
tr:nth-child(even) td { background: #f9f9f9; }
caption { margin-bottom: 12px; text-align: left; font-weight: normal; color: #666; font-size: 0.9em; }


/* 3. Typography
   ------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 { position: relative; }

p, blockquote {
  line-height: 1.7;
  margin: 0 0 16px 0;
}

cite { font-style: normal; display: block; margin: 10px 0; }

code {
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  background: #f4f4f4;
  border: 1px solid #e5e5e5;
  border-radius: 3px;
  font-size: 0.875em;
  padding: 1px 5px;
  letter-spacing: 0;
  line-height: 1.6;
}

acronym, abbr { cursor: help; border-bottom: 1px dotted #aaa; }


/* 4. Positioning
   ------------------------------------------------------------ */
.clear { clear: both; }
.left  { float: left; }
.right { float: right; }


/* 5. Page Styling
   ============================================================ */

/* --- Base --- */
body {
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: #1a1a1a;
}

#wrapper {
  width: 960px;
  max-width: 100%;
  padding: 0 40px 60px;
  margin: 0 auto;
}

.clear { clear: both; }

blockquote {
  border-left: 3px solid #e5e5e5;
  padding-left: 20px;
  color: #555;
}


/* --- Links --- */
a {
  text-decoration: none;
  color: #1a1a1a;
  font-weight: inherit;
  border-bottom: 1px solid #e5e5e5;
  transition: color 0.15s, border-color 0.15s;
}

a:hover {
  color: #555;
  border-bottom-color: #aaa;
}


/* --- Header --- */
#header {
  padding: 48px 0 36px;
  margin-bottom: 48px;
  border-bottom: 1px solid #e5e5e5;
}

#header h1 {
  font-size: 1.5em;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 6px;
}

#header h1 a {
  border: none;
  color: #1a1a1a;
}

#header h1 a:hover {
  color: #555;
}

#header p {
  font-size: 0.85em;
  color: #999;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}


/* --- Section headings --- */
h2 {
  font-size: 1em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #999;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

h3 {
  font-size: 1em;
  font-weight: 500;
  color: #333;
}


/* --- Content --- */
#content {
  float: left;
  width: 580px;
}

.hentry {
  margin-bottom: 40px;
  padding-bottom: 0;
}

.hentry img {
  margin: 6px 0 4px;
  display: block;
}

.hentry p,
.hentry li {
  color: #444;
  font-size: 0.95em;
}


/* --- Slideshow (roll) --- */
#roll {
  width: 500px;
  margin-bottom: 24px;
  border-radius: 4px;
  overflow: hidden;
}

#roll img {
  display: block;
  width: 500px;
  height: 333px;
  border-radius: 4px;
}

#roll .metadata {
  display: block;
  padding: 10px 0 4px;
  font-size: 0.8em;
  color: #999;
  line-height: 1.4;
}


/* --- Photo Gallery --- */
div.pswp-gallery {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 8px;
}

.hentry .pswp-gallery a {
  display: block;
  width: 120px;
  height: 120px;
  margin: 4px;
  border: none;
  border-radius: 3px;
  overflow: hidden;
  padding: 0;
  position: relative;
  background: #f0f0f0;
  transition: opacity 0.2s, transform 0.2s;
}

.hentry .pswp-gallery a.portrait {
  width: 120px;
  height: 120px;
  padding: 0;
}

.hentry .pswp-gallery a:hover {
  opacity: 0.85;
  transform: translateY(-1px);
  margin: 4px;
  border: none;
}

.hentry .pswp-gallery a img {
  margin: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}


/* --- Metadata / captions --- */
abbr {
  border: none;
  font-size: 0.85em;
  color: #999;
  letter-spacing: 0;
}

small {
  color: #999;
  font-size: 0.85em;
}

.metadata {
  color: #999;
  font-size: 0.8em;
  line-height: 1.5;
}


/* --- Lists --- */
ul, li {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
  margin: 0 0 16px 0;
}

ol {
  list-style: decimal;
  margin: 16px 0 16px 20px;
}

ul li, ol li {
  margin-bottom: 8px;
  color: #444;
  padding-left: 0;
}

ul li::before {
  content: '—';
  color: #ccc;
  margin-right: 8px;
  font-weight: 300;
}

ol li::before {
  content: none;
}

.widget ul li::before,
.hentry ul li::before {
  content: '—';
  color: #ccc;
  margin-right: 8px;
}


/* --- Sidebar --- */
#sidebar {
  float: right;
  width: 280px;
}

.widget ul, .widget ol {
  margin: 0;
  padding: 0;
}

.widget {
  margin-bottom: 40px;
}

.widget p {
  font-size: 0.875em;
  color: #555;
  line-height: 1.6;
}

.widget a {
  color: #555;
  border-bottom-color: transparent;
  font-size: 0.875em;
}

.widget a:hover {
  color: #1a1a1a;
  border-bottom-color: #ccc;
}

/* Tag cloud */
.widget .set-1,
.widget .set-2,
.widget .set-3,
.widget .set-4,
.widget .set-5 {
  display: inline-block;
  margin: 2px 2px;
  padding: 3px 8px;
  border: 1px solid #e5e5e5;
  border-radius: 2px;
  font-size: 0.78em !important;
  color: #666 !important;
  background: #fafafa;
  line-height: 1.5;
  transition: background 0.15s, border-color 0.15s;
}

.widget .set-1:hover,
.widget .set-2:hover,
.widget .set-3:hover,
.widget .set-4:hover,
.widget .set-5:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff !important;
}


/* --- Footer --- */
#footer {
  width: 100%;
  border-top: 1px solid #e5e5e5;
  padding-top: 24px;
  margin-top: 48px;
  color: #bbb;
  font-size: 0.8em;
  clear: both;
}

#footer p {
  margin: 0;
  color: #bbb;
}

.separator {
  border-top: 1px solid #e5e5e5;
  width: 100%;
  margin-top: 20px;
}


/* --- Pagination --- */
#pagination {
  height: auto;
  padding: 32px 0;
  display: flex;
  gap: 16px;
  align-items: center;
}

#pagination a {
  font-size: 0.85em;
  color: #555;
  border-bottom: 1px solid #e5e5e5;
  padding: 6px 0;
}

#pagination a:hover {
  color: #1a1a1a;
}


/* 6. Responsive
   ============================================================ */

/* Tablet */
@media (max-width: 980px) {
  #wrapper {
    width: 100%;
    padding: 0 24px 48px;
  }

  #content {
    float: none;
    width: 100%;
  }

  #roll {
    width: 100%;
    max-width: 500px;
  }

  #roll img {
    width: 100%;
    height: auto;
  }

  .hentry .pswp-gallery a {
    width: 120px;
    height: 120px;
  }

  .hentry .pswp-gallery a.portrait {
    width: 120px;
    height: 120px;
  }

  #sidebar {
    float: none;
    width: 100%;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e5e5e5;
  }

  #footer {
    width: 100%;
  }

  .separator {
    width: 100%;
  }
}

/* Mobile */
@media (max-width: 580px) {
  #wrapper {
    padding: 0 16px 40px;
  }

  #header {
    padding: 32px 0 24px;
    margin-bottom: 32px;
  }

  #header h1 {
    font-size: 1.3em;
  }

  h2 {
    font-size: 0.95em;
  }

  .hentry .pswp-gallery a {
    width: 120px;
    height: 120px;
    margin: 3px;
  }

  .hentry .pswp-gallery a.portrait {
    width: 120px;
    height: 120px;
    margin: 3px;
  }

  .hentry .pswp-gallery a:hover {
    margin: 3px;
  }
}
