/* === GLOBAL === */
:root {
  --bg: #0f172a;
  --bg-alt: #111827;
  --fg: #e5e7eb;
  --muted: #9ca3af;
  --accent-blue: rgb(16 188 242);
  --accent-blue-hover: rgb(10 141 202);
}

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

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body.hl-body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: normal;
  font-feature-settings: "frac" 0;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
}

a {
  color: var(--fg);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-blue);
}

img {
  max-width: 100%;
  height: auto;
}

hr {
  width: 200px;
  margin: 1.8rem auto;
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(156, 163, 175, 0.3), transparent);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 2.25rem;
}

h2 {
  font-size: 1.875rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

.hl-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* === HEADER & NAVIGATION === */
.hl-header {
  border-bottom: 1px solid #1f2937;
  background: var(--bg);
}

.hl-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hl-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hl-logo {
  height: 2rem;
  width: auto;
}

.hl-title a {
  color: var(--fg);
  font-weight: 700;
  font-size: 1.25rem;
}

.hl-title a:hover {
  color: var(--accent-blue);
}

.hl-nav {
  display: flex;
  align-items: center;
}

.hl-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.hl-nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hl-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s;
}

.hl-nav a:hover {
  color: var(--accent-blue);
}

/* ikonka v external odkazech v nav baru */
.hl-nav a.external::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 0.35rem;
  background-color: var(--muted);
  mask: url('../assets/external-link.svg') no-repeat center / contain;
  -webkit-mask: url('../assets/external-link.svg') no-repeat center / contain;
  opacity: 0.9;
  vertical-align: middle;
  transition: background-color 0.2s, opacity 0.2s;
}

.hl-nav a.external:hover {
  color: var(--accent-blue);
}

.hl-nav a.external:hover::after {
  background-color: var(--accent-blue);
  opacity: 1;
}

/* === MAIN CONTENT WRAPPER === */
.hl-main {
  flex: 1 0 auto;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.hl-main-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
  overflow-x: hidden;
}

.hl-page-title {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

.hl-tagline {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: -1rem;
  margin-bottom: 1.5rem;
}

/* ====== HERO (HOMEPAGE) ====== */
.hl-home-hero {
    margin-bottom: 3rem;
}

.hl-home-kicker {
  margin: 0 0 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--accent-blue);
}

.hl-home-hero h1 {
  margin: 0 0 0.5rem;
  font-size: 1.7rem;
}

.hl-home-lead {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 42rem;
}

.hl-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.btn-primary,
.btn-secondary {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: .2s;
}

.btn-primary {
  background: var(--accent-blue);
  color: #020617;
}

.btn-primary:hover {
  background: var(--accent-blue-hover);
  color: #020617;
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid #1f2937;
}

.btn-secondary:hover {
  border-color: var(--accent-blue);
}

.hl-features-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.hl-feature-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  min-height: auto;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  text-align: left;
  gap: 0.8rem;
}

.hl-feature-card:hover { transform: none; }

.hl-feature-icon {
  font-size: 1.2rem;
  color: var(--accent-blue);
  margin: 0.15rem 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  width: 1.2rem;
  flex-shrink: 0;
  min-width: 1.2rem;
}
.hl-feature-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hl-feature-title {
  color: var(--fg);
  font-size: 1rem;
  margin: 0 0 0.3rem 0;
  font-weight: 600;
}

.hl-feature-text {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

.hl-home-features div > div:first-child {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.hl-home-features strong {
  color: var(--fg);
  font-size: 0.98rem;
}

.hl-home-features p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.hl-home-features i {
  color: var(--accent-blue);
  margin-top: 0.1rem;
}

@media (max-width: 768px) {
  .hl-home-hero h1 {
    font-size: 1.4rem;
  }
}

/* Responsive layout for feature cards */
@media (max-width: 1024px) {
  .hl-features-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .hl-features-wrapper {
    grid-template-columns: 1fr;
  }
}

/* === POST LIST (HOMEPAGE) === */
.hl-post-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hl-post-card {
  background: var(--bg-alt);
  border-radius: 0.75rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid #1f2937;
  width: 100%;
  box-sizing: border-box;
}

.hl-post-header {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.25rem;
}

.hl-post-title {
  margin: 0;
  font-size: 1.1rem;
}

.hl-post-title a {
  color: var(--fg);
}

.hl-post-title a:hover {
  color: var(--accent-blue);
}

/* Nadpis v detailu příspěvku */
.hl-post-single .hl-post-title {
  margin: 0 0 0.5rem 0;
  font-size: 2rem;
  font-weight: 600;
}

.hl-tagline {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
}

.hl-post-categories-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.75rem;
  margin-top: 0.2rem;
  margin-bottom: 0.4rem;
  color: var(--muted);
}

.hl-post-category { display: inline-block; }
.hl-post-category a { color: var(--accent-blue); font-weight: 500; }
.hl-post-category a:hover { color: var(--accent-blue-hover); }

.hl-post-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hl-post-tags a { color: var(--muted); font-size: 0.75rem; }
.hl-post-tags a:hover { color: var(--accent-blue); }
.hl-post-tags a::before { content: "#"; margin-right: 0.2rem; color: var(--muted); }
.hl-post-tags a:hover::before { color: var(--accent-blue); }

.hl-post-summary { margin: 0; font-size: 0.9rem; color: var(--muted); }
.hl-meta { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.25rem; }
.hl-read-more { display: inline-block; margin-top: 0.2rem; font-size: 0.85rem; color: var(--accent-blue); }
.hl-read-more:hover { color: var(--accent-blue-hover); }

/* === POST DETAIL === */
.hl-post-single { background: var(--bg-alt); border-radius: 0.75rem; padding: 1.75rem 1.9rem; border: 1px solid #1f2937; }
.hl-post-single h1 { margin-top: 0; margin-bottom: 0.5rem; }
.hl-content { margin-top: 1rem; line-height: 1.6; max-width: 100%; word-wrap: break-word; }
.hl-content a { color: var(--accent-blue); }
.hl-content a:hover { color: var(--accent-blue-hover); }
.hl-content img:not(.team-avatar img) { border-radius: 0.9rem; }
.hl-content p { margin: 0.75rem 0; }
.hl-content figure { max-width: 100%; margin: 1rem 0; }
.hl-content h2, .hl-content h3, .hl-content h4 { margin-top: 1.5rem; margin-bottom: 0.75rem; font-weight: 600; }
.hl-content h2 { font-size: 1.75rem; }
.hl-content h3 { font-size: 1.375rem; }
.hl-content h4 { font-size: 1.125rem; }

/* === FOOTER === */
.hl-footer { border-top: 1px solid #1f2937; background: #0b111f; font-size: 0.85rem; color: var(--muted); margin-top: auto; }

/* === CODE BLOCKS & TABLES === */
.hl-content code { background: #1e293b; color: #e2e8f0; padding: 0.2rem 0.4rem; border-radius: 0.25rem; font-size: 0.9em; font-family: 'Courier New', monospace; }
.hl-content pre { background: #1e293b; color: #e2e8f0; padding: 1rem; border-radius: 0.5rem; margin: 1rem 0; border: 1px solid #334155; overflow-wrap: break-word; white-space: pre-wrap; word-break: break-all; }
.hl-content pre code { background: none; padding: 0; color: inherit; }
.hl-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; background: #1e293b; border-radius: 0.5rem; overflow: hidden; }
.hl-content table th, .hl-content table td { padding: 0.75rem 1rem; text-align: left; border: 1px solid #334155; }
.hl-content table th { background: #0f172a; font-weight: 600; color: var(--accent-blue); }
.hl-content blockquote { background: #1e293b; border-left: 4px solid var(--accent-blue); margin: 1rem 0; padding: 1rem 1.5rem; border-radius: 0.5rem; color: var(--muted); font-style: italic; }
.hl-content blockquote p { margin: 0; }

/* TEAM */
.hl-content .team-avatar { width: 72px; aspect-ratio: 1 / 1; border-radius: 0.9rem; overflow: hidden; flex: 0 0 72px; }
.hl-content .team-avatar img { width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; object-fit: cover; display: block; }
.team-role-links a { color: #6b7280; font-size: 0.9rem; transition: color 0.15s ease; }
.team-role-links a:hover { color: #d1d5db; }

/* === MOBILE BURGER MENU === */
.hl-burger { display: none; background: none; border: none; color: var(--fg); font-size: 2rem; cursor: pointer; padding: 0.5rem; line-height: 1; }
@media (max-width: 768px) {
  .hl-header-inner { display: flex; justify-content: space-between; align-items: center; }
  .hl-burger { display: flex; align-items: center; }
  .hl-nav { position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; background: var(--bg-alt); transition: right 0.3s ease; box-shadow: -2px 0 10px rgba(0,0,0,0.5); z-index: 999; overflow-y: auto; }
  .hl-nav.active { right: 0; }
  .hl-nav ul { flex-direction: column; padding: 4rem 2rem; gap: 2rem; align-items: flex-start; }
  .hl-nav a { font-size: 1.2rem; }
  .hl-post-categories-tags { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
  .hl-post-category::after { content: ""; margin-left: 0; }
}

.hl-features-box {
  background: var(--bg-alt);
  border-radius: 0.75rem;
  border: 1px solid #1f2937;
  padding: 1.2rem 1.4rem;
}

/* === LIGHTBOX === */
.hl-zoomable {
  cursor: zoom-in;
}

.hl-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.8); /* subtle dark background */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
  opacity: 0;
  animation: fadeIn 0.2s ease-out forwards;
}

.hl-lightbox-overlay.closing {
  animation: fadeOut 0.2s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.hl-lightbox-modal {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border: 1px solid #1f2937;
  background: #0b111f;
  opacity: 0;
  transform: scale(0.95);
  animation: zoomIn 0.2s ease-out forwards;
}

.hl-lightbox-overlay.closing .hl-lightbox-modal {
  animation: zoomOut 0.2s ease-out forwards;
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes zoomOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

.hl-lightbox-modal img {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
}

.hl-lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid #1f2937;
  color: var(--muted);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.hl-lightbox-close:hover {
  background: rgba(55, 65, 81, 0.9);
  color: var(--fg);
}
