/* ==========================================================================
   GREY CIRCUIT TECHNOLOGIES — BUILD LAB ENTERPRISE DESIGN SYSTEM
   Production Stylesheet for labs.greycircuit.tech
   Zero-dependency, high-contrast obsidian/slate architecture.
   Aligned with greycircuit.tech and blogs.greycircuit.tech design tokens.
   ========================================================================== */

:root {
  /* Surface & Background Colors */
  --bg-obsidian: #070707;
  --bg-slate: #0b0b0b;
  --bg-card: #0e121b;
  --bg-elevated: rgba(18, 18, 18, 0.72);
  --bg-glass: rgba(15, 15, 15, 0.6);
  --bg-subtle: rgba(255, 255, 255, 0.03);

  /* Border Tokens */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.24);
  --border-accent: rgba(255, 255, 255, 0.28);

  /* Text & Foreground Tokens */
  --text-primary: #ffffff;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;

  /* Accent Tokens (Aligned with Greycircuit Brand Palette) */
  --accent-cyan: #d4d4d4;
  --accent-violet: #c4b5fd;
  --accent-emerald: #6ee7b7;
  --accent-amber: #fcd34d;
  --accent-rose: #f87171;
  --danger: #f87171;

  /* Ambient Lighting Coordinates */
  --mx: 50%;
  --my: 50%;

  /* Layout & Animation */
  --container-max: 1280px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  /* Typography Stacks */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  margin: 0;
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  max-width: 100vw;
  line-height: 1.6;
  letter-spacing: -0.006em;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Subtle circuit/film noise overlay */
.noise-overlay,
body::before {
  content: '';
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Ambient mouse glow spotlight */
.ambient-glow,
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle 800px at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.025), transparent 60%);
  transition: opacity 0.4s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

::selection {
  background: #ffffff;
  color: #070707;
}

/* Accessibility Skip Link */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100001;
  background: #ffffff;
  color: #070707;
  padding: 10px 16px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: top 0.2s ease;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 3px;
}

/* ==========================================================================
   TYPOGRAPHY & UTILITY TOKENS
   ========================================================================== */

.font-display,
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}

.font-mono {
  font-family: var(--font-mono);
}

.font-sans {
  font-family: var(--font-sans);
}

.text-gradient {
  background: linear-gradient(135deg, #ffffff 40%, #a3a3a3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-cyan { color: var(--accent-cyan); }
.text-violet { color: var(--accent-violet); }
.text-emerald { color: var(--accent-emerald); }
.text-amber { color: var(--accent-amber); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* Layout Containers */
.container {
  width: min(100% - 3rem, var(--container-max));
  margin-inline: auto;
}

.content-wrapper {
  flex: 1;
  width: 100%;
  position: relative;
  z-index: 1;
}

.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
  border-color: var(--border-hover);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   DYNAMIC ISLAND NAVIGATION & MOBILE DRAWER
   Exact visual parity with greycircuit.tech and blogs.greycircuit.tech
   ========================================================================== */

.dynamic-island {
  --island-h: 52px;
  position: fixed !important;
  top: 18px !important;
  left: 50% !important;
  z-index: 99990 !important;
  width: max-content !important;
  max-width: calc(100vw - 24px) !important;
  padding: 5px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 999px !important;
  background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.08), transparent 40%), rgba(7, 7, 7, 0.78) !important;
  backdrop-filter: blur(24px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(140%) !important;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  transform: translate3d(-50%, 0, 0) !important;
  transition: transform 0.45s var(--ease-out-expo), background 0.3s ease, border-color 0.3s ease, top 0.3s ease !important;
}

.dynamic-island.is-scrolled {
  top: 12px !important;
  background: rgba(7, 7, 7, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

.dynamic-island.is-hidden {
  transform: translate3d(-50%, calc(-100% - 28px), 0) !important;
  pointer-events: none;
}

.island-shell {
  min-height: var(--island-h);
  display: flex;
  align-items: center;
  gap: 4px;
}

.island-brand {
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px 0 11px;
  color: #ffffff;
  font: 600 9px var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: background 0.25s ease;
  text-decoration: none;
}

.island-brand img {
  width: 20px;
  height: 23px;
  object-fit: contain;
  filter: invert(1) brightness(1.2);
}

.island-brand:hover {
  background: rgba(255, 255, 255, 0.07);
}

.island-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.14em;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  text-transform: uppercase;
}

.island-divider {
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: rgba(255, 255, 255, 0.12);
}

.island-link {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font: 500 9px var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.island-link:hover,
.island-link.is-active-section {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.09);
}

.island-cta {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  padding: 0 16px;
  color: #070707 !important;
  background: #ffffff !important;
  border: 1px solid #ffffff !important;
  border-radius: 999px;
  font: 600 9px var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s var(--ease-out-expo);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.12);
}

.island-cta:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.22);
}

/* Mobile Nav Drawer Toggle */
.mobile-nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.mobile-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(86vw, 360px);
  z-index: 99995;
  background: var(--bg-slate);
  border-left: 1px solid var(--border-subtle);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateX(102%);
  transition: transform 0.38s var(--ease-out-expo);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.8);
}

.mobile-nav-drawer.is-open {
  transform: translateX(0);
}

.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99992;
  background: rgba(5, 5, 5, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
}

.mobile-drawer-backdrop.is-visible {
  display: block;
}

.mobile-drawer-close {
  align-self: flex-end;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s ease;
}

.mobile-drawer-close:hover {
  color: #ffffff;
}

.mobile-nav-drawer .island-link {
  height: 42px;
  justify-content: flex-start;
  padding: 0 16px;
  font-size: 10px;
  letter-spacing: 0.14em;
  border-radius: 8px;
}

/* ==========================================================================
   BUTTONS & INTERACTIVE CONTROLS
   Standardized with greycircuit.tech uppercase monospace CTAs
   ========================================================================== */

.btn,
.magnetic,
[data-magnetic] {
  cursor: pointer;
}

.btn-primary,
.btn-secondary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 28px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.28s var(--ease-out-expo), background-color 0.24s ease, border-color 0.24s ease, color 0.24s ease, box-shadow 0.28s var(--ease-out-expo);
}

.btn-primary {
  background: #ffffff;
  color: #070707;
  border: 1px solid #ffffff;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.12);
}

.btn-primary:hover {
  background: #dcdcdc;
  border-color: #dcdcdc;
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(255, 255, 255, 0.22);
}

.btn-secondary {
  background: rgba(18, 18, 18, 0.72);
  color: #ffffff;
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: rgba(28, 28, 28, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
  color: #ffffff;
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 9.5px;
  letter-spacing: 0.14em;
}

/* ==========================================================================
   HERO SECTION & TELEMETRY COUNTERS
   ========================================================================== */

.lab-hero {
  position: relative;
  padding-top: clamp(8rem, 14vw, 11rem);
  padding-bottom: clamp(4rem, 7vw, 6rem);
  background-color: var(--bg-obsidian);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}

.lab-hero::before {
  content: '';
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(300px, 60vw, 800px);
  height: clamp(300px, 60vw, 600px);
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.04) 0%, rgba(196, 181, 253, 0.03) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.lab-hero-content {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.lab-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
}

.lab-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px rgba(110, 231, 183, 0.6);
}

.lab-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6.5vw, 5.2rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #ffffff;
  margin-bottom: 1.5rem;
  text-wrap: balance;
}

.lab-hero-title span {
  background: linear-gradient(135deg, #ffffff 40%, #a3a3a3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lab-hero-tagline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 760px;
  margin: 0 auto 2.5rem;
  text-wrap: balance;
}

.lab-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 3.5rem;
}

/* Lab Key Metric Stats Row */
.lab-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
}

.lab-stat-card {
  padding: 16px 20px;
  text-align: center;
  border-radius: 12px;
  background: rgba(14, 18, 27, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  transition: transform 0.25s var(--ease-out-expo), border-color 0.25s ease;
}

.lab-stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

.lab-stat-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.2;
}

.lab-stat-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Domain Category Pills Bar */
.domain-pills-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 2rem;
}

.domain-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all 0.25s var(--ease-out-expo);
  cursor: pointer;
}

.domain-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.domain-pill.active {
  background: #ffffff;
  color: #070707;
  border-color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.18);
}

.domain-pill svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   PROJECT EXPLORER & TOOLBAR
   ========================================================================== */

.explorer-section {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(5rem, 9vw, 8rem);
  background-color: var(--bg-obsidian);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 16px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-top: 6px;
}

.lab-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(14, 18, 27, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  margin-bottom: 2.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.lab-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 260px;
  background: #090909;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0 14px;
  height: 44px;
  transition: all 0.25s ease;
}

.lab-search-wrap:focus-within {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08), 0 8px 20px rgba(0, 0, 0, 0.5);
  background: #0d0d0d;
}

.lab-search-wrap svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.lab-search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13.5px;
  font-family: var(--font-sans);
  color: #ffffff;
}

.lab-search-input::placeholder {
  color: var(--text-muted);
}

.lab-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.lab-filter-select {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  height: 44px;
  background: #090909;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--text-secondary);
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lab-filter-select:hover,
.lab-filter-select:focus {
  border-color: var(--border-hover);
  color: #ffffff;
}

.lab-filter-select option {
  background: #111111;
  color: #ffffff;
}

.btn-reset-filters {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-reset-filters:hover {
  color: #ffffff;
  border-color: var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
}

/* ==========================================================================
   PROJECT CARDS GRID & SHOWCASE
   Consistent with Section 08 Blog Card Visual Parity
   ========================================================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: rgba(14, 18, 27, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s var(--ease-out-expo), border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65), 0 0 30px rgba(255, 255, 255, 0.03);
}

.project-card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111111;
  overflow: hidden;
}

.project-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out-expo);
}

.project-card:hover .project-card-cover img {
  transform: scale(1.04);
}

.project-card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

/* Status Badges */
.badge-featured {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(251, 191, 36, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.badge-status {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.badge-status.released {
  background: rgba(110, 231, 183, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(110, 231, 183, 0.28);
}

.badge-status.in-development {
  background: rgba(212, 212, 212, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(212, 212, 212, 0.28);
}

.badge-status.beta {
  background: rgba(252, 211, 77, 0.12);
  color: var(--accent-amber);
  border: 1px solid rgba(252, 211, 77, 0.28);
}

.badge-status.concept,
.badge-status.research {
  background: rgba(196, 181, 253, 0.12);
  color: var(--accent-violet);
  border: 1px solid rgba(196, 181, 253, 0.28);
}

.badge-status.archived,
.badge-status.deprecated {
  background: rgba(115, 115, 115, 0.14);
  color: var(--text-muted);
  border: 1px solid rgba(115, 115, 115, 0.24);
}

.badge-commercial {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.project-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-card-category {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.project-card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.3;
  color: #ffffff;
  margin-bottom: 10px;
  letter-spacing: -0.025em;
}

.project-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.card-version-tag {
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.card-view-link {
  color: #ffffff;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.project-card:hover .card-view-link {
  transform: translateX(4px);
  color: #ffffff;
}

/* Empty State */
.empty-state-box {
  text-align: center;
  padding: 60px 20px;
  border-radius: 16px;
  background: rgba(14, 18, 27, 0.4);
  border: 1px dashed var(--border-subtle);
  grid-column: 1 / -1;
}

.empty-state-box h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 8px;
}

.empty-state-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* ==========================================================================
   PROJECT DETAIL PAGE (`project.html`)
   ========================================================================== */

.project-detail-hero {
  padding-top: clamp(7.5rem, 13vw, 10rem);
  padding-bottom: clamp(3rem, 5vw, 4.5rem);
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-obsidian);
  position: relative;
}

.project-identity-wrap {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.project-avatar {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  background: #141414;
  border: 1px solid var(--border-subtle);
  padding: 12px;
  object-fit: contain;
  flex-shrink: 0;
}

.project-meta-col {
  flex: 1;
}

.project-breadcrumbs {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.project-breadcrumbs a:hover {
  color: #ffffff;
}

.project-headline {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: #ffffff;
  margin-bottom: 14px;
}

.project-lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 840px;
  margin-bottom: 1.5rem;
}

.project-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Tab Navigation for Detailed Sections */
.project-tabs-nav {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-subtle);
  margin: 2.5rem 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.project-tab-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 20px;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
}

.project-tab-btn:hover {
  color: #ffffff;
}

.project-tab-btn.active {
  color: #ffffff;
  border-bottom-color: #ffffff;
  font-weight: 600;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Engineering Specifications Table */
.specs-table-wrap {
  width: 100%;
  border-radius: 14px;
  background: rgba(14, 18, 27, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  margin: 1.5rem 0 2.5rem;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.specs-table th {
  background: rgba(255, 255, 255, 0.03);
  padding: 14px 20px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.specs-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.specs-table tr:last-child td {
  border-bottom: none;
}

.specs-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.architecture-card {
  padding: 28px;
  border-radius: 16px;
  background: rgba(14, 18, 27, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  margin-bottom: 2rem;
}

.architecture-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 12px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 2rem 0;
}

.feature-card {
  padding: 24px;
  border-radius: 14px;
  background: rgba(14, 18, 27, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  transition: transform 0.25s var(--ease-out-expo), border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
}

.feature-card h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 2rem 0;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  aspect-ratio: 16 / 10;
  background: #111111;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out-expo);
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* ==========================================================================
   RELEASE & CHANGELOG SHOWCASE (`release.html`)
   ========================================================================== */

.release-matrix-card {
  background: rgba(14, 18, 27, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.release-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.release-version-pill {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.changelog-block {
  margin: 1.5rem 0;
}

.changelog-subtitle {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.changelog-subtitle.feat { color: var(--accent-emerald); }
.changelog-subtitle.improve { color: var(--accent-cyan); }
.changelog-subtitle.fix { color: var(--accent-amber); }
.changelog-subtitle.sec { color: var(--accent-rose); }

.changelog-list {
  list-style: none;
  padding-left: 0;
}

.changelog-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.changelog-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* Download Matrix Table */
.download-table-wrap {
  width: 100%;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  margin-top: 1rem;
}

.download-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.download-table th {
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.download-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.download-table tr:last-child td {
  border-bottom: none;
}

.download-hash {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   DOCUMENTATION PORTAL (`documentation.html`)
   ========================================================================== */

.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr 220px;
  gap: 36px;
  padding-top: 100px;
  padding-bottom: 80px;
  align-items: flex-start;
}

.docs-sidebar-nav {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding-right: 12px;
}

.docs-nav-group-title {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 1.5rem 0 0.5rem;
}

.docs-nav-link {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  margin-bottom: 2px;
  transition: all 0.2s ease;
}

.docs-nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.docs-nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 500;
}

.docs-content-body {
  min-width: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.docs-content-body h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 1rem;
}

.docs-content-body h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: #ffffff;
  margin: 2.5rem 0 1rem;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.docs-content-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: #ffffff;
  margin: 1.5rem 0 0.75rem;
}

.docs-content-body p {
  margin-bottom: 1.25rem;
}

.docs-content-body pre {
  background: #090909;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 16px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #f1f5f9;
  margin: 1.5rem 0;
}

.docs-content-body code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  color: #ffffff;
}

.docs-toc-sidebar {
  position: sticky;
  top: 90px;
  padding-left: 14px;
  border-left: 1px solid var(--border-subtle);
  font-size: 12px;
}

.docs-toc-title {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.docs-toc-link {
  display: block;
  color: var(--text-muted);
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.docs-toc-link:hover,
.docs-toc-link.active {
  color: #ffffff;
}

.callout-box {
  padding: 18px 20px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--border-accent);
  margin: 1.5rem 0;
  font-size: 13.5px;
}

.callout-box.info { border-left-color: var(--accent-cyan); }
.callout-box.warn { border-left-color: var(--accent-amber); }
.callout-box.success { border-left-color: var(--accent-emerald); }

/* ==========================================================================
   CTA SECTION & UNIFIED CORPORATE FOOTER
   Exact visual parity with greycircuit.tech and blogs.greycircuit.tech
   ========================================================================== */

.lab-cta-section {
  padding: clamp(4rem, 8vw, 6rem) 0;
  background: var(--bg-slate);
  border-top: 1px solid var(--border-subtle);
}

.lab-cta-card {
  text-align: center;
  max-width: 840px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) 2rem;
  border-radius: 24px;
  background: radial-gradient(circle at center, rgba(30, 30, 30, 0.7) 0%, rgba(12, 12, 12, 0.95) 100%);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lab-cta-card h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.lab-cta-card p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

footer.site-footer {
  background-color: #050505;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3.5rem 0 2rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 10;
  font-size: 13px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ffffff;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.65;
  color: #888888;
  max-width: 380px;
}

.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: #ffffff;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 13px;
}

.footer-col a {
  color: #999999;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.footer-col a:hover {
  color: #ffffff;
  transform: translateX(2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #666666;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(14, 18, 27, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.25s var(--ease-out-expo);
  z-index: 999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #ffffff;
  color: #070707;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   RESPONSIVE DESIGN BREAKPOINTS
   Aligned with 1024px, 820px, 640px, 480px ecosystem breakpoints
   ========================================================================== */

@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .docs-layout {
    grid-template-columns: 240px 1fr;
  }
  .docs-toc-sidebar {
    display: none;
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem;
  }
}

@media (max-width: 820px) {
  .dynamic-island {
    top: 12px !important;
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    padding: 4px 6px !important;
  }
  .island-shell {
    width: 100%;
    justify-content: space-between;
  }
  .island-shell > .island-link,
  .island-shell > .island-divider {
    display: none;
  }
  .mobile-nav-toggle {
    display: flex;
  }
  .lab-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .project-identity-wrap {
    flex-direction: column;
  }
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-sidebar-nav {
    display: none;
  }
}

@media (max-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .lab-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .lab-search-wrap {
    min-width: 100%;
  }
  .lab-filters-row {
    width: 100%;
    justify-content: space-between;
  }
  .lab-filter-select {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .lab-stats-row {
    grid-template-columns: 1fr;
  }
  .lab-hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .lab-hero-actions .btn {
    width: 100%;
  }
}
