:root {
  color-scheme: light;
  --bg-top: #fff5d6;
  --bg-bottom: #f4f7fb;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.97);
  --line: rgba(34, 53, 91, 0.14);
  --line-strong: rgba(34, 53, 91, 0.22);
  --text: #10203f;
  --muted: #5d6880;
  --accent: #d96d3d;
  --accent-strong: #b8542d;
  --accent-soft: rgba(217, 109, 61, 0.14);
  --shadow: 0 24px 60px rgba(42, 62, 110, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(217, 109, 61, 0.18), transparent 32%),
    radial-gradient(circle at left 22%, rgba(28, 112, 175, 0.12), transparent 28%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  filter: blur(8px);
  opacity: 0.55;
  pointer-events: none;
}

body::before {
  top: 4rem;
  right: -6rem;
  background: rgba(255, 214, 130, 0.45);
}

body::after {
  bottom: 5rem;
  left: -7rem;
  background: rgba(93, 163, 224, 0.18);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1,
h2,
h3,
p {
  margin: 0;
}

.page-shell {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4.5rem 0 5rem;
}

.hero {
  padding: 2.4rem;
  margin-bottom: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: calc(var(--radius-xl) + 4px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 249, 235, 0.92)),
    rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: rise-in 420ms ease-out both;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -3rem -4rem auto;
  width: 14rem;
  height: 14rem;
  border-radius: 2.5rem;
  transform: rotate(20deg);
  background: linear-gradient(
    180deg,
    rgba(217, 109, 61, 0.16),
    rgba(247, 190, 93, 0.12)
  );
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-kicker,
.section-kicker,
.post-meta {
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", "Trebuchet MS", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.hero-kicker,
.section-kicker {
  font-size: 0.78rem;
  color: var(--accent-strong);
}

.hero h1 {
  max-width: 12ch;
  margin-top: 0.85rem;
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", "Trebuchet MS", sans-serif;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero-copy {
  max-width: 44rem;
  margin-top: 1rem;
  font-size: 1.03rem;
  line-height: 1.75;
  color: var(--muted);
}

.panel {
  padding: 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  animation: rise-in 520ms ease-out both;
}

.composer-panel {
  margin-bottom: 1.4rem;
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.98), rgba(255, 255, 255, 0.9)),
    var(--panel);
}

.posts-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.92)),
    var(--panel-strong);
  animation-delay: 80ms;
}

.section-heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.section-heading h2 {
  margin-top: 0.6rem;
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", "Trebuchet MS", sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.section-copy {
  margin-top: 0.75rem;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--muted);
}

.post-count {
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.8);
}

.post-form {
  margin-top: 1.35rem;
}

.field {
  display: block;
}

.field + .field {
  margin-top: 1rem;
}

.field span {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.95rem 1rem;
  font: inherit;
  color: inherit;
  background: rgba(255, 255, 255, 0.84);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.field textarea {
  min-height: 10.5rem;
  resize: vertical;
  line-height: 1.6;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #8590a6;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(217, 109, 61, 0.7);
  box-shadow: 0 0 0 4px var(--accent-soft);
  background: rgba(255, 255, 255, 0.96);
  transform: translateY(-1px);
}

.form-footer {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}

.form-note {
  font-size: 0.92rem;
  color: var(--muted);
}

.submit-button {
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.35rem;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background:
    linear-gradient(135deg, #e37b44, #c95c33 56%, #aa4727),
    var(--accent);
  box-shadow: 0 16px 28px rgba(201, 92, 51, 0.28);
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.submit-button:hover,
.submit-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px rgba(201, 92, 51, 0.32);
  filter: saturate(1.05);
}

.submit-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.posts-list {
  list-style: none;
  padding: 0;
  margin: 1.35rem 0 0;
  display: grid;
  gap: 1rem;
}

.post-card {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-lg) + 2px);
  padding: 1.2rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 255, 0.95));
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 32px rgba(42, 62, 110, 0.08);
}

.post-meta {
  font-size: 0.72rem;
  color: var(--accent-strong);
}

.post-card h3 {
  margin-top: 0.55rem;
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", "Trebuchet MS", sans-serif;
  font-size: 1.45rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.post-card p:last-child {
  margin-top: 0.7rem;
  line-height: 1.7;
  color: var(--muted);
  white-space: pre-wrap;
}

.empty-state {
  margin-top: 1.35rem;
  padding: 1.5rem;
  border: 1px dashed var(--line-strong);
  border-radius: calc(var(--radius-lg) + 2px);
  background: rgba(255, 255, 255, 0.72);
}

.empty-state h3 {
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", "Trebuchet MS", sans-serif;
  font-size: 1.3rem;
}

.empty-state p {
  margin-top: 0.5rem;
  line-height: 1.65;
  color: var(--muted);
}

@media (min-width: 860px) {
  .page-shell {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    gap: 1.4rem;
    align-items: start;
  }

  .hero {
    grid-column: 1 / -1;
  }

  .composer-panel {
    margin-bottom: 0;
    position: sticky;
    top: 1.5rem;
  }
}

@media (max-width: 859px) {
  .page-shell {
    padding-top: 2.5rem;
  }

  .hero,
  .panel {
    padding: 1.35rem;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100%, calc(100% - 1rem));
    padding-bottom: 3rem;
  }

  .hero h1 {
    max-width: none;
  }

  .form-footer {
    align-items: stretch;
  }

  .submit-button {
    width: 100%;
    justify-content: center;
  }
}
