:root{
  --bg:#0b1020;

  /* Make “card” and “surfaces” themeable (fixes invisible text in light mode) */
  --card: rgba(16,26,51,.72);
  --surface: rgba(255,255,255,.04);
  --surface2: rgba(255,255,255,.03);
  --dash: rgba(159,176,208,.35);
  --muted:#b3c2e3;
  --text:#eaf0ff;
  --accent:#6ea8fe;
  --accent2:#7ee787;

  --border: rgba(255,255,255,.10);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 18px;
  --max: 1100px;

  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family: var(--sans);
  background: radial-gradient(1200px 700px at 20% -10%, rgba(110,168,254,.25), transparent 60%),
              radial-gradient(1000px 600px at 90% 0%, rgba(126,231,135,.20), transparent 55%),
              var(--bg);
  color: var(--text);
  line-height:1.55;
}

a{color:inherit; text-decoration:none}
a:hover{opacity:.92}

/* Better keyboard accessibility */
a:focus-visible, button:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 18px;
}

.nav{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11,16,32,.72);
  border-bottom: 1px solid var(--border);
}

.nav-inner{
  max-width: var(--max);
  margin:0 auto;
  padding: 14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:700;
  letter-spacing:.2px;
}
.dot{
  width:10px;height:10px;border-radius:999px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  box-shadow: 0 0 16px rgba(110,168,254,.35);
}
.nav-links{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

/* Pills now use themeable surfaces */
.pill{
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
}
.pill.primary{
  border-color: rgba(110,168,254,.45);
  background: rgba(110,168,254,.12);
}
.pill:hover{transform: translateY(-1px); transition: .15s ease}

.hero{
  padding: 42px 0 16px 0;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 18px;
}
@media (max-width: 860px){
  .hero-grid{grid-template-columns:1fr}
}

/* Card background is now themeable */
.card{
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.hero-card{ padding: 22px; }
.kpi-card{ padding: 18px; }

.h-title{
  font-size: 34px;
  line-height:1.15;
  margin: 0 0 10px 0;
  letter-spacing: -.4px;
}
.subtitle{
  color: var(--muted);
  margin: 0 0 14px 0;
  font-size: 16px;
}

.badges{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin: 10px 0 16px 0;
}
.badge{
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.badge strong{font-family: var(--mono); font-weight: 700; font-size: 12px; color: var(--accent)}

.btn-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top: 12px;
}
.btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 10px 14px;
  border-radius: 12px;
  border:1px solid var(--border);
  background: var(--surface);
  font-weight:600;
  font-size: 14px;
}
.btn.primary{
  border-color: rgba(110,168,254,.55);
  background: linear-gradient(90deg, rgba(110,168,254,.20), rgba(126,231,135,.14));
}
.btn:hover{transform: translateY(-1px); transition: .15s ease}

.section{
  padding: 18px 0;
}
.section h2{
  font-size: 20px;
  margin: 0 0 12px 0;
  letter-spacing: -.2px;
}
.muted{color: var(--muted)}

.grid-3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 950px){ .grid-3{grid-template-columns: 1fr 1fr} }
@media (max-width: 620px){ .grid-3{grid-template-columns: 1fr} }

.project{
  overflow:hidden;
}
.project .img{
  width:100%;
  height: 170px;
  background: rgba(255,255,255,.05);
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:center;
  font-family: var(--mono);
  color: rgba(234,240,255,.65);
}
.project img{
  width:100%;
  height:170px;
  object-fit: cover;
  display:block;
}
.project .p-body{ padding: 14px; }
.project h3{ margin:0 0 6px 0; font-size: 16px; }
.project ul{
  margin: 8px 0 0 18px;
  padding:0;
  color: var(--muted);
  font-size: 14px;
}
.project .links{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 12px;
}
.link{
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 999px;
  border:1px solid var(--border);
  background: var(--surface);
}
.link:hover{transform: translateY(-1px); transition: .15s ease}

.two-col{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 860px){ .two-col{grid-template-columns:1fr} }

.table{
  width:100%;
  border-collapse: collapse;
  font-size: 14px;
  color: var(--muted);
}
.table td{
  padding: 10px 10px;
  border-top: 1px solid var(--border);
  vertical-align: top;
}
.table td:first-child{
  width: 190px;
  color: var(--text);
  font-weight: 650;
}

.workflow{
  font-family: var(--mono);
  font-size: 13px;
  border: 1px dashed var(--dash);
  padding: 12px;
  border-radius: 14px;
  background: var(--surface2);
  color: var(--text);            /* <-- IMPORTANT: use theme text */
}


.footer{
  padding: 28px 0 46px 0;
  border-top: 1px solid var(--border);
  margin-top: 26px;
  color: var(--muted);
  font-size: 14px;
}

.small{
  font-size: 13px;
  color: rgba(159,176,208,.92);
}

/* ===== Light Theme Overrides (fully readable) ===== */
body.light{
  --bg:#f7f9fc;
  --dash: rgba(0,0,0,.25);  /* makes dashed border visible in light mode */
  /* Key fix: cards and surfaces become light */
  --card:#ffffff;
  --surface: rgba(0,0,0,.03);
  --surface2: rgba(0,0,0,.02);

  --muted:#4a5568;
  --text:#0b1020;
  --border: rgba(0,0,0,.12);
  --shadow: 0 8px 24px rgba(0,0,0,.10);
}
body.light .small{
  color: var(--muted);
}
/* Nav background for light mode */
body.light .nav{
  background: rgba(247,249,252,.85);
}

/* Optional: improve the placeholder screenshot label color in light mode */
body.light .project .img{
  background: rgba(0,0,0,.03);
  color: rgba(11,16,32,.60);
}


/* ===== Case Study Layout: Full-width media on top, details below ===== */
.case-study-media{
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface2);
}

.case-study-media img{
  width: 100%;
  height: auto;
  max-height: 460px;   /* adjust if you want bigger/smaller */
  object-fit: cover;
  display: block;
}

.case-study-body{
  margin-top: 14px;
}

.case-study-body p{
  margin: 10px 0;
}


/* Impact Snapshot header */
.impact-header { margin: 0 0 10px 0; }
.impact-title { margin: 0; font-size: 18px; }
.impact-subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(159,176,208,.95);
}

/* Stack spacing */
.impact-stack { display: grid; gap: 10px; }

/* Each impact card (matches your existing visual style) */
.impact-item {
  padding: 14px;
  background: rgba(255,255,255,.03);
  border-radius: 14px;
  border: 1px solid var(--border);
}

.impact-kicker {
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(159,176,208,.95);
}

.impact-metric { font-size: 16px; font-weight: 700; }
.impact-desc { font-size: 13px; }

/* Links block spacing */
.impact-links { margin-top: 14px; }
.impact-note {
  margin: 4px 0 12px;
  font-size: 12.5px;
  line-height: 1.4;
  opacity: 0.85;
}
