/* NorthEdge Technology — shared styles (dark theme) */

:root {
  --bg: #0a0a0f;
  --bg-raised: #121218;
  --bg-hover: #1a1a22;
  --border: #26262e;
  --border-strong: #34343e;
  --text: #ecedf0;
  --text-muted: #9a9aa5;
  --text-faint: #6b6b76;
  --accent: #7c6cff;
  --accent-soft: rgba(124, 108, 255, 0.14);
  --accent-glow: rgba(124, 108, 255, 0.35);
  --radius: 10px;
  --sidebar-w: 240px;
  --nav-h: 60px;
  --content-max: 1060px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Top navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 28px;
  background: rgba(10, 10, 15, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav .brand {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}
.nav .brand:hover { text-decoration: none; }
.nav .brand .brand-mark { color: var(--accent); }

.nav .links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav .links::-webkit-scrollbar { display: none; }
.nav .links a {
  color: var(--text-muted);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
}
.nav .links a:hover { color: var(--text); background: var(--bg-hover); text-decoration: none; }
.nav .links a.active { color: var(--text); background: var(--bg-hover); }

/* ---------- Layout with fixed right sidebar ---------- */
.page {
  padding: var(--nav-h) var(--sidebar-w) 0 0;
}

.content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 40px 80px;
}

/* ---------- Certifications sidebar ---------- */
.cert-sidebar {
  position: fixed;
  top: var(--nav-h);
  right: 0;
  bottom: 0;
  width: var(--sidebar-w);
  padding: 28px 20px;
  border-left: 1px solid var(--border);
  background: var(--bg-raised);
  overflow-y: auto;
  z-index: 50;
}

.cert-sidebar h2 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin: 0 0 18px;
}

.cert-card {
  display: block;
  text-align: center;
  padding: 16px 12px;
  margin-bottom: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.cert-card:hover {
  text-decoration: none;
  border-color: var(--accent);
  transform: translateY(-2px);
}
.cert-card img {
  width: 110px;
  height: auto;
  display: block;
  margin: 0 auto 10px;
}
.cert-card .cert-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.cert-card .cert-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
}
.cert-card .cert-verify {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  color: var(--accent);
}

/* ---------- Sections ---------- */
section { padding: 72px 0 8px; }

.section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 10px;
}

h1 {
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 18px;
}

h2.section-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.lede {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 0 28px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 110px 0 60px;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  top: -60px; left: -120px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.5;
}
.hero .tagline {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 0 32px;
}
.hero .eyebrow {
  display: inline-block;
  font-size: 13px;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 24px;
  background: var(--bg-raised);
}
.hero .eyebrow strong { color: var(--accent); font-weight: 600; }

.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { text-decoration: none; filter: brightness(1.12); box-shadow: 0 0 24px var(--accent-glow); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
  margin-left: 10px;
}
.btn-ghost:hover { text-decoration: none; border-color: var(--accent); }

/* ---------- Card grids ---------- */
.grid {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}
.grid-services { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-portfolio { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); }

.card .icon {
  width: 38px; height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 16px;
  font-size: 18px;
}
.card h3 {
  font-size: 16.5px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.card p { font-size: 14px; color: var(--text-muted); margin: 0; }

.card .tag-row { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11.5px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
  background: var(--bg);
}

/* ---------- About ---------- */
.about-panel {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 24px;
}
.about-panel p { color: var(--text-muted); margin: 0 0 14px; }
.about-panel p:last-child { margin-bottom: 0; }
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  margin: 24px 0 4px;
}
.stat .num {
  font-size: 30px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.stat .label { font-size: 13px; color: var(--text-muted); }

/* ---------- Forms ---------- */
form.stack { display: grid; gap: 14px; max-width: 560px; margin-top: 24px; }
label.field { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="url"], textarea, select {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { min-height: 120px; resize: vertical; }

.form-note { font-size: 13px; color: var(--text-faint); }

/* ---------- Blog ---------- */
.post-card {
  display: block;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 14px;
  color: var(--text);
  transition: border-color 0.15s ease;
}
.post-card:hover { text-decoration: none; border-color: var(--accent); }
.post-card h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: -0.01em; }
.post-card .post-date { font-size: 12.5px; color: var(--text-faint); }
.post-card .post-excerpt { font-size: 14px; color: var(--text-muted); margin: 8px 0 0; }
.post-card .tag-row { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }

.post-view { max-width: 760px; }
.post-view .back-link { display: inline-block; margin-bottom: 24px; font-size: 14px; }
.post-view h1 { font-size: clamp(26px, 4vw, 38px); }
.post-view .post-meta { color: var(--text-faint); font-size: 13.5px; margin-bottom: 32px; }
.post-body { color: var(--text-muted); font-size: 15.5px; }
.post-body p, .post-body li { line-height: 1.75; }
.post-body strong { color: var(--text); }
.post-body a { color: var(--accent); }
.post-body img { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border); }
.post-body pre, .post-body code {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
}
.post-body pre { padding: 16px; overflow-x: auto; }
.post-body code { padding: 1px 5px; }
.post-body pre code { border: none; padding: 0; background: transparent; }
.post-body table { border-collapse: collapse; width: 100%; }
.post-body td { border: 1px solid var(--border); padding: 8px 10px; }
.post-body blockquote {
  margin: 0;
  padding: 4px 18px;
  border-left: 3px solid var(--accent);
  background: var(--bg-raised);
  border-radius: 0 8px 8px 0;
}

/* ---------- Admin ---------- */
.admin-panel {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 24px;
}
.admin-panel h3 { margin-top: 0; }
.status-msg { font-size: 13.5px; margin-top: 10px; min-height: 20px; }
.status-msg.ok { color: #4ade80; }
.status-msg.err { color: #f87171; }
.hidden { display: none !important; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 28px 0;
  font-size: 13px;
  color: var(--text-faint);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .page { padding-right: 0; }
  .cert-sidebar {
    position: static;
    width: auto;
    border-left: none;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-start;
  }
  .cert-sidebar h2 { width: 100%; }
  .cert-card { flex: 1 1 200px; margin-bottom: 0; }
  .content { padding: 0 20px 60px; }
  .nav { padding: 0 16px; gap: 12px; }
}
