
:root {
  --bg-primary: #05070C;
  --bg-elevated: #0A0D14;
  --bg-card: rgba(16, 20, 28, 0.75);
  --border: #161C2B;
  --border-bright: #232D40;
  --hairline: rgba(232, 236, 242, 0.12);
  --text-primary: #E8ECF2;
  --text-secondary: #B5BFD0;
  --text-muted: #8793A8;
  --text-whisper: #5E6678;
  --accent-mint: #6EE7B7;
  --accent-ice: #7DD3FC;
  --font-body: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg-primary); color: var(--text-primary); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
/* Luxury materiality layers */
.ambient-glow, .vignette, .grain {
  position: fixed; inset: 0; pointer-events: none;
}
.ambient-glow {
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 30%, rgba(110, 231, 183, 0.04) 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 50% 95%, rgba(125, 211, 252, 0.025) 0%, transparent 60%);
}
.vignette {
  z-index: 1;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
}
.grain {
  z-index: 2;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
nav, main, section, header, footer, .container { position: relative; z-index: 10; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 14px 0; background: rgba(8, 10, 15, 0.88); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--hairline); }
nav .container { display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo svg { height: 32px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--text-secondary); text-decoration: none; transition: color 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.nav-links a:hover { color: var(--text-primary); }
.nav-links a.active { color: var(--accent-mint); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-cta a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 20px; font-size: 13px; font-weight: 600; border-radius: 10px; text-decoration: none; cursor: pointer; transition: all 0.2s; }
.btn-ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--border-bright); }
.btn-ghost:hover { border-color: var(--accent-mint); color: var(--accent-mint); }
.btn-primary { background: var(--accent-mint); color: #080A0F; border: none; }
.btn-primary:hover { background: #8CF0CC; }
@media (max-width: 768px) { .nav-links { display: none; } }
.page-hero { padding: 160px 0 60px; }
.page-hero h1 { font-size: clamp(40px, 6.2vw, 68px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.08; margin-bottom: 20px; }
h1 em, .page-hero h1 em {
  font-family: 'Fraunces', 'Instrument Sans', serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.015em;
  background: linear-gradient(135deg, var(--accent-mint, #6EE7B7) 0%, var(--accent-ice, #7DD3FC) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-hero p { font-size: 18px; line-height: 1.65; color: var(--text-secondary); max-width: 640px; }
.page-updated { font-size: 13px; color: var(--text-muted); margin-top: 12px; font-family: var(--font-mono); }
.content { padding: 0 0 100px; }
.content-inner { max-width: 760px; }
.content-section { margin-bottom: 48px; }
.content-section h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.content-section h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; margin-top: 24px; }
.content-section p { font-size: 15px; line-height: 1.75; color: var(--text-secondary); margin-bottom: 12px; }
.content-section ul { list-style: none; padding: 0; margin: 0 0 16px 0; }
.content-section ul li { font-size: 15px; color: var(--text-secondary); line-height: 1.75; padding: 4px 0 4px 20px; position: relative; }
.content-section ul li::before { content: ''; position: absolute; left: 0; top: 13px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-mint); }
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 24px 0; }
.sec-card { background: var(--bg-card); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.sec-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.sec-card p { font-size: 13px; line-height: 1.6; color: var(--text-muted); margin-bottom: 0; }
@media (max-width: 600px) { .card-grid { grid-template-columns: 1fr; } }

/* Blog-specific styles */
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin: 40px 0; }
a.blog-card { display: flex; flex-direction: column; background: var(--bg-card); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: 12px; padding: 32px; transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1); text-decoration: none; color: inherit; cursor: pointer; }
a.blog-card:hover { border-color: var(--border-bright); transform: translateY(-2px); }
a.blog-card:hover h3 { color: var(--accent-mint); }
.blog-card-tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 20px; margin-bottom: 16px; width: fit-content; }
.blog-card-tag.industry { background: rgba(110, 231, 183, 0.15); color: var(--accent-mint); }
.blog-card-tag.compliance { background: rgba(125, 211, 252, 0.15); color: var(--accent-ice); }
.blog-card-tag.engineering { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }
.blog-card-tag.product { background: rgba(167, 139, 250, 0.15); color: #A78BFA; }
.blog-card h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; margin-bottom: 12px; color: var(--text-primary); transition: color 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.blog-card-desc { font-size: 15px; line-height: 1.6; color: var(--text-secondary); margin-bottom: 20px; flex-grow: 1; }
.blog-card-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-muted); font-family: var(--font-mono); }
.blog-card-date { display: block; }
.blog-card-author::before { content: '•'; margin: 0 8px; }
@media (max-width: 768px) { .blog-grid { grid-template-columns: 1fr; } }

footer { padding: 48px 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-left { display: flex; align-items: center; gap: 16px; }
.footer-left svg { height: 22px; width: auto; }
.footer-copy { font-size: 12px; color: var(--text-muted); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 12px; color: var(--text-muted); text-decoration: none; transition: color 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.footer-links a:hover { color: var(--text-primary); }

/* ── LIGHT MODE ── */
body.light {
  --bg-primary: #F7F8FA; --bg-card: rgba(255,255,255,0.82); --border: #DDE1E8; --border-bright: #C8CDD6;
  --text-primary: #111827; --text-secondary: #4B5563; --text-muted: #9CA3AF;
  --accent-mint: #059669; --accent-ice: #0284C7;
}
body.light nav { background: rgba(247,248,250,0.92); }
body.light .btn-primary { background: #059669; color: #fff; }
body.light .btn-primary:hover { background: #047857; }
body.light .btn-ghost { color: #111827; border-color: #C8CDD6; }
body.light .btn-ghost:hover { border-color: #059669; color: #059669; }
body.light .nav-logo text { fill: #111827; }
body.light .footer-left text { fill: #111827; }
body.light .page-hero h1 em { background: linear-gradient(135deg, #059669, #0284C7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
body.light .blog-card-tag.industry { background: rgba(5, 150, 105, 0.1); color: #059669; }
body.light .blog-card-tag.compliance { background: rgba(2, 132, 199, 0.1); color: #0284C7; }
body.light .blog-card-tag.engineering { background: rgba(217, 119, 6, 0.1); color: #D97706; }
body.light .blog-card-tag.product { background: rgba(124, 58, 202, 0.1); color: #7C3AED; }
/* Theme toggle */
.theme-toggle{position:relative;display:inline-block;width:44px;height:24px;border-radius:24px;background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.12);cursor:pointer;padding:0;vertical-align:middle;transition:background 0.3s ease, border-color 0.3s ease}
.theme-toggle:hover{border-color:rgba(110,231,183,0.4);background:rgba(255,255,255,0.08)}
.theme-toggle-thumb{position:absolute;top:1px;left:1px;width:20px;height:20px;border-radius:50%;background:#E8ECF2;display:flex;align-items:center;justify-content:center;color:#080A0F;box-shadow:0 1px 3px rgba(0,0,0,0.2);transition:transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease}
body.light .theme-toggle{background:rgba(0,0,0,0.04);border-color:rgba(0,0,0,0.1)}
body.light .theme-toggle:hover{background:rgba(0,0,0,0.06);border-color:rgba(5,150,105,0.4)}
body.light .theme-toggle-thumb{transform:translateX(20px);background:#059669;color:#fff}

/* Light-mode extensions */
body.light .ambient-glow {
  background:
    radial-gradient(ellipse 900px 600px at 15% 10%, rgba(5,150,105,0.04), transparent 60%),
    radial-gradient(ellipse 800px 500px at 85% 90%, rgba(2,132,199,0.03), transparent 60%);
}
body.light .vignette { background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.04) 100%); }
body.light .grain { opacity: 0.015; }
body.light nav { border-bottom-color: rgba(0,0,0,0.08); }
body.light footer { border-top-color: rgba(0,0,0,0.08); }
body.light a.blog-card { background: rgba(255,255,255,0.82); border-color: #DDE1E8; }
body.light a.blog-card:hover { border-color: #C8CDD6; }
body.light a.blog-card:hover h3 { color: #059669; }
body.light .blog-card h3 { color: #111827; }
body.light h1 em, body.light .page-hero h1 em { background: linear-gradient(135deg, #059669 0%, #0284C7 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
