:root {
  --ink: #18211d;
  --paper: #fffaf1;
  --muted: #68736a;
  --sage: #7d9678;
  --gold: #c99a3d;
  --coral: #c8674e;
  --clay: #7b4937;
  --cream: #f2eadc;
  --line: rgba(24, 33, 29, 0.14);
  --shadow: 0 24px 70px rgba(24, 33, 29, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, system-ui, sans-serif;
}

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

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  color: #fffaf1;
  background: linear-gradient(180deg, rgba(18, 24, 22, 0.82), rgba(18, 24, 22, 0));
}

.site-header.solid {
  background: rgba(18, 24, 22, 0.95);
}

.brand,
.nav-links,
.hero-actions,
.split-feature,
.admin-card-head,
.admin-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 250, 241, 0.65);
  border-radius: 50%;
  font-family: "Libre Baskerville", Georgia, serif;
}

.nav-links {
  gap: 8px;
}

.nav-links a {
  padding: 10px 12px;
  border-radius: 999px;
  color: rgba(255, 250, 241, 0.88);
  font-size: 0.94rem;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 250, 241, 0.14);
}

.menu-toggle {
  display: none;
}

.icon-button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 128px clamp(18px, 6vw, 88px) 72px;
  color: #fffaf1;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 23, 20, 0.9), rgba(17, 23, 20, 0.55) 48%, rgba(17, 23, 20, 0.2)),
    url("assets/hero-writing-desk.png") center / cover;
  transform: scale(1.01);
}

.hero-copy {
  position: relative;
  width: min(720px, 100%);
}

.eyebrow,
.section-kicker,
.tag {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1,
h2 {
  font-family: "Libre Baskerville", Georgia, serif;
}

h1 {
  max-width: 960px;
  font-size: clamp(3.7rem, 10vw, 9rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 4rem);
}

h3 {
  font-size: 1.12rem;
}

p {
  line-height: 1.7;
}

.hero-text,
.page-hero p,
.section-heading p,
.intro p:last-child,
.split-feature p,
.reader-note p,
.contact-details p {
  color: var(--muted);
  font-size: 1.03rem;
}

.hero-text {
  max-width: 620px;
  margin: 22px 0 30px;
  color: rgba(255, 250, 241, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 800;
}

.button.primary {
  color: #18211d;
  background: var(--gold);
}

.button.secondary {
  border-color: rgba(255, 250, 241, 0.5);
  color: #fffaf1;
  background: rgba(255, 250, 241, 0.09);
}

.button.small {
  min-height: 42px;
  align-self: flex-start;
  padding: 0 16px;
  color: #fffaf1;
  background: var(--ink);
}

.button.quiet {
  border-color: var(--line);
  color: var(--ink);
  background: #fffdf7;
}

.button.danger {
  color: #7d2417;
}

.section-wrap,
.section-band,
.page-hero,
.admin-hero {
  padding: clamp(64px, 8vw, 112px) clamp(18px, 6vw, 88px);
}

.section-band {
  background: var(--cream);
}

.page-main,
.admin-main {
  padding-top: 78px;
}

.page-hero,
.admin-hero {
  background: var(--cream);
}

.page-hero.warm {
  background: #efe0d2;
}

.page-hero p,
.admin-hero p {
  max-width: 760px;
}

.intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 44px);
  align-items: start;
}

.bio-copy {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 760px);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.author-portrait {
  overflow: hidden;
  width: 100%;
  max-width: 320px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
  box-shadow: var(--shadow);
}

.bio-copy p {
  margin-top: 0;
}

.author-portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 34px;
}

.highlight-grid,
.work-grid,
.updates-list,
.contact-links {
  display: grid;
  gap: 18px;
}

.highlight-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.highlight-grid article,
.work-card,
.post-card,
.reader-note,
.contact-panel,
.contact-details,
.admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
  box-shadow: var(--shadow);
}

.highlight-grid article {
  padding: 24px;
}

.highlight-grid p:not(.tag),
.work-copy p,
.post-card p {
  color: var(--muted);
}

.split-feature {
  justify-content: space-between;
  gap: 28px;
}

.split-feature div {
  max-width: 780px;
}

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

.work-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.book-cover {
  min-height: 260px;
  display: grid;
  place-items: center;
  padding: 28px 22px;
  color: #fffaf1;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.25rem, 1.8vw, 1.65rem);
  line-height: 1.18;
  text-align: center;
  overflow-wrap: break-word;
  hyphens: auto;
}

.cover-1 {
  background: linear-gradient(135deg, #17251f, #7d9678);
}

.cover-2 {
  background: linear-gradient(135deg, #7b4937, #c99a3d);
}

.cover-3 {
  background: linear-gradient(135deg, #18211d, #c8674e);
}

.work-copy {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 24px;
}

.work-copy strong {
  color: var(--clay);
}

.updates-layout,
.contact-layout,
.admin-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 24px;
  align-items: start;
}

.updates-layout {
  max-width: 1180px;
  margin: 0 auto;
  grid-template-columns: minmax(0, 720px) minmax(280px, 340px);
}

.updates-list {
  min-width: 0;
}

.post-card,
.reader-note,
.contact-panel,
.contact-details,
.admin-card {
  padding: 26px;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  color: var(--coral);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-form,
.admin-editor,
.repeat-list {
  display: grid;
  gap: 18px;
}

.contact-form label,
.admin-editor label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.contact-form input,
.contact-form textarea,
.admin-editor input,
.admin-editor textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fffaf1;
}

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

.access-body {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(17, 23, 20, 0.9), rgba(17, 23, 20, 0.48)),
    url("assets/hero-writing-desk.png") center / cover;
}

.access-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.access-panel {
  width: min(520px, 100%);
  border: 1px solid rgba(255, 250, 241, 0.24);
  border-radius: 8px;
  padding: clamp(28px, 5vw, 46px);
  color: #fffaf1;
  background: rgba(17, 23, 20, 0.86);
  box-shadow: var(--shadow);
}

.access-panel h1 {
  font-size: clamp(2.5rem, 7vw, 4.6rem);
}

.access-panel p:not(.eyebrow) {
  color: rgba(255, 250, 241, 0.76);
}

.access-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.access-form label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.checkbox-label {
  grid-template-columns: auto 1fr;
  align-items: center;
  color: rgba(255, 250, 241, 0.84);
  font-size: 0.94rem;
}

.checkbox-label input {
  width: 18px;
  min-height: 18px;
}

.access-form input {
  min-height: 48px;
  border: 1px solid rgba(255, 250, 241, 0.22);
  border-radius: 8px;
  padding: 0 14px;
  color: #fffaf1;
  background: rgba(255, 250, 241, 0.08);
}

.access-form .form-note {
  color: #f3c088;
}

.preview-body {
  min-height: 100vh;
  background: #efe6d8;
}

.preview-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(28px, 5vw, 56px);
  color: #fffaf1;
  background: #111714;
}

.preview-header h1 {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 28px;
  padding: clamp(24px, 5vw, 56px);
}

.preview-device {
  display: grid;
  gap: 12px;
}

.device-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.device-head h2 {
  font-size: 1.35rem;
}

.device-head a {
  color: var(--clay);
  font-weight: 800;
}

.preview-device iframe {
  width: min(390px, 100%);
  height: 844px;
  border: 12px solid #111714;
  border-radius: 28px;
  background: #fffaf1;
  box-shadow: var(--shadow);
}

.contact-links a {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.contact-links span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-main {
  background: #f7f0e5;
}

.admin-shell {
  padding: 0 clamp(18px, 6vw, 88px) clamp(64px, 8vw, 112px);
}

.admin-tabs {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 8px;
}

.admin-tabs button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  color: var(--ink);
  background: #fffdf7;
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}

.admin-tabs button.active {
  color: #fffaf1;
  background: var(--ink);
}

.admin-card {
  display: grid;
  gap: 16px;
}

.admin-card-head,
.admin-actions {
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--clay);
  background: #fffdf7;
  font-weight: 800;
}

.admin-help {
  margin: 0;
  color: var(--muted);
}

.security-fields {
  display: grid;
  gap: 16px;
}

.repeat-item {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.repeat-item legend {
  padding: 0 8px;
  font-weight: 800;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(18px, 6vw, 88px);
  color: rgba(255, 250, 241, 0.78);
  background: #111714;
}

.site-footer p {
  margin: 0;
}

.footer-contact {
  flex: 0 0 auto;
}

@media (max-width: 920px) {
  .site-header {
    background: rgba(18, 24, 22, 0.95);
  }

  .nav-links {
    position: absolute;
    top: 74px;
    left: 18px;
    right: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid rgba(255, 250, 241, 0.18);
    border-radius: 8px;
    padding: 10px;
    background: #111714;
  }

  .nav-links.open {
    display: flex;
  }

  .menu-toggle {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(255, 250, 241, 0.35);
    border-radius: 50%;
  }

  .menu-toggle span {
    width: 18px;
    height: 2px;
    background: currentColor;
  }

  .intro,
  .highlight-grid,
  .work-grid,
  .updates-layout,
  .contact-layout,
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .bio-copy {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .author-portrait {
    width: min(340px, 100%);
    max-width: none;
  }

  .admin-tabs {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: clamp(3rem, 18vw, 5rem);
  }

  .hero {
    min-height: 88vh;
    padding-top: 116px;
  }

  .split-feature,
  .admin-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-contact {
    width: 100%;
  }

  .admin-tabs {
    grid-template-columns: 1fr;
  }

  .preview-header {
    align-items: stretch;
    flex-direction: column;
  }

  .preview-device iframe {
    height: 760px;
  }
}
