/* =========================================================
   Mehedi Hasan — Professional Portfolio
   Responsive dark interface | Cyan + violet accent system
   ========================================================= */

:root {
  color-scheme: dark;
  --bg: #070914;
  --bg-soft: #0c1020;
  --surface: rgba(17, 22, 40, 0.76);
  --surface-strong: #11182b;
  --text: #f4f7ff;
  --muted: #aab3c7;
  --dim: #778198;
  --cyan: #43e8f5;
  --purple: #8a78ff;
  --pink: #e879f9;
  --line: rgba(177, 196, 230, 0.13);
  --glow: 0 18px 55px rgba(0, 0, 0, 0.32);
  --radius: 22px;
  --container: 1160px;
  --header-height: 76px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 18px);
  overflow-x: clip;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: clip;
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 82% 8%, rgba(67, 232, 245, 0.075), transparent 34rem),
    radial-gradient(ellipse at 8% 44%, rgba(138, 120, 255, 0.075), transparent 38rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { color: #041116; background: var(--cyan); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

/* Keyboard accessibility */
.skip-link {
  position: fixed;
  z-index: 10001;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 9px;
  color: #041116;
  background: var(--cyan);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}
.skip-link:focus { transform: translateY(0); }
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

/* Ambient canvas and pointer effects */
#neuralCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.82;
}
.mouse-spotlight,
.custom-cursor,
.custom-cursor-dot { display: none; }

/* Loading screen */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 350ms ease, visibility 350ms ease;
}
.loading-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-content { width: 150px; height: 150px; position: relative; display: grid; place-items: center; }
.loading-pulse-ring {
  position: absolute;
  inset: 8px;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  animation: ring-pulse 2.4s ease-out infinite;
}
.loading-pulse-ring--delay { animation-delay: 800ms; border-color: var(--purple); }
.loading-pulse-ring--delay2 { animation-delay: 1600ms; border-color: var(--pink); }
.loading-core {
  width: 22px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  box-shadow: 0 0 28px rgba(67, 232, 245, 0.65);
}
.loading-text {
  position: absolute;
  top: calc(100% + 18px);
  width: max-content;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.loading-dots::after { content: "..."; animation: dot-fade 1.2s steps(4, end) infinite; }
@keyframes ring-pulse { from { transform: scale(.45); opacity: .85; } to { transform: scale(1.25); opacity: 0; } }
@keyframes dot-fade { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

/* Header and navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: var(--header-height);
  padding: 12px 0;
  background: rgba(7, 9, 20, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.navbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 50px; }
.logo { display: inline-flex; align-items: center; flex: 0 0 auto; line-height: 1; }
.logo img { display: block; width: 130px; height: auto; max-height: 34px; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 30px); }
.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: color 180ms ease;
}
.nav-links a:not(.contact-btn)::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links .contact-btn {
  min-height: 42px;
  padding: 0 19px;
  gap: 9px;
  border: 1px solid rgba(67, 232, 245, .28);
  border-radius: 999px;
  color: #041116;
  background: linear-gradient(115deg, var(--cyan), #a4a0ff);
  box-shadow: 0 7px 24px rgba(67, 232, 245, .12);
}
.nav-links .contact-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(67, 232, 245, .22); }
.nav-links .contact-btn::after { display: none; }
.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}
.hamburger span { display: block; width: 21px; height: 2px; margin: 4px auto; border-radius: 4px; background: var(--text); transition: transform 180ms ease, opacity 180ms ease; }

/* Shared section styles */
section { position: relative; z-index: 1; }
.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .19em;
  line-height: 1.5;
  text-transform: uppercase;
}
.section-title { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.section-title h2,
.tools h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 750;
  letter-spacing: -.045em;
  line-height: 1.16;
}
.section-title p,
.tools > .container > p { margin: 0; color: var(--muted); font-size: 15px; }

/* Hero */
.hero { min-height: calc(100vh - var(--header-height)); min-height: calc(100svh - var(--header-height)); box-sizing: border-box; display: flex; align-items: center; padding: clamp(28px, 4.5vh, 58px) 0 82px; overflow: hidden; }
.hero::before,
.hero::after { position: absolute; z-index: 0; width: 520px; aspect-ratio: 1; border-radius: 50%; content: ""; pointer-events: none; filter: blur(5px); }
.hero::before { top: -240px; right: -180px; background: radial-gradient(circle, rgba(67,232,245,.12), transparent 68%); }
.hero::after { bottom: -300px; left: -230px; background: radial-gradient(circle, rgba(138,120,255,.12), transparent 68%); }
.hero .container { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); align-items: center; gap: clamp(36px, 7vw, 90px); }
.hero-content { position: relative; z-index: 2; }
.hero-content h1 { margin: 0 0 18px; color: var(--text); font-size: clamp(42px, 5.3vw, 66px); font-weight: 800; letter-spacing: -.065em; line-height: 1.04; }
.hero-content h1 span { display: block; max-width: 650px; margin-top: 14px; color: var(--cyan); font-size: clamp(22px, 2.8vw, 31px); font-weight: 650; letter-spacing: -.035em; line-height: 1.25; }
.hero-content .subtitle { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; color: #d9e1f2; font-size: 14px; font-weight: 600; }
.hero-content .subtitle i { color: var(--cyan); }
.hero-content > p:not(.eyebrow):not(.subtitle) { max-width: 610px; margin: 0 0 30px; color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.btn-primary-custom,
.btn-outline-custom {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 750;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}
.btn-primary-custom { color: #041116; background: linear-gradient(110deg, var(--cyan), #a59aff); box-shadow: 0 10px 28px rgba(67, 232, 245, .15); }
.btn-primary-custom:hover { color: #041116; transform: translateY(-3px); box-shadow: 0 14px 34px rgba(67, 232, 245, .25); }
.watch-link { display: inline-flex; align-items: center; gap: 11px; color: var(--text); font-size: 14px; font-weight: 650; }
.play-icon { display: grid; width: 44px; aspect-ratio: 1; place-items: center; border: 1px solid rgba(67,232,245,.3); border-radius: 50%; color: var(--cyan); background: rgba(67,232,245,.07); transition: transform 180ms ease, background 180ms ease; }
.watch-link:hover .play-icon { transform: scale(1.07); color: #061018; background: var(--cyan); }
.btn-upwork {
  position: relative; display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 10px;
  padding: 0 22px; border: 1px solid rgba(20, 190, 115, .72); border-radius: 999px;
  color: #eafff4; background: linear-gradient(115deg, #087f4b, #12a86a);
  box-shadow: 0 8px 26px rgba(18, 168, 106, .24), inset 0 1px 0 rgba(255,255,255,.12);
  font-size: 14px; font-weight: 800; letter-spacing: .01em;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}
.btn-upwork > .fa-upwork { font-size: 17px; }
.btn-upwork .upwork-external { font-size: 11px; opacity: .8; }
.btn-upwork:hover { color: #fff; transform: translateY(-3px); filter: brightness(1.1); box-shadow: 0 13px 34px rgba(18, 168, 106, .38), 0 0 0 3px rgba(18,168,106,.12); }
.btn-upwork:focus-visible { outline: 3px solid rgba(67,232,245,.85); outline-offset: 4px; }
.hero-upwork-link {
  display: inline-flex; width: fit-content; max-width: 100%; align-items: center; gap: 11px;
  margin-top: 23px; padding: 9px 14px 9px 10px; border: 1px solid rgba(20,190,115,.22);
  border-radius: 12px; color: #aebfba; background: rgba(12,35,29,.42);
  font-size: 12px; font-weight: 550; transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.hero-upwork-link strong { color: #43d99a; font-weight: 800; }
.upwork-link-icon { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 9px; color: #071b12; background: #43d99a; font-size: 16px; }
.hero-upwork-link .upwork-external { color: #43d99a; font-size: 10px; opacity: .8; }
.hero-upwork-link:hover { transform: translateY(-2px); border-color: rgba(67,217,154,.58); color: #eafff4; background: rgba(12,55,39,.62); box-shadow: 0 9px 25px rgba(18,168,106,.12); }
.hero-upwork-link:focus-visible { outline: 3px solid rgba(67,232,245,.85); outline-offset: 4px; }
.hero-image { display: flex; align-items: center; justify-content: center; position: relative; z-index: 2; min-width: 0; }
.hero-vision-portrait { min-height: clamp(390px, 57vh, 650px); }
.hero-portrait-frame { position: relative; width: min(100%, 440px); height: clamp(390px, 58vh, 650px); overflow: hidden; border: 1px solid rgba(67,232,245,.38); border-radius: 46% 46% 24% 24% / 30% 30% 16% 16%; background: linear-gradient(145deg, rgba(67,232,245,.1), rgba(138,120,255,.04)); box-shadow: 0 0 0 12px rgba(67,232,245,.035), 0 0 0 26px rgba(138,120,255,.025), 0 28px 90px rgba(0,0,0,.48), 0 0 65px rgba(67,232,245,.16); animation: portrait-float 7s ease-in-out infinite; }
.hero-avatar { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }

/* Hero scroll cue */
.hero { position: relative; }
.hero-scroll-hint {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 22px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  color: rgba(220, 230, 248, .78);
  transform: translateX(-50%);
  transition: color 180ms ease, opacity 180ms ease;
}
.hero-scroll-hint:hover { color: var(--cyan); }
.hero-scroll-text { font-size: 9px; font-weight: 750; letter-spacing: .2em; }
.hero-scroll-mouse {
  position: relative;
  display: block;
  width: 22px;
  height: 34px;
  border: 1.5px solid rgba(67, 232, 245, .78);
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(67,232,245,.12);
}
.hero-scroll-wheel {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 3px;
  height: 6px;
  border-radius: 3px;
  background: var(--cyan);
  transform: translateX(-50%);
  animation: scroll-wheel-move 1.35s ease-in-out infinite;
}
@keyframes scroll-wheel-move {
  0% { opacity: 0; transform: translate(-50%, 0); }
  25% { opacity: 1; }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 10px); }
}
@keyframes portrait-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* About */
.about { padding: clamp(76px, 9vw, 112px) 0; background: linear-gradient(180deg, transparent, rgba(12,16,32,.58), transparent); }
.about-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(42px, 7vw, 88px); }
.about-image-wrap { position: relative; width: min(100%, 470px); margin-inline: auto; }
.about-avatar { width: 100%; aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: 28px; object-fit: cover; box-shadow: var(--glow); }
.about-badge { position: absolute; right: -18px; bottom: 22px; min-width: 148px; padding: 17px 20px; border: 1px solid rgba(67,232,245,.25); border-radius: 16px; background: rgba(9,13,27,.92); box-shadow: var(--glow); text-align: center; backdrop-filter: blur(12px); }
.about-badge .number { color: var(--text); font-size: 36px; font-weight: 800; line-height: 1.1; }
.about-badge .number sup { color: var(--cyan); font-size: .55em; }
.about-badge .label { margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 650; }
.about-content h2 { margin: 0 0 17px; color: var(--text); font-size: clamp(30px, 3.7vw, 43px); letter-spacing: -.05em; line-height: 1.15; }
.about-content h3 { margin: 22px 0 5px; color: var(--cyan); font-size: 17px; font-weight: 700; }
.about-content p { margin: 0 0 13px; color: var(--muted); font-size: 15px; line-height: 1.85; }
.read-more-link { display: inline-flex; align-items: center; gap: 9px; margin-top: 10px; color: var(--cyan); font-size: 14px; font-weight: 750; }
.read-more-link i { transition: transform 180ms ease; }
.read-more-link:hover { color: var(--text); }
.read-more-link:hover i { transform: translateX(4px); }

/* Stats */
.stats { margin-top: 76px; padding: 34px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(17,22,40,.62); box-shadow: var(--glow); backdrop-filter: blur(14px); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; text-align: center; }
.stats-item .value { color: var(--text); font-size: clamp(30px, 4vw, 43px); font-weight: 800; letter-spacing: -.05em; line-height: 1.1; }
.stats-item .value sup { color: var(--cyan); font-size: .55em; }
.stats-item .label { display: block; margin-top: 9px; color: #d8dfef; font-size: 13px; font-weight: 650; }
.stats-item .sub { display: block; margin-top: 3px; color: var(--dim); font-size: 11px; }


/* Work Experience */
.experience { padding: clamp(76px, 9vw, 112px) 0; }
.experience-timeline { position: relative; width: min(100%, 900px); margin: 0 auto; padding-left: 34px; }
.experience-timeline::before { position: absolute; top: 10px; bottom: 12px; left: 9px; width: 2px; content: ""; background: linear-gradient(180deg, var(--cyan), var(--purple), rgba(138,120,255,.12)); }
.experience-item { position: relative; margin: 0 0 22px; }
.experience-item:last-child { margin-bottom: 0; }
.experience-marker { position: absolute; top: 27px; left: -32px; width: 16px; height: 16px; border: 3px solid var(--bg); border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 2px rgba(67,232,245,.45), 0 0 18px rgba(67,232,245,.25); }
.experience-card { padding: 25px 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 12px 34px rgba(0,0,0,.13); transition: transform 200ms ease, border-color 200ms ease, background 200ms ease; }
.experience-card:hover { transform: translateY(-3px); border-color: rgba(67,232,245,.36); background: rgba(19,28,48,.88); }
.experience-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 10px; }
.experience-date { color: var(--cyan); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.experience-type { padding: 4px 10px; border: 1px solid rgba(138,120,255,.25); border-radius: 999px; color: #c9c1ff; background: rgba(138,120,255,.08); font-size: 11px; font-weight: 700; }
.experience-card h3 { margin: 0 0 9px; color: var(--text); font-size: 21px; font-weight: 750; letter-spacing: -.02em; }
.experience-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.85; }

/* Services */
.services { padding: clamp(76px, 9vw, 112px) 0; }
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.service-card { min-height: 220px; padding: 27px 25px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); box-shadow: 0 12px 34px rgba(0,0,0,.12); transition: transform 200ms ease, border-color 200ms ease, background 200ms ease, box-shadow 200ms ease; }
.service-card:hover { transform: translateY(-5px); border-color: rgba(67,232,245,.38); background: rgba(19,28,48,.9); box-shadow: 0 18px 42px rgba(0,0,0,.25), 0 0 28px rgba(67,232,245,.06); }
.service-card .icon { display: grid; width: 48px; height: 48px; margin-bottom: 20px; place-items: center; border: 1px solid rgba(67,232,245,.2); border-radius: 14px; color: var(--cyan); background: rgba(67,232,245,.075); font-size: 19px; }
.service-card h3 { margin: 0 0 9px; color: var(--text); font-size: 17px; font-weight: 700; }
.service-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }

/* Tools */
.tools { padding: 68px 0 96px; text-align: center; }
.tools h2 { font-size: clamp(27px, 3.5vw, 36px); }
.tools > .container > p { margin-bottom: 30px; }
.tools-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.tools-grid .tool-item { display: inline-flex; min-height: 43px; align-items: center; padding: 0 19px; border: 1px solid var(--line); border-radius: 999px; color: #dce5f7; background: var(--surface); font-size: 13px; font-weight: 700; transition: transform 180ms ease, color 180ms ease, border-color 180ms ease, background 180ms ease; }
.tools-grid .tool-item:hover { transform: translateY(-3px); border-color: rgba(67,232,245,.45); color: var(--cyan); background: rgba(67,232,245,.07); }

/* Portfolio */
.portfolio { padding: clamp(76px, 9vw, 112px) 0; background: linear-gradient(180deg, transparent, rgba(12,16,32,.52), transparent); }
.portfolio-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.portfolio-card { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 14px 36px rgba(0,0,0,.16); transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease; }
.portfolio-card:hover { transform: translateY(-6px); border-color: rgba(67,232,245,.38); box-shadow: 0 22px 48px rgba(0,0,0,.28); }
.portfolio-card .thumb { height: 205px; overflow: hidden; background: var(--bg-soft); }
.portfolio-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 350ms ease; }
.portfolio-card:hover .thumb img { transform: scale(1.045); }
.portfolio-card .body { padding: 21px 22px 24px; }
.portfolio-card .body h3 { margin: 0 0 8px; color: var(--text); font-size: 17px; font-weight: 700; line-height: 1.35; }
.portfolio-card .body p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.portfolio-more { margin-top: 38px; text-align: center; }
.btn-outline-custom { border-color: rgba(67,232,245,.42); color: var(--cyan); background: rgba(67,232,245,.035); }
.btn-outline-custom:hover { transform: translateY(-2px); border-color: var(--cyan); color: #061018; background: var(--cyan); box-shadow: 0 10px 28px rgba(67,232,245,.14); }

/* Testimonials */
.testimonials { padding: clamp(76px, 9vw, 112px) 0; }
.testimonial-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.testimonial-card { position: relative; padding: 28px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); transition: transform 200ms ease, border-color 200ms ease; }
.testimonial-card::before { position: absolute; top: 8px; right: 20px; color: rgba(67,232,245,.13); content: "“"; font-family: Georgia, serif; font-size: 76px; line-height: 1; pointer-events: none; }
.testimonial-card:hover { transform: translateY(-4px); border-color: rgba(67,232,245,.32); }
.testimonial-card .quote { position: relative; margin: 0 0 22px; color: #e2e8f5; font-size: 14px; font-style: italic; line-height: 1.85; }
.testimonial-card .author { display: flex; align-items: center; gap: 12px; }
.testimonial-card .author .avatar { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border: 1px solid rgba(67,232,245,.25); border-radius: 50%; color: var(--cyan); background: rgba(67,232,245,.08); font-size: 13px; font-weight: 800; }
.testimonial-card .author .name { color: var(--text); font-size: 14px; font-weight: 750; }
.testimonial-card .author .title { color: var(--muted); font-size: 12px; }

/* Contact call to action */
.cta { overflow: hidden; padding: clamp(80px, 10vw, 120px) 24px; text-align: center; }
.cta::before { position: absolute; inset: 12% 8%; z-index: -1; border: 1px solid rgba(67,232,245,.08); border-radius: 35px; background: radial-gradient(ellipse at center, rgba(67,232,245,.09), transparent 68%); content: ""; pointer-events: none; }
.cta h2 { max-width: 780px; margin: 0 auto 15px; color: var(--text); font-size: clamp(30px, 4.3vw, 46px); font-weight: 800; letter-spacing: -.05em; line-height: 1.15; }
.cta > .container > p { max-width: 660px; margin: 0 auto 30px; color: var(--muted); font-size: 15px; line-height: 1.85; }
.cta .btn-primary-custom { min-height: 54px; padding-inline: 28px; }
.cta .contact-info { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin-top: 34px; }
.cta .contact-info a { display: inline-flex; min-height: 40px; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 9px; color: var(--muted); font-size: 13px; transition: color 180ms ease, background 180ms ease; }
.cta .contact-info a i { color: var(--cyan); }
.cta .contact-info a:hover { color: var(--text); background: rgba(67,232,245,.07); }

/* Footer */
.footer { padding: 27px 0; border-top: 1px solid var(--line); background: rgba(5,7,16,.65); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; color: var(--muted); font-size: 12px; }
.footer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.footer-copyright { letter-spacing: .01em; }
.footer-local-time { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.footer-bottom .socials { display: flex; align-items: center; gap: 9px; }
.footer-bottom .socials a { display: grid; width: 39px; height: 39px; place-items: center; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: var(--surface); transition: transform 180ms ease, color 180ms ease, border-color 180ms ease; }
.footer-bottom .socials a:hover { transform: translateY(-3px); border-color: rgba(67,232,245,.4); color: var(--cyan); }

/* Tablet */
@media (max-width: 980px) {
  :root { --header-height: 70px; }
  .nav-links { gap: 15px; }
  .nav-links a { font-size: 12px; }
  .hero .container { grid-template-columns: minmax(0, 1.1fr) minmax(230px, .9fr); gap: 34px; }
  .hero-portrait-frame { width: min(100%, 350px); height: clamp(350px, 52vh, 520px); }
  .services-grid, .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile navigation and layout */
@media (max-width: 760px) {
  .container { width: min(100% - 36px, var(--container)); }
  .hamburger { display: block; }
  .nav-links {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(10,14,28,.98);
    box-shadow: var(--glow);
  }
  .nav-links.open { display: flex; flex-direction: column; }
  .nav-links a { width: 100%; min-height: 43px; padding: 0 12px; font-size: 14px; }
  .nav-links .contact-btn { justify-content: center; margin-top: 5px; }
  .nav-links a:not(.contact-btn)::after { display: none; }
  .hero { min-height: calc(100vh - var(--header-height)); min-height: calc(100svh - var(--header-height)); padding: 70px 0 104px; }
  .hero .container { grid-template-columns: 1fr; gap: 42px; text-align: center; }
  .hero-content .subtitle, .hero-actions { justify-content: center; }
  .hero-content > p:not(.eyebrow):not(.subtitle) { margin-inline: auto; }
  .hero-image { grid-row: 1; }
  .hero-vision-portrait { min-height: 0; width: 100%; }
  .hero-portrait-frame { width: min(72vw, 290px); height: min(78vw, 390px); }
  .about-grid { grid-template-columns: 1fr; gap: 58px; }
  .about-image-wrap { width: min(100%, 410px); }
  .about-content { text-align: center; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .testimonial-grid { grid-template-columns: 1fr; }
  .section-title { margin-bottom: 34px; }
  .experience-timeline { padding-left: 28px; }
  .experience-marker { left: -26px; }
  .experience-card { padding: 21px 20px; }
}

@media (max-width: 520px) {
  .container { width: min(100% - 32px, var(--container)); }
  .hero { padding: 42px 0 92px; }
  .hero-content h1 { font-size: clamp(36px, 11vw, 48px); }
  .hero-content h1 span { font-size: clamp(20px, 6vw, 25px); }
  .hero-content .subtitle { font-size: 12px; }
  .hero-content > p:not(.eyebrow):not(.subtitle) { font-size: 16px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn-primary-custom, .hero-actions .watch-link { width: 100%; justify-content: center; }
  .hero-upwork-link { margin-top: 18px; }
  .hero-actions .watch-link { min-height: 46px; }
  .about-badge { right: 10px; bottom: -20px; min-width: 125px; padding: 12px 14px; }
  .about-badge .number { font-size: 29px; }
  .about-badge .label { font-size: 10px; }
  .stats { margin-top: 55px; padding: 25px 14px; }
  .stats-grid { gap: 23px 10px; }
  .stats-item .value { font-size: 30px; }
  .stats-item .label { font-size: 11px; }
  .stats-item .sub { font-size: 10px; }
  .services-grid, .portfolio-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 0; padding: 23px; }
  .portfolio-card .thumb { height: 205px; }
  .testimonial-card { padding: 23px 20px; }
  .cta { padding-inline: 16px; }
  .cta .contact-info { flex-direction: column; align-items: center; gap: 4px; }
  .footer-bottom { flex-direction: column; justify-content: center; text-align: center; }
  .footer-meta { flex-direction: column; justify-content: center; gap: 7px; }
}

/* Fine pointer devices only: do not hide the native cursor on touch screens */
@media (hover: hover) and (pointer: fine) {
  a, button { cursor: pointer; }
}

/* Respect operating-system motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


/* PWA install action and accessible install guidance toast */
.install-app-btn {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid rgba(67,232,245,.38);
  border-radius: 10px;
  color: var(--cyan);
  background: rgba(67,232,245,.07);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  transition: transform 180ms ease, color 180ms ease, background 180ms ease, border-color 180ms ease;
}
.install-app-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  color: #061018;
  border-color: var(--cyan);
  background: var(--cyan);
}
.install-app-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.install-app-btn:disabled { cursor: default; opacity: .78; }
.install-app-btn.is-installed { color: #9ee7c1; border-color: rgba(100,220,160,.35); background: rgba(100,220,160,.08); }
.install-toast {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 12000;
  width: min(420px, calc(100vw - 36px));
  padding: 15px 18px;
  border: 1px solid rgba(67,232,245,.35);
  border-radius: 14px;
  color: var(--text);
  background: rgba(10,14,28,.97);
  box-shadow: 0 16px 44px rgba(0,0,0,.38), 0 0 28px rgba(67,232,245,.08);
  font-size: 13px;
  line-height: 1.65;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 220ms ease, transform 220ms ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.install-toast.is-visible { opacity: 1; transform: translateY(0); }
.install-toast[hidden] { display: none; }
@media (max-width: 980px) and (min-width: 761px) {
  .nav-links { gap: 11px; }
  .install-app-btn { padding-inline: 10px; font-size: 11px; }
}
@media (max-width: 760px) {
  .nav-links .install-app-item { width: 100%; }
  .nav-links .install-app-btn { width: 100%; min-height: 43px; font-size: 14px; }
}


/* Floating back-to-top control */
.back-to-top {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(26px, env(safe-area-inset-bottom));
  z-index: 1050;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(67,232,245,.48);
  border-radius: 15px;
  color: var(--cyan);
  background: rgba(10,15,30,.88);
  box-shadow: 0 8px 26px rgba(0,0,0,.28), 0 0 22px rgba(67,232,245,.12);
  font-size: 17px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 220ms ease, visibility 220ms ease, transform 220ms ease, color 180ms ease, background 180ms ease, border-color 180ms ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover {
  color: #061018;
  border-color: var(--cyan);
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(67,232,245,.2);
}
.back-to-top:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
.back-to-top i { transition: transform 180ms ease; }
.back-to-top:hover i { transform: translateY(-2px); }
@media (max-width: 520px) {
  .back-to-top { right: 17px; bottom: max(18px, env(safe-area-inset-bottom)); width: 44px; height: 44px; border-radius: 13px; }
}

/* Project showcase image lightbox */
.portfolio-card .thumb img { cursor: zoom-in; }
.project-lightbox { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 28px; background: rgba(3, 7, 18, .78); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); opacity: 0; visibility: hidden; transition: opacity 220ms ease, visibility 220ms ease; }
.project-lightbox.is-open { opacity: 1; visibility: visible; }
.project-lightbox__panel { position: relative; width: min( min(100%, 1040px), 94vw); max-height: calc(100vh - 56px); overflow: auto; border: 1px solid rgba(120, 220, 255, .25); border-radius: 20px; background: #0c1222; box-shadow: 0 28px 90px rgba(0,0,0,.55), 0 0 45px rgba(67,232,245,.08); transform: translateY(12px) scale(.985); transition: transform 220ms ease; }
.project-lightbox.is-open .project-lightbox__panel { transform: translateY(0) scale(1); }
.project-lightbox__image-wrap { display: grid; min-height: 160px; max-height: min(68vh, 760px); place-items: center; overflow: hidden; background: rgba(0,0,0,.28); }
.project-lightbox__image { display: block; width: 100%; max-height: min(68vh, 760px); object-fit: contain; }
.project-lightbox__caption { padding: 22px 26px 25px; }
.project-lightbox__caption h2 { margin: 0 0 9px; color: #f4f7ff; font-size: clamp(19px, 2.5vw, 25px); line-height: 1.3; }
.project-lightbox__caption p { margin: 0; color: #aebbd0; font-size: 14px; line-height: 1.8; }
.project-lightbox__close { position: absolute; top: 12px; right: 12px; z-index: 1; display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: #fff; background: rgba(5,10,20,.72); font-size: 25px; line-height: 1; cursor: pointer; transition: background 160ms ease, transform 160ms ease; }
.project-lightbox__close:hover { transform: rotate(90deg); background: rgba(67,232,245,.2); }
body.lightbox-open { overflow: hidden; }
@media (max-width: 600px) { .project-lightbox { padding: 14px; } .project-lightbox__panel { width: 100%; max-height: calc(100vh - 28px); border-radius: 15px; } .project-lightbox__image-wrap, .project-lightbox__image { max-height: 58vh; } .project-lightbox__caption { padding: 18px 18px 21px; } .project-lightbox__close { top: 9px; right: 9px; width: 38px; height: 38px; } }
@media (prefers-reduced-motion: reduce) { .project-lightbox, .project-lightbox__panel, .project-lightbox__close { transition: none; } }


/* Bidirectional scroll-reveal: elements enter from the direction opposite to scroll. */
.scroll-reveal {
  opacity: 0;
  transform: translate3d(0, var(--reveal-offset, 34px), 0);
  transition: opacity 650ms ease, transform 650ms cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.scroll-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
@media (max-width: 760px) {
  .scroll-reveal { --reveal-offset: 24px; transition-duration: 520ms; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal { opacity: 1; transform: none; transition: none; will-change: auto; }
}
