* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  -webkit-font-smoothing: antialiased;
  background: oklch(97% 0.015 85);
  color: oklch(24% 0.02 85);
  font-family: 'Work Sans', sans-serif;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.75; }
img { max-width: 100%; display: block; }

/* Header / Footer */
.site-header, .site-footer {
  background: oklch(26% 0.055 155);
  background-image: radial-gradient(oklch(31% 0.06 155) 2px, transparent 2.5px);
  background-size: 22px 22px;
}
.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 34px 48px;
  flex-wrap: wrap;
  gap: 12px;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.icon-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: oklch(88% 0.03 85);
}
.icon-circle img { width: 100%; height: 100%; object-fit: cover; }
.icon-circle-emoji { line-height: 1; }

.site-logo {
  width: 52px;
  height: 52px;
  background: oklch(31% 0.06 155);
  font-size: 26px;
}
.site-title {
  display: block;
  font-family: 'Lora', serif;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: oklch(96% 0.02 90);
}
.site-subtitle {
  display: block;
  font-size: 13px;
  color: oklch(78% 0.04 100);
  margin-top: 2px;
}
.site-route {
  font-size: 13px;
  color: oklch(80% 0.04 100);
  letter-spacing: 0.02em;
}
.site-footer {
  text-align: center;
  padding: 32px;
  font-size: 13px;
  color: oklch(78% 0.04 100);
}

/* Hero intro */
.hero-intro {
  background: oklch(30% 0.06 155);
  background-image:
    radial-gradient(oklch(35% 0.065 150) 2.5px, transparent 3px),
    radial-gradient(oklch(35% 0.065 150) 2px, transparent 2.5px);
  background-size: 60px 60px, 34px 34px;
  background-position: 0 0, 17px 17px;
  padding: 44px 48px;
}
.hero-intro p {
  max-width: 640px;
  margin: 0 auto;
  font-size: 17.5px;
  line-height: 1.65;
  color: oklch(93% 0.03 100);
}

/* Page wrap / grid */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 48px 96px;
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
}

/* Post card */
.post-card {
  background: oklch(94% 0.025 85);
  border: 1px solid oklch(88% 0.03 85);
  border-radius: 14px;
  box-shadow: 0 2px 10px oklch(30% 0.05 155 / 0.06);
  overflow: hidden;
}
.post-card-link {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}
.post-card-cover {
  width: 100%;
  height: 190px;
  border-radius: 10px;
  overflow: hidden;
  background: oklch(88% 0.03 85);
}
.post-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.badge {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: oklch(97% 0.02 100);
  background: var(--accent);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.post-card-date {
  font-size: 12.5px;
  color: oklch(45% 0.02 85);
}
.video-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: oklch(30% 0.02 85);
}
.post-card-title {
  font-family: 'Lora', serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 8px;
}
.post-card-teaser {
  font-size: 14.5px;
  line-height: 1.55;
  color: oklch(38% 0.02 85);
  margin: 0;
}
.read-more {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 2px;
}

/* Post detail */
.post-detail {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 48px 96px;
}
.back-link {
  display: inline-block;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 28px;
}
.post-title {
  font-family: 'Lora', serif;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 20px;
}
.post-author {
  font-size: 14px;
  font-weight: 600;
  color: oklch(45% 0.02 85);
  margin: 0 0 20px;
}
.post-hero {
  width: 100%;
  height: 420px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 28px;
  background: oklch(88% 0.03 85);
}
.post-hero img { width: 100%; height: 100%; object-fit: cover; }
.post-hero-trigger {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  font: inherit;
}
.post-hero-trigger:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.post-body {
  font-size: 17px;
  line-height: 1.7;
  color: oklch(28% 0.02 85);
  max-width: 680px;
  margin: 0 0 36px;
}
.post-body p { margin: 0 0 1.2em; }

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  margin: 0 0 36px;
  border-radius: 12px;
  overflow: hidden;
  background: oklch(20% 0.02 155);
}
.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.gallery-grid {
  columns: 220px 3;
  column-gap: 16px;
}
.gallery-item {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  border: 0;
  padding: 0;
  background: oklch(88% 0.03 85);
  border-radius: 10px;
  overflow: hidden;
  break-inside: avoid;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.gallery-item img { width: 100%; height: auto; display: block; }
.gallery-item:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: oklch(10% 0.01 155 / 0.92);
  padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox-figure {
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  background: oklch(20% 0.02 155);
}
.lightbox-counter {
  color: oklch(90% 0.02 100);
  font-size: 13.5px;
  letter-spacing: 0.02em;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: oklch(26% 0.055 155 / 0.85);
  color: oklch(97% 0.02 100);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { opacity: 0.75; }
.lightbox button:focus-visible {
  outline: 3px solid oklch(97% 0.02 100);
  outline-offset: 2px;
}
.lightbox-close { top: 20px; right: 20px; width: 40px; height: 40px; font-size: 22px; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 26px; }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-prev[hidden], .lightbox-next[hidden] { display: none; }

.placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: oklch(45% 0.02 85);
  text-align: center;
  padding: 8px;
}

@media (max-width: 640px) {
  .site-header, .page-wrap, .hero-intro, .post-detail { padding-left: 24px; padding-right: 24px; }
  .post-title { font-size: 30px; }
  .post-hero { height: 260px; }
  .lightbox-prev, .lightbox-next { width: 40px; height: 40px; font-size: 20px; }
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
  .lightbox-close { top: 12px; right: 12px; width: 36px; height: 36px; font-size: 20px; }
}
