/* ==========================================================================
   GREY CIRCUIT TECHNOLOGIES — ENTERPRISE DESIGN SYSTEM (styles.css)
   Zero-dependency, high-contrast obsidian/slate architecture.
   Compatible with index.html and all sub-pages (services/*, projects/*).
   ========================================================================== */

:root {
  --bg-obsidian: #070707;
  --bg-slate: #0b0b0b;
  --bg-elevated: rgba(18, 18, 18, 0.72);
  --bg-glass: rgba(15, 15, 15, 0.6);
  --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-primary: #ffffff;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;
  --accent-cyan: #d4d4d4;
  --accent-violet: #c4b5fd;
  --accent-emerald: #6ee7b7;
  --danger: #f87171;
  --mx: 50%;
  --my: 50%;
  --container-max: min(1340px, 92vw);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  scroll-behavior: smooth;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  -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: "Inter", sans-serif;
  overflow-x: hidden;
  max-width: 100vw;
  line-height: 1.6;
  letter-spacing: -0.006em;
  position: relative;
}

/* Subtle film/circuit grain 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");
}

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

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

.selection-invert ::selection {
  background: #ffffff;
  color: #070707;
}

/* Accessibility Skip Link & Focus Rings */
.skip-link {
  position: absolute;
  top: -9999px;
  left: -9999px;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  z-index: 100001;
  text-decoration: none;
}

.skip-link:focus,
.skip-link:focus-visible {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 100001;
  width: auto;
  height: auto;
  padding: 10px 18px;
  margin: 0;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  background: #ffffff;
  color: #070707;
  border-radius: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(124, 58, 237, 0.6);
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

/* Accessible Main Content Container Target */
main#main-content:focus {
  outline: none;
}

/* ==========================================================================
   FLOATING BACK TO TOP CONTROL
   ========================================================================== */
.back-to-top {
  position: fixed;
  bottom: max(28px, calc(env(safe-area-inset-bottom, 0px) + 12px));
  right: max(28px, calc(env(safe-area-inset-right, 0px) + 12px));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(18, 18, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

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

.back-to-top:hover {
  background: rgba(28, 28, 34, 0.95);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.back-to-top:active {
  transform: translateY(0);
  background: rgba(36, 36, 42, 0.98);
}

.back-to-top:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none !important;
    transform: none !important;
  }
  .back-to-top:hover,
  .back-to-top:active {
    transform: none !important;
  }
  .skip-link:focus,
  .skip-link:focus-visible {
    transition: none !important;
  }
}

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

.font-display,
h1,
h2,
h3,
h4 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}

.font-mono,
.section-kicker,
.telemetry-label,
.pillar-tag,
.status-pill {
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.text-2xs {
  font-size: 10px;
}

.text-xs {
  font-size: 12px;
}

.uppercase {
  text-transform: uppercase;
}

.tracking-widest {
  letter-spacing: 0.22em;
}

.text-grey-300 {
  color: #d4d4d4;
}

.text-grey-400 {
  color: var(--text-secondary);
}

.text-grey-500,
.text-grey-600 {
  color: var(--text-muted);
}

.text-gradient-slate {
  background: linear-gradient(135deg, #ffffff 0%, #d4d4d4 55%, #888888 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mt-10 {
  margin-top: 2.5rem;
}

/* ==========================================================================
   LAYOUT CONTAINERS & GRIDS
   ========================================================================== */

.container {
  width: min(100% - clamp(1.75rem, 4vw, 3.5rem), var(--container-max));
  margin-inline: auto;
}

.site-section {
  position: relative;
  padding: clamp(5.5rem, 10vw, 9rem) 0;
  border-top: 1px solid var(--border-subtle);
  isolation: isolate;
}

.section-obsidian {
  background-color: var(--bg-obsidian);
}

.section-slate {
  background-color: var(--bg-slate);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.col-span-4 {
  grid-column: span 4;
}

.col-span-5 {
  grid-column: span 5;
}

.col-span-7 {
  grid-column: span 7;
}

.col-span-8 {
  grid-column: span 8;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.flex-wrap-gap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* Section Headers & Index Numbers */
.section-index {
  display: block;
  margin: 0 0 1rem;
  color: transparent;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(4.2rem, 7.5vw, 7.5rem);
  font-weight: 300;
  line-height: 0.78;
  letter-spacing: -0.06em;
  -webkit-text-stroke: 1px rgba(196, 181, 253, 0.72);
}

.section-kicker {
  display: block;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.section-marker {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.section-heading {
  font-size: clamp(2rem, 3.8vw, 3.25rem);
  line-height: 1.05;
}

.section-heading-lg {
  font-size: clamp(2.4rem, 5vw, 4.25rem);
  line-height: 0.98;
}

.section-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  padding-bottom: 2rem;
  margin-bottom: 3.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.header-link {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}

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

.lead-paragraph {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 300;
  line-height: 1.55;
  color: #d4d4d4;
  margin: 0 0 3rem;
}

/* ==========================================================================
   NATIVE BROWSER MOUSE CURSOR BEHAVIOUR & AMBIENT LIGHTING
   ========================================================================== */

html, body {
  cursor: auto;
}

a, button, [role="button"], input[type="submit"], input[type="button"], select, label[for], .btn, .magnetic, [data-magnetic] {
  cursor: pointer;
}

.ambient-glow {
  position: absolute;
  pointer-events: none;
  z-index: -1;
  filter: blur(90px);
  opacity: 0.45;
}

.hero-glow {
  width: min(68vw, 760px);
  height: min(68vw, 760px);
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 45%, transparent 70%);
}

/* ==========================================================================
   DYNAMIC ISLAND NAVIGATION & MOBILE SLIDE-OUT DRAWER
   ========================================================================== */

.dynamic-island {
  --island-h: 52px;
  position: fixed !important;
  top: max(18px, env(safe-area-inset-top, 0px)) !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: max(12px, env(safe-area-inset-top, 0px)) !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-links-desktop {
  display: flex;
  align-items: center;
  gap: 2px;
}

.island-brand {
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px 0 11px;
  color: #ffffff;
  font: 600 9px "JetBrains Mono", monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: background 0.25s ease;
}

.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-divider {
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: rgba(255, 255, 255, 0.12);
}

.island-link,
.island-contact {
  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 "JetBrains Mono", monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

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

.island-contact {
  margin-left: 4px;
  padding: 0 16px;
  color: #070707 !important;
  background: #ffffff !important;
  border-color: #ffffff !important;
  font-weight: 600;
}

.island-contact:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

.nav-dropdown {
  position: relative;
  height: 38px;
  display: flex;
  align-items: center;
}

.nav-chevron {
  display: inline-block;
  font-size: 11px;
  opacity: 0.55;
  transition: transform 0.3s var(--ease-out-expo);
}

.nav-dropdown.is-open .nav-chevron {
  transform: rotate(45deg);
  opacity: 1;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  width: 260px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(28px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -8px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.32s var(--ease-out-expo), visibility 0.22s ease;
}

.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  font: 500 9px "JetBrains Mono", monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-dropdown-menu a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(3px);
}

/* Mobile Drawer Toggle & Slide-Out Panel */
.mobile-drawer-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;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}

.hamburger-bar {
  width: 15px;
  height: 1.5px;
  background: #ffffff;
  transition: transform 0.25s ease;
}

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

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(86vw, 360px);
  max-width: 100vw;
  box-sizing: border-box;
  z-index: 99995;
  background: var(--bg-slate);
  border-left: 1px solid var(--border-subtle);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform 0.38s var(--ease-out-expo), visibility 0.38s;
  visibility: hidden;
  pointer-events: none;
}

.mobile-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-drawer-close {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.mobile-drawer-link {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.mobile-drawer-sublinks {
  display: grid;
  gap: 6px;
  padding: 4px 0 8px 18px;
}

.mobile-drawer-sublinks a {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 0;
}

.mobile-drawer-cta {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 999px;
  background: #ffffff;
  color: #070707;
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

#hero,
main>section:first-of-type {
  position: relative;
  isolation: isolate;
}

#hero::before,
main>section:first-of-type::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 48%;
  right: clamp(2rem, 7vw, 8rem);
  width: min(44vw, 580px);
  aspect-ratio: 2 / 3;
  transform: translateY(-50%);
  background: url("assets/watermark.png") center / contain no-repeat;
  filter: invert(1) grayscale(1) contrast(1.35);
  opacity: 0.14;
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-section {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8.5rem 0 5rem;
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}

.hero-title {
  font-size: clamp(3.4rem, 9.2vw, 8.2rem);
  font-weight: 600;
  line-height: 0.88;
  letter-spacing: -0.055em;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-word {
  display: block;
}

.hero-desc {
  max-width: 42rem;
  margin: 2rem auto 0;
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.65;
}

.hero-actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 28px;
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: transform 0.25s var(--ease-out-expo), background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.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: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.65);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
}

/* Telemetry Strip */
.telemetry-strip {
  position: relative;
  padding-bottom: clamp(5.5rem, 10vw, 9rem);
  background-color: var(--bg-obsidian);
}

.hero-telemetry-grid {
  width: 100%;
  margin-top: 4.5rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  text-align: left;
}

.telemetry-strip .hero-telemetry-grid {
  margin-top: 0;
}

.telemetry-card {
  padding: 1.35rem 1.5rem;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  backdrop-filter: blur(14px);
  transition: border-color 0.3s ease, transform 0.3s var(--ease-out-expo);
}

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

.telemetry-label {
  display: block;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.telemetry-value {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.85rem, 3vw, 2.5rem);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0.45rem 0 0.25rem;
  letter-spacing: -0.04em;
}

.telemetry-sub {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0.55;
}

.scroll-track {
  width: 1px;
  height: 44px;
  background: rgba(255, 255, 255, 0.18);
  position: relative;
  overflow: hidden;
}

.scroll-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: #ffffff;
  animation: scroll-pulse 2s infinite ease-in-out;
}

@keyframes scroll-pulse {
  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(200%);
  }
}

/* ==========================================================================
   ABOUT & FOUNDER SECTIONS
   ========================================================================== */

.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.principle-card {
  padding: 1.6rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.35s var(--ease-out-expo), border-color 0.3s ease;
}

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

.principle-index {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.principle-card h3 {
  font-size: 1.15rem;
  margin: 0.75rem 0 0.5rem;
  color: #ffffff;
}

.principle-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.founder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.75fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 8rem);
}

.founder-tags {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 1rem 0 1.5rem;
}

.founder-bio {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 38rem;
}

.founder-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.founder-link {
  padding: 0.75rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: var(--text-primary);
  font: 500 10px "JetBrains Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.founder-link:hover {
  background: #ffffff;
  color: #070707;
  border-color: #ffffff;
}

.founder-portrait-wrap {
  justify-self: end;
  width: min(100%, 360px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0b0b0b;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.founder-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.06);
}

/* ==========================================================================
   SERVICES PILLARS, GLASS PANELS & OUTCOME BENCHMARKS
   ========================================================================== */

.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
}

.practice-card {
  position: relative;
  min-height: 380px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: transform 0.45s var(--ease-out-expo), border-color 0.35s ease, box-shadow 0.45s ease;
}

.practice-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-accent);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.services-carousel .practice-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transform: scale(1.05);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transition: opacity 0.45s ease, transform 0.55s var(--ease-out-expo);
}

.services-carousel .practice-card.card-cybersecurity::before {
  background-image: url("assets/images/services/cybersecurity/cybersec-card.avif");
}

.services-carousel .practice-card.card-automation::before {
  background-image: url("assets/images/services/automation/automation-card.avif");
}

.services-carousel .practice-card.card-software-engineering::before {
  background-image: url("assets/images/services/swe/swe-card.avif");
}

.services-carousel .practice-card:hover::before {
  opacity: 0.22;
  transform: scale(1);
}

.practice-card>* {
  position: relative;
  z-index: 1;
}

.practice-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.25rem;
}

.pillar-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  font-size: 12px;
  transition: background 0.3s ease, color 0.3s ease;
}

.practice-card:hover .pillar-badge {
  background: #ffffff;
  color: #070707;
}

.pillar-tag {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.practice-card-body h3 {
  font-size: 1.45rem;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.practice-card-body p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 1.25rem;
}

.pillar-specs {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  border-top: 1px solid var(--border-subtle);
}

.pillar-specs li {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--text-secondary);
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pillar-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.25s ease;
}

.practice-card:hover .pillar-cta {
  color: #ffffff;
}

/* Social Proof & Engineering Benchmarks Strip */
.outcomes-strip {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(18, 18, 18, 0.8));
}

.outcome-item {
  padding-right: 1rem;
}

.outcome-kicker {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--accent-emerald);
  margin-bottom: 0.5rem;
}

.outcome-item strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 0.45rem;
}

.outcome-item p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   PROJECTS, INDUSTRIES & INSIGHTS
   ========================================================================== */

.project-preview-card,
.project-card,
.insight-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.35s var(--ease-out-expo), border-color 0.35s ease;
}

.project-preview-card:hover,
.project-card:hover,
.insight-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
}

.project-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.status-pill {
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-secondary);
}

.project-preview-card h3,
.insight-card h3 {
  font-size: 1.45rem;
  margin: 1rem 0 0.75rem;
}

.project-preview-card p,
.insight-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.project-tags span {
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-secondary);
  font: 400 9px "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font: 400 10px "JetBrains Mono", monospace;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.project-preview-cta,
.service-cta {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  transition: gap 0.25s ease, color 0.25s ease;
}

.project-preview-cta:hover,
.service-cta:hover {
  gap: 1.4rem;
  color: #ffffff;
}

/* Industries Matrix */
.industry-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border-subtle);
}

.industry-cell {
  padding: 2rem 1.75rem 2rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.industry-cell:nth-child(even) {
  padding-left: 1.75rem;
  padding-right: 0;
  border-left: 1px solid var(--border-subtle);
}

.industry-cell h3 {
  font-size: 1.4rem;
  margin: 0.75rem 0 0.5rem;
}

.industry-cell p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   EXECUTION MODEL (CIRCUIT TIMELINE)
   ========================================================================== */

.approach-container {
  max-width: 920px;
}

.approach-header {
  text-align: center;
  margin-bottom: 4.5rem;
}

.execution-marker {
  align-items: center;
}

.circuit-timeline {
  position: relative;
  display: grid;
  gap: 3.5rem;
}

.circuit-line-track {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.1);
}

.circuit-line-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.5));
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.35);
  transition: height 0.15s linear;
}

.meth-step {
  display: grid;
  grid-template-columns: 1fr 72px 1fr;
  align-items: center;
  position: relative;
  z-index: 1;
}

.meth-left {
  text-align: right;
  padding-right: 1.5rem;
}

.meth-right {
  text-align: left;
  padding-left: 1.5rem;
}

.meth-center {
  display: flex;
  justify-content: center;
}

.circuit-node {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: var(--bg-obsidian);
  display: grid;
  place-items: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-secondary);
  transition: all 0.4s var(--ease-out-expo);
}

.circuit-node.active {
  background: #ffffff;
  color: #070707;
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.75);
}

.step-content {
  opacity: 0.28;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s var(--ease-out-expo);
}

.step-content.is-active {
  opacity: 1;
  transform: translateY(0);
}

.step-content h3 {
  font-size: 1.35rem;
  margin-bottom: 0.4rem;
}

.step-content p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   WHITEPAPER & CONTACT / LEAD CAPTURE CONSOLE
   ========================================================================== */

.whitepaper-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  align-items: end;
  gap: clamp(3rem, 8vw, 7rem);
}

.whitepaper-download {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 15px 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: #ffffff;
  color: #070707;
  font: 600 11px "JetBrains Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.25s ease, color 0.25s ease;
}

.whitepaper-download:hover {
  background: transparent;
  color: #ffffff;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(340px, 0.85fr);
  align-items: start;
  gap: clamp(3rem, 7vw, 7rem);
}

.contact-headline {
  font-size: clamp(3.2rem, 7vw, 6.5rem);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.05em;
  margin-bottom: 1.5rem;
}

.contact-subcopy {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 32rem;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 2.25rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  font: 500 10px "JetBrains Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.contact-link svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  flex-shrink: 0;
}

.contact-link:hover {
  background: #ffffff;
  color: #070707;
  border-color: #ffffff;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(14, 14, 14, 0.75);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: var(--text-secondary);
  font: 500 10px "JetBrains Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contact-field-wide {
  grid-column: 1 / -1;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  color: #ffffff;
  background: rgba(8, 8, 8, 0.8);
  font: 400 14px "Inter", sans-serif;
  letter-spacing: 0;
  text-transform: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.contact-field input.is-invalid,
.contact-field textarea.is-invalid {
  border-color: var(--danger);
}

.field-error {
  color: var(--danger);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: none;
  min-height: 14px;
}

.contact-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.contact-submit {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.25rem;
  padding: 0 1.35rem;
  border-radius: 8px;
  border: 1px solid #ffffff;
  background: #ffffff;
  color: #070707;
  font: 600 11px "JetBrains Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.contact-submit:hover {
  background: transparent;
  color: #ffffff;
}

.btn-json-preview {
  min-height: 3.25rem;
  padding: 0 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-json-preview:hover {
  border-color: var(--border-hover);
  color: #ffffff;
}

.contact-note {
  margin: 0;
  color: var(--text-muted);
  font: 400 11px/1.5 "JetBrains Mono", monospace;
}

.contact-note.is-success {
  color: var(--accent-emerald);
}

.inquiry-json-preview {
  margin: 0;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: #050505;
  color: var(--text-secondary);
  font: 400 11px/1.5 "JetBrains Mono", monospace;
  overflow-x: auto;
}

.site-footer {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-meta {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: right;
}

.footer-meta p {
  margin: 0;
}

/* ==========================================================================
   SCROLL REVEAL ANIMATION STATES (IntersectionObserver)
   ========================================================================== */

.reveal-on-scroll,
.project-motion-enabled .project-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s var(--ease-out-expo), transform 0.75s var(--ease-out-expo);
}

.reveal-on-scroll.is-visible,
.project-motion-enabled .project-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   SUB-PAGE COMPATIBILITY (services/*, projects/project.html, whitepaper.html)
   ========================================================================== */

section.bg-\[\#f5f5f2\],
section.bg-\[\#f5f5f2\].text-black {
  background: var(--bg-slate) !important;
  color: var(--text-primary) !important;
  border-top: 1px solid var(--border-subtle);
}

section.bg-\[\#f5f5f2\] .text-neutral-500,
section.bg-\[\#f5f5f2\] .text-neutral-600 {
  color: var(--text-secondary) !important;
}

section.bg-\[\#f5f5f2\] .border-black\/10 {
  border-color: var(--border-subtle) !important;
}

section.bg-\[\#f5f5f2\] .border-black {
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
}

section.bg-\[\#f5f5f2\] .border-black:hover {
  background: #ffffff !important;
  color: #070707 !important;
}

.service-search-page {
  max-width: 56rem;
  margin: 4rem auto 0;
}

.service-search {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.7rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.service-search svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 1.5;
}

.service-search input {
  flex: 1;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  font: 400 13px "Inter", sans-serif;
}

.service-card-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.service-number {
  margin-bottom: 3rem;
  color: var(--text-muted);
  font: 400 10px "JetBrains Mono", monospace;
}

.service-trending-links,
.project-filter-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 0.75rem;
}

.service-trending-links button,
.project-filter-links button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text-secondary);
  background: transparent;
  font: 400 11px "JetBrains Mono", monospace;
  cursor: pointer;
}

.service-trending-links button:hover,
.project-filter-links button:hover,
.project-filter-links button.is-active {
  color: #ffffff;
  border-color: #ffffff;
}

.service-result[hidden],
.project-card[hidden] {
  display: none !important;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 1024px) {
  .grid-12 {
    grid-template-columns: 1fr;
  }

  .col-span-4,
  .col-span-5,
  .col-span-7,
  .col-span-8 {
    grid-column: auto;
  }

  .grid-3,
  .outcomes-strip,
  .service-card-grid,
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-telemetry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .founder-grid,
  .whitepaper-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .founder-portrait-wrap {
    justify-self: start;
  }
}

@media (max-width: 820px) {

  .island-links-desktop,
  .island-divider,
  .island-shell>.island-link,
  .island-shell>.nav-dropdown {
    display: none;
  }

  .mobile-drawer-toggle {
    display: inline-flex;
  }

  .dynamic-island {
    left: 12px !important;
    right: calc(var(--nav-bar-h, 52px) + 20px) !important;
    width: auto !important;
  }

  .island-shell {
    width: 100%;
    justify-content: space-between;
  }

  .island-contact {
    margin-left: auto;
    margin-right: 6px;
  }

  .circuit-line-track {
    left: 24px;
  }

  .meth-step {
    grid-template-columns: 48px 1fr;
    gap: 1.25rem;
  }

  .meth-left,
  .meth-right {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
    padding: 0;
  }

  .meth-side:empty {
    display: none;
  }

  .meth-center {
    grid-column: 1;
    grid-row: 1;
  }
}

@media (max-width: 640px) {

  .grid-3,
  .outcomes-strip,
  .principles-grid,
  .industry-matrix,
  .hero-telemetry-grid,
  .contact-links,
  .contact-form,
  .service-card-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .industry-cell:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }

  .section-header-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-meta {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal-on-scroll,
  .project-reveal,
  .step-content {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .scroll-line {
    animation: none;
  }
}


/* ==========================================================================
   UNIFIED CORPORATE FOOTER (Main Site & Blog)
   ========================================================================== */
.site-footer-corporate {
  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;
}

.footer-container {
  max-width: var(--container-max, 1280px);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 1.5rem);
}

.footer-columns-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-col-brand .footer-brand-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.75rem;
}

.footer-brand-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ffffff;
}

.footer-tagline {
  font-size: 11px;
  color: #c4b5fd;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.footer-desc {
  font-size: 0.85rem;
  line-height: 1.65;
  color: #888888;
  margin-bottom: 1.25rem;
  max-width: 380px;
}

.footer-hq-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: #777777;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
}

.footer-dot-green {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  display: inline-block;
  flex-shrink: 0;
}

.footer-heading {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: #ffffff;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
}

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

.footer-nav-list a {
  color: #999999;
  transition: all 0.2s ease;
  text-decoration: none;
}

.footer-nav-list a:hover {
  color: #ffffff;
  transform: translateX(2px);
  display: inline-block;
}

.footer-status-pill {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #34d399;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 4px 10px;
  border-radius: 999px;
}

.footer-bottom-bar {
  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-size: 11px;
  color: #666666;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.footer-sep {
  opacity: 0.3;
}

@media (max-width: 1180px) {
  .footer-columns-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.25rem;
  }
}

@media (max-width: 640px) {
  .footer-columns-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .blog-search-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .blog-search-wrap,
  .blog-filter-toggle-wrap {
    width: 100%;
  }
  .btn-filter-toggle {
    width: 100%;
    justify-content: center;
  }
  .blog-search-input-shell {
    width: 100%;
    min-width: 0;
  }
  .blog-search-input {
    min-width: 0;
    width: 100%;
  }
}

/* ==========================================================================
   BLOG SEARCH & FILTER ENGINE STYLES
   ========================================================================== */
.blog-search-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 40;
}

.blog-search-wrap {
  flex: 1;
  position: relative;
}

.blog-search-input-shell {
  display: flex;
  align-items: center;
  background: #090909;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0 14px;
  height: 48px;
  transition: all 0.25s ease;
}

.blog-search-input-shell:focus-within {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18), 0 10px 25px rgba(0, 0, 0, 0.4);
  background: #0d0d0d;
}

.blog-search-icon {
  color: #888888;
  flex-shrink: 0;
  margin-right: 10px;
}

.blog-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 14px;
  font-family: "Inter", sans-serif;
}

.blog-search-input::placeholder {
  color: #666666;
}

.blog-search-clear {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #cccccc;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  margin-right: 8px;
  transition: all 0.15s ease;
}

.blog-search-clear:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.blog-search-shortcut {
  font-size: 11px;
  color: #666666;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Dynamic Suggestions Dropdown */
.blog-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(124, 58, 237, 0.1);
  overflow: hidden;
  z-index: 100;
  max-height: 380px;
  display: flex;
  flex-direction: column;
}

.blog-suggestions-list {
  overflow-y: auto;
  max-height: 330px;
}

.suggestion-item {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.is-selected {
  background: rgba(124, 58, 237, 0.12);
}

.suggestion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.suggestion-title {
  font-size: 13.5px;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.4;
}

.suggestion-highlight {
  color: #c4b5fd;
  font-weight: 600;
  background: rgba(124, 58, 237, 0.25);
  padding: 1px 3px;
  border-radius: 3px;
}

.suggestion-meta {
  font-size: 11px;
  color: #777777;
  display: flex;
  gap: 10px;
}

.blog-dropdown-footer {
  padding: 8px 16px;
  background: #080808;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 10.5px;
  color: #666666;
  text-align: center;
}

.blog-dropdown-footer kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1px 4px;
  border-radius: 3px;
  color: #aaaaaa;
}

/* Filter & Sort Toggle Button */
.blog-filter-toggle-wrap {
  position: relative;
}

.btn-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  background: #090909;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #ffffff;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-filter-toggle:hover,
.btn-filter-toggle.is-active {
  border-color: #7c3aed;
  background: #111111;
  color: #c4b5fd;
}

.filter-badge {
  background: #7c3aed;
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1;
}

/* Filter & Sort Popover Panel */
.blog-filter-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(124, 58, 237, 0.08);
  padding: 1.25rem;
  z-index: 100;
}

.filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.filter-panel-close {
  background: transparent;
  border: none;
  color: #777777;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.filter-panel-close:hover {
  color: #ffffff;
}

.filter-group {
  margin-bottom: 1.25rem;
}

.filter-label {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #aaaaaa;
  margin-bottom: 8px;
}

.filter-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-choice-chip {
  font-size: 10.5px;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #999999;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-choice-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.filter-choice-chip.active {
  background: rgba(124, 58, 237, 0.2);
  border-color: #7c3aed;
  color: #c4b5fd;
  font-weight: 500;
}

.filter-select {
  width: 100%;
  background: #070707;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #ffffff;
  padding: 8px 12px;
  font-size: 12px;
  outline: none;
}

.filter-select:focus {
  border-color: #7c3aed;
}

.filter-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-filter-reset {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #999999;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
}

.btn-filter-reset:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-filter-apply {
  background: #7c3aed;
  border: none;
  color: #ffffff;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-filter-apply:hover {
  background: #6d28d9;
}

/* Active Chips Bar */
.active-chips-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.5rem;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.active-chips-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #777777;
}

.active-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 3px 8px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(196, 181, 253, 0.25);
  color: #c4b5fd;
  border-radius: 4px;
}

.active-chip-remove {
  cursor: pointer;
  opacity: 0.6;
  font-size: 12px;
}

.active-chip-remove:hover {
  opacity: 1;
}

.btn-clear-chips {
  background: transparent;
  border: none;
  color: #888888;
  font-size: 10.5px;
  text-decoration: underline;
  cursor: pointer;
  margin-left: auto;
}

.btn-clear-chips:hover {
  color: #ffffff;
}

/* Results Meta Bar */
.results-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  font-size: 11px;
  color: #777777;
  letter-spacing: 0.05em;
}

/* Empty State Card */
.articles-empty-state {
  text-align: center;
  padding: 4.5rem 2rem;
  background: #090909;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  margin: 1rem 0;
}

.empty-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.1);
  margin-bottom: 1.25rem;
}

.articles-empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.articles-empty-state p {
  font-size: 13.5px;
  max-width: 420px;
  margin: 0 auto 1.5rem;
}

.btn-empty-reset {
  background: #7c3aed;
  border: none;
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-empty-reset:hover {
  background: #6d28d9;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}

/* Card Series Accent Borders */
.article-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.article-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.article-card.series-threatscape:hover {
  border-top-color: #f43f5e;
  box-shadow: 0 12px 30px rgba(244, 63, 94, 0.15);
}

.article-card.series-field-notes:hover {
  border-top-color: #38bdf8;
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.15);
}

.article-card.series-cybersecurity-intelligence:hover {
  border-top-color: #7c3aed;
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.15);
}

.article-card.series-regulatory-compliance:hover {
  border-top-color: #f59e0b;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.15);
}

.article-card.series-automation-engineering:hover {
  border-top-color: #10b981;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.15);
}

.article-card.series-research-whitepapers:hover {
  border-top-color: #c4b5fd;
  box-shadow: 0 12px 30px rgba(196, 181, 253, 0.15);
}

/* Publication Cover Wrapper & Fallback Styling (Synchronized with Corporate Design System) */
.insight-card.article-card .insight-cover-wrap {
  width: calc(100% + 4rem);
  margin: -2rem -2rem 1.25rem -2rem;
  height: 180px;
  overflow: hidden;
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.insight-card.article-card .insight-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.insight-card.article-card:hover .insight-cover-img {
  transform: scale(1.05);
}

.insight-card.article-card .insight-cover-fallback {
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.insight-card.article-card .insight-cover-accent-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.insight-card.article-card .insight-cover-kicker {
  font-size: 9px;
  letter-spacing: 0.14em;
  opacity: 0.85;
}

/* ==========================================================================
   Section 9: Table of Contents — Scroll Margin Offset
   ========================================================================== */
.article-body h2,
.article-body h3,
.article-body h4,
.article-main-column h2,
.article-main-column h3,
[id^="heading-"],
.toc-target {
  scroll-margin-top: 105px !important;
}

/* ==========================================================================
   Section 3: Reader Profile Control (Stationary Avatar + Synchronized Nav System)
   ========================================================================== */
:root {
  --nav-bar-h: 64px;
  --nav-bar-w: 560px;
}

.reader-profile-widget {
  position: fixed;
  top: 18px;
  left: min(calc(50% + (var(--nav-bar-w, 560px) / 2) + 10px), calc(100vw - var(--nav-bar-h, 64px) - 12px));
  z-index: 99990;
  height: var(--nav-bar-h, 64px);
  display: flex;
  align-items: center;
  transform: translate3d(0, 0, 0);
  transition: transform 0.45s var(--ease-out-expo), top 0.3s ease;
  pointer-events: auto;
}

.reader-profile-widget.is-scrolled {
  top: 12px;
}

.reader-profile-widget.is-hidden {
  transform: translate3d(0, calc(-100% - 28px), 0);
  pointer-events: none;
}

.profile-capsule-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  height: var(--nav-bar-h, 64px);
  width: var(--nav-bar-h, 64px);
  min-width: var(--nav-bar-h, 64px);
  padding: 0;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.08), transparent 40%), rgba(7, 7, 7, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
  overflow: hidden;
  outline: none;
  box-sizing: border-box;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.reader-profile-widget.is-scrolled .profile-capsule-btn {
  background: rgba(7, 7, 7, 0.9);
  border-color: rgba(255, 255, 255, 0.18);
}

.profile-capsule-btn:focus-visible {
  border-color: rgba(196, 181, 253, 0.6);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.3);
}

.profile-avatar-wrap {
  width: var(--nav-bar-h, 64px);
  height: var(--nav-bar-h, 64px);
  min-width: var(--nav-bar-h, 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  color: var(--accent-violet, #c4b5fd);
  transition: transform 0.25s ease;
  pointer-events: none;
}

.profile-avatar-wrap img {
  width: calc(var(--nav-bar-h, 64px) - 24px);
  height: calc(var(--nav-bar-h, 64px) - 24px);
  min-width: 32px;
  min-height: 32px;
  border-radius: 50%;
  object-fit: cover;
  pointer-events: none;
}

.profile-avatar-svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent-violet, #c4b5fd);
  pointer-events: none;
}

.profile-greeting-shelf {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, padding 0.35s ease;
  padding-right: 0;
}

.profile-greeting-shelf .greeting-prefix {
  color: var(--text-muted, #71717a);
  font-size: 11px;
}

.profile-greeting-shelf .greeting-name {
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Desktop Hover Expansion: expands smoothly towards the right, avatar stays stationary */
@media (hover: hover) and (pointer: fine) {
  .profile-capsule-btn:hover {
    width: auto;
    background: rgba(14, 18, 27, 0.94);
    border-color: rgba(196, 181, 253, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 20px rgba(124, 58, 237, 0.2);
  }

  .profile-capsule-btn:hover .profile-greeting-shelf {
    max-width: 240px;
    opacity: 1;
    padding-right: 18px;
    margin-left: 2px;
  }
}

/* Mobile & Touch */
@media (max-width: 820px) {
  :root {
    --nav-bar-h: 52px;
  }

  .dynamic-island {
    --island-h: 40px !important;
    left: max(12px, env(safe-area-inset-left, 0px)) !important;
    right: calc(var(--nav-bar-h, 52px) + max(20px, env(safe-area-inset-right, 0px))) !important;
    width: auto !important;
    max-width: none !important;
    transform: translate3d(0, 0, 0) !important;
    top: max(18px, env(safe-area-inset-top, 0px)) !important;
  }

  .dynamic-island.is-scrolled {
    top: max(12px, env(safe-area-inset-top, 0px)) !important;
  }

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

  .reader-profile-widget {
    top: max(18px, env(safe-area-inset-top, 0px)) !important;
    right: max(12px, env(safe-area-inset-right, 0px)) !important;
    left: auto !important;
    height: var(--nav-bar-h, 52px) !important;
    transform: translate3d(0, 0, 0);
  }

  .reader-profile-widget.is-scrolled {
    top: max(12px, env(safe-area-inset-top, 0px)) !important;
  }

  .reader-profile-widget.is-hidden {
    transform: translate3d(0, calc(-100% - 28px), 0) !important;
  }

  .profile-capsule-btn {
    width: var(--nav-bar-h, 52px) !important;
    height: var(--nav-bar-h, 52px) !important;
    min-width: var(--nav-bar-h, 52px) !important;
  }

  .profile-avatar-wrap {
    width: var(--nav-bar-h, 52px) !important;
    height: var(--nav-bar-h, 52px) !important;
    min-width: var(--nav-bar-h, 52px) !important;
  }

  .profile-greeting-shelf {
    display: none !important;
  }
}

/* ==========================================================================
   Section 5: Reader Profile & Settings Modal Interface (Public Blog Theme)
   ========================================================================== */
.reader-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.reader-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.reader-profile-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.97);
  width: calc(100% - 32px);
  max-width: 820px; /* Target desktop width 760–860px */
  max-height: 88vh;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.04), transparent 60%), #09090b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  color: #f4f4f5;
  box-sizing: border-box;
}

.reader-profile-modal.is-open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.cookie-preferences-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.97);
  width: calc(100% - 32px);
  max-width: 580px;
  max-height: 88vh;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.04), transparent 60%), #09090b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  color: #f4f4f5;
  box-sizing: border-box;
}

.cookie-preferences-modal.is-open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.reader-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.015);
}

.reader-modal-header .btn-close-profile-modal {
  background: transparent;
  border: none;
  color: #a1a1aa;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}

.reader-modal-header .btn-close-profile-modal:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.reader-modal-body {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  flex-grow: 1;
}

.reader-modal-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 1rem 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 9, 11, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10;
}

/* Modal 5-Section Architecture */
.reader-modal-section {
  padding-top: 1.35rem;
  margin-top: 1.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.reader-modal-section:first-child,
.reader-modal-section.no-border {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

.reader-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.reader-section-label {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a1a1aa;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 14px;
}

@media (max-width: 680px) {
  .profile-form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.modal-guest-warning {
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(196, 181, 253, 0.18);
  border-left: 3px solid #7c3aed;
  color: #d4d4d8;
  font-size: 11.5px;
  line-height: 1.55;
  margin-bottom: 0.5rem;
}

.modal-guest-warning .guest-warning-title {
  color: #c4b5fd;
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.modal-guest-warning .guest-warning-desc {
  margin: 0;
  font-size: 11.5px;
  color: #a1a1aa;
  line-height: 1.5;
}

.empty-engagement-history {
  padding: 1.5rem 1rem;
  text-align: center;
  font-family: var(--font-jetbrains, monospace);
  font-size: 11.5px;
  color: #71717a;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
  line-height: 1.5;
}

/* Tablet & Mobile Responsiveness for Modal */
@media (max-width: 1024px) {
  .reader-profile-modal,
  .cookie-preferences-modal {
    width: 90vw;
    max-width: 90vw;
    max-height: 88vh;
  }
}

@media (max-width: 600px) {
  .reader-profile-modal,
  .cookie-preferences-modal {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    max-height: 92dvh;
    border-radius: 14px;
  }

  .reader-modal-header {
    padding: 1rem 1.25rem;
  }

  .reader-modal-body {
    padding: 1.15rem 1.25rem;
  }

  .reader-modal-footer {
    padding: 0.85rem 1.25rem;
    flex-wrap: wrap;
  }

  .reader-modal-footer .btn {
    flex: 1 1 calc(50% - 6px);
    text-align: center;
    justify-content: center;
  }
}

/* Modal Form Controls */
.reader-profile-modal .form-input,
.reader-profile-modal .form-textarea {
  background: rgba(0, 0, 0, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  color: #ffffff !important;
  font-family: var(--font-jetbrains, "JetBrains Mono", monospace) !important;
  font-size: 12.5px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.reader-profile-modal .form-input:focus,
.reader-profile-modal .form-textarea:focus {
  outline: none !important;
  border-color: rgba(196, 181, 253, 0.6) !important;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.25) !important;
}

.reader-profile-modal .btn-primary {
  background: #7c3aed !important;
  border: 1px solid #7c3aed !important;
  color: #ffffff !important;
  padding: 8px 18px !important;
  font-size: 12px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-family: var(--font-jetbrains, "JetBrains Mono", monospace) !important;
  font-weight: 500 !important;
  transition: background 0.2s ease !important;
}

.reader-profile-modal .btn-primary:hover {
  background: #6d28d9 !important;
  border-color: #6d28d9 !important;
}

.reader-profile-modal .btn-secondary {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #e4e4e7 !important;
  padding: 8px 16px !important;
  font-size: 12px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-family: var(--font-jetbrains, "JetBrains Mono", monospace) !important;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
}

.reader-profile-modal .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

/* Identity Providers Option Cards */
.auth-provider-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.auth-provider-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(196, 181, 253, 0.25);
}

.auth-provider-card.auth-provider-connected {
  background: rgba(52, 211, 153, 0.03);
  border-color: rgba(52, 211, 153, 0.2);
}

.auth-provider-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  background: #7c3aed;
  border: 1px solid #7c3aed;
  color: #ffffff;
  transition: background 0.2s ease;
}

.auth-provider-btn:hover {
  background: #6d28d9;
}

/* ==========================================================================
   Section 12: Privacy & Cookie Consent Banner
   ========================================================================== */
.privacy-consent-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 860px;
  background: rgba(14, 18, 27, 0.95);
  border: 1px solid rgba(196, 181, 253, 0.25);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(124, 58, 237, 0.15);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 99995;
  display: none;
}

.consent-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.consent-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .privacy-consent-banner {
    width: calc(100% - 24px);
    max-width: calc(100vw - 24px);
    left: 12px;
    transform: none;
    bottom: 12px;
    padding: 1rem;
    box-sizing: border-box;
  }

  .consent-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.875rem;
  }

  .consent-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .consent-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Toast Container */
.gct-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 10px 18px;
  border-radius: 8px;
  background: rgba(14, 18, 27, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
  z-index: 100000;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.gct-toast-container.is-active {
  opacity: 1;
  transform: translateY(0);
}

.gct-toast-container.toast-success {
  border-color: rgba(34, 197, 94, 0.4);
  color: #4ade80;
}

.gct-toast-container.toast-error {
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.gct-toast-container.toast-info {
  border-color: rgba(196, 181, 253, 0.4);
  color: #c4b5fd;
}

/* ==========================================================================
   Section 13: Dedicated Reader Profile Page (/profile.html)
   ========================================================================== */
.profile-page-shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 7.5rem 1.5rem 5rem 1.5rem;
  position: relative;
  z-index: 2;
}

.profile-page-header {
  margin-bottom: 2.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.profile-header-main {
  flex: 1;
  min-width: 280px;
}

.profile-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.75rem;
}

.profile-page-title {
  font-family: var(--font-space, "Space Grotesk", sans-serif);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.profile-page-desc {
  font-size: 15px;
  color: #a1a1aa;
  max-width: 680px;
  line-height: 1.6;
  margin: 0;
}

.profile-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-jetbrains, "JetBrains Mono", monospace);
  font-size: 12px;
  color: #e4e4e7;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.profile-back-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(196, 181, 253, 0.3);
  transform: translateX(-2px);
}

/* Profile Overview Hero Card */
.profile-overview-card {
  background: radial-gradient(circle at 0% 0%, rgba(124, 58, 237, 0.08), transparent 70%), #09090b;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 1.85rem 2.25rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
  flex-wrap: wrap;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.profile-overview-identity {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
  min-width: 280px;
}

.profile-avatar-large {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.25) 0%, rgba(18, 18, 22, 0.9) 100%);
  border: 1.5px solid rgba(196, 181, 253, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-jetbrains, "JetBrains Mono", monospace);
  font-size: 22px;
  font-weight: 600;
  color: #ffffff;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.2);
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-overview-details {
  flex: 1;
}

.profile-overview-name {
  font-family: var(--font-space, "Space Grotesk", sans-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#overview-status-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.profile-overview-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-jetbrains, "JetBrains Mono", monospace);
  font-size: 12px;
  color: #a1a1aa;
}

.profile-overview-email {
  color: #d4d4d8;
}

.profile-overview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-overview-actions .btn {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-size: 11.5px;
  font-weight: 500;
  font-family: var(--font-jetbrains, "JetBrains Mono", monospace);
  border-radius: 7px;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
  box-sizing: border-box;
  white-space: nowrap;
  text-decoration: none;
}

#overview-btn-edit {
  background: rgba(255, 255, 255, 0.05);
  color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

#overview-btn-edit:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(196, 181, 253, 0.3);
  color: #ffffff;
  transform: translateY(-1px);
}

#overview-btn-signout {
  background: rgba(239, 68, 68, 0.06) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.22) !important;
}

#overview-btn-signout:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.38) !important;
  color: #fecaca !important;
  transform: translateY(-1px);
}

/* Stacked Section Cards */
.profile-card {
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.75rem 2rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.profile-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.profile-card-title {
  font-family: var(--font-mono, monospace);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a1a1aa;
  font-weight: 600;
  margin: 0;
}

/* General Profile Form Controls (Dark Obsidian Theme) */
.profile-card .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1.25rem;
}

.profile-card .form-label {
  font-family: var(--font-jetbrains, "JetBrains Mono", monospace);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a1a1aa;
  font-weight: 500;
  display: block;
}

.profile-card .form-input {
  background: #0d0d12 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  height: 42px !important;
  padding: 0 14px !important;
  color: #f4f4f5 !important;
  font-family: var(--font-jetbrains, "JetBrains Mono", monospace) !important;
  font-size: 13px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

.profile-card .form-textarea {
  background: #0d0d12 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  min-height: 96px !important;
  padding: 12px 14px !important;
  color: #f4f4f5 !important;
  font-family: var(--font-jetbrains, "JetBrains Mono", monospace) !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  resize: vertical !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

.profile-card .form-input:focus,
.profile-card .form-textarea:focus {
  outline: none !important;
  border-color: rgba(196, 181, 253, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2) !important;
  background: #111117 !important;
}

.profile-card .form-input::placeholder,
.profile-card .form-textarea::placeholder {
  color: #52525b !important;
}

.profile-card .form-input[readonly] {
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  color: #a1a1aa !important;
  cursor: not-allowed !important;
}

.profile-card .form-helper {
  font-family: var(--font-jetbrains, "JetBrains Mono", monospace);
  font-size: 11px;
  color: #71717a;
  line-height: 1.4;
  margin-top: 4px;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 0.25rem;
}

.profile-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  flex-wrap: wrap;
}

#profile-btn-save-general {
  background: #7c3aed !important;
  border: 1px solid #7c3aed !important;
  color: #ffffff !important;
  padding: 10px 22px !important;
  border-radius: 8px !important;
  font-family: var(--font-jetbrains, "JetBrains Mono", monospace) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.25) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#profile-btn-save-general:hover {
  background: #6d28d9 !important;
  border-color: #6d28d9 !important;
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.4) !important;
  transform: translateY(-1px) !important;
}

#profile-btn-save-general:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(196, 181, 253, 0.5) !important;
}

/* Identity Provider Cards */
.auth-provider-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.auth-provider-card.auth-provider-connected {
  background: rgba(16, 185, 129, 0.025);
  border-color: rgba(16, 185, 129, 0.2);
}

.provider-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-provider-title {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.auth-provider-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #34d399;
  margin-top: 2px;
}

.provider-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
  flex-shrink: 0;
}

.profile-btn-prov-signout {
  height: 32px;
  padding: 0 14px;
  font-size: 11px;
  border-radius: 6px;
  font-family: var(--font-jetbrains, "JetBrains Mono", monospace);
  font-weight: 500;
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.06);
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.profile-btn-prov-signout:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.38);
  color: #fecaca;
  transform: translateY(-1px);
}

/* Server-Side Account Deletion Box */
.account-deletion-box {
  background: rgba(239, 68, 68, 0.03);
  border: 1px solid rgba(239, 68, 68, 0.16);
  border-radius: 10px;
  padding: 16px 20px;
  margin-top: 1.5rem;
}

#profile-btn-request-deletion {
  background: rgba(239, 68, 68, 0.06);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
  height: 34px;
  padding: 0 16px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 500;
  font-family: var(--font-jetbrains, "JetBrains Mono", monospace);
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

#profile-btn-request-deletion:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  transform: translateY(-1px);
}

/* Activity Items */
.activity-item-card {
  padding: 14px 18px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.activity-item-card:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(196, 181, 253, 0.25);
}

.activity-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 10px;
}

.activity-item-pub-link {
  font-family: var(--font-jetbrains, "JetBrains Mono", monospace);
  font-size: 12px;
  font-weight: 600;
  color: #c4b5fd;
  text-decoration: none;
  transition: color 0.2s ease;
}

.activity-item-pub-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.activity-item-body {
  font-size: 13px;
  color: #d4d4d8;
  line-height: 1.5;
}

.empty-engagement-history {
  padding: 2.25rem 1.5rem;
  text-align: center;
  color: #71717a;
  font-family: var(--font-jetbrains, "JetBrains Mono", monospace);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  line-height: 1.6;
}

/* Privacy & Data Rights Buttons */
#profile-btn-export-data,
#profile-btn-manage-consent {
  height: 38px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 12px;
  font-family: var(--font-jetbrains, "JetBrains Mono", monospace);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e4e4e7;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

#profile-btn-export-data:hover,
#profile-btn-manage-consent:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(196, 181, 253, 0.3);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Guest View Card on Profile Page */
.profile-guest-card {
  background: radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.1), transparent 70%), #09090b;
  border: 1px solid rgba(196, 181, 253, 0.25);
  border-radius: 16px;
  padding: 3.5rem 2.5rem;
  text-align: center;
  max-width: 640px;
  margin: 3rem auto;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);
}

.profile-guest-card .guest-icon-bubble {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(196, 181, 253, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
  color: #c4b5fd;
}

.profile-guest-title {
  font-family: var(--font-space, "Space Grotesk", sans-serif);
  font-size: 1.65rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.profile-guest-desc {
  font-size: 14px;
  color: #a1a1aa;
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.profile-guest-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Responsive adjustments for Profile Page */
@media (max-width: 640px) {
  .profile-overview-card {
    padding: 1.5rem;
    gap: 1.25rem;
  }
  .profile-overview-identity {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    min-width: 100%;
  }
  .profile-overview-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }
  .profile-overview-actions .btn {
    flex: 1;
    text-align: center;
  }
  .profile-card {
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
  }
  .profile-form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .profile-form-footer {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 10px;
  }
  .profile-form-footer button {
    width: 100%;
  }
  .profile-form-footer span {
    text-align: center;
  }
  .auth-provider-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .auth-provider-card button {
    width: 100%;
  }
  .account-deletion-box > div {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .account-deletion-box button {
    width: 100%;
  }
}

/* Loading state for profile button */
.profile-capsule-btn.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

/* -----------------------------------------------------------------------------
 * ARTICLE BOOKMARKS & READING LIST (Phase C)
 * -------------------------------------------------------------------------- */
.btn-bookmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  color: var(--text-secondary, #a1a1aa);
  padding: 8px 16px;
  border-radius: 9999px;
  font-family: var(--font-jetbrains, monospace);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-bookmark:hover {
  color: #ffffff;
  border-color: rgba(196, 181, 253, 0.4);
  background: rgba(124, 58, 237, 0.08);
}

.btn-bookmark.bookmarked {
  background: rgba(124, 58, 237, 0.15);
  border-color: #8b5cf6;
  color: #c4b5fd;
}

.btn-bookmark svg {
  width: 15px;
  height: 15px;
  transition: transform 0.2s ease;
}

.btn-bookmark:hover svg {
  transform: scale(1.15);
}

.btn-bookmark.bookmarked svg {
  fill: #8b5cf6;
  stroke: #8b5cf6;
}

.bookmarks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bookmark-item-card {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.2s ease;
}

.bookmark-item-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(196, 181, 253, 0.25);
}

.bookmark-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.bookmark-item-title {
  font-family: var(--font-jetbrains, monospace);
  font-size: 13.5px;
  font-weight: 600;
  color: #f4f4f5;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.bookmark-item-title:hover {
  color: #c4b5fd;
}

.bookmark-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: #71717a;
}

.bookmark-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-remove-bookmark {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  font-family: var(--font-jetbrains, monospace);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-remove-bookmark:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: #ef4444;
  color: #ffffff;
}

.empty-bookmarks {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #71717a;
  font-family: var(--font-jetbrains, monospace);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

/* ==========================================================================
   DYNAMIC RESPONSIVE ENGINE & RESOLUTION-INDEPENDENT ADAPTATION
   ========================================================================== */

@media (max-width: 380px) {
  .island-brand span {
    font-size: 11px;
    letter-spacing: 0.04em;
  }
  .island-contact {
    display: none;
  }
}

@media (min-width: 2560px) {
  .container {
    max-width: min(1500px, 86vw);
    margin-inline: auto;
  }
}

/* Safe area padding support */
@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
}

