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

:root {
  --bg-paper: #f7f4ed;
  --bg-dark: #000000;
  --text-primary: rgba(248, 250, 252, 0.97);
  --text-secondary: rgba(248, 250, 252, 0.74);
  --text-muted: rgba(248, 250, 252, 0.46);
  --accent-gold: #f3d5a5;
  --accent-amber: #dfb174;
  --accent-slate: #7c98b3;
  --accent-peri: #94a8d0;
  --accent-lav: #9d8ec7;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
}

html,
body {
  width: 100%;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.stage3-open {
  overflow: hidden;
}

/* ════════════════════════════════════════════
   Scroll Track & Fixed Stage  (Stages 1 & 2)
   ════════════════════════════════════════════ */
.scroll-track {
  position: relative;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  width: 100%;
  height: 300vh;
}

.fixed-stage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-dark);
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.75s ease;
  will-change: transform, opacity;
}

.fixed-stage.stage3-pushed {
  transform: translateY(-100%);
  opacity: 0.25;
}

/* ════════════════════════════════════════════
   Stage 1
   ════════════════════════════════════════════ */
.stage1-wrap {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 3;
  background-color: #f7f4ed;
  background-image:
    linear-gradient(to right, rgba(160, 148, 132, 0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(160, 148, 132, 0.09) 1px, transparent 1px);
  background-size: 90px 90px;
  opacity: 1;
  pointer-events: auto;
}

.layer {
  position: absolute;
  inset: 0;
  height: 100vh;
  width: auto;
  max-width: 100vw;
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  object-fit: contain;
  object-position: center bottom;
  transform: translateY(0);
  mix-blend-mode: normal;
  opacity: 1;
  clip-path: inset(2% 2% 0% 2%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  user-select: none;
  pointer-events: none;
  will-change: transform, opacity;
}

.layer-bg {
  z-index: 1;
}

.layer-name {
  z-index: 2;
  transform: translateY(0);
  mix-blend-mode: normal;
}

.layer-fg {
  z-index: 3;
  mix-blend-mode: normal;
  pointer-events: none;
}

.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: clamp(1.25rem, 3.5vh, 2.25rem);
  transform: translateX(-50%);
  z-index: 4;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  background: rgba(18, 20, 26, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  pointer-events: none;
  animation: floatHint 2.2s ease-in-out infinite;
  transition: opacity 0.35s ease;
}

@keyframes floatHint {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ════════════════════════════════════════════
   Stage 2
   ════════════════════════════════════════════ */
.stage2-wrap {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 4;
  background-color: #000;
  opacity: 0;
  pointer-events: none;
  transition: filter 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.layer-photo2 {
  height: 100vh;
  width: auto;
  max-width: 100vw;
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  object-fit: contain;
  object-position: center bottom;
  transform: translateY(0);
  clip-path: inset(2% 2% 2% 2%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  z-index: 4;
}

.stage2-btn-mask {
  position: absolute;
  right: 2.5%;
  top: 50%;
  transform: translateY(-50%);
  width: 18%;
  height: 10%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.88) 40%, transparent 100%);
  z-index: 5;
  pointer-events: none;
}

.stage2-wrap.cursor-hidden,
.stage2-wrap.cursor-hidden * {
  cursor: none;
}

.stage2-side-label {
  position: absolute;
  top: 50%;
  z-index: 5;
  pointer-events: none;
  user-select: none;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  text-transform: uppercase;
  font-family: 'Playfair Display', serif;
  font-size: clamp(0.9rem, 1.2vw, 1.14rem);
  letter-spacing: 0.42em;
  color: rgba(255, 255, 255, 0.45);
}

.stage2-side-label--left {
  left: 22px;
  transform: translateY(-50%) rotate(180deg);
}

.stage2-side-label--right {
  right: 22px;
  transform: translateY(-50%);
}

/* ════════════════════════════════════════════
   Mouse-Following Explore Pill
   ════════════════════════════════════════════ */
.explore-pill-btn {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  white-space: nowrap;
  padding: 10px 12px 10px 22px;
  border-radius: 9999px;
  background: rgba(20, 20, 24, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f5f5f7;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  transition: opacity 0.35s ease, border-color 0.25s ease, background 0.25s ease;
}

.explore-pill-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.explore-pill-btn:hover {
  background: rgba(32, 32, 38, 0.95);
  border-color: rgba(255, 255, 255, 0.42);
}

.plus-circle {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 400;
  color: #fff;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease;
}

.explore-pill-btn:hover .plus-circle {
  transform: rotate(90deg);
  background: rgba(255, 255, 255, 0.20);
}

/* ════════════════════════════════════════════
   Stage 3 — Full-screen overlay
   ════════════════════════════════════════════ */
.stage3-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100vh;
  scroll-behavior: smooth;
  background-color: #050608;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    radial-gradient(rgba(243, 213, 165, 0.16) 1px, transparent 1px);
  background-size: 120px 120px, 190px 190px;
  background-position: 0 0, 45px 70px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  isolation: isolate;
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.55s, background-color 0.3s ease, color 0.3s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.stage3-overlay::-webkit-scrollbar {
  width: 5px;
}

.stage3-overlay::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.stage3-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ════════════════════════════════════════════
   Flowing Geometric Wing Waves Background
   ════════════════════════════════════════════ */
.energy-waves-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
}

.wing-wave-group {
  animation: wingSway 10s ease-in-out infinite alternate;
}

.wing-wave {
  stroke-dasharray: 280 520;
  animation: wingDashFlow 12s linear infinite;
}

@keyframes wingDashFlow {
  0% {
    stroke-dashoffset: 0;
  }

  100% {
    stroke-dashoffset: -800;
  }
}

@keyframes wingSway {
  0% {
    transform: translateY(-8px);
  }

  100% {
    transform: translateY(8px);
  }
}

/* ════════════════════════════════════════════
   Stage 3 Controls (Theme Toggle + Back Button)
   ════════════════════════════════════════════ */
.stage3-controls {
  position: fixed;
  top: clamp(0.9rem, 2.5vw, 1.5rem);
  right: clamp(1rem, 2.5vw, 1.75rem);
  z-index: 44;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.back-btn,
.stage3-ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.52rem 1.05rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(14, 16, 24, 0.68);
  backdrop-filter: blur(20px) saturate(165%);
  -webkit-backdrop-filter: blur(20px) saturate(165%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.3s ease, color 0.3s ease;
}

.back-btn:hover,
.back-btn:focus-visible,
.stage3-ctrl-btn:hover,
.stage3-ctrl-btn:focus-visible {
  outline: none;
  transform: translateY(-2px);
  border-color: #D5B77A;
  background: rgba(20, 24, 34, 0.86);
}

/* ════════════════════════════════════════════
   Stage 3 Sticky Section Navigation Bar
   ════════════════════════════════════════════ */
.stage3-nav {
  position: sticky;
  top: 0;
  z-index: 42;
  width: 100%;
  padding: 0.72rem clamp(1rem, 2.5vw, 1.75rem);
  padding-right: 13.5rem;
  background: rgba(10, 12, 18, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transition: background-color 0.3s ease, border-color 0.2s ease;
}

.stage3-nav-links {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  white-space: nowrap;
}

.stage3-nav-links::-webkit-scrollbar {
  display: none;
}

.stage3-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.36rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(248, 250, 252, 0.76);
  text-decoration: none;
  border: 1px solid transparent;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.stage3-nav-link:hover,
.stage3-nav-link:focus-visible {
  outline: none;
  color: #ffffff;
  border-color: rgba(213, 183, 122, 0.55);
  transform: translateY(-2px);
}

.stage3-nav-link.is-active {
  color: #D5B77A;
  background: rgba(213, 183, 122, 0.12);
  border-color: rgba(213, 183, 122, 0.55);
}

/* ════════════════════════════════════════════
   App Feed
   ════════════════════════════════════════════ */
.app-feed {
  position: relative;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  z-index: 5;
  width: 100%;
  min-height: 100vh;
}

.feed-col {
  max-width: 1020px;
  margin: 0 auto;
  padding: 84px 48px 130px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* ════════════════════════════════════════════
   Card Slots — alternating left / right
   ════════════════════════════════════════════ */
.card-slot {
  position: relative;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  width: min(560px, 86vw);
}

.card-slot--left {
  align-self: flex-start;
}

.card-slot--right {
  align-self: flex-end;
}

.card-slot--center {
  align-self: center;
  width: min(740px, 90vw);
}

.card-slot--wide {
  width: min(860px, 92vw);
}

.card-slot--projects {
  width: min(680px, 88vw);
}

/* ---- Corner SVG Ornaments ---- */
.corner-svg {
  position: absolute;
  width: 64px;
  height: 64px;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 0 6px rgba(243, 213, 165, 0.22));
}

/* On LEFT-aligned cards: top-right & bottom-left corners protrude outward */
.card-slot--left .corner-tr {
  top: -10px;
  right: -10px;
}

.card-slot--left .corner-bl {
  bottom: -10px;
  left: -10px;
}

/* On RIGHT-aligned cards: top-left & bottom-right corners protrude outward */
.card-slot--right .corner-tl {
  top: -10px;
  left: -10px;
}

.card-slot--right .corner-br {
  bottom: -10px;
  right: -10px;
}

/* ════════════════════════════════════════════
   Glass Row Cards — 20% matte
   ════════════════════════════════════════════ */
.glass-row-card {
  flex: 1;
  z-index: 5;
  background: rgba(14, 17, 24, 0.22);
  backdrop-filter: blur(22px) saturate(175%);
  -webkit-backdrop-filter: blur(22px) saturate(175%);
  border: 1px solid rgba(243, 213, 165, 0.36);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.6),
    inset 0 1px 2px rgba(255, 244, 224, 0.45),
    inset 0 -1px 2px rgba(147, 197, 253, 0.25);
  border-radius: 26px;
  overflow: hidden;
  padding: clamp(1.4rem, 3vw, 2rem) clamp(1.5rem, 3.5vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  color: #ffffff;
  font-size: 15.5px;
  line-height: 1.65;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.78);
  position: relative;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* Cascading reveal */
  opacity: 0;
  transform: translateY(-28px) rotate(var(--card-tilt, 0deg));
  transition:
    opacity 0.52s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--row-index, 0) * 110ms),
    transform 0.52s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--row-index, 0) * 110ms);
}

.px-shimmer {
  animation: pixelShimmer 5s ease-in-out infinite alternate;
}

@keyframes pixelShimmer {
  0% {
    opacity: 0.35;
  }

  100% {
    opacity: 0.88;
  }
}

.glass-row-card.is-revealed {
  opacity: 1;
  transform: translateY(0) rotate(var(--card-tilt, 0deg));
}

/* Hover: straighten + slight lift */
.glass-row-card:hover,
.glass-row-card:focus-within {
  transform: translateY(-4px) rotate(0deg) scale(1.01) !important;
  transition-delay: 0ms !important;
  border-color: rgba(213, 183, 122, 0.72);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(213, 183, 122, 0.18);
  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
  border-color 0.2s ease,
  box-shadow 0.2s ease;
}

/* Wide feathered liquid-glass reflection — zero hard vertical edge */
.glass-row-card::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -100%;
  width: 300%;
  height: 200%;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(112deg,
      transparent 0%,
      transparent 36%,
      rgba(255, 255, 255, 0.16) 50%,
      transparent 64%,
      transparent 100%);
  mix-blend-mode: screen;
  animation: smoothLiquidReflection 9s ease-in-out infinite alternate;
}

@keyframes smoothLiquidReflection {
  0% {
    transform: translate3d(-15%, 0, 0) rotate(-1.5deg);
  }

  100% {
    transform: translate3d(15%, 0, 0) rotate(1.5deg);
  }
}

/* All direct children sit above ::after */
.glass-row-card>* {
  position: relative;
  z-index: 1;
}

/* ════════════════════════════════════════════
   Row Typography
   ════════════════════════════════════════════ */
.row-eyebrow {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent-gold);
  text-shadow: none;
}

.row-title {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 680;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: rgba(255, 255, 255, 0.97);
}

.row-heading {
  font-size: clamp(1.15rem, 2.1vw, 1.55rem);
  font-weight: 620;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.96);
}

.row-subtitle {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.4;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}

.row-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.row-body p {
  color: var(--text-secondary);
}

/* ════════════════════════════════════════════
   Inner Sub-cards
   ════════════════════════════════════════════ */
.inner-cards {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.inner-card {
  padding: 1rem 1.15rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.inner-card p {
  font-size: 0.93rem;
  line-height: 1.56;
  color: var(--text-secondary);
}

.inner-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.inner-card-head h3 {
  font-size: 0.98rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.96);
}

.glass-chip {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ════════════════════════════════════════════
   Bullet List
   ════════════════════════════════════════════ */
.glass-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.1rem;
}

.glass-bullets li {
  position: relative;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  padding-left: 1rem;
  font-size: 0.93rem;
  line-height: 1.52;
  color: var(--text-secondary);
}

.glass-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-gold);
}

.glass-bullets strong {
  color: rgba(255, 255, 255, 0.96);
  font-weight: 600;
}

/* ════════════════════════════════════════════
   Connect 2×2 Grid
   ════════════════════════════════════════════ */
.connect-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.connect-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.15rem 1.25rem;
  border-radius: 22px;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px solid rgba(255, 255, 255, 0.20);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26);
  transition:
  transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
  border-color 0.2s ease,
  background 0.2s ease;
}

.connect-card:hover,
.connect-card:focus-visible {
  outline: none;
  transform: translateY(-2px);
  border-color: #D5B77A;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.20) 0%, rgba(255, 255, 255, 0.08) 100%);
}

.connect-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.connect-name {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.96);
}

.connect-arrow {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.72);
  transition: transform 0.2s ease;
}

.connect-card:hover .connect-arrow {
  transform: translate(2px, -2px);
}

.connect-handle {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.62);
  word-break: break-word;
}

.connect-email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
}

.connect-handle--link {
  text-decoration: none;
  transition: color 0.2s ease;
}

.connect-handle--link:hover,
.connect-handle--link:focus-visible {
  outline: none;
  color: #D5B77A;
}

.copy-email-btn {
  padding: 0.24rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(248, 250, 252, 0.92);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.copy-email-btn:hover,
.copy-email-btn:focus-visible {
  outline: none;
  transform: translateY(-2px);
  border-color: #D5B77A;
  background: rgba(213, 183, 122, 0.16);
}

.copy-email-btn.is-copied {
  border-color: #D5B77A;
  color: #D5B77A;
}

/* ════════════════════════════════════════════
   Skills, S&AI Contributions & Project Details
   ════════════════════════════════════════════ */
.skills-groups {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.skill-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.skill-cat {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.56);
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  color: rgba(248, 250, 252, 0.92);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(243, 213, 165, 0.25);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.skill-pill:hover,
.skill-pill:focus-visible {
  outline: none;
  transform: translateY(-2px);
  background: rgba(243, 213, 165, 0.16);
  border-color: rgba(243, 213, 165, 0.55);
}

.sai-meta-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.sai-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.meta-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.54);
}

.meta-link {
  color: var(--accent-gold);
  text-decoration: none;
  font-size: 0.88rem;
  word-break: break-word;
  border-bottom: 1px solid rgba(243, 213, 165, 0.3);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.meta-link:hover,
.meta-link:focus-visible {
  outline: none;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
}

.meta-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84rem;
  color: rgba(248, 250, 252, 0.92);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  width: fit-content;
}

.sai-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.sai-toggle-all-btn {
  padding: 0.38rem 0.85rem;
  font-size: 0.78rem;
}

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

.sai-task-card {
  padding: 0.95rem 1.05rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.sai-task-card:hover,
.sai-task-card:focus-within {
  border-color: rgba(213, 183, 122, 0.65);
}

.sai-task-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.sai-task-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.sai-task-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #D5B77A;
}

.sai-task-title-wrap h3 {
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.35;
  color: rgba(248, 250, 252, 0.96);
}

.sai-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.26rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(248, 250, 252, 0.88);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.sai-expand-btn:hover,
.sai-expand-btn:focus-visible {
  outline: none;
  transform: translateY(-2px);
  border-color: #D5B77A;
  background: rgba(213, 183, 122, 0.14);
}

.sai-expand-chevron {
  display: inline-block;
  transition: transform 0.2s ease;
}

.sai-task-card.is-expanded .sai-expand-chevron {
  transform: rotate(180deg);
}

.sai-task-details {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.26s ease, opacity 0.22s ease;
  opacity: 0;
}

.sai-task-card.is-expanded .sai-task-details {
  grid-template-rows: 1fr;
  opacity: 1;
}

.sai-task-details-inner {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.sai-task-card.is-expanded .sai-task-details-inner {
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.sai-task-card p {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.sai-task-card strong {
  color: rgba(248, 250, 252, 0.95);
}

.issue-link {
  color: var(--accent-gold);
  text-decoration: none;
}

.issue-link:hover {
  text-decoration: underline;
}

.chip-link {
  text-decoration: none;
  max-width: 100%;
  width: fit-content;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

  .chip-link:hover,
  .chip-link:focus-visible {
    outline: none;
    transform: translateY(-2px);
    border-color: #D5B77A;
    color: #ffffff;
  }

  .project-card-head {
    align-items: flex-start;
    padding-bottom: 0.9rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .project-card-head .project-topic {
    font-size: clamp(1.35rem, 2.2vw, 1.5rem);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.25;
  }

  .project-meta-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
  }

  .project-meta-list strong {
    color: rgba(248, 250, 252, 0.96);
  }

  .project-meta-list code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.85em;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
  }

  /* ════════════════════════════════════════════
   Responsive
   ════════════════════════════════════════════ */
  @media (hover: none) {
    .explore-pill-btn {
      top: auto;
      left: auto;
      bottom: 36px;
      right: 28px;
      transform: none !important;
    }
  }

  @media (max-width: 768px) {
    .card-slot {
      --card-tilt: 0deg;
      align-self: center !important;
      width: 92vw !important;
    }

    .stage3-controls {
      right: 1rem;
    }

    .stage3-nav {
      padding: 3.55rem 0.75rem 0.55rem;
    }

    .connect-grid,
    .sai-meta-bar,
    .sai-tasks-grid {
      grid-template-columns: 1fr;
    }

    .feed-col {
      padding: 28px 16px 100px;
      gap: 20px;
      max-width: 100%;
    }

    .app-feed {
      padding-left: 0;
      padding-right: 0;
      overflow-x: hidden;
    }

    .corner-svg {
      display: none;
    }
  }

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

    .glass-row-card {
      transition-delay: 0ms !important;
      transition-duration: 0.01ms !important;
      transform: rotate(var(--card-tilt, 0deg));
    }

    .glass-row-card.is-revealed {
      transform: rotate(var(--card-tilt, 0deg));
    }

    .glass-row-card::after,
    .px-shimmer,
    .wing-wave,
    .wing-wave-group {
      animation: none !important;
    }
  }

  @media (max-width: 600px) {
    .stage2-side-label {
      font-size: 0.78rem;
      letter-spacing: 0.28em;
    }

    .stage2-side-label--left {
      left: 8px;
    }

    .stage2-side-label--right {
      right: 8px;
    }
  }

  /* ════════════════════════════════════════════
   Stage 3 Off-White Mode (#stage3Panel.offwhite-mode)
   ════════════════════════════════════════════ */
  #stage3Panel.offwhite-mode {
    background: #F5F3EE !important;
    background-color: #F5F3EE !important;
    background-image: none !important;
    color-scheme: light;
    color: #1F2937 !important;
    scrollbar-color: rgba(15, 23, 42, 0.22) transparent;
  }

  #stage3Panel.offwhite-mode::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.22);
  }

  #stage3Panel.offwhite-mode .energy-waves-bg,
  #stage3Panel.offwhite-mode .energy-waves-bg .wing-wave-group {
    filter: none !important;
    -webkit-filter: none !important;
    opacity: 0.25 !important;
  }

  #stage3Panel.offwhite-mode .glass-row-card {
    background: #FFFDF9 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08) !important;
    color: #1F2937 !important;
    text-shadow: none !important;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, transform 0.38s cubic-bezier(0.22, 1, 0.36, 1) !important;
  }

  #stage3Panel.offwhite-mode .glass-row-card:hover,
  #stage3Panel.offwhite-mode .glass-row-card:focus-within {
    border-color: rgba(15, 23, 42, 0.22) !important;
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.12) !important;
  }

  #stage3Panel.offwhite-mode .glass-row-card::after {
    display: none !important;
  }

  #stage3Panel.offwhite-mode .inner-card,
  #stage3Panel.offwhite-mode .sai-task-card,
  #stage3Panel.offwhite-mode .connect-card,
  #stage3Panel.offwhite-mode .sai-meta-bar {
    background: #F4F1EA !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(15, 23, 42, 0.10) !important;
    box-shadow: none !important;
  }

  #stage3Panel.offwhite-mode .connect-card:hover,
  #stage3Panel.offwhite-mode .connect-card:focus-visible {
    background: #FFFFFF !important;
    border-color: rgba(15, 23, 42, 0.22) !important;
  }

  #stage3Panel.offwhite-mode h1,
  #stage3Panel.offwhite-mode h2,
  #stage3Panel.offwhite-mode h3,
  #stage3Panel.offwhite-mode .row-title,
  #stage3Panel.offwhite-mode .row-heading,
  #stage3Panel.offwhite-mode .project-topic,
  #stage3Panel.offwhite-mode .connect-name {
    color: #111827 !important;
  }

  #stage3Panel.offwhite-mode p,
  #stage3Panel.offwhite-mode li,
  #stage3Panel.offwhite-mode strong,
  #stage3Panel.offwhite-mode .row-body,
  #stage3Panel.offwhite-mode .glass-bullets,
  #stage3Panel.offwhite-mode .project-meta-list {
    color: #1F2937 !important;
  }

  #stage3Panel.offwhite-mode .row-eyebrow {
    color: #9A671F !important;
  }

  #stage3Panel.offwhite-mode .glass-bullets li::before {
    color: #9A671F !important;
  }

  #stage3Panel.offwhite-mode .row-subtitle,
  #stage3Panel.offwhite-mode .skill-cat,
  #stage3Panel.offwhite-mode .meta-label,
  #stage3Panel.offwhite-mode .connect-handle,
  #stage3Panel.offwhite-mode .connect-arrow {
    color: #4B5563 !important;
    text-shadow: none !important;
  }

  #stage3Panel.offwhite-mode .project-card-head {
    border-bottom-color: rgba(15, 23, 42, 0.10) !important;
  }

  #stage3Panel.offwhite-mode code,
  #stage3Panel.offwhite-mode .meta-code,
  #stage3Panel.offwhite-mode .glass-chip,
  #stage3Panel.offwhite-mode .skill-pill,
  #stage3Panel.offwhite-mode .back-btn,
  #stage3Panel.offwhite-mode .stage3-ctrl-btn {
    background: rgba(15, 23, 42, 0.07) !important;
    color: #0F172A !important;
    border: 1px solid rgba(15, 23, 42, 0.16) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  #stage3Panel.offwhite-mode .skill-pill:hover,
  #stage3Panel.offwhite-mode .back-btn:hover,
  #stage3Panel.offwhite-mode .back-btn:focus-visible,
  #stage3Panel.offwhite-mode .stage3-ctrl-btn:hover,
  #stage3Panel.offwhite-mode .stage3-ctrl-btn:focus-visible {
    background: rgba(15, 23, 42, 0.12) !important;
    border-color: rgba(15, 23, 42, 0.26) !important;
    color: #0F172A !important;
  }

  #stage3Panel.offwhite-mode a,
  #stage3Panel.offwhite-mode .meta-link,
  #stage3Panel.offwhite-mode .issue-link,
  #stage3Panel.offwhite-mode .chip-link {
    color: #1D4ED8 !important;
  }

  #stage3Panel.offwhite-mode a:hover,
  #stage3Panel.offwhite-mode .meta-link:hover,
  #stage3Panel.offwhite-mode .issue-link:hover,
  #stage3Panel.offwhite-mode .chip-link:hover,
  #stage3Panel.offwhite-mode a:focus-visible,
  #stage3Panel.offwhite-mode .meta-link:focus-visible,
  #stage3Panel.offwhite-mode .issue-link:focus-visible,
  #stage3Panel.offwhite-mode .chip-link:focus-visible {
    color: #1E3A8A !important;
  }

  #stage3Panel.offwhite-mode .connect-card:hover,
  #stage3Panel.offwhite-mode .connect-card:focus-visible {
    background: #FFFFFF !important;
    border-color: rgba(15, 23, 42, 0.22) !important;
  }

  #stage3Panel.offwhite-mode .project-meta-list code,
  #stage3Panel.offwhite-mode .sai-task-card code {
    background: rgba(15, 23, 42, 0.07) !important;
    color: #0F172A !important;
  }

  #stage3Panel.offwhite-mode .stage3-nav {
    background: rgba(245, 243, 238, 0.94) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.10) !important;
  }

  #stage3Panel.offwhite-mode .stage3-nav-link {
    color: #4B5563 !important;
  }

  #stage3Panel.offwhite-mode .stage3-nav-link:hover,
  #stage3Panel.offwhite-mode .stage3-nav-link:focus-visible {
    color: #111827 !important;
    border-color: #9A671F !important;
  }

  #stage3Panel.offwhite-mode .stage3-nav-link.is-active {
    color: #9A671F !important;
    background: rgba(154, 103, 31, 0.10) !important;
    border-color: rgba(154, 103, 31, 0.45) !important;
  }

  #stage3Panel.offwhite-mode .sai-task-id {
    color: #9A671F !important;
  }

  #stage3Panel.offwhite-mode .sai-expand-btn,
  #stage3Panel.offwhite-mode .copy-email-btn {
    background: rgba(15, 23, 42, 0.07) !important;
    color: #0F172A !important;
    border: 1px solid rgba(15, 23, 42, 0.16) !important;
  }

  #stage3Panel.offwhite-mode .sai-expand-btn:hover,
  #stage3Panel.offwhite-mode .sai-expand-btn:focus-visible,
  #stage3Panel.offwhite-mode .copy-email-btn:hover,
  #stage3Panel.offwhite-mode .copy-email-btn:focus-visible {
    border-color: #9A671F !important;
    background: rgba(154, 103, 31, 0.10) !important;
  }

  #stage3Panel.offwhite-mode .sai-task-card.is-expanded .sai-task-details-inner {
    border-top-color: rgba(15, 23, 42, 0.10) !important;
  }