/* ==========================================================================
   usmansaleem.me Master Stylesheet
   - Warm Swiss/Braun Editorial & Electromechanical Engineering Precision
   - Live Viscoelastic Strain Gauge, Directional Telemetry & Idle Props
   - Playable ASSA ABLOY SL500 Electromechanical Door Console with Doppler Waves
   - Native <dialog> Modal with Discrete Entry/Exit Transitions
   ========================================================================== */

:root {
  --bg-page: #fbf8f3;
  --bg-card: #ffffff;
  --bg-card-subtle: #f6f3eb;
  --bg-badge: #eee9df;
  --text-main: #14171a;
  --text-muted: #5e6876;
  --text-faint: #8a96a3;

  /* Brand Accents */
  --brand-orange: #ff541e;
  --brand-orange-hover: #e04412;
  --brand-orange-light: #fff2ed;
  --brand-orange-glow: rgba(255, 84, 30, 0.28);
  --accent-cyan: #00d2ff;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;

  /* Borders & Shadows */
  --border-light: rgba(0, 0, 0, 0.08);
  --border-subtle: rgba(0, 0, 0, 0.05);
  --shadow-card: 0 16px 36px -12px rgba(20, 23, 26, 0.06), 0 2px 6px -1px rgba(20, 23, 26, 0.04);
  --shadow-hover: 0 24px 48px -12px rgba(255, 84, 30, 0.14), 0 8px 16px -2px rgba(20, 23, 26, 0.06);
  --shadow-modal: 0 25px 60px -15px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12);

  /* Radii & Typography */
  --radius-card: 28px;
  --radius-modal: 24px;
  --radius-sm: 10px;
  --radius-pill: 9999px;
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: clip;
}

body {
  background-color: var(--bg-page);
  /* Architectural micro-grid background */
  background-image: radial-gradient(rgba(20, 23, 26, 0.055) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 14px 12px 64px 12px;
  overflow-x: clip;
}

@media (min-width: 640px) {
  body {
    padding: 20px 18px 80px 18px;
  }
}

.page-wrapper {
  max-width: 1040px;
  margin: 0 auto;
  width: 100%;
}

/* ==========================================================================
   Header Navigation (Floating Glass Pill + Live Status)
   ========================================================================== */

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.035);
  position: sticky;
  top: 10px;
  z-index: 100;
}

@media (min-width: 640px) {
  .site-nav {
    padding: 10px 18px;
    margin-bottom: 26px;
    top: 14px;
  }
}

.nav-brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-handle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 800;
  color: var(--text-main);
  font-size: 0.94rem;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.handle-dot {
  width: 9px;
  height: 9px;
  background-color: var(--brand-orange);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255, 84, 30, 0.22);
}

.status-pill {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.1);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(16, 185, 129, 0.22);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.status-pill-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-green);
  border-radius: 50%;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
}

@media (min-width: 640px) {
  .nav-links {
    gap: 16px;
  }
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.86rem;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--brand-orange);
}

@media (max-width: 640px) {
  .nav-links li:not(:last-child),
  .status-pill {
    display: none;
  }
}

.audio-toggle-btn {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 5px 11px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.audio-toggle-btn:hover {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
  background: var(--brand-orange-light);
}

.audio-toggle-btn.muted {
  opacity: 0.6;
}

/* ==========================================================================
   Hero Card
   ========================================================================== */

.hero-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  padding: 26px 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  align-items: center;
  margin-bottom: 34px;
  position: relative;
  overflow: hidden;
}

@media (min-width: 640px) {
  .hero-card {
    padding: 36px 32px;
    border-radius: var(--radius-card);
  }
}

@media (min-width: 860px) {
  .hero-card {
    grid-template-columns: 1.15fr 0.85fr;
    padding: 50px 46px;
    gap: 38px;
    margin-bottom: 44px;
  }
}

.hero-stage {
  order: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-width: 0;
  width: 100%;
}

.hero-content {
  order: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

@media (max-width: 859px) {
  .hero-content {
    text-align: center;
    align-items: center;
  }
}

@media (min-width: 860px) {
  .hero-content {
    order: 1;
    text-align: left;
    align-items: flex-start;
  }
  .hero-stage {
    order: 2;
  }
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--brand-orange-light);
  color: var(--brand-orange);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 84, 30, 0.16);
}

.hero-title {
  font-size: clamp(2.05rem, 7vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -1.2px;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--text-main);
}

.highlight-name {
  position: relative;
  display: inline-block;
  color: #ffffff;
  padding: 0 10px;
  z-index: 1;
}

.highlight-name::before {
  content: '';
  position: absolute;
  top: 6%;
  left: 0;
  width: 100%;
  height: 92%;
  background-color: var(--brand-orange);
  border-radius: 8px;
  z-index: -1;
  transform: rotate(-1.5deg);
}

.hero-bio {
  font-size: clamp(0.95rem, 2.5vw, 1.06rem);
  color: var(--text-muted);
  line-height: 1.62;
  margin-bottom: 18px;
  max-width: 540px;
}

.hero-bio-secondary {
  font-size: 0.93rem;
  margin-top: -6px;
  margin-bottom: 20px;
}

.hero-bio strong {
  color: var(--text-main);
  font-weight: 700;
}

/* Engineering Micro-Stats Deck */
.hero-mini-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 10px 16px;
  margin-bottom: 22px;
  width: fit-content;
  max-width: 100%;
}

@media (max-width: 859px) {
  .hero-mini-stats {
    margin: 0 auto 22px auto;
  }
}

.mini-stat {
  display: flex;
  flex-direction: column;
}

.mini-stat-val {
  font-size: 1.05rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--brand-orange);
  line-height: 1.15;
}

.mini-stat-lbl {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
}

.mini-stat-divider {
  width: 1px;
  height: 24px;
  background: var(--border-light);
}

@media (max-width: 420px) {
  .mini-stat-divider {
    display: none;
  }
  .hero-mini-stats {
    gap: 10px 18px;
    padding: 10px 12px;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  width: 100%;
}

@media (max-width: 859px) {
  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

.btn-primary {
  background-color: var(--brand-orange);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 6px 16px -2px rgba(255, 84, 30, 0.35);
}

.btn-primary:hover {
  background-color: var(--brand-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -2px rgba(255, 84, 30, 0.45);
}

.btn-secondary {
  background-color: var(--bg-card-subtle);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background-color: #ede9e0;
  border-color: rgba(0, 0, 0, 0.16);
}

.social-pills {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-pill {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
}

.social-pill:hover {
  color: var(--brand-orange);
  border-color: var(--brand-orange);
  background: var(--brand-orange-light);
  transform: translateY(-2px);
}

/* ==========================================================================
   Plush Face, Strain Telemetry & Tactile Controls
   ========================================================================== */

.plush-container {
  width: 248px;
  max-width: 72vw;
  aspect-ratio: 1;
  position: relative;
  margin: 10px auto 0 auto;
}

@media (min-width: 640px) {
  .plush-container {
    width: 296px;
  }
}

@media (min-width: 860px) {
  .plush-container {
    width: 336px;
    max-width: 100%;
    margin-top: 0;
  }
}

.plush {
  width: 100%;
  height: 100%;
  --frame-y: 0.55;
  --frame-r: 0.43;
}

.plush-frame {
  background: linear-gradient(135deg, #ff6b35 0%, #ff541e 100%);
  border-radius: 50%;
  box-shadow: 0 16px 36px rgba(255, 84, 30, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.plush.is-stretched .plush-frame {
  box-shadow: 0 20px 44px rgba(255, 84, 30, 0.42);
}

.plush > img {
  object-fit: cover;
  display: none !important;
  visibility: hidden !important;
}

.plush.no-webgl > img {
  display: block !important;
  visibility: visible !important;
}

/* Speech Pitch Bubble with Pointer Beak - positioned cleanly ABOVE face */
.hero-bubble {
  position: relative;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  border: 1.5px solid var(--border-light);
  border-radius: 14px;
  padding: 8px 14px;
  box-shadow: 0 8px 22px rgba(20, 23, 26, 0.08);
  font-size: 0.78rem;
  max-width: 310px;
  width: 100%;
  margin: 0 auto 12px auto;
  z-index: 10;
  pointer-events: auto;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}

.hero-bubble.is-active {
  transform: scale(1.02) translateY(-2px);
  box-shadow: 0 12px 26px rgba(255, 84, 30, 0.16);
}

.hero-bubble::before {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-right: 1.5px solid var(--border-light);
  border-bottom: 1.5px solid var(--border-light);
  transform: translateX(-50%) rotate(45deg);
}

.hero-bubble-top {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.hero-bubble-kicker {
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--brand-orange);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.face-state-pill {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg-card-subtle);
  color: var(--brand-orange);
  border: 1px solid rgba(255, 84, 30, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  user-select: none;
}

.hero-bubble-text {
  color: var(--text-main);
  font-weight: 600;
  line-height: 1.35;
  display: block;
}

/* Live Viscoelastic Strain Gauge Bar */
.face-telemetry-deck {
  width: 100%;
  max-width: 340px;
  margin-top: 16px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.strain-meter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.strain-meter-header strong {
  color: var(--text-main);
}

.strain-pct {
  font-style: normal;
  color: var(--text-faint);
  font-size: 0.66rem;
}

.strain-meter-bar {
  width: 100%;
  height: 7px;
  background: rgba(20, 23, 26, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.strain-meter-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #ff541e 65%, #ef4444 100%);
  border-radius: 999px;
  transition: width 0.06s linear;
}

/* Face Tactile Trigger Buttons */
.face-triggers-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 2px;
}

.face-trigger-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  border-radius: var(--radius-pill);
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.face-trigger-btn:hover,
.face-trigger-btn.active {
  background: var(--brand-orange);
  color: #ffffff;
  border-color: var(--brand-orange);
  transform: translateY(-1px);
}

.hero-subhint {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  color: var(--text-faint);
  text-align: center;
}

/* ==========================================================================
   Featured Badges Strip
   ========================================================================== */

.featured-strip {
  margin-bottom: 40px;
  text-align: center;
}

.featured-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.featured-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 10px;
}

.featured-logo-item {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-muted);
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* ==========================================================================
   Project Showcase (With Interactive Category Filtering)
   ========================================================================== */

.section-head {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 680px) {
  .section-head {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
}

.section-title {
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 900;
  letter-spacing: -0.6px;
  color: var(--text-main);
}

.section-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.filter-pills-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 6px 13px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover,
.filter-pill.active {
  background: var(--brand-orange);
  color: #ffffff;
  border-color: var(--brand-orange);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 48px;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 56px;
  }
}

.project-card {
  container-type: inline-size;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  padding: 24px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.25s ease;
}

.project-card.hidden-filter {
  display: none !important;
}

@media (min-width: 640px) {
  .project-card {
    border-radius: 22px;
    padding: 30px;
  }
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 84, 30, 0.35);
}

.project-card:has(a.card-link) {
  position: relative;
}

.project-card a.card-link {
  text-decoration: none;
  color: inherit;
}

.project-card a.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22px;
}

.project-card a:not(.card-link),
.project-card button {
  position: relative;
  z-index: 2;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.project-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--bg-card-subtle);
  color: var(--brand-orange);
}

.project-metric {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-green);
}

.project-title {
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
  color: var(--text-main);
  line-height: 1.28;
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.58;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.69rem;
  color: var(--text-faint);
  background: var(--bg-card-subtle);
  padding: 3px 8px;
  border-radius: 5px;
}

.project-cad-btn {
  padding: 6px 14px;
  font-size: 0.78rem;
}

/* ==========================================================================
   Playable ASSA ABLOY SL500 Sliding Door Hardware Simulator Console
   ========================================================================== */

.sl500-simulator-card {
  background: linear-gradient(145deg, #131722 0%, #080b11 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  box-shadow: 0 22px 50px rgba(10, 14, 22, 0.45);
  padding: 24px 16px;
  margin-bottom: 48px;
  color: #ffffff;
}

@media (min-width: 768px) {
  .sl500-simulator-card {
    border-radius: var(--radius-card);
    padding: 36px 40px;
    margin-bottom: 56px;
  }
}

.simulator-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}

.sim-kicker-tag {
  background: rgba(255, 84, 30, 0.18);
  color: #ff7a4d;
  border-color: rgba(255, 84, 30, 0.3);
  margin-bottom: 8px;
}

.sim-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff541e;
  box-shadow: 0 0 8px #ff541e;
}

.sim-title-group h3 {
  font-size: clamp(1.18rem, 3.5vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}

.sim-title-group p {
  color: #94a3b8;
  font-size: 0.84rem;
}

.sim-telemetry-readout {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 12px;
  border-radius: 12px;
}

.sim-telemetry-item strong {
  color: #ffffff;
}

.beam-status-armed {
  color: var(--accent-green) !important;
}

.door-viewport-stage {
  width: 100%;
  height: 200px;
  background: #05070b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
}

.door-stage-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

/* Door Overhead Track / SL500 Header Profile */
.door-track-beam {
  position: absolute;
  top: 10px;
  left: 16px;
  right: 16px;
  height: 20px;
  background: linear-gradient(180deg, #333e52 0%, #1e2634 100%);
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  z-index: 3;
}

.track-model-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.track-lock-badge {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 700;
  color: var(--accent-green);
}

/* Microwave Doppler Radar Sensor + Emitted Waves */
.door-radar-sensor {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 11px;
  background: #ff541e;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 0 14px rgba(255, 84, 30, 0.85);
  z-index: 4;
  display: flex;
  justify-content: center;
  align-items: center;
}

.radar-wave {
  position: absolute;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 84, 30, 0.55);
  opacity: 0;
  pointer-events: none;
}

.door-viewport-stage.radar-active .radar-wave,
.door-viewport-stage.is-open .radar-wave {
  animation: radarDoppler 1.5s ease-out infinite;
}

.door-viewport-stage.radar-active .wave-2,
.door-viewport-stage.is-open .wave-2 {
  animation-delay: 0.45s;
}

.door-viewport-stage.radar-active .wave-3,
.door-viewport-stage.is-open .wave-3 {
  animation-delay: 0.9s;
}

@keyframes radarDoppler {
  0% {
    transform: scale(0.5);
    opacity: 0.9;
  }
  100% {
    transform: scale(4.2);
    opacity: 0;
  }
}

/* Dual Sliding Glass Leaves */
.door-leaf-container {
  width: 280px;
  max-width: 86%;
  height: 146px;
  position: relative;
  display: flex;
  justify-content: center;
  top: 12px;
  z-index: 2;
}

.door-leaf {
  width: calc(50% - 6px);
  height: 100%;
  background: linear-gradient(160deg, rgba(0, 210, 255, 0.16) 0%, rgba(0, 210, 255, 0.06) 100%);
  border: 2px solid rgba(0, 210, 255, 0.45);
  backdrop-filter: blur(4px);
  position: absolute;
  top: 0;
  transition: transform 0.68s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
  box-shadow: inset 0 0 18px rgba(0, 210, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.door-leaf.left {
  left: 6px;
  transform: translateX(0);
}

.door-leaf.right {
  right: 6px;
  transform: translateX(0);
}

/* Sliding Opened State */
.door-viewport-stage.is-open .door-leaf.left {
  transform: translateX(-82%);
}

.door-viewport-stage.is-open .door-leaf.right {
  transform: translateX(82%);
}

/* Tripped / Fault State */
.door-viewport-stage.is-tripped .door-leaf {
  border-color: rgba(239, 68, 68, 0.75);
}

.door-safety-stripe {
  position: absolute;
  top: 46%;
  width: 100%;
  height: 6px;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.22),
    rgba(255, 255, 255, 0.22) 6px,
    transparent 6px,
    transparent 12px
  );
}

.door-handle-decal {
  width: 4px;
  height: 36px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 2px;
  z-index: 1;
}

.leaf-code {
  position: absolute;
  bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: rgba(226, 232, 240, 0.55);
}

/* Photocell Laser Beam & Nodes */
.photocell-node {
  position: absolute;
  bottom: 20px;
  width: 8px;
  height: 12px;
  background: #10b981;
  border-radius: 2px;
  z-index: 4;
  box-shadow: 0 0 8px #10b981;
}

.photocell-node.left {
  left: 12px;
}

.photocell-node.right {
  right: 12px;
}

.photocell-beam {
  position: absolute;
  bottom: 24px;
  left: 16px;
  right: 16px;
  height: 3px;
  background: rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.9);
  cursor: pointer;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.photocell-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  background: rgba(5, 7, 11, 0.85);
  color: #10b981;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  transform: translateY(-10px);
  pointer-events: none;
  white-space: nowrap;
}

.door-viewport-stage.is-open .photocell-beam {
  background: rgba(255, 84, 30, 0.75);
  box-shadow: 0 0 12px #ff541e;
}

.door-viewport-stage.is-open .photocell-label {
  color: #ff7a4d;
  border-color: rgba(255, 84, 30, 0.45);
}

.door-viewport-stage.is-tripped .photocell-beam {
  background: #ef4444;
  box-shadow: 0 0 16px #ef4444;
}

.door-viewport-stage.is-tripped .photocell-node {
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
}

.door-viewport-stage.is-tripped .photocell-label {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.65);
  background: rgba(127, 29, 29, 0.9);
}

/* Controls & Telemetry Readouts */
.simulator-console-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

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

.sim-btn-trigger {
  background: var(--brand-orange);
  color: #ffffff;
  border: none;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(255, 84, 30, 0.4);
}

.sim-btn-trigger:hover {
  background: var(--brand-orange-hover);
  transform: translateY(-1px);
}

.sim-btn-obstruction {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.76rem;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.sim-btn-obstruction:hover {
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
  border-color: #ef4444;
  transform: translateY(-1px);
}

.sim-mode-group {
  display: flex;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 3px;
}

.sim-mode-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.sim-mode-btn.active {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.sim-cad-launch-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.8rem;
  padding: 9px 16px;
}

.sim-cad-launch-btn:hover {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
  color: #ffffff;
}

/* ==========================================================================
   About & Credentials Section
   ========================================================================== */

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  padding: 28px 20px;
  margin-bottom: 48px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 800px) {
  .about-card {
    border-radius: var(--radius-card);
    padding: 46px;
    margin-bottom: 56px;
    grid-template-columns: 1fr 1fr;
    gap: 46px;
  }
}

.about-col h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-main);
}

.about-col p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 14px;
}

.about-kicker {
  font-family: var(--font-mono);
  font-size: 0.74rem !important;
  font-weight: 700;
  color: var(--text-faint) !important;
  letter-spacing: 0.5px;
}

.skills-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.skill-pill {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-card-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-light);
}

.skill-pill.featured {
  background: var(--brand-orange-light);
  color: var(--brand-orange);
  border-color: rgba(255, 84, 30, 0.22);
}

.about-cta-wrap {
  margin-top: 26px;
}

.about-resume-btn {
  width: 100%;
  justify-content: center;
}

/* ==========================================================================
   Connect / Contact Section
   ========================================================================== */

.contact-section {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  padding: 28px 20px;
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
  gap: 20px;
}

@media (min-width: 768px) {
  .contact-section {
    border-radius: var(--radius-card);
    padding: 40px 48px;
    margin-bottom: 56px;
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.contact-left h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.contact-left p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.contact-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.copy-email-btn {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.copy-email-btn:hover {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
  background: var(--brand-orange-light);
}

/* ==========================================================================
   Native <dialog> Modal Component
   ========================================================================== */

dialog#cad-dialog {
  margin: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-modal);
  background: #0d1117;
  color: #f8fafc;
  width: 92vw;
  max-width: 960px;
  height: 80vh;
  box-shadow: var(--shadow-modal);
  display: none;
  flex-direction: column;
  overflow: hidden;

  opacity: 0;
  scale: 0.96;
  transition:
    opacity 0.28s ease-out,
    scale 0.28s ease-out,
    display 0.28s allow-discrete,
    overlay 0.28s allow-discrete;
}

dialog#cad-dialog[open] {
  display: flex;
  opacity: 1;
  scale: 1;
}

@starting-style {
  dialog#cad-dialog[open] {
    opacity: 0;
    scale: 0.96;
  }
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog#cad-dialog::backdrop {
  background: rgba(10, 14, 22, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition:
    opacity 0.28s ease-out,
    overlay 0.28s allow-discrete,
    display 0.28s allow-discrete;
  overflow: hidden;
  overscroll-behavior: contain;
}

dialog#cad-dialog[open]::backdrop {
  opacity: 1;
}

@starting-style {
  dialog#cad-dialog[open]::backdrop {
    opacity: 0;
  }
}

.dialog-header {
  padding: 14px 20px;
  background: #161b22;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.dialog-title {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.dialog-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.dialog-close-btn:hover {
  background: var(--brand-orange);
  color: #ffffff;
  border-color: var(--brand-orange);
}

.dialog-body {
  flex: 1;
  width: 100%;
  position: relative;
}

.dialog-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ==========================================================================
   Site Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border-light);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .site-footer {
    flex-direction: column;
    text-align: center;
  }
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  list-style: none;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--brand-orange);
}