/* ==========================================================
   ABDUL FAZIL ABDUL SALAM — PORTFOLIO STYLESHEET
   Minimalist Precision Industrial Design (3D Printing × Embedded)
   ========================================================== */

:root {
  --bg-hero: #ECEBE6;
  --bg-page: #F3F2EE;
  --bg-card: #FAF9F6;
  --bg-dark: #141413;
  --bg-dark-elevated: #1E1E1C;

  --text-primary: #141413;
  --text-secondary: #575651;
  --text-muted: #87867F;

  /* Dual Domain Precision Accents */
  --accent-3d: #E85D2A;          /* Additive Extruder Orange */
  --accent-3d-soft: rgba(232, 93, 42, 0.12);
  --accent-pcb: #18794E;         /* Solder-Mask Emerald */
  --accent-pcb-bright: #34D399;  /* Logic Signal Green */
  --accent-pcb-soft: rgba(24, 121, 78, 0.12);
  --accent-gold: #D49B35;        /* ENIG Copper/Gold Pad */

  --border-subtle: rgba(20, 20, 19, 0.08);
  --border-strong: rgba(20, 20, 19, 0.15);

  --pill-shadow: 0 8px 24px -6px rgba(20, 20, 19, 0.07), 0 1px 2px rgba(20, 20, 19, 0.04);

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle CAD Blueprint Grid Overlay */
.ambient-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(20, 20, 19, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.55;
}

/* ==========================================
   TOP NAVIGATION BAR (Matches Reference)
   ========================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(236, 235, 230, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(20, 20, 19, 0.05);
}

.header-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 1.1rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-3d);
  box-shadow: 0 0 0 3px rgba(232, 93, 42, 0.18);
  transition: transform 0.25s ease, background 0.25s ease;
}

.brand:hover .brand-dot {
  transform: scale(1.25);
  background: var(--accent-pcb);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(20, 20, 19, 0.06);
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  opacity: 0.78;
  transition: opacity 0.2s ease;
}

.nav-link:hover {
  opacity: 1;
}

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

.header-icon-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.55);
  transition: all 0.2s ease;
}

.header-icon-link:hover {
  color: var(--text-primary);
  background: #FFFFFF;
}

.btn-contact-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-pill);
  background: var(--bg-dark);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.2s ease, box-shadow 0.2s ease;
}

.btn-contact-pill:hover {
  transform: translateY(-1px);
  background: #272725;
  box-shadow: 0 8px 20px rgba(20, 20, 19, 0.18);
}

/* ==========================================
   HERO SECTION (Reference Composition in Color)
   ========================================== */
.hero-section {
  position: relative;
  background: linear-gradient(180deg, #ECEBE6 0%, #EAE9E4 78%, var(--bg-page) 100%);
  min-height: calc(100vh - 68px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 1rem 2rem 2rem;
}

.hero-circuit-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.trace-line {
  fill: none;
  stroke: rgba(20, 20, 19, 0.08);
  stroke-width: 1.5;
  stroke-dasharray: 8 6;
  transition: stroke 0.35s ease, stroke-width 0.35s ease;
}

.trace-pad {
  fill: rgba(20, 20, 19, 0.14);
}

.hero-section.highlight-3d .trace-left-1,
.hero-section.highlight-3d .trace-left-2,
.hero-section.highlight-3d .trace-left-3 {
  stroke: rgba(232, 93, 42, 0.55);
  stroke-width: 2.2;
  stroke-dasharray: none;
}

.hero-section.highlight-embedded .trace-right-1,
.hero-section.highlight-embedded .trace-right-2,
.hero-section.highlight-embedded .trace-right-3 {
  stroke: rgba(24, 121, 78, 0.55);
  stroke-width: 2.2;
  stroke-dasharray: none;
}

/* Corner Telemetry Readouts */
.hero-telemetry {
  position: absolute;
  top: 1.35rem;
  z-index: 3;
}

.hero-telemetry-left { left: 2.5rem; }
.hero-telemetry-right { right: 2.5rem; }

.hero-portrait-switcher {
  position: relative;
  z-index: 10;
  margin: 0.2rem auto 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(10px);
  padding: 0.3rem 0.5rem 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--pill-shadow);
}

.switcher-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.portrait-opt-btn {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.portrait-opt-btn:hover {
  color: var(--text-primary);
  background: rgba(20, 20, 19, 0.05);
}

.portrait-opt-btn.active {
  background: var(--bg-dark);
  color: #FFFFFF;
}

.telemetry-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.58);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(20, 20, 19, 0.06);
}

.dot-orange, .dot-emerald {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.dot-orange { background: var(--accent-3d); }
.dot-emerald { background: var(--accent-pcb); }

/* Main Hero Stage */
.hero-stage {
  position: relative;
  width: 100%;
  max-width: 1280px;
  height: 670px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* LAYER 1: Floating Skill Pills Around Portrait */
.hero-pills-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.skill-pill {
  position: absolute;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.62rem 1.2rem;
  border-radius: var(--radius-pill);
  background: rgba(230, 229, 224, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--pill-shadow);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.28s ease, box-shadow 0.28s ease;
}

.skill-pill:hover {
  background: #FFFFFF;
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 28px -6px rgba(20, 20, 19, 0.14);
}

.pill-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transition: transform 0.25s ease;
}

.pill-orange { background: var(--accent-3d); }
.pill-emerald { background: var(--accent-pcb); }

.skill-pill:hover .pill-indicator {
  transform: scale(1.35);
}

.pill-left-top {
  top: 125px;
  left: 17%;
  animation: floatSlow 6s ease-in-out infinite;
}

.pill-left-mid {
  top: 240px;
  left: 12.5%;
  animation: floatSlow 7s ease-in-out 0.8s infinite;
}

.pill-left-bot {
  top: 355px;
  left: 16%;
  animation: floatSlow 6.5s ease-in-out 1.5s infinite;
}

.pill-right-top {
  top: 125px;
  right: 15.5%;
  animation: floatSlow 6.4s ease-in-out 0.4s infinite;
}

.pill-right-mid {
  top: 240px;
  right: 12%;
  animation: floatSlow 7.2s ease-in-out 1.1s infinite;
}

.pill-right-bot {
  top: 355px;
  right: 15%;
  animation: floatSlow 6.8s ease-in-out 1.9s infinite;
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

/* LAYER 2: Giant Background Watermark Typography ('ENGINEER') BEHIND Portrait */
.hero-backdrop-text-wrap {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -44%);
  width: 100%;
  text-align: center;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

.hero-backdrop-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(5.2rem, 15.2vw, 13.4rem);
  letter-spacing: -0.03em;
  line-height: 0.9;
  color: rgba(20, 20, 19, 0.13);
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.3s ease;
}

/* LAYER 3: Centered Studio Color Portrait Cutout */
.hero-portrait-container {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: min(650px, 90vw);
  height: 655px;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.hero-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: contrast(1.02) saturate(1.03) drop-shadow(0 18px 36px rgba(20, 20, 19, 0.08));
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 82%, rgba(0,0,0,0.5) 94%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 82%, rgba(0,0,0,0.5) 94%, transparent 100%);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* LAYER 4: Foreground Tilted Badges + Giant Gradient Name ('Abdul Fazil') */
.hero-foreground-title {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1120px;
  z-index: 4;
  text-align: center;
  pointer-events: none;
}

.hero-badges-row {
  position: relative;
  width: 100%;
  height: 44px;
  margin-bottom: -14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 7%;
}

.floating-speech-badge {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1.15rem;
  background: rgba(250, 250, 248, 0.94);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  box-shadow: 0 10px 25px -5px rgba(20, 20, 19, 0.12), 0 1px 3px rgba(20, 20, 19, 0.06);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.badge-hello {
  transform: rotate(-4.5deg);
  border-bottom-right-radius: 4px;
}

.badge-work {
  transform: rotate(4deg);
  border-bottom-left-radius: 4px;
}

.badge-work:hover {
  transform: rotate(1.5deg) translateY(-3px) scale(1.04);
  box-shadow: 0 14px 30px -5px rgba(20, 20, 19, 0.18);
  background: #FFFFFF;
}

.badge-arrow {
  font-size: 0.85em;
  color: var(--accent-3d);
  font-weight: 700;
}

.hero-main-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4.2rem, 11.8vw, 10.2rem);
  letter-spacing: -0.04em;
  line-height: 0.94;
  background: linear-gradient(180deg, #0E0E0D 0%, #1F1F1D 48%, rgba(95, 94, 89, 0.52) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  user-select: none;
}

/* Bottom Verified Metrics Strip */
.hero-metrics-strip {
  position: relative;
  z-index: 5;
  max-width: 1240px;
  width: 100%;
  margin: 1.5rem auto 0;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.metric-Tile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.metric-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.metric-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.metric-divider {
  width: 1px;
  height: 32px;
  background: var(--border-subtle);
}

/* ==========================================
   COMMON SECTION LAYOUTS
   ========================================== */
.section-container {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-header {
  max-width: 780px;
  margin-bottom: 2.75rem;
}

.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-3d);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--text-primary);
  margin-bottom: 0.95rem;
}

.accent-3d { color: var(--accent-3d); }
.accent-pcb { color: var(--accent-pcb); }

.section-subtitle {
  font-size: 1.04rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ==========================================
   INTERACTIVE 3D × PCB HARDWARE STACK LAB
   ========================================== */
.interactive-stack-card {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 20px 50px -20px rgba(20, 20, 19, 0.08);
}

.stack-controls {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.slider-control-box {
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.mono-value {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-3d);
}

.tactile-slider {
  width: 100%;
  accent-color: var(--accent-3d);
  cursor: pointer;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.layer-selector-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.layer-btn {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  text-align: left;
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius-md);
  background: var(--bg-page);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.22s ease;
}

.layer-btn:hover {
  background: #FFFFFF;
  border-color: var(--border-strong);
}

.layer-btn.active {
  background: #FFFFFF;
  border-color: var(--text-primary);
  box-shadow: 0 8px 20px -6px rgba(20, 20, 19, 0.08);
}

.layer-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  background: rgba(20, 20, 19, 0.08);
  color: var(--text-primary);
}

.layer-num-orange { background: var(--accent-3d-soft); color: var(--accent-3d); }
.layer-num-emerald { background: var(--accent-pcb-soft); color: var(--accent-pcb); }
.layer-num-dark { background: rgba(20, 20, 19, 0.12); color: var(--text-primary); }

.layer-info {
  display: flex;
  flex-direction: column;
}

.layer-info strong {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.layer-info span {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

/* Right Isometric Stack Visualizer */
.stack-visualizer-stage {
  background: #EAE9E3;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

.visualizer-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid rgba(20, 20, 19, 0.06);
  background: rgba(255, 255, 255, 0.45);
}

.vis-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-pcb);
  box-shadow: 0 0 0 3px rgba(24, 121, 78, 0.2);
}

.vis-actions {
  display: flex;
  gap: 0.5rem;
}

.vis-mini-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.38rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: #FFFFFF;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.vis-mini-btn:hover {
  background: var(--bg-dark);
  color: #FFFFFF;
}

.iso-stack-viewport {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 580px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 44%, #2C3340 0%, #1C212B 62%, #12151C 100%);
  background-size: 32px 32px, 32px 32px, 100% 100%;
}

.bionic-3d-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  outline: none;
}

.canvas-3d-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 21, 28, 0.86);
  backdrop-filter: blur(8px);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #E2E8F0;
  pointer-events: none;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.hint-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-3d);
}

.iso-layer {
  position: absolute;
  width: 440px;
  max-width: 90%;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
}

.iso-svg {
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 16px 24px rgba(20, 20, 19, 0.14));
}

.iso-stack-viewport.wireframe-mode polygon {
  fill-opacity: 0.12 !important;
  stroke-width: 2px !important;
}

.iso-callout {
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.92);
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--pill-shadow);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  pointer-events: none;
}

.callout-badge {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-pill);
}

.badge-3d { background: var(--accent-3d-soft); color: var(--accent-3d); }
.badge-pcb { background: var(--accent-pcb-soft); color: var(--accent-pcb); }
.badge-firmware { background: rgba(20, 20, 19, 0.1); color: var(--text-primary); }

.pcb-signal-path {
  stroke-dasharray: 8 4;
  animation: signalFlow 2.2s linear infinite;
}

@keyframes signalFlow {
  to { stroke-dashoffset: -24; }
}

.iso-stack-viewport.signal-burst .pcb-signal-path {
  stroke-width: 3.8px;
  stroke: #6EE7B7;
}

.visualizer-telemetry-footer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.6);
  border-top: 1px solid rgba(20, 20, 19, 0.06);
}

.telem-item {
  display: flex;
  flex-direction: column;
}

.telem-key {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.telem-val {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ==========================================
   SELECTED PROJECTS SECTION
   ========================================== */
.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.52rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.filter-btn.active {
  background: var(--bg-dark);
  color: #FFFFFF;
  border-color: var(--bg-dark);
}

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -18px rgba(20, 20, 19, 0.12);
}

.project-img-wrap {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: #E5E4DF;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bionic-card-img-wrap {
  background: #ECEBE6;
}

.arm-card-img-wrap {
  background: #ECEBE6;
}

.bionic-arm-contain-img {
  object-fit: cover;
  padding-top: 0;
}

.bionic-contain-img {
  object-fit: cover;
  padding-top: 0;
}

.bionic-gesture-switcher {
  position: absolute;
  bottom: 0.7rem;
  right: 0.7rem;
  display: flex;
  gap: 0.35rem;
  z-index: 4;
}

.gesture-pill {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.28rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(20, 20, 19, 0.14);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-primary);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.gesture-pill.active,
.gesture-pill:hover {
  background: var(--bg-dark);
  color: #6EE7B7;
  border-color: var(--bg-dark);
}

.bionic-live-preview-card {
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem;
}

.bionic-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.bionic-lab-tabs {
  display: flex;
  gap: 0.35rem;
}

.bionic-lab-tab {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  padding: 0.24rem 0.55rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: #FFFFFF;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.bionic-lab-tab.active {
  background: var(--bg-dark);
  color: #6EE7B7;
  border-color: var(--bg-dark);
}

.bionic-preview-img-box {
  height: 230px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #DFDDD6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bionic-preview-img-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

.project-domain-badges {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.domain-pill {
  padding: 0.26rem 0.65rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.pill-3d {
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-3d);
}

.pill-pcb {
  background: rgba(20, 20, 19, 0.88);
  color: #6EE7B7;
}

.project-body {
  padding: 1.45rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-meta-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.15rem;
  flex: 1;
}

.dual-spec-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: var(--bg-page);
  padding: 0.72rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.1rem;
}

.spec-half {
  display: flex;
  flex-direction: column;
}

.spec-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
}

.spec-3d .spec-label { color: var(--accent-3d); }
.spec-emb .spec-label { color: var(--accent-pcb); }

.spec-half strong {
  font-size: 0.76rem;
  color: var(--text-primary);
}

.btn-inspect-project {
  width: 100%;
  padding: 0.68rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-inspect-project:hover {
  background: var(--bg-dark);
  color: #FFFFFF;
  border-color: var(--bg-dark);
}

/* ==========================================
   WORK EXPERIENCE TIMELINE SECTION
   ========================================== */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 2rem;
}

.timeline-card.highlight-card {
  border-color: rgba(232, 93, 42, 0.35);
  box-shadow: 0 16px 40px -18px rgba(232, 93, 42, 0.12);
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border-right: 1px solid var(--border-subtle);
  padding-right: 1.25rem;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-3d);
}

.timeline-location {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.timeline-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.timeline-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-pcb);
  margin-bottom: 0.9rem;
}

.timeline-content h4 a {
  color: inherit;
  text-decoration: underline;
}

.timeline-bullets {
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* ==========================================
   EDUCATION, AWARDS & SKILLS BENTO
   ========================================== */
.about-bento {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 1.75rem;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.15rem;
}

.bento-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 1.35rem;
}

.edu-block {
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}

.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}

.edu-header strong {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.edu-inst {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent-pcb);
  margin-bottom: 0.35rem;
}

.edu-notes {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.awards-box {
  margin-top: 1.25rem;
}

.awards-box h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.7rem;
}

.clean-award-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.bento-stack {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.35rem;
}

.stack-col-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.stack-col-header h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.clean-skill-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.clean-skill-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(20, 20, 19, 0.05);
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.71rem;
  color: var(--text-secondary);
  background: var(--bg-page);
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
}

.stack-divider {
  height: 1px;
  background: var(--border-subtle);
}

.cert-strip {
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
}

.cert-items {
  margin-top: 0.35rem;
  font-size: 0.79rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================
   CONTACT SECTION
   ========================================== */
.contact-card {
  background: var(--bg-dark);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 3rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}

.contact-left .eyebrow-badge {
  color: #A3A29B;
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.8vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.9rem;
}

.contact-desc {
  color: #B5B4AD;
  font-size: 0.96rem;
  margin-bottom: 1.25rem;
}

.contact-direct-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.65rem;
}

.direct-chip {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #E5E4DF;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: background 0.2s ease;
}

.direct-chip:hover {
  background: rgba(255, 255, 255, 0.18);
}

.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn-primary-dark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.45rem;
  border-radius: var(--radius-pill);
  background: #FFFFFF;
  color: var(--bg-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-primary-dark:hover {
  transform: translateY(-2px);
  background: #F3F2EE;
}

.btn-secondary-outline {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.2s ease;
}

.btn-secondary-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.quick-ping-form {
  background: var(--bg-dark-elevated);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1.65rem;
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.15rem;
}

.form-header .mono-label {
  color: #A3A29B;
}

.status-pill {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: #6EE7B7;
  background: rgba(52, 211, 153, 0.12);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  color: #D4D3CD;
  margin-bottom: 0.5rem;
}

.topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.topic-chip {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: #D4D3CD;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.topic-chip.active {
  background: var(--accent-3d);
  border-color: var(--accent-3d);
  color: #FFFFFF;
}

.quick-ping-form textarea {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.25);
  color: #FFFFFF;
  padding: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  resize: vertical;
}

.btn-submit-ping {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent-3d);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn-submit-ping:hover {
  opacity: 0.92;
}

.form-feedback {
  margin-top: 0.55rem;
  font-size: 0.78rem;
  color: #6EE7B7;
  min-height: 1.1em;
}

/* ==========================================
   FOOTER & MODAL
   ========================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2.25rem 2rem;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  font-size: 0.86rem;
}

.footer-brand span {
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* Blueprint Modal */
.blueprint-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 19, 0.6);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.blueprint-modal-backdrop.open {
  display: flex;
}

.blueprint-modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}

.modal-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.modal-close-btn {
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
}

.modal-content-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.2fr;
  gap: 1.5rem;
  padding: 1.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.modal-details-col h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.modal-summary {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.15rem;
}

.modal-specs-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.modal-spec-card {
  background: var(--bg-page);
  padding: 1rem;
  border-radius: var(--radius-sm);
}

.modal-spec-card h4 {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.spec-card-3d h4 { color: var(--accent-3d); }
.spec-card-emb h4 { color: var(--accent-pcb); }

.modal-spec-card ul {
  padding-left: 1rem;
  font-size: 0.79rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

/* ==========================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================== */
@media (max-width: 1024px) {
  .header-inner {
    padding: 0.95rem 1.5rem;
  }

  .main-nav {
    gap: 1.25rem;
  }

  .interactive-stack-card,
  .about-bento,
  .contact-card,
  .modal-content-grid,
  .timeline-card {
    grid-template-columns: 1fr;
  }

  .timeline-meta {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding-right: 0;
    padding-bottom: 0.75rem;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-metrics-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .metric-divider {
    display: none;
  }

  .pill-left-top, .pill-left-mid, .pill-left-bot { left: 2%; }
  .pill-right-top, .pill-right-mid, .pill-right-bot { right: 2%; }
}

@media (max-width: 768px) {
  /* Sticky 2-Row Mobile Header with Scrollable Section Nav */
  .header-inner {
    padding: 0.75rem 1rem 0.6rem;
    flex-wrap: wrap;
    gap: 0.55rem;
  }

  .brand {
    font-size: 1.15rem;
  }

  .brand-sub {
    font-size: 0.64rem;
    padding: 0.14rem 0.45rem;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .header-icon-link {
    font-size: 0.72rem;
    padding: 0.36rem 0.68rem;
  }

  .btn-contact-pill {
    font-size: 0.8rem;
    padding: 0.44rem 0.95rem;
  }

  .main-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(20, 20, 19, 0.06);
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    font-size: 0.78rem;
    white-space: nowrap;
    padding: 0.28rem 0.68rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(20, 20, 19, 0.06);
    opacity: 0.92;
  }

  /* Mobile Hero Section: Portrait Unobstructed Above Name + Clean Skill Grid Below */
  .hero-telemetry,
  .hero-circuit-svg {
    display: none;
  }

  .hero-section {
    min-height: auto;
    padding: 0.75rem 1rem 1.75rem;
    justify-content: flex-start;
  }

  .hero-portrait-switcher {
    max-width: 100%;
    overflow-x: auto;
    padding: 0.25rem 0.35rem 0.25rem 0.65rem;
    gap: 0.2rem;
    margin-bottom: 0.35rem;
  }

  .switcher-label {
    font-size: 0.62rem;
  }

  .portrait-opt-btn {
    font-size: 0.68rem;
    padding: 0.26rem 0.55rem;
    white-space: nowrap;
  }

  .hero-stage {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 0.25rem;
  }

  .hero-backdrop-text-wrap {
    top: 165px;
    transform: translate(-50%, -50%);
  }

  .hero-backdrop-word {
    font-size: clamp(3.3rem, 16.5vw, 5.8rem);
  }

  .hero-portrait-container {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    order: 1;
    width: min(370px, 90vw);
    height: 350px;
    margin-bottom: -38px;
  }

  .hero-foreground-title {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    order: 2;
    width: 100%;
    margin-bottom: 1.15rem;
  }

  .hero-badges-row {
    padding: 0 2%;
    height: 36px;
    margin-bottom: -8px;
  }

  .floating-speech-badge {
    font-size: 0.74rem;
    padding: 0.38rem 0.78rem;
    border-radius: 14px;
  }

  .hero-main-name {
    font-size: clamp(2.65rem, 12.6vw, 4.5rem);
    line-height: 0.96;
  }

  .hero-pills-layer {
    position: relative;
    inset: auto;
    order: 3;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.45rem;
    width: 100%;
    max-width: 460px;
    margin: 0 auto 0.25rem;
    pointer-events: auto;
  }

  .skill-pill {
    position: static;
    animation: none !important;
    width: 100%;
    justify-content: flex-start;
    font-size: 0.73rem;
    padding: 0.48rem 0.7rem;
    border-radius: 12px;
  }

  .hero-metrics-strip {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .metric-Tile {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    background: rgba(243, 242, 238, 0.65);
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
  }

  .metric-num {
    font-size: 1.18rem;
  }

  .metric-desc {
    font-size: 0.71rem;
  }

  /* Common Sections & Headers on Mobile */
  .section-container {
    padding: 3.1rem 1rem;
  }

  .section-header {
    margin-bottom: 1.75rem;
  }

  .section-title {
    font-size: clamp(1.65rem, 6.5vw, 2.2rem);
  }

  .section-subtitle {
    font-size: 0.93rem;
  }

  /* 3D × PCB Hardware Stack Lab on Mobile */
  .interactive-stack-card {
    padding: 1rem;
    gap: 1.25rem;
    border-radius: var(--radius-md);
  }

  .bionic-preview-img-box {
    height: 190px;
  }

  .slider-control-box {
    padding: 0.9rem 1rem;
  }

  .slider-label-row {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .layer-btn {
    padding: 0.78rem 0.9rem;
    gap: 0.7rem;
  }

  .layer-info strong {
    font-size: 0.84rem;
  }

  .layer-info span {
    font-size: 0.72rem;
  }

  .visualizer-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 0.9rem;
  }

  .vis-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .vis-mini-btn {
    flex: 1 1 auto;
    text-align: center;
    font-size: 0.66rem;
    padding: 0.38rem 0.55rem;
  }

  .iso-stack-viewport {
    height: 430px;
    min-height: 400px;
  }

  .canvas-3d-hint {
    font-size: 0.58rem;
    padding: 0.28rem 0.65rem;
    max-width: 94%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .visualizer-telemetry-footer {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    padding: 0.75rem 0.9rem;
  }

  /* Projects Section on Mobile */
  .section-header-row {
    margin-bottom: 1.5rem;
    gap: 1rem;
  }

  .filter-pills {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
  }

  .filter-pills::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.78rem;
    padding: 0.45rem 0.88rem;
  }

  .projects-grid,
  .modal-specs-split {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .project-img-wrap {
    height: 210px;
  }

  .project-body {
    padding: 1.15rem;
  }

  .project-meta-row {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  /* Experience, Education & Contact on Mobile */
  .timeline-card,
  .bento-card {
    padding: 1.35rem;
    border-radius: var(--radius-md);
  }

  .bento-title {
    font-size: 1.35rem;
  }

  .edu-header {
    flex-direction: column;
    gap: 0.35rem;
  }

  .clean-skill-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .contact-card {
    padding: 1.5rem 1.25rem;
    gap: 1.75rem;
    border-radius: var(--radius-md);
  }

  .contact-buttons {
    flex-direction: column;
  }

  .btn-primary-dark,
  .btn-secondary-outline {
    width: 100%;
    justify-content: center;
  }

  .quick-ping-form {
    padding: 1.2rem;
  }

  /* Modal on Mobile */
  .blueprint-modal-backdrop {
    padding: 0.75rem;
  }

  .modal-topbar {
    padding: 0.85rem 1.1rem;
  }

  .modal-content-grid {
    padding: 1.1rem;
    gap: 1rem;
  }

  .modal-img {
    min-height: 200px;
    max-height: 230px;
  }

  .modal-details-col h3 {
    font-size: 1.2rem;
  }

  .site-footer {
    padding: 1.75rem 1rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 1rem;
  }
}

@media (max-width: 420px) {
  .hero-portrait-container {
    height: 315px;
    margin-bottom: -32px;
  }

  .hero-main-name {
    font-size: clamp(2.35rem, 12.2vw, 3.2rem);
  }

  .hero-pills-layer {
    grid-template-columns: 1fr 1fr;
    gap: 0.38rem;
  }

  .skill-pill {
    font-size: 0.68rem;
    padding: 0.42rem 0.55rem;
  }

  .iso-stack-viewport {
    height: 390px;
    min-height: 370px;
  }
}
