:root {
  --bg: #f5f5f0;
  --bg-alt: #ffffff;
  --text: #1b1f26;
  --muted: #6d7380;
  --accent: #1d7fe0;
  --border: rgba(0, 0, 0, 0.08);
  --glass: rgba(255, 255, 255, 0.78);
  --blur: 18px;
  font-size: 16px;
  color-scheme: light;
}

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

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 20% 10%, #fdf9ee, #f5f5f0 30%),
    radial-gradient(circle at 80% 0%, rgba(29, 127, 224, 0.18), transparent 50%),
    #f5f5f0;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

img,
video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 40;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: transparent;
}

.nav-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: rgba(6, 11, 21, 0.9);
  border-radius: 24px;
  padding: 0.5rem 1.5rem;
  box-shadow: 0 16px 30px rgba(3, 5, 11, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.branding {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.4rem 0.8rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1d7fe0, #71d1ff);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
}

.site-label {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.site-sub {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.primary-nav {
  display: flex;
  gap: 2rem;
  font-size: 1rem;
}

.primary-nav a {
  position: relative;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.06em;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}

.primary-nav a:hover {
  color: #fff;
}

.primary-nav a:hover::after {
  transform: scaleX(1);
}

.nav-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 200ms ease, background 200ms ease;
}

.nav-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #ffffff;
}

.nav-icon:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
}

.page {
  width: min(1120px, calc(100% - clamp(2rem, 10vw, 8rem)));
  margin: 0 auto 5rem;
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.hero-layout {
  display: flex;
  flex-direction: column;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  gap: clamp(1rem, 3vw, 2rem);
  max-height: 800px;
  overflow: hidden;
}
.hero-layout .post-card {
  width: 100%;
}

.stream {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 3vw, 2rem);
}

.layout-block {
  width: 100%;
  display: block;
}

#other-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.layout-block:empty,
.layout-row:empty,
.normal-grid:empty {
  display: none;
}

.layout-row {
  display: grid;
  gap: clamp(1rem, 3vw, 2rem);
}

.layout-row.small-big {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: stretch;
  gap: clamp(1.5rem, 3vw, 3rem);
}

.layout-row.big-small {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(1.5rem, 3vw, 3rem);
}

.layout-block > .post-card,
.layout-row > .post-card {
  width: 100%;
}

.normal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 2.5vw, 2.5rem);
}

.loading {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
}

.post-card {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 40px rgba(0, 0, 0, 0.08);
}

.layout-normal {
  border: none;
  box-shadow: none;
  background: transparent;
  padding-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.layout-normal::before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: var(--border);
  margin-bottom: 1rem;
}

.layout-normal .post-body {
  position: static;
  background: transparent;
  padding: 0;
  box-shadow: none;
  border-radius: 0;
}

.layout-normal .post-body::after {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  background: var(--border);
  margin-top: 1rem;
}

.layout-normal .post-body .topic {
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  color: #1c1f26;
}

.layout-normal .post-body .title {
  font-size: 1.5rem;
  margin-top: 0.4rem;
}

.layout-normal .post-body .description {
  color: var(--muted);
}

.layout-normal .media-wrap {
  order: 2;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: transparent;
  box-shadow: none;
  min-height: auto;
}

.layout-normal .media-wrap img,
.layout-normal .media-wrap video {
  border-radius: 18px;
  order: 2;
  min-height: 220px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.08);
}

.layout-normal .post-body {
  order: 1;
}

.post-card .media-wrap {
  position: relative;
  min-height: 320px;
  display: flex;
  flex: 1;
  overflow: hidden;
}

.post-card .media-wrap img,
.post-card .media-wrap video {
  width: 100%;
  height: 100%;
  min-height: 100%;
  min-width: 100%;
  object-fit: cover;
  background-color: #d9d9d9;
}

.post-card .media-wrap video {
  display: none;
}

.post-card.video .media-wrap video {
  display: block;
}

.post-card.video .media-wrap img {
  display: none;
}

.post-body {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--glass);
  border-radius: 18px;
  backdrop-filter: blur(var(--blur));
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.post-body .topic {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-body .title {
  margin: 0;
  font-family: "Source Serif 4", "Times New Roman", serif;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.post-body .description {
  margin: 0;
  color: var(--muted);
}

.post-link {
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.post-link::after {
  content: "→";
  transition: transform 200ms ease;
}

.post-link:hover::after {
  transform: translateX(4px);
}

.layout-hero {
  width: 100%;
  min-height: 520px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  max-height: 800px;
  overflow: hidden;
}

.layout-hero:hover {
  transform: none;
  box-shadow: none;
}

.layout-hero .post-body {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 35px 80px rgba(27, 31, 38, 0.25);
  transition: background 260ms ease, transform 260ms ease;
}

.layout-hero .media-wrap,
.layout-big-post .media-wrap {
  min-height: 520px;
  border-radius: 0;
  max-height: 800px;
}

.layout-hero .post-body,
.layout-other-section .post-body {
  position: absolute;
  left: clamp(1rem, 4vw, 2.5rem);
  right: clamp(1rem, 4vw, 2.5rem);
  bottom: clamp(1rem, 3vw, 2rem);
  color: var(--text);
  border-radius: 24px;
  z-index: 1;
  transition: background 260ms ease, transform 260ms ease, color 260ms ease;
}

.layout-hero .post-body .topic,
.layout-other-section .post-body .topic,
.layout-big-post .post-body .topic {
  color: var(--muted);
}

.layout-other-section .post-body {
  left: clamp(2rem, 5vw, 4rem);
  right: auto;
  width: min(360px, 55%);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 25px 60px rgba(27, 31, 38, 0.18);
  border-radius: 26px;
}

.layout-hero .post-body .title {
  transition: color 260ms ease;
}

.layout-hero:hover .post-body {
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(255, 233, 212, 0.95));
  transform: translateY(-6px);
}

.layout-hero:hover .post-body .title {
  color: #ff4b00;
}

.layout-other-section .post-body {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 25px 60px rgba(27, 31, 38, 0.18);
}

.layout-small-left {
  border: none;
  box-shadow: none;
  padding: 0 0 1rem;
}

.layout-small-left .post-body {
  position: static;
  inset: auto;
  background: transparent;
  box-shadow: none;
  padding: 0 0 1rem;
  border-radius: 0;
}

.layout-small-left .post-body::before {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  background: var(--border);
  margin-bottom: 0.75rem;
}

.layout-small-left .post-body .topic {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: #262a34;
}

.layout-small-left .post-body .title {
  font-size: 1.5rem;
  color: var(--text);
}

.layout-small-left .post-body .description {
  color: var(--muted);
}

.layout-small-left .media-wrap {
  order: 2;
  min-height: 200px;
  max-height: 260px;
  border-radius: 22px;
  margin-top: auto;
}

.layout-small-right {
  border: none;
  box-shadow: none;
  padding: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.layout-small-right .post-body {
  position: static;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

.layout-small-right .post-body::before {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  background: var(--border);
  margin-bottom: 0.7rem;
}

.layout-small-right .post-body .topic {
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  color: #1a1e28;
}

.layout-small-right .post-body .title {
  font-size: 1.45rem;
}

.layout-small-right .post-body .description {
  color: var(--muted);
}

.layout-small-right .media-wrap {
  min-height: 220px;
  border-radius: 22px;
}

.layout-big-right .post-body {
  left: auto;
  width: min(420px, 70%);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 30px 80px rgba(23, 27, 37, 0.25);
}

.layout-big-right:hover .post-body {
  transform: translateY(-6px);
}

.layout-big-post {
  position: relative;
  min-height: 520px;
  padding: clamp(1rem, 3vw, 2.5rem);
  border-radius: 36px;
  background: linear-gradient(145deg, #fdfaf4, #f6f1e7);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.layout-big-post::before {
  content: "";
  position: absolute;
  inset: clamp(1.4rem, 3vw, 2.6rem);
  border-radius: 28px;
  background-image: repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.05) 0,
      rgba(0, 0, 0, 0.05) 1px,
      transparent 1px,
      transparent 32px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.05) 0,
      rgba(0, 0, 0, 0.05) 1px,
      transparent 1px,
      transparent 32px
    );
  opacity: 0.6;
}

.layout-big-post .media-wrap {
  position: absolute;
  inset: clamp(1.4rem, 3vw, 2.6rem);
  border-radius: 26px;
  box-shadow: 0 45px 85px rgba(18, 20, 30, 0.25);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.layout-big-post .post-body {
  position: absolute;
  left: clamp(2.4rem, 6vw, 4rem);
  bottom: clamp(1.4rem, 4vw, 3rem);
  width: min(420px, 60%);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 35px 80px rgba(20, 19, 35, 0.2);
  border-radius: 24px;
  padding: clamp(1.2rem, 3vw, 2rem);
}

.layout-big-post .post-body .title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.layout-big-left,
.layout-big-right {
  min-height: 360px;
}

.layout-big-left {
  position: relative;
  border-radius: 32px;
  padding: clamp(1rem, 3vw, 2rem);
  background: linear-gradient(135deg, #fef4ef, #ffd1c2);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.layout-big-left .media-wrap {
  border-radius: 24px;
  min-height: 360px;
  box-shadow: 0 35px 90px rgba(140, 74, 58, 0.3);
}

.layout-big-left .post-body {
  position: absolute;
  left: clamp(2rem, 4vw, 3rem);
  bottom: clamp(1.5rem, 4vw, 3.5rem);
  width: min(420px, 70%);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 30px 70px rgba(137, 71, 50, 0.35);
  border-radius: 24px;
}

.layout-big-left .post-body .title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.layout-big-right {
  position: relative;
}

.layout-small-left,
.layout-small-right {
  min-height: 320px;
}

.layout-other-section {
  min-height: 360px;
  border: none;
  border-radius: 0;
  background: #f9f3e9;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.05);
  transform: none;
  width: 100%;
  max-height: 800px;
  overflow: hidden;
  position: relative;
}

.layout-other-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0, 0, 0, 0.06) 1px, transparent 1px),
    radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 18px 18px, 40px 40px;
  opacity: 0.4;
  pointer-events: none;
}

.layout-other-section .media-wrap {
  min-height: 420px;
  max-height: 800px;
  border-radius: 0;
  mix-blend-mode: multiply;
  opacity: 0.7;
}

.layout-other-section:hover {
  transform: none;
  box-shadow: none;
}

.site-footer {
  padding: 2rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(15px);
}

.footer-title {
  margin: 0;
  font-weight: 600;
}

.footer-sub {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
}

@media (max-width: 900px) {
  .layout-row.small-big,
  .layout-row.big-small {
    grid-template-columns: 1fr;
  }

  .normal-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 640px) {
  .nav-shell {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-nav {
    justify-content: space-between;
    width: 100%;
  }

  .branding {
    justify-content: space-between;
  }

  .nav-icon {
    align-self: flex-end;
  }
}
.layout-big-post,
.layout-row .post-card {
  border-radius: 32px;
}

.layout-hero .post-body {
  border-radius: 24px;
}
