/* Shakti: a light theme (white background) and a dark theme (black background), black and white only.
   The pages are written for the dark theme; the light theme swaps their colour variables and fixes the few
   places that use a fixed colour. The theme is chosen by data-theme on <html> (see shakti-theme.js). */

/* type inspired by the Raptor site: a tall display face for the big names, an italic serif for the reading text,
   a light monospace for small labels */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Mono:wght@300;400;500&family=Instrument+Serif:ital@0;1&display=swap');

html[data-theme="light"] {
  color-scheme: light;
  /* Shakti overview and project pages */
  --bg: #ffffff;
  --surface: #f5f5f5;
  --surface-highlight: #ebebeb;
  --border: #d6d6d6;
  --text-main: #111111;
  --text-muted: #555555;
  --accent: #000000;
  --ok: #000000;
  --pending: #666666;
  --alert: #000000;
  /* Sentinel Systems page */
  --bg-dark: #ffffff;
  --bg-card: #f5f5f5;
  --bg-hover: #ebebeb;
  --accent-red: #000000;
  --text-white: #111111;
  --text-grey: #555555;
  --border-light: rgba(0, 0, 0, 0.12);
}
html[data-theme="dark"] { color-scheme: dark; }

/* a filled button turns black with white text on hover (it was white with black text) */
html[data-theme="light"] .btn:hover,
html[data-theme="light"] .btn:focus-visible { color: #ffffff; }

/* Sentinel Systems page: places with a fixed colour */
html[data-theme="light"] nav { background: rgba(255, 255, 255, 0.95); }
html[data-theme="light"] .hero { background: #ffffff; }
html[data-theme="light"] .technology { background: #f5f5f5; }
html[data-theme="light"] .hero-tag { border-color: rgba(0, 0, 0, 0.3); background: rgba(0, 0, 0, 0.04); }
html[data-theme="light"] .btn-primary { color: #ffffff; }
html[data-theme="light"] .btn-primary:hover { background-color: #333333; border-color: #333333; }
html[data-theme="light"] .btn-secondary:hover { color: #000000; border-color: #000000; }
html[data-theme="light"] .timeline-container::before { background: rgba(0, 0, 0, 0.15); }

/* Typeface, in the spirit of the Raptor site and without shouting capitals:
     Bebas Neue      the big names (page title, project names, the SHAKTI box)
     Instrument Serif  section titles, the introduction and the descriptions, in sentence case
     DM Mono          small things: buttons, tags, status lines, tables, numbers (normal case, light weight)
   The Sentinel Systems page keeps its own design (its <html> has class "so-alt"). */
html:not(.so-alt) .hero h1 {
  font-family: 'Bebas Neue', 'Inter', sans-serif;
  font-weight: 400;
  font-size: clamp(6rem, 19vw, 15rem);
  line-height: 0.82;
  letter-spacing: 0.02em;
  text-transform: none;
  margin-bottom: 2rem;
}
html:not(.so-alt) .hero p,
html:not(.so-alt) .lead {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  line-height: 1.5;
}
html:not(.so-alt) .section-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-main);
}
html:not(.so-alt) .brand { border: 0; padding: 0; }   /* the name stands on its own, no box */
html:not(.so-alt) .brand,
html:not(.so-alt) .footer-logo {
  font-family: 'Bebas Neue', 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1.6rem;
  letter-spacing: 0.1em;
  text-transform: none;
}
html:not(.so-alt) .project-card h3,
html:not(.so-alt) .pillar h3 {
  font-family: 'Bebas Neue', 'Inter', sans-serif;
  font-weight: 400;
  font-size: 2.1rem;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: none;
}
html:not(.so-alt) .back-link, html:not(.so-alt) .hero-tags, html:not(.so-alt) .hero-tag, html:not(.so-alt) .section-index,
html:not(.so-alt) .pillar .n, html:not(.so-alt) .project-meta, html:not(.so-alt) .btn, html:not(.so-alt) .stat-label,
html:not(.so-alt) .flow-step .n, html:not(.so-alt) .flow-branch strong, html:not(.so-alt) .specs-table,
html:not(.so-alt) .col h3, html:not(.so-alt) .steps li::before, html:not(.so-alt) .status-name,
html:not(.so-alt) .chip, html:not(.so-alt) .cap-metric, html:not(.so-alt) .impact-label, html:not(.so-alt) .so-theme-toggle {
  font-family: 'DM Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.04em;
}
html:not(.so-alt) .btn { font-size: 0.85rem; padding: 0.7rem 1.2rem; }
html:not(.so-alt) .project-card p,
html:not(.so-alt) .pillar p { font-family: 'Instrument Serif', Georgia, serif; font-size: 1.15rem; line-height: 1.5; }
html:not(.so-alt) .project-card .context { font-family: 'Inter', system-ui, sans-serif; font-size: 0.85rem; }

/* Footer: the name and a line on the left, link columns, then the copyright and the notice. Follows the theme. */
html:not(.so-alt) footer.so-sfooter {
  margin-top: 5rem; padding: 4rem 0 2rem;
  border-top: 1px solid var(--border);
  text-align: left; color: var(--text-muted); font-size: 0.9rem;
}
.so-sfooter-grid { display: grid; grid-template-columns: 1.6fr 1.1fr 0.9fr 1fr 1.1fr; gap: 2.5rem; }
.so-sf-name {
  display: inline-block; text-decoration: none; color: var(--text-main);
  font-family: 'Bebas Neue', 'Inter', sans-serif; font-size: 2.2rem; letter-spacing: 0.1em; line-height: 1;
}
.so-sf-line {
  margin: 1rem 0 0; max-width: 280px;
  font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-size: 1.25rem; line-height: 1.4; color: var(--text-muted);
}
.so-sf-by { margin: 1rem 0 0; font-family: 'DM Mono', ui-monospace, monospace; font-size: 0.78rem; color: var(--text-muted); }
.so-sf-col h4 {
  margin: 0 0 1.1rem; font-family: 'DM Mono', ui-monospace, monospace; font-weight: 500;
  font-size: 0.85rem; letter-spacing: 0.04em; color: var(--text-main);
}
.so-sf-col a {
  display: block; margin: 0 0 0.7rem; text-decoration: none; color: var(--text-muted);
  font-family: 'DM Mono', ui-monospace, monospace; font-size: 0.85rem; line-height: 1.4; transition: color 0.2s ease;
}
.so-sf-col a:hover, .so-sf-col a:focus-visible { color: var(--text-main); }
.so-sf-bottom {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); text-align: center;
  font-family: 'DM Mono', ui-monospace, monospace; font-size: 0.78rem; line-height: 1.8; color: var(--text-muted);
}
.so-sf-bottom p { margin: 0 auto; max-width: 760px; }
@media (max-width: 900px) {
  .so-sfooter-grid { grid-template-columns: 1fr 1fr; }
  .so-sf-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) { .so-sfooter-grid { grid-template-columns: 1fr; } }

/* the theme button, placed next to the page name in the top bar */
.so-nav-end { display: flex; align-items: center; gap: 0.75rem; }
.so-theme-toggle {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.so-theme-toggle:hover, .so-theme-toggle:focus-visible { opacity: 1; background: var(--text-main, var(--text-white, #fff)); color: var(--bg, var(--bg-dark, #000)); }
