:root {
  --bg: #f6f3ec;
  --paper: #fffaf0;
  --ink: #1e2528;
  --muted: #66706f;
  --line: #ded8cc;
  --accent: #1f7a6d;
  --accent-dark: #14534b;
  --warm: #c05f3b;
  --shadow: 0 24px 70px rgba(30, 37, 40, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.85), rgba(246, 243, 236, 0.95)),
    url("https://images.unsplash.com/photo-1456513080510-7bf3a84b82f8?auto=format&fit=crop&w=1800&q=80");
  background-attachment: fixed;
  background-size: cover;
  color: var(--ink);
  font-family: "Noto Sans SC", "Inter", system-ui, sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(222, 216, 204, 0.9);
  background: rgba(255, 250, 240, 0.84);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-family: "Inter", sans-serif;
  font-weight: 700;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  padding: 10px 12px;
  border-radius: 7px;
}

.nav a:hover,
.nav-cta {
  background: rgba(31, 122, 109, 0.11);
  color: var(--accent-dark);
}

.hero {
  min-height: 78vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(32px, 7vw, 88px);
  align-items: center;
  padding: clamp(56px, 9vw, 112px) clamp(20px, 5vw, 72px) 48px;
}

.hero-copy {
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--warm);
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 24px;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 1.03;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.hero-text {
  max-width: 680px;
  color: #485250;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  font-weight: 700;
}

.button.primary {
  background: var(--ink);
  color: var(--paper);
}

.button.secondary {
  background: rgba(255, 250, 240, 0.64);
}

.research-panel {
  display: grid;
  gap: 24px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(222, 216, 204, 0.92);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.86);
  box-shadow: var(--shadow);
}

.panel-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.research-panel strong {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.16;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metric-grid span {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(246, 243, 236, 0.78);
  color: var(--muted);
}

.metric-grid b {
  display: block;
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 28px;
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 76px;
}

.intro-strip {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #485250;
  font-size: 18px;
  line-height: 1.8;
}

.intro-strip p,
.about p {
  margin-bottom: 0;
}

.section-heading {
  margin-bottom: 24px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.post-card {
  display: flex;
  min-height: 292px;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid rgba(222, 216, 204, 0.94);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.9);
}

.post-meta {
  color: var(--muted);
  font-size: 13px;
}

.post-card p {
  color: #54605f;
  line-height: 1.7;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(31, 122, 109, 0.1);
  color: var(--accent-dark);
  font-size: 12px;
}

.split {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 36px;
  align-items: start;
}

.project-list {
  display: grid;
  gap: 14px;
}

.project-list article {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.project-list span {
  color: var(--warm);
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.project-list p,
.about p {
  color: #54605f;
  line-height: 1.8;
}

.about {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 36px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 5vw, 72px);
  color: var(--muted);
  font-size: 14px;
}

.admin-body {
  min-height: 100vh;
  background: var(--bg);
}

.admin-shell {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 80px;
}

.admin-header,
.editor-row,
.admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-header {
  margin-bottom: 28px;
}

.admin-header h1 {
  margin-bottom: 0;
  font-size: clamp(34px, 5vw, 58px);
}

.admin-login,
.editor-card {
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.94);
}

.admin-login {
  max-width: 440px;
}

.admin-editor label,
.admin-login label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  line-height: 1.5;
}

input {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 10px 12px;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(31, 122, 109, 0.16);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.repeat-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 10px;
  margin-bottom: 10px;
}

.repeat-card {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(246, 243, 236, 0.72);
}

.repeat-card h3 {
  margin-bottom: 0;
}

.repeat-row button,
.repeat-card button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf8;
  color: var(--muted);
  cursor: pointer;
}

.admin-actions {
  position: sticky;
  bottom: 0;
  padding: 16px 0;
  background: linear-gradient(180deg, rgba(246, 243, 236, 0), var(--bg) 30%);
}

.form-message {
  margin: 0;
  color: var(--accent-dark);
  font-weight: 700;
}

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

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

  .hero,
  .split,
  .about {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 44px;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }

  .form-grid,
  .repeat-row {
    grid-template-columns: 1fr;
  }

  .admin-header,
  .editor-row,
  .admin-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }
}
