@import url('/assets/fonts.css');
@import url('/assets/navigation.css');
@import url('/assets/footer.css');
@import url('/assets/page-intros.css');
@import url('/assets/home-skills.css');

:root {
  color-scheme: light;
  --color-primary: #00514b;
  --color-secondary: #ffd633;
  --color-hover: #a64b08;
  --hover-soft: #fff6ee;
  --card-transition-duration: .7s;
  --card-transition-easing: cubic-bezier(.4, 0, .6, 1);
  --bg: #f8faf9;
  --surface: #ffffff;
  --surface-2: #eef3f1;
  --accent: var(--color-primary);
  --accent-deep: var(--color-primary);
  --gold: var(--color-secondary);
  --accent-soft: #edf5f2;
  --highlight-soft: #fffdf3;
  --text: #202b28;
  --muted: #4d5d57;
  --muted-2: #5e6c66;
  --border: #d4dfda;
  --control-border: #778780;
  --radius: 18px;
  --radius-small: 10px;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 80px;
  --shadow: 0 18px 48px rgb(0 81 75 / 4%);
  --max-width: 1160px;
  --blue: var(--accent-deep);
  --blue-bright: var(--accent);
  --line: var(--border);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.8 Inter, Arial, sans-serif; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 5px; }
a:hover { color: var(--color-hover); }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; border-radius: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--color-primary); }
h1 { font-size: clamp(36px, 4.8vw, 62px); line-height: 1.16; letter-spacing: -.05em; font-weight: 650; margin-bottom: 22px; max-width: 900px; text-wrap: balance; }
h2 { font-size: clamp(27px, 3vw, 38px); line-height: 1.3; letter-spacing: -.035em; margin-bottom: 18px; text-wrap: balance; font-weight: 600; }
h3 { font-size: 21px; line-height: 1.45; letter-spacing: -.025em; margin-bottom: 12px; }
p { margin-bottom: 18px; color: var(--muted); }
ul, ol { padding-inline-start: 22px; color: var(--muted); }
li + li { margin-top: 8px; }
strong { color: var(--text); }
.container { width: min(var(--max-width), calc(100% - 64px)); margin-inline: auto; }
main { padding-bottom: 80px; }
main.container { padding-top: 0; }
[id] { scroll-margin-top: 120px; }
.skip-link { position: fixed; inset-inline-start: 16px; top: -100px; z-index: 200; padding: 10px 18px; background: var(--text); color: var(--bg); border-radius: var(--radius-small); font-weight: 700; }
.skip-link:focus { top: 10px; }
.hero { padding-block: 64px 40px; }
.service-hero { display: grid; grid-template-columns: 1.4fr .8fr; gap: 48px; align-items: center; }
.service-hero .aside-card h2 { font-size: 25px; }
.eyebrow, .section-kicker, .hero-label { color: var(--accent); font-size: 11px; font-weight: 600; line-height: 1.8; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 18px; display: block; }
.lead { font-size: 18px; max-width: 780px; line-height: 1.85; }
.hero-actions, .cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn, .button, .contact-link { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 11px 20px; border: 1px solid var(--border); border-radius: var(--radius-small); text-align: center; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--text); line-height: 1.6; transition: background .2s, border-color .2s, transform .2s; }
.btn:hover, .button:hover { background: var(--hover-soft); border-color: var(--color-hover); color: var(--color-primary); }
.btn-primary, .button-primary { background: var(--accent); color: #ffffff; border-color: var(--accent); }
.btn-primary:hover, .button-primary:hover { color: #ffffff; background: var(--color-primary); border-color: var(--color-hover); box-shadow: inset 0 -2px var(--color-hover); }
.text-link { font-size: 13px; font-weight: 600; display: inline-block; margin-top: 14px; }
.section { padding-block: 48px; }
.section + .section { border-top: 1px solid var(--border); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 48px; margin-bottom: 30px; }
.section-head h2 { margin-bottom: 0; }
.section-intro { max-width: 680px; color: var(--muted); margin-bottom: 28px; }
.section-head > .section-intro { max-width: 420px; font-size: 14px; margin-bottom: 0; }
.content-grid, .skill-columns, .project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.content-card, .skill-box, .aside-card { min-width: 0; }
.skill-columns { gap: 24px; }
.content-card p:last-child, .skill-box p:last-child, .aside-card p:last-child { margin-bottom: 0; }
.content-card ul { margin-bottom: 0; }
.card-index { color: var(--accent); font: 500 11px/1.6 'JetBrains Mono', monospace; margin-bottom: 18px; display: block; }
.tags, .project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 18px; }
.tag, .project-tags span { padding: 0; border: 0; color: var(--muted); font-size: 12px; line-height: 1.75; background: transparent; }
.project-tags { gap: 6px 16px; }
.skill-list { margin: 24px 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; font-size: 14px; }
.skill-list li { margin: 0; }
.prose { max-width: 820px; }
.prose p { line-height: 1.95; }
.prose h3 { margin-top: 32px; }
.about-grid, .split-section, .contact-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
main #about .about-grid { grid-template-columns: minmax(0, 1fr); max-width: 860px; margin-inline: auto; gap: 28px; }
main #about .about-copy { text-align: center; }
main #about .about-copy p { max-width: 740px; margin-inline: auto; line-height: 1.95; }
main #about .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); text-align: center; }
main #about .stat { border: 0; border-inline-end: 1px solid var(--border); }
main #about .stat:last-child { border-inline-end: 0; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stat { padding: 24px; background: var(--surface); }
.stat:nth-child(odd) { border-inline-end: 1px solid var(--border); }
.stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
.stat strong { display: block; font-size: 29px; line-height: 1.4; letter-spacing: -.04em; }
.stat span { color: var(--muted); font-size: 12px; }
.project { min-width: 0; overflow: hidden; }
.project-image { background: var(--surface-2); aspect-ratio: 1.95; border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.project-image picture { display: block; width: 100%; height: 100%; }
.project-image img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.project-body { padding: 24px 0 0; }
.project-top { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.project-year { color: var(--accent); font: 11px/2 'JetBrains Mono', monospace; white-space: nowrap; }
.project-body p { font-size: 14px; }
.project-tags { margin-bottom: 0; }
.project-body > .project-tags + a { display: inline-block; margin-top: 18px; }
.topic-note { font-size: 13px; }
.experience { display: grid; gap: 24px; }
.exp { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 32px; }
.exp-date { color: var(--accent); font: 12px/2 'JetBrains Mono', monospace; }
.exp-company { color: var(--muted); }
.exp h3 { margin-bottom: 6px; }
.exp ul { margin-top: 20px; }
.exp > div > :last-child { margin-bottom: 0; }
.process-list { counter-reset: process; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; gap: 32px; padding: 0; margin: 28px 0 0; }
.process-list li { counter-increment: process; margin: 0; }
.process-list li:before { content: '0' counter(process); font: 500 12px/1.8 'JetBrains Mono', monospace; display: block; color: var(--accent); margin-bottom: 12px; }
.process-list li strong { display: block; font-size: 18px; margin-bottom: 7px; }
.process-list p { font-size: 14px; }
.faq-list, .faq { border-top: 1px solid var(--border); }
details { border-bottom: 1px solid var(--border); padding: 22px 0; }
summary { display: flex; justify-content: space-between; gap: 24px; list-style: none; cursor: pointer; font-size: 15px; font-weight: 600; line-height: 1.8; }
summary::-webkit-details-marker { display: none; }
summary:after { content: '+'; color: var(--accent); flex-shrink: 0; font-size: 22px; line-height: 1.3; font-weight: 400; }
details:not(.services-dropdown)[open] > summary:after { content: '−'; }
details p { max-width: 850px; margin: 14px 0 0; padding-inline-end: 36px; font-size: 14px; }
.cta-section { margin-block: 40px 0; }
.cta-section p { max-width: 740px; }
.contact-details { min-width: 0; overflow: hidden; }
.contact-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--border); }
.contact-item:last-child { border: 0; }
.contact-item:hover { background: var(--hover-soft); }
.contact-item span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.contact-item strong { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.contact-item b { color: var(--accent); font-size: 18px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); padding-top: 28px; margin-bottom: -32px; }
.hero .breadcrumbs { padding-top: 0; margin-bottom: 30px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-hover); text-decoration: underline; }
.related-links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 24px; font-size: 13px; }
.project-list { display: grid; gap: 20px; }
.project-item { min-width: 0; }
.project-item a { display: inline-block; margin-top: 8px; }
.project-item p { margin-bottom: 0; }
.home-hero { display: grid; grid-template-columns: 1fr; justify-items: center; text-align: center; padding-block: 92px 96px; position: relative; isolation: isolate; }
.home-hero::before { content: ''; position: absolute; inset: 0; z-index: -2; background: url('/images/Modern%20Workspace%20Portrait%20at%20Sunset.png') center 42% / cover no-repeat; opacity: .48; filter: brightness(1.12) saturate(.95); pointer-events: none; }
.home-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--bg), rgb(248 250 249 / 8%) 8%, rgb(248 250 249 / 28%) 48%, rgb(248 250 249 / 12%) 92%, var(--bg)), radial-gradient(ellipse at 50% 34%, rgb(248 250 249 / 44%) 0%, rgb(248 250 249 / 18%) 50%, transparent 80%), linear-gradient(0deg, var(--bg), transparent 30%, transparent 82%, rgb(248 250 249 / 18%)); pointer-events: none; }
.home-hero .hero-copy { width: 100%; max-width: 960px; }
.home-hero h1 { max-width: 960px; margin-inline: auto; font-size: clamp(40px, 5.1vw, 66px); line-height: 1.16; letter-spacing: -.05em; }
.home-hero .hero-description { max-width: 790px; margin-inline: auto; margin-top: 28px; }
.home-hero .hero-description { padding: 20px 24px; border: 1px solid rgb(255 255 255 / 85%); border-radius: 18px; background: rgb(255 255 255 / 84%); box-shadow: 0 12px 32px rgb(0 81 75 / 5%); }
.home-hero .hero-description p { font-size: 17px; line-height: 1.9; margin-bottom: 10px; text-wrap: pretty; }
.home-hero .hero-description .lead { font-size: 20px; line-height: 1.75; margin-inline: auto; margin-bottom: 14px; }
.home-hero .hero-actions { justify-content: center; margin-top: 30px; }
.accent { color: var(--accent); }
.hero-foot { color: var(--muted); font-size: 11px; margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.hero-foot span:before { content: ''; display: inline-block; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; vertical-align: middle; margin-inline-end: 8px; }
.portrait-shell { max-width: 420px; margin-inline-start: auto; }
.profile { border: 1px solid var(--border); border-radius: 22px; padding: 8px; background: var(--surface); box-shadow: var(--shadow); }
.profile picture { display: block; }
.profile img { width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; border-radius: 15px; }
main .hero .about-portrait { width: min(100%, 340px); margin-inline: auto; margin-block-start: 30px; }
.photo-caption { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 10px; line-height: 1.7; color: var(--muted); }
.photo-caption strong { font-weight: 500; }
.preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 48px; }
.preview-grid > article + article { border-inline-start: 1px solid var(--border); padding-inline-start: 48px; }
.service-preview { padding: 36px; }
.contact-preview { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.contact-preview p { max-width: 620px; }
.expertise-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.expertise-list > article { min-width: 0; }
.expertise-list h3 { font-size: 20px; }
.expertise-list p { font-size: 15px; margin-bottom: 12px; }
.expertise-list ul { font-size: 14px; margin-block: 12px 0; }
.service-intro { max-width: 830px; }
.work-list { display: grid; gap: 24px; }
.work-entry { min-width: 0; }
.work-entry p { max-width: 820px; }
.work-entry:has(.work-image) { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.work-image { min-width: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); padding: 8px; }
.work-image img { width: 100%; aspect-ratio: 1.95; height: auto; object-fit: contain; border-radius: 5px; }
.work-entry .eyebrow { margin-bottom: 8px; }
.work-entry h3 { margin-bottom: 8px; }
.work-stack, .section-note { font-size: 13px; }
.expertise-note { max-width: 830px; margin-top: 16px; }
.expertise-note h3 { font-size: 17px; }
.expertise-note p { font-size: 14px; }
.faq-group { min-width: 0; }
.faq-group > summary { color: var(--muted); font-size: 14px; }
.faq-group > summary > h2 { font: inherit; margin: 0; color: inherit; letter-spacing: 0; }
.faq-group .faq-list { margin-top: 24px; }
.faq-item { padding-block: 24px; border-bottom: 1px solid var(--border); }
.faq-item h3 { font-size: 16px; }
.faq-item p { margin: 10px 0 0; }
.quiet-link { font-size: 13px; }
.minimal-expertise { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.minimal-expertise h3 a { color: var(--color-primary); text-decoration: none; }
.minimal-expertise h3 a:hover { color: var(--color-hover); }
.minimal-expertise p { max-width: 490px; }
.minimal-work .project-grid { gap: 24px; }
.minimal-work .project-body { padding-top: 18px; }
.minimal-work h3 { margin-bottom: 8px; }
.minimal-work h3 a { color: var(--color-primary); text-decoration: none; }
.minimal-work h3 a:hover { color: var(--color-hover); }
.minimal-work .project p { margin-bottom: 0; }
.project h3 a { color: var(--color-primary); text-decoration: none; }
.project h3 a:hover { color: var(--color-hover); }
.experience-preview { display: flex; justify-content: space-between; align-items: center; gap: 32px; }
.experience-preview h3 { margin-bottom: 6px; }
.experience-preview p { margin: 0; font-size: 14px; }
.experience-preview a { color: var(--color-primary); text-decoration: none; }
.experience-preview a:hover { color: var(--color-hover); }
.anchor-alias { display: block; height: 0; }
.contact-form { min-width: 0; }
.form-group { margin-bottom: 22px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text); font-size: 14px; font-weight: 500; }
.form-group input, .form-group textarea { width: 100%; border: 1px solid var(--control-border); border-radius: 8px; padding: 13px 15px; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; line-height: 1.65; }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--muted-2); opacity: 1; }
.form-group textarea { min-height: 180px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; }
.contact-form button { cursor: pointer; }
.contact-form button:disabled { cursor: wait; opacity: .75; }
.form-status { font-size: 13px; margin-top: 16px; color: var(--muted); }
.form-status[data-state=error] { color: #a32115; }
.form-status[data-state=success] { color: #2e6237; }
/* Group related copy once; nested paragraphs keep their natural spacing. */
.content-panel { min-width: 0; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: border-color var(--card-transition-duration) var(--card-transition-easing), background-color var(--card-transition-duration) var(--card-transition-easing), color var(--card-transition-duration) var(--card-transition-easing); }
main .content-panel :is(h2, h3, h4, p, ul, ol, li, strong, b, span, summary, label, a, button, .exp-date, .exp-company, .project-year) { transition: color var(--card-transition-duration) var(--card-transition-easing), background-color var(--card-transition-duration) var(--card-transition-easing), border-color var(--card-transition-duration) var(--card-transition-easing); }
main .content-panel :is(summary, li)::before, main .content-panel :is(summary, li)::after { transition: color var(--card-transition-duration) var(--card-transition-easing); }
main .stats.content-panel .stat { transition: background-color var(--card-transition-duration) var(--card-transition-easing), border-color var(--card-transition-duration) var(--card-transition-easing); }
/* Keep introductory copy calm; substantive cards share an accessible green state. */
main .content-panel:not(.lead):not(.section-intro):is(:hover, :focus-within) { border-color: var(--color-primary); background: var(--color-primary); color: #f4faf8; }
main .content-panel:not(.lead):not(.section-intro):is(:hover, :focus-within) :where(h2, h3, h4, p, ul, ol, li, strong, b, summary, label, .eyebrow, .card-index, .exp-date, .exp-company, .project-year, .tag, .project-tags span, .contact-item, .contact-item span, .contact-item strong, .stat span) { color: #f4faf8; }
main .content-panel:not(.lead):not(.section-intro):is(:hover, :focus-within) a { color: var(--color-secondary); }
main .content-panel:not(.lead):not(.section-intro):is(:hover, :focus-within) a:hover { color: #fff; }
main .content-panel:not(.lead):not(.section-intro):is(:hover, :focus-within) :focus-visible { outline-color: var(--color-secondary); }
main .content-panel:not(.lead):not(.section-intro):is(:hover, :focus-within) summary::after { color: var(--color-secondary); }
main .content-panel:not(.lead):not(.section-intro):is(:hover, :focus-within) li::before { color: var(--color-secondary); }
main .stats.content-panel:is(:hover, :focus-within) .stat { background: transparent; border-color: rgb(255 255 255 / 24%); }
main .contact-details:is(:hover, :focus-within) .contact-item { border-color: rgb(255 255 255 / 24%); }
main .contact-details:is(:hover, :focus-within) .contact-item:hover { background: rgb(255 255 255 / 8%); }
main .content-panel:not(.lead):not(.section-intro):is(:hover, :focus-within) :is(.btn-primary, .button-primary) { background: var(--color-secondary); border-color: var(--color-secondary); color: var(--color-primary); }
main .content-panel:not(.lead):not(.section-intro):is(:hover, :focus-within) :is(.btn-primary, .button-primary):hover { color: var(--color-primary); border-color: #fff; box-shadow: none; }
main .contact-form:is(:hover, :focus-within) .form-status[data-state=error] { color: #ffdbda; }
main .contact-form:is(:hover, :focus-within) .form-status[data-state=success] { color: #d7f3df; }
.content-panel > :last-child { margin-bottom: 0; }
.content-panel--compact { padding: 18px 24px; background: var(--surface-2); }
.stats.content-panel { padding: 0; }
.section-note.content-panel { margin-top: 24px; }
.content-panel > .faq-list { border-top: 0; }
.content-panel > details:last-child, .faq-list > details:last-child, .faq-list > .faq-item:last-child { border-bottom: 0; padding-bottom: 0; }
.related-links a, .footer-contact a { transition: background-color .35s ease, color .35s ease, box-shadow .35s ease; }
.site-header :is(.language-switcher a, .services-menu a) { transition: background-color .35s ease, color .35s ease, border-color .35s ease; }
main .content-panel .contact-item { transition: background-color var(--card-transition-duration) var(--card-transition-easing), color var(--card-transition-duration) var(--card-transition-easing), border-color var(--card-transition-duration) var(--card-transition-easing); }
/* A small amount of frosted glass on selected content, with a solid fallback. */
main :is(.home-skill-card, .exp.content-panel, .about-copy, .contact-form, .contact-details) { box-shadow: 0 10px 30px rgb(0 81 75 / 4%); }
.home-skills { position: relative; isolation: isolate; }
.home-skills::before { content: ''; position: absolute; inset: 60px -8px 0; z-index: -1; border-radius: 30px; background: radial-gradient(ellipse at 12% 45%, rgb(0 81 75 / 7%), transparent 58%), radial-gradient(ellipse at 88% 20%, rgb(255 214 51 / 8%), transparent 56%); pointer-events: none; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .home-hero .hero-description { background: rgb(255 255 255 / 68%); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  main :is(.home-skill-card, .exp.content-panel, .about-copy, .contact-form, .contact-details) { background: rgb(255 255 255 / 78%); border-color: rgb(214 229 222 / 85%); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .about-portrait .profile { background: rgb(255 255 255 / 72%); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
}
html[dir=rtl] body { font-family: Vazirmatn, Tahoma, Arial, sans-serif; line-height: 1.95; }
html[dir=rtl] h1, html[dir=rtl] h2, html[dir=rtl] h3 { letter-spacing: 0; }
html[dir=rtl] h1 { line-height: 1.45; font-size: clamp(35px, 4.5vw, 56px); }
html[dir=rtl] .home-hero h1 { font-size: clamp(40px, 5vw, 64px); }
html[dir=rtl] h2 { line-height: 1.6; }
html[dir=rtl] h3 { line-height: 1.7; }
html[dir=rtl] .eyebrow, html[dir=rtl] .section-kicker { letter-spacing: 0; font-size: 12px; }
@media (max-width: 1180px) {
  html { scroll-padding-top: 95px; }
  [id] { scroll-margin-top: 95px; }
}
@media (max-width: 800px) {
  .container { width: calc(100% - 40px); }
  .section { padding-block: 42px; }
  .section-head { display: block; }
  .section-head > .section-intro { margin-top: 18px; max-width: 650px; }
  main .home-hero { padding-block: 68px 72px; }
  .home-hero .hero-description { max-width: 680px; }
  .portrait-shell { width: min(100%, 420px); margin-inline: auto; }
  .about-grid, .split-section, .contact-layout, .service-hero { grid-template-columns: 1fr; gap: 28px; }
  .content-grid, .skill-columns, .project-grid { gap: 18px; }
  .content-panel { padding: 24px; }
  .content-panel--compact { padding: 18px 20px; }
  .preview-grid { gap: 28px; }
  .preview-grid > article + article { padding-inline-start: 28px; }
  .contact-preview { display: block; }
  .hero { padding-block: 52px 40px; }
}
@media (max-width: 560px) {
  main #about .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main #about .stat { padding: 20px 14px; }
  main #about .stat:nth-child(even) { border-inline-end: 0; }
  main #about .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .container { width: calc(100% - 32px); }
  h1 { font-size: 38px; }
  .home-hero h1 { font-size: clamp(34px, 8.6vw, 44px); line-height: 1.22; }
  .home-hero .hero-description p { font-size: 15px; line-height: 1.9; }
  .home-hero .hero-description { padding: 18px; border-radius: 15px; }
  .home-hero .hero-description .lead { font-size: 17px; line-height: 1.8; }
  main .hero .about-portrait { width: min(100%, 260px); margin-block-start: 24px; }
  .lead { font-size: 16px; }
  .content-grid, .skill-columns, .project-grid, .preview-grid, .process-list, .expertise-list, .minimal-expertise { grid-template-columns: 1fr; }
  .preview-grid > article + article { padding-inline-start: 0; border-inline-start: 0; padding-top: 32px; border-top: 1px solid var(--border); }
  .project-body { padding: 22px 0 0; }
  .exp { grid-template-columns: 1fr; gap: 12px; }
  .content-panel { padding: 20px; }
  .content-panel--compact { padding: 16px 18px; }
  .btn, .button { padding-inline: 16px; }
  .photo-caption { flex-wrap: wrap; font-size: 10px; }
  .service-preview { padding: 26px; }
  .contact-item { padding: 20px 0; }
  .work-entry:has(.work-image) { grid-template-columns: 1fr; gap: 22px; }
  .work-image { max-width: 360px; }
  .minimal-expertise { gap: 24px; }
  .experience-preview { display: block; }
  .experience-preview > p { margin-top: 16px; }
  html[dir=rtl] .home-hero h1 { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *:before, *:after { transition: none !important; animation: none !important; }
}
