/* =====================================================================
   hoseinshekari.ir — app.css
   Tokens: #080808 black · #FFD600 yellow · #FFFFFF white · #171717 gray
   Fonts : Vazirmatn (fa/ar) · Inter (en)   Dark theme · mobile-first
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --black: #080808;
  --gray: #171717;
  --gray-2: #1f1f1f;
  --gray-3: #262626;
  --yellow: #FFD600;
  --yellow-soft: rgba(255, 214, 0, .12);
  --white: #ffffff;
  --muted: #9aa0a6;
  --line: rgba(255, 255, 255, .09);
  --font-fa: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
  --font-en: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .5);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --container: 1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-fa);
  font-size: 16px;
  line-height: 1.75;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
html[dir="ltr"] body { font-family: var(--font-en); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; }
h1, h2, h3, h4 { line-height: 1.28; font-weight: 800; }
table { border-collapse: collapse; width: 100%; }

/* ---------- Layout ---------- */
html, body { max-width: 100%; overflow-x: hidden; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.site-main { min-height: 60vh; }
.section { padding: 90px 0; }
.section--alt { background: var(--gray); }
.section--tight { padding: 56px 0; }
img, svg, video, iframe, table, pre { max-width: 100%; }
img, video { height: auto; }
p, li, h1, h2, h3, h4, dd, dt, a { overflow-wrap: anywhere; word-break: break-word; }

/* ---------- Accessibility ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: 16px; top: -80px; z-index: 400;
  background: var(--yellow); color: var(--black); padding: 12px 22px;
  border-radius: 999px; font-weight: 700; transition: top .2s;
}
.skip-link:focus { top: 16px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 28px; border-radius: 999px; font-weight: 700; font-size: 15px;
  transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap; cursor: pointer;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary { background: var(--yellow); color: var(--black); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(255, 214, 0, .3); }
.btn-outline { border: 1.5px solid var(--line); color: var(--white); }
.btn-outline:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-danger { background: #b3261e; color: var(--white); }
.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-lg { padding: 17px 36px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(8, 8, 8, .88);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header.is-scrolled { box-shadow: 0 12px 36px rgba(0, 0, 0, .45); }
/* The header gets a wider track than the 1200px content container: with a
   12-item Persian nav the links otherwise slide under the resume button. */
.header-inner {
  display: flex; align-items: center; gap: 18px; min-height: 76px;
  width: 100%; max-width: 1560px; margin-inline: auto; padding-inline: 20px;
}

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-avatar {
  width: 44px; height: 44px; border-radius: 13px; overflow: hidden;
  border: 2px solid var(--yellow); flex-shrink: 0;
}
.brand-avatar img { width: 100%; height: 100%; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 16px; font-weight: 800; }
.brand-text small { color: var(--muted); font-size: 12.5px; }

.site-nav { margin-inline-start: auto; min-width: 0; }
.site-nav ul { display: flex; align-items: center; gap: 0; flex-wrap: nowrap; }
.nav-link {
  display: block; padding: 8px 9px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  white-space: nowrap; transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--white); }
.nav-link.is-active { color: var(--black); background: var(--yellow); }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Mobile nav toggle */
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 11px 6px; }
.nav-toggle-bar { width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: .25s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(64px, 9vw, 120px) 0;
  background:
    radial-gradient(900px 460px at 82% -12%, var(--yellow-soft), transparent 62%),
    radial-gradient(700px 380px at 4% 108%, rgba(255, 214, 0, .05), transparent 58%);
}
.hero-inner { display: grid; grid-template-columns: 1.12fr .88fr; gap: 56px; align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 18px;
  background: var(--yellow-soft); color: var(--yellow); border-radius: 999px;
  font-weight: 700; font-size: 13.5px; margin-bottom: 24px;
}
.hero-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); animation: pulse 2s infinite; }
.hero-title { font-size: clamp(36px, 6.2vw, 62px); line-height: 1.1; }
.hero-title .hl { color: var(--yellow); }
.hero-sub { color: var(--muted); font-size: 19px; margin-top: 18px; max-width: 470px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 44px; max-width: 400px; }
.hero-visual { display: flex; justify-content: center; position: relative; }
.hero-portrait {
  width: min(100%, 400px); aspect-ratio: 1; object-fit: cover; border-radius: 28px;
  border: 1px solid var(--line); position: relative; z-index: 1; box-shadow: var(--shadow);
}
.hero-visual::before {
  content: ''; position: absolute; inset: -16px; border-radius: 38px;
  border: 1px dashed rgba(255, 214, 0, .38); z-index: 0;
}
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .3 } }

/* ---------- Stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.stat-card {
  background: var(--gray); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 6px;
}
.stat-card .stat-icon {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px;
  background: var(--yellow-soft); color: var(--yellow); margin-bottom: 8px;
}
.stat-card .stat-icon svg { width: 21px; height: 21px; }
.stat-card .stat-value { font-size: 30px; font-weight: 800; color: var(--yellow); line-height: 1.1; }
.stat-card .stat-label { color: var(--muted); font-size: 14px; }
.hero-stats .stat-card { flex-direction: row; align-items: center; gap: 14px; padding: 16px 18px; }
.hero-stats .stat-icon { margin-bottom: 0; width: 40px; height: 40px; }
.hero-stats .stat-value { font-size: 24px; }

/* ---------- Section headings ---------- */
.section-head { margin-bottom: 48px; max-width: 660px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-kicker {
  display: inline-flex; align-items: center; gap: 9px; color: var(--yellow);
  font-weight: 700; font-size: 13.5px; letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: 14px;
}
.section-kicker::before { content: ''; width: 24px; height: 2px; background: var(--yellow); border-radius: 2px; }
.section-title { font-size: clamp(28px, 4.4vw, 42px); }
.section-lead { color: var(--muted); margin-top: 14px; font-size: 17px; }

/* ---------- Page head (inner pages) ---------- */
.page-head { padding: 66px 0 42px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(30px, 5vw, 48px); }
.page-head p { color: var(--muted); margin-top: 12px; font-size: 17px; max-width: 680px; }
.breadcrumb { display: flex; gap: 8px; color: var(--muted); font-size: 13.5px; margin-bottom: 14px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--yellow); }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--gray); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s var(--ease), border-color .25s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(255, 214, 0, .42); }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--gray-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.06); }
.card-body { padding: 24px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.card-title { font-size: 19px; }
.card-title a:hover { color: var(--yellow); }
.card-text { color: var(--muted); font-size: 14.5px; flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.card-meta svg { width: 15px; height: 15px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 6px; }
.link-arrow { display: inline-flex; align-items: center; gap: 7px; color: var(--yellow); font-weight: 700; font-size: 14px; }
.link-arrow svg { width: 16px; height: 16px; transition: transform .2s; }
.link-arrow:hover svg { transform: translateX(4px); }
html[dir="rtl"] .link-arrow:hover svg { transform: translateX(-4px); }

/* ---------- Badges & chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px;
  border-radius: 999px; font-size: 12.5px; font-weight: 700;
}
.badge--yellow { background: var(--yellow-soft); color: var(--yellow); }
.badge--green { background: rgba(52, 199, 89, .14); color: #31d472; }
.badge--blue { background: rgba(0, 122, 255, .14); color: #5da8ff; }
.badge--gray { background: rgba(255, 255, 255, .08); color: var(--muted); }

.chip-list { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 12px 20px;
  background: var(--gray); border: 1px solid var(--line); border-radius: 999px;
  font-weight: 600; font-size: 14px; transition: border-color .2s, background .2s;
}
.chip:hover { border-color: var(--yellow); }
.chip svg { width: 17px; height: 17px; color: var(--yellow); }

/* ---------- Skills ---------- */
.skill-bars { display: grid; gap: 22px; }
.skill-bar-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 9px; font-size: 15px; font-weight: 600; }
.skill-bar-head em { color: var(--yellow); font-style: normal; font-weight: 700; }
.skill-track { height: 9px; border-radius: 999px; background: var(--gray-2); overflow: hidden; }
.skill-fill {
  height: 100%; border-radius: 999px; width: 0;
  background: linear-gradient(90deg, var(--yellow), #ffb800);
  transition: width 1.2s var(--ease);
}

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-inline-start: 38px; }
.timeline::before { content: ''; position: absolute; inset-inline-start: 8px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline-item { position: relative; padding-bottom: 42px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ''; position: absolute; inset-inline-start: -37px; top: 8px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--black); border: 3px solid var(--yellow);
}
.timeline-date { color: var(--yellow); font-size: 13.5px; font-weight: 700; letter-spacing: .03em; }
.timeline-title { font-size: 19px; margin: 7px 0 4px; }
.timeline-sub { color: var(--muted); font-size: 15px; }
.timeline-desc { color: var(--muted); font-size: 14.5px; margin-top: 10px; }

/* ---------- Testimonials ---------- */
.testimonial {
  background: var(--gray); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 16px;
}
.testimonial-stars { color: var(--yellow); display: flex; gap: 3px; }
.testimonial-stars svg { width: 16px; height: 16px; }
.testimonial-quote { color: var(--muted); font-size: 15.5px; }
.testimonial-author { display: flex; align-items: center; gap: 13px; }
.testimonial-author img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.testimonial-author strong { display: block; }
.testimonial-author small { color: var(--muted); }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 860px; margin-inline: auto; }
.faq-item { background: var(--gray); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.faq-item.open { border-color: rgba(255, 214, 0, .4); }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 21px 24px; text-align: start; font-size: 16px; font-weight: 700;
}
.faq-q svg { width: 18px; height: 18px; color: var(--yellow); flex-shrink: 0; transition: transform .25s; }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a { padding: 0 24px 22px; color: var(--muted); font-size: 15px; }
.faq-item:not(.open) .faq-a { display: none; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; background: var(--black); border: 1px solid var(--line);
  color: var(--white); border-radius: var(--radius-sm); padding: 14px 16px;
  font-size: 15px; transition: border-color .2s, background .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--yellow); }
.field textarea { resize: vertical; min-height: 150px; }
.field select { cursor: pointer; }
.hp-field {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.panel { background: var(--gray); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; }
.form-note { color: var(--muted); font-size: 13.5px; margin-top: 6px; }

/* Alerts */
.alert {
  display: flex; align-items: center; gap: 11px; padding: 16px 20px;
  border-radius: var(--radius-sm); margin: 22px 0; font-weight: 600; font-size: 14.5px;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; }
.alert-success { background: rgba(52, 199, 89, .13); color: #31d472; border: 1px solid rgba(52, 199, 89, .3); }
.alert-error { background: rgba(255, 69, 58, .13); color: #ff837c; border: 1px solid rgba(255, 69, 58, .3); }

/* ---------- Contact ---------- */
.contact-grid { display: flex; flex-direction: column; gap: 12px; }
.contact-info { display: flex; flex-direction: column; gap: 14px; }
.contact-item {
  display: flex; align-items: center; gap: 15px; padding: 16px 18px;
  background: var(--gray); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s;
}
.contact-item:hover { border-color: rgba(255, 214, 0, .45); }
.contact-icon {
  display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 12px; background: var(--yellow-soft); color: var(--yellow);
}
.contact-item svg { width: 20px; height: 20px; color: var(--yellow); flex-shrink: 0; }
.contact-item strong { display: block; font-size: 14px; }
.contact-item a, .contact-item span:not(.contact-icon) { color: var(--muted); font-size: 14.5px; word-break: break-word; }
.contact-item a:hover { color: var(--yellow); }

/* ---------- Blog ---------- */
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 44px; align-items: start; }
.blog-sidebar { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 96px; }
.blog-cat { display: flex; flex-direction: column; gap: 8px; }
.blog-cat li { list-style: none; }
.blog-cat a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 18px; background: var(--gray); border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-weight: 600; font-size: 14px;
  color: var(--muted); transition: border-color .2s, color .2s, background .2s;
}
.blog-cat a:hover { border-color: var(--yellow); color: var(--white); }
.blog-cat a.is-active, .blog-cat a.active { background: var(--yellow-soft); border-color: rgba(255, 214, 0, .4); color: var(--yellow); }
.blog-cat .count { color: var(--muted); font-size: 12.5px; flex-shrink: 0; }
.blog-cat a.is-active .count, .blog-cat a.active .count { color: var(--yellow); }
.blog-post-body { font-size: 16.5px; line-height: 1.95; color: #d7d9dc; }
.blog-post-body p { margin-bottom: 18px; }
.blog-post-body h2, .blog-post-body h3 { margin: 30px 0 14px; color: var(--white); }
.blog-post-body ul, .blog-post-body ol { margin: 0 0 18px; padding-inline-start: 24px; }
.blog-post-body ul { list-style: disc; }
.blog-post-body ol { list-style: decimal; }
.blog-post-body img { border-radius: var(--radius-sm); margin: 20px 0; }
.blog-post-body a { color: var(--yellow); text-decoration: underline; }
.comment { background: var(--gray); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px; }
.comment-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.comment-avatar {
  width: 42px; height: 42px; border-radius: 50%; background: var(--yellow-soft);
  color: var(--yellow); display: grid; place-items: center; font-weight: 800; flex-shrink: 0;
}
.comment-head strong { display: block; }
.comment-head small { color: var(--muted); }
.comment p { color: var(--muted); font-size: 14.5px; }

/* Pagination */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 46px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 44px; height: 44px; padding-inline: 12px; display: inline-flex;
  align-items: center; justify-content: center; border-radius: var(--radius-sm);
  background: var(--gray); border: 1px solid var(--line);
  font-weight: 600; font-size: 14px; color: var(--muted);
}
.pagination a:hover { border-color: var(--yellow); color: var(--yellow); }
.pagination .current { background: var(--yellow); color: var(--black); border-color: var(--yellow); }

/* ---------- Video / Reels ---------- */
.video-card iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; }
.video-embed { aspect-ratio: var(--content-ratio, 16 / 9); border-radius: var(--card-radius, var(--radius)); overflow: hidden; border: 1px solid var(--line); }
.video-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.content-card .reel-media { aspect-ratio: var(--content-ratio, var(--card-ratio, 16 / 10)); }
.content-card .reel-media img { object-fit: var(--content-fit, var(--card-fit, cover)); }
.content-card--span { grid-column: span var(--content-span); }
.project-card .card-media { aspect-ratio: var(--project-ratio, var(--card-ratio, 16 / 10)); }
.project-card .card-media img { object-fit: var(--project-fit, var(--card-fit, cover)); }
.project-card--span { grid-column: span var(--project-span); }
.reel-card { aspect-ratio: 9 / 16; }
.reel-card img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Project detail ---------- */
.project-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
.project-hero-media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.gallery-grid a { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); display: block; }
.gallery-grid img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; transition: transform .4s var(--ease); }
.gallery-grid a:hover img { transform: scale(1.05); }
.spec-list { display: flex; flex-direction: column; gap: 12px; }
.spec-row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.spec-row dt { color: var(--muted); }
.spec-row dd { font-weight: 600; text-align: end; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #060606; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1.3fr; gap: 44px; padding: 66px 0 46px; }
.footer-desc { color: var(--muted); font-size: 14.5px; margin: 18px 0 20px; max-width: 330px; }
.social-list { display: flex; gap: 10px; flex-wrap: wrap; }
.social-list a {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px;
  background: var(--gray); border: 1px solid var(--line); color: var(--muted); transition: .2s;
}
.social-list a:hover { background: var(--yellow); color: var(--black); border-color: var(--yellow); }
.social-list svg { width: 18px; height: 18px; }
.footer-title { font-size: 15px; margin-bottom: 20px; text-transform: uppercase; letter-spacing: .06em; }
.footer-links li { margin-bottom: 11px; }
.footer-links a { color: var(--muted); font-size: 14.5px; transition: color .2s; }
.footer-links a:hover { color: var(--yellow); }
.footer-contact li { display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.footer-contact svg { width: 17px; height: 17px; color: var(--yellow); flex-shrink: 0; }
.footer-contact a:hover { color: var(--yellow); }
.newsletter-form { display: flex; flex-direction: column; gap: 12px; }
.newsletter-form .btn { justify-content: center; }
.footer-bottom { border-top: 1px solid var(--line); padding: 24px 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }

/* ---------- Live chat ---------- */
.chat-avatar {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
  background: var(--yellow-soft); color: var(--yellow);
  display: grid; place-items: center;
}
.chat-avatar svg { width: 22px; height: 22px; }
.chat-thread {
  display: flex; flex-direction: column; gap: 12px;
  max-height: 460px; overflow-y: auto; padding: 4px;
}
.chat-bubble { max-width: 80%; padding: 13px 17px; border-radius: 16px; font-size: 14.5px; line-height: 1.7; }
.chat-bubble p { margin: 0; white-space: pre-wrap; }
.chat-bubble-user { background: var(--gray-2); border: 1px solid var(--line); align-self: flex-start; border-start-start-radius: 4px; }
.chat-bubble-admin { background: var(--yellow); color: var(--black); align-self: flex-end; border-start-end-radius: 4px; font-weight: 600; }
.chat-time { display: block; margin-top: 6px; font-size: 11.5px; opacity: .65; }

/* ---------- Chat quick-access button ---------- */
.ticket-fab {
  position: fixed; bottom: 24px; inset-inline-end: 24px; z-index: 300;
  display: flex; align-items: center; gap: 9px;
  height: 52px; padding: 0 20px 0 18px; border-radius: 999px; background: var(--yellow);
  color: var(--black); font-weight: 700; font-size: 14px;
  box-shadow: 0 16px 40px rgba(255, 214, 0, .35); transition: transform .2s var(--ease);
}
.ticket-fab:hover { transform: scale(1.05); color: var(--black); }
.ticket-fab svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: clamp(80px, 14vw, 170px) 0; }
.notfound-code { font-size: clamp(110px, 22vw, 220px); font-weight: 800; color: var(--yellow); line-height: 1; }
.notfound h1 { font-size: 30px; margin: 18px 0 12px; }
.notfound p { color: var(--muted); max-width: 500px; margin: 0 auto 32px; }

/* ---------- Animations ---------- */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .skill-fill { width: 100% !important; }
}

/* ---------- Admin ---------- */
.admin-body { background: var(--black); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 266px; flex-shrink: 0; background: var(--gray); border-inline-end: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 20px 16px; z-index: 250;
}
.admin-brand { display: flex; align-items: center; gap: 12px; padding: 8px 10px 22px; font-weight: 800; font-size: 16px; }
.admin-brand .brand-mark {
  width: 40px; height: 40px; border-radius: 12px; background: var(--yellow);
  color: var(--black); display: grid; place-items: center; font-size: 20px; font-weight: 800;
}
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav-title { padding: 18px 11px 7px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.admin-link {
  display: flex; align-items: center; gap: 11px; padding: 10px 13px;
  border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 600; transition: .18s;
}
.admin-link svg { width: 17px; height: 17px; flex-shrink: 0; }
.admin-link:hover { background: var(--gray-2); color: var(--white); }
.admin-link.is-active { background: var(--yellow-soft); color: var(--yellow); }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  display: flex; align-items: center; gap: 16px; padding: 16px 28px;
  border-bottom: 1px solid var(--line); background: rgba(8, 8, 8, .92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 200;
}
.admin-topbar h1 { font-size: 19px; }
.admin-topbar .spacer { flex: 1; }
.admin-user { color: var(--muted); font-size: 14px; }
.admin-user strong { color: var(--white); }
.admin-content { padding: 28px; flex: 1; }
.admin-burger { display: none; }

.admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 28px; }
.admin-stat { background: var(--gray); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.admin-stat .v { font-size: 32px; font-weight: 800; color: var(--yellow); line-height: 1.1; }
.admin-stat .l { color: var(--muted); font-size: 13.5px; margin-top: 5px; }

.admin-card { background: var(--gray); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.admin-card + .admin-card { margin-top: 22px; }
.admin-card h2 { font-size: 18px; margin-bottom: 18px; }
.admin-actions-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-actions-bar .spacer { flex: 1; }

.admin-table-wrap { background: var(--gray); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.admin-table { width: 100%; font-size: 14px; min-width: 640px; }
.admin-table th, .admin-table td { padding: 13px 16px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--gray-2); white-space: nowrap; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover td { background: rgba(255, 255, 255, .02); }
.row-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center;
  border-radius: 9px; border: 1px solid var(--line); background: var(--gray-2);
  color: var(--muted); transition: .18s;
}
.icon-btn:hover { color: var(--yellow); border-color: var(--yellow); }
.icon-btn.danger:hover { color: #ff6b62; border-color: #ff6b62; }
.icon-btn svg { width: 16px; height: 16px; }
.admin-empty { text-align: center; color: var(--muted); padding: 52px 20px; }

/* Admin login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 420px; background: var(--gray); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; }
.login-card h1 { font-size: 24px; margin-bottom: 8px; }
.login-card .sub { color: var(--muted); font-size: 14.5px; margin-bottom: 28px; }
.login-card .field { margin-bottom: 18px; }
.login-card .login-brand-mark {
  width: 52px; height: 52px; border-radius: 14px; background: var(--yellow);
  color: var(--black); display: grid; place-items: center; font-size: 26px; font-weight: 800; margin-bottom: 20px;
}
.btn-dark { background: var(--gray-2); border: 1px solid var(--line); color: var(--white); }
.btn-dark:hover { border-color: var(--yellow); color: var(--yellow); transform: none; box-shadow: none; }
.admin-topbar-actions { display: flex; align-items: center; gap: 16px; margin-inline-start: auto; }
.admin-topbar-actions > a { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 14px; font-weight: 600; }
.admin-topbar-actions > a svg { width: 17px; height: 17px; }
.admin-topbar-actions > a:hover { color: var(--yellow); }
.field-checkbox { flex-direction: row; align-items: center; gap: 11px; }
.field-checkbox input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--yellow); }
.field-hint { color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.admin-file-list { display: flex; flex-direction: column; gap: 10px; }
.admin-file-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--gray-2); border: 1px solid var(--line); border-radius: var(--radius-sm); flex-wrap: wrap; }
.admin-file-item .fi-main { flex: 1; min-width: 200px; }
.admin-file-item .fi-name { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.admin-file-item .fi-meta { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.admin-file-item .fi-actions { display: flex; gap: 8px; }
.admin-subtitle { color: var(--muted); font-size: 14px; margin: -12px 0 20px; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-tabs a { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 600; }
.admin-tabs a.is-active { background: var(--yellow); color: var(--black); border-color: var(--yellow); }

/* ---------- Content Production hub ---------- */
.content-admin-list { display: flex; flex-direction: column; gap: 12px; }
.content-admin-item {
  display: flex; gap: 16px; padding: 16px; background: var(--gray-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm); flex-wrap: wrap;
}
.ca-thumb { width: 120px; height: 80px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--gray-3); }
.ca-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ca-thumb-empty { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); }
.ca-thumb-empty svg { width: 26px; height: 26px; }
.ca-main { flex: 1; min-width: 220px; }
.ca-title { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.ca-url { color: var(--muted); font-size: 12.5px; margin-bottom: 10px; overflow-wrap: anywhere; }
.ca-url a { color: inherit; }
.ca-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ca-form input[type="text"] { flex: 1; min-width: 160px; }
.ca-imgsize { display: flex; gap: 12px; flex-wrap: wrap; width: 100%; }
.ca-imgsize label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.ca-imgsize select {
  background: var(--black); border: 1px solid var(--line); color: var(--white);
  border-radius: var(--radius-sm); padding: 8px 10px; font-size: 13px; min-width: 130px;
}
.field-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.ca-actions { display: flex; flex-direction: column; gap: 8px; justify-content: center; }

.content-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.content-card .card-meta { display: flex; justify-content: space-between; }

/* ---------- Permissions (user form) ---------- */
.perm-block { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.perm-block h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.perm-block h3 svg { width: 18px; height: 18px; color: var(--yellow); }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 14px; }
.perm-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  background: var(--gray-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 14px; cursor: pointer; transition: border-color .2s;
}
.perm-item:hover { border-color: rgba(255, 214, 0, .45); }
.perm-item input { accent-color: var(--yellow); width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- Responsive ---------- */

/* Large tablets / small laptops */
@media (max-width: 1400px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; }
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-layout { grid-template-columns: minmax(0, 1fr); }
  .blog-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .project-hero { grid-template-columns: minmax(0, 1fr); }
  .hero-inner { gap: 40px; }

  /* The 12-item header nav no longer fits — switch to the burger early so
     no link ever slides under the yellow resume button. */
  .site-nav {
    display: none; position: absolute; top: 100%; inset-inline: 0;
    background: var(--gray-2); border-bottom: 1px solid var(--line);
    padding: 14px 20px 22px; box-shadow: var(--shadow);
    max-height: calc(100vh - 76px); overflow-y: auto;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav .nav-link { padding: 13px 16px; border-radius: 10px; }
  .nav-toggle { display: flex; }
}

/* Tablets */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero-visual { order: -1; }
  .hero-stats { max-width: none; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding: 74px 0; }
  .page-head { padding: 54px 0 34px; }
}

/* Phones / small tablets */
@media (max-width: 820px) {
  .grid-2, .grid-3, .grid-4, .grid-owner, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .content-card--span, .project-card--span { grid-column: auto; }
  .hide-sm { display: none; }
  .section { padding: 62px 0; }
  .section-head { margin-bottom: 34px; }

  .header-inner { min-height: 68px; gap: 12px; }
  .brand-text small { display: none; }

  .hero-actions { gap: 10px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .hero-portrait { border-radius: 22px; }

  .card-body { padding: 20px; }
  .panel { padding: 24px; }
  .faq-q { font-size: 15px; }

  .admin-sidebar {
    position: fixed; inset-block: 0; inset-inline-start: 0;
    transform: translateX(-100%); transition: transform .3s var(--ease);
    width: min(300px, 86vw); height: 100vh;
  }
  html[dir="rtl"] .admin-sidebar { inset-inline-start: auto; inset-inline-end: 0; transform: translateX(100%); }
  .admin-sidebar.open { transform: none; box-shadow: var(--shadow); }
  .admin-burger {
    display: grid; place-items: center; width: 44px; height: 44px;
    border: 1px solid var(--line); border-radius: 11px; background: var(--gray);
  }
  .admin-burger svg { width: 20px; height: 20px; }
  .admin-content { padding: 18px; }
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .admin-stat { padding: 18px; }
  .admin-stat .v { font-size: 26px; }
  .admin-topbar { padding: 13px 18px; gap: 12px; flex-wrap: wrap; }
  .admin-topbar h1 { font-size: 17px; }
  .admin-user { display: none; }
  .admin-card { padding: 20px; }
}

/* Small phones */
@media (max-width: 560px) {
  :root { --container: 100%; }
  .container { padding-inline: 16px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; padding: 48px 0 34px; }
  .hero-stats, .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-stats .stat-value, .stat-card .stat-value { font-size: 22px; }
  .hero-stats .stat-card { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .gallery-grid { grid-template-columns: minmax(0, 1fr); }
  .page-head h1 { font-size: clamp(26px, 8vw, 34px); }
  .section-title { font-size: clamp(24px, 7vw, 32px); }
  .breadcrumb { font-size: 12.5px; }
  .admin-stats { grid-template-columns: minmax(0, 1fr); }
  .admin-topbar-actions > a span { display: none; }
  .admin-tabs { gap: 6px; }
  .admin-tabs a { padding: 8px 14px; font-size: 13px; }
  .admin-actions-bar .btn { flex: 1 1 auto; justify-content: center; }
  .row-actions { flex-wrap: wrap; }
  .admin-file-item { align-items: stretch; }
  .admin-file-item .fi-actions { width: 100%; }
  .admin-file-item .fi-actions .btn { flex: 1; justify-content: center; }
  .ticket-fab { bottom: 16px; inset-inline-end: 16px; }
  .ticket-fab-text { display: none; }
  .ticket-fab { width: 50px; height: 50px; padding: 0; justify-content: center; }
  .login-card { padding: 28px 22px; }
}

/* Very small phones */
@media (max-width: 380px) {
  .hero-stats, .stat-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-title { font-size: clamp(30px, 11vw, 40px); }
  .btn { padding: 13px 22px; font-size: 14px; }
  .brand-avatar { width: 38px; height: 38px; }
}
