
:root {
  --paper: #fbfaf7;
  --cream: #f1ece3;
  --cream-deep: #e7e0d4;
  --ink: #292721;
  --muted: #6f6a61;
  --sage: #78886b;
  --sage-dark: #5f7054;
  --line: #dcd4c7;
  --white: #fff;
  --danger: #9b2c2c;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
  --background: var(--paper);
  --foreground: var(--ink);
  --card: var(--white);
  --card-foreground: var(--ink);
  --popover: var(--white);
  --popover-foreground: var(--ink);
  --primary: var(--sage-dark);
  --primary-foreground: var(--white);
  --secondary: var(--cream);
  --secondary-foreground: var(--ink);
  --muted-foreground: var(--muted);
  --accent: var(--cream-deep);
  --accent-foreground: var(--ink);
  --destructive: var(--danger);
  --border: var(--line);
  --input: var(--line);
  --ring: var(--sage);
  --radius: .5rem;
  --sidebar: #272a25;
  --sidebar-foreground: #f6f1e8;
  --sidebar-primary: #a6b498;
  --sidebar-primary-foreground: #20231f;
  --sidebar-accent: #363a33;
  --sidebar-accent-foreground: #fff;
  --sidebar-border: #444a40;
  --sidebar-ring: #a6b498;
}



* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
button, input, textarea, select { font: inherit; }
::selection { background: var(--sage); color: var(--white); }

.site-shell { display: grid; grid-template-columns: clamp(380px, 36vw, 560px) minmax(0, 1fr); min-height: 100vh; }
.profile-panel { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 42px clamp(28px, 3vw, 52px); background: var(--cream); border-right: 1px solid var(--line); }
.profile-copy h1 { margin: 0; font: 400 clamp(46px, 4.4vw, 70px)/.98 var(--serif); letter-spacing: -.025em; }
.profile-copy h1 em { display: block; color: var(--sage-dark); font-weight: 400; }
.brand-logo { display: inline-grid; width: max-content; gap: .5rem; color: var(--ink); }
.brand-logo__word { display: inline-flex; align-items: baseline; font: 300 1.12rem/1 "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: .29em; white-space: nowrap; }
.brand-logo__green { margin-left: .04em; color: var(--sage-dark); font-weight: 400; letter-spacing: .18em; }
.brand-logo__descriptor { display: grid; grid-template-columns: 38px auto; gap: 10px; align-items: center; color: var(--muted); font-size: .56rem; font-weight: 500; letter-spacing: .25em; line-height: 1; text-transform: uppercase; white-space: nowrap; }
.brand-logo__line { display: block; height: 1px; background: var(--sage); }
.brand-logo--compact { gap: 0; }
.brand-logo--compact .brand-logo__word { font-size: .76rem; }
.brand-logo--compact .brand-logo__descriptor { display: none; }
.brand-mark { margin: 0 0 30px; }
.profile-copy > p:not(.eyebrow):not(.profile-role) { max-width: 430px; margin: 0 0 13px; color: var(--muted); font-size: .92rem; }
.profile-role { max-width: 390px; margin: 15px 0 0; color: #765f53; font: italic 1.16rem/1.35 var(--serif); }
.eyebrow { margin: 0 0 20px; color: var(--sage-dark); font-size: .68rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.short-rule { display: block; width: 42px; height: 1px; margin: 26px 0; background: var(--sage); }
.portrait-frame { display: block; width: min(100%, 320px); aspect-ratio: 3 / 4; margin: 30px 0 24px; overflow: hidden; border-radius: 4px; background: #ddd; }
.portrait-frame img { object-position: 50% 12%; }
.practice-year { margin: 0 0 22px; }
.practice-year strong { display: block; color: var(--sage-dark); font: 400 1.65rem var(--serif); }
.practice-year span { color: var(--muted); font-size: .72rem; }
.profile-nav { display: flex; flex-wrap: wrap; gap: 7px 20px; padding: 12px 0 24px; }
.profile-nav a { color: var(--muted); font: italic 1rem var(--serif); transition: color .2s ease; }
.profile-nav a:hover { color: var(--sage-dark); }
.main-content { min-width: 0; }

.hero-section { position: relative; min-height: 92vh; display: grid; place-items: center; overflow: hidden; background: #455042; }
.hero-picture { position: absolute; inset: 0; }
.hero-picture::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(21,27,20,.18), rgba(21,27,20,.58)); }
.hero-picture img { object-position: center; }
.hero-overlay { position: relative; z-index: 2; padding: 40px; text-align: center; color: var(--white); }
.hero-overlay h2 { margin: 0; font: italic 400 clamp(50px, 7vw, 100px)/.97 var(--serif); letter-spacing: -.025em; }
.hero-overlay p { margin: 26px 0 0; font-size: .73rem; font-weight: 700; letter-spacing: .19em; text-transform: uppercase; }

.content-section { padding: clamp(72px, 8vw, 120px) clamp(28px, 6vw, 92px); }
.section-tint { background: var(--cream); }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .85fr); gap: 48px; align-items: end; margin-bottom: 48px; }
.section-heading .eyebrow { margin-bottom: 12px; }
.section-heading h2, .contact-intro h2 { margin: 0; font: 400 clamp(45px, 5.5vw, 76px)/1 var(--serif); letter-spacing: -.02em; }
.section-heading > p, .section-heading > div > p:not(.eyebrow), .contact-intro > p:not(.eyebrow) { max-width: 540px; margin: 0; color: var(--muted); }
.text-link { display: inline-block; margin-top: 16px; color: var(--sage-dark); font: italic 1.03rem var(--serif); border-bottom: 1px solid #a9b39f; }

.horizontal-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row; gap: 32px 24px; }
.gallery-item { scroll-snap-align: start; }
.gallery-image { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; }
.gallery-item > div { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 12px; padding-top: 15px; }
.gallery-item span { color: var(--sage); font-family: var(--serif); }
.gallery-item h3 { margin: 0; font: 400 clamp(1.375rem, 3cqi, 1.75rem)/1.2 var(--serif); overflow-wrap: normal; word-break: normal; hyphens: auto; }
.gallery-item p { grid-column: 2; margin: 1px 0 0; color: var(--muted); font-size: .75rem; }

.projects-list { display: grid; gap: 82px; }
.project-row { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr); gap: clamp(32px, 5vw, 68px); align-items: center; }
.project-row:nth-child(even) .project-image-link { order: 2; }
.project-image-link, .project-image { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 5px; }
.project-copy { padding-right: 22px; }
.project-year, .article-meta { margin: 0 0 11px; color: var(--sage-dark); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.project-copy h3 { margin: 0 0 16px; font: 400 clamp(38px, 4.5vw, 62px)/1.03 var(--serif); }
.project-copy > p:not(.project-year):not(.project-services) { margin: 0; color: var(--muted); }
.project-services { margin: 18px 0 0; color: #837d73; font-size: .78rem; }
.project-index { position: absolute; top: -28px; right: 0; color: #c5bcaf; font: italic 1.05rem var(--serif); }

.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.article-card { overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--white); }
.article-image { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.article-card-copy { padding: 25px; }
.article-card h3 { margin: 0 0 13px; font: 400 1.75rem/1.1 var(--serif); }
.article-card-copy > p:not(.article-meta) { margin: 0; color: var(--muted); font-size: .86rem; }

.principles-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 44px; }
.principles-grid article { padding-top: 20px; border-top: 1px solid var(--line); }
.principles-grid span { color: #a8b39e; font: italic 2rem var(--serif); }
.principles-grid h3 { margin: 8px 0; font: 400 1.7rem var(--serif); }
.principles-grid p { margin: 0; color: var(--muted); }
.quote-section { padding: clamp(86px, 10vw, 150px) clamp(30px, 8vw, 130px); text-align: center; }
.quote-section blockquote { max-width: 900px; margin: 0 auto; font: italic 400 clamp(30px, 4.5vw, 58px)/1.3 var(--serif); }
.quote-section cite { display: block; margin-top: 25px; color: var(--sage-dark); font-size: .7rem; font-style: normal; letter-spacing: .15em; text-transform: uppercase; }

.contact-section { display: grid; grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr); gap: clamp(45px, 7vw, 100px); background: var(--cream); }
.contact-intro .eyebrow { margin-bottom: 12px; }
.contact-intro > p:not(.eyebrow) { margin-top: 22px; }
.lead-form { display: grid; gap: 18px; }
.lead-form label > span:first-child { display: block; margin-bottom: 6px; color: #5f5b54; font-size: .78rem; }
.lead-form input:not([type="checkbox"]), .lead-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 3px; background: rgba(255,255,255,.72); padding: 13px 14px; color: var(--ink); outline: none; }
.lead-form input:focus, .lead-form textarea:focus { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(120,136,107,.13); }
.consent-row { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; }
.consent-row input { width: 17px; height: 17px; margin-top: 4px; accent-color: var(--sage-dark); }
.consent-row span { margin: 0 !important; font-size: .74rem !important; }
.consent-row a { color: var(--sage-dark); text-decoration: underline; text-underline-offset: 2px; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.button { border: 1px solid transparent; border-radius: 3px; padding: 12px 17px; cursor: pointer; transition: background .2s, color .2s, border .2s; }
.button:disabled { cursor: wait; opacity: .65; }
.button--primary { background: var(--sage-dark); color: var(--white); }
.button--primary:hover { background: #53634a; }
.button--quiet { border-color: var(--line); background: transparent; color: var(--ink); }
.button--wide { width: 100%; padding: 15px; }
.form-status { margin: 0; font-size: .84rem; }
.form-status--sent { color: #46633f; }
.form-status--error { color: var(--danger); }
.captcha-note { margin: -8px 0 0; color: var(--muted); font-size: .68rem; }

.site-footer { display: grid; grid-template-columns: 1fr auto auto; gap: 34px; align-items: center; padding: 30px clamp(28px, 6vw, 92px); border-top: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: .72rem; }
.site-footer div { display: flex; gap: 18px; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer a:hover { color: var(--sage-dark); }

.cookie-banner { position: fixed; z-index: 100; right: 22px; bottom: 22px; width: min(520px, calc(100vw - 44px)); padding: 20px; border: 1px solid var(--line); border-radius: 5px; background: rgba(251,250,247,.98); box-shadow: 0 18px 50px rgba(42,39,33,.17); }
.cookie-banner p { margin: 0 0 14px; font-size: .82rem; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.cookie-actions .button { padding: 9px 12px; font-size: .75rem; }
.cookie-actions a { color: var(--sage-dark); font-size: .74rem; text-decoration: underline; }

.inner-page { min-height: 100vh; }
.inner-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px clamp(24px, 6vw, 90px); border-bottom: 1px solid var(--line); background: var(--paper); }
.inner-brand { display: inline-flex; }
.inner-header nav { display: flex; gap: 22px; color: var(--muted); font-size: .82rem; }
.inner-hero { padding: clamp(70px, 9vw, 130px) clamp(24px, 10vw, 160px) 60px; }
.inner-hero .eyebrow { margin-bottom: 14px; }
.inner-hero h1 { max-width: 1000px; margin: 0; font: 400 clamp(48px, 7vw, 92px)/1 var(--serif); letter-spacing: -.03em; }
.inner-hero > p:not(.eyebrow) { max-width: 680px; margin: 24px 0 0; color: var(--muted); font-size: 1.05rem; }
.inner-body { padding: 0 clamp(24px, 10vw, 160px) clamp(80px, 10vw, 150px); }
.inner-image { display: block; width: 100%; max-height: 760px; aspect-ratio: 16 / 9; margin-bottom: 60px; overflow: hidden; border-radius: 5px; }
.rich-text { max-width: 760px; margin: 0 auto; font: 400 1.12rem/1.8 var(--serif); color: #45413a; }
.rich-text h2 { margin: 2.3em 0 .7em; color: var(--ink); font: 400 2rem/1.15 var(--serif); }
.rich-text h3 { margin: 2em 0 .6em; color: var(--ink); font: 400 1.5rem var(--serif); }
.rich-text p { white-space: pre-line; }
.rich-text ul { padding-left: 1.2em; }
.legal-warning { max-width: 760px; margin: 0 auto 28px; padding: 15px 18px; border: 1px solid #d3b56b; background: #fff8df; color: #665524; font-size: .82rem; }
.cards-page { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 0 clamp(24px, 6vw, 90px) 100px; }

@media (max-width: 1180px) {
  .site-shell { grid-template-columns: 340px minmax(0, 1fr); }
  .profile-panel { padding: 32px 28px; }
  .article-grid, .cards-page { grid-template-columns: 1fr 1fr; }
  .project-row { grid-template-columns: 1fr; }
  .project-row:nth-child(even) .project-image-link { order: 0; }
}

@media (max-width: 780px) {
  .site-shell { display: block; }
  .profile-panel { position: relative; height: auto; padding: 30px 24px; }
  .profile-copy h1 { font-size: clamp(44px, 14vw, 66px); }
  .inner-brand .brand-logo__descriptor { display: none; }
  .portrait-frame { width: 250px; }
  .hero-section { min-height: 72vh; }
  .hero-overlay { padding: 24px; }
  .hero-overlay h2 { font-size: clamp(45px, 14vw, 76px); }
  .section-heading, .contact-section { grid-template-columns: 1fr; gap: 24px; }
  .content-section { padding: 66px 24px; }
  .article-grid, .principles-grid, .cards-page { grid-template-columns: 1fr; }
  .projects-list { gap: 56px; }
  .site-footer { grid-template-columns: 1fr; gap: 14px; padding: 28px 24px; }
  .inner-header { align-items: flex-start; }
  .inner-header nav { flex-wrap: wrap; justify-content: flex-end; gap: 8px 14px; }
  .inner-hero, .inner-body { padding-left: 24px; padding-right: 24px; }
  .cards-page { padding-left: 24px; padding-right: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Закрытая панель CMS + CRM */
.admin-login-page { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: var(--cream); }
.admin-login-card { width: min(100%, 460px); display: grid; gap: 30px; padding: clamp(30px, 5vw, 54px); border: 1px solid var(--line); border-radius: 6px; background: var(--paper); box-shadow: 0 24px 70px rgba(42,39,33,.09); }
.admin-login-card h1 { margin: 0 0 12px; font: 400 clamp(2.5rem, 6vw, 4rem)/1 var(--serif); }
.admin-login-card p { margin: 0; color: var(--muted); }
.admin-login-card .eyebrow { margin-bottom: 10px; }
.admin-login-card input { width: 100%; border: 1px solid var(--line); border-radius: 3px; background: var(--white); padding: 13px 14px; color: var(--ink); outline: none; }
.admin-login-card input:focus { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(120,136,107,.13); }
.admin-login-error { color: var(--danger) !important; font-size: .84rem; }
.admin-page { min-height: 100vh; padding: 28px clamp(18px, 4vw, 58px) 80px; background: #f4f1ea; color: var(--ink); }
.admin-header { display: flex; justify-content: space-between; gap: 28px; align-items: flex-end; max-width: 1440px; margin: 0 auto 28px; }
.admin-header p { margin: 0 0 4px; color: var(--sage-dark); font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; }
.admin-header h1 { margin: 0; font: 400 clamp(32px, 4vw, 52px)/1 var(--serif); }
.admin-header > div:last-child { display: flex; gap: 14px; align-items: center; font-size: .78rem; color: var(--muted); }
.admin-header a, .admin-back a { color: var(--sage-dark); text-decoration: underline; text-underline-offset: 3px; }
.admin-tabs { max-width: 1440px; margin: 0 auto; }
.admin-tabs-list { max-width: 100%; height: auto !important; flex-wrap: wrap; justify-content: flex-start !important; }
.admin-notice { min-height: 24px; margin: 8px 0; color: var(--sage-dark); font-size: .8rem; }
.admin-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.admin-metrics [data-slot="card-title"] { font: 400 2.6rem var(--serif); }
.admin-stack { display: grid; gap: 18px; }
.admin-form { display: grid; gap: 16px; }
.admin-field { display: grid; gap: 6px; }
.admin-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-inline { display: flex; gap: 24px; flex-wrap: wrap; }
.admin-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; }
.admin-message { max-width: 460px; white-space: normal !important; line-height: 1.45; }
.admin-message small { color: var(--muted); }
.admin-empty { padding: 28px 0; color: var(--muted); text-align: center; }
.admin-checklist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 18px; margin: 0; padding: 0; list-style: none; }
.admin-checklist li::before { content: "Не готово"; display: inline-block; min-width: 64px; margin-right: 8px; color: var(--danger); font-size: .66rem; text-transform: uppercase; }
.admin-checklist li[data-ok="true"]::before { content: "Готово"; color: #4b7042; }
.admin-back { margin-top: 24px; }
.admin-denied { min-height: 100vh; display: grid; align-content: center; justify-items: start; max-width: 720px; margin: auto; padding: 32px; }
.admin-denied h1 { font: 400 3rem var(--serif); }
.admin-denied p { color: var(--muted); }
.media-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.media-list div { display: grid; gap: 8px; }
.media-list img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; }
.media-list code { overflow-wrap: anywhere; font-size: .7rem; }

@media (max-width: 900px) {
  .admin-metrics, .admin-checklist { grid-template-columns: 1fr 1fr; }
  .media-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .admin-header { align-items: flex-start; flex-direction: column; }
  .admin-header > div:last-child { align-items: flex-start; flex-direction: column; }
  .admin-metrics, .admin-checklist, .admin-form-row, .media-list { grid-template-columns: 1fr; }
}

/* Size typography and grids against the actual available column. */
body { overflow-wrap: anywhere; }
.site-shell > *, .profile-panel > *, .section-heading > *, .project-row > *,
.contact-section > *, .principles-grid > *, .site-footer > *, .inner-header > *,
.gallery-item > div > *, .lead-form > * { min-width: 0; }
.main-content { container: main / inline-size; }
.profile-panel { container-type: inline-size; }
.hero-section { container-type: inline-size; min-width: 0; }
.hero-overlay { width: 100%; min-width: 0; padding: clamp(24px, 5cqi, 64px); }
.hero-overlay h2 { max-width: 100%; font-size: clamp(1.75rem, 7.2cqi, 5.5rem); line-height: 1.16; text-wrap: balance; overflow-wrap: anywhere; }
.hero-overlay h2 span { display: block; }
.hero-overlay p { font-size: .875rem; letter-spacing: .12em; line-height: 1.6; }
.profile-copy h1 { font-size: clamp(2rem, 13cqi, 4.375rem); line-height: 1.08; }
.content-section { container: section / inline-size; min-width: 0; }
.section-heading h2, .contact-intro h2 { font-size: clamp(2rem, 7cqi, 4.75rem); line-height: 1.12; }
.project-copy h3 { font-size: clamp(1.875rem, 6cqi, 3.875rem); line-height: 1.12; }
.brand-logo { max-width: 100%; }
.brand-logo__word, .brand-logo__descriptor { white-space: normal; overflow-wrap: anywhere; }
.brand-logo__descriptor { grid-template-columns: 24px minmax(0, 1fr); line-height: 1.4; }
.inner-header { flex-wrap: wrap; }
.inner-header nav { flex-wrap: wrap; }
.inner-hero h1 { font-size: clamp(2rem, 6vw, 5.75rem); line-height: 1.12; }
.horizontal-gallery { width: 100%; max-width: 100%; }
.gallery-item { min-width: 0; }
.lead-form input:not([type="checkbox"]), .lead-form textarea { min-width: 0; max-width: 100%; }
.lead-form textarea { resize: vertical; }
.lead-form label > span:first-child, .lead-form small, .consent-row span { font-size: .875rem !important; }
.site-footer div { flex-wrap: wrap; }
.thank-you-dialog { position: fixed; inset: 0; margin: auto; width: min(30rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; padding: clamp(24px, 5vw, 40px); border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 80px #0003; }
.thank-you-dialog::backdrop { background: rgba(21,27,20,.6); }
.thank-you-dialog h2 { margin: 0; font: 400 clamp(1.75rem, 5vw, 2.5rem)/1.15 var(--serif); }
.thank-you-dialog p:not(.eyebrow) { margin: 20px 0 28px; }
@container main (max-width: 1000px) {
  .section-heading, .project-row, .contact-section { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .project-row:nth-child(even) .project-image-link { order: 0; }
  .site-footer { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container section (max-width: 480px) {
  .horizontal-gallery, .article-grid, .principles-grid { grid-template-columns: minmax(0, 1fr); }
  .content-section { padding-inline: 24px; }
  .project-copy { padding-right: 0; }
}
@media (max-width: 380px) {
  .inner-header { flex-direction: column; }
  .inner-header nav { justify-content: flex-start; }
  .cookie-banner { right: 12px; bottom: 12px; width: calc(100% - 24px); padding: 16px; }
}

/* Stack the sidebar before it squeezes tablet content into a narrow column. */
@media (max-width: 1100px) {
  .site-shell { display: block; }
  .profile-panel { position: relative; height: auto; padding: 32px clamp(24px, 5vw, 52px); border-right: 0; border-bottom: 1px solid var(--line); }
  .profile-copy h1 { font-size: clamp(2rem, 7vw, 4.375rem); }
  .hero-section { min-height: 65svh; }
}
@media (max-width: 600px) {
  .horizontal-gallery { grid-template-columns: minmax(0, 1fr); }
  .hero-overlay { padding: 32px 20px; }
  .hero-overlay p { font-size: .875rem; letter-spacing: .08em; }
  .portrait-frame { max-width: 100%; }
  .section-heading h2, .contact-intro h2 { font-size: clamp(1.75rem, 8vw, 2.5rem); hyphens: auto; }
  .quote-section { padding-inline: 24px; }
  .brand-logo__word { flex-wrap: wrap; row-gap: .3em; }
  .cards-page { grid-template-columns: minmax(0, 1fr); }
}
.hero-overlay, .project-copy, .article-card-copy, .contact-intro, .inner-hero, .rich-text { min-width: 0; }
.hero-overlay p, .project-copy h3, .article-card h3, .inner-hero h1 { hyphens: auto; }
.thank-you-dialog { text-align: center; border: 0; border-top: 5px solid #77ab35; border-radius: 20px; padding: clamp(28px, 6vw, 48px); }
.thank-you-mark { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 24px; border-radius: 50%; background: #e2f1ca; color: #397019; }
.thank-you-mark svg { width: 32px; height: 32px; }
.thank-you-dialog .eyebrow { margin-bottom: 14px; }
.thank-you-dialog .button { border-radius: 8px; }
body:has(.thank-you-dialog[open]) { overflow: hidden; }

/* Shared lower sections on article and project pages. */
.related-section { border-top: 1px solid var(--line); }
.related-section .section-heading { grid-template-columns: minmax(0, 1fr) auto; gap: 24px; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.related-grid > * { min-width: 0; }
.related-grid .article-card h3 { overflow-wrap: normal; hyphens: auto; line-height: 1.25; }
.related-grid .text-link { display: inline-block; margin-top: 18px; }
.inner-page > .contact-section h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
@media (max-width: 1000px) {
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inner-page > .contact-section { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .inner-page > .site-footer { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 600px) {
  .related-grid, .related-section .section-heading { grid-template-columns: minmax(0, 1fr); }
  .related-section .section-heading { gap: 16px; }
}

/* One consistent navigation control at the top right on every public page. */
.site-menu-toggle { position: fixed; z-index: 90; top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--sage-dark); box-shadow: 0 4px 20px #29272120; cursor: pointer; }
.site-menu-toggle:hover, .site-menu-close:hover { background: var(--cream); }
.site-menu-toggle:focus-visible, .site-menu-close:focus-visible, .site-menu-dialog a:focus-visible { outline: 3px solid var(--sage-dark); outline-offset: 4px; }
.site-menu-dialog { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(400px, 100%); height: 100dvh; max-height: 100dvh; max-width: 100%; padding: max(16px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 32px; overflow-y: auto; border: 0; border-left: 1px solid var(--line); background: var(--paper); color: var(--ink); box-shadow: -12px 0 60px #0002; }
.site-menu-dialog::backdrop { background: #151b1499; }
.site-menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.site-menu-heading h2 { margin: 0; font: 400 1.75rem/1.2 var(--serif); }
.site-menu-close { display: grid; place-items: center; flex-shrink: 0; width: 52px; height: 52px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--sage-dark); cursor: pointer; }
.site-menu-dialog nav { display: grid; gap: 0; }
.site-menu-dialog nav a { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); font: 400 1.75rem/1.3 var(--serif); }
.site-menu-dialog nav a:hover { color: var(--sage-dark); }
body:has(.site-menu-dialog[open]) { overflow: hidden; }
.inner-header { padding-right: 88px; min-height: 84px; }
@media (max-width: 1100px) { .profile-copy > .brand-mark { max-width: calc(100% - 56px); min-height: 36px; } }
[hidden] { display: none !important; }
.admin-nav,.admin-toolbar { display:flex; flex-wrap:wrap; gap:20px; align-items:center; margin:24px 0; }
.admin-nav a { padding:12px 16px; border:1px solid var(--line); border-radius:6px; }
.admin-nav a[aria-current] { background:var(--sage-dark); color:#fff; }
.admin-card { padding:clamp(20px,3vw,36px); background:var(--paper); border:1px solid var(--line); border-radius:8px; margin-bottom:20px; }
.admin-form input:not([type=checkbox]), .admin-form textarea,.admin-form select,.media-list input { width:100%; min-width:0; padding:12px; border:1px solid var(--line); background:#fff; border-radius:4px; }
.admin-form { max-width:960px; }
.admin-form select { display:block; }
.admin-card h2 { font:400 2rem var(--serif); }
.admin-note { padding:12px; background:var(--cream); }
.admin-message { white-space:pre-wrap; }
.admin-nav { font-size:1rem; }
