/* divyam.top shared theme for the satellite pages (blog, security, control/products/pricing).
   SOURCE OF TRUTH: shared/theme.css. Copies live at:
     site/assets/css/theme.css           (served at https://divyam.top/assets/css/theme.css; control, products, pricing, blog link to it)
     secstats/style.css (prepended)      (security.divyam.top embeds its own copy; the Go binary serves /style.css)
   Tokens, fonts and components mirror portfolio-next/src/app/globals.css so every page reads as one site.
   Theme: <html data-theme="dark|light">, set before paint by theme.js (dark is the default). */

:root {
  color-scheme: light;
  --c-bg: #f4f6fb; --c-surface: #ffffff; --c-surface-alt: #f0f3f9; --c-border: #e4eaf2; --c-border-ui: #828fa0;
  --c-text: #2d3748; --c-heading: #1a202c; --c-muted: #4a5568;
  --c-accent: #1a40d8; --c-accent-light: #2563eb; --c-accent-2: #c4501e; --c-success: #10b981; --c-dot-green: #16a34a;
  --c-warning: #eab308; --c-error: #dc2626;
  --c-nav-hover: #1a40d80f; --c-nav-active: #1a40d814;
  --c-shadow-sm: #18274b0d; --c-shadow-md: #18274b1a; --c-shadow-lg: #18274b2e;
  --c-cube-a: #c4501e; --c-cube-b: #1a40d8; --cube-opacity: .22;
  --font-sans: "Poppins", system-ui, sans-serif;
  --font-display: "Space Grotesk", "Poppins", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
  --radius-card: 1rem;
  --shadow-surface: 0 1px 3px var(--c-shadow-sm), 0 4px 12px var(--c-shadow-sm);
  --shadow-raised: 0 4px 20px var(--c-shadow-md);
}
[data-theme="dark"] {
  color-scheme: dark;
  --c-bg: #0d0e12; --c-surface: #16181f; --c-surface-alt: #1e2129; --c-border: #2a2e3a; --c-border-ui: #6e7a96;
  --c-text: #c8cdd8; --c-heading: #f0f1f5; --c-muted: #8b8fa3;
  --c-accent: #5b8def; --c-accent-light: #7fa3f0; --c-accent-2: #ff965d; --c-success: #34d399; --c-dot-green: #4ade80;
  --c-warning: #fbbf24; --c-error: #f87171;
  --c-nav-hover: #5b8def14; --c-nav-active: #5b8def24;
  --c-shadow-sm: #03061247; --c-shadow-md: #0306126b; --c-shadow-lg: #03061299;
  --c-cube-a: #ff965d; --c-cube-b: #3b9fea; --cube-opacity: .38;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; scrollbar-gutter: stable; }
body {
  margin: 0; min-height: 100dvh; overflow-x: clip;
  background: var(--c-bg); color: var(--c-text);
  font: 400 16px/1.65 var(--font-sans); -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--c-heading); margin: 0; line-height: 1.25; }
a { color: var(--c-accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--c-accent-light); }
code, kbd, pre, .mono { font-family: var(--font-mono); }
::selection { background: var(--c-accent); color: #fff; }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }

/* ---------- backdrop ---------- */
.geo { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.geo svg { position: absolute; width: 380px; opacity: var(--cube-opacity); }
.geo svg:first-child { left: -96px; top: -64px; }
.geo svg:last-child { right: -112px; bottom: -96px; transform: rotate(180deg); }
@media (min-width: 768px) { .geo svg { width: 540px; } }

/* ---------- shell ---------- */
.shell { position: relative; z-index: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 16px 16px 40px; }
@media (min-width: 768px) { .shell { padding: 32px 24px 40px; } }
.card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-card); box-shadow: var(--shadow-surface); }
.layout { display: grid; gap: 20px; margin-top: 20px; }
@media (min-width: 768px) { .layout { grid-template-columns: 228px minmax(0, 1fr); gap: 24px; margin-top: 24px; } }
.content { padding: 24px 20px; min-width: 0; }
@media (min-width: 768px) { .content { padding: 32px; } }
.label-mono { font: 500 .6875rem/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--c-muted); margin: 0; }

/* ---------- header card ---------- */
.hcard { display: flex; align-items: center; gap: 16px; padding: 16px; }
@media (min-width: 768px) { .hcard { gap: 24px; padding: 20px 28px; } }
.hcard-id { display: flex; align-items: center; gap: 14px; min-width: 0; color: inherit; }
.hcard-id:hover { color: inherit; }
.hcard-avatar { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex: none; outline: 2px solid color-mix(in srgb, var(--c-accent) 70%, transparent); outline-offset: 2px; }
@media (min-width: 768px) { .hcard-avatar { width: 72px; height: 72px; border-radius: 16px; } }
.hcard-name { display: block; font-size: 1.125rem; line-height: 1.2; color: var(--c-heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcard-name b { font-weight: 600; } .hcard-name span { font-weight: 300; }
@media (min-width: 768px) { .hcard-name { font-size: 1.45rem; } }
.hcard-role { display: block; font-size: .8125rem; color: var(--c-muted); }
.hcard-avail { display: none; flex: 1; min-width: 0; align-items: center; }
@media (min-width: 768px) { .hcard-avail { display: flex; } }
.hcard-avail .vr { width: 1px; height: 56px; background: var(--c-border); margin: 0 8px; }
.hcard-avail div { padding: 0 16px; min-width: 0; }
.hcard-avail .line { margin: 6px 0 0; display: flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 500; color: var(--c-heading); }
.hcard-sub { margin: 4px 0 0; font: .6875rem/1.4 var(--font-mono); color: var(--c-muted); }
.hcard-actions { display: none; flex-direction: column; align-items: flex-end; gap: 10px; }
@media (min-width: 768px) { .hcard-actions { display: flex; } }
.hcard-social { display: flex; gap: 2px; }
.hcard-social a { display: inline-flex; padding: 6px; border-radius: 6px; color: var(--c-muted); }
.hcard-social a:hover { color: var(--c-accent); }
.hcard-cv-sm { margin-left: auto; }
@media (min-width: 768px) { .hcard .hcard-cv-sm { display: none; } }
.dot-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c-dot-green); animation: pulse-dot 2.2s ease-out infinite; }
@keyframes pulse-dot { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c-dot-green) 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- sidebar ---------- */
.side { padding: 12px; align-self: start; }
@media (min-width: 768px) { .side { position: sticky; top: 24px; padding: 16px 12px; } }
.side ul { list-style: none; margin: 0; padding: 0; }
.side .group { margin: 0; }
.side .group + .group { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--c-border); }
.side .group-label { padding: 0 12px 6px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; font: 500 .6875rem/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--c-muted); transition: background-color .15s ease, color .15s ease; }
.nav-item:hover { background: var(--c-nav-hover); color: var(--c-heading); }
.nav-item.is-active { background: var(--c-nav-active); color: var(--c-accent); }
.nav-item.is-active::before { content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 2px; background: var(--c-accent); }
.nav-item svg { width: 16px; height: 16px; flex: none; }
.nav-item .ext { margin-left: auto; width: 12px; height: 12px; opacity: .6; }
.side .hr { height: 1px; background: var(--c-border); margin: 14px 0; }
.side .auth-links { display: flex; gap: 8px; margin-top: 10px; }
.side .auth-links .nav-btn { flex: 1; justify-content: center; padding: 6px 8px; }
@media (max-width: 767px) {
  /* phone: the sidebar sits above the content and each nav group becomes a wrapping row of
     chips. min-width: 0 matters: as a grid item the aside otherwise takes its min-content
     width (the unwrapped row) and pushes the whole column past the viewport. */
  .layout > * { min-width: 0; }
  .side .group { display: flex; flex-wrap: wrap; gap: 2px; }
  .side .group + .group { margin-top: 6px; padding-top: 6px; }
  .side .group-label { display: none; }
  .nav-item { padding: 7px 10px; white-space: nowrap; }
  .nav-item.is-active::before { display: none; }
  .side .hr { margin: 10px 0; }
}

/* ---------- content primitives ---------- */
.page-title { font-size: 1.75rem; font-weight: 700; margin: 0 0 20px; }
@media (min-width: 768px) { .page-title { font-size: 2rem; } }
.page-title .dot { color: var(--c-accent); }
.page-title::after { content: ""; display: block; width: 40px; height: 3px; border-radius: 2px; background: var(--c-accent); margin-top: 12px; }
.lede { max-width: 66ch; margin: 0 0 20px; color: var(--c-text); font-size: .9375rem; }
@media (min-width: 768px) { .lede { font-size: 1rem; } }
.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--c-border); }
.section-h h2 { font-size: 1.125rem; font-weight: 600; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; padding: 8px 14px; border: 1px solid var(--c-border); border-radius: 8px; font: 500 .8125rem/1.3 var(--font-sans); color: var(--c-text); background: transparent; cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.btn:hover { border-color: var(--c-border-ui); color: var(--c-heading); }
.btn-outline { border-color: var(--c-accent); color: var(--c-accent); }
.btn-outline:hover { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.btn-solid { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.btn-solid:hover { filter: brightness(1.08); color: #fff; }
.btn-danger { border-color: color-mix(in srgb, var(--c-error) 60%, transparent); color: var(--c-error); }
.btn-danger:hover { background: var(--c-error); color: #fff; }
.nav-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--c-border); border-radius: 8px; font: 500 .6875rem/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--c-text); }
.nav-btn:hover { border-color: var(--c-border-ui); color: var(--c-heading); }
.nav-btn-primary { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.nav-btn-primary:hover { color: #fff; filter: brightness(1.08); }
.chip { display: inline-flex; align-items: center; padding: 2px 8px; border: 1px solid var(--c-border); border-radius: 6px; background: var(--c-surface-alt); font: .6875rem/1.5 var(--font-mono); color: var(--c-text); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 1024px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { padding: 16px; border: 1px solid var(--c-border); border-radius: 12px; background: var(--c-surface-alt); }
.tile .num { font: 700 1.75rem/1 var(--font-display); color: var(--c-heading); }
.tile .lbl { margin-top: 8px; font: 500 .6875rem/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--c-muted); }
.sub { border: 1px solid var(--c-border); border-radius: 12px; background: color-mix(in srgb, var(--c-surface-alt) 60%, transparent); padding: 18px; }
.sub + .sub, .sub + .tiles, .tiles + .sub { margin-top: 14px; }
.sub h2 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 10px; }
.sub.notice { border-color: var(--c-warning); }
.icon-tile { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: color-mix(in srgb, var(--c-accent) 14%, transparent); color: var(--c-accent); flex: none; font-size: 20px; }
.muted { color: var(--c-muted); } .small { font-size: .8125rem; }
.ok { color: var(--c-success); } .warn { color: var(--c-warning); } .down { color: var(--c-error); }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
td, th { padding: 7px 8px; text-align: left; vertical-align: middle; }
th { font: 500 .6875rem/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--c-muted); border-bottom: 1px solid var(--c-border); }
tbody tr + tr td, .plain tr + tr td { border-top: 1px solid var(--c-border); }
td.n { text-align: right; color: var(--c-heading); font-variant-numeric: tabular-nums; white-space: nowrap; }
pre { overflow-x: auto; padding: 14px 16px; border: 1px solid var(--c-border); border-radius: 10px; background: var(--c-surface-alt); font-size: .8125rem; line-height: 1.55; }
code:not(pre code) { padding: .1em .4em; border-radius: 5px; background: var(--c-surface-alt); border: 1px solid var(--c-border); font-size: .875em; color: var(--c-heading); }
hr { border: 0; height: 1px; background: var(--c-border); margin: 24px 0; }
.foot { margin-top: 24px; text-align: center; font-size: .8125rem; color: var(--c-muted); }
.foot a { color: var(--c-muted); } .foot a:hover { color: var(--c-accent); }
.foot p { margin: 4px 0; }
input, select, textarea { font: inherit; color: var(--c-text); background: var(--c-surface-alt); border: 1px solid var(--c-border); border-radius: 8px; padding: 8px 10px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--c-accent); outline-offset: 1px; }

/* theme toggle label swap (shell) */
[data-theme-toggle] .t-light, [data-theme-toggle] svg:first-child { display: none; }
[data-theme="dark"] [data-theme-toggle] .t-light, [data-theme="dark"] [data-theme-toggle] svg:first-child { display: inline-flex; }
[data-theme="dark"] [data-theme-toggle] .t-dark, [data-theme="dark"] [data-theme-toggle] svg:nth-child(3) { display: none; }
[data-theme-toggle] svg { width: 14px; height: 14px; }
