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

html, body {
  font-family: 'Montserrat', sans-serif;
  background: #f0ede6;
  color: #1a292c;
  min-height: 100vh;
}

.page-wrap {
  min-height: 100vh;
  padding: 0 8vw;
  display: flex;
  flex-direction: column;
  gap: 8rem;
  padding-top: 18vh;
  padding-bottom: 8vh;
}

.hero-block {
  position: relative;
}

.hero-block::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% 30%, #e8e2d6 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.headline {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 300;
  text-transform: lowercase;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #1a292c;
  position: relative;
  z-index: 1;
}

.line-wrap {
  display: block;
  overflow: hidden;
}

.line-inner {
  display: block;
  transform: translateY(110%);
  will-change: transform;
}

.cycling-word {
  display: inline;
  font-weight: 600;
}

.typewriter-text {
  display: inline;
}

.typewriter-cursor {
  display: inline-block;
  font-weight: 300;
  margin-left: 1px;
  opacity: 1;
}

.typewriter-cursor.cursor-idle {
  animation: blink 0.75s step-end infinite;
}

.typewriter-cursor.cursor-hide {
  animation: none;
  opacity: 0;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.posts-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.posts-heading {
  font-size: clamp(0.75rem, 1.2vw, 0.9rem);
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.12em;
  color: #1a292c;
  opacity: 0.4;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.75rem;
  position: relative;
  z-index: 1;
}

.post-card {
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 40px rgba(26, 41, 44, 0.13);
  cursor: pointer;
  opacity: 0;
  will-change: transform, opacity;
  transform-origin: center center;
}

.post-card-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: #e0dbd2;
}



.post-card-thumb-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #e0dbd2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a09890;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.post-card-body {
  padding: 1rem 1.2rem 1.2rem;
}

.post-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a292c;
  text-transform: lowercase;
  letter-spacing: -0.01em;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(240, 237, 230, 0.75);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.lightbox.open {
  pointer-events: all;
}

.lightbox.open .lightbox-backdrop {
  opacity: 1;
}


.lightbox-panel {
  position: relative;
  z-index: 1;
  background: #f0ede6;
  border-radius: 24px;
  width: min(680px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 40px 120px rgba(26, 41, 44, 0.45);
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox.open .lightbox-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.lightbox-carousel {
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  background: #1a292c;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
}

.carousel-slide img {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.carousel-slide iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: none;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.55rem 0 0.45rem;
  background: #f0ede6;
}

.carousel-controls.hidden {
  display: none;
}

.carousel-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 10px;
  color: #1a292c;
  opacity: 0.75;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.carousel-btn:hover {
  opacity: 1;
}

.carousel-btn.faded {
  opacity: 0.3;
  color: #8aacb2;
  cursor: default;
}

.carousel-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1a292c;
  opacity: 0.18;
  transition: opacity 0.3s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.carousel-dot.on {
  opacity: 0.8;
}

.lightbox-info {
  padding: 1.1rem 1.75rem 2rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease 0.2s, transform 0.4s ease 0.2s;
}

.lightbox.open .lightbox-info {
  opacity: 1;
  transform: translateY(0);
}

.lightbox-title {
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
  color: #1a292c;
}

.lightbox-description {
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.75;
  color: #4a5c60;
}

.lightbox-links {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pdf-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1a292c;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.pdf-link-icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  text-decoration: none;
}

.pdf-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a292c;
  color: #f0ede6;
  font-size: 0.72rem;
  font-weight: 400;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pdf-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #1a292c;
}

.pdf-link:hover .pdf-tooltip {
  opacity: 1;
}

@media (max-width: 600px) {
  .page-wrap {
    padding-top: 12vh;
    gap: 3rem;
  }

  .headline {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
  }

  .posts-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.posts-heading {
  font-size: clamp(0.75rem, 1.2vw, 0.9rem);
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.12em;
  color: #1a292c;
  opacity: 0.4;
}

.posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}