/* =========================================================================
   INNER PAGES (About, Projects, project dashboards)
   Same visual language as the home page: glass cards over the blurred painting,
   forest-green accents and cream emblems. Change colors in :root and every page follows.
   ========================================================================= */
:root{
  color-scheme:light;
  --ink:#1e3319; --ink-2:#44583c; --ink-3:#5f6f56;
  --accent:#2f5428; --accent-hover:#24411f; --g-mid:#7b9a5a; --g-light:#b8c995; --cream:#ece9d4;
  --glass:rgba(250,250,240,.7); --glass-strong:rgba(252,252,244,.88);
  --edge:rgba(255,255,255,.9);
  --shadow:0 1px 0 rgba(255,255,255,.9) inset, 0 2px 6px rgba(24,44,20,.08), 0 18px 40px -16px rgba(24,44,20,.30);
  --radius:22px;

  /* --- chart colors (validated for color-blind readers; keep this order) --- */
  --surface-1:#fcfcfb;
  --text-primary:#0b0b0b; --text-secondary:#52514e; --muted:#898781;
  --grid:#e1e0d9; --axis:#c3c2b7;
  --series-1:#2a78d6; --series-2:#eb6834; --series-3:#1baf7a; --series-4:#eda100;
  --good:#0ca30c; --good-text:#006300; --critical:#d03b3b;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
@media (prefers-reduced-motion: reduce){html{scroll-behavior:auto}}
body{min-height:100vh;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);
  background:#dfe8d2;-webkit-font-smoothing:antialiased;line-height:1.6;padding-bottom:120px}
body::before{content:"";position:fixed;inset:-60px;z-index:-1;
  background:url(../assets/bg-desktop.webp) center/cover no-repeat;filter:blur(26px) saturate(1.15);opacity:.85}
body::after{content:"";position:fixed;inset:0;z-index:-1;background:linear-gradient(180deg,rgba(250,250,240,.3),rgba(246,244,230,.62))}
a{color:var(--accent)}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
img{max-width:100%;display:block}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

.wrap{width:min(1120px,100% - 32px);margin-inline:auto}

/* ---------- header ---------- */
.top{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 0 10px}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink);font-weight:700;letter-spacing:-.01em}
.brand img{width:38px;height:38px;border-radius:50%}
.brand small{display:block;font-weight:500;color:var(--ink-3);font-size:12px;letter-spacing:0}
.top .cta{font-size:13px;font-weight:600;text-decoration:none;padding:9px 16px;border-radius:999px;
  background:var(--accent);color:#fff;box-shadow:0 6px 16px -6px rgba(24,44,20,.5);white-space:nowrap;color:var(--cream)}
.top .cta:hover{background:var(--accent-hover)}

/* ---------- glass ---------- */
.glass{background:var(--glass);border:1px solid var(--edge);border-radius:var(--radius);box-shadow:var(--shadow);
  -webkit-backdrop-filter:blur(20px) saturate(1.6);backdrop-filter:blur(20px) saturate(1.6)}
.panel{padding:clamp(18px,3vw,32px);margin-top:18px}

/* ---------- type ---------- */
.eyebrow{font-size:12px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-3)}
h1{font-size:clamp(28px,4.4vw,44px);line-height:1.12;letter-spacing:-.025em;margin:6px 0 10px;text-wrap:balance}
h2{font-size:clamp(20px,2.4vw,26px);line-height:1.2;letter-spacing:-.015em;margin-bottom:10px;text-wrap:balance}
h3{font-size:17px;line-height:1.3;margin-bottom:6px}
p{color:var(--ink-2);max-width:72ch}
p + p{margin-top:10px}
.lead{font-size:clamp(15px,1.6vw,17px)}
ul.clean{list-style:none}
.prose ul{padding-left:20px;color:var(--ink-2)} .prose li{margin:4px 0}

/* "sample data" label */
.notice{display:flex;gap:10px;align-items:flex-start;margin-top:14px;padding:10px 14px;border-radius:14px;
  background:rgba(250,178,25,.16);border:1px solid rgba(201,133,0,.35);font-size:13px;color:#5a4300}
.notice svg{flex:none;width:18px;height:18px;margin-top:2px;stroke:#8a6300;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* tags */
.tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.tag{font-size:12px;font-weight:500;padding:4px 10px;border-radius:999px;background:rgba(255,255,255,.8);
  border:1px solid rgba(30,51,25,.08);color:var(--ink-2)}

/* ---------- grid ---------- */
.grid{display:grid;gap:16px}
.grid-2{grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr))}
.grid-3{grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr))}

/* ---------- filter ---------- */
.toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:16px}
.seg{display:inline-flex;flex-wrap:wrap;gap:4px;padding:4px;border-radius:999px;background:rgba(255,255,255,.6);border:1px solid var(--edge)}
.seg button{font:inherit;font-size:13px;font-weight:600;border:0;background:transparent;color:var(--ink-2);
  padding:7px 14px;border-radius:999px;cursor:pointer;min-height:36px}
.seg button[aria-pressed="true"]{background:var(--accent);color:var(--cream);box-shadow:0 4px 12px -4px rgba(24,44,20,.45)}
.search{flex:1;min-width:200px;font:inherit;font-size:14px;padding:9px 14px;border-radius:999px;
  border:1px solid rgba(30,51,25,.16);background:rgba(255,255,255,.85);color:var(--ink);min-height:40px}
select.select{font:inherit;font-size:14px;padding:8px 12px;border-radius:12px;border:1px solid rgba(30,51,25,.16);background:#fff;color:var(--ink);min-height:40px}

/* ---------- project cards ---------- */
.card{display:flex;flex-direction:column;text-decoration:none;color:inherit;overflow:hidden;transition:transform .25s,box-shadow .25s}
.card:hover{transform:translateY(-3px);box-shadow:0 1px 0 #fff inset,0 24px 50px -18px rgba(24,44,20,.45)}
.card .thumb{height:150px;position:relative;display:grid;place-items:center;background:
  radial-gradient(120% 120% at 30% 10%,#f4f2e2 0%,var(--cream) 55%,#dcd8bc 100%);border-bottom:1px solid rgba(30,51,25,.08)}
.card .thumb svg.em{width:92px;height:92px;filter:drop-shadow(0 6px 14px rgba(24,44,20,.28))}
.card .body{padding:16px 18px 18px;display:flex;flex-direction:column;gap:4px;flex:1}
.card .body p{font-size:14px}
.card .more{margin-top:auto;padding-top:10px;font-size:13px;font-weight:600;color:var(--accent)}
.card.soon{opacity:.75}
.empty{padding:28px;text-align:center;color:var(--ink-3)}

/* ---------- stat tile ---------- */
.stats{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));margin-top:16px}
.stat{padding:14px 16px;border-radius:16px;background:var(--glass-strong);border:1px solid var(--edge)}
.stat .k{font-size:12px;color:var(--ink-3);font-weight:500}
.stat .v{font-size:26px;font-weight:700;letter-spacing:-.02em;color:var(--text-primary);line-height:1.2;margin-top:2px}
.stat .v small{font-size:13px;font-weight:500;color:var(--ink-3);margin-left:3px}
.stat .d{font-size:12px;color:var(--ink-3);margin-top:2px}

/* ---------- charts ---------- */
.chart-card{background:var(--surface-1);border-radius:18px;border:1px solid rgba(11,11,11,.08);padding:14px 14px 6px;margin-top:16px}
.chart-card h3{font-size:15px;margin:2px 4px 0}
.chart-card .sub{font-size:12.5px;color:var(--text-secondary);margin:2px 4px 6px}
.chart{width:100%;height:340px}
.chart.tall{height:400px}
.legend{display:flex;flex-wrap:wrap;gap:14px;margin:6px 4px 4px;font-size:12.5px;color:var(--text-secondary)}
.legend span{display:inline-flex;align-items:center;gap:6px}
.legend i{width:12px;height:12px;border-radius:3px;display:inline-block}
.legend i.line{height:2px;border-radius:0;width:16px}
.legend i.dash{height:0;border-top:2px dashed var(--muted);width:16px;border-radius:0}
details.table-view{margin:8px 4px 10px;font-size:13px}
details.table-view summary{cursor:pointer;color:var(--accent);font-weight:600}
.table-scroll{overflow-x:auto;margin-top:8px}
table{border-collapse:collapse;width:100%;font-size:13px;font-variant-numeric:tabular-nums}
th,td{padding:7px 10px;text-align:right;border-bottom:1px solid var(--grid);white-space:nowrap}
th:first-child,td:first-child{text-align:left}
th{color:var(--text-secondary);font-weight:600;background:rgba(0,0,0,.02)}
.ok{color:var(--good-text);font-weight:600}
.bad{color:var(--critical);font-weight:600}
.badge-st{display:inline-flex;align-items:center;gap:4px}

/* ---------- map ---------- */
#map{height:min(70vh,560px);border-radius:18px;overflow:hidden;border:1px solid rgba(11,11,11,.08);margin-top:16px;background:#e4ead8}
.map-legend{display:flex;flex-wrap:wrap;gap:14px;font-size:12.5px;color:var(--text-secondary);margin-top:10px}
.map-legend span{display:inline-flex;align-items:center;gap:6px}
.dot{width:12px;height:12px;border-radius:50%;display:inline-block;border:2px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.2)}
.sq{width:12px;height:12px;border-radius:3px;display:inline-block;border:2px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.2)}
.leaflet-popup-content{font-family:Inter,system-ui,sans-serif;font-size:13px;line-height:1.45;color:var(--ink)}
.leaflet-popup-content b{font-size:14px}

/* ---------- about ---------- */
.profile{display:grid;grid-template-columns:auto 1fr;gap:24px;align-items:center}
.avatar{width:132px;height:132px;border-radius:50%;padding:6px;background:rgba(250,250,240,.7);box-shadow:var(--shadow)}
.avatar img{width:100%;height:100%;border-radius:50%;object-fit:cover;filter:contrast(.9) saturate(.88) brightness(1.05) sepia(.06)}
@media (max-width:560px){.profile{grid-template-columns:1fr}.avatar{width:104px;height:104px}}
.timeline{list-style:none;border-left:2px solid rgba(47,84,40,.25);padding-left:18px;margin-top:6px}
.timeline li{position:relative;padding:4px 0 14px}
.timeline li::before{content:"";position:absolute;left:-25px;top:10px;width:12px;height:12px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 3px #fff}
.timeline .when{font-size:12px;color:var(--ink-3);font-weight:600}

/* ---------- dock (bottom menu, same as home) ---------- */
.dock{position:fixed;left:50%;bottom:max(14px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:40;
  width:min(420px,100% - 28px);height:68px;padding:6px;display:flex;gap:4px;border-radius:999px}
.dock a{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;text-decoration:none;
  color:var(--ink-2);font-size:11.5px;font-weight:600;border-radius:999px;transition:background .2s}
.dock a:hover{background:rgba(255,255,250,.5)}
.dock svg{width:22px;height:22px;fill:none;stroke:var(--accent);stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.dock a.on{background:var(--accent);color:var(--cream);box-shadow:0 1px 0 rgba(255,255,255,.25) inset,0 6px 16px -4px rgba(24,44,20,.5)}
.dock a.on svg{stroke:var(--cream)}

footer{margin-top:28px;font-size:12.5px;color:var(--ink-3);text-align:center}
footer a{color:inherit}
.back{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:600;text-decoration:none;margin-top:8px}
