/* =========================================================
   Mr. N Studio — Portfolio & Project Dashboard
   Author: Mr. N
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --font-body: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Sora", var(--font-body);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --container: 1200px;
  --header-h: 78px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

:root,
:root[data-theme="dark"] {
  --bg: #060a12;
  --bg-soft: #080e1a;
  --surface: rgba(14, 22, 38, .66);
  --surface-solid: #0c1526;
  --surface-2: #101c31;
  --surface-3: #16243c;
  --border: rgba(148, 163, 184, .13);
  --border-strong: rgba(148, 163, 184, .23);
  --text: #eef3ff;
  --text-strong: #ffffff;
  --muted: #96a5bd;
  --muted-2: #6b7b95;
  --accent: #22d3ee;
  --accent-strong: #06b6d4;
  --accent-2: #818cf8;
  --accent-3: #a3e635;
  --green: #34d399;
  --amber: #fbbf24;
  --pink: #f472b6;
  --violet: #a78bfa;
  --red: #fb7185;
  --grad: linear-gradient(115deg, #22d3ee 0%, #818cf8 52%, #a3e635 100%);
  --grad-soft: linear-gradient(120deg, rgba(34, 211, 238, .16), rgba(129, 140, 248, .12));
  --header-bg: rgba(6, 10, 18, .74);
  --glass: rgba(13, 22, 38, .78);
  --shadow-sm: 0 8px 24px -12px rgba(0, 0, 0, .55);
  --shadow-lg: 0 32px 80px -32px rgba(0, 0, 0, .82);
  --glow: rgba(34, 211, 238, .35);
  --ring-track: rgba(148, 163, 184, .14);
  --code-bg: #08101e;
  --selection: rgba(34, 211, 238, .3);
}

:root[data-theme="light"] {
  --bg: #f4f7fc;
  --bg-soft: #eef3fa;
  --surface: rgba(255, 255, 255, .76);
  --surface-solid: #ffffff;
  --surface-2: #f1f5fb;
  --surface-3: #e7eef8;
  --border: rgba(15, 23, 42, .085);
  --border-strong: rgba(15, 23, 42, .16);
  --text: #0b1424;
  --text-strong: #050b16;
  --muted: #5a6a82;
  --muted-2: #7c8ca4;
  --accent: #0891b2;
  --accent-strong: #0e7490;
  --accent-2: #6366f1;
  --accent-3: #65a30d;
  --green: #059669;
  --amber: #d97706;
  --pink: #db2777;
  --violet: #7c3aed;
  --red: #e11d48;
  --grad: linear-gradient(115deg, #0891b2 0%, #6366f1 55%, #65a30d 100%);
  --grad-soft: linear-gradient(120deg, rgba(8, 145, 178, .1), rgba(99, 102, 241, .08));
  --header-bg: rgba(244, 247, 252, .82);
  --glass: rgba(255, 255, 255, .86);
  --shadow-sm: 0 10px 30px -18px rgba(15, 23, 42, .28);
  --shadow-lg: 0 30px 70px -34px rgba(15, 23, 42, .3);
  --glow: rgba(8, 145, 178, .22);
  --ring-track: rgba(15, 23, 42, .1);
  --code-bg: #0a1424;
  --selection: rgba(8, 145, 178, .18);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 18px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.62;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open { overflow: hidden; }

::selection { background: var(--selection); color: var(--text-strong); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--text-strong);
  line-height: 1.16;
  letter-spacing: -.03em;
  margin: 0;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
strong, b { font-weight: 700; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 300;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--accent);
  color: #04121a;
  font-weight: 700;
  transition: top .2s ease;
}
.skip-link:focus { top: 14px; }

/* ---------- Ambient background ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1100px 600px at 82% -10%, rgba(99, 102, 241, .14), transparent 62%),
    radial-gradient(900px 520px at 4% 8%, rgba(34, 211, 238, .12), transparent 60%);
}
:root[data-theme="light"] .ambient {
  background:
    radial-gradient(1100px 600px at 82% -10%, rgba(99, 102, 241, .1), transparent 62%),
    radial-gradient(900px 520px at 4% 8%, rgba(8, 145, 178, .09), transparent 60%);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: .35;
}
.glow-a {
  width: 460px; height: 460px;
  top: -150px; right: -100px;
  background: radial-gradient(circle, rgba(129, 140, 248, .55), transparent 68%);
}
.glow-b {
  width: 420px; height: 420px;
  top: 42%; left: -220px;
  background: radial-gradient(circle, rgba(34, 211, 238, .42), transparent 68%);
}
.glow-c {
  width: 380px; height: 380px;
  bottom: -180px; right: 18%;
  background: radial-gradient(circle, rgba(163, 230, 53, .24), transparent 68%);
}
:root[data-theme="light"] .glow { opacity: .2; }

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .055) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 75%);
}
:root[data-theme="light"] .grid-overlay {
  background-image:
    linear-gradient(rgba(15, 23, 42, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .05) 1px, transparent 1px);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 120;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.site-header.is-scrolled {
  background: var(--header-bg);
  border-bottom-color: var(--border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 10px 40px -24px rgba(0, 0, 0, .6);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
  letter-spacing: -.02em;
}
.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(140deg, #11243c, #0a1526);
  border: 1px solid rgba(34, 211, 238, .38);
  color: #e8fbff;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 24px -12px rgba(34, 211, 238, .65);
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 13px;
  padding: 1px;
  background: linear-gradient(140deg, rgba(34, 211, 238, .7), transparent 50%, rgba(163, 230, 53, .45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.brand-dot { color: var(--accent); }
.brand-word {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
}
.brand-word b { font-weight: 800; }
.brand-word small {
  margin-left: 6px;
  color: var(--muted-2);
  font-family: var(--font-body);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 3px;
}
.nav-link {
  position: relative;
  padding: 9px 15px;
  border-radius: 999px;
  color: var(--muted);
  font-size: .89rem;
  font-weight: 600;
  transition: color .2s ease, background .2s ease;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.active { color: var(--text-strong); background: var(--surface-2); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform: translateX(-50%);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--muted);
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-1px);
}
.icon-btn .icon { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav-toggle { display: none; }
.nav-toggle .icon-close { display: none; }
.nav-mobile-cta { display: none; }
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(3, 8, 16, .55);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .25s ease;
}
.nav-backdrop.is-visible { opacity: 1; }

/* ---------- Buttons & pills ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 21px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform .22s var(--ease), box-shadow .22s ease, background .22s ease, border-color .22s ease, color .22s ease;
}
.btn .icon { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(120deg, #22d3ee, #818cf8);
  color: #04121a;
  box-shadow: 0 12px 30px -12px rgba(34, 211, 238, .65), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-primary:hover {
  box-shadow: 0 18px 40px -14px rgba(99, 102, 241, .7), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 9px 15px; font-size: .84rem; border-radius: 10px; }
.btn-lg { padding: 16px 26px; font-size: .98rem; border-radius: 14px; }
.btn-block { width: 100%; }

:root[data-theme="light"] .btn-primary { color: #031018; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}
.pulse-dot {
  position: relative;
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, .5);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .5); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 62px) 0 54px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr);
  gap: 56px;
  align-items: center;
}
.hero-copy { position: relative; z-index: 2; }
.hero-copy .status-pill { margin-bottom: 24px; }
.hero h1 {
  max-width: 670px;
  font-size: clamp(2.55rem, 4.5vw, 4.35rem);
  line-height: 1.035;
  letter-spacing: -.045em;
  font-weight: 800;
}
.hero-lead {
  max-width: 570px;
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(.98rem, 1.25vw, 1.07rem);
  line-height: 1.75;
}
.hero-lead strong { color: var(--text); font-weight: 700; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.hero-trust {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 38px;
}
.stack-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.stack-chips span {
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.trust-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: .79rem;
}
.trust-note .icon { width: 15px; height: 15px; color: var(--accent); }
.trust-note strong { color: var(--text); }

/* Hero visual */
.hero-visual {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 540px;
}
.visual-glow {
  position: absolute;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, .2), rgba(129, 140, 248, .12) 45%, transparent 70%);
  filter: blur(18px);
  animation: breathe 8s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: .8; }
  50% { transform: scale(1.08); opacity: 1; }
}
.orbit {
  position: absolute;
  border: 1px dashed rgba(129, 140, 248, .22);
  border-radius: 50%;
  pointer-events: none;
}
.orbit::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.orbit-a {
  width: 510px;
  height: 510px;
  animation: spin 38s linear infinite;
}
.orbit-b {
  width: 620px;
  height: 620px;
  border-color: rgba(34, 211, 238, .13);
  animation: spin 58s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }

.dash-mock {
  position: relative;
  z-index: 2;
  width: min(100%, 445px);
  padding: 18px;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(22, 36, 60, .94), rgba(10, 18, 32, .97));
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .07);
  transform: rotate(-1.2deg);
  transition: transform .5s var(--ease);
}
.dash-mock:hover { transform: rotate(0deg) translateY(-4px); }
:root[data-theme="light"] .dash-mock {
  background: linear-gradient(180deg, #ffffff, #f4f8fd);
}
.dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.dash-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
:root[data-theme="light"] .dash-mock .dash-title,
:root[data-theme="light"] .dash-mock .dash-kpi span,
:root[data-theme="light"] .dash-mock .mini-bar-row span,
:root[data-theme="light"] .dash-mock .dash-foot span { color: #64748b; }
:root[data-theme="light"] .dash-mock .donut-center span { color: #64748b; }
:root[data-theme="light"] .dash-mock .dash-kpi strong,
:root[data-theme="light"] .dash-mock .donut-center strong,
:root[data-theme="light"] .dash-mock .mini-bar-row b { color: #0b1424; }
:root[data-theme="light"] .dash-mock .dash-badge { background: #eef3fa; color: #475569; }
:root[data-theme="light"] .dash-mock .dash-main { border-bottom-color: rgba(15, 23, 42, .07); }
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(52, 211, 153, .8);
}
.dash-badge {
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .06em;
}
.dash-main {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--border);
}
.dash-kpis { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.dash-kpi { display: flex; align-items: center; gap: 10px; }
.kpi-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.kpi-dot.done { background: var(--green); box-shadow: 0 0 10px rgba(52, 211, 153, .6); }
.kpi-dot.prog { background: var(--amber); box-shadow: 0 0 10px rgba(251, 191, 36, .5); }
.dash-kpi div { display: flex; flex-direction: column; line-height: 1.2; }
.dash-kpi strong { color: var(--text-strong); font-family: var(--font-display); font-size: 1.32rem; letter-spacing: -.03em; }
.dash-kpi span { color: var(--muted-2); font-size: .66rem; }
.dash-bars { display: flex; flex-direction: column; gap: 11px; padding: 16px 4px 14px; }
.mini-bar-row {
  display: grid;
  grid-template-columns: 44px 1fr 38px;
  align-items: center;
  gap: 10px;
  font-size: .66rem;
}
.mini-bar-row span { color: var(--muted-2); font-weight: 600; }
.mini-bar-row b { color: var(--muted); font-size: .62rem; font-weight: 700; text-align: right; }
.mini-bar {
  height: 5px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.mini-bar i {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #818cf8);
  animation: barGrow 1.1s var(--ease) both;
  transform-origin: left;
}
.dash-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 3px;
  color: var(--muted-2);
  font-size: .65rem;
}
.dash-foot span { display: inline-flex; align-items: center; gap: 5px; }
.dash-foot .icon { width: 12px; height: 12px; }
.live-label i {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.float-card {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
  animation: float 6s ease-in-out infinite;
}
.float-card strong {
  display: block;
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: .76rem;
  line-height: 1.25;
}
.float-card small { display: block; color: var(--muted-2); font-size: .61rem; line-height: 1.3; }
.float-icon {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: rgba(34, 211, 238, .13);
  color: var(--accent);
}
.float-icon .icon { width: 16px; height: 16px; }
.float-icon.green { background: rgba(52, 211, 153, .12); color: var(--green); }
.float-icon.violet { background: rgba(167, 139, 250, .13); color: var(--violet); }
.float-a { top: 52px; left: -8px; animation-delay: -1s; }
.float-b { bottom: 62px; left: -22px; animation-delay: -2.8s; }
.float-c { top: 45%; right: -14px; animation-delay: -4.2s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* ---------- Donut ---------- */
.donut { position: relative; }
.donut svg { display: block; width: 100%; height: auto; transform: rotate(-90deg); }
.donut circle {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}
.donut-track { stroke: var(--ring-track); }
.donut-value {
  stroke: var(--accent);
  stroke-dasharray: calc(var(--pct) * 3.2673) 326.73;
  filter: drop-shadow(0 0 5px rgba(34, 211, 238, .45));
  animation: donutDraw 1.4s var(--ease) both;
}
@keyframes donutDraw {
  from { stroke-dasharray: 0 326.73; }
  to { stroke-dasharray: calc(var(--pct) * 3.2673) 326.73; }
}
.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
}
.donut-center strong {
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 2.45rem;
  font-weight: 800;
  letter-spacing: -.05em;
}
.donut-center strong small { font-size: 1.15rem; color: var(--accent); }
.donut-center > span {
  margin-top: 6px;
  color: var(--muted-2);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.donut-sm { width: 132px; flex: 0 0 auto; }
.donut-sm .donut-center strong { font-size: 1.8rem; }
.donut-sm .donut-center > span { font-size: .48rem; letter-spacing: .08em; }
.donut-lg { width: 212px; margin-inline: auto; }
.donut-lg .donut-center strong { font-size: 2.9rem; }
.donut-lg .donut-center strong small { font-size: 1.25rem; }

/* ---------- Stats ---------- */
.stats-section { padding: 24px 0 8px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stat-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(14px);
  overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s ease, box-shadow .25s ease;
}
.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -60px auto;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, .12), transparent 70%);
  pointer-events: none;
}
.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.stat-icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(34, 211, 238, .1);
  color: var(--accent);
  flex: 0 0 auto;
}
.stat-icon .icon { width: 20px; height: 20px; }
.stat-icon.green { background: rgba(52, 211, 153, .11); color: var(--green); }
.stat-icon.amber { background: rgba(251, 191, 36, .11); color: var(--amber); }
.stat-icon.violet { background: rgba(167, 139, 250, .12); color: var(--violet); }
.stat-meta { display: flex; flex-direction: column; min-width: 0; }
.stat-label {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.stat-value {
  margin-top: 2px;
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.04em;
}
.stat-value em { font-style: normal; font-size: 1.05rem; color: var(--accent); }
.stat-sub { color: var(--muted-2); font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-trend {
  position: absolute;
  top: 15px;
  right: 15px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .61rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.stat-trend .icon { width: 11px; height: 11px; }
.stat-trend.up { background: rgba(52, 211, 153, .1); color: var(--green); }
.stat-trend.neutral { background: var(--surface-2); color: var(--muted); }

/* ---------- Sections ---------- */
.section { position: relative; padding: 92px 0; }
.section-tinted {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(34, 211, 238, .028), rgba(129, 140, 248, .02) 48%, transparent);
}
:root[data-theme="light"] .section-tinted {
  background: linear-gradient(180deg, rgba(8, 145, 178, .035), rgba(99, 102, 241, .025) 48%, transparent);
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 38px;
}
.section-heading { max-width: 690px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
  color: var(--accent);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.eyebrow-line {
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.section-heading h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -.04em;
}
.section-heading p {
  max-width: 610px;
  margin-top: 12px;
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.7;
}

/* ---------- Dashboard panels ---------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.02fr 1fr 1.06fr;
  gap: 16px;
  align-items: stretch;
}
.panel {
  display: flex;
  flex-direction: column;
  padding: 23px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.panel:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.panel-head h3 { font-size: 1rem; font-weight: 700; letter-spacing: -.02em; }
.panel-head p { margin-top: 3px; color: var(--muted-2); font-size: .73rem; }
.panel-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid rgba(52, 211, 153, .22);
  border-radius: 999px;
  background: rgba(52, 211, 153, .08);
  color: var(--green);
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.panel-tag.soft {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--muted);
  letter-spacing: .06em;
}
.panel-link {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
}
.panel-link:hover { color: var(--accent); border-color: var(--accent); transform: translate(1px, -1px); }
.panel-link .icon { width: 14px; height: 14px; }

.donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 24px 0 4px;
}
.donut-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
}
.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.legend-dot.green { background: var(--green); }
.legend-dot.amber { background: var(--amber); }
.legend-item div { display: flex; flex-direction: column; min-width: 0; }
.legend-item span { color: var(--muted-2); font-size: .62rem; }
.legend-item strong { color: var(--text); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.legend-note {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--grad-soft);
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.45;
}
.legend-note .icon { width: 14px; height: 14px; color: var(--accent); margin-top: 1px; }
.legend-note strong { color: var(--text); }

.class-bars { display: flex; flex-direction: column; gap: 17px; padding-top: 24px; }
.class-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: .81rem;
  font-weight: 700;
  color: var(--text);
}
.class-bar-head span { display: inline-flex; align-items: center; gap: 8px; }
.class-chip {
  display: inline-grid;
  place-items: center;
  width: 21px; height: 21px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--accent);
  font-style: normal;
  font-size: .67rem;
  font-weight: 800;
}
.class-bar-head strong { color: var(--muted); font-size: .76rem; }
.bar-track, .stage-track, .progress-track {
  height: 7px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.bar-track i, .stage-track i {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #818cf8);
  animation: barGrow 1s var(--ease) both;
}
@keyframes barGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.bar-track i, .stage-track i { transform-origin: left; }
.class-bar-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--muted-2);
  font-size: .65rem;
}
.panel-divider { height: 1px; margin: 20px 0 17px; background: var(--border); }
.stage-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 13px;
}
.stage-head h4 { font-size: .78rem; font-weight: 700; color: var(--text); }
.stage-head span { color: var(--muted-2); font-size: .65rem; }
.stage-list { display: flex; flex-direction: column; gap: 11px; }
.stage-row {
  display: grid;
  grid-template-columns: 92px 1fr 22px;
  align-items: center;
  gap: 10px;
  font-size: .72rem;
}
.stage-row span { color: var(--muted); }
.stage-row b { color: var(--text); text-align: right; font-size: .7rem; }
.stage-track { height: 5px; }
.stage-track i { background: linear-gradient(90deg, rgba(34, 211, 238, .7), rgba(34, 211, 238, .25)); }

.update-list { display: flex; flex-direction: column; margin-top: 16px; }
.update-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.update-item:last-child { border-bottom: 0; }
.update-avatar {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(140deg, rgba(34, 211, 238, .18), rgba(129, 140, 248, .2));
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-display);
  font-size: .66rem;
  font-weight: 700;
  flex: 0 0 auto;
}
.update-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.update-copy strong {
  color: var(--text);
  font-size: .74rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.update-copy span { color: var(--muted-2); font-size: .65rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .03em;
  white-space: nowrap;
}
.chip.done { background: rgba(52, 211, 153, .11); color: var(--green); }
.chip.prog { background: rgba(251, 191, 36, .11); color: var(--amber); }
.panel-foot-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 15px;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 700;
  transition: color .2s ease;
}
.panel-foot-link:hover { color: var(--accent); }
.panel-foot-link .icon { width: 14px; height: 14px; }

/* ---------- Services ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.service-card {
  position: relative;
  padding: 25px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: transform .28s var(--ease), border-color .28s ease, box-shadow .28s ease;
}
.service-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .4), transparent);
  opacity: 0;
  transition: opacity .3s ease;
}
.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.service-card:hover::before { opacity: 1; }
.service-icon {
  display: grid;
  place-items: center;
  width: 47px; height: 47px;
  margin-bottom: 18px;
  border: 1px solid rgba(34, 211, 238, .18);
  border-radius: 13px;
  background: rgba(34, 211, 238, .09);
  color: var(--accent);
}
.service-icon .icon { width: 21px; height: 21px; }
.service-icon.green { background: rgba(52, 211, 153, .09); border-color: rgba(52, 211, 153, .18); color: var(--green); }
.service-icon.violet { background: rgba(167, 139, 250, .1); border-color: rgba(167, 139, 250, .2); color: var(--violet); }
.service-icon.amber { background: rgba(251, 191, 36, .09); border-color: rgba(251, 191, 36, .18); color: var(--amber); }
.service-icon.pink { background: rgba(244, 114, 182, .09); border-color: rgba(244, 114, 182, .18); color: var(--pink); }
.service-icon.cyan { background: rgba(34, 211, 238, .09); border-color: rgba(34, 211, 238, .18); color: var(--accent); }
.service-card h3 { font-size: 1.02rem; font-weight: 700; }
.service-card p {
  margin-top: 9px;
  color: var(--muted);
  font-size: .83rem;
  line-height: 1.65;
}
.service-tags {
  display: block;
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font-size: .63rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ---------- Project cards ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: transform .28s var(--ease), border-color .28s ease, box-shadow .28s ease;
}
.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.project-cover {
  position: relative;
  min-height: 152px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  overflow: hidden;
}
.project-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, .16), transparent 46%);
  background-size: 17px 17px, 100% 100%;
  opacity: .55;
}
.project-cover::after {
  content: "";
  position: absolute;
  right: -42px; bottom: -70px;
  width: 190px; height: 190px;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 50%;
  box-shadow: 0 0 0 26px rgba(255, 255, 255, .035), 0 0 0 56px rgba(255, 255, 255, .022);
}
.cat-retail { --c1: #0e7490; --c2: #164e63; }
.cat-edukasi { --c1: #4338ca; --c2: #211c56; }
.cat-kesehatan { --c1: #be123c; --c2: #4c0519; }
.cat-reservasi { --c1: #0f766e; --c2: #123c3a; }
.cat-jasa { --c1: #b45309; --c2: #4a2403; }
.cat-pertanian { --c1: #4d7c0f; --c2: #1f3305; }
.cat-keuangan { --c1: #6d28d9; --c2: #32126e; }
.cat-manajemen { --c1: #1d4ed8; --c2: #122a63; }
.cat-komunitas { --c1: #be185d; --c2: #53072a; }
.project-code {
  align-self: flex-start;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 5px;
  background: rgba(3, 10, 20, .22);
  color: rgba(255, 255, 255, .78);
  font-size: .57rem;
  font-weight: 700;
  letter-spacing: .08em;
}
.project-cover .status-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(4, 12, 22, .38);
  color: #f8fafc;
  font-size: .57rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.status-badge i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
}
.status-badge.is-progress i { background: #fbbf24; box-shadow: 0 0 6px #fbbf24; }
.project-brand {
  position: relative;
  z-index: 1;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.1;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .2);
}
.project-glyph {
  position: absolute;
  right: -8px;
  bottom: -14px;
  z-index: 0;
  color: #ffffff;
  opacity: .14;
  transform: rotate(-8deg);
  pointer-events: none;
}
.project-glyph .icon { width: 116px; height: 116px; stroke-width: 1.1; }
.project-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 17px;
}
.project-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.project-meta .dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }
.project-title { margin-top: 7px; font-size: 1rem; font-weight: 700; line-height: 1.35; letter-spacing: -.02em; }
.project-desc {
  margin-top: 5px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-person {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}
.person-avatar {
  display: grid;
  place-items: center;
  width: 29px; height: 29px;
  border-radius: 8px;
  background: linear-gradient(140deg, rgba(34, 211, 238, .16), rgba(129, 140, 248, .18));
  border: 1px solid var(--border);
  color: var(--text);
  font-size: .58rem;
  font-weight: 800;
  flex: 0 0 auto;
}
.person-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.person-copy strong {
  color: var(--text);
  font-size: .67rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.person-copy span { color: var(--muted-2); font-size: .58rem; }
.project-progress { margin-top: 13px; }
.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  color: var(--muted-2);
  font-size: .62rem;
}
.progress-head strong { color: var(--text); font-size: .66rem; font-weight: 700; }
.progress-track { height: 5px; }
.progress-track i {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, #34d399, #22d3ee);
  animation: barGrow 1s var(--ease) both;
  transform-origin: left;
}
.project-card.is-progress .progress-track i { background: linear-gradient(90deg, #fbbf24, #fb923c); }
.project-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}
.project-updated { color: var(--muted-2); font-size: .6rem; }
.project-open {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  font-size: .64rem;
  font-weight: 700;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.project-open:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
.project-open .icon { width: 12px; height: 12px; }

/* ---------- Process ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.process-step {
  position: relative;
  padding-top: 24px;
  border-top: 1px solid var(--border-strong);
}
.process-step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 38px;
  height: 1px;
  background: var(--grad);
}
.process-no {
  display: block;
  margin-bottom: 14px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--font-display);
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.05em;
  opacity: .9;
}
.process-step h3 { font-size: .98rem; font-weight: 700; }
.process-step p { margin-top: 8px; color: var(--muted); font-size: .81rem; line-height: 1.65; }

/* ---------- CTA ---------- */
.cta-section { padding-top: 30px; }
.cta-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 45px 48px;
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  background:
    radial-gradient(600px 300px at 92% 8%, rgba(34, 211, 238, .13), transparent 66%),
    radial-gradient(500px 300px at 0% 100%, rgba(129, 140, 248, .12), transparent 66%),
    var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.cta-orb {
  position: absolute;
  right: -90px;
  top: -120px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(34, 211, 238, .16);
  border-radius: 50%;
  box-shadow: 0 0 0 44px rgba(34, 211, 238, .025), 0 0 0 88px rgba(129, 140, 248, .02);
  pointer-events: none;
}
.cta-copy { position: relative; max-width: 680px; }
.cta-copy .status-pill { margin-bottom: 17px; }
.cta-copy h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); font-weight: 800; }
.cta-copy p { max-width: 580px; margin-top: 11px; color: var(--muted); font-size: .91rem; line-height: 1.7; }
.cta-actions { position: relative; display: flex; flex-direction: column; gap: 10px; flex: 0 0 auto; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 30px;
  padding: 62px 0 24px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(34, 211, 238, .025));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.55fr .9fr .95fr 1.3fr;
  gap: 38px;
}
.footer-brand p {
  max-width: 310px;
  margin: 15px 0 18px;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.65;
}
.social-row { display: flex; gap: 7px; }
.social-btn {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
}
.social-btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.social-btn .icon { width: 15px; height: 15px; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.footer-col h4 {
  margin-bottom: 5px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.footer-col a, .footer-col span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: .79rem;
  transition: color .2s ease;
}
.footer-col a:hover { color: var(--accent); }
.footer-col .icon { width: 14px; height: 14px; color: var(--muted-2); }
.footer-avail { margin-top: 5px; color: var(--green) !important; font-size: .71rem !important; }
.footer-avail .pulse-dot { width: 5px; height: 5px; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 52px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font-size: .7rem;
}
.footer-legal { display: flex; align-items: center; gap: 18px; }
.back-top {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-weight: 600;
  transition: color .2s ease;
}
.back-top:hover { color: var(--accent); }
.back-top .icon { width: 13px; height: 13px; }

/* ---------- To top / toast ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--glass);
  color: var(--text);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, border-color .2s ease, color .2s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { border-color: var(--accent); color: var(--accent); }
.to-top .icon { width: 17px; height: 17px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 400;
  max-width: min(90vw, 440px);
  padding: 12px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  font-size: .82rem;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 14px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------- Scroll reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }
.js .reveal[data-delay="1"] { transition-delay: .07s; }
.js .reveal[data-delay="2"] { transition-delay: .14s; }
.js .reveal[data-delay="3"] { transition-delay: .21s; }
.js .reveal[data-delay="4"] { transition-delay: .28s; }
.js .reveal[data-delay="5"] { transition-delay: .35s; }

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
  .hero-grid { gap: 34px; }
  .float-a { left: -4px; }
  .float-b { left: -8px; }
  .float-c { right: -4px; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .updates-panel { grid-column: 1 / -1; }
  .update-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
  .update-item:nth-last-child(-n+2) { border-bottom: 0; }
  .panel-foot-link { justify-content: flex-start; }
}

@media (max-width: 980px) {
  .nav-links {
    position: fixed;
    top: calc(var(--header-h) - 4px);
    right: 18px;
    z-index: 130;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    width: min(330px, calc(100vw - 36px));
    padding: 12px;
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    background: var(--surface-solid);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }
  .nav-links.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-link { padding: 12px 14px; font-size: .95rem; }
  .nav-link.active::after { display: none; }
  .nav-link.active { background: var(--grad-soft); }
  .nav-mobile-cta { display: block; margin-top: 7px; padding-top: 10px; border-top: 1px solid var(--border); }
  .nav-cta { display: none; }
  .nav-toggle { display: inline-grid; }
  body.nav-open .nav-toggle .icon-menu { display: none; }
  body.nav-open .nav-toggle .icon-close { display: block; }

  .hero { padding-top: calc(var(--header-h) + 46px); }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-copy { max-width: 700px; }
  .hero-visual { min-height: 520px; }
  .orbit-a { width: 460px; height: 460px; }
  .orbit-b { width: 560px; height: 560px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .process-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-contact { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
  .footer-contact h4 { grid-column: 1 / -1; }
  .cta-card { flex-direction: column; align-items: flex-start; gap: 28px; }
  .cta-actions { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 720px) {
  .container { width: calc(100% - 36px); }
  .section { padding: 68px 0; }
  .hero { padding-bottom: 38px; }
  .hero h1 { font-size: clamp(2.3rem, 9vw, 3.2rem); }
  .hero-visual { min-height: 470px; }
  .dash-mock { width: min(100%, 390px); padding: 15px; }
  .float-c { display: none; }
  .float-a { top: 16px; left: 0; }
  .float-b { bottom: 22px; left: 0; }
  .orbit-a { width: 390px; height: 390px; }
  .orbit-b { width: 470px; height: 470px; }
  .dash-main { gap: 14px; }
  .donut-sm { width: 118px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 16px; gap: 10px; }
  .stat-icon { width: 38px; height: 38px; }
  .stat-value { font-size: 1.65rem; }
  .stat-sub { display: none; }
  .stat-trend { display: none; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 28px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .updates-panel { grid-column: auto; }
  .update-list { grid-template-columns: 1fr; }
  .update-item:nth-last-child(2) { border-bottom: 1px solid var(--border); }
  .service-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; gap: 22px; }
  .cta-card { padding: 30px 24px; border-radius: 22px; }
  .cta-actions { width: 100%; flex-direction: column; }
  .cta-actions .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-contact { grid-column: 1 / -1; display: flex; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-legal { flex-wrap: wrap; gap: 12px; }
  .to-top { right: 16px; bottom: 16px; }
  .float-card { padding: 8px 10px; }
  .float-card small { display: none; }
}

@media (max-width: 480px) {
  .container { width: calc(100% - 28px); }
  .brand-word small { display: none; }
  .hero-actions .btn { width: 100%; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { padding: 16px 18px; }
  .stat-sub { display: block; }
  .stat-trend { display: inline-flex; }
  .hero-visual { min-height: 430px; }
  .float-card { transform: scale(.92); }
  .float-a { left: -8px; }
  .float-b { left: -8px; }
  .dash-bars { padding-top: 13px; }
  .footer-legal { flex-direction: column; align-items: flex-start; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Project directory
   ========================================================= */
[hidden] { display: none !important; }

.page-hero {
  position: relative;
  padding: calc(var(--header-h) + 44px) 0 54px;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 20px;
  color: var(--muted-2);
  font-size: .7rem;
  font-weight: 600;
}
.breadcrumbs a { transition: color .2s ease; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span:last-child { color: var(--muted); }

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 48px;
  align-items: center;
}
.page-hero-copy h1 {
  margin-top: 19px;
  font-size: clamp(2.6rem, 4.8vw, 4rem);
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: 1.04;
}
.page-hero-copy p {
  max-width: 600px;
  margin-top: 19px;
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.75;
}
.page-hero-copy p strong { color: var(--text); }
.page-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.page-hero-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: min(100%, 420px);
  margin-left: auto;
}
.mini-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  backdrop-filter: blur(14px);
  transition: transform .25s var(--ease), border-color .25s ease;
}
.mini-stat:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.mini-stat-icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(34, 211, 238, .1);
  color: var(--accent);
  flex: 0 0 auto;
}
.mini-stat-icon.green { background: rgba(52, 211, 153, .1); color: var(--green); }
.mini-stat-icon.amber { background: rgba(251, 191, 36, .1); color: var(--amber); }
.mini-stat-icon .icon { width: 18px; height: 18px; }
.mini-stat strong {
  display: block;
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.04em;
}
.mini-stat span { color: var(--muted-2); font-size: .66rem; }
.mini-stat-wide {
  grid-column: 1 / -1;
  background: var(--grad-soft);
  border-color: rgba(34, 211, 238, .18);
}
.mini-stat-wide strong { color: var(--accent); }
.mini-stat-ring { width: 40px; height: 40px; flex: 0 0 auto; }
.mini-stat-ring svg { width: 100%; height: 100%; }

/* Directory */
.directory { padding: 4px 0 42px; }
.directory-panel {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sm);
}
.directory-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 178px 205px auto;
  gap: 9px;
  align-items: center;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.search-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .1);
}
.search-field .icon { width: 17px; height: 17px; color: var(--muted-2); }
.search-field input {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: .83rem;
}
.search-field input::placeholder { color: var(--muted-2); }
.search-field input::-webkit-search-cancel-button { cursor: pointer; }

.select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  transition: border-color .2s ease;
}
.select-wrap:focus-within { border-color: var(--accent); }
.select-wrap > .icon:first-child {
  position: absolute;
  left: 12px;
  width: 15px;
  height: 15px;
  color: var(--muted-2);
  pointer-events: none;
}
.select-wrap select {
  width: 100%;
  height: 100%;
  padding: 0 30px 0 35px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: .78rem;
  font-weight: 600;
  appearance: none;
  cursor: pointer;
}
.select-wrap select option { background: var(--surface-solid); color: var(--text); }
.select-wrap .select-chevron {
  position: absolute;
  right: 11px;
  width: 13px;
  height: 13px;
  color: var(--muted-2);
  pointer-events: none;
}
.toolbar-export { height: 46px; border-radius: 11px; padding-inline: 14px; }

.filter-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}
.status-tabs {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
}
.status-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 700;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}
.status-tab span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 17px;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--muted-2);
  font-size: .58rem;
  font-weight: 800;
}
.status-tab:hover { color: var(--text); }
.status-tab.is-active {
  background: var(--surface-solid);
  color: var(--text-strong);
  box-shadow: 0 2px 8px -4px rgba(0, 0, 0, .4);
}
.status-tab.is-active span { background: rgba(34, 211, 238, .12); color: var(--accent); }
.data-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-size: .65rem;
  font-weight: 600;
  white-space: nowrap;
}
.data-note .icon { width: 13px; height: 13px; }

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .67rem;
  font-weight: 600;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.filter-chip span {
  color: var(--muted-2);
  font-size: .57rem;
  font-weight: 800;
}
.filter-chip:hover { color: var(--text); border-color: var(--border-strong); }
.filter-chip.is-active {
  border-color: rgba(34, 211, 238, .35);
  background: rgba(34, 211, 238, .08);
  color: var(--accent);
}
.filter-chip.is-active span { color: var(--accent); }

.results-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 3px 13px;
}
.results-row p { color: var(--muted); font-size: .76rem; }
.results-row p strong { color: var(--text); }
.reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  font-size: .69rem;
  font-weight: 700;
  transition: color .2s ease;
}
.reset-btn:hover { color: var(--accent); }
.reset-btn .icon { width: 13px; height: 13px; }

.project-card {
  animation: cardIn .5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 32ms);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.project-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.load-wrap { display: flex; justify-content: center; margin-top: 28px; }
.load-wrap .btn { gap: 7px; }
.load-wrap .btn span { color: var(--muted-2); font-size: .68rem; font-weight: 600; }
.load-wrap .btn .icon { transition: transform .2s ease; }
.load-wrap .btn:hover .icon { transform: translateY(2px); }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  background: var(--surface);
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--muted-2);
}
.empty-icon .icon { width: 24px; height: 24px; }
.empty-state h3 { font-size: 1.1rem; }
.empty-state p { max-width: 380px; margin: 7px 0 18px; color: var(--muted); font-size: .82rem; }

/* =========================================================
   Project modal
   ========================================================= */
body.modal-open { overflow: hidden; }
.project-modal {
  width: min(760px, calc(100vw - 32px));
  max-width: 100%;
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: var(--text);
  overflow: visible;
}
.project-modal::backdrop {
  background: rgba(3, 8, 16, .72);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.modal-shell {
  position: relative;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute;
  top: 13px;
  right: 13px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 9px;
  background: rgba(4, 12, 22, .45);
  color: #f8fafc;
  backdrop-filter: blur(8px);
  transition: background .2s ease, transform .2s ease;
}
.modal-close:hover { background: rgba(4, 12, 22, .7); transform: rotate(90deg); }
.modal-close .icon { width: 16px; height: 16px; }

.modal-hero {
  position: relative;
  padding: 23px 24px 25px;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.modal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px),
    radial-gradient(circle at 82% 12%, rgba(255, 255, 255, .18), transparent 44%);
  background-size: 18px 18px, 100% 100%;
  opacity: .5;
}
.modal-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-right: 42px;
}
.modal-hero .status-badge { position: static; }
.modal-brand {
  position: relative;
  z-index: 1;
  margin-top: 38px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.045em;
}
.modal-hero > p {
  position: relative;
  z-index: 1;
  margin-top: 9px;
  color: rgba(255, 255, 255, .78);
  font-size: .88rem;
  line-height: 1.5;
}
.modal-glyph {
  position: absolute;
  right: -20px;
  bottom: -38px;
  color: #fff;
  opacity: .13;
  transform: rotate(-8deg);
  pointer-events: none;
}
.modal-glyph .icon { width: 180px; height: 180px; stroke-width: 1; }

.modal-body { padding: 24px; }
.modal-body > .eyebrow { margin-bottom: 8px; font-size: .62rem; }
.modal-body h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); letter-spacing: -.035em; }
.modal-desc { margin-top: 10px; color: var(--muted); font-size: .85rem; line-height: 1.7; }
.modal-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--border);
  overflow: hidden;
}
.modal-facts > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 11px 13px;
  background: var(--surface);
}
.modal-facts span { color: var(--muted-2); font-size: .6rem; font-weight: 600; }
.modal-facts strong { color: var(--text); font-size: .75rem; font-weight: 700; line-height: 1.4; }
.modal-progress-card {
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-2);
}
.modal-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.modal-progress-top > div { display: flex; flex-direction: column; line-height: 1.2; }
.modal-progress-top span { color: var(--muted-2); font-size: .62rem; }
.modal-progress-top strong { color: var(--text); font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; letter-spacing: -.04em; }
.milestones { display: flex; flex-direction: column; gap: 1px; margin-top: 16px; }
.milestones li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
  color: var(--muted-2);
  font-size: .71rem;
}
.milestone-icon {
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted-2);
  flex: 0 0 auto;
}
.milestone-icon .icon { width: 11px; height: 11px; }
.milestone-icon i { width: 5px; height: 5px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.milestones li.done { color: var(--text); }
.milestones li.done .milestone-icon { border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .12); color: var(--green); }
.milestones li.current { color: var(--text); font-weight: 600; }
.milestones li.current .milestone-icon { border-color: rgba(251, 191, 36, .45); background: rgba(251, 191, 36, .12); }
.milestones li.pending { opacity: .55; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.modal-actions .btn { flex: 1; min-width: 160px; }

/* =========================================================
   Profile
   ========================================================= */
.profile-hero { padding-bottom: 46px; }
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: 56px;
  align-items: center;
}
.profile-visual { display: flex; justify-content: center; }
.avatar-card {
  position: relative;
  width: min(100%, 350px);
  padding: 40px 24px 0;
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  background:
    radial-gradient(340px 260px at 50% 0%, rgba(34, 211, 238, .13), transparent 65%),
    radial-gradient(300px 250px at 100% 100%, rgba(129, 140, 248, .12), transparent 65%),
    var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.avatar-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(148, 163, 184, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .06) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at 50% 42%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 42%, #000, transparent 72%);
}
.avatar-ring {
  position: absolute;
  left: 50%;
  top: 44%;
  border: 1px dashed rgba(34, 211, 238, .24);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.avatar-ring-a { width: 275px; height: 275px; animation: spin 34s linear infinite; }
.avatar-ring-b { width: 325px; height: 325px; border-color: rgba(129, 140, 248, .2); animation: spin 52s linear infinite reverse; }
.avatar-monogram {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 176px;
  height: 176px;
  margin: 4px auto 27px;
  border: 1px solid rgba(34, 211, 238, .4);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 24%, rgba(34, 211, 238, .38), transparent 46%),
    radial-gradient(circle at 72% 78%, rgba(163, 230, 53, .2), transparent 48%),
    linear-gradient(145deg, #102039, #081120);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    inset 0 0 60px rgba(34, 211, 238, .08),
    0 24px 60px -24px rgba(34, 211, 238, .6);
  color: #fff;
  font-family: var(--font-display);
  font-size: 5.1rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.09em;
  text-indent: -.04em;
}
.avatar-monogram span { color: var(--accent); font-size: 4rem; }
.avatar-monogram::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
}
.avatar-chip {
  position: absolute;
  z-index: 3;
  padding: 4px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--glass);
  color: var(--muted);
  font-size: .57rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  animation: float 6s ease-in-out infinite;
}
.chip-web { top: 28px; left: 20px; color: var(--accent); }
.chip-ai { top: 86px; right: 14px; color: var(--violet); animation-delay: -1.6s; }
.chip-iot { bottom: 124px; left: 12px; color: var(--green); animation-delay: -3.1s; }
.chip-robot { bottom: 148px; right: 8px; color: var(--amber); animation-delay: -4.5s; }
.avatar-caption {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 17px 0 19px;
  border-top: 1px solid var(--border);
}
.avatar-caption strong { color: var(--text-strong); font-family: var(--font-display); font-size: 1.15rem; letter-spacing: -.03em; }
.avatar-caption > span { color: var(--muted); font-size: .7rem; }
.avatar-caption small { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-top: 6px; color: var(--green); font-size: .6rem; font-weight: 700; }
.avatar-caption .pulse-dot { width: 5px; height: 5px; }

.profile-copy .status-pill { margin-bottom: 19px; }
.profile-copy h1 {
  font-size: clamp(2.15rem, 4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: 1.08;
}
.profile-lead {
  max-width: 630px;
  margin-top: 20px;
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.78;
}
.profile-lead strong { color: var(--text); }
.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 20px;
}
.profile-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-size: .71rem;
}
.profile-meta .icon { width: 14px; height: 14px; color: var(--accent); }
.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 530px;
  margin-top: 29px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.profile-stats > div {
  display: flex;
  flex-direction: column;
  padding-left: 17px;
  border-left: 1px solid var(--border);
}
.profile-stats > div:first-child { padding-left: 0; border-left: 0; }
.profile-stats strong {
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.04em;
}
.profile-stats span { color: var(--muted-2); font-size: .63rem; }

/* Highlights */
.profile-highlights { padding: 58px 0; }
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.highlight-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: transform .28s var(--ease), border-color .28s ease, box-shadow .28s ease;
}
.highlight-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.highlight-card .service-icon { margin-bottom: 16px; }
.highlight-card h3 { font-size: 1rem; }
.highlight-card p { margin-top: 7px; color: var(--muted); font-size: .81rem; line-height: 1.65; }

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 58px;
  align-items: start;
}
.skills-copy h2 { font-size: clamp(1.9rem, 3.2vw, 2.55rem); font-weight: 800; letter-spacing: -.04em; }
.skills-copy > p { margin-top: 15px; color: var(--muted); font-size: .9rem; line-height: 1.75; }
.skill-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 23px 0;
  padding: 15px;
  border: 1px solid rgba(34, 211, 238, .16);
  border-radius: 14px;
  background: var(--grad-soft);
}
.skill-note-icon {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: rgba(34, 211, 238, .12);
  color: var(--accent);
  flex: 0 0 auto;
}
.skill-note-icon .icon { width: 16px; height: 16px; }
.skill-note div { display: flex; flex-direction: column; gap: 1px; }
.skill-note strong { color: var(--text); font-size: .78rem; }
.skill-note span { color: var(--muted); font-size: .72rem; line-height: 1.5; }
.skill-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.skill-group {
  padding: 19px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
  transition: border-color .25s ease, transform .25s var(--ease);
}
.skill-group:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.skill-group-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.skill-group-icon {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: rgba(34, 211, 238, .1);
  color: var(--accent);
  flex: 0 0 auto;
}
.skill-group-icon.green { background: rgba(52, 211, 153, .1); color: var(--green); }
.skill-group-icon.violet { background: rgba(167, 139, 250, .11); color: var(--violet); }
.skill-group-icon.pink { background: rgba(244, 114, 182, .1); color: var(--pink); }
.skill-group-icon .icon { width: 16px; height: 16px; }
.skill-group h3 { font-size: .86rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.skill-tags span {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: .62rem;
  font-weight: 600;
}

/* Contact */
.contact-section {
  position: relative;
  border-top: 1px solid var(--border);
  background:
    radial-gradient(700px 400px at 8% 20%, rgba(34, 211, 238, .05), transparent 60%),
    radial-gradient(600px 380px at 100% 90%, rgba(129, 140, 248, .055), transparent 60%);
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: start;
}
.contact-info h2 { font-size: clamp(2.15rem, 3.8vw, 3rem); font-weight: 800; letter-spacing: -.05em; }
.contact-lead { max-width: 500px; margin-top: 16px; color: var(--muted); font-size: .92rem; line-height: 1.75; }
.contact-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 26px; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  transition: border-color .22s ease, transform .22s var(--ease), background .22s ease;
}
a.contact-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.contact-icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(34, 211, 238, .1);
  color: var(--accent);
  flex: 0 0 auto;
}
.contact-icon.green { background: rgba(52, 211, 153, .1); color: var(--green); }
.contact-icon.violet { background: rgba(167, 139, 250, .11); color: var(--violet); }
.contact-icon .icon { width: 18px; height: 18px; }
.contact-card > div { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.contact-card > div span { color: var(--muted-2); font-size: .62rem; }
.contact-card > div strong { color: var(--text); font-size: .8rem; font-weight: 700; }
.contact-arrow { margin-left: auto; width: 15px; height: 15px; color: var(--muted-2); }
.contact-copy {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  transition: color .2s ease, border-color .2s ease;
}
.contact-copy:hover { color: var(--accent); border-color: var(--accent); }
.contact-copy .icon { width: 13px; height: 13px; }
.contact-chip {
  margin-left: auto;
  padding: 3px 8px;
  border: 1px solid rgba(52, 211, 153, .2);
  border-radius: 999px;
  background: rgba(52, 211, 153, .07);
  color: var(--green);
  font-size: .57rem;
  font-weight: 700;
  white-space: nowrap;
}
.availability-card {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  padding: 13px 14px;
  border: 1px dashed rgba(34, 211, 238, .25);
  border-radius: 13px;
  background: var(--grad-soft);
}
.availability-icon {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: rgba(34, 211, 238, .12);
  color: var(--accent);
  flex: 0 0 auto;
}
.availability-icon .icon { width: 16px; height: 16px; }
.availability-card > div { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.availability-card strong { color: var(--text); font-size: .72rem; }
.availability-card span { color: var(--muted); font-size: .66rem; }
.availability-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: var(--green) !important;
  font-size: .58rem !important;
  font-weight: 800;
  white-space: nowrap;
}
.availability-dot .pulse-dot { width: 5px; height: 5px; }
.contact-socials { margin-top: 18px; }

.contact-form {
  padding: 25px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}
.form-head { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 21px; }
.form-icon {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(34, 211, 238, .18), rgba(129, 140, 248, .18));
  color: var(--accent);
  flex: 0 0 auto;
}
.form-icon .icon { width: 18px; height: 18px; }
.form-head h3 { font-size: 1.05rem; }
.form-head p { margin-top: 2px; color: var(--muted-2); font-size: .72rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 13px; }
.form-field label { color: var(--muted); font-size: .69rem; font-weight: 700; }
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: 0;
  background: var(--surface-2);
  color: var(--text);
  font-size: .82rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--muted-2); }
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .1);
}
.form-field textarea { min-height: 116px; resize: vertical; line-height: 1.6; }
.select-block { height: 43px; }
.select-block select {
  padding: 0 36px 0 13px;
  font-size: .8rem;
  font-weight: 500;
}
.form-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 11px;
  color: var(--muted-2);
  font-size: .64rem;
  line-height: 1.5;
}
.form-note .icon { width: 13px; height: 13px; margin-top: 1px; flex: 0 0 auto; }
.contact-form .btn-lg { margin-top: 2px; }

/* FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: 58px;
  align-items: start;
}
.faq-copy h2 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); font-weight: 800; letter-spacing: -.04em; }
.faq-copy > p { margin-top: 13px; color: var(--muted); font-size: .88rem; line-height: 1.7; }
.faq-copy .btn { margin-top: 20px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 2px;
  color: var(--text);
  font-size: .86rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { width: 16px; height: 16px; color: var(--muted-2); transition: transform .25s ease, color .25s ease; }
.faq-item[open] summary { color: var(--accent); }
.faq-item[open] summary .icon { transform: rotate(180deg); color: var(--accent); }
.faq-item p { padding: 0 24px 17px 2px; color: var(--muted); font-size: .81rem; line-height: 1.7; }

/* ---------- Page responsive ---------- */
@media (max-width: 1120px) {
  .directory-toolbar { grid-template-columns: minmax(200px, 1fr) 160px 185px; }
  .toolbar-export { grid-column: 1 / -1; justify-self: start; height: 38px; }
}

@media (max-width: 980px) {
  .page-hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .page-hero-cards { width: 100%; max-width: 560px; margin-left: 0; grid-template-columns: repeat(4, 1fr); }
  .mini-stat-wide { grid-column: auto; }
  .mini-stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
  .mini-stat-ring { display: none; }
  .profile-grid { grid-template-columns: 1fr; gap: 40px; }
  .profile-visual { order: 2; }
  .profile-copy { order: 1; }
  .avatar-card { width: min(100%, 380px); }
  .highlight-grid { grid-template-columns: 1fr 1fr; }
  .highlight-card:last-child { grid-column: 1 / -1; }
  .skills-grid, .contact-grid, .faq-grid { grid-template-columns: 1fr; gap: 38px; }
  .contact-form { max-width: 640px; }
}

@media (max-width: 720px) {
  .page-hero { padding-top: calc(var(--header-h) + 30px); padding-bottom: 36px; }
  .page-hero-cards { grid-template-columns: 1fr 1fr; }
  .mini-stat-wide { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  .directory-panel { padding: 13px; }
  .directory-toolbar { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .toolbar-export { grid-column: 1 / -1; width: 100%; }
  .filter-status-row { flex-wrap: wrap; }
  .category-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .filter-chip { flex: 0 0 auto; }
  .results-row { margin-top: 16px; }
  .profile-copy h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
  .profile-stats { grid-template-columns: 1fr 1fr; gap: 15px 0; }
  .profile-stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .avatar-card { width: min(100%, 330px); }
  .highlight-grid { grid-template-columns: 1fr; }
  .highlight-card:last-child { grid-column: auto; }
  .skill-groups { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form { padding: 19px; }
  .modal-facts { grid-template-columns: 1fr 1fr; }
  .modal-actions { flex-direction: column; }
  .modal-actions .btn { width: 100%; }
}

@media (max-width: 480px) {
  .page-hero-cards { gap: 8px; }
  .mini-stat { padding: 12px; }
  .mini-stat strong { font-size: 1.32rem; }
  .status-tabs { width: 100%; }
  .status-tab { flex: 1; justify-content: center; padding-inline: 8px; }
  .data-note { display: none; }
  .directory-toolbar { grid-template-columns: 1fr; }
  .search-field, .toolbar-export { grid-column: auto; }
  .select-wrap { width: 100%; }
  .profile-stats { gap: 13px 0; }
  .profile-stats strong { font-size: 1.2rem; }
  .avatar-monogram { width: 150px; height: 150px; font-size: 4.2rem; }
  .avatar-monogram span { font-size: 3.4rem; }
  .avatar-ring-a { width: 245px; height: 245px; }
  .avatar-ring-b { width: 290px; height: 290px; }
  .chip-ai { right: 8px; }
  .chip-robot { right: 4px; }
  .availability-card { flex-wrap: wrap; }
  .availability-dot { margin-left: 45px; }
  .modal-hero { padding: 18px; }
  .modal-body { padding: 18px; }
  .modal-facts { grid-template-columns: 1fr; }
  .modal-brand { margin-top: 30px; }
  .modal-close { top: 10px; right: 10px; }
}

/* =========================================================
   Progress charts (Home dashboard)
   ========================================================= */
.chart-grid {
  display: grid;
  grid-template-columns: 1.32fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.chart-panel { padding: 23px; }
.chart-highlight {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.chart-highlight-main { display: flex; align-items: baseline; gap: 7px; margin-right: auto; }
.chart-highlight-main strong {
  font-family: var(--font-display);
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
}
.chart-highlight-main span { color: var(--muted-2); font-size: .68rem; }
.chart-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(52, 211, 153, .1);
  color: var(--green);
  font-size: .62rem;
  font-weight: 700;
}
.chart-delta .icon { width: 11px; height: 11px; }
.chart-avg { color: var(--muted-2); font-size: .62rem; }
.chart-avg b { color: var(--text); }

.trend-chart {
  display: grid;
  grid-template-columns: 22px 1fr;
  grid-template-rows: auto auto;
  gap: 0 8px;
  margin-top: 20px;
}
.trend-y {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  height: 168px;
  padding-top: 2px;
  color: var(--muted-2);
  font-size: .57rem;
  line-height: 1;
}
.trend-plot { position: relative; height: 168px; }
.trend-grid {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.trend-grid i { height: 1px; background: var(--border); }
.trend-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.trend-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: trendDraw 1.5s var(--ease) .15s forwards;
}
.trend-area { fill: url(#trendFill); opacity: 0; animation: trendFade .8s ease .5s forwards; }
@keyframes trendDraw { to { stroke-dashoffset: 0; } }
@keyframes trendFade { to { opacity: 1; } }

.trend-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface-solid);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, .13);
  opacity: 0;
  animation: trendDot .35s var(--ease) var(--delay, .45s) forwards;
}
@keyframes trendDot {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.4); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.trend-dot b {
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text);
  font-size: .57rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
.trend-x { grid-column: 2; position: relative; height: 30px; margin-top: 11px; }
.trend-x span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  color: var(--muted);
  font-size: .62rem;
  font-weight: 600;
  line-height: 1.25;
}
.trend-x small { color: var(--muted-2); font-size: .55rem; font-weight: 500; }
.trend-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font-size: .62rem;
}
.trend-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend-line {
  display: inline-block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.trend-total b { color: var(--text); font-size: .68rem; }

.category-progress {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  flex: 1;
  justify-content: space-between;
}
.cat-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(52px, 1fr) 34px;
  align-items: center;
  gap: 9px;
}
.cat-progress-name { display: flex; align-items: center; gap: 7px; min-width: 0; }
.cat-progress-name > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: var(--text);
  font-size: .67rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-progress-name small { color: var(--muted-2); font-size: .55rem; font-weight: 500; }
.cat-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--c1, var(--accent));
}
.cat-progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.cat-progress-track i {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--c1, var(--accent)), var(--c2, var(--accent-2)));
  transform-origin: left;
  animation: barGrow 1s var(--ease) both;
}
.cat-progress-row b {
  color: var(--muted);
  font-size: .65rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   Floating contact dock + AI chat
   ========================================================= */
.to-top { bottom: 88px; }

.contact-dock {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dock-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--glass);
  color: var(--text);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .75);
  transition: transform .22s var(--ease), box-shadow .22s ease, border-color .2s ease;
}
.dock-btn:hover { transform: translateY(-3px); }
.dock-btn .icon { width: 22px; height: 22px; }
.dock-btn.wa {
  border-color: transparent;
  background: linear-gradient(145deg, #34e07b, #12a150);
  color: #04170c;
}
.dock-btn.ai {
  border-color: transparent;
  background: var(--grad);
  color: #041018;
}
:root[data-theme="light"] .dock-btn.wa { color: #fff; }
.dock-btn.ai::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 20px;
  border: 1px solid rgba(34, 211, 238, .45);
  animation: dockPulse 2.8s ease-out infinite;
  pointer-events: none;
}
@keyframes dockPulse {
  0% { transform: scale(.92); opacity: .75; }
  70%, 100% { transform: scale(1.14); opacity: 0; }
}
.dock-tip {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(4px);
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  font-size: .68rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.dock-btn:hover .dock-tip,
.dock-btn:focus-visible .dock-tip { opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0); }
.dock-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid var(--bg);
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: .55rem;
  font-weight: 800;
  line-height: 1;
}

.ai-chat {
  position: fixed;
  right: 22px;
  bottom: 88px;
  z-index: 96;
  display: flex;
  flex-direction: column;
  width: min(392px, calc(100vw - 44px));
  height: min(600px, calc(100dvh - 120px));
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.985);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.ai-chat.is-open { opacity: 1; visibility: visible; transform: none; }
.ai-chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(120deg, rgba(34, 211, 238, .11), rgba(129, 140, 248, .09));
}
.ai-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grad);
  color: #041018;
  font-family: var(--font-display);
  font-size: .76rem;
  font-weight: 800;
  flex: 0 0 auto;
}
.ai-chat-head > div { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.ai-chat-head strong { color: var(--text-strong); font-size: .86rem; }
.ai-chat-head small { display: flex; align-items: center; gap: 5px; color: var(--muted-2); font-size: .63rem; }
.ai-chat-head small i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, .15);
}
.ai-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted);
  transition: color .2s ease, border-color .2s ease;
}
.ai-close:hover { color: var(--text); border-color: var(--border-strong); }
.ai-close .icon { width: 15px; height: 15px; }

.ai-chat-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.ai-chat-log::-webkit-scrollbar { width: 6px; }
.ai-chat-log::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
.msg { display: flex; align-items: flex-end; gap: 8px; max-width: 90%; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--grad);
  color: #041018;
  font-size: .56rem;
  font-weight: 800;
  flex: 0 0 auto;
}
.msg.user .msg-avatar { background: var(--surface-3); color: var(--muted); }
.msg-bubble {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 5px;
  background: var(--surface-2);
  color: var(--text);
  font-size: .77rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.msg.user .msg-bubble {
  border-color: rgba(34, 211, 238, .24);
  border-radius: 14px 14px 5px 14px;
  background: linear-gradient(135deg, rgba(34, 211, 238, .16), rgba(129, 140, 248, .18));
}
.msg-bubble strong { color: var(--text-strong); }
.msg-bubble ul { margin: 6px 0 0; padding-left: 17px; list-style: disc; }
.msg-bubble li { margin-top: 2px; }
.msg-bubble a { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.msg-bubble .msg-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--grad);
  color: #041018;
  font-size: .69rem;
  font-weight: 800;
  text-decoration: none;
}
.msg-bubble .msg-cta .icon { width: 12px; height: 12px; }
.typing { display: inline-flex; align-items: center; gap: 4px; padding: 4px 2px; }
.typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  animation: typingBounce 1.2s infinite ease-in-out;
}
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.ai-chat-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 15px 10px;
}
.ai-chat-suggest button {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: .63rem;
  font-weight: 600;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.ai-chat-suggest button:hover { color: var(--accent); border-color: var(--accent); background: var(--grad-soft); }
.ai-chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
}
.ai-chat-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font-size: .77rem;
}
.ai-chat-form input::placeholder { color: var(--muted-2); }
.ai-chat-form input:focus { outline: none; border-color: var(--accent); }
.ai-chat-form button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--grad);
  color: #041018;
  flex: 0 0 auto;
  transition: opacity .2s ease, transform .2s ease;
}
.ai-chat-form button:hover { transform: translateY(-1px); }
.ai-chat-form button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.ai-chat-form .icon { width: 17px; height: 17px; }
.ai-chat-note { padding: 0 15px 9px; color: var(--muted-2); font-size: .57rem; text-align: center; }

@media (max-width: 1120px) {
  .chart-grid { grid-template-columns: 1fr; }
  .category-progress { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; }
}

@media (max-width: 720px) {
  .chart-grid { margin-top: 14px; }
  .chart-panel { padding: 18px; }
  .chart-highlight-main strong { font-size: 1.62rem; }
  .chart-avg { display: none; }
  .trend-y, .trend-plot { height: 148px; }
  .trend-chart { margin-top: 16px; }
  .category-progress { grid-template-columns: 1fr; }
  .contact-dock { right: 14px; bottom: 14px; gap: 8px; }
  .dock-btn { width: 48px; height: 48px; border-radius: 14px; }
  .dock-btn .icon { width: 20px; height: 20px; }
  .dock-tip { display: none; }
  .to-top { right: 14px; bottom: 76px; }
  .ai-chat {
    right: 10px;
    left: 10px;
    bottom: 76px;
    width: auto;
    height: min(560px, calc(100dvh - 94px));
    border-radius: 18px;
  }
}

@media (max-width: 420px) {
  .chart-highlight { gap: 7px; }
  .chart-delta { font-size: .58rem; }
  .cat-progress-row { grid-template-columns: minmax(0, 1.2fr) minmax(46px, 1fr) 30px; gap: 7px; }
  .cat-progress-name > span { font-size: .63rem; }
  .cat-progress-name small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .trend-line { animation: none; stroke-dashoffset: 0; }
  .trend-area { animation: none; opacity: 1; }
  .trend-dot { animation: none; opacity: 1; }
  .dock-btn.ai::after { animation: none; display: none; }
  .typing i { animation: none; }
}
