/* ============================================
   Portfolio — Md Sajib Sheikh
   Modern · Responsive · Glassmorphism
   ============================================ */

/* ---------- Variables ---------- */
:root {
  /* --- color theme triad (light mode) --- */
  --t1: #059669;
  --t2: #10b981;
  --t3: #34d399;
  /* --- color theme triad (dark mode) --- */
  --d1: #10b981;
  --d2: #34d399;
  --d3: #6ee7b7;
  /* --- rgb triplet for shadows / focus rings --- */
  --primary-rgb: 5, 150, 105;

  --primary: var(--t1);
  --primary-2: var(--t2);
  --primary-3: var(--t3);
  --gradient: linear-gradient(135deg, var(--t1) 0%, var(--t2) 55%, var(--t3) 100%);
  --bg: #ffffff;
  --bg-alt: #ffffff;
  --bg-soft: color-mix(in srgb, var(--t1) 8%, #ffffff);
  --text: #0c1a15;
  --text-light: #55665f;
  --border: rgba(12, 26, 21, 0.08);
  --glass: rgba(255, 255, 255, 0.78);
  --shadow-sm: 0 6px 18px rgba(12, 26, 21, 0.05);
  --shadow: 0 14px 40px rgba(12, 26, 21, 0.07);
  --shadow-lg: 0 24px 60px rgba(var(--primary-rgb), 0.16);
  --radius: 16px;
  --max-width: 1160px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-h: 72px;
}

[data-theme="dark"] {
  --primary: var(--d1);
  --primary-2: var(--d2);
  --primary-3: var(--d3);
  --bg: #07120e;
  --bg-alt: #0d1a14;
  --bg-soft: color-mix(in srgb, var(--t1) 16%, #07120e);
  --text: #eaf7f1;
  --text-light: #8fb3a5;
  --border: rgba(255, 255, 255, 0.08);
  --glass: rgba(13, 26, 20, 0.72);
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.3);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 60px rgba(var(--primary-rgb), 0.28);
}

/* ============================================
   10 COLOR THEMES — admin panel থেকে বাছাই
   প্রতিটি theme: light triad + dark triad + rgb
   ============================================ */
/* ---- আপনার দেওয়া colour palettes থেকে তৈরি ১০টা theme ---- */
[data-color="emerald"]    { --t1:#059669; --t2:#10b981; --t3:#34d399; --d1:#10b981; --d2:#34d399; --d3:#6ee7b7; --primary-rgb:5,150,105; }
[data-color="autumn"]     { --t1:#8e5c63; --t2:#a8757c; --t3:#c9a0a5; --d1:#b9858d; --d2:#d2aab0; --d3:#e8cdd1; --primary-rgb:142,92,99; }
[data-color="sage"]       { --t1:#6f8a76; --t2:#8fa794; --t3:#b6c8ba; --d1:#9cb4a2; --d2:#bcd0c0; --d3:#dce7dd; --primary-rgb:111,138,118; }
[data-color="terracotta"] { --t1:#b85434; --t2:#d96846; --t3:#eda588; --d1:#e07a52; --d2:#efa07f; --d3:#f8ccba; --primary-rgb:184,84,52; }
[data-color="olive"]      { --t1:#4f5729; --t2:#6b7540; --t3:#9aa76d; --d1:#8b9557; --d2:#aab37e; --d3:#c9cfa9; --primary-rgb:79,87,41; }
[data-color="coral"]      { --t1:#dd4f2b; --t2:#ef6b3c; --t3:#f5a06a; --d1:#f2703f; --d2:#f79a63; --d3:#fbcb9f; --primary-rgb:221,79,43; }
[data-color="slateblue"]  { --t1:#34495e; --t2:#4a627a; --t3:#8fa3b3; --d1:#5b7896; --d2:#8fa8bf; --d3:#c4d4e0; --primary-rgb:52,73,94; }
[data-color="coastal"]    { --t1:#2e4052; --t2:#46627a; --t3:#a5c9ca; --d1:#4f808c; --d2:#7cabae; --d3:#bcdde0; --primary-rgb:46,64,82; }
[data-color="mustard"]    { --t1:#a8862f; --t2:#d0b264; --t3:#e6d4a0; --d1:#d0b264; --d2:#e6d4a0; --d3:#f3ead0; --primary-rgb:168,134,47; }
[data-color="clay"]       { --t1:#b8432a; --t2:#c84b31; --t3:#de8a72; --d1:#d4603f; --d2:#e58a6d; --d3:#f2bda9; --primary-rgb:184,67,42; }

/* admin থেকে দেওয়া custom theme (৩টা color) */
[data-color="custom"] { --t1:var(--c1,#059669); --t2:var(--c2,#10b981); --t3:var(--c3,#34d399); --d1:var(--c1,#059669); --d2:var(--c2,#10b981); --d3:var(--c3,#34d399); }

/* ---------- Reset & Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: "Space Grotesk", "Poppins", sans-serif; line-height: 1.2; }

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
svg { width: 20px; height: 20px; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

::selection { background: var(--primary); color: #fff; }

/* ---------- Background orbs ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.orb-1 { width: 420px; height: 420px; top: -100px; left: -120px; background: radial-gradient(circle, var(--t1), transparent 70%); animation: drift 18s ease-in-out infinite; }
.orb-2 { width: 360px; height: 360px; top: 40%; right: -140px; background: radial-gradient(circle, var(--t3), transparent 70%); animation: drift 22s ease-in-out infinite reverse; }
.orb-3 { width: 320px; height: 320px; bottom: -80px; left: 35%; background: radial-gradient(circle, var(--t2), transparent 70%); animation: drift 20s ease-in-out infinite; }
[data-theme="dark"] .orb { opacity: 0.35; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.12); }
}

/* ---------- Layout ---------- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.grid { display: grid; gap: 2.5rem; }
.section { padding: 6rem 0; position: relative; }

.section-eyebrow {
  display: block;
  text-align: center;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.section-title {
  text-align: center;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 3.5rem;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 10px 25px rgba(var(--primary-rgb), 0.35); }
.btn-primary:hover { transform: translateY(-4px); box-shadow: 0 18px 38px rgba(var(--primary-rgb), 0.5); }

.btn-outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--gradient); color: #fff; border-color: transparent; transform: translateY(-4px); box-shadow: 0 14px 32px rgba(var(--primary-rgb), 0.35); }

.btn-small { padding: 0.5rem 1.2rem; font-size: 0.85rem; background: var(--gradient); color: #fff; }
.btn-small:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.4); }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loader.hidden { opacity: 0; visibility: hidden; }
.loader-box { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.loader-text {
  font-family: "Space Grotesk", sans-serif;
  font-size: 3.2rem; font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: pulse 1.4s ease-in-out infinite;
}
.loader-bar { width: 140px; height: 4px; border-radius: 4px; background: var(--bg-soft); overflow: hidden; position: relative; }
.loader-bar::after { content: ""; position: absolute; inset: 0; width: 40%; border-radius: 4px; background: var(--gradient); animation: load 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes load { 0% { left: -40%; } 100% { left: 100%; } }

/* ---------- Cursor ---------- */
.cursor {
  width: 26px; height: 26px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s, background 0.25s;
}
@media (hover: none) { .cursor { display: none; } }

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; width: 100%;
  z-index: 1000;
  transition: all var(--transition);
  padding: 1.1rem 0;
}
.header.scrolled {
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sm);
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.nav { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 2; }

.nav-logo { font-family: "Space Grotesk", sans-serif; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.logo-bracket, .logo-slash { background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.nav-menu { display: flex; align-items: center; gap: 1.6rem; }

.nav-list { display: flex; gap: 2.2rem; }

.nav-link { font-weight: 500; position: relative; padding: 0.3rem 0; color: var(--text-light); transition: color var(--transition); }
.nav-link::after { content: ""; position: absolute; bottom: -2px; left: 0; width: 0; height: 3px; border-radius: 3px; background: var(--gradient); transition: width var(--transition); }
.nav-link:hover, .active-link { color: var(--text); }
.nav-link:hover::after, .active-link::after { width: 100%; }

.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-soft); border: 1px solid var(--border);
  color: var(--primary); /* icon সবসময় স্পষ্ট দেখা যায় (light + dark দুটোতেই) */
  transition: all var(--transition);
}
.theme-toggle:hover {
  transform: rotate(20deg) scale(1.1);
  box-shadow: var(--shadow-sm);
  background: rgba(var(--primary-rgb), 0.14);
  border-color: rgba(var(--primary-rgb), 0.45);
}
/* [data-ico] { display:inline-flex } পরে আসায় .theme-icon-* কে override করত —
   তাই .theme-toggle scope দিয়ে specificity বাড়ানো হয়েছে */
[data-theme="dark"] .theme-toggle .theme-icon-sun { display: inline-flex; }
[data-theme="dark"] .theme-toggle .theme-icon-moon { display: none; }
.theme-toggle .theme-icon-sun { display: none; }
.theme-toggle .theme-icon-moon { display: inline-flex; }

.nav-cv { padding: 0.55rem 1.4rem; font-size: 0.9rem; box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.28); }
.nav-cv:hover { box-shadow: 0 12px 26px rgba(var(--primary-rgb), 0.4); }

.nav-toggle, .nav-close {
  display: none;
  flex-direction: column; gap: 5px;
  cursor: pointer;
}
.nav-toggle span { width: 26px; height: 2.5px; border-radius: 3px; background: var(--text); transition: var(--transition); }
.nav-close {
  font-size: 1.5rem; position: fixed; top: 1.3rem; right: 1.6rem;
  z-index: 1001; color: var(--text);
  width: 42px; height: 42px; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--bg-soft);
}
.nav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); opacity: 0; visibility: hidden; transition: var(--transition); z-index: 999; }
.nav-overlay.show { opacity: 1; visibility: visible; }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: var(--nav-h); position: relative; overflow: hidden; }
.hero-watermark {
  position: absolute; top: 6%; left: 50%; transform: translateX(-50%);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(4rem, 18vw, 15rem); font-weight: 700;
  color: var(--text); opacity: 0.04; white-space: nowrap;
  pointer-events: none; z-index: 0; letter-spacing: -0.03em;
}
.hero-container { align-items: center; position: relative; z-index: 1; }

.hero-hello { display: inline-block; color: var(--primary); font-weight: 600; font-size: 1.05rem; margin-bottom: 0.5rem; animation: fadeUp 0.6s ease both; }
.hero-title { font-size: clamp(2.4rem, 6vw, 3.8rem); font-weight: 400; letter-spacing: -0.02em; margin-bottom: 0.2rem; animation: fadeUp 0.6s ease 0.1s both; }
.hero-name { font-weight: 800; color: var(--text); }
.hero-profession { font-size: clamp(1.7rem, 4.5vw, 2.8rem); font-weight: 700; color: var(--text); margin: 0 0 1.2rem; letter-spacing: -0.02em; animation: fadeUp 0.6s ease 0.2s both; }
.text-primary { color: var(--primary); }
.hero-description { max-width: 460px; color: var(--text-light); margin-bottom: 2rem; line-height: 1.8; animation: fadeUp 0.6s ease 0.3s both; }

.hero-actions { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; animation: fadeUp 0.6s ease 0.4s both; }
.hero-social { display: flex; gap: 0.2rem; }
.social-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); transition: all var(--transition);
}
.social-icon svg { width: 18px; height: 18px; }
.social-icon:hover { background: var(--gradient); color: #fff; transform: translateY(-4px); box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.35); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }

/* Hero image / avatar */
.hero-image { position: relative; display: flex; justify-content: center; align-items: center; min-height: 460px; }
.hero-avatar-wrap { position: relative; width: 340px; height: 340px; display: flex; align-items: center; justify-content: center; }
.hero-circle-guide {
  position: absolute; width: 300px; height: 300px; border-radius: 50%;
  border: 1.5px solid var(--border); animation: spin 40s linear infinite;
}
.hero-circle-guide::before {
  content: ""; position: absolute; top: -5px; left: 50%; transform: translateX(-50%);
  width: 10px; height: 10px; border-radius: 50%; background: var(--primary);
}
.hero-avatar {
  width: 250px; height: 250px; border-radius: 50%;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: "Space Grotesk", sans-serif; font-size: 5rem; font-weight: 700;
  box-shadow: var(--shadow-lg); position: relative; z-index: 2;
}
@keyframes spin { to { transform: rotate(360deg); } }

.tool-icon {
  position: absolute; z-index: 3;
  width: 60px; height: 60px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.5rem;
  box-shadow: 0 12px 30px rgba(14, 23, 48, 0.18);
}
.tool-icon svg { width: 26px; height: 26px; }

/* ---- ৩টা hero tool badge — admin থেকে content ও রং পরিবর্তনযোগ্য ----
   background/color inline হিসেবে বসানো হয় (js/content.js applyHeroTools) */
/* ---- hero tool badge — অবস্থান (১-৬, এরপর ঘুরে ঘুরে বসে) ----
   background/color inline হিসেবে বসানো হয় (js/content.js applyHeroTools) */
.tool-badge { position: absolute; z-index: 3; }
.tool-badge.p1 { top: 4%; left: 30%; animation: float 5s ease-in-out infinite; }
.tool-badge.p2 { top: 32%; right: 0%; animation: float 5s ease-in-out 0.8s infinite; }
.tool-badge.p3 { bottom: 18%; left: -2%; animation: float 5s ease-in-out 1.6s infinite; }
.tool-badge.p4 { bottom: 4%; right: 6%; animation: float 5s ease-in-out 2.4s infinite; }
.tool-badge.p5 { top: -2%; right: 14%; animation: float 5s ease-in-out 3.2s infinite; }
.tool-badge.p6 { top: 48%; left: -6%; animation: float 5s ease-in-out 4s infinite; }
.tool-badge.tool-text { font-family: "Space Grotesk", sans-serif; font-weight: 700; }
/* transparent badge — শুধু icon/লেখাটা ভেসে থাকবে, box নয় */
.tool-badge.tool-transparent { box-shadow: none !important; }
/* নিজের upload করা icon — ছবি পুরো badge-এ বসবে */
.tool-badge.tool-img { overflow: hidden; }
.tool-badge.tool-img img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; display: block; }
.tool-ai { top: 4%; left: 30%; background: #332211; color: #ff9a00; animation: float 5s ease-in-out infinite; }
.tool-ps { top: 32%; right: 0%; background: #001e36; color: #31a8ff; animation: float 5s ease-in-out 0.8s infinite; }
.tool-fig { bottom: 18%; left: -2%; background: #1e1e1e; color: #fff; animation: float 5s ease-in-out 1.6s infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.scroll-down { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); }
.mouse { display: block; width: 26px; height: 42px; border: 2px solid var(--primary); border-radius: 15px; position: relative; }
.wheel { position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 4px; height: 8px; border-radius: 3px; background: var(--primary); animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 14px); } }

/* ---------- About ---------- */
.about-container { align-items: center; }
.about-image { position: relative; display: flex; justify-content: center; }
.about-frame {
  width: 280px; height: 280px; border-radius: 30px;
  background: var(--gradient);
  padding: 8px; box-shadow: var(--shadow-lg);
  transform: rotate(-3deg); transition: var(--transition);
}
.about-frame:hover { transform: rotate(0deg) scale(1.02); }
.about-avatar {
  width: 100%; height: 100%; border-radius: 24px;
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-family: "Space Grotesk", sans-serif; font-size: 5rem; font-weight: 700;
}
.about-experience-badge {
  position: absolute; bottom: 10px; right: 12%;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 16px;
  padding: 0.9rem 1.1rem; display: flex; align-items: center; gap: 0.6rem;
  box-shadow: var(--shadow);
}
.about-experience-badge strong { font-family: "Space Grotesk", sans-serif; font-size: 2rem; background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.about-experience-badge span { font-size: 0.78rem; line-height: 1.3; color: var(--text-light); font-weight: 500; }

.about-content h3 { font-size: 1.6rem; margin-bottom: 1rem; }
.about-content > p { color: var(--text-light); margin-bottom: 1rem; }

.about-info { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.6rem 0; }
.about-box { background: var(--bg-alt); padding: 0.9rem 1.1rem; border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: var(--transition); }
.about-box:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.about-label { font-size: 0.78rem; color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.about-box p { margin: 0.25rem 0 0; font-weight: 500; }

.about-stats { display: flex; gap: 2rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: "Space Grotesk", sans-serif; font-size: 2rem; background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat span { font-size: 0.85rem; color: var(--text-light); font-weight: 500; }

/* ---------- Skills ---------- */
/* min(100%, 300px) keeps the track from demanding more width than the
   container has, so a 320px phone never scrolls sideways. */
.skills-container { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.skills-group {
  --card-pad: 2rem;
  background: var(--bg-alt); padding: var(--card-pad); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.skills-group:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); }
.skills-group-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.4rem; }
.skills-group-icon { font-size: 1.6rem; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: var(--bg-soft); }
.skills-group h3 { font-size: 1.25rem; }
.skills-list { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.skill-tag {
  background: var(--bg-soft); border: 1px solid var(--border);
  padding: 0.45rem 1rem; border-radius: 50px; font-size: 0.88rem; font-weight: 500;
  color: var(--text-light); transition: all var(--transition);
}
.skill-tag:hover { background: var(--gradient); color: #fff; border-color: transparent; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.35); }

/* ---------- Tools row ---------- */
.tools-row { margin-top: 3rem; text-align: center; }
.tools-label { display: block; font-weight: 600; color: var(--text-light); margin-bottom: 1.1rem; font-size: 0.95rem; }
.tools-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; }
.tool-chip {
  background: var(--bg-alt); border: 1px solid var(--border);
  padding: 0.55rem 1.2rem; border-radius: 50px; font-size: 0.88rem; font-weight: 500;
  color: var(--text-light); box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.tool-chip:hover { background: var(--gradient); color: #fff; border-color: transparent; transform: translateY(-3px) scale(1.05); box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.35); }

/* ---------- Projects ---------- */
.projects-container { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.project-card {
  background: var(--bg-alt); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column;
}
.project-card:hover { transform: translateY(-12px); box-shadow: var(--shadow-lg); }
.project-image { position: relative; aspect-ratio: 4 / 3; background: var(--gradient); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.project-image::before { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,0.15); top: -60px; right: -40px; z-index: 0; }
.project-image.alt-1 { background: linear-gradient(135deg, #0d9488, #2dd4bf); }
.project-image.alt-2 { background: linear-gradient(135deg, #65a30d, #a3e635); }
.project-image.alt-3 { background: linear-gradient(135deg, #0891b2, #67e8f9); }
.project-image.has-img { background: var(--bg-soft); }
.project-image.has-img::before { display: none; }

/* SVG mark shown when no cover image is uploaded yet */
.project-ico {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center;
  width: 96px; height: 96px; border-radius: 28px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  transition: transform var(--transition), background var(--transition);
}
.project-ico svg { width: 46px; height: 46px; }
.project-card:hover .project-ico { transform: scale(1.08) rotate(-4deg); background: rgba(255, 255, 255, 0.28); }

/* Dark gradient that fades in on hover so the arrow stays readable on any photo */
.project-veil {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(to top, rgba(4, 20, 15, 0.80) 0%, rgba(4, 20, 15, 0.20) 46%, transparent 72%);
  opacity: 0; transition: opacity var(--transition);
}
.project-card:hover .project-veil { opacity: 1; }

.project-arrow {
  position: absolute; right: 16px; bottom: 16px; z-index: 3;
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--primary, #059669);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  opacity: 0; transform: translate(10px, 10px) scale(0.7);
  transition: opacity var(--transition), transform var(--transition);
}
.project-arrow svg { width: 19px; height: 19px; }
.project-card:hover .project-arrow { opacity: 1; transform: none; }

/* Category chip, top-left over the artwork */
.project-cat {
  position: absolute; left: 14px; top: 14px; z-index: 3;
  background: rgba(255, 255, 255, 0.92); color: #0f172a;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.3rem 0.75rem; border-radius: 50px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
}
.project-content { padding: 1.6rem; display: flex; flex-direction: column; flex: 1; }
.project-content h3 { margin-bottom: 0.5rem; font-size: 1.25rem; }
.project-content p { color: var(--text-light); font-size: 0.92rem; margin-bottom: 1.1rem; flex: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.3rem; }
.project-tags span { font-size: 0.75rem; font-weight: 500; background: var(--bg-soft); border: 1px solid var(--border); padding: 0.25rem 0.7rem; border-radius: 50px; color: var(--text-light); }
.project-links { display: flex; gap: 0.7rem; }

/* ---------- Experience / Timeline ---------- */
.timeline { position: relative; max-width: 720px; margin: 0 auto; padding-left: 2.2rem; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; height: 100%; width: 2px; background: linear-gradient(var(--primary), var(--primary-3)); }
.timeline-item { position: relative; padding-bottom: 2.5rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -2.2rem; top: 0.5rem; width: 14px; height: 14px; border-radius: 50%; background: var(--gradient); transform: translateX(0); box-shadow: 0 0 0 4px var(--bg); }
.timeline-content { background: var(--bg-alt); padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition); }
.timeline-content:hover { transform: translateX(8px); box-shadow: var(--shadow); }
.timeline-date { display: inline-block; color: #fff; background: var(--gradient); font-weight: 500; font-size: 0.8rem; padding: 0.2rem 0.8rem; border-radius: 50px; margin-bottom: 0.5rem; }
.timeline-content h3 { margin: 0.3rem 0 0.4rem; font-size: 1.15rem; }
.timeline-content p { color: var(--text-light); font-size: 0.92rem; }

/* ---------- Contact ---------- */
.contact-container { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }
.contact-info { background: var(--gradient); color: #fff; padding: 2.4rem; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.contact-info h3 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.contact-info > p { opacity: 0.9; margin-bottom: 2rem; }
.contact-details { display: flex; flex-direction: column; gap: 1.4rem; }
.contact-item { display: flex; align-items: center; gap: 1rem; }
.contact-icon { font-size: 1.5rem; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: rgba(255,255,255,0.18); }
.contact-item h4 { font-size: 1rem; }
.contact-item p { font-size: 0.9rem; opacity: 0.9; }

.contact-form { background: var(--bg-alt); padding: 2.4rem; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 1.2rem; }
.form-group { display: flex; flex-direction: column; gap: 0.45rem; }
.form-group label { font-size: 0.9rem; font-weight: 600; }
.form-group input, .form-group textarea {
  padding: 0.85rem 1.1rem; border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 0.95rem;
  transition: border var(--transition), box-shadow var(--transition); resize: vertical;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.15); background: var(--bg-alt); }
.form-status { font-size: 0.9rem; color: var(--primary); text-align: center; font-weight: 500; min-height: 1.2rem; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 2rem 0; }
.footer-container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; color: var(--text-light); font-size: 0.9rem; }

/* ---------- Scroll to top ---------- */
.scroll-top {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--gradient); color: #fff; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(var(--primary-rgb), 0.4);
  opacity: 0; visibility: hidden; transition: all var(--transition); z-index: 900;
}
.scroll-top.show { opacity: 1; visibility: visible; }
.scroll-top:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(var(--primary-rgb), 0.55); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ============ RESPONSIVE ============ */
@media (min-width: 969px) {
  .hero-container { grid-template-columns: 1.05fr 0.95fr; }
  .about-container { grid-template-columns: 0.85fr 1.15fr; }
}

@media (max-width: 968px) {
  .hero-image { display: none; }
  .hero { min-height: auto; padding-top: calc(var(--nav-h) + 2rem); padding-bottom: 3rem; }
  .scroll-down { display: none; }
  .about-info { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .nav-menu {
    position: fixed; top: 0; right: -100%;
    /* 100dvh tracks the visible viewport as mobile browser bars hide/show;
       100vh is the fallback for browsers without dvh. */
    width: 78%; max-width: 340px; height: 100vh; height: 100dvh;
    background: var(--bg-alt); box-shadow: var(--shadow-lg);
    padding: 5rem 2rem 2rem; display: flex; flex-direction: column; gap: 2rem;
    transition: right var(--transition); z-index: 1000;
  }
  .nav-menu.show { right: 0; }
  .nav-list { flex-direction: column; gap: 1.4rem; }
  .nav-link { font-size: 1.15rem; }
  .theme-toggle { align-self: flex-start; }
  .nav-cv { display: none; }
  .nav-close { display: none; }
  .nav-toggle { display: flex; }
  .header:has(.nav-overlay.show) ~ .nav-close { display: flex; }
  .header:has(.nav-overlay.show) .nav-toggle { display: none; }
}

@media (max-width: 560px) {
  .section { padding: 4rem 0; }
  .container { padding: 0 1.2rem; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; text-align: center; }
  .about-stats { gap: 1.4rem; }
  .about-experience-badge { right: 6%; }
  .contact-info, .contact-form { padding: 1.8rem; }
  .footer-container { justify-content: center; text-align: center; }
  /* Cards keep their breathing room without eating the whole screen */
  .skills-group { --card-pad: 1.5rem; }
  .project-content { padding: 1.3rem; }
  .section-title { margin-bottom: 2.5rem; }
}

@media (max-width: 400px) {
  .nav-logo { font-size: 1.3rem; }
  .about-frame { width: 240px; height: 240px; }
  .about-avatar { font-size: 4rem; }
  .skills-group { --card-pad: 1.25rem; }
  .project-content { padding: 1.15rem; }
  .contact-info, .contact-form { padding: 1.4rem; }
  .about-experience-badge { right: 2%; padding: 0.7rem 0.9rem; }
}


/* ============================================
   IMAGES — admin panel থেকে আপলোড করা
   ============================================ */

/* --- site logo (image থাকলে text লুকানো) --- */
.nav-logo { display: flex; align-items: center; }
.nav-logo-img { height: 34px; width: auto; max-width: 150px; object-fit: contain; display: block; }
.nav-logo-img[hidden] { display: none; }

/* ---- Brand logo strip (admin থেকে upload করা ২/৩টা logo) ---- */
.logo-strip {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 24px 42px;
  padding: 26px 20px;
  background: var(--bg-soft, #f6faf8);
  border-top: 1px solid var(--border, #e7ece9);
  border-bottom: 1px solid var(--border, #e7ece9);
}
.logo-strip[hidden] { display: none; }
.logo-strip img {
  height: 44px; width: auto; max-width: 180px; object-fit: contain;
  filter: grayscale(1); opacity: 0.7;
  transition: var(--transition, 0.3s ease);
}
.logo-strip img:hover { filter: grayscale(0); opacity: 1; transform: translateY(-2px); }
@media (max-width: 640px) {
  .logo-strip { gap: 16px 26px; padding: 20px 16px; }
  .logo-strip img { height: 34px; max-width: 125px; }
}

/* --- hero / about avatar --- */
.hero-avatar.has-img,
.about-avatar.has-img {
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-color: var(--bg-soft);
  color: transparent;
  font-size: 0;
  letter-spacing: 0;
}

/* --- project card image --- */
.project-image { position: relative; }
.project-image.has-img { padding: 0; overflow: hidden; }
.project-image.has-img .project-ico { display: none; }
.project-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.project-card:hover .project-img { transform: scale(1.08); }

/* --- service card: banner image + icon tile --- */
.skills-group { overflow: hidden; }
.skills-group-icon { display: flex; align-items: center; justify-content: center; }

/* Photo banner across the top of a service card. Negative margins bleed it to
   the card edges, so the static HTML fallback needs no extra wrapper.
   The offset tracks --card-pad, so shrinking the card padding on small
   screens can never leave the banner misaligned. */
.skills-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-soft);
  margin: calc(var(--card-pad, 2rem) * -1) calc(var(--card-pad, 2rem) * -1) 1.5rem;
}
.skills-media-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.skills-media-veil {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(4, 20, 15, 0) 55%, rgba(4, 20, 15, 0.28) 100%);
  transition: opacity var(--transition);
}
.skills-group:hover .skills-media-img { transform: scale(1.07); }
.skills-group:hover .skills-media-veil { opacity: 0.55; }

/* Icon tile: premium gradient, lifts on hover */
.skills-group-icon {
  width: 54px; height: 54px; flex: none;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.14), rgba(var(--primary-rgb), 0.05));
  color: var(--primary);
  transition: transform var(--transition), box-shadow var(--transition);
}
.skills-group-icon svg { width: 26px; height: 26px; }
.skills-group:hover .skills-group-icon {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 24px rgba(var(--primary-rgb), 0.28);
}

/* ============================================================
   Premium inline icons
   ============================================================ */
.ico { display: inline-block; vertical-align: middle; flex: none; }
[data-ico] { display: inline-flex; align-items: center; justify-content: center; }

.theme-icon-sun, .theme-icon-moon { align-items: center; justify-content: center; }
.theme-icon-sun svg, .theme-icon-moon svg { width: 21px; height: 21px; stroke-width: 2.2; }

.scroll-top[data-ico] svg { width: 20px; height: 20px; }
.btn [data-ico] svg { width: 18px; height: 18px; }
.form-submit-ico svg { width: 18px; height: 18px; margin-right: 8px; }

/* ============================================================
   Client reviews
   ============================================================ */
.reviews { position: relative; }

/* ---- Reviews slider ---- */
.reviews-slider { margin-top: 48px; }
.reviews-viewport {
  overflow: hidden;
  margin: 0 -8px;
  padding: 8px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.reviews-viewport:active { cursor: grabbing; }
.reviews-track {
  display: flex;
  gap: 24px;
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.reviews-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 32px;
}
.review-arrow {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line, #e7ece9);
  background: var(--bg-soft, #fff);
  color: var(--text, #0f172a);
  font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: 0.2s ease;
}
.review-arrow:hover {
  background: var(--primary, #059669);
  border-color: var(--primary, #059669);
  color: #fff;
  transform: scale(1.06);
}
.review-dots { display: flex; align-items: center; gap: 9px; }
.review-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: none;
  background: var(--line, #d5ddd8);
  cursor: pointer;
  padding: 0;
  transition: 0.25s ease;
}
.review-dot:hover { background: var(--t2, #10b981); }
.review-dot.active {
  width: 28px;
  border-radius: 6px;
  background: var(--primary, #059669);
}

.review-card {
  position: relative;
  padding: 32px 28px 28px;
  border-radius: 20px;
  background: var(--bg-soft, #f8faf9);
  border: 1px solid var(--line, #e7ece9);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
}
.review-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--t1, #059669), var(--t2, #10b981), var(--t3, #34d399));
  opacity: 0.9;
}
.review-card:hover {
  transform: translateY(-6px);
  border-color: rgba(var(--primary-rgb, 5, 150, 105), 0.35);
  box-shadow: 0 18px 40px rgba(var(--primary-rgb, 5, 150, 105), 0.14);
}

.review-quote {
  position: absolute;
  top: 18px;
  right: 20px;
  color: rgba(var(--primary-rgb, 5, 150, 105), 0.16);
  line-height: 0;
}
.review-quote svg { width: 34px; height: 34px; fill: currentColor; stroke: none; }

.review-stars { display: flex; gap: 4px; margin-bottom: 16px; }
.review-stars .star { display: inline-flex; color: #f59e0b; }
.review-stars .star svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.review-stars .star.off { color: var(--line, #e2e8f0); }

.review-text {
  font-size: 15.5px;
  line-height: 1.7;
  /* --text-soft কোথাও define করা ছিল না → কালো fallback বসত (dark-এ অদৃশ্য) */
  color: var(--text-light, #5b6b62);
  margin-bottom: 22px;
}

.review-person { display: flex; align-items: center; gap: 12px; }
.review-ava {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px; color: #fff;
  background: linear-gradient(135deg, var(--t1, #059669), var(--t3, #34d399));
  flex: none; overflow: hidden; object-fit: cover;
}
.review-ava.has-img { width: 46px; height: 46px; }
.review-person strong { display: block; font-size: 15px; color: var(--text, #0f172a); }
.review-person small { display: block; font-size: 12.5px; color: var(--muted, #8a978f); margin-top: 2px; }

/* ---- Service tools list ---- */
.service-tools {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  margin-top: 16px; padding-top: 15px;
  border-top: 1px dashed var(--line, #e7ece9);
}
.service-tools-label {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted, #8a978f);
  margin-right: 3px;
}
.service-tools-label svg { width: 13px; height: 13px; color: var(--primary, #059669); }
.tool-mini {
  font-size: 12px; font-weight: 600;
  padding: 4px 11px; border-radius: 20px;
  background: rgba(var(--primary-rgb, 5, 150, 105), 0.09);
  color: var(--primary, #059669);
  border: 1px solid rgba(var(--primary-rgb, 5, 150, 105), 0.16);
  transition: 0.2s ease;
}
.tool-mini:hover {
  background: var(--primary, #059669);
  color: #fff;
  border-color: var(--primary, #059669);
}

/* ============================================================
   Contact form status
   ============================================================ */
.form-status.ok { color: var(--primary, #059669); font-weight: 600; }
.form-status.err { color: #dc2626; font-weight: 600; }

/* ============================================================
   Small-screen polish
   ============================================================ */

/* A long email or URL (e.g. an Address/Email box) must wrap inside its
   card instead of widening the whole page on a narrow phone. */
.about-box p,
.contact-item p,
.contact-item h4,
.project-content p,
.timeline-content p,
.about-content > p,
.about-content > p a {
  overflow-wrap: break-word;
}

@media (max-width: 480px) {
  .review-card { padding: 26px 20px 22px; }
  .review-quote svg { width: 26px; height: 26px; }
}

/* ============================================================
   Thank-you popup
   ============================================================ */
.popup-overlay {
  position: fixed; inset: 0; z-index: 9999;
  /* [hidden] কে override না করার জন্য default none + :not([hidden]) দিয়ে flex */
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(6, 20, 15, 0.55);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: popFade 0.28s ease;
}
.popup-overlay:not([hidden]) { display: flex; }
@keyframes popFade { from { opacity: 0; } to { opacity: 1; } }

.popup-card {
  width: 100%; max-width: 430px;
  padding: 40px 34px 34px;
  text-align: center;
  border-radius: 24px;
  background: var(--bg, #fff);
  border: 1px solid var(--border, #e7ece9);
  box-shadow: 0 30px 80px rgba(6, 20, 15, 0.32);
  /* animation না চললেও card দেখা যাবে */
  transform: none;
  opacity: 1;
}
.popup-card.in { animation: popIn 0.36s cubic-bezier(0.34, 1.4, 0.64, 1); }
@keyframes popIn {
  from { transform: scale(0.86) translateY(14px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.popup-ico {
  width: 84px; height: 84px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(var(--primary-rgb, 5, 150, 105), 0.12);
  color: var(--primary, #059669);
  animation: popRing 0.6s ease 0.15s;
}
.popup-ico svg { width: 52px; height: 52px; }
@keyframes popRing {
  0% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb, 5, 150, 105), 0.4); }
  100% { box-shadow: 0 0 0 26px rgba(var(--primary-rgb, 5, 150, 105), 0); }
}

.popup-title {
  font-size: 1.45rem; font-weight: 700;
  margin: 0 0 10px; color: var(--text, #0f172a);
  line-height: 1.3;
}
.popup-text {
  font-size: 0.95rem; line-height: 1.65;
  color: var(--text-light, #5b6b62);
  margin: 0 0 26px;
}
.popup-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.popup-actions .btn { padding: 0.7rem 1.5rem; font-size: 0.9rem; }
.popup-wa-ico { display: inline-flex; margin-right: 7px; }
.popup-wa-ico svg { width: 18px; height: 18px; }
#popup-wa { background: #25d366; border-color: #25d366; box-shadow: 0 8px 22px rgba(37, 211, 102, 0.35); }
#popup-wa:hover { background: #1eb857; border-color: #1eb857; transform: translateY(-2px); }

@media (max-width: 420px) {
  .popup-card { padding: 32px 22px 26px; }
  .popup-actions { flex-direction: column; }
  .popup-actions .btn { width: 100%; justify-content: center; display: flex; align-items: center; }
}

/* ============================================================
   Project icon (premium SVG instead of emoji)
   ============================================================ */
.project-image { display: flex; align-items: center; justify-content: center; }

/* ============================================================
   CV button hidden when no CV url
   ============================================================ */
.nav-cv[hidden], .about-btn[hidden] { display: none !important; }
