:root {
  --background: #f3f5f3;
  --foreground: #17231f;
  --card: #ffffff;
  --border: #cfd8d4;
  --gold-dark: #76551c;
  --gold-light: #e3cb91;
  --green-dark: #082b25;
  --green-mid: #0d3b32;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --shell: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.68;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-display); }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.shell,
.section-shell,
.header-inner {
  margin-inline: auto;
  max-width: var(--shell);
  width: calc(100% - 3rem);
}

.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 750;
  gap: 0.55rem;
  justify-content: center;
  min-height: 3.2rem;
  padding: 0.7rem 1.45rem;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible { outline: 3px solid rgba(118, 85, 28, 0.34); outline-offset: 3px; }
.button svg { height: 1.1rem; width: 1.1rem; }
.primary-action {
  background: var(--green-mid);
  color: #ffffff !important;
  box-shadow: 0 12px 28px rgba(8, 43, 37, 0.18);
}
.primary-action:hover,
.primary-action:focus-visible { background: var(--green-dark); color: #ffffff !important; }
.secondary-action { background: #ffffff; border-color: #9fafaa; color: #213c34; }
.secondary-action:hover { background: #edf2f0; border-color: #71847c; }

.eyebrow {
  color: var(--gold-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.15em;
  margin-bottom: 1.05rem;
  text-transform: uppercase;
}

.site-header {
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(13, 59, 50, 0.14);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner { align-items: center; display: flex; justify-content: space-between; min-height: 86px; }
.brand { align-items: center; display: flex; gap: 0.85rem; }
.brand img { border-radius: 50%; height: 58px; width: 58px; }
.brand > span { display: flex; flex-direction: column; line-height: 1.25; }
.brand strong { font-family: var(--font-display); font-size: 1.12rem; }
.brand small { color: #52605a; font-size: 0.76rem; letter-spacing: 0.045em; }
nav { display: flex; gap: clamp(1.2rem, 3vw, 2.6rem); }
nav a { color: #35443e; font-size: 0.92rem; font-weight: 700; }
nav a::after {
  background: var(--gold-dark);
  content: "";
  display: block;
  height: 2px;
  margin-top: 0.2rem;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}
nav a:hover::after,
nav a:focus-visible::after { transform: scaleX(1); }

.hero {
  align-items: center;
  display: grid;
  gap: clamp(3rem, 7vw, 6.5rem);
  grid-template-columns: minmax(0, 1.18fr) minmax(330px, 0.82fr);
  min-height: min(760px, calc(100vh - 86px));
  padding-block: clamp(4.5rem, 8vw, 7rem);
}
.hero-copy { max-width: 720px; }
.hero h1 {
  color: var(--green-dark);
  font-size: clamp(4rem, 7.6vw, 7.35rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.9;
  margin-bottom: 1.8rem;
  max-width: 800px;
}
.hero-roles {
  color: #233d35;
  font-size: clamp(1.08rem, 1.65vw, 1.32rem);
  font-weight: 750;
  line-height: 1.55;
  margin-bottom: 1rem;
  max-width: 720px;
}
.hero-lead { color: #495a53; font-size: clamp(1rem, 1.35vw, 1.16rem); line-height: 1.75; max-width: 660px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }
.location { align-items: center; color: #5c6a65; display: flex; font-size: 0.9rem; gap: 0.45rem; margin: 1.3rem 0 0; }
.location svg { height: 1.05rem; width: 1.05rem; }
.hero-visual { justify-self: end; max-width: 420px; width: 100%; }
.portrait-card {
  background: var(--green-dark);
  border: 1px solid #b58d42;
  border-radius: 16rem 16rem 1.25rem 1.25rem;
  box-shadow: 0 28px 70px rgba(8, 43, 37, 0.25);
  padding: 1.05rem;
  position: relative;
}
.portrait {
  aspect-ratio: 4 / 5;
  border-radius: 15rem 15rem 0.72rem 0.72rem;
  height: auto;
  object-fit: cover;
  object-position: 50% 15%;
  width: 100%;
}
.hero-logo {
  background: #fff;
  border: 4px solid var(--green-dark);
  border-radius: 50%;
  bottom: -2.1rem;
  box-shadow: 0 14px 32px rgba(8, 43, 37, 0.26);
  height: clamp(94px, 10vw, 126px);
  left: -2.3rem;
  position: absolute;
  width: clamp(94px, 10vw, 126px);
}

.section-shell { padding-block: clamp(5.5rem, 9vw, 8rem); }
.section-intro { max-width: 760px; }
.section-intro.compact { max-width: 660px; }
.section-intro h2,
.contact-copy h2,
.messages-heading h1 {
  color: var(--green-dark);
  font-size: clamp(2.45rem, 4.7vw, 4.3rem);
  font-weight: 500;
  letter-spacing: -0.038em;
  line-height: 1.05;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.biography-grid { display: grid; gap: clamp(2.5rem, 6vw, 6rem); grid-template-columns: 1.15fr 0.85fr; }
.prose { border-left: 3px solid #9a7730; padding-left: clamp(1.5rem, 3vw, 2.8rem); }
.prose p { color: #35463f; font-family: var(--font-display); font-size: clamp(1.1rem, 1.65vw, 1.3rem); line-height: 1.85; }
.prose p:last-child { margin-bottom: 0; }
.credentials { background: #fff; border: 1px solid #cfd9d5; border-radius: 1rem; box-shadow: 0 18px 45px rgba(23, 35, 31, 0.07); padding: 0.6rem 1.75rem; }
.credentials div { border-bottom: 1px solid #dce3e0; display: grid; gap: 0.2rem; padding: 1.25rem 0; }
.credentials div:last-child { border-bottom: 0; }
.credentials svg { color: var(--gold-dark); height: 1.35rem; margin-bottom: 0.25rem; width: 1.35rem; }
.credentials span { color: #213c34; font-weight: 750; }
.credentials small { color: #5c6a65; font-size: 0.86rem; }

.research-band { background: var(--green-mid); color: #fff; }
.research-band .section-intro h2 { color: #fff; }
.research-band .eyebrow { color: var(--gold-light); }
.research-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
.research-grid article { border-left: 1px solid rgba(255, 255, 255, 0.28); padding: 0.5rem 1.8rem 0.7rem; }
.research-grid article:first-child { border-left: 0; padding-left: 0; }
.research-grid svg { color: var(--gold-light); height: 1.7rem; width: 1.7rem; }
.research-grid h3 { font-size: 1.45rem; margin: 1.1rem 0 0.65rem; }
.research-grid p { color: #d7e2de; line-height: 1.72; margin: 0; }

.works-list { border-top: 1px solid #bcc9c4; }
.works-list article { align-items: start; border-bottom: 1px solid #bcc9c4; display: grid; gap: clamp(1.2rem, 4vw, 4rem); grid-template-columns: 64px 1fr; padding: 2rem 0; }
.work-number { color: var(--gold-dark); font-family: var(--font-display); font-size: 1.2rem; }
.work-category { color: #6d551f; font-size: 0.75rem; font-weight: 850; letter-spacing: 0.12em; margin-bottom: 0.35rem; text-transform: uppercase; }
.works-list h3 { color: var(--green-dark); font-size: clamp(1.45rem, 2.4vw, 2.05rem); margin-bottom: 0.4rem; }
.works-list article p:last-child { color: #4c5d56; margin-bottom: 0; max-width: 760px; }

.service-section { background: #fff; }
.service-inner { display: grid; gap: clamp(3rem, 7vw, 6rem); grid-template-columns: 0.85fr 1.15fr; }
.service-list article { align-items: start; border-top: 1px solid #d4ddda; display: grid; gap: 1.25rem; grid-template-columns: 48px 1fr; padding: 1.55rem 0; }
.service-list article:last-child { border-bottom: 1px solid #d4ddda; }
.service-list svg { background: #e5ece9; border-radius: 50%; color: var(--green-mid); height: 44px; padding: 0.72rem; width: 44px; }
.service-list h3 { color: var(--green-dark); font-size: 1.35rem; margin-bottom: 0.25rem; }
.service-list p { color: #4d5e57; margin-bottom: 0; }

.contact-section { background: var(--green-dark); color: #fff; }
.contact-inner { display: grid; gap: clamp(3rem, 7vw, 6rem); grid-template-columns: 0.85fr 1.15fr; padding-block: clamp(5.5rem, 9vw, 8rem); }
.contact-copy .eyebrow { color: var(--gold-light); }
.contact-copy h2 { color: #fff; margin-bottom: 1.4rem; }
.contact-copy > p:not(.eyebrow) { color: #cfdbd7; font-size: 1.05rem; max-width: 500px; }
.contact-links { display: flex; flex-direction: column; gap: 0.85rem; margin-top: 2rem; }
.contact-links a { align-items: center; color: #fff; display: flex; font-weight: 700; gap: 0.65rem; width: fit-content; }
.contact-links a:hover { color: var(--gold-light); }
.contact-links svg { height: 1.15rem; width: 1.15rem; }
.contact-form,
.installer-form,
.login-form { background: #fff; border-radius: 1rem; color: var(--foreground); display: grid; gap: 1.05rem; padding: clamp(1.5rem, 4vw, 2.6rem); }
.contact-form label,
.installer-form label,
.login-form label { color: #233a33; display: grid; font-size: 0.9rem; font-weight: 750; gap: 0.4rem; }
.form-grid { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
input:not([type="checkbox"]),
textarea {
  background: #f8faf9;
  border: 1px solid #aab9b3;
  border-radius: 0.65rem;
  color: #16231f;
  font-size: 1rem;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  width: 100%;
}
textarea { min-height: 9rem; resize: vertical; }
input:focus-visible,
textarea:focus-visible { border-color: var(--gold-dark); box-shadow: 0 0 0 3px rgba(118, 85, 28, 0.16); outline: none; }
.honeypot { height: 1px; left: -10000px; overflow: hidden; position: absolute; width: 1px; }
.consent-row { align-items: start; display: grid !important; font-size: 0.82rem !important; font-weight: 500 !important; gap: 0.65rem !important; grid-template-columns: 18px 1fr; line-height: 1.5; }
.consent-row input { accent-color: var(--green-mid); height: 17px; margin-top: 0.18rem; width: 17px; }
.submit-button { background: var(--green-mid); color: #fff; justify-self: start; margin-top: 0.25rem; }
.submit-button:hover { background: #0a312a; }
.submit-button[disabled] { cursor: wait; opacity: 0.72; transform: none; }
.form-status { color: #1d6b4f; font-size: 0.9rem; min-height: 1.5rem; margin: 0; }
.form-status.error { color: #9d2525; }

footer { background: #061f1b; color: #d6e0dc; }
.footer-inner { align-items: center; display: flex; justify-content: space-between; min-height: 112px; }
.footer-inner p { font-size: 0.86rem; margin: 0; }
.footer-inner a { color: #fff; font-size: 0.86rem; font-weight: 700; }

[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 600ms ease, transform 600ms ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
.hero-enter { animation: hero-in 700ms both cubic-bezier(0.22, 1, 0.36, 1); }
.hero-enter-delay { animation-delay: 120ms; }

.utility-page,
.admin-page { min-height: 100vh; }
.utility-shell,
.login-shell { margin: 0 auto; max-width: 760px; padding: clamp(3rem, 8vw, 6rem) 1.5rem; }
.login-shell { max-width: 560px; }
.utility-logo { border: 1px solid #d4ddda; border-radius: 50%; box-shadow: 0 12px 28px rgba(8, 43, 37, 0.12); height: 96px; margin-bottom: 1.7rem; width: 96px; }
.utility-shell > h1,
.login-shell > h1 { color: var(--green-dark); font-size: clamp(2.5rem, 7vw, 4.5rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1; margin-bottom: 1.2rem; }
.utility-lead { color: #52625b; font-size: 1.05rem; margin-bottom: 2rem; }
.utility-actions,
.admin-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.notice { background: #fff; border: 1px solid #cad6d1; border-radius: 0.9rem; margin: 1.5rem 0; padding: 1.25rem 1.4rem; }
.notice h2 { color: var(--green-dark); margin-bottom: 0.4rem; }
.notice p:last-child { margin-bottom: 0; }
.success-notice { border-left: 4px solid #287658; }
.error-notice { border-left: 4px solid #a12d2d; color: #7d2424; }
.error-notice ul { margin-bottom: 0; }
.installer-form { box-shadow: 0 20px 50px rgba(23, 35, 31, 0.08); }
.installer-form fieldset { border: 0; border-top: 1px solid #d7e0dc; display: grid; gap: 1rem; margin: 0; padding: 1.8rem 0 0; }
.installer-form fieldset:first-of-type { border-top: 0; padding-top: 0; }
.installer-form legend { color: var(--green-dark); font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; margin-bottom: 1rem; padding: 0; }
.installer-form small { color: #64716c; font-weight: 500; }
.login-form { box-shadow: 0 20px 50px rgba(23, 35, 31, 0.08); margin-top: 2rem; }
.back-link { color: #41554d; display: inline-block; font-weight: 700; margin-top: 1.5rem; }

.messages-page { min-height: 100vh; padding-block: 4rem; }
.messages-heading { align-items: end; display: flex; justify-content: space-between; margin-bottom: 2rem; }
.messages-heading h1 { margin-bottom: 0.4rem; }
.messages-heading p { color: #56665f; margin: 0; }
.admin-actions form { margin: 0; }
.message-list { display: grid; gap: 1rem; }
.message-card { background: #fff; border: 1px solid #ccd7d2; border-radius: 0.9rem; padding: 1.5rem; }
.message-meta { color: #5b6a64; display: flex; flex-wrap: wrap; font-size: 0.82rem; gap: 0.8rem; }
.message-meta a { color: #185943; font-weight: 700; }
.message-card h2 { color: var(--green-dark); font-size: 1.45rem; margin: 0.75rem 0 0.5rem; }
.message-card p { margin-bottom: 0.9rem; white-space: pre-wrap; }
.reply-link { color: #76551c; font-size: 0.88rem; font-weight: 750; }
.empty-messages { background: #fff; border: 1px solid #ccd7d2; border-radius: 0.9rem; padding: 2rem; }

@keyframes hero-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { max-width: 780px; }
  .hero-visual { justify-self: center; margin-top: 1rem; max-width: 390px; }
  .biography-grid,
  .service-inner,
  .contact-inner { grid-template-columns: 1fr; }
  .research-grid { grid-template-columns: 1fr; }
  .research-grid article,
  .research-grid article:first-child { border-left: 0; border-top: 1px solid rgba(255,255,255,0.28); padding: 1.5rem 0; }
}

@media (max-width: 680px) {
  .shell,
  .section-shell,
  .header-inner { width: calc(100% - 2.2rem); }
  .header-inner { min-height: 74px; }
  .brand img { height: 48px; width: 48px; }
  .brand strong { font-size: 1rem; }
  .brand small { display: none; }
  nav { display: none; }
  .hero { padding-block: 3.5rem 5.5rem; }
  .hero h1 { font-size: clamp(3.45rem, 17vw, 5.1rem); }
  .hero-actions { flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .hero-logo { bottom: -1.8rem; left: -0.7rem; }
  .form-grid { grid-template-columns: 1fr; }
  .works-list article { grid-template-columns: 42px 1fr; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; }
  .messages-heading { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .admin-actions { width: 100%; }
  .admin-actions .button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
