/*
Theme Name: Behzad Heydari Pro
Theme URI: https://behzadheydari.ir/
Author: Danial Estarki
Author URI: https://behzadheydari.ir/
Description: Custom Persian RTL WordPress theme for Behzad Heydari professional website.
Version: 1.2.1
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: behzad-heydari-pro
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: rtl-language-support, blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  --bg: #0d0e11;
  --bg-soft: #15171c;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-strong: #1b1d23;
  --text: #f7f5f2;
  --muted: #b9b9bd;
  --line: rgba(255, 255, 255, 0.11);
  --brand: #d91f32;
  --brand-strong: #b81425;
  --brand-soft: rgba(217, 31, 50, 0.12);
  --gold: #d6b36a;
  --success: #35b779;
  --danger: #ef4444;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --radius: 26px;
  --radius-sm: 16px;
  --container: min(1180px, calc(100% - 36px));
}

html[data-theme='light'] {
  --bg: #f7f5f2;
  --bg-soft: #ece8e3;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --text: #16171b;
  --muted: #67686d;
  --line: rgba(18, 18, 18, 0.11);
  --brand-soft: rgba(217, 31, 50, 0.085);
  --shadow: 0 24px 70px rgba(41, 31, 28, 0.10);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(217, 31, 50, 0.14), transparent 28%),
    radial-gradient(circle at 90% 16%, rgba(214, 179, 106, 0.08), transparent 26%),
    var(--bg);
  color: var(--text);
  font-family: 'Vazirmatn', Tahoma, Arial, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6,
button, input, textarea, select,
.btn, .menu, .post-title, .section-heading, .page-title {
  font-family: 'Vazirmatn', Tahoma, Arial, system-ui, sans-serif;
}
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  letter-spacing: -.025em;
  text-wrap: balance;
}
p, li, .article-content, .page-description, .section-lead {
  letter-spacing: -.008em;
}
body.admin-bar .site-header { top: 32px; }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p, li, h1, h2, h3, h4, a, span { overflow-wrap: anywhere; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button, input, select, textarea { max-width: 100%; }
table { width: 100%; border-collapse: collapse; }
::selection { background: var(--brand); color: #fff; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 70%, white); outline-offset: 3px; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  clip: auto !important; width: auto; height: auto; right: 10px; top: 10px; z-index: 99999;
  padding: 10px 18px; border-radius: 12px; background: var(--brand); color: #fff;
}

.container { width: var(--container); margin-inline: auto; }
.section { padding: clamp(64px, 8vw, 92px) 0; }
.section.compact { padding: clamp(50px, 6vw, 68px) 0; }
.section-kicker {
  display: inline-flex; align-items: center; gap: 9px; color: var(--brand);
  font-size: .86rem; font-weight: 800; letter-spacing: .02em; margin-bottom: 12px;
}
.section-kicker::before { content: ''; width: 30px; height: 2px; background: currentColor; border-radius: 99px; }
.section-heading { margin: 0 0 18px; font-size: clamp(2rem, 4vw, 3.45rem); line-height: 1.35; letter-spacing: -.035em; }
.section-lead { color: var(--muted); max-width: 700px; margin: 0; font-size: clamp(.98rem, 1.7vw, 1.06rem); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; }

.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(13, 14, 17, .86);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.navbar { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 900; min-width: 0; }
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { width: auto; max-width: 190px; max-height: 60px; object-fit: contain; }
.site-logo-shell {
  width: 74px; height: 62px; flex: 0 0 74px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--surface) 88%, transparent);
  padding: 7px 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.site-logo-image {
  width: 100%; height: 100%; object-fit: contain; filter: invert(1) brightness(1.08);
  transition: filter .2s ease, transform .2s ease;
}
html[data-theme='light'] .site-logo-image { filter: none; }
.brand:hover .site-logo-image { transform: scale(1.025); }
.brand-accessible-name {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.brand-mark {
  width: 45px; height: 45px; flex: 0 0 45px; display: grid; place-items: center; border-radius: 15px;
  background: linear-gradient(145deg, var(--brand), #7f0713); color: #fff;
  box-shadow: 0 12px 28px rgba(217,31,50,.26); font-size: 1rem; letter-spacing: .03em;
}
.brand-text { line-height: 1.25; white-space: nowrap; }
.brand-text small { display: block; color: var(--muted); font-weight: 500; font-size: .7rem; letter-spacing: .08em; direction: ltr; text-align: right; }
.primary-navigation { margin-inline-start: auto; }
.nav-links, .primary-navigation .menu { display: flex; align-items: center; gap: 6px; list-style: none; padding: 0; margin: 0; }
.nav-links a, .primary-navigation .menu a {
  display: block; padding: 10px 14px; color: var(--muted); font-size: .94rem; font-weight: 600;
  border-radius: 12px; transition: .2s ease;
}
.nav-links a:hover, .primary-navigation .menu a:hover,
.primary-navigation .current-menu-item > a, .primary-navigation .current_page_item > a {
  color: var(--text); background: var(--surface); box-shadow: inset 0 -2px 0 var(--brand);
}
.nav-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid var(--line); border-radius: 13px;
  background: var(--surface); color: var(--text); display: grid; place-items: center; transition: .2s ease;
}
.icon-btn:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.menu-btn { display: none; }

.hero { padding: clamp(48px, 8vw, 76px) 0 60px; min-height: calc(100svh - 82px); display: grid; align-items: center; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.07fr) minmax(0, .93fr); gap: clamp(34px, 5vw, 58px); align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--surface);
  padding: 8px 13px; border-radius: 999px; color: var(--muted); font-size: .86rem; font-weight: 600;
}
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(53,183,121,.12); }
.hero h1 { margin: 20px 0 14px; font-size: clamp(3.2rem, 8vw, 6.5rem); line-height: 1.05; letter-spacing: -.06em; }
.hero h1 span { color: var(--brand); }
.hero-subtitle { font-size: clamp(1.15rem, 2.2vw, 1.55rem); font-weight: 700; margin: 0 0 16px; }
.hero-copy { color: var(--muted); max-width: 680px; font-size: 1.05rem; margin: 0 0 28px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.tag { border: 1px solid var(--line); background: var(--surface); padding: 8px 12px; border-radius: 12px; font-size: .85rem; color: var(--muted); }
.hero-actions, .button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn, .wp-element-button, input[type='submit'] {
  min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 20px; border-radius: 15px; font-weight: 800; border: 1px solid transparent; transition: .22s ease;
}
.btn:hover, .wp-element-button:hover, input[type='submit']:hover { transform: translateY(-2px); }
.btn-primary, .wp-element-button, input[type='submit'] { background: var(--brand); color: #fff; box-shadow: 0 14px 35px rgba(217,31,50,.24); }
.btn-primary:hover, .wp-element-button:hover, input[type='submit']:hover { background: var(--brand-strong); }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost { color: var(--brand); padding-inline: 0; min-height: auto; }

.hero-visual { position: relative; isolation: isolate; min-width: 0; }
.hero-photo-wrap {
  position: relative; border-radius: 36px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow);
  background: var(--surface-strong); transform: rotate(-1.2deg);
}
.hero-photo-wrap::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 48%, rgba(0,0,0,.72)); z-index: 1; }
.hero-photo { width: 100%; aspect-ratio: 1 / 1.05; object-fit: cover; }
.photo-caption { position: absolute; z-index: 2; inset-inline: 22px; bottom: 20px; display: flex; justify-content: space-between; gap: 18px; align-items: end; color: #fff; }
.photo-caption strong { display: block; font-size: 1.15rem; }
.photo-caption span { opacity: .75; font-size: .82rem; }
.photo-badge { min-width: 74px; padding: 9px 11px; border-radius: 14px; background: rgba(255,255,255,.12); backdrop-filter: blur(12px); text-align: center; border: 1px solid rgba(255,255,255,.2); }
.photo-badge b { display: block; font-size: 1.1rem; }
.hero-ring { position: absolute; width: 165px; height: 165px; border-radius: 50%; border: 1px solid rgba(217,31,50,.45); top: -30px; left: -42px; z-index: -1; }
.hero-ring::after { content: ''; position: absolute; inset: 18px; border: 1px solid rgba(214,179,106,.42); border-radius: inherit; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 34px; }
.stat { border: 1px solid var(--line); background: var(--surface); border-radius: 18px; padding: 18px; }
.stat strong { display: block; font-size: 1.35rem; color: var(--text); }
.stat span { color: var(--muted); font-size: .82rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card {
  position: relative; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 26px;
  overflow: hidden; transition: .24s ease; box-shadow: 0 10px 40px rgba(0,0,0,.05); min-width: 0;
}
.card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.card-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 16px; background: var(--brand-soft); color: var(--brand); margin-bottom: 22px; }
.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin: 0 0 10px; font-size: 1.25rem; }
.card p { margin: 0; color: var(--muted); font-size: .94rem; }
.card-link { display: inline-flex; align-items: center; gap: 8px; color: var(--brand); font-weight: 800; margin-top: 22px; }
.card-number { position: absolute; left: 20px; top: 14px; font-weight: 900; font-size: 3.5rem; color: color-mix(in srgb, var(--text) 5%, transparent); line-height: 1; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; align-items: center; }
.panel { border: 1px solid var(--line); background: var(--surface); border-radius: 30px; padding: clamp(24px, 4vw, 42px); box-shadow: var(--shadow); min-width: 0; }
.quote { border-right: 4px solid var(--brand); padding: 6px 22px 6px 0; font-size: 1.18rem; font-weight: 700; margin: 26px 0 0; }
.quote cite { display: block; color: var(--muted); font-style: normal; font-size: .86rem; margin-top: 8px; font-weight: 500; }
.timeline { position: relative; display: grid; gap: 18px; }
.timeline::before { content: ''; position: absolute; right: 18px; top: 12px; bottom: 12px; width: 1px; background: var(--line); }
.timeline-item { position: relative; padding-right: 54px; }
.timeline-dot { position: absolute; right: 9px; top: 4px; width: 19px; height: 19px; border-radius: 50%; background: var(--brand); border: 5px solid var(--bg-soft); box-shadow: 0 0 0 1px var(--line); }
.timeline-item time { color: var(--brand); font-weight: 800; font-size: .83rem; }
.timeline-item h3 { margin: 4px 0 5px; font-size: 1.05rem; }
.timeline-item p { color: var(--muted); margin: 0; font-size: .91rem; }

.page-hero { padding: 68px 0 36px; }
.page-hero-box { border: 1px solid var(--line); background: linear-gradient(140deg, var(--surface), transparent); border-radius: 34px; padding: clamp(30px, 6vw, 68px); position: relative; overflow: hidden; }
.page-hero-box::after { content: 'BH'; position: absolute; left: 3%; bottom: -22%; font-size: clamp(8rem, 20vw, 18rem); font-weight: 900; opacity: .025; line-height: 1; direction: ltr; }
.breadcrumb { color: var(--muted); font-size: .87rem; margin-bottom: 16px; }
.breadcrumb a { color: var(--brand); }
.page-title { margin: 0 0 14px; font-size: clamp(2.4rem, 6vw, 5rem); line-height: 1.2; letter-spacing: -.05em; }
.page-description { color: var(--muted); max-width: 760px; margin: 0; font-size: 1.05rem; }
.profile-card { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 30px; align-items: center; }
.profile-photo { border-radius: 26px; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); }
.profile-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.meta-item { border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; background: var(--surface); }
.meta-item span { display: block; color: var(--muted); font-size: .75rem; }
.meta-item strong { font-size: .91rem; }

.service-feature { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 20px; }
.feature-card { min-height: 300px; display: flex; flex-direction: column; justify-content: end; padding: 34px; border-radius: 30px; overflow: hidden; position: relative; border: 1px solid var(--line); background: var(--surface); }
.feature-card.image { color: #fff; }
.feature-card.image::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.03), rgba(0,0,0,.88)); z-index: 1; }
.feature-card.image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-card > *:not(img) { position: relative; z-index: 2; }
.feature-card h3 { margin: 10px 0 8px; font-size: 1.55rem; }
.feature-card p { color: var(--muted); margin: 0; }
.feature-card.image p { color: rgba(255,255,255,.78); }
.badge { align-self: flex-start; display: inline-flex; padding: 6px 10px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 800; }

/* Article cards: image first, title clearly displayed directly below it. */
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.post-card { border: 1px solid var(--line); border-radius: 26px; overflow: hidden; background: var(--surface); transition: .24s ease; min-width: 0; }
.post-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.post-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-soft); }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-card:hover .post-media img { transform: scale(1.045); }
.post-body { padding: 20px 22px 22px; }
.post-title { margin: 0 0 10px; line-height: 1.65; font-size: 1.18rem; font-weight: 800; letter-spacing: -.02em; }
.post-title a { display: block; }
.post-title a:hover { color: var(--brand); }
.post-meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: .76rem; margin-bottom: 10px; }
.post-category { color: var(--brand); font-weight: 800; }
.post-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.post-card .card-link { margin-top: 15px; }

.article-shell { width: min(850px, calc(100% - 36px)); margin: 0 auto; }
.article-cover { border-radius: 30px; overflow: hidden; border: 1px solid var(--line); margin: 28px 0 38px; }
.article-cover img { width: 100%; max-height: 520px; object-fit: cover; }
.article-content { font-size: 1.04rem; line-height: 2.05; font-weight: 400; }
.article-content > *:first-child { margin-top: 0; }
.article-content h2 { margin: 44px 0 12px; font-size: 1.7rem; }
.article-content h3 { margin: 30px 0 8px; }
.article-content p, .article-content li { color: color-mix(in srgb, var(--text) 82%, var(--muted)); }
.article-content ul, .article-content ol { padding-right: 24px; }
.article-content blockquote { border-right: 4px solid var(--brand); margin: 28px 0; padding: 12px 20px; background: var(--surface); border-radius: 0 16px 16px 0; }
.article-content pre { overflow-x: auto; padding: 18px; border-radius: 16px; background: var(--bg-soft); direction: ltr; text-align: left; }
.article-content table { display: block; max-width: 100%; overflow-x: auto; white-space: nowrap; border: 1px solid var(--line); border-radius: 14px; }
.article-content th, .article-content td { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.article-note { border: 1px solid rgba(214,179,106,.3); background: rgba(214,179,106,.08); border-radius: 18px; padding: 20px; margin: 28px 0; }

.contact-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 22px; align-items: start; }
.contact-list { display: grid; gap: 12px; }
.contact-item { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); padding: 16px; border-radius: 18px; background: var(--surface); min-width: 0; }
.contact-item .card-icon { margin: 0; flex: 0 0 48px; }
.contact-item strong { display: block; }
.contact-item span { color: var(--muted); font-size: .82rem; }
.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { font-size: .85rem; font-weight: 700; }
.field input, .field textarea, .field select,
.comment-form input:not([type='checkbox']):not([type='submit']), .comment-form textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 15px; padding: 13px 14px; outline: none; transition: .2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus,
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.field textarea { min-height: 150px; resize: vertical; }
.form-hint { color: var(--muted); font-size: .77rem; }

.cta { border: 1px solid rgba(217,31,50,.28); background: linear-gradient(135deg, rgba(217,31,50,.16), rgba(214,179,106,.05)); border-radius: 32px; padding: clamp(28px, 5vw, 54px); display: flex; justify-content: space-between; gap: 30px; align-items: center; }
.cta h2 { margin: 0 0 8px; font-size: clamp(1.8rem, 3.4vw, 2.8rem); }
.cta p { color: var(--muted); margin: 0; max-width: 650px; }

.pagination, .nav-links.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 42px; }
.page-numbers { min-width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.page-numbers.current, .page-numbers:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.entry-content img { border-radius: 18px; }
.alignwide { width: min(1120px, 100%); max-width: 1120px; margin-inline: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-inline: calc(50% - 50vw); }
.wp-caption, .gallery-caption { color: var(--muted); font-size: .82rem; max-width: 100%; }
.sticky { border-color: var(--gold); }
.bypostauthor { font-weight: inherit; }

.site-footer { border-top: 1px solid var(--line); padding: 44px 0 26px; margin-top: 54px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr) minmax(0, .7fr); gap: 36px; }
.footer-title { font-size: .86rem; color: var(--muted); margin: 0 0 14px; }
.footer-links, .footer-menu { display: grid; gap: 9px; list-style: none; padding: 0; margin: 0; }
.footer-links a, .footer-menu a { color: var(--muted); font-size: .9rem; }
.footer-links a:hover, .footer-menu a:hover { color: var(--brand); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 34px; padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: .78rem; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  .hero h1 { font-size: clamp(3.2rem, 8.8vw, 5.5rem); }
  .primary-navigation .menu a { padding-inline: 10px; }
}

@media (max-width: 980px) {
  body.admin-bar .site-header { top: 32px; }
  .primary-navigation {
    position: fixed; top: 82px; right: 18px; left: 18px; margin: 0; padding: 14px;
    border: 1px solid var(--line); background: var(--bg-soft); border-radius: 20px;
    box-shadow: var(--shadow); display: none; max-height: calc(100svh - 110px); overflow-y: auto;
  }
  body.admin-bar .primary-navigation { top: 114px; }
  .primary-navigation.is-open { display: block; }
  .primary-navigation .menu { flex-direction: column; align-items: stretch; }
  .primary-navigation .menu a { padding: 12px 14px; }
  .menu-btn { display: grid; }
  .hero { min-height: auto; }
  .hero-grid, .split, .service-feature, .contact-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 620px; width: 100%; margin-inline: auto; }
  .card-grid, .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-card { grid-template-columns: 210px minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
  body.admin-bar .primary-navigation { top: 128px; }
}

@media (max-width: 680px) {
  :root { --container: min(100% - 24px, 1180px); --radius: 22px; }
  .section { padding: 62px 0; }
  .section.compact { padding: 48px 0; }
  .navbar { min-height: 72px; gap: 10px; }
  .brand-text { font-size: .9rem; }
  .brand-text small { display: none; }
  .brand-mark { width: 42px; height: 42px; flex-basis: 42px; }
  .site-logo-shell { width: 64px; height: 54px; flex-basis: 64px; border-radius: 15px; padding: 6px 7px; }
  .primary-navigation { top: 72px; right: 12px; left: 12px; }
  body.admin-bar .primary-navigation { top: 118px; }
  .hero { padding-top: 44px; }
  .hero-grid { gap: 38px; }
  .hero h1 { font-size: clamp(3rem, 17vw, 5rem); }
  .stats, .card-grid, .blog-grid, .profile-meta, .form-row { grid-template-columns: 1fr; }
  .section-head, .cta, .footer-bottom { align-items: stretch; flex-direction: column; }
  .profile-card { grid-template-columns: 1fr; }
  .profile-photo { max-width: 260px; width: 100%; margin-inline: auto; }
  .page-hero { padding-top: 38px; }
  .page-hero-box { padding: 28px 22px; border-radius: 26px; }
  .page-title { font-size: clamp(2.25rem, 13vw, 3.7rem); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > :first-child { grid-column: auto; }
  .hero-actions .btn, .button-row .btn, .cta .btn { width: 100%; }
  .article-shell { width: min(100% - 24px, 850px); }
  .article-content { font-size: .98rem; }
  .photo-caption { inset-inline: 14px; bottom: 14px; }
  .hero-ring { display: none; }
}

@media (max-width: 420px) {
  :root { --container: min(100% - 18px, 1180px); }
  .brand-text { display: none; }
  .site-logo-shell { width: 58px; height: 49px; flex-basis: 58px; border-radius: 14px; }
  .nav-actions { margin-inline-start: auto; }
  .panel, .card, .feature-card { padding: 20px; border-radius: 22px; }
  .post-body { padding: 17px; }
  .stats { gap: 10px; }
  .stat { padding: 14px; }
  .eyebrow { border-radius: 16px; align-items: flex-start; }
}

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

/* Version 1.2.0: direct proposal anchors and contact-page polish. */
#proposal-form{scroll-margin-top:110px}.proposal-panel:focus{outline:0}.contact-hero-actions{margin-top:24px}.contact-form-heading{font-size:clamp(1.85rem,4vw,2.3rem)}.contact-form-lead{margin-bottom:24px}@media(max-width:700px){#proposal-form{scroll-margin-top:86px}.contact-hero-actions{display:grid;grid-template-columns:1fr}.contact-hero-actions .btn{width:100%;justify-content:center}}
