:root {
  /* Fonts: Distinctive geometric display + crisp editorial body + technical mono */
  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  /* Spatial Glass Material Tokens */
  --glass-window-top: rgba(87, 85, 90, 0.64);
  --glass-window-bottom: rgba(59, 58, 63, 0.76);
  --glass-chrome-top: rgba(90, 88, 92, 0.66);
  --glass-chrome-bottom: rgba(62, 61, 66, 0.74);
  --glass-dock-top: rgba(96, 94, 100, 0.58);
  --glass-dock-bottom: rgba(58, 57, 63, 0.72);
  --glass-panel: rgba(32, 32, 36, 0.36);
  --glass-panel-strong: rgba(24, 24, 29, 0.56);
  --glass-modal-top: rgba(54, 53, 59, 0.88);
  --glass-modal-bottom: rgba(30, 30, 36, 0.93);
  --glass-input: rgba(18, 18, 22, 0.52);
  --glass-pill: rgba(255, 255, 255, 0.13);
  --glass-pill-hover: rgba(255, 255, 255, 0.24);
  --glass-pill-active: rgba(255, 255, 255, 0.26);

  /* Specular Rim Strokes */
  --rim-window: rgba(255, 255, 255, 0.34);
  --rim-panel: rgba(255, 255, 255, 0.16);
  --rim-pill: rgba(255, 255, 255, 0.22);
  --rim-strong: rgba(255, 255, 255, 0.48);

  /* Text Tokens */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.76);
  --text-muted: rgba(255, 255, 255, 0.56);
  --text-dark: #111216;

  /* Signal & Accent Tokens */
  --accent-indigo: #6366f1;
  --accent-indigo-soft: rgba(99, 102, 241, 0.28);
  --accent-emerald: #34d399;
  --accent-emerald-soft: rgba(16, 185, 129, 0.2);
  --accent-amber: #fbbf24;
  --accent-rose: #f472b6;
  --accent-sky: #60a5fa;

  /* Optical Blur Tiers */
  --blur-window: 44px;
  --blur-chrome: 34px;
  --blur-pill: 16px;
  --blur-modal: 44px;

  /* Elevation Shadows */
  --shadow-window: 0 32px 72px rgba(0, 0, 0, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  --shadow-chrome: 0 14px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  --shadow-modal: 0 28px 68px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  --shadow-cta: 0 8px 22px rgba(0, 0, 0, 0.28);

  /* Spring Motion Curves */
  --spring-gentle: cubic-bezier(0.22, 1, 0.36, 1);
  --spring-bouncy: cubic-bezier(0.34, 1.56, 0.64, 1);
  --spring-quick: cubic-bezier(0.2, 0.9, 0.3, 1);

  /* Radii */
  --radius-window: 34px;
  --radius-panel: 24px;
  --radius-card: 20px;
  --radius-pill: 999px;
}

/* Reduced Optical Blur Toggle State (Controlled live from Motion Kit!) */
html[data-blur="off"] {
  --blur-window: 0px;
  --blur-chrome: 0px;
  --blur-pill: 0px;
  --blur-modal: 0px;
  --glass-window-top: rgba(48, 47, 52, 0.93);
  --glass-window-bottom: rgba(32, 32, 37, 0.96);
  --glass-chrome-top: rgba(46, 45, 50, 0.94);
  --glass-chrome-bottom: rgba(34, 34, 39, 0.96);
  --glass-dock-top: rgba(46, 45, 50, 0.94);
  --glass-dock-bottom: rgba(32, 32, 37, 0.96);
}

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

html {
  scrollbar-gutter: stable;
}

html,
body {
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: #222124;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

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

/* ===== Spatial Ambient Backdrop ===== */
.spatial-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.spatial-backdrop__img {
  position: absolute;
  inset: -28px;
  width: calc(100% + 56px);
  height: calc(100% + 56px);
  object-fit: cover;
  filter: blur(2px) saturate(1.06);
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1.045);
  transition: opacity 0.6s var(--spring-gentle), filter 0.6s var(--spring-gentle), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

/* Ambient Floating Spatial Aurora Orbs */
.spatial-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(78px);
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.44;
  will-change: transform;
}

.spatial-orb--1 {
  width: 48vw;
  height: 48vw;
  max-width: 680px;
  max-height: 680px;
  top: -14%;
  left: -8%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.46) 0%, rgba(56, 189, 248, 0.14) 55%, transparent 72%);
  animation: orbDriftA 19s ease-in-out infinite alternate;
}

.spatial-orb--2 {
  width: 44vw;
  height: 44vw;
  max-width: 620px;
  max-height: 620px;
  bottom: -16%;
  right: -6%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, rgba(236, 72, 153, 0.14) 55%, transparent 72%);
  animation: orbDriftB 23s ease-in-out infinite alternate;
}

.spatial-orb--3 {
  width: 34vw;
  height: 34vw;
  max-width: 480px;
  max-height: 480px;
  top: 38%;
  left: 42%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.26) 0%, rgba(56, 189, 248, 0.1) 55%, transparent 72%);
  animation: orbDriftC 26s ease-in-out infinite alternate;
}

html[data-ambience="aurora"] .spatial-orb {
  opacity: 0.72;
}

html[data-ambience="obsidian"] .spatial-orb {
  opacity: 0.36;
}

.spatial-backdrop__vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(10, 10, 14, 0.14) 55%,
    rgba(8, 8, 12, 0.42) 100%
  );
  transition: background 0.6s var(--spring-gentle);
}

html[data-ambience="obsidian"] .spatial-backdrop__img {
  opacity: 0.28;
  filter: blur(10px) brightness(0.45) contrast(1.15);
}
html[data-ambience="obsidian"] .spatial-backdrop__vignette {
  background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.25), transparent 50%),
    radial-gradient(circle at 80% 75%, rgba(16, 185, 129, 0.18), transparent 45%),
    linear-gradient(180deg, #0b0d14 0%, #11131d 100%);
}

html[data-ambience="aurora"] .spatial-backdrop__img {
  opacity: 0.48;
  filter: blur(8px) saturate(1.3) brightness(0.75);
}
html[data-ambience="aurora"] .spatial-backdrop__vignette {
  background: radial-gradient(circle at 18% 15%, rgba(139, 92, 246, 0.34), transparent 45%),
    radial-gradient(circle at 82% 24%, rgba(56, 189, 248, 0.26), transparent 45%),
    radial-gradient(circle at 52% 88%, rgba(244, 114, 182, 0.22), transparent 50%);
}

/* ===== Main Spatial Stage & Unified Grid Shell ===== */
.spatial-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 24px 44px;
}

.spatial-shell {
  width: min(1368px, 100%);
  display: grid;
  grid-template-columns: 56px minmax(0, 1216px) 56px;
  column-gap: 20px;
  row-gap: 18px;
  align-items: start;
}

/* ===== Top Floating Browser Chrome ===== */
.browser-chrome {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  width: min(920px, 100%);
  height: 48px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--glass-chrome-top), var(--glass-chrome-bottom));
  backdrop-filter: blur(var(--blur-chrome)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-chrome)) saturate(160%);
  border: 1px solid var(--rim-window);
  box-shadow: var(--shadow-chrome);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 0 12px;
  position: relative;
  z-index: 40;
  animation: floatInDown 0.55s var(--spring-gentle) both;
}

.chrome-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chrome-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  transition: background 0.18s var(--spring-quick), transform 0.22s var(--spring-bouncy), color 0.18s;
}

.chrome-icon-btn.tinted {
  background: rgba(255, 255, 255, 0.14);
}

.chrome-icon-btn.active-tint {
  background: rgba(255, 255, 255, 0.26);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.chrome-icon-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
  transform: scale(1.06);
}

.chrome-icon-btn:active:not(:disabled) {
  transform: scale(0.93);
}

.chrome-icon-btn:disabled {
  opacity: 0.36;
  cursor: default;
}

.chrome-icon-btn.spinning svg {
  animation: spinOnce 0.55s var(--spring-gentle);
}

.address-pill {
  height: 32px;
  border-radius: var(--radius-pill);
  background: rgba(20, 20, 24, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3px 0 12px;
  gap: 6px;
  transition: background 0.2s, border-color 0.2s;
  min-width: 0;
}

.address-pill:hover {
  background: rgba(20, 20, 24, 0.58);
  border-color: rgba(255, 255, 255, 0.24);
}

.address-pill__trigger {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.address-pill__reload {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.address-pill__reader {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-display);
  flex-shrink: 0;
}

.address-pill__center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Sticky Floating Left Vertical Dock ===== */
.floating-dock {
  grid-column: 1;
  grid-row: 2;
  position: sticky;
  top: clamp(92px, calc(50vh - 170px), 330px);
  align-self: start;
  z-index: 60;
  width: 56px;
  padding: 7px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--glass-dock-top), var(--glass-dock-bottom));
  backdrop-filter: blur(var(--blur-chrome)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-chrome)) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: dockFadeIn 0.5s var(--spring-gentle) both;
}

/* Smooth Spring-Gliding Concentric Active Orb (1px border + 7px pad + 20px r = 28px outer r) */
.dock-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.17));
  border: 1px solid rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.56), 0 4px 12px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: transform 0.42s var(--spring-bouncy), opacity 0.2s ease, width 0.2s ease, height 0.2s ease;
  will-change: transform;
}

.dock-divider {
  width: 22px;
  height: 1px;
  margin: 2px 0;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.dock-btn {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.72);
  transition: background 0.2s var(--spring-quick), color 0.18s ease, transform 0.26s var(--spring-bouncy);
}

.dock-btn svg {
  display: block;
  transition: transform 0.24s var(--spring-bouncy);
}

.dock-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.dock-btn:hover svg {
  transform: scale(1.07);
}

.dock-btn:active svg {
  transform: scale(0.92);
}

.dock-btn.active {
  color: #ffffff;
  background: transparent;
}

.dock-btn.active:hover {
  background: transparent;
}

.dock-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

.dock-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  background: rgba(18, 19, 25, 0.88);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.38);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.22s var(--spring-quick);
  z-index: 80;
}

.dock-btn:hover[data-tooltip]::after,
.dock-btn:focus-visible[data-tooltip]::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ===== Main Spatial Glass Window ===== */
.glass-window {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  z-index: 10;
  width: 100%;
  min-height: 820px;
  border-radius: var(--radius-window);
  background: linear-gradient(180deg, var(--glass-window-top), var(--glass-window-bottom));
  backdrop-filter: blur(var(--blur-window)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-window)) saturate(160%);
  border: 1.5px solid var(--rim-window);
  box-shadow: var(--shadow-window);
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
  animation: windowReveal 0.65s var(--spring-gentle) both;
}

/* Subtle Eye-Gaze Specular Sheen */
.glass-interactive {
  position: relative;
  overflow: hidden;
}

html[data-eyegaze="on"] .glass-interactive::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    300px circle at var(--mx, -400px) var(--my, -400px),
    rgba(255, 255, 255, 0.19),
    rgba(165, 180, 252, 0.06) 38%,
    transparent 68%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 3;
}

html[data-eyegaze="on"] .glass-interactive:hover::before {
  opacity: 1;
}

/* Specular Rim Shimmer Following Cursor */
html[data-eyegaze="on"] .glass-interactive::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    210px circle at var(--mx, -400px) var(--my, -400px),
    rgba(255, 255, 255, 0.68),
    rgba(129, 140, 248, 0.28) 42%,
    transparent 72%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 4;
}

html[data-eyegaze="on"] .glass-interactive:hover::after {
  opacity: 1;
}

/* ===== Top Header Bar inside Window ===== */
.window-topbar {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  flex-wrap: nowrap;
}

.search-trigger {
  width: clamp(164px, 16.5vw, 224px);
  flex-shrink: 1;
  min-width: 150px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: rgba(34, 34, 38, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0 12px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12.5px;
  transition: background 0.2s, border-color 0.2s, transform 0.22s var(--spring-quick);
}

.search-trigger:hover {
  background: rgba(34, 34, 38, 0.64);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.search-trigger__left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.search-trigger__left span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kbd-hint {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.78);
  flex-shrink: 0;
}

.nav-pills {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.nav-pill-indicator {
  position: absolute;
  top: 0;
  left: 0;
  height: 38px;
  width: 72px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 6px 16px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  opacity: 0;
  z-index: 0;
  transition: transform 0.42s var(--spring-bouncy), width 0.36s var(--spring-bouncy), opacity 0.2s ease;
  will-change: transform, width;
}

.nav-pill {
  position: relative;
  z-index: 1;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.74);
  border: 1px solid transparent;
  transition: background 0.22s var(--spring-quick), color 0.18s, border-color 0.22s, transform 0.22s var(--spring-bouncy);
}

.nav-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-pill.active {
  color: #fff;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

#topbar-nav-pills.has-glider .nav-pill.active {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.bell-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.24s var(--spring-bouncy);
}

.bell-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: scale(1.06);
}

.bell-btn.active-ring,
.profile-pill.active-ring {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.bell-btn__dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-emerald);
  border: 1.5px solid #454449;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.8);
  animation: pulseDot 2.2s ease-in-out infinite;
}

.profile-pill {
  height: 44px;
  padding: 4px 14px 4px 5px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s, transform 0.22s var(--spring-quick);
}

.profile-pill:hover {
  background: rgba(255, 255, 255, 0.22);
}

.profile-pill__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: linear-gradient(135deg, #6366f1, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

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

.profile-pill__text {
  text-align: left;
  line-height: 1.2;
}

.profile-pill__name {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.profile-pill__role {
  font-size: 10px;
  color: var(--text-muted);
}

.profile-menu-wrap {
  position: relative;
}

.profile-pill__chevron {
  transition: transform 0.28s var(--spring-bouncy);
}

.profile-menu-wrap.open .profile-pill {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.42);
}

.profile-menu-wrap.open .profile-pill__chevron {
  transform: rotate(180deg);
}

/* VisionOS Floating Social Accounts Dropdown */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(356px, calc(100vw - 40px));
  border-radius: 24px;
  background: rgba(22, 23, 30, 0.92);
  backdrop-filter: blur(36px) saturate(180%);
  -webkit-backdrop-filter: blur(36px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.56), inset 0 1px 0 rgba(255, 255, 255, 0.26);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top right;
  transition: opacity 0.22s ease, transform 0.28s var(--spring-bouncy), visibility 0.22s;
  z-index: 95;
}

.profile-menu-wrap.open .profile-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.profile-dd__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 4px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-dd__me {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.profile-dd__me img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.34);
  flex-shrink: 0;
}

.profile-dd__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.profile-dd__list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 368px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.social-acc-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.2s var(--spring-quick);
}

.social-acc-row:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateX(2px);
}

.social-acc-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.social-acc-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.26);
  background: #14161e;
}

.social-acc-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #14161f;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
}

.social-acc-info {
  min-width: 0;
  flex: 1;
}

.social-acc-name {
  font-family: var(--font-display);
  font-size: 12.8px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.social-acc-handle {
  font-size: 11.2px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.social-acc-ext {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.18s ease, transform 0.2s var(--spring-quick);
}

.social-acc-row:hover .social-acc-ext {
  color: #ffffff;
  transform: translate(1px, -1px);
}

.profile-dd__foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-dd__foot button {
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-display);
  font-size: 11.2px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  transition: background 0.18s ease;
}

.profile-dd__foot button:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ===== Dynamic View Container ===== */
.view-root {
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: viewEnter 0.38s var(--spring-gentle) both;
}

/* ===== Reusable Glass Panels & Buttons ===== */
.glass-panel {
  background: var(--glass-panel);
  border: 1px solid var(--rim-panel);
  border-radius: var(--radius-panel);
  padding: 18px;
}

.glass-panel--strong {
  background: var(--glass-panel-strong);
}

.btn-primary {
  position: relative;
  overflow: hidden;
  height: 44px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  background: #ffffff;
  color: var(--text-dark);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-cta);
  transition: transform 0.26s var(--spring-bouncy), box-shadow 0.24s ease, background 0.18s;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: -30%;
  left: -45%;
  width: 36%;
  height: 160%;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.24), rgba(255, 255, 255, 0.9), transparent);
  transform: skewX(-22deg) translateX(-140%);
  pointer-events: none;
  transition: transform 0.65s var(--spring-gentle);
}

.btn-primary:hover::after {
  transform: skewX(-22deg) translateX(460%);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.025);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.36), 0 0 22px rgba(255, 255, 255, 0.26);
}

.btn-primary:active {
  transform: scale(0.96);
}

.btn-primary:disabled,
.btn-glass:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-glass {
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  background: rgba(24, 25, 32, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  backdrop-filter: blur(var(--blur-pill));
  transition: background 0.2s, border-color 0.2s, transform 0.24s var(--spring-bouncy);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.btn-glass:active {
  transform: scale(0.96);
}

.btn-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(var(--blur-pill));
  transition: background 0.2s, transform 0.24s var(--spring-bouncy);
}

.btn-circle:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

.btn-circle:active {
  transform: scale(0.93);
}

.btn-circle--sm {
  width: 36px;
  height: 36px;
}

.btn-circle--white {
  width: 38px;
  height: 38px;
  background: #ffffff;
  color: var(--text-dark);
  border: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.34);
}

.btn-circle--white:hover {
  background: #ffffff;
  transform: scale(1.1);
}

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.pill-tag--emerald {
  background: rgba(6, 78, 59, 0.72);
  border-color: rgba(52, 211, 153, 0.45);
  color: #a7f3d0;
}

.pill-tag--indigo {
  background: rgba(99, 102, 241, 0.26);
  border-color: rgba(129, 140, 248, 0.45);
  color: #c7d2fe;
}

.pill-tag--amber {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fde68a;
}

/* ===== VIEW 01: HOME / FEATURED ===== */
.home-grid {
  display: grid;
  grid-template-columns: 284px 1fr;
  gap: 20px;
  flex: 1;
}

.home-left {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

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

.panel-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
}

.sort-toggle {
  font-size: 11px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  transition: background 0.18s, color 0.18s;
}

.sort-toggle strong {
  color: rgba(255, 255, 255, 0.92);
}

.sort-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}

.latest-work-panel {
  display: flex;
  flex-direction: column;
  height: 438px;
  overflow: hidden;
  padding: 16px 10px 14px 16px;
  position: relative;
}

.latest-work-panel .panel-header {
  flex-shrink: 0;
  padding-right: 6px;
}

.latest-cards {
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 6px;
  padding-bottom: 8px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.latest-cards::-webkit-scrollbar {
  width: 5px;
}

.latest-cards::-webkit-scrollbar-track {
  background: transparent;
}

.latest-cards::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.latest-cards::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.48);
}

.latest-card {
  position: relative;
  height: 132px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.28s var(--spring-bouncy), border-color 0.22s;
}

.latest-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.45);
}

.latest-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--spring-gentle);
}

.latest-card:hover img {
  transform: scale(1.06);
}

.latest-card__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 11, 16, 0.04) 24%, rgba(10, 11, 16, 0.88) 100%);
}

.latest-card__content {
  position: absolute;
  inset: auto 12px 12px 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
}

.latest-card__title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.latest-card__meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 2px;
}

.latest-card--peek {
  height: 94px;
  opacity: 0.92;
}

/* Experience Compact List */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.exp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 6px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.2s, transform 0.22s var(--spring-quick);
}

.exp-row:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(3px);
}

.exp-row__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.exp-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.exp-role {
  font-family: var(--font-display);
  font-size: 12.2px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exp-company {
  font-size: 10.8px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exp-arrow {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Right Main Column */
.home-right {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

/* Hero Featured Carousel */
.hero-card {
  position: relative;
  height: 438px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: #0b0d18;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 28px;
}

.hero-card__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: heroKenBurns 7s ease-out both;
  transition: transform 0.8s var(--spring-gentle), opacity 0.45s ease;
}

.hero-card:hover .hero-card__bg {
  transform: scale(1.055);
}

.hero-progress-track {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 2.5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  z-index: 3;
  pointer-events: none;
}

.hero-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.85), rgba(192, 132, 252, 0.95), #ffffff);
  transform-origin: left center;
  animation: heroProgressFill 6.5s linear forwards;
}

.hero-card:hover .hero-progress-fill {
  animation-play-state: paused;
}

.hero-card__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
      90deg,
      rgba(9, 10, 16, 0.92) 0%,
      rgba(9, 10, 16, 0.72) 45%,
      rgba(9, 10, 16, 0.16) 82%,
      rgba(9, 10, 16, 0.04) 100%
    ),
    linear-gradient(180deg, rgba(9, 10, 16, 0) 52%, rgba(9, 10, 16, 0.84) 100%);
  z-index: 1;
}

.hero-top,
.hero-bottom-block {
  position: relative;
  z-index: 2;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.carousel-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: rgba(18, 19, 25, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  transition: width 0.38s var(--spring-bouncy), background 0.25s;
}

.carousel-dot.active {
  width: 26px;
  background: #ffffff;
}

.hero-body-anim {
  animation: heroSlideIn 0.5s var(--spring-gentle) both;
}

.hero-body-anim .hero-tags {
  animation: heroItemFade 0.42s var(--spring-gentle) 0.04s both;
}

.hero-body-anim .hero-title {
  animation: heroItemFade 0.48s var(--spring-gentle) 0.09s both;
}

.hero-body-anim .hero-desc {
  animation: heroItemFade 0.5s var(--spring-gentle) 0.14s both;
}

.hero-body-anim .hero-actions {
  animation: heroItemFade 0.52s var(--spring-gentle) 0.18s both;
}

.hero-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.03em;
  max-width: 520px;
  margin-bottom: 10px;
}

.hero-desc {
  font-size: 13.2px;
  line-height: 1.56;
  color: rgba(255, 255, 255, 0.78);
  max-width: 475px;
  margin-bottom: 22px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions__left,
.hero-actions__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Selected Projects 4-Col Row */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.see-all-btn {
  height: 28px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  transition: background 0.2s, transform 0.22s var(--spring-quick);
}

.see-all-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.cards-row-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  position: relative;
  height: 274px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #14151c;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1), border-color 0.24s, box-shadow 0.32s;
  will-change: transform;
}

.project-card:hover {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px) scale(1.015);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.46), 0 0 24px rgba(99, 102, 241, 0.16);
}

.project-card:hover .btn-circle--white {
  transform: scale(1.12) translateX(2px);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.28);
}

.project-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--spring-gentle);
}

.project-card:hover .project-card__img {
  transform: scale(1.07);
}

.project-card__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 11, 16, 0.04) 26%,
    rgba(10, 11, 16, 0.72) 64%,
    rgba(10, 11, 16, 0.96) 100%
  );
  z-index: 1;
}

.project-card__top,
.project-card__bottom {
  position: relative;
  z-index: 2;
}

.project-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-card__year {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(16, 17, 23, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.project-card__live-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(6, 78, 59, 0.84);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #a7f3d0;
  transition: background 0.18s, transform 0.22s var(--spring-bouncy), color 0.18s;
}

.project-card__live-dot:hover {
  background: #10b981;
  color: #052e16;
  transform: scale(1.06);
}

.project-card__bottom {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.project-card__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.project-card__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.project-card__desc {
  font-size: 11.2px;
  line-height: 1.42;
  color: rgba(255, 255, 255, 0.74);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Contextual Sub-Toolbar (Case Study, Resume, Motion Kit) ===== */
.sub-toolbar,
.cs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(24, 24, 30, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.cs-upper {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.cs-hero {
  position: relative;
  min-height: 338px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.26);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: zoom-in;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
  margin: 12px 0 18px;
}

.kpi-box {
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.kpi-val {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
}

.kpi-lbl {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 3px;
}

.meta-rows {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.meta-row span:first-child {
  color: var(--text-muted);
}

.meta-row strong {
  font-family: var(--font-display);
  font-weight: 600;
  text-align: right;
}

.cs-process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.cs-process-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.25s, transform 0.25s var(--spring-gentle), background 0.25s;
}

.cs-process-card.highlighted {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.bullet-chip {
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11.8px;
  color: rgba(255, 255, 255, 0.9);
}

.swatch-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
}

.swatch-btn {
  height: 50px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  position: relative;
  transition: transform 0.24s var(--spring-bouncy), box-shadow 0.2s;
}

.swatch-btn:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.mini-shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mini-shot {
  height: 114px;
  width: 100%;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: zoom-in;
  transition: transform 0.24s var(--spring-bouncy), border-color 0.2s;
}

.mini-shot:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.5);
}

.mini-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--spring-gentle);
}

.mini-shot:hover img {
  transform: scale(1.06);
}

.cs-next-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 22px;
  background: rgba(24, 24, 29, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  flex-wrap: wrap;
}

/* ===== VIEW 03: ALL PROJECTS GALLERY ===== */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  height: 34px;
  padding: 0 15px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.86);
  transition: all 0.24s var(--spring-bouncy);
}

.ui-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.filter-chip.active {
  background: #ffffff;
  color: var(--text-dark);
  border-color: #ffffff;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.gallery-grid.list-mode {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-grid.list-mode .project-card {
  height: 156px;
}

.gallery-footer-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 20px;
  background: rgba(24, 24, 29, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.16);
  flex-wrap: wrap;
}

/* ===== VIEW 04: ABOUT & EXPERIENCE ===== */
.about-grid {
  display: grid;
  grid-template-columns: 346px 1fr;
  gap: 20px;
  flex: 1;
}

.profile-card {
  border-radius: 24px;
  overflow: hidden;
  background: rgba(24, 24, 30, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  flex-direction: column;
}

.profile-hero-wrap {
  position: relative;
  height: 355px;
  overflow: hidden;
}

.profile-hero-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.profile-hero-wrap__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 15, 20, 0) 40%, rgba(24, 24, 30, 0.96) 100%);
}

.profile-hero-wrap__top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.profile-hero-wrap__bottom {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  z-index: 2;
}

.profile-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.social-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.social-pill {
  height: 31px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 11.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, transform 0.22s var(--spring-bouncy);
}

.social-pill:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.about-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stats-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.stat-tile {
  padding: 13px 16px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-tile strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
}

.stat-tile span {
  font-size: 11.5px;
  color: var(--text-muted);
}

.timeline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.25s, background 0.25s;
}

.timeline-item--active {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(129, 140, 248, 0.55);
}

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

.about-gear-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.hardware-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  font-size: 11.2px;
  color: rgba(255, 255, 255, 0.86);
}

.skill-col {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.skill-tag {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid transparent;
}

.skill-tag--btn {
  transition: background 0.18s, border-color 0.18s, transform 0.2s var(--spring-bouncy);
}

.skill-tag--btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.34);
  transform: translateY(-1px);
}

/* ===== VIEW 05: INTERACTIVE RESUME / CV ===== */
.resume-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.segmented {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: rgba(20, 20, 25, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  gap: 2px;
}

.segmented button {
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.22s var(--spring-bouncy);
}

.segmented button.active {
  background: #ffffff;
  color: var(--text-dark);
}

.resume-grid {
  display: grid;
  grid-template-columns: 274px 1fr;
  gap: 20px;
  flex: 1;
}

.outline-btn {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12.2px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  transition: all 0.2s var(--spring-quick);
}

.outline-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.outline-btn.active {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  font-weight: 600;
}

.cv-sheet-wrap {
  border-radius: 24px;
  overflow: auto;
  max-height: 750px;
  background: rgba(248, 247, 244, 0.96);
  color: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}

.cv-sheet {
  padding: 1.85em 2em;
  transition: font-size 0.22s var(--spring-gentle);
}

.cv-sheet__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 1em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.cv-kicker {
  font-family: var(--font-display);
  font-size: 0.66em;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #4f46e5;
  margin-bottom: 6px;
}

.cv-columns {
  display: grid;
  grid-template-columns: 1.85fr 1fr;
  gap: 28px;
  margin-top: 18px;
}

.cv-section-flash {
  animation: cvPulse 0.9s ease;
}

/* ===== VIEW 06: CONTACT & GUESTBOOK ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 430px 1fr;
  gap: 20px;
  flex: 1;
}

.contact-hero {
  position: relative;
  min-height: 360px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-label {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.84);
  margin-bottom: 7px;
}

.glass-input,
.glass-textarea {
  width: 100%;
  border-radius: 14px;
  background: var(--glass-input);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 12px 14px;
  font-size: 13px;
  color: #fff;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.glass-input:focus,
.glass-textarea:focus {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(18, 18, 24, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.glass-textarea {
  resize: vertical;
  min-height: 118px;
  line-height: 1.55;
}

.budget-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.budget-btn {
  height: 40px;
  border-radius: 13px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.88);
  transition: all 0.22s var(--spring-bouncy);
}

.budget-btn.active {
  background: #ffffff;
  color: var(--text-dark);
  border-color: #ffffff;
}

.guestbook-form-grid {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 8px;
}

.guestbook-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.gb-card {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.gb-del-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, color 0.18s;
}

.gb-del-btn:hover {
  background: rgba(239, 68, 68, 0.32);
  color: #fecaca;
}

.saved-inquiries-box {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* ===== VIEW 07: JOURNAL ===== */
.journal-hero {
  position: relative;
  min-height: 288px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 18px;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.article-card {
  border-radius: 22px;
  overflow: hidden;
  background: rgba(32, 32, 36, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.28s var(--spring-bouncy), border-color 0.22s;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.4);
}

.article-card__img {
  height: 156px;
  overflow: hidden;
}

.article-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--spring-gentle);
}

.article-card:hover .article-card__img img {
  transform: scale(1.06);
}

.article-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

/* ===== VIEW 08: INTERACTIVE MOTION KIT ===== */
.playground-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
}

.play-slot {
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.play-slot__kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* Interactive Spatial Switch (Matches FigCraft Variant Morph!) */
.spatial-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.spatial-switch {
  position: relative;
  width: 62px;
  height: 34px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  transition: background 0.3s var(--spring-bouncy), border-color 0.3s, box-shadow 0.3s;
}

.spatial-switch.on {
  background: rgba(16, 185, 129, 0.82);
  border-color: rgba(110, 231, 183, 0.7);
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.42);
}

.spatial-switch__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.32);
  transition: transform 0.32s var(--spring-bouncy);
}

.spatial-switch.on .spatial-switch__knob {
  transform: translateX(28px);
}

.motion-specs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.motion-spec-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-height: 264px;
  cursor: pointer;
}

.curve-stage {
  position: relative;
  height: 54px;
  display: flex;
  align-items: center;
}

.curve-track {
  position: absolute;
  inset: 6px 4px;
  pointer-events: none;
}

.curve-ball {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  left: 0;
  bottom: 0;
  transition: left 0.55s var(--spring-gentle), bottom 0.55s var(--spring-gentle);
}

.motion-spec-card:hover .curve-ball--gentle,
.motion-spec-card.playing .curve-ball--gentle {
  left: calc(100% - 11px);
  bottom: 31px;
  transition: left 0.65s var(--spring-gentle), bottom 0.65s var(--spring-gentle);
}

.motion-spec-card:hover .curve-ball--bouncy,
.motion-spec-card.playing .curve-ball--bouncy {
  left: calc(100% - 11px);
  bottom: 31px;
  transition: left 0.55s var(--spring-bouncy), bottom 0.55s var(--spring-bouncy);
}

.motion-spec-card:hover .curve-ball--quick,
.motion-spec-card.playing .curve-ball--quick {
  left: calc(100% - 11px);
  bottom: 31px;
  transition: left 0.25s var(--spring-quick), bottom 0.25s var(--spring-quick);
}

.article-progress-bar {
  position: sticky;
  top: -24px;
  margin: -24px -24px 16px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 5;
}

.article-progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #60a5fa, #a855f7, #34d399);
  transition: width 0.12s linear;
}

/* ===== SPATIAL GLASS OVERLAYS / MODALS ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 7, 12, 0.56);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

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

.modal-card {
  width: min(640px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 28px;
  background: linear-gradient(180deg, var(--glass-modal-top), var(--glass-modal-bottom));
  backdrop-filter: blur(var(--blur-modal)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-modal)) saturate(170%);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-modal);
  padding: 24px;
  transform: scale(0.94) translateY(14px);
  transition: transform 0.32s var(--spring-bouncy);
}

.modal-backdrop.open .modal-card {
  transform: scale(1) translateY(0);
}

.modal-card--sm {
  width: min(460px, 100%);
}

.modal-card--lg {
  width: min(740px, 100%);
}

.modal-card--success {
  background: linear-gradient(180deg, rgba(43, 59, 54, 0.92), rgba(24, 34, 31, 0.96));
  border-color: rgba(52, 211, 153, 0.45);
}

.spotlight-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px 0 18px;
  height: 54px;
  border-radius: 18px;
  background: rgba(14, 14, 18, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.spotlight-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 16px;
  color: #fff;
}

.spotlight-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
  transition: background 0.18s, transform 0.2s var(--spring-quick), border-color 0.18s;
}

.spotlight-row:hover,
.spotlight-row.selected {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateX(3px);
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.day-btn {
  padding: 12px 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.22s var(--spring-bouncy);
}

.day-btn.active {
  background: #ffffff;
  color: var(--text-dark);
}

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

.slot-btn {
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.22s var(--spring-bouncy);
}

.slot-btn.active {
  background: rgba(99, 102, 241, 0.38);
  border-color: rgba(129, 140, 248, 0.72);
  color: #e0e7ff;
  font-weight: 700;
}

.slot-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Floating Glass Toast */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(22, 24, 30, 0.88);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42);
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.32s var(--spring-bouncy) both;
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

/* ===== Animations ===== */
@keyframes floatInDown {
  from {
    opacity: 0;
    transform: translateY(-14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dockFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes windowReveal {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes viewEnter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes heroSlideIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spinOnce {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

@keyframes cvPulse {
  0% {
    background: rgba(99, 102, 241, 0.22);
    border-radius: 8px;
  }
  100% {
    background: transparent;
  }
}

/* Staggered Spatial Cascade & Ambient Keyframes */
.stagger-in {
  animation: cardCascadeIn 0.46s var(--spring-gentle) calc(var(--i, 0) * 40ms) backwards;
}

.dock-btn.dock-pop svg {
  animation: dockPop 0.42s var(--spring-bouncy);
}

@keyframes cardCascadeIn {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0) scale(0.982);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes heroItemFade {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes heroKenBurns {
  from {
    transform: scale(1.06);
  }
  to {
    transform: scale(1);
  }
}

@keyframes heroProgressFill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes skillBarGrow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes dockPop {
  0% {
    transform: scale(0.86);
  }
  55% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes orbDriftA {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(6vw, 5vh, 0) scale(1.12);
  }
}

@keyframes orbDriftB {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(-7vw, -6vh, 0) scale(1.14);
  }
}

@keyframes orbDriftC {
  0% {
    transform: translate3d(0, 0, 0) scale(0.94);
  }
  100% {
    transform: translate3d(-4vw, 6vh, 0) scale(1.1);
  }
}

/* ===== VIEW 09: SPATIAL ADMIN CMS ===== */
.admin-login-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 12px;
}

.admin-login-card {
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px;
}

.admin-lock-orb {
  width: 58px;
  height: 58px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.34), rgba(56, 189, 248, 0.24));
  border: 1.5px solid rgba(255, 255, 255, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 10px 24px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.admin-tabs-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.admin-body,
.admin-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.admin-split-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.admin-asset-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.admin-asset-tile {
  position: relative;
  height: 102px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #14151c;
}

.admin-asset-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-asset-tile span {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(12, 13, 18, 0.78);
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-global-img-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.admin-img-card {
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-img-card__preview {
  height: 118px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #111218;
}

.admin-img-card__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-master-detail {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  align-items: start;
}

.admin-list-scroll {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 680px;
  overflow-y: auto;
  padding-right: 4px;
}

.admin-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}

.admin-list-item:hover {
  background: rgba(255, 255, 255, 0.12);
}

.admin-list-item.active {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.42);
}

.admin-list-item img {
  width: 48px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-proj-media-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-previews-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  min-height: 150px;
  align-content: start;
}

.admin-mini-preview {
  position: relative;
  height: 78px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #12131a;
}

.admin-mini-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-mini-preview__del {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(15, 16, 22, 0.84);
  color: #fecaca;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.admin-upload-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
}

.admin-dropzone {
  border: 1.5px dashed rgba(255, 255, 255, 0.34);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  padding: 26px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.22s var(--spring-quick);
}

.admin-dropzone:hover,
.admin-dropzone.dragover {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(129, 140, 248, 0.78);
  transform: scale(1.005);
}

.admin-media-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.admin-media-tile {
  border-radius: 18px;
  overflow: hidden;
  background: rgba(24, 24, 30, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  flex-direction: column;
}

.admin-media-tile__thumb {
  position: relative;
  height: 132px;
  overflow: hidden;
  background: #101118;
}

.admin-media-tile__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--spring-gentle);
}

.admin-media-tile:hover .admin-media-tile__thumb img {
  transform: scale(1.05);
}

.admin-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 4px;
}

.admin-picker-item {
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s var(--spring-bouncy), border-color 0.2s;
}

.admin-picker-item:hover {
  transform: translateY(-2px);
  border-color: #ffffff;
}

.admin-picker-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.admin-picker-item span {
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== SKILL METERS (ABOUT), CERTIFICATES & TOOLS/ARCADE LAB ===== */
.skill-meters-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-bottom: 14px;
}

.skill-meter-item {
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.11);
}

.skill-meter-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  overflow: hidden;
}

.skill-meter-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  transform-origin: left center;
  animation: skillBarGrow 0.85s var(--spring-gentle) calc(var(--i, 0) * 65ms + 80ms) both;
  transition: width 0.65s var(--spring-gentle);
}

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

.cert-card {
  border-radius: 20px;
  overflow: hidden;
  background: rgba(24, 24, 30, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1), border-color 0.22s, box-shadow 0.28s;
  will-change: transform;
}

.cert-card:hover {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-5px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.46);
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.38), 0 0 22px rgba(96, 165, 250, 0.14);
}

.cert-card__img {
  position: relative;
  height: 170px;
  overflow: hidden;
  background: #0e1018;
}

.cert-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--spring-gentle);
}

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

.cert-card__body {
  padding: 14px 15px 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.lab-tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.palette-card {
  height: 196px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), 0 10px 24px rgba(0, 0, 0, 0.26);
  transition: transform 0.24s var(--spring-bouncy);
}

.palette-card:hover {
  transform: translateY(-3px);
}

.palette-lock-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(12, 13, 20, 0.62);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.palette-hex-btn {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(12, 13, 20, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.md-preview-box {
  font-size: 13px;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.9);
}

.md-preview-box h1,
.md-preview-box h2,
.md-preview-box h3 {
  font-family: var(--font-display);
  font-weight: 800;
  margin: 0.35em 0 0.45em;
  line-height: 1.25;
}

.md-preview-box h1 {
  font-size: 20px;
}

.md-preview-box h2 {
  font-size: 16px;
}

.md-preview-box ul {
  padding-left: 18px;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.md-preview-box code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
}

.arcade-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 18px;
  align-items: stretch;
}

.arcade-canvas-wrap {
  position: relative;
  min-height: 410px;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.16), rgba(9, 10, 18, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}

.arcade-canvas {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.48);
  max-width: 100%;
  height: auto;
  display: block;
  background: #0a0c14;
}

.arcade-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(9, 10, 18, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 20px;
  z-index: 4;
}

.terminal-screen {
  height: 290px;
  overflow-y: auto;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(8, 10, 16, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.62;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overscroll-behavior: contain;
}

.term-line {
  word-break: break-word;
}

.term-line--sys {
  color: #93c5fd;
}

.term-line--cmd {
  color: #34d399;
  font-weight: 700;
}

.term-line--out {
  color: rgba(255, 255, 255, 0.88);
}

.term-line--err {
  color: #fca5a5;
}

.chat-screen {
  height: 254px;
  overflow-y: auto;
  padding: 12px;
  border-radius: 16px;
  background: rgba(12, 13, 20, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  gap: 9px;
  overscroll-behavior: contain;
}

.chat-bubble {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 15px;
  font-size: 12.2px;
  line-height: 1.5;
  word-break: break-word;
}

.chat-bubble--bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom-left-radius: 5px;
  color: rgba(255, 255, 255, 0.94);
}

.chat-bubble--user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.86), rgba(56, 189, 248, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom-right-radius: 5px;
  color: #ffffff;
}

/* ===== Responsive Breakpoints ===== */
@media (max-width: 1439px) {
  .spatial-shell {
    width: min(1292px, 100%);
    grid-template-columns: 56px minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  .window-topbar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .nav-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

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

  .nav-pill {
    padding: 0 12px;
    font-size: 12px;
    flex-shrink: 0;
  }

  .home-grid,
  .about-grid,
  .resume-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-right {
    order: -1;
  }

  .latest-work-panel {
    height: auto;
    padding: 16px;
  }

  .latest-cards {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    padding-right: 0;
    padding-bottom: 8px;
  }

  .latest-card {
    flex: 0 0 248px;
    height: 142px;
    scroll-snap-align: start;
  }

  .cards-row-4,
  .gallery-grid,
  .motion-specs-grid,
  .cert-grid,
  .admin-kpi-grid,
  .admin-global-img-grid,
  .admin-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .palette-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cs-upper,
  .cs-process-grid,
  .articles-grid,
  .playground-grid,
  .lab-tool-grid,
  .arcade-layout,
  .skills-grid-3,
  .about-gear-grid,
  .admin-split-2,
  .admin-master-detail,
  .admin-proj-media-box,
  .admin-upload-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  html,
  body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .spatial-stage {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    padding: 10px 10px 92px;
  }

  .spatial-shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 10px;
  }

  .browser-chrome {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 42px;
    gap: 6px;
    padding: 0 8px;
  }

  .chrome-group {
    gap: 4px;
  }

  .chrome-icon-btn {
    width: 28px;
    height: 28px;
  }

  .address-pill {
    height: 30px;
    padding: 0 3px 0 9px;
    gap: 4px;
  }

  .address-pill__center {
    justify-content: flex-start;
    font-size: 10.8px;
    gap: 5px;
  }

  .chrome-hide-mobile {
    display: none;
  }

  .floating-dock {
    position: fixed;
    top: auto;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 120;
    width: auto;
    max-width: calc(100vw - 20px);
    flex-direction: row;
    padding: 5px 6px;
    gap: 3px;
    animation: none;
  }

  .dock-btn,
  .dock-indicator {
    width: 36px;
    height: 36px;
  }

  .dock-divider {
    width: 1px;
    height: 18px;
    margin: 0 2px;
  }

  .dock-btn[data-tooltip]::after {
    display: none;
  }

  .glass-window {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: auto;
    border-radius: 24px;
    padding: 14px;
    gap: 14px;
  }

  .view-root {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .window-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .topbar-right {
    order: 1;
    width: 100%;
    min-width: 0;
    justify-content: space-between;
    gap: 8px;
  }

  .profile-menu-wrap {
    flex: 1;
    min-width: 0;
  }

  .profile-pill {
    width: 100%;
    height: 42px;
    padding: 4px 12px 4px 5px;
    justify-content: space-between;
  }

  .profile-pill__text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  .profile-pill__name,
  .profile-pill__role {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .bell-btn {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    order: 2;
  }

  .profile-dropdown {
    left: 0;
    right: auto;
    width: min(340px, calc(100vw - 48px));
    transform-origin: top left;
  }

  .search-trigger {
    order: 2;
    width: 100%;
    height: 40px;
    min-width: 0;
  }

  #topbar-nav-pills {
    display: none;
  }

  .resume-left-rail {
    order: 2;
  }

  .cv-sheet-wrap {
    order: 1;
    max-height: none;
  }

  .cv-sheet {
    padding: 1.25em 1.15em;
  }

  .contact-hero-card {
    min-height: 220px;
    padding: 18px;
  }

  .contact-hero-card h1 {
    font-size: 24px !important;
  }

  .direct-row {
    gap: 8px;
    padding: 11px 12px;
  }

  .direct-row strong,
  .direct-row__val {
    font-size: 12px;
    word-break: break-all;
  }

  .glass-panel {
    padding: 14px;
    border-radius: 20px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .panel-header {
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }

  .latest-card {
    flex: 0 0 228px;
    height: 132px;
  }

  .exp-role,
  .exp-company {
    max-width: 100%;
  }

  .hero-card {
    height: auto;
    min-height: 340px;
    padding: 18px;
    border-radius: 22px;
  }

  .hero-title {
    font-size: 22px;
  }

  .hero-desc {
    font-size: 12.2px;
    margin-bottom: 16px;
  }

  .hero-actions {
    gap: 8px;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-glass {
    height: 38px;
    padding: 0 14px;
    font-size: 12px;
  }

  .sub-toolbar,
  .cs-toolbar,
  .filter-bar,
  .resume-toolbar {
    padding: 10px;
    gap: 8px;
  }

  .cs-hero {
    min-height: 270px;
    padding: 16px;
    gap: 14px;
  }

  .cs-hero .pill-tag {
    white-space: nowrap;
    font-size: 10px;
    height: 24px;
    padding: 0 9px;
  }

  .kpi-grid {
    gap: 8px;
  }

  .kpi-val {
    font-size: 20px;
  }

  .cv-sheet__header {
    flex-direction: column;
    gap: 8px;
  }

  .cards-row-4,
  .gallery-grid,
  .gallery-grid.list-mode,
  .motion-specs-grid,
  .cert-grid,
  .skill-meters-grid,
  .form-grid-2,
  .budget-grid,
  .stats-row-3,
  .cv-columns,
  .slots-grid,
  .about-gear-grid,
  .hardware-grid,
  .guestbook-form-grid,
  .admin-kpi-grid,
  .admin-global-img-grid,
  .admin-media-grid,
  .admin-picker-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .palette-card {
    height: 136px;
  }

  .days-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  .project-card {
    height: 232px;
  }

  /* Disable 3D hover tilt on touch/narrow viewports for crisp touch scrolling */
  .project-card,
  .cert-card {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Clean Print / PDF Export Mode for Resume ===== */
@media print {
  body {
    background: #ffffff !important;
    color: #111216 !important;
  }
  .spatial-backdrop,
  .browser-chrome,
  .floating-dock,
  .window-topbar,
  .sub-toolbar,
  .resume-toolbar,
  .resume-left-rail,
  .modal-backdrop,
  .toast-stack {
    display: none !important;
  }
  .spatial-stage,
  .spatial-shell,
  .glass-window,
  .resume-grid {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
    backdrop-filter: none !important;
  }
  .cv-sheet-wrap {
    max-height: none !important;
    overflow: visible !important;
    box-shadow: none !important;
    border: none !important;
  }
  .cv-sheet {
    transform: none !important;
    padding: 0 !important;
  }
}
