/* STRUCONS — Capabilities Profile
   Static implementation of the Claude Design "Strucons Profile" layout, with a
   dark / light theme toggle driven by CSS custom properties.

   Dark theme  — deep-blue ground (#0E2436) with a faint engineering grid,
                 outlined cards, yellow #E6C100 accent, cyan #7CC4DF labels.
   Light theme — alternating white / grey (#E8E9EC) bands, dark header & stats,
                 blue (#1C5C8C) card accents, same yellow keystone. */

* { box-sizing: border-box; }

body { margin: 0; }

/* ── Theme tokens ───────────────────────────────────────── */
:root,
[data-theme="dark"] {
  color-scheme: dark;

  --accent: #E6C100;            /* yellow keystone        */
  --label: #7CC4DF;             /* cyan mono labels       */
  --page-bg: #0E2436;
  --page-grid: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
               linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);

  --text: #E6EFF4;
  --text-strong: #ffffff;
  --text-muted: #b7c6d0;
  --text-dim: #9fb3c0;
  --text-faint: #8ea3b0;

  --hairline: rgba(255,255,255,0.14);
  --border: rgba(255,255,255,0.13);
  --surface: rgba(255,255,255,0.02);

  /* sections share the page ground in dark mode */
  --band-a: transparent;
  --band-b: transparent;

  --nav-height: 60px;
  --nav-bg: rgba(10, 27, 42, 0.92);   /* solid dark ground for the fixed bar */
  --header-bg: transparent;
  --header-text: var(--text);
  --header-domain: var(--label);
  --header-tag: var(--text-dim);

  --card-accent: var(--label);  /* number chip border / step number */
  --card-top: transparent;      /* light-mode top stripe (off in dark) */
  --num-border: var(--label);

  --chip-border: rgba(124,196,223,0.45);
  --chip-bg: transparent;
  --chip-text: #cfe2ec;

  --project-photo: repeating-linear-gradient(45deg,
      rgba(255,255,255,0.04), rgba(255,255,255,0.04) 10px,
      rgba(255,255,255,0.07) 10px, rgba(255,255,255,0.07) 20px);
  --project-photo-text: #7e93a0;

  --stats-bg: transparent;
  --stats-text: var(--text-strong);
  --stats-label: var(--text-dim);
  --stats-border: rgba(255,255,255,0.13);

  --footer-bg: #0A1B2A;
  --footer-text: var(--text-muted);
  --footer-link: #cfe2ec;
  --footer-bottom: #5e7382;
}

[data-theme="light"] {
  color-scheme: light;

  --accent: #E6C100;
  --label: #1C5C8C;             /* blue replaces cyan as the link/label colour */
  --page-bg: #E8E9EC;
  --page-grid: none;

  --text: #1A1C20;
  --text-strong: #1A1C20;
  --text-muted: #4c4f56;
  --text-dim: #8a8d94;
  --text-faint: #5a5d64;

  --hairline: #d4d6db;
  --border: #d4d6db;
  --surface: #ffffff;

  /* alternating bands: white hero/standards/approach, grey caps/sectors/projects */
  --band-a: #ffffff;
  --band-b: #E8E9EC;

  --nav-height: 60px;
  --nav-bg: rgba(26, 28, 32, 0.95);   /* dark nav bar in light mode too */
  --header-bg: #1A1C20;
  --header-text: #ffffff;
  --header-domain: #7FB2D8;
  --header-tag: #b9bbc1;

  --card-accent: #1C5C8C;
  --card-top: #1C5C8C;
  --num-border: #1C5C8C;

  --chip-border: #d4d6db;
  --chip-bg: #ffffff;
  --chip-text: #3a3d44;

  --project-photo: repeating-linear-gradient(45deg,
      #dddee2, #dddee2 10px, #e7e8eb 10px, #e7e8eb 20px);
  --project-photo-text: #9a9da4;

  --stats-bg: #1A1C20;
  --stats-text: #7FB2D8;
  --stats-label: #b9bbc1;
  --stats-border: #2c2e34;

  --footer-bg: #101216;
  --footer-text: #b9bbc1;
  --footer-link: #dfe2e6;
  --footer-bottom: #6a6d74;
}

/* ── Page ───────────────────────────────────────────────── */
.page {
  background: var(--page-bg);
  background-image: var(--page-grid);
  background-size: 32px 32px;
  min-height: 100vh;
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 52px);
}

/* ── Theme toggle (lives inside the fixed nav) ──────────── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--header-text);
  background: transparent;
  border: 1px solid currentColor;
  opacity: 0.85;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { opacity: 1; border-color: var(--accent); }
.theme-toggle .toggle-key {
  width: 9px; height: 9px; background: var(--accent); display: inline-block;
}

/* ── Header (fixed nav) ─────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  /* the dark theme has a transparent header; give the fixed bar a solid ground
     so page content doesn't show through as it scrolls underneath. */
  background: var(--nav-bg);
  color: var(--header-text);
  border-bottom: 1px solid var(--hairline);
  backdrop-filter: blur(8px);
}
.site-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px clamp(20px, 5vw, 52px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.header-right {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 22px);
  flex-wrap: wrap;
}

/* push all page content below the fixed bar */
.page { padding-top: var(--nav-height); }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 13px; height: 13px; background: var(--accent); display: inline-block; }
.brand-name { font-weight: 600; font-size: 22px; letter-spacing: 0.06em; }
.brand-domain {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--header-domain);
  letter-spacing: 0.12em;
}
.header-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--header-tag);
  text-transform: uppercase;
}

/* ── Bands (light mode paints alternating section backgrounds) ── */
.band-a { background: var(--band-a); }
.band-b { background: var(--band-b); }

/* ── Hero ───────────────────────────────────────────────── */
.hero { padding: clamp(48px, 8vw, 84px) 0 clamp(40px, 6vw, 60px); }

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--label);
  text-transform: uppercase;
  margin-bottom: 22px;
}
.hero-title {
  margin: 0;
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.06;
  font-weight: 500;
  max-width: 900px;
  letter-spacing: -0.01em;
}
.hero-cols {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 56px);
  margin-top: 32px;
  max-width: 900px;
}
.hero-lead { margin: 0; flex: 1 1 280px; font-size: 16px; line-height: 1.65; color: var(--text-muted); }
.hero-lead.ar { font-family: 'IBM Plex Sans Arabic', sans-serif; font-size: 15px; line-height: 1.85; }

/* ── Section scaffolding ────────────────────────────────── */
.section {
  padding: clamp(40px, 6vw, 64px) 0;
  border-top: 1px solid var(--hairline);
}
/* in light mode the bands already separate sections; drop the hairline */
[data-theme="light"] .section,
[data-theme="light"] .hero { border-top: none; }

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.dot { width: 9px; height: 9px; background: var(--accent); display: inline-block; }
.section-kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--label);
}
.section-kicker-ar { font-family: 'IBM Plex Sans Arabic', sans-serif; font-size: 14px; color: var(--text-dim); }
.section-intro { margin: 0 0 30px; max-width: 680px; font-size: 15.5px; line-height: 1.6; color: var(--text-muted); }

.card-ar { font-family: 'IBM Plex Sans Arabic', sans-serif; font-size: 13px; color: var(--text-dim); margin-top: 2px; }

/* ── Capabilities cards ─────────────────────────────────── */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 14px;
}
.card-row {
  border: 1px solid var(--border);
  border-top: 3px solid var(--card-top, var(--border));
  padding: 22px 24px;
  display: flex;
  gap: 16px;
  align-items: baseline;
  background: var(--surface);
}
.num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--card-accent);
  border: 1px solid var(--num-border);
  padding: 2px 6px;
  flex: none;
}
.card-title { font-size: 18px; font-weight: 600; }
.card-desc { font-size: 13.5px; line-height: 1.55; color: var(--text-faint); margin-top: 8px; }

/* ── Approach / steps ───────────────────────────────────── */
.grid-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.step {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 22px 20px;
}
.step-no { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--card-accent); }
.step-name { font-size: 16px; font-weight: 600; margin-top: 10px; line-height: 1.2; }
.step-desc { font-size: 12.5px; line-height: 1.5; color: var(--text-faint); margin-top: 9px; }

/* the dark theme used the yellow accent for step numbers; keep that flavour */
[data-theme="dark"] .step-no { color: var(--accent); }

/* ── Sectors chips ──────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 9px 14px;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  color: var(--chip-text);
}

/* ── Standards / codes ──────────────────────────────────── */
.grid-codes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.code-card { border: 1px solid var(--border); padding: 16px 18px; background: var(--surface); }
.code-name { font-size: 17px; font-weight: 600; }
.code-region {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--card-accent);
  letter-spacing: 0.08em;
  margin-top: 5px;
}

/* ── Projects ───────────────────────────────────────────── */
.grid-projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.project-photo {
  height: 180px;
  border: 1px solid var(--border);
  background: var(--project-photo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--project-photo-text);
  letter-spacing: 0.08em;
}
.project-name { font-size: 16px; font-weight: 600; margin-top: 12px; }
.project-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 4px;
  letter-spacing: 0.03em;
}

/* ── Stats ──────────────────────────────────────────────── */
.stats-section {
  padding: clamp(8px, 2vw, 16px) 0 0;
  background: transparent;
}
[data-theme="light"] .stats-section { background: var(--stats-bg); padding: 0; }
[data-theme="light"] .stats-section .container { padding-left: 0; padding-right: 0; max-width: 1240px; }

.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border-top: 1px solid var(--stats-border);
  border-left: 1px solid var(--stats-border);
}
[data-theme="light"] .grid-stats { border-top: none; border-left: none; }
.stat {
  padding: 34px 26px;
  border-right: 1px solid var(--stats-border);
  border-bottom: 1px solid var(--stats-border);
}
.stat-num { font-size: clamp(36px, 4.5vw, 48px); font-weight: 600; letter-spacing: -0.02em; color: var(--stats-text); line-height: 1; }
.stat-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--stats-label);
  margin-top: 10px;
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  margin-top: clamp(48px, 7vw, 80px);
  background: var(--footer-bg);
  border-top: 1px solid var(--hairline);
}
.site-footer .container { padding: clamp(40px, 6vw, 64px) clamp(20px, 5vw, 52px); }

.footer-cols { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; align-items: flex-start; }
.footer-brand { flex: 1 1 280px; }
.footer-name { font-size: 24px; color: var(--footer-link); }
.footer-tagline { margin: 18px 0 0; max-width: 380px; font-size: 15px; line-height: 1.6; color: var(--footer-text); }
.footer-block { flex: 1 1 220px; }
.footer-head {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--header-domain);
  margin-bottom: 14px;
}
.footer-contact { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--footer-link); line-height: 2; }
.footer-contact a { color: var(--footer-link); text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }
.footer-coverage { font-family: 'IBM Plex Sans', sans-serif; font-size: 14px; color: var(--footer-link); line-height: 1.9; }
.footer-coverage-codes { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--footer-bottom); letter-spacing: 0.06em; }
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--stats-border);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--footer-bottom);
  letter-spacing: 0.06em;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* footer brand name follows the white footer text, not the body text colour */
.footer-name { color: #ffffff; }
