:root {
  --page: #f5efe4;
  --ink: #1e1713;
  --muted: #6f655d;
  --panel: rgba(255, 248, 239, 0.74);
  --border: rgba(68, 44, 21, 0.12);
  --accent: #ab4f2f;
  --accent-soft: #efc28d;
  --forest: #2f5b4d;
  --shadow: 0 24px 80px rgba(36, 23, 12, 0.14);
}

* {
  box-sizing: border-box;
}

body.public-body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(171, 79, 47, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(47, 91, 77, 0.16), transparent 30%),
    linear-gradient(180deg, #fbf7f1, #f2eadf 52%, #efe5d7);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  min-height: 100vh;
}

.public-noise {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(43, 24, 10, 0.03) 1px, transparent 1px);
  background-size: 12px 12px;
  opacity: 0.5;
  pointer-events: none;
}

.public-header,
.public-main {
  position: relative;
  z-index: 1;
}

.public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.6rem;
}

.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: inherit;
  text-decoration: none;
}

.public-brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #f9cc8f);
  box-shadow: 0 0 0 8px rgba(171, 79, 47, 0.08);
}

.public-brand small,
.public-nav-link,
.public-dashboard-link,
.public-kicker,
.public-meta,
.public-tag {
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
}

.public-brand small {
  display: block;
  color: var(--muted);
}

.public-nav {
  display: inline-flex;
  gap: 0.6rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.public-nav-link,
.public-dashboard-link,
.public-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.public-nav-link {
  padding: 0.65rem 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.public-nav-link.is-active,
.public-nav-link:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  transform: translateY(-1px);
}

.public-dashboard-link,
.public-cta {
  padding: 0.75rem 1.1rem;
  background: var(--ink);
  color: #fff8f2;
  border: none;
  cursor: pointer;
}

.public-main {
  padding: 1rem 1.6rem 3rem;
}

.public-hero {
  max-width: 960px;
  padding: 2rem 0 1.4rem;
}

.public-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-size: 0.76rem;
  margin-bottom: 0.8rem;
}

.public-hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 6rem);
  line-height: 0.92;
  max-width: 13ch;
}

.public-hero p {
  max-width: 760px;
  font-size: 1.14rem;
  line-height: 1.6;
  color: #42362d;
}

.public-grid {
  display: grid;
  gap: 1rem;
}

.public-grid.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

.public-card,
.public-project-card,
.public-chat-shell {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.public-card h2,
.public-project-card h3 {
  margin-top: 0;
}

.public-project-card {
  position: relative;
  overflow: hidden;
}

.public-project-card::after {
  content: "";
  position: absolute;
  inset: auto -30% -30% auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(171, 79, 47, 0.17), transparent 64%);
}

.public-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.public-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.public-contact-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  text-decoration: none;
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: 0.82rem;
}

.public-contact-pill:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.9);
}

.public-tag {
  font-size: 0.78rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(47, 91, 77, 0.09);
  color: var(--forest);
}

.public-list {
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.7;
}

.public-project-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.public-chat-shell {
  display: grid;
  gap: 1rem;
}

.public-chat-log {
  min-height: 280px;
  max-height: 460px;
  overflow-y: auto;
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(70, 43, 20, 0.08);
}

.public-chat-message {
  margin-bottom: 1rem;
}

.public-chat-message strong {
  display: block;
  margin-bottom: 0.25rem;
}

.public-chat-form {
  display: grid;
  gap: 0.75rem;
}

.public-chat-form textarea {
  width: 100%;
  min-height: 120px;
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.78);
  font: inherit;
}

.public-chat-footnote {
  color: var(--muted);
  font-size: 0.92rem;
}

.public-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(70, 43, 20, 0.18), transparent);
  margin: 1rem 0;
}

.public-project-detail {
  display: grid;
  gap: 1rem;
}

@media (max-width: 900px) {
  .public-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .public-nav {
    width: 100%;
    overflow-x: auto;
  }
}
