:root {
  --primary: #3157ff;
  --ink: #14213d;
  --muted: #667085;
  --soft: #f5f7fb;
  --line: #e6eaf2;
}

* { box-sizing: border-box; }

body {
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  background: #ffffff;
}

.navbar-brand { letter-spacing: -0.03em; }
.brand-dot { color: var(--primary); }
.nav-link { font-weight: 600; color: #3b4658; }
.nav-link:hover { color: var(--primary); }

.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: #2445d8;
  --bs-btn-hover-border-color: #2445d8;
}

.hero-section {
  padding: 96px 0;
  background:
    radial-gradient(circle at top left, rgba(49, 87, 255, 0.14), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f6f8ff 100%);
}

.profile-card {
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 32px;
  padding: 36px;
  text-align: center;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(16px);
}

.profile-avatar {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
  border-radius: 28px;
  color: white;
  background: linear-gradient(135deg, #3157ff, #18c8a8);
  font-size: 32px;
  font-weight: 800;
}

.mini-stat {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
}

.mini-stat strong,
.mini-stat span { display: block; }
.mini-stat strong { font-size: 20px; }
.mini-stat span { color: var(--muted); font-size: 14px; }

.section-padding { padding: 88px 0; }
.bg-soft { background: var(--soft); }
.section-label {
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.section-title {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.content-width { max-width: 640px; }

.feature-card,
.project-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(20, 33, 61, 0.06);
}
.feature-card { transition: transform 180ms ease, box-shadow 180ms ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 24px 70px rgba(20, 33, 61, 0.1); }
.icon-pill {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: white;
  background: var(--primary);
  font-weight: 800;
}

.project-image { height: 180px; }
.gradient-one { background: linear-gradient(135deg, #3157ff, #98d8ff); }
.gradient-two { background: linear-gradient(135deg, #18c8a8, #d7f75b); }
.gradient-three { background: linear-gradient(135deg, #ffb703, #fb7185); }
.gradient-four { background: linear-gradient(135deg, #0f172a, #38bdf8); }
.gradient-five {
  background:
    radial-gradient(circle at 72% 28%, rgba(125, 211, 252, 0.75), transparent 16%),
    linear-gradient(135deg, #081a33 0%, #0f766e 56%, #67e8f9 100%);
}
.project-card a { color: var(--primary); font-weight: 700; text-decoration: none; }

.timeline { border-left: 1px solid rgba(255,255,255,0.2); padding-left: 28px; }
.timeline-item { position: relative; padding-bottom: 30px; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -36px;
  top: 6px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #66e3ff;
  box-shadow: 0 0 0 6px rgba(102, 227, 255, 0.14);
}
.timeline-item span {
  color: #66e3ff;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.timeline-item p { color: rgba(255,255,255,0.64); margin-bottom: 0; }

.contact-panel {
  padding: 64px 28px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(135deg, #ffffff, #f6f8ff);
}

.docs-hero { padding: 72px 0 40px; background: var(--soft); }
.docs-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  box-shadow: 0 16px 45px rgba(20,33,61,0.06);
}
.docs-sidebar {
  position: sticky;
  top: 92px;
}
.docs-sidebar a {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  color: #3b4658;
  text-decoration: none;
  font-weight: 600;
}
.docs-sidebar a:hover { color: var(--primary); background: #eef2ff; }
.docs-content h2 { margin-top: 10px; font-weight: 800; letter-spacing: -0.03em; }
.docs-content h3 { margin-top: 28px; font-weight: 750; }
.docs-content p, .docs-content li { color: var(--muted); }

/* Article code blocks */
.docs-content pre {
  margin: 22px 0;
  padding: 20px 22px;
  border-radius: 14px;
  background: #111111;
  color: #f8fafc;
  overflow-x: auto;
  box-shadow: 0 16px 40px rgba(20, 33, 61, 0.18);
}

.docs-content code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
}

.docs-content pre code {
  color: inherit;
  background: transparent;
}

@media (max-width: 767px) {
  .hero-section { padding: 64px 0; }
  .section-padding { padding: 64px 0; }
  .profile-card { padding: 26px; }
  .docs-sidebar { position: static; }
}

/* Project case study pages */
.project-hero {
  padding: 78px 0;
}
.ecr-hero {
  background:
    radial-gradient(circle at top right, rgba(255, 0, 200, 0.35), transparent 34%),
    radial-gradient(circle at bottom left, rgba(49, 87, 255, 0.4), transparent 28%),
    linear-gradient(135deg, #17003d 0%, #4b00b5 48%, #9100a8 100%);
}
.inventory-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 12%, rgba(103, 232, 249, 0.34), transparent 28%),
    radial-gradient(circle at 8% 88%, rgba(34, 197, 94, 0.22), transparent 30%),
    linear-gradient(135deg, #061425 0%, #12385a 52%, #0b6f68 100%) !important;
}
.inventory-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.12) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(90deg, transparent, #000 45%, #000);
}
.inventory-hero .container {
  position: relative;
  z-index: 1;
}
.inventory-back-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  color: rgba(255,255,255,0.72);
  font-weight: 700;
  text-decoration: none;
}
.inventory-back-link:hover { color: #ffffff; }
.inventory-eyebrow {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 13px;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 999px;
  color: #d8fbff;
  background: rgba(255,255,255,0.1);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.inventory-hero h1 {
  max-width: 760px;
  letter-spacing: -0.045em;
}
.inventory-repo-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 10px 20px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  color: rgba(255,255,255,0.82);
  background: rgba(255,255,255,0.08);
  font-weight: 750;
  text-decoration: none;
}
.inventory-repo-status:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.16);
}
.inventory-hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0 18px;
}
.inventory-hero-facts div {
  padding: 13px 14px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 15px;
  background: rgba(4, 18, 34, 0.25);
}
.inventory-hero-facts span,
.inventory-hero-facts strong { display: block; }
.inventory-hero-facts span {
  margin-bottom: 4px;
  color: #9ceaf0;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.inventory-hero-facts strong {
  color: #ffffff;
  font-size: 0.88rem;
  line-height: 1.35;
}
.inventory-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.inventory-tech-stack span {
  padding: 5px 10px;
  border-radius: 999px;
  color: #e9fdff;
  background: rgba(7, 24, 43, 0.58);
  font-size: 0.76rem;
  font-weight: 750;
}
.inventory-preview-label {
  margin: 0 0 10px 14px;
  color: #baf7f6;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.inventory-preview-card {
  border-color: rgba(255,255,255,0.44);
  background: rgba(255,255,255,0.16);
  transform: rotate(1deg);
}
.inventory-preview-card img { transform: rotate(-1deg); }
.inventory-preview-caption {
  margin: 14px 14px 0;
  color: rgba(255,255,255,0.68);
  font-size: 0.86rem;
}
@media (max-width: 991px) {
  .inventory-hero-facts { grid-template-columns: 1fr; }
  .inventory-preview-card,
  .inventory-preview-card img { transform: none; }
}
@media (max-width: 575px) {
  .inventory-repo-status { width: 100%; }
  .inventory-hero h1 { font-size: clamp(2.35rem, 13vw, 3.5rem); }
}
.text-white-75 { color: rgba(255,255,255,0.78); }
.project-preview-card {
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255,255,255,0.12);
  padding: 10px;
}
.project-preview-card img {
  width: 100%;
  display: block;
  border-radius: 16px;
}
.callout-card,
.feature-list-card {
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 12px 36px rgba(20, 33, 61, 0.05);
}
.feature-list-link {
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}
.feature-list-link:hover {
  color: inherit;
  border-color: rgba(49, 87, 255, 0.45);
  background: #eef2ff;
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(49, 87, 255, 0.14);
}
.feature-list-link:hover h2 {
  color: var(--primary);
}
.feature-list-link:focus-visible {
  outline: 3px solid rgba(49, 87, 255, 0.35);
  outline-offset: 3px;
}
.callout-card {
  color: var(--primary);
  font-weight: 800;
}
.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.screenshot-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: white;
  box-shadow: 0 18px 50px rgba(20, 33, 61, 0.08);
}
.screenshot-card.large {
  grid-column: 1 / -1;
}
.screenshot-card img {
  width: 100%;
  display: block;
  background: #f5f7fb;
  cursor: zoom-in;
  transition: opacity 160ms ease, transform 160ms ease;
}
.screenshot-card img:hover {
  opacity: 0.92;
  transform: scale(1.006);
}
.screenshot-card img:focus-visible {
  outline: 4px solid rgba(49, 87, 255, 0.55);
  outline-offset: -4px;
}
.screenshot-card figcaption {
  padding: 16px 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Full-resolution screenshot lightbox */
.image-lightbox {
  width: min(96vw, 1800px);
  height: 94vh;
  max-width: none;
  max-height: 94vh;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 20px;
  color: #f8fafc;
  background: #0b1020;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.image-lightbox::backdrop {
  background: rgba(4, 8, 20, 0.84);
  backdrop-filter: blur(5px);
}
.image-lightbox__panel {
  position: relative;
  box-sizing: border-box;
  height: 100%;
  padding: 58px 18px 16px;
}
.image-lightbox figure {
  margin: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
}
.image-lightbox__image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 10px;
  background: #050814;
}
.image-lightbox__caption {
  max-width: 1100px;
  margin: 0 auto;
  color: rgba(248, 250, 252, 0.8);
  font-size: 0.95rem;
  line-height: 1.55;
  text-align: center;
}
.image-lightbox__close {
  position: absolute;
  top: 12px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 700;
}
.image-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
}
.image-lightbox__close:focus-visible {
  outline: 3px solid #8ea3ff;
  outline-offset: 3px;
}
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.workflow-grid div {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #f7f8ff);
  padding: 18px;
}
.workflow-grid span {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.workflow-grid strong {
  display: block;
  margin-bottom: 6px;
}
.workflow-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 767px) {
  .project-hero { padding: 56px 0; }
  .screenshot-gallery,
  .workflow-grid { grid-template-columns: 1fr; }
  .screenshot-card.large { grid-column: auto; }
  .image-lightbox {
    width: 96vw;
    height: 96vh;
    max-height: 96vh;
  }
  .image-lightbox__panel { padding: 54px 10px 12px; }
  .image-lightbox__image {
    max-width: 100%;
    max-height: 100%;
  }
}

/* Floating back-to-top button */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1040;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 44px;
  border: 1px solid rgba(49, 87, 255, 0.28);
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #6d00ff);
  box-shadow: 0 16px 36px rgba(49, 87, 255, 0.28);
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover {
  box-shadow: 0 20px 45px rgba(49, 87, 255, 0.36);
}
.back-to-top:focus-visible {
  outline: 3px solid rgba(49, 87, 255, 0.28);
  outline-offset: 4px;
}

@media (max-width: 767px) {
  .back-to-top {
    right: 14px;
    bottom: 14px;
    min-width: 64px;
    min-height: 40px;
    font-size: 0.9rem;
  }
}

/* Packet Insight page */
.packet-hero {
  background:
    radial-gradient(circle at top right, rgba(0, 216, 255, 0.32), transparent 34%),
    radial-gradient(circle at bottom left, rgba(34, 197, 94, 0.28), transparent 28%),
    linear-gradient(135deg, #04111f 0%, #073763 48%, #0f766e 100%);
}
.packet-visual {
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 28px;
  padding: 18px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(14px);
}
.packet-window-bar {
  display: flex;
  gap: 8px;
  padding: 10px 12px 16px;
}
.packet-window-bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
}
.packet-grid {
  display: grid;
  grid-template-columns: 1fr 40px 1fr 40px 1fr;
  align-items: center;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.92);
}
.packet-node {
  display: grid;
  place-items: center;
  min-height: 86px;
  border-radius: 18px;
  color: #0f172a;
  background: #ecfeff;
  font-weight: 900;
  text-align: center;
}
.packet-node.active {
  color: white;
  background: linear-gradient(135deg, #3157ff, #06b6d4);
}
.packet-line {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #3157ff, #06b6d4);
}
.packet-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.packet-metrics div {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.88);
}
.packet-metrics strong,
.packet-metrics span { display: block; }
.packet-metrics strong { color: #0f172a; }
.packet-metrics span { color: var(--muted); font-size: 0.8rem; }

@media (max-width: 767px) {
  .packet-grid { grid-template-columns: 1fr; }
  .packet-line { width: 4px; height: 28px; justify-self: center; }
  .packet-metrics { grid-template-columns: repeat(2, 1fr); }
}

/* NetSafe Auditor page */
.netsafe-hero {
  background:
    radial-gradient(circle at top right, rgba(125, 92, 255, 0.38), transparent 34%),
    radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.34), transparent 30%),
    linear-gradient(135deg, #101828 0%, #1e1b4b 48%, #3730a3 100%);
}
.netsafe-visual {
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 28px;
  padding: 24px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(14px);
}
.netsafe-panel-title {
  margin-bottom: 18px;
  color: rgba(255,255,255,0.88);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.netsafe-device-row {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.92);
}
.netsafe-device-row strong { color: #111827; }
.netsafe-device-row em {
  color: var(--muted);
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 700;
}
.device-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.device-dot.ok { background: #22c55e; }
.device-dot.warn { background: #f59e0b; }
.device-dot.risk { background: #ef4444; }
.netsafe-score {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  color: white;
  background: rgba(0,0,0,0.22);
}
.netsafe-score span {
  display: block;
  margin-bottom: 10px;
  font-weight: 800;
}
.score-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.24);
  overflow: hidden;
}
.score-fill {
  width: 68%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #38bdf8);
}
.status-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(135deg, #ffffff, #f7f8ff);
}

@media (max-width: 767px) {
  .netsafe-device-row { grid-template-columns: 18px 1fr; }
  .netsafe-device-row em { grid-column: 2; }
}

/* Profile page */
.profile-hero {
  padding: 86px 0;
  background:
    radial-gradient(circle at top left, rgba(49, 87, 255, 0.12), transparent 34%),
    radial-gradient(circle at bottom right, rgba(24, 200, 168, 0.14), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f5f7fb 100%);
}
.profile-timeline {
  display: grid;
  gap: 18px;
}
.profile-timeline div {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(135deg, #ffffff, #f7f8ff);
  box-shadow: 0 14px 36px rgba(20, 33, 61, 0.05);
}
.profile-timeline span {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.profile-timeline h3 {
  margin-bottom: 10px;
}
.profile-timeline p {
  margin-bottom: 0;
  color: var(--muted);
}

/* Profile photo card */
.profile-photo-card {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 32px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(16px);
}
.profile-photo-card img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 4.7;
  object-fit: cover;
  object-position: center top;
}
.profile-photo-caption {
  padding: 28px;
}

/* Documentation article hub */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag-cloud span {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  color: #3b4658;
  background: #ffffff;
  font-weight: 700;
  font-size: 0.92rem;
}
.article-draft {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(24px, 5vw, 46px);
  background: linear-gradient(135deg, #ffffff, #f7f8ff);
  box-shadow: 0 16px 45px rgba(20, 33, 61, 0.06);
}
.article-draft p {
  font-size: 1.03rem;
}

/* Contact modal */
.contact-modal {
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(20, 33, 61, 0.22);
}
.contact-modal .form-control {
  border-radius: 14px;
  border-color: var(--line);
  padding: 12px 14px;
}
.contact-modal .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(49, 87, 255, 0.14);
}
