:root {
  color-scheme: dark;
  --ink: #cfd6ff;
  --ink-dim: #8892b3;
  --bg: #000;
  --bg-card: #0a0a0a;
  --border: rgba(207, 214, 255, 0.15);
  --accent: #acbeff;
}

* {
  box-sizing: border-box;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  line-height: 1.6;
  font-size: 15px;
}

/* Kontener główny */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Sticky site header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  padding: 14px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.sh-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-title {
  font-size: 20px;
  font-weight: normal;
  margin: 0;
  color: var(--accent);
  letter-spacing: -0.5px;
  line-height: 1;
}

.site-title a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s;
}

.site-title a:hover {
  opacity: 0.7;
}

.site-description {
  margin: 0;
  color: var(--ink-dim);
  font-size: 11px;
  letter-spacing: 0.2px;
}

nav {
  display: flex;
  align-items: center;
  gap: 0;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  margin-left: 28px;
  font-size: 15px;
  opacity: 0.65;
  transition: opacity 0.2s, color 0.2s;
}

nav a:hover,
nav a.active {
  opacity: 1;
}

/* ── Hamburger button ── */
.nav-toggle {
  display: none;
  position: relative;
  width: 32px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  z-index: 300;
}

.nav-toggle span {
  position: absolute;
  left: 0;
  height: 1px;
  background: var(--ink);
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
              opacity 0.25s ease,
              width 0.25s ease;
}

.nav-toggle span:nth-child(1) { top: 0;    width: 100%; }
.nav-toggle span:nth-child(2) { top: 9px;  width: 65%;  }
.nav-toggle span:nth-child(3) { top: 18px; width: 100%; }

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  width: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ── Mobile nav overlay ── */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  nav {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 250;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  nav.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  nav a {
    margin-left: 0;
    font-size: 22px;
    letter-spacing: 1px;
    opacity: 0.5;
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
    width: 180px;
    text-align: center;
  }

  nav a:last-child {
    border-bottom: none;
  }

  nav a.active,
  nav a:hover {
    opacity: 1;
    color: var(--accent);
  }
}

/* ── Full-width hero ── */
.hero-statement {
  position: relative;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background-color: var(--bg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 0;
  width: 100%;
  height: 100%;
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.55) 40%,
    rgba(0, 0, 0, 0.15) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 48px 64px;
  max-width: 860px;
}

.hero-headline {
  margin: 0 0 16px 0;
  font-size: 56px;
  font-weight: normal;
  line-height: 1.2;
  color: var(--ink);
}

.hero-sub {
  margin: 0;
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.5;
}

.site-title {
  font-size: 20px;
  font-weight: normal;
  margin: 0;
  color: var(--accent);
  letter-spacing: -0.5px;
  line-height: 1;
}

@media (max-width: 768px) {
  .site-header-inner {
    padding: 12px 24px;
  }

  .site-title {
    font-size: 18px;
  }

  .hero-headline {
    font-size: 44px;
  }

  .hero-content {
    padding: 0 24px 48px;
  }
}

@media (max-width: 480px) {
  .hero-content {
    padding: 0 16px 32px;
  }

  .hero-headline {
    font-size: 32px;
  }

  .hero-sub {
    font-size: 12px;
  }

  .site-header-inner {
    padding: 12px 16px;
    gap: 16px;
  }
}

/* Sekcja czarnej dziury */
.blackhole-section {
  margin: 60px 0;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  height: 400px;
}

.blackhole-section iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Lista postów */
.posts-list {
  margin: 60px 0;
}

.post-card {
  margin-bottom: 40px;
  padding: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color 0.2s, transform 0.2s;
}

.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.post-meta {
  font-size: 13px;
  color: var(--ink-dim);
  margin-bottom: 12px;
}

.post-title {
  font-size: 24px;
  font-weight: normal;
  margin: 0 0 16px;
  line-height: 1.3;
}

.post-title a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s;
}

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

.post-excerpt {
  color: var(--ink-dim);
  margin: 0 0 16px;
  line-height: 1.65;
}

.read-more {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.read-more:hover {
  opacity: 1;
}

.read-more::after {
  content: " →";
}

/* Pojedynczy post */
article.post {
  margin: 60px 0;
}

.post-header {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}

.post-header .post-meta {
  margin-bottom: 16px;
}

.post-header h1 {
  font-size: 36px;
  font-weight: normal;
  margin: 0;
  line-height: 1.2;
  color: var(--accent);
}

.post-content {
  line-height: 1.8;
}

.post-content h2 {
  font-size: 28px;
  font-weight: normal;
  margin: 50px 0 20px;
  color: var(--ink);
}

.post-content h3 {
  font-size: 22px;
  font-weight: normal;
  margin: 40px 0 16px;
  color: var(--ink);
}

.post-content p {
  margin: 0 0 20px;
}

.post-content img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--border);
  margin: 30px 0;
}

.post-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.5;
}

.post-content code {
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 14px;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content blockquote {
  margin: 30px 0;
  padding-left: 20px;
  border-left: 3px solid var(--border);
  color: var(--ink-dim);
  font-style: italic;
}

.post-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.post-content a:hover {
  border-bottom-color: var(--accent);
}

/* ── Compact post log ── */
.posts-log {
  margin: 60px 0;
}

.posts-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.posts-log-title {
  font-size: 13px;
  color: var(--ink-dim);
  letter-spacing: 0.5px;
}

.posts-compact {
  list-style: none;
  margin: 0;
  padding: 0;
}

.posts-compact li {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.posts-compact time {
  font-size: 12px;
  color: var(--ink-dim);
  white-space: nowrap;
  flex-shrink: 0;
  font-feature-settings: "tnum";
  letter-spacing: 0.3px;
}

.posts-compact a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  flex-grow: 1;
  transition: color 0.2s;
}

.posts-compact a::after {
  content: ' →';
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.2s;
}

.posts-compact li:hover a {
  color: var(--accent);
}

.posts-compact li:hover a::after {
  opacity: 1;
}

/* ── sCMS featured card ── */
.featured-card--scms {
  border-color: rgba(172, 190, 255, 0.22);
  position: relative;
}

.featured-card--scms::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: linear-gradient(
    135deg,
    rgba(172, 190, 255, 0.04) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.scms-features {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scms-features li {
  font-size: 12px;
  color: var(--ink-dim);
  letter-spacing: 0.3px;
}

.coming-soon {
  font-size: 12px;
  color: var(--ink-dim);
  opacity: 0.55;
  letter-spacing: 0.5px;
}

/* Footer */
footer {
  margin-top: 80px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--ink-dim);
  font-size: 13px;
}

/* Responsywność */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .blackhole-section {
    height: 300px;
    margin: 40px 0;
  }

  .post-card {
    padding: 20px;
  }

  .post-title {
    font-size: 20px;
  }

  .post-header h1 {
    font-size: 28px;
  }

  .post-content h2 {
    font-size: 24px;
  }

  .post-content h3 {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
