/* ============================================================
   YDA — Yasmin Dolatshahi Architecture
   Premium Dark-Luxury Theme · RTL · Fully Responsive
   Redesign 2026 — design-system driven
   ============================================================ */

:root {
  /* ---- Color system (design spec) ---- */
  --bg:            #070B14;   /* primary background  */
  --bg-2:          #0C1324;   /* secondary background */
  --surface:       #111B2F;   /* card                 */
  --surface-2:     #0F1828;
  --surface-3:     #16213A;
  --border:        rgba(255,255,255,.06);
  --border-soft:   rgba(255,255,255,.08);
  --border-strong: rgba(255,255,255,.14);

  --accent:        #3D82FF;   /* primary blue  */
  --accent-2:      #5A9BFF;   /* hover blue    */
  --accent-deep:   #2563EB;
  --accent-glow:   rgba(61,130,255,.40);
  --accent-soft:   rgba(61,130,255,.12);
  --accent-faint:  rgba(61,130,255,.06);

  --text:          #F7F9FD;   /* text white      */
  --text-2:        #B2BCD2;   /* secondary text  */
  --text-3:        #6E7893;   /* muted text      */

  --success:       #2ED47A;
  --red:           #ef4444;

  /* ---- Radii ---- */
  --radius:    22px;
  --radius-sm: 14px;
  --radius-lg: 28px;
  --radius-xs: 10px;

  /* ---- Shadows ---- */
  --shadow:      0 24px 60px -18px rgba(0,0,0,.65);
  --shadow-soft: 0 14px 40px -14px rgba(0,0,0,.55);
  --shadow-glow: 0 16px 48px -10px var(--accent-glow);

  /* ---- Typography ---- */
  --ff: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;

  /* ---- Layout ---- */
  --maxw: 1440px;
  --nav-h: 84px;

  /* ---- Spacing (8px system) ---- */
  --s-1: 8px;  --s-2: 16px; --s-3: 24px; --s-4: 32px;
  --s-5: 48px; --s-6: 64px; --s-7: 96px; --s-8: 128px;
  --section-pad: 140px;

  --ease: cubic-bezier(.22,.61,.36,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--ff);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -.1px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ambient page glow */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(800px 500px at 85% -5%, rgba(61,130,255,.10), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(61,130,255,.06), transparent 55%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { max-width: 100%; }
button, input, select, textarea { font-family: inherit; }
ul { list-style: none; }
::selection { background: var(--accent); color: #fff; }

input, textarea, select { direction: rtl; text-align: right; }

/* Persian text must never break word-by-word into vertical rows */
h1, h2, h3, h4, h5, h6, p, a, span, li { word-break: keep-all; overflow-wrap: normal; }

/* keep inline icons sane */
.footer-col svg, .blog-meta svg, .project-meta svg, .detail-info-row svg,
.contact-row svg { width: 16px; height: 16px; vertical-align: middle; flex-shrink: 0; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 80px; width: 100%; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 28px; height: 56px; border-radius: 18px; font-weight: 600; font-size: 16px;
  border: 1px solid transparent; cursor: pointer; transition: .3s var(--ease);
  white-space: nowrap; position: relative; overflow: hidden; line-height: 1;
}
.btn svg { width: 19px; height: 19px; transition: transform .3s var(--ease); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff; box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 22px 56px -8px var(--accent-glow); }
.btn-primary:hover svg { transform: translateX(-4px); }
.btn-primary:active { transform: translateY(-1px); }
.btn-outline { background: rgba(255,255,255,.02); color: var(--text); border-color: var(--border-strong); backdrop-filter: blur(8px); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-2); background: var(--accent-soft); transform: translateY(-3px); }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border-soft); }
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-2px); }
.btn-sm { height: 46px; padding: 0 20px; font-size: 14.5px; border-radius: 14px; }
.btn-block { width: 100%; }

/* ============================================================
   SECTION HEADING
   ============================================================ */
.section { padding: var(--section-pad) 0; }
.section-sm { padding: 96px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 72px; }
.section-tag {
  display: inline-block; color: var(--accent-2); font-weight: 600; font-size: 14px;
  letter-spacing: 1.2px; margin-bottom: 16px; padding: 7px 18px; border-radius: 30px;
  background: var(--accent-soft); border: 1px solid var(--border-soft);
}
.section-title { font-size: clamp(30px, 4.5vw, 46px); font-weight: 700; line-height: 1.35; margin-bottom: 16px; letter-spacing: -.5px; }
.section-desc { color: var(--text-2); font-size: 18px; line-height: 1.8; }

/* glass utility */
.glass { background: linear-gradient(160deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  border: 1px solid var(--border-soft); backdrop-filter: blur(14px); }

/* ============================================================
   HEADER / NAV  —  Logo RIGHT · Nav CENTER · CTA LEFT (RTL)
   ============================================================ */
.header {
  position: fixed; top: 0; inset-inline: 0; z-index: 200; height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(7,11,20,.55); backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid transparent; transition: .4s var(--ease);
}
.header.scrolled {
  height: 76px; background: rgba(7,11,20,.88);
  border-bottom-color: var(--border); box-shadow: 0 10px 40px -20px rgba(0,0,0,.8);
}
.header .container { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: 100%; gap: 20px; }

/* RIGHT — logo (first in RTL flow) — TRANSPARENT wordmark, no box/badge */
.logo { display: flex; align-items: center; justify-self: start; line-height: 1; background: none; }
.logo-lockup {
  display: flex; flex-direction: column; align-items: flex-end; gap: 3px;
  background: none; border: none; box-shadow: none;
}
.logo-word {
  font-weight: 800; font-size: 30px; letter-spacing: 1px; line-height: 1;
  color: var(--text); background: none;
}
.logo-word span { color: var(--accent); }
.logo-sub { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.logo-sub-1 { font-size: 9.5px; font-weight: 700; letter-spacing: 2.5px; color: var(--text-2); line-height: 1.1; }
.logo-sub-2 { font-size: 8px; font-weight: 600; letter-spacing: 3px; color: var(--text-3); line-height: 1.1; }

/* CENTER — nav */
.nav { display: flex; align-items: center; gap: 4px; justify-self: center; }
.nav a {
  position: relative; padding: 10px 16px; border-radius: 11px; color: var(--text-2);
  font-size: 15.5px; font-weight: 500; transition: .25s var(--ease);
}
.nav a::after {
  content: ''; position: absolute; bottom: 4px; right: 16px; left: 16px; height: 2px;
  background: var(--accent); border-radius: 2px; transform: scaleX(0); transform-origin: center; transition: transform .3s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { transform: scaleX(1); }
.nav a.active { color: var(--text); background: rgba(255,255,255,.04); }
.nav a.active::after { transform: scaleX(1); }

/* LEFT — actions */
.header-actions { display: flex; align-items: center; gap: 12px; justify-self: end; }
.header-cta {
  height: 50px; padding: 0 26px; font-size: 15px; border-radius: 15px;
  box-shadow: 0 12px 34px -10px var(--accent-glow);
}
.icon-btn {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px;
  background: var(--surface-2); border: 1px solid var(--border-soft); cursor: pointer;
  color: var(--text-2); transition: .25s var(--ease);
}
.icon-btn:hover { color: #fff; border-color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; }
.menu-toggle { display: none; }

/* ============================================================
   MOBILE MINI-APP BOTTOM TAB BAR (hidden on desktop/tablet)
   ============================================================ */
.tabbar { display: none; }

/* ============================================================
   MOBILE MENU — full-screen slide panel
   ============================================================ */
.mobile-menu {
  position: fixed; inset: 0; z-index: 300; display: none; flex-direction: column;
  background: rgba(7,11,20,.96); backdrop-filter: blur(24px);
  padding: 24px; opacity: 0; transition: opacity .35s var(--ease);
}
.mobile-menu.open { display: flex; opacity: 1; }
.mm-head { display: flex; align-items: center; justify-content: space-between; height: 48px; margin-bottom: 18px; }
.mm-links { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.mm-links a {
  font-size: 19px; font-weight: 600; color: var(--text); padding: 16px 20px;
  border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid var(--border-soft);
  transition: .25s var(--ease); transform: translateY(14px); opacity: 0;
}
.mobile-menu.open .mm-links a { transform: translateY(0); opacity: 1; }
.mm-links a:nth-child(1){ transition-delay:.05s } .mm-links a:nth-child(2){ transition-delay:.1s }
.mm-links a:nth-child(3){ transition-delay:.15s } .mm-links a:nth-child(4){ transition-delay:.2s }
.mm-links a:nth-child(5){ transition-delay:.25s } .mm-links a:nth-child(6){ transition-delay:.3s }
.mm-links a:nth-child(7){ transition-delay:.35s }
.mm-links a.active { border-color: var(--accent); color: var(--accent-2); background: var(--accent-soft); }
.mm-footer { margin-top: auto; padding-top: 24px; }
.mm-footer .btn { width: 100%; margin-bottom: 18px; }
.mm-social { display: flex; gap: 12px; justify-content: center; }
.mm-social a {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border-soft); color: var(--text-2); transition: .25s;
}
.mm-social a:hover { color: #fff; border-color: var(--accent); }
.mm-social svg { width: 20px; height: 20px; }

/* ============================================================
   HERO  —  content aligned RIGHT
   ============================================================ */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center;
  overflow: hidden; padding-top: var(--nav-h); }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .6; transform: scale(1.04); }
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(270deg, rgba(7,11,20,.4) 0%, rgba(7,11,20,.72) 45%, var(--bg) 100%),
    linear-gradient(0deg, var(--bg) 2%, transparent 42%),
    radial-gradient(120% 90% at 100% 50%, transparent 40%, rgba(7,11,20,.55) 100%);
}
.hero .container { position: relative; z-index: 2; display: block; }
/* DESKTOP: content hugs the RIGHT edge, no background panel — pure text */
.hero-content {
  max-width: 620px; margin-right: 0; margin-left: auto; text-align: right;
  padding: 0; background: none; border: none; backdrop-filter: none; box-shadow: none;
}
.hero-brand { font-size: clamp(64px, 9vw, 104px); font-weight: 800; line-height: .92;
  letter-spacing: -2px; margin-bottom: 8px; color: var(--text); }
.hero-brand span { color: var(--accent); text-shadow: 0 0 60px var(--accent-glow); }
.hero-title { font-size: clamp(34px, 5vw, 52px); font-weight: 800; color: var(--text);
  margin-bottom: 8px; letter-spacing: -.5px; line-height: 1.2; }
.hero-subtitle { font-size: clamp(19px, 2.4vw, 24px); color: var(--accent-2); font-weight: 600; margin-bottom: 22px; }
.hero-desc { color: var(--text-2); font-size: 17px; line-height: 1.85; margin-bottom: 32px; max-width: 540px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* SOCIAL BAR — floating left, glass cards (48px per spec) */
.hero-social { position: absolute; left: 28px; top: 50%; transform: translateY(-50%); z-index: 5;
  display: flex; flex-direction: column; gap: 16px; }
.hero-social a {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px;
  background: linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,.01));
  border: 1px solid var(--border-soft); color: var(--text-2);
  backdrop-filter: blur(10px); transition: .3s var(--ease);
}
.hero-social a:hover { color: #fff; border-color: var(--accent); transform: translateX(-4px); box-shadow: var(--shadow-glow); background: var(--accent-soft); }
.hero-social svg { width: 20px; height: 20px; }

/* ============================================================
   SERVICE / FEATURE CARDS
   ============================================================ */
.features-bar { position: relative; z-index: 6; margin-top: -80px; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature-card {
  position: relative; min-height: 220px; padding: 32px 28px; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  border: 1px solid var(--border-soft); backdrop-filter: blur(12px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; transition: .35s var(--ease); overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(160deg, var(--accent), transparent 50%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s var(--ease);
}
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-glow); }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 64px; height: 64px; margin-bottom: 20px; border-radius: 18px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-2); border: 1px solid var(--border-soft);
  transition: .35s var(--ease);
}
.feature-card:hover .feature-icon { background: var(--accent); color: #fff; transform: scale(1.06); }
.feature-icon svg { width: 28px; height: 28px; }
.feature-card h4 { font-size: 19px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.feature-card p { color: var(--text-2); font-size: 15px; line-height: 1.7; }
/* Empty spacer that preserves the vertical space of the removed feature cards */
.features-spacer { height: 220px; }

/* ============================================================
   PROJECTS GRID
   ============================================================ */
.filters { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 56px; }
.filter-btn {
  padding: 11px 24px; border-radius: 30px; background: var(--surface-2); border: 1px solid var(--border-soft);
  color: var(--text-2); cursor: pointer; font-size: 15px; font-weight: 500; transition: .25s var(--ease);
}
.filter-btn:hover { color: #fff; border-color: var(--border-strong); }
.filter-btn.active { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; border-color: transparent; box-shadow: var(--shadow-glow); }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.project-card {
  display: block; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface);
  border: 1px solid var(--border-soft); transition: .4s var(--ease); cursor: pointer; text-decoration: none;
}
.project-card:hover { transform: translateY(-10px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.project-thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; transition: .7s var(--ease); }
.project-card:hover .project-thumb img { transform: scale(1.08); }
.project-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7,11,20,.92), transparent 55%); }
.project-info { position: absolute; bottom: 0; left: 0; right: 0; width: 100%; box-sizing: border-box; padding: 22px; z-index: 2; text-align: right; }
.project-cat { display: inline-block; font-size: 12.5px; color: var(--accent-2); background: var(--accent-soft);
  padding: 4px 14px; border-radius: 20px; border: 1px solid var(--border-soft); white-space: nowrap; margin-bottom: 10px; }
.project-info h3 { display: block; font-size: 21px; font-weight: 700; color: #fff; line-height: 1.45;
  margin: 0 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: keep-all; }
.project-meta { display: flex; gap: 16px; color: var(--text-2); font-size: 13px; justify-content: flex-start;
  flex-wrap: nowrap; }
.project-meta span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.project-meta span:first-child { flex: 1 1 auto; }
.project-meta span:last-child { flex-shrink: 0; }
.project-view { position: absolute; top: 16px; left: 16px; width: 44px; height: 44px; border-radius: 13px;
  background: rgba(7,11,20,.55); backdrop-filter: blur(8px); display: grid; place-items: center; color: #fff;
  opacity: 0; transform: scale(.8) translateY(-6px); transition: .35s var(--ease); z-index: 3; border: 1px solid var(--border-soft); }
.project-card:hover .project-view { opacity: 1; transform: scale(1) translateY(0); }

/* ============================================================
   BLOG — magazine layout
   ============================================================ */
.blog-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; }
.blog-feature { border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border-soft); transition: .35s var(--ease); }
.blog-feature:hover { border-color: var(--border-strong); transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.blog-feature-img { aspect-ratio: 16/9; overflow: hidden; }
.blog-feature-img img { width: 100%; height: 100%; object-fit: cover; transition: .6s var(--ease); }
.blog-feature:hover .blog-feature-img img { transform: scale(1.05); }
.blog-feature-body { padding: 30px; text-align: right; }
.blog-feature-body .blog-cat { color: var(--accent-2); font-size: 13.5px; font-weight: 600; }
.blog-feature-body h3 { font-size: 25px; font-weight: 700; margin: 12px 0; line-height: 1.45; }
.blog-feature-body p { color: var(--text-2); margin-bottom: 18px; font-size: 16px; }
.blog-side { display: flex; flex-direction: column; gap: 18px; }
.blog-item { display: flex; gap: 18px; background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: 16px; transition: .3s var(--ease); }
.blog-item:hover { border-color: var(--border-strong); transform: translateX(-6px); }
.blog-item-img { width: 100px; height: 86px; border-radius: 12px; overflow: hidden; flex-shrink: 0; }
.blog-item-img img { width: 100%; height: 100%; object-fit: cover; transition: .5s var(--ease); }
.blog-item:hover .blog-item-img img { transform: scale(1.08); }
.blog-item-body { text-align: right; min-width: 0; }
.blog-item-body h4 { font-size: 16px; font-weight: 600; line-height: 1.6; margin-bottom: 8px; }
.blog-meta { display: flex; gap: 14px; color: var(--text-3); font-size: 13px; flex-wrap: wrap; }
.blog-meta span { display: inline-flex; align-items: center; gap: 5px; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 64px; align-items: center; }
.about-img { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-soft); }
.about-img img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.about-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7,11,20,.45), transparent 60%); }
.about-content { text-align: right; }
.about-content h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; margin-bottom: 10px; letter-spacing: -.5px; }
.about-role { color: var(--accent-2); font-weight: 600; margin-bottom: 24px; font-size: 18px; }
.about-content > p { color: var(--text-2); line-height: 2; margin-bottom: 36px; font-size: 17px; }
.about-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 36px; }
.stat-box { text-align: center; padding: 26px 12px; border-radius: var(--radius-sm);
  background: linear-gradient(160deg, rgba(255,255,255,.04), rgba(255,255,255,.01)); border: 1px solid var(--border-soft); transition: .3s var(--ease); }
.stat-box:hover { border-color: var(--accent); transform: translateY(-4px); }
.stat-num { font-size: 38px; font-weight: 800; color: var(--accent-2); line-height: 1; }
.stat-label { color: var(--text-2); font-size: 14px; margin-top: 8px; }

/* ============================================================
   FORMS
   ============================================================ */
.forms-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; align-items: start; }
.form-card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 32px; text-align: right; }
.form-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.form-card .form-sub { color: var(--text-2); font-size: 14.5px; margin-bottom: 26px; line-height: 1.7; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; color: var(--text-2); margin-bottom: 8px; font-weight: 500; }
.field label .req { color: var(--red); }
.input, .select, .textarea {
  width: 100%; padding: 14px 16px; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 14px; color: var(--text); font-size: 15px; transition: .25s var(--ease);
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { resize: vertical; min-height: 110px; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
select.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236E7893' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 16px center; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: 14px; padding: 28px; text-align: center;
  cursor: pointer; transition: .25s var(--ease); color: var(--text-2);
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.dropzone svg { width: 32px; height: 32px; margin: 0 auto 12px; color: var(--accent-2); }
.dropzone .dz-hint { font-size: 12.5px; color: var(--text-3); margin-top: 8px; }
.file-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.file-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.file-chip button { background: none; border: none; color: var(--red); cursor: pointer; font-size: 18px; }

/* Questionnaire */
.q-section { padding: 26px 0; border-bottom: 1px solid var(--border-soft); }
.q-section:first-child { padding-top: 0; }
.q-section:last-of-type { border-bottom: none; }
.q-title { font-size: 19px; font-weight: 700; color: var(--text); margin-bottom: 20px; padding-right: 14px; border-right: 3px solid var(--accent); }
.q-title .q-hint { font-size: 13px; color: var(--text-3); font-weight: 400; }
.q-options { display: flex; flex-wrap: wrap; gap: 12px; }
.q-opt { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 12px 16px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px;
  font-size: 14px; color: var(--text-2); transition: .25s var(--ease); flex: 1 1 auto; min-width: 150px; }
.q-opt:hover { border-color: var(--accent); color: var(--text); }
.q-opt input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.q-opt input:checked + span { color: #fff; font-weight: 600; }

/* Contact methods */
.contact-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-method { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 12px;
  background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 14px; transition: .3s var(--ease); text-align: center; }
.contact-method:hover { transform: translateY(-5px); border-color: var(--accent); }
.contact-method .cm-icon { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; color: #fff; }
.contact-method .cm-icon svg { width: 24px; height: 24px; }
.contact-method span { font-size: 14px; font-weight: 600; }
.contact-method small { font-size: 11.5px; color: var(--text-3); }
.cm-whatsapp { background: #25d366; } .cm-instagram { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.cm-telegram { background: #229ED9; } .cm-linkedin { background: #0A66C2; }
.cm-bale { background: #1ba9e8; } .cm-eitaa { background: #ef7d00; }

/* ============================================================
   FOOTER — premium 4 columns
   ============================================================ */
.footer { position: relative; background: var(--bg-2); border-top: 1px solid var(--border); padding: 96px 0 0; margin-top: 80px; overflow: hidden; }
.footer::before { content: ''; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  width: 60%; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 48px; margin-bottom: 56px; text-align: right; }
.footer-col h4 { font-size: 17px; font-weight: 700; margin-bottom: 22px; color: var(--text); }
.footer-brand-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.footer-brand-logo .logo-lockup { align-items: flex-start; }
.footer-brand-logo .logo-sub { align-items: flex-start; }
.footer-col > p { color: var(--text-2); font-size: 15px; line-height: 1.9; margin-bottom: 22px; max-width: 340px; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul a { color: var(--text-2); font-size: 15px; transition: .25s var(--ease); display: inline-flex; align-items: center; gap: 8px; }
.footer-col ul a:hover { color: var(--accent-2); transform: translateX(-4px); }
.footer-col ul a svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--accent-2); }
.contact-row { display: flex; align-items: flex-start; gap: 10px; color: var(--text-2); font-size: 14.5px; margin-bottom: 14px; line-height: 1.7; }
.contact-row svg { color: var(--accent-2); margin-top: 4px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border-soft); color: var(--text-2); transition: .25s var(--ease); }
.footer-social a:hover { color: #fff; border-color: var(--accent); transform: translateY(-3px); background: var(--accent-soft); }
.footer-social svg { width: 19px; height: 19px; }
.footer-badges { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; padding: 36px 0; border-top: 1px solid var(--border); margin-bottom: 0; }
.footer-badge { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-2);
  font-size: 13px; text-align: center; padding: 20px 10px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(255,255,255,.03), rgba(255,255,255,.008)); border: 1px solid var(--border-soft); transition: .3s var(--ease); }
.footer-badge:hover { border-color: var(--accent); transform: translateY(-4px); }
.footer-badge .fb-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); }
.footer-badge svg { width: 21px; height: 21px; }
.footer-bottom { text-align: center; color: var(--text-3); font-size: 14px; padding: 28px 0; border-top: 1px solid var(--border); }
.footer-bottom a { color: var(--accent-2); }

/* ============================================================
   TOAST + MODAL + LIGHTBOX
   ============================================================ */
.toast-wrap { position: fixed; bottom: 24px; left: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: 14px; padding: 14px 20px;
  color: #fff; box-shadow: var(--shadow); min-width: 280px; animation: slideIn .35s var(--ease); display: flex; gap: 10px; align-items: center; }
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--red); }
.toast svg { width: 20px; height: 20px; flex-shrink: 0; }
@keyframes slideIn { from { transform: translateX(-30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.8); z-index: 9000; display: none;
  align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(6px); }
.modal-overlay.open { display: flex; }

/* ============================================================
   PAGE HEADER + DETAIL PAGES
   ============================================================ */
.page-head { padding: calc(var(--nav-h) + 70px) 0 60px; text-align: center; position: relative;
  border-bottom: 1px solid var(--border); background: var(--bg-2); }
.page-head::after { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 200px at 50% 0%, var(--accent-soft), transparent 70%); pointer-events: none; }
.page-head h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 800; margin-bottom: 12px; letter-spacing: -.5px; position: relative; }
.page-head p { color: var(--text-2); font-size: 17px; position: relative; }
.breadcrumb { display: flex; gap: 8px; justify-content: center; color: var(--text-3); font-size: 14px; margin-top: 16px; position: relative; }
.breadcrumb a:hover { color: var(--accent-2); }

.detail-hero { aspect-ratio: 21/9; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 40px; border: 1px solid var(--border-soft); }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 44px; align-items: start; }
.detail-content { font-size: 17px; line-height: 2.1; color: var(--text); text-align: right; }
.detail-content h2 { font-size: 28px; font-weight: 700; margin: 28px 0 14px; }
.detail-content h3 { font-size: 22px; font-weight: 700; margin: 22px 0 12px; }
.detail-content p { color: var(--text-2); margin-bottom: 18px; }
.detail-sidebar { position: sticky; top: calc(var(--nav-h) + 24px); }
.detail-card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 26px; margin-bottom: 20px; text-align: right; }
.detail-card h4 { margin-bottom: 16px; font-size: 18px; font-weight: 700; }
.detail-info-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border-soft); font-size: 14.5px; }
.detail-info-row:last-child { border-bottom: none; }
.detail-info-row span:first-child { color: var(--text-2); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 28px 0; }
.gallery-grid img { aspect-ratio: 4/3; object-fit: cover; border-radius: 14px; border: 1px solid var(--border-soft); cursor: pointer; transition: .3s var(--ease); }
.gallery-grid img:hover { transform: scale(1.03); border-color: var(--accent); }

/* loading / animations */
.loading { text-align: center; padding: 80px; color: var(--text-2); }
.spinner { width: 40px; height: 40px; border: 3px solid var(--border-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.fade-in { animation: fadeIn .7s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.empty-state { text-align: center; padding: 60px; color: var(--text-3); }
.empty-state h2, .empty-state h1 { color: var(--text); margin-bottom: 10px; }

/* scroll-reveal */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s var(--ease), transform .8s var(--ease); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }
/* Fallbacks: never hide content when JS is off, for print, or reduced motion */
.no-js .reveal { opacity: 1; transform: none; }
@media print { .reveal { opacity: 1 !important; transform: none !important; } }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* CTA band */
.cta-band { position: relative; text-align: center; padding: 72px 40px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--surface), var(--surface-3)); border: 1px solid var(--border-soft); overflow: hidden; }
.cta-band::before { content: ''; position: absolute; inset: 0; background: radial-gradient(500px 240px at 50% 0%, var(--accent-soft), transparent 70%); }
.cta-band > * { position: relative; }


/* ============================================================
   RESPONSIVE — handcrafted, dedicated layouts per breakpoint
   Desktop ≥ 1025px  |  Tablet 769–1024  |  Mobile ≤ 768 (Mini App)
   ============================================================ */

/* ---- Ultra-wide 2560 / 3840 ---- */
@media (min-width: 2200px) {
  :root { --maxw: 1680px; }
  body { font-size: 19px; }
}

/* ---- Desktop 1600 ---- */
@media (max-width: 1600px) {
  :root { --maxw: 1320px; --section-pad: 120px; }
  .container { padding: 0 56px; }
}

/* ---- Laptop 1440 ---- */
@media (max-width: 1440px) {
  :root { --maxw: 1180px; --section-pad: 110px; }
  .hero-brand { font-size: clamp(60px, 8vw, 96px); }
}

/* ---- Laptop 1366 ---- */
@media (max-width: 1366px) {
  :root { --maxw: 1120px; --section-pad: 104px; }
  .container { padding: 0 48px; }
  .nav a { padding: 9px 13px; font-size: 14.5px; }
}

/* ---- Laptop 1280 ---- */
@media (max-width: 1280px) {
  :root { --maxw: 1080px; --section-pad: 96px; }
  .container { padding: 0 40px; }
  .features-grid { gap: 18px; }
  .projects-grid { gap: 24px; }
  .nav a { padding: 9px 11px; font-size: 14px; }
  .header-cta { height: 46px; padding: 0 20px; font-size: 14px; }
}

/* ============================================================
   TABLET  (769 – 1024)  — 2-column comfortable layout
   ============================================================ */
@media (max-width: 1024px) {
  :root { --maxw: 100%; --section-pad: 88px; --nav-h: 78px; }
  .container { padding: 0 40px; }

  /* Header: collapse nav, keep CTA + hamburger */
  .nav { display: none; }
  .menu-toggle { display: grid; }
  .header .container { grid-template-columns: auto 1fr auto; }
  .header-actions { gap: 10px; }
  .logo-word { font-size: 27px; }

  /* Hero — keep right alignment, balanced */
  .hero { min-height: 84vh; }
  .hero-content { max-width: 560px; }
  .hero-brand { font-size: clamp(56px, 10vw, 84px); }

  .features-grid { grid-template-columns: repeat(2, 1fr); }
  /* 2-column tablet: 2 rows of cards (~92px) + gap */
  .features-spacer { height: 208px; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .forms-grid { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-badges { grid-template-columns: repeat(3, 1fr); }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
  .blog-layout { grid-template-columns: 1fr; }
  .about-layout { grid-template-columns: 1fr; gap: 40px; }
  .about-img { max-width: 420px; margin: 0 auto; }
  .hero-social { left: 18px; gap: 12px; }
  .hero-social a { width: 46px; height: 46px; }
}

/* ---- Tablet portrait 820 / 768 transition ---- */
@media (max-width: 900px) {
  :root { --section-pad: 80px; }
  .features-bar { margin-top: -48px; }
  .blog-item-img { width: 92px; height: 80px; }
}

/* ============================================================
   MOBILE  (≤ 768)  —  DEDICATED NATIVE MINI-APP INTERFACE
   This is NOT a scaled desktop page. Everything is rebuilt.
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --nav-h: 68px;
    --section-pad: 64px;
    --radius: 20px; --radius-lg: 22px; --radius-sm: 16px;
  }
  html, body { overflow-x: hidden; }
  body { font-size: 16px; line-height: 1.75; }
  .container { padding: 0 20px; }

  /* ---------- MOBILE HEADER (68px) — logo right, glass hamburger left ---------- */
  .header { height: 68px; background: rgba(7,11,20,.72); backdrop-filter: blur(18px) saturate(140%); }
  .header.scrolled { height: 60px; background: rgba(7,11,20,.92); }
  .header .container { grid-template-columns: 1fr auto; align-items: center; }
  /* Mobile mini-app: navigation lives in the bottom tab bar, so the header
     only carries the logo (right) and a compact CTA (left). */
  .header-cta { display: inline-flex; height: 40px; padding: 0 16px; font-size: 13px; border-radius: 13px; }
  .header-cta span { display: inline; }
  .header-actions { justify-self: start; }
  .menu-toggle { display: none; }
  .logo { justify-self: end; }
  .logo-lockup { align-items: flex-end; gap: 2px; }
  .logo-word { font-size: 24px; }
  .logo-sub-1 { font-size: 8px; letter-spacing: 2px; }
  .logo-sub-2 { font-size: 6.5px; letter-spacing: 2.5px; }

  /* ---------- MOBILE HERO — vertical, centered, 90vh ---------- */
  .hero {
    min-height: 90vh; text-align: center; padding-top: calc(var(--nav-h) + 12px);
    padding-bottom: 36px; display: flex; align-items: center;
  }
  .hero-bg img { opacity: .42; }
  .hero-bg::after {
    background:
      linear-gradient(0deg, var(--bg) 6%, rgba(7,11,20,.55) 45%, rgba(7,11,20,.35) 100%),
      radial-gradient(120% 60% at 50% 0%, rgba(7,11,20,.5), transparent 70%);
  }
  .hero .container { padding: 0 24px; }
  .hero-content { max-width: 460px; margin: 0 auto; text-align: center; }
  .hero-brand { font-size: clamp(58px, 20vw, 88px); margin-bottom: 10px; letter-spacing: -1px; }
  .hero-title { font-size: clamp(28px, 8.5vw, 40px); margin-bottom: 10px; }
  .hero-subtitle { font-size: 18px; margin-bottom: 18px; }
  .hero-desc { font-size: 15.5px; line-height: 1.85; margin: 0 auto 28px; max-width: 380px; }

  /* Buttons — full width, 52px, touch friendly */
  .hero-cta { flex-direction: column; align-items: stretch; gap: 14px; }
  .hero-cta .btn { width: 100%; height: 54px; border-radius: 16px; font-size: 16px; }

  /* ---------- Social bar -> floating bottom pill (no content overlap) ---------- */
  .hero-social {
    position: fixed; left: 50%; bottom: 14px; top: auto; transform: translateX(-50%);
    flex-direction: row; gap: 6px; padding: 7px 8px; border-radius: 22px;
    background: rgba(7,11,20,.86); border: 1px solid var(--border-soft); backdrop-filter: blur(16px);
    z-index: 120; box-shadow: var(--shadow); transition: transform .35s var(--ease);
  }
  .hero-social.hide { transform: translateX(-50%) translateY(120px); }
  .hero-social a { width: 40px; height: 40px; border-radius: 12px; background: transparent; border: none; backdrop-filter: none; }
  .hero-social a:hover, .hero-social a:active { transform: none; box-shadow: none; background: var(--accent-soft); }
  .hero-social svg { width: 19px; height: 19px; }

  /* ---------- Features -> stacked single-column cards ---------- */
  .features-bar { margin-top: -36px; }
  .features-grid { grid-template-columns: 1fr; gap: 14px; }
  .feature-card {
    min-height: auto; flex-direction: row; text-align: right; gap: 16px;
    padding: 20px; justify-content: flex-start; align-items: center;
  }
  .feature-icon { margin-bottom: 0; width: 52px; height: 52px; flex-shrink: 0; }
  .feature-card h4 { font-size: 17px; }
  .feature-card p { font-size: 14px; }
  /* 1-column stacked: 4 cards (~92px each) + 3 gaps (14px) */
  .features-spacer { height: 410px; }

  /* ---------- Section headings ---------- */
  .section-head { margin-bottom: 40px; max-width: 100%; }
  .section-title { font-size: clamp(24px, 7vw, 34px); }
  .section-desc { font-size: 15px; }
  .section-tag { font-size: 12.5px; padding: 6px 14px; }

  /* ---------- Projects -> horizontal swipe (native feel) ---------- */
  .projects-grid {
    display: grid; grid-auto-flow: column; grid-auto-columns: 82%;
    grid-template-columns: none; gap: 16px;
    overflow-x: auto; overflow-y: visible;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    padding: 4px 20px 18px; margin: 0 -20px;
    scrollbar-width: none;
  }
  .projects-grid::-webkit-scrollbar { display: none; }
  .projects-grid > * { scroll-snap-align: center; }
  .project-card:hover { transform: none; }
  .project-thumb { aspect-ratio: 4/5; }

  /* On the projects listing page show a clean single column instead of swipe */
  #projGrid { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr;
    overflow: visible; padding: 0; margin: 0; }
  #projGrid .project-thumb { aspect-ratio: 16/11; }

  .filters { gap: 8px; margin-bottom: 32px; overflow-x: auto; flex-wrap: nowrap;
    justify-content: flex-start; padding-bottom: 6px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter-btn { white-space: nowrap; flex-shrink: 0; padding: 9px 18px; font-size: 14px; }

  /* ---------- Blog -> large single-column cards ---------- */
  .blog-layout { grid-template-columns: 1fr; gap: 18px; }
  .blog-feature-img { aspect-ratio: 16/10; }
  .blog-feature-body { padding: 22px; }
  .blog-feature-body h3 { font-size: 20px; }
  .blog-side { gap: 14px; }
  .blog-item { padding: 14px; border-radius: var(--radius-sm); }
  .blog-item-img { width: 88px; height: 78px; }

  /* ---------- About ---------- */
  .about-layout { gap: 32px; }
  .about-img { max-width: 340px; }
  .about-content { text-align: center; }
  .about-content .section-tag { margin-inline: auto; }
  .about-role { margin-inline: auto; }
  .about-content > p { margin-inline: auto; }
  .about-stats { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .stat-box { padding: 18px 8px; }
  .stat-num { font-size: 26px; }
  .stat-label { font-size: 12px; }
  .about-content .footer-social { justify-content: center; }

  /* ---------- Detail pages ---------- */
  .detail-hero { aspect-ratio: 4/3; border-radius: var(--radius); margin-bottom: 28px; }
  .detail-layout { gap: 28px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }

  /* ---------- Forms ---------- */
  .forms-grid { grid-template-columns: 1fr; max-width: 100%; }
  .row-2 { grid-template-columns: 1fr; }
  .form-card { padding: 22px; }
  .form-card h3 { font-size: 20px; }
  .contact-methods { grid-template-columns: 1fr 1fr; }
  .q-options { flex-direction: column; }
  .q-opt { min-width: 0; width: 100%; }

  /* ---------- CTA band ---------- */
  .cta-band { padding: 44px 22px; }

  /* ---------- FOOTER — single column, centered ---------- */
  .footer { padding-top: 56px; margin-top: 48px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .footer-brand-logo { justify-content: center; }
  .footer-brand-logo .logo-lockup { align-items: center; }
  .footer-brand-logo .logo-sub { align-items: center; }
  .footer-col > p { margin-inline: auto; }
  .footer-social { justify-content: center; }
  .footer-col ul a { justify-content: center; }
  .contact-row { justify-content: center; text-align: center; }
  .footer-badges { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .footer-bottom { font-size: 12.5px; }

  /* ---------- Page head ---------- */
  .page-head { padding: calc(var(--nav-h) + 44px) 0 44px; }

  /* ---------- Toast ---------- */
  .toast-wrap { left: 12px; right: 12px; bottom: 76px; }
  .toast { min-width: 0; width: 100%; }

  /* ---------- MOBILE MINI-APP BOTTOM TAB BAR ---------- */
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    height: calc(66px + env(safe-area-inset-bottom, 0px));
    padding: 0 8px env(safe-area-inset-bottom, 0px);
    background: rgba(8,13,24,.9); backdrop-filter: blur(20px) saturate(140%);
    border-top: 1px solid var(--border-soft);
    box-shadow: 0 -12px 40px -16px rgba(0,0,0,.7);
  }
  .tab-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    height: 66px; color: var(--text-3); font-size: 11px; font-weight: 600;
    background: none; border: none; cursor: pointer; transition: color .25s var(--ease);
    -webkit-tap-highlight-color: transparent;
  }
  .tab-item .tab-ic { display: grid; place-items: center; }
  .tab-item svg { width: 23px; height: 23px; }
  .tab-item.active { color: var(--accent-2); }
  .tab-item.active .tab-ic { filter: drop-shadow(0 0 10px var(--accent-glow)); }
  .tab-label { line-height: 1; }

  /* Center floating menu button */
  .tab-fab { position: relative; }
  .tab-fab .tab-fab-circle {
    position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
    width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff;
    box-shadow: 0 12px 30px -8px var(--accent-glow), 0 0 0 5px rgba(8,13,24,.9);
    transition: transform .25s var(--ease);
  }
  .tab-fab .tab-fab-circle svg { width: 26px; height: 26px; }
  .tab-fab:active .tab-fab-circle { transform: translateX(-50%) scale(.92); }
  .tab-fab .tab-label { margin-top: 38px; color: var(--accent-2); }

  /* Reserve space so the bar never covers content */
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
  .footer { margin-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
  /* Float social pill above the tab bar */
  .hero-social { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .hero-social.hide { transform: translateX(-50%) translateY(160px); }
  .toast-wrap { bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }

  /* ---------- MOBILE FULLSCREEN SLIDE MENU ---------- */
  .mobile-menu { padding: 20px 22px calc(env(safe-area-inset-bottom, 0px) + 22px); }
  .mm-head { height: 52px; margin-bottom: 14px; }
  .mm-head .logo-word { font-size: 24px; }
  .mm-links { gap: 10px; }
  .mm-links a { font-size: 18px; padding: 16px 20px; }
  .mm-footer .btn { height: 54px; border-radius: 16px; }
}

/* ============================================================
   FINE-GRAINED MOBILE BREAKPOINTS
   ============================================================ */

/* ---- 540 ---- */
@media (max-width: 540px) {
  .contact-methods { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-auto-columns: 86%; }
}

/* ---- 480 ---- */
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  :root { --section-pad: 56px; }
  .hero-brand { font-size: clamp(52px, 19vw, 72px); }
  .hero-title { font-size: clamp(26px, 8vw, 34px); }
  .hero-desc { font-size: 15px; }
  .about-stats { grid-template-columns: 1fr; gap: 10px; }
  .stat-box { flex-direction: row; align-items: center; justify-content: center; gap: 12px; padding: 16px; }
  .stat-num { font-size: 28px; }
  .stat-label { font-size: 13px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-badges { grid-template-columns: 1fr 1fr; }
  .contact-methods { grid-template-columns: 1fr; }
  .mm-links a { font-size: 17px; padding: 15px 18px; }
}

/* ---- 430 / 414 / 412 / 393 / 390 / 375 ---- */
@media (max-width: 430px) {
  .container { padding: 0 16px; }
  .hero .container { padding: 0 20px; }
  .hero-brand { font-size: clamp(48px, 18vw, 66px); }
  .hero-content { max-width: 100%; }
  .feature-card { padding: 18px; }
  .form-card { padding: 18px; }
  .projects-grid { grid-auto-columns: 88%; margin: 0 -16px; padding: 4px 16px 16px; }
}

/* ---- 375 ---- */
@media (max-width: 375px) {
  .hero-brand { font-size: clamp(44px, 17vw, 60px); }
  .hero-title { font-size: 26px; }
  .hero-subtitle { font-size: 16px; }
  .logo-word { font-size: 22px; }
  .section-title { font-size: 23px; }
}

/* ---- 360 ---- */
@media (max-width: 360px) {
  .container { padding: 0 14px; }
  .hero-brand { font-size: 52px; }
  .feature-card { gap: 12px; }
  .footer-badges { grid-template-columns: 1fr; }
}

/* ---- 344 / 320 (smallest) ---- */
@media (max-width: 344px) {
  .hero-brand { font-size: 46px; }
  .hero-title { font-size: 23px; }
  .btn { font-size: 14.5px; }
  .logo-sub-1 { font-size: 7px; }
  .logo-sub-2 { font-size: 6px; }
}

/* ---- Landscape phones (short height) ---- */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .hero { min-height: 100vh; padding-top: calc(var(--nav-h) + 16px); padding-bottom: 24px; }
  .hero-brand { font-size: 48px; }
  .hero-cta { flex-direction: row; }
  .hero-cta .btn { width: auto; flex: 1; }
  .hero-social { bottom: 8px; }
}

/* ---- High-DPI: still mobile layout (handled by width media queries) ---- */

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
