:root {
  --font-sans: 'Inter', sans-serif;
  --font-serif: 'General Sans', sans-serif;
  --font-display: 'General Sans', sans-serif;

  --bg-color: #f2f2f2;
  --text-color: #111;
  --text-dim: #666;
  --accent-color: #000;

  --spacing-unit: 8px;
  --page-padding: 4vw;

  --pill-radius: 999px;
  --card-radius: 48px;
  /* Squashy rounded corners */
  /* Editorial style usually sharp or very subtle */

  --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: none;          /* Firefox */
}
*::-webkit-scrollbar {
  display: none;                  /* Chrome / Safari */
}

/* ── Keyboard focus outlines ── */
:focus-visible {
  outline: 2px solid rgba(112, 84, 213, 0.6);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(112, 84, 213, 0.6);
  outline-offset: 3px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  overflow-y: auto;
  min-height: 100vh;
  padding-bottom: 140px;
  /* Space for fixed chat card at bottom */
}

html {
  overflow-y: auto;
  /* Let browser handle it */
  height: 100%;
  overscroll-behavior: none;
}

/* Note card (reusable frosted glass card) */
.desktop-note-card {
  position: fixed;
  width: 340px;
  border-radius: 20px;
  background: rgba(50, 50, 52, 0.82);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.3),
    0 4px 16px rgba(0, 0, 0, 0.18),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.08);
  padding: 20px;
  z-index: 210;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.35s var(--transition-smooth), transform 0.35s var(--transition-smooth);
  color: #fff;
  font-family: var(--font-sans);
}
.desktop-note-card.is-visible {
  opacity: 1;
  transform: scale(1);
}
.desktop-note-card.is-closing {
  opacity: 0;
  transform: scale(0.85);
}
.desktop-note-card.is-dragging {
  cursor: grabbing;
}
.note-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.note-card-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}
.note-card-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.note-card-close:hover {
  background: rgba(255, 255, 255, 0.25);
}
.note-card-date {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 12px;
}
.note-card-body {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  white-space: pre-line;
}


/* ═══════════════════════════════════════════════════════
   LANDING MENU
   ═══════════════════════════════════════════════════════ */

#landing-menu {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-color);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--transition-smooth);
}

#landing-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Aurora animated gradient */
#aurora-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.4;
  background-size: 300% 300%;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(0, 110, 255, 0.5) 0%, transparent 45%),
    radial-gradient(circle at 70% 25%, rgba(200, 50, 180, 0.55) 0%, transparent 42%),
    radial-gradient(circle at 80% 70%, rgba(180, 40, 200, 0.45) 0%, transparent 42%),
    radial-gradient(circle at 40% 80%, rgba(210, 60, 170, 0.4) 0%, transparent 40%),
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.22) 0%, transparent 35%),
    radial-gradient(circle at 35% 30%, rgba(30, 100, 255, 0.35) 0%, transparent 42%);
  filter: blur(40px);
  animation: auroraDrift 13s ease-in-out infinite alternate;
}

@keyframes auroraDrift {
  0%   { background-position: 10% 20%; }
  25%  { background-position: 60% 35%; }
  50%  { background-position: 80% 60%; }
  75%  { background-position: 30% 70%; }
  100% { background-position: 55% 15%; }
}

/* Close button */
#menu-close {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: #444;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s, transform 0.2s;
}

#menu-close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: translateX(-50%) scale(1.05);
}

/* Content container */
#menu-content {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

/* ─── Menu Grid ─────────────────────────────────────── */
#menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.menu-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

/* Card image container */
.menu-card-img {
  width: 140px;
  height: 140px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--transition-smooth);
}

.menu-card-img.squircle {
  clip-path: url(#squircle);
  -webkit-clip-path: url(#squircle);
}

.menu-card-img.circle {
  border-radius: 50%;
}

.menu-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.35s ease, transform 0.35s ease;
}

/* Hover overlay with + icon */
.menu-hover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.3s ease;
  color: #fff;
  z-index: 2;
}

.menu-card:hover .menu-card-img img {
  filter: grayscale(0.6) brightness(0.7) blur(3px);
  transform: scale(1.06);
}

.menu-card:hover .menu-hover-overlay {
  opacity: 1;
}

.menu-card:hover .menu-card-img {
  transform: scale(1.02);
}

/* Card labels */
.menu-card-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  text-align: center;
  letter-spacing: 0.01em;
}

/* ─── Contact pill ──────────────────────────────────── */
#menu-contact-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 14px 28px 14px 20px;
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

#menu-contact-pill:hover {
  background: rgba(0, 0, 0, 0.08);
  transform: scale(1.02);
}

.contact-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.contact-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.contact-value {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-color);
}

/* ─── SOCIAL PILL (hoverable expand) ─── */
#menu-social-pill {
  position: absolute;
  bottom: 48px;
  left: 50%;
  translate: -50% 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
}

.social-pill-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 22px;
  border-radius: 99px;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.social-pill-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
}

.social-pill-expanded {
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 20px 40px 16px;
  border-radius: 99px;
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

#menu-social-pill:hover .social-pill-dots {
  opacity: 0;
  transform: scale(0.9);
}

#menu-social-pill:hover .social-pill-expanded {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.social-pill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.2s;
}

.social-pill-item:hover {
  transform: scale(1.08);
}

.social-pill-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s;
}

.social-pill-item:hover .social-pill-icon {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.social-pill-label {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-color);
}

/* Entrance animation for social pill */
#landing-menu.is-open #menu-social-pill {
  opacity: 0;
  transform: translateY(12px);
  animation: menuCardIn 0.6s var(--transition-smooth) 0.5s forwards;
}

#landing-menu:not(.is-open) #menu-social-pill {
  animation: none;
  opacity: 0;
}

/* Menu card entrance stagger */
#landing-menu.is-open .menu-card {
  opacity: 0;
  transform: translateY(20px);
  animation: menuCardIn 0.5s var(--transition-smooth) forwards;
}
#landing-menu.is-open .menu-card:nth-child(1) { animation-delay: 0.08s; }
#landing-menu.is-open .menu-card:nth-child(2) { animation-delay: 0.14s; }
#landing-menu.is-open .menu-card:nth-child(3) { animation-delay: 0.20s; }
#landing-menu.is-open .menu-card:nth-child(4) { animation-delay: 0.26s; }

#landing-menu.is-open #menu-contact-pill {
  opacity: 0;
  transform: translateY(12px);
  animation: menuCardIn 0.5s var(--transition-smooth) 0.34s forwards;
}

@keyframes menuCardIn {
  to { opacity: 1; transform: translateY(0); }
}

/* When menu is closing */
#landing-menu:not(.is-open) .menu-card,
#landing-menu:not(.is-open) #menu-contact-pill {
  animation: none;
  opacity: 0;
}

/* Lock body scroll and hide UI when menu is open */
html.menu-open,
body.menu-open {
  overflow: hidden !important;
  overflow-y: hidden !important;
  height: 100% !important;
  position: fixed !important;
  width: 100% !important;
}

body.menu-open #site-header,
body.menu-open #floating-nav,
body.menu-open #ai-pill-container {
  opacity: 0 !important;
  pointer-events: none !important;
}



/* Responsive */
@media (max-width: 768px) {
  #menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .menu-card-img {
    width: 120px;
    height: 120px;
  }
}

/* ─── HEADER ────────────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 32px var(--page-padding);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  z-index: 100;
  pointer-events: none;
  /* Let clicks pass through */
}

#site-header a {
  pointer-events: auto;
}

.header-link {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: inherit;
  opacity: 0.8;
  transition: opacity 0.3s;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}

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

#header-contact-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 14px 28px 14px 20px;
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  pointer-events: auto;
  mix-blend-mode: normal;
  isolation: isolate;
}

#header-contact-pill:hover {
  background: rgba(0, 0, 0, 0.08);
  transform: scale(1.02);
}

#header-contact-pill .contact-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  animation: dotPulse 2s ease-in-out infinite;
}

#header-contact-pill .contact-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

#header-contact-pill .contact-value {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-color);
}

/* ─── Pill tooltip (hover "Copy email" / click "Copied!") ─── */
#menu-contact-pill,
#header-contact-pill {
  position: relative;
}

.pill-tooltip {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: #0a0a0a;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

/* Menu pill: tooltip above */
#menu-contact-pill .pill-tooltip {
  bottom: calc(100% + 8px);
}
#menu-contact-pill .pill-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #0a0a0a;
}

/* Header pill: tooltip below */
#header-contact-pill .pill-tooltip {
  top: calc(100% + 8px);
  bottom: auto;
}
#header-contact-pill .pill-tooltip::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: #0a0a0a;
}

/* Show on hover + after copy */
#menu-contact-pill:hover .pill-tooltip,
#header-contact-pill:hover .pill-tooltip,
#menu-contact-pill.copied .pill-tooltip,
#header-contact-pill.copied .pill-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Copy-email button reset (about page email) */
button.email-link.copy-email-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

button.email-link.copy-email-btn:hover {
  text-decoration: underline;
}

/* ─── Copied tooltip ───────────────────────────────── */
.copied-tooltip {
  position: fixed;
  z-index: 99999;
  background: #222;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-body, 'General Sans', sans-serif);
  padding: 6px 14px;
  border-radius: 8px;
  pointer-events: none;
  transform: translate(-50%, -100%) translateY(4px);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}

.copied-tooltip.show {
  opacity: 1;
  transform: translate(-50%, -100%) translateY(0);
}

.copied-tooltip.below {
  transform: translate(-50%, 0) translateY(-4px);
}

.copied-tooltip.below.show {
  transform: translate(-50%, 0) translateY(0);
}

/* ─── GRID SECTION ──────────────────────────────────── */
#grid-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 56px 40px;
  padding: 100px 1.5vw 0;
  max-width: clamp(1800px, 93vw, 2400px);
  margin: 0 auto;
}

@media (max-width: 1024px) {
  #grid-section {
    grid-template-columns: repeat(2, 1fr);
    padding: 100px 1.5vw 0;
  }
}

@media (max-width: 768px) {
  #grid-section {
    grid-template-columns: 1fr;
    max-width: 520px;
    padding: 100px 16px 0;
  }
}

.project-card {
  cursor: pointer;
  perspective: 800px;
  position: relative;
  z-index: 1;
  min-width: 0; /* prevent grid blowout from large images */
  transition: z-index 0s 0.3s; /* delay z-index drop so card settles first */
}

.project-card:hover {
  z-index: 2;
  transition: z-index 0s;      /* lift immediately on hover */
}

.card-image-wrapper {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  margin-bottom: 24px;
  position: relative;
  border-radius: 24px;
  clip-path: url(#squircle);
  -webkit-clip-path: url(#squircle);
  transform-style: preserve-3d;
}

.project-card:hover .card-image-wrapper {
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

/* ─── DRAG HINT (lives outside card-image-wrapper so 3D isn't clipped) ── */
.drag-hint {
  --hint-x: 0px;
  --hint-y: 0px;
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 6;
  transform: translateX(calc(-50% + var(--hint-x))) translateY(calc(-4px + var(--hint-y)));
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #222;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 99px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(255, 255, 255, 0.3);
}

.project-card:hover .drag-hint {
  opacity: 1;
}

/* ─── CAROUSEL ARROWS ─────────────────────────────── */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.2s, background 0.2s;
}

.project-card:hover .carousel-arrow:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.carousel-arrow:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-50%) scale(1.08);
}

.carousel-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-prev { left: 12px; padding-right: 2px; }
.carousel-next { right: 12px; padding-left: 2px; }

/* ─── CAROUSEL ─────────────────────────────────────── */
.carousel {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
}

/* Zoom C3 thumbnails 20% — scale inside the clipped wrapper */
[data-id="c3-ai"] .carousel,
[data-id="federal-procurement"] .carousel,
[data-id="agentic-workflows"] .carousel {
  transform: scale(1.2);
  transform-origin: center center;
}

.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 5;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.dot.active {
  background: rgba(255, 255, 255, 0.9);
}

.dot:hover {
  background: rgba(255, 255, 255, 0.65);
}

/* ─── CARD META ────────────────────────────────────── */
.card-meta {
  text-align: center;
  padding: 0 4px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.card-subtitle {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 6px;
  line-height: 1.45;
  letter-spacing: -0.005em;
}

.card-role {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.see-project-btn {
  margin-top: 14px;
  padding: 6px;
  border-radius: var(--pill-radius);
  border: none;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  background: rgba(210, 210, 210, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.see-project-btn span {
  display: block;
  padding: 8px 20px;
  border-radius: var(--pill-radius);
  transition: background 0.3s, color 0.3s;
}

.see-project-btn:hover span {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-color);
}

/* ─── FLOATING NAV ──────────────────────────────────── */
#floating-nav {
  position: fixed;
  top: 28px;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(210, 210, 210, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 6px;
  display: flex;
  gap: 4px;
  z-index: 90;
  border-radius: var(--pill-radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--transition-smooth), transform 0.4s var(--transition-smooth);
}

#floating-nav.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-pill {
  background: transparent;
  border: none;
  padding: 8px 20px;
  border-radius: var(--pill-radius);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  color: var(--text-dim);
}

.nav-pill.active {
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
}

.nav-pill:hover:not(.active) {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-color);
}

/* ─── LANGUAGE TOGGLE (hidden until translations) ───────────── */
#lang-toggle { display: none !important; }
#lang-toggle._ENABLED {
  display: flex;
  position: fixed;
  top: 28px;
  left: calc(var(--page-padding) + 102px);
  display: flex;
  gap: 4px;
  padding: 6px;
  background: rgba(210, 210, 210, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--pill-radius);
  z-index: 10000;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* On menu page: match frosted glass to X button style */
body.menu-open #lang-toggle {
  background: rgba(0, 0, 0, 0.06);
  box-shadow: none;
}

.lang-pill {
  background: transparent;
  border: none;
  padding: 8px 20px;
  border-radius: var(--pill-radius);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  color: var(--text-dim);
}

.lang-pill.active {
  background: rgba(0, 0, 0, 0.12);
  color: var(--text-color);
}

.lang-pill:hover:not(.active) {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-color);
}

#open-menu-btn {
  position: fixed;
  top: 28px;
  left: var(--page-padding);
  padding: 6px;
  border-radius: var(--pill-radius);
  border: none;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  background: rgba(210, 210, 210, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  color: var(--text-dim);
  cursor: pointer;
  z-index: 301;
  transition: background 0.3s, color 0.3s;
}

/* Inner padding to match lang-pill sizing */
#open-menu-btn span {
  display: block;
  padding: 8px 20px;
  border-radius: var(--pill-radius);
  transition: background 0.3s, color 0.3s;
}

#open-menu-btn:hover span {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-color);
}

body.menu-open #open-menu-btn {
  opacity: 0;
  pointer-events: none;
}

/* ─── AI CHAT ──────────────────────────────────────── */
#ai-pill-container {
  position: fixed;
  bottom: 28px;
  left: 0;
  right: 0;
  margin: 0 auto;
  z-index: 250;
  width: 600px;
  pointer-events: none;
}

#ai-chat-card {
  pointer-events: auto;
  width: 100%;
  background: rgba(210, 210, 210, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 28px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: box-shadow 0.3s;
}

#ai-chat-card:hover,
#ai-chat-card.expanded {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
}

/* Expandable area — thread only (collapses above input) */
#ai-chat-expandable {
  max-height: 0;
  overflow: hidden;
  overflow-x: hidden;
  overscroll-behavior: contain;
  transition: max-height 0.4s var(--transition-smooth);
}

#ai-chat-card.expanded #ai-chat-expandable {
  max-height: 55vh;
  overflow-y: auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0px, black 16px);
  mask-image: linear-gradient(to bottom, transparent 0px, black 16px);
}

#ai-chat-expandable::-webkit-scrollbar { width: 4px; }
#ai-chat-expandable::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
}

/* Header pill row */
#ai-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
  transition: background 0.2s;
}

#ai-chat-header:hover {
  background: rgba(0, 0, 0, 0.03);
}

/* Hide chat header and chip row when project overlay is open */
#ai-chat-card.overlay-open #ai-chat-header,
#ai-chat-card.overlay-open #chip-row {
  display: none !important;
}

/* Match card radius to input bar when header is hidden */
#ai-chat-card.overlay-open {
  border-radius: 32px;
}


.suggestion-icon {
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  height: 20px;
}

#ai-chat-header-text {
  flex: 1;
  transition: opacity 0.3s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 20px;
}

#chat-toggle-chevron {
  color: var(--text-color, #111);
  transition: transform 0.3s var(--transition-smooth), opacity 0.3s;
  flex-shrink: 0;
  opacity: 0;
  pointer-events: none;
}

#ai-chat-card.has-messages #chat-toggle-chevron {
  opacity: 1;
  pointer-events: auto;
}

#ai-chat-card.expanded #chat-toggle-chevron {
  transform: rotate(180deg);
}

#ai-chat-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 20px 12px;
  width: 100%;
}

/* Input bar — always visible at bottom of card */
#ai-input-bar {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px 12px 12px;
  background: transparent;
}

#ai-input-bar .inner-bar {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #fff;
  border-radius: 24px;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  padding: 0;
  position: relative;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: border-radius 0.3s, border-color 0.3s;
}

#ai-input-bar .inner-bar:focus-within {
  border-color: transparent;
}

.inner-bar-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 50px 10px 16px;
  width: 100%;
  min-height: 48px;
}

/* Chip area inside the input box (Gemini-style two-line mode) */
#chip-row {
  display: none;
  padding: 0 12px 8px;
}

#chip-row:has(.project-chip) {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Gradient border — purple on focus */
#ai-input-bar .inner-bar::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  padding: 2px;
  background: linear-gradient(135deg, #c084fc, #818cf8, #60a5fa, #a78bfa);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

#ai-input-bar .inner-bar:focus-within::before {
  opacity: 1;
}

.ai-icon {
  font-size: 1rem;
  color: #999;
  flex-shrink: 0;
}

#ai-input {
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  flex: 1;
  outline: none;
  color: var(--text-color);
  min-width: 0;
}

#ai-input::placeholder {
  color: #aaa;
}

#ai-send {
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: #7c5ce0;
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  flex-shrink: 0;
}

#ai-send:hover {
  transform: scale(1.08);
  background: #6a4cc9;
}

/* Chat Bubbles */
.chat-bubble {
  padding: 12px 18px;
  border-radius: 18px;
  font-size: 14px;
  max-width: 85%;
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: break-word;
  animation: slideUp 0.3s ease-out forwards;
}

.chat-bubble.user {
  background: #000;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-bubble.agent {
  background: rgba(255, 255, 255, 0.55);
  color: #000;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── DRAG-TO-CHAT ─────────────────────────────────── */

/* Drag ghost — macOS-style icon drag */
.drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transform: translate(-50%, -50%) scale(0.92);
  opacity: 0;
  animation: ghostPickUp 0.2s ease-out forwards;
}

/* Thumbnail preview — rounded, with macOS-style shadow */
.drag-ghost img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.25),
    0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Title pill below — dark rounded capsule like macOS file labels */
.drag-ghost .ghost-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  text-align: center;
  background: rgba(50, 50, 50, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 99px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

@keyframes ghostPickUp {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
  to   { opacity: 0.9; transform: translate(-50%, -50%) scale(1); }
}

/* Body state during drag */
body.is-dragging-card {
  cursor: grabbing !important;
  user-select: none;
}

body.is-dragging-card .project-card {
  cursor: grabbing !important;
}

/* Chat card as drop target */
#ai-chat-card.drop-target {
  box-shadow: 0 0 0 2px rgba(124, 92, 224, 0.3), 0 12px 48px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.3s, transform 0.3s;
}

#ai-chat-card.drop-hover {
  box-shadow: 0 0 0 2px rgba(124, 92, 224, 0.6), 0 16px 56px rgba(0, 0, 0, 0.16);
  transform: scale(1.02);
}

/* Project chip in input area */
.project-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(124, 92, 224, 0.12);
  border: none;
  border-radius: var(--pill-radius);
  padding: 4px 10px 4px 4px;
  flex-shrink: 0;
  cursor: pointer;
  animation: slideUp 0.25s ease-out;
  transition: background 0.2s;
}

.project-chip:hover {
  background: rgba(124, 92, 224, 0.18);
}

.chip-img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.chip-name {
  font-size: 12px;
  font-weight: 500;
  color: #7c5ce0;
  white-space: nowrap;
}

.chip-close {
  color: rgba(124, 92, 224, 0.5);
  font-size: 18px;
  line-height: 1;
  margin-left: 0;
  transition: color 0.2s;
}

.project-chip:hover .chip-close {
  color: #7c5ce0;
}

/* ─── PROJECT OVERLAY ───────────────────────────────── */
#project-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  pointer-events: none;
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 120px 0 280px;
}

#project-overlay.is-open {
  pointer-events: auto;
}

/* ── Gradual fade — gradient overlay at bottom of scroll area ── */
/* Replaces the 8-layer blur stack with a simple gradient for performance. */

.gradual-blur-shared > div {
  position: absolute;
  inset: 0;
  display: none; /* disable individual blur layers */
}

/* Single gradient child — first div only */
.gradual-blur-shared > div:nth-child(1) {
  display: block;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(245, 245, 245, 0.4) 30%,
    rgba(245, 245, 245, 0.75) 60%,
    rgba(245, 245, 245, 0.95) 85%,
    var(--bg-color) 100%
  );
}

/* ── Overlay instance — hidden until overlay opens, instant (no fade delay) ── */
#overlay-gradual-blur {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 220px;
  z-index: 202;
  pointer-events: none;
  opacity: 0;
  isolation: isolate;
}
#project-overlay.is-open #overlay-gradual-blur { opacity: 0; }

#overlay-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(200, 200, 205, 0.7);
  backdrop-filter: blur(40px) saturate(1.2);
  -webkit-backdrop-filter: blur(40px) saturate(1.2);
  will-change: opacity;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#project-overlay.is-open #overlay-backdrop {
  opacity: 1;
}

#overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
  z-index: 201;
  opacity: 0;
  transition: opacity 0.25s ease;
}

#project-detail {
  width: 100%;
  max-width: 1200px;
  padding: 0 var(--page-padding);
  position: relative;
}


/* (Click-to-close gutters removed — now handled by a single click listener
   on #project-overlay that checks X coordinates, so scrolling isn't blocked) */

/* ─── OVERLAY NAV BAR (prev / close / next) ────────── */
#overlay-nav-bar {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  background: rgba(210, 210, 210, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--pill-radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

#project-overlay.is-open #overlay-nav-bar {
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0.15s;
}

#overlay-nav-bar button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  color: #555;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

#overlay-nav-bar button:hover {
  background: rgba(0, 0, 0, 0.07);
  color: #222;
}

#overlay-close {
  /* keep for JS selector compat — styled via parent */
}

#project-overlay.is-open #overlay-content {
  opacity: 1;
  transform: translateY(0);
}

/* ─── STAGGERED CONTENT REVEAL ─────────────────── */

.project-header-block,
#project-hero-media,
#detail-link-container {
  opacity: 0;
  transition: opacity 0.5s ease;
}

#project-overlay.is-open .project-header-block   { opacity: 1; transition-delay: 0.05s; }
#project-overlay.is-open #project-hero-media     { opacity: 1; transition-delay: 0.12s; }
#project-overlay.is-open #detail-link-container  { opacity: 1; transition-delay: 0.25s; }

/* ─── HERO IMAGE ─────────────────────────────────── */
#project-hero-media {
  width: calc(100% + 120px);
  margin-left: -60px;
  aspect-ratio: 16 / 9;
  max-height: 520px;
  background: #e0e0e0;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  margin-bottom: 64px;
}

.project-header-block {
  text-align: center;
  margin-bottom: 48px;
}

#detail-title {
  font-family: var(--font-display);
  font-size: 4.5rem;
  font-weight: 300;
  margin-bottom: 16px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #000;
}

#detail-subtitle {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 400;
  color: #555;
  margin-bottom: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.year-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 99px;
  background: #111;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.06);
  color: #444;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

#detail-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.detail-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 99px;
  background: #555;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

#detail-body {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 800px;
  margin: 0 auto;
}

#detail-body h2 {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 48px;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  color: #111;
}

#detail-body p {
  margin-bottom: 24px;
  color: #333;
  font-weight: 400;
}

#detail-body ul {
  list-style: none;
  border-left: 2px solid #555;
  padding-left: 24px;
  margin: 32px 0;
}

#detail-body li {
  margin-bottom: 12px;
  font-weight: 400;
}

#detail-link-container {
  text-align: center;
  margin-top: 60px;
}

.project-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #000;
  color: #fff;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 99px;
  font-weight: 500;
  transition: transform 0.2s;
}

.project-link-btn:hover {
  transform: scale(1.05);
}

/* ─── CASE STUDY SECTIONS ─────────────────────────── */
.case-study-section {
  margin-bottom: 88px;
}

.section-text {
  max-width: 800px;
  margin: 0 auto;
}

.section-text h2 {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: #111;
}

.section-text p {
  margin-bottom: 24px;
  color: #2a2a2a;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.8;
  font-weight: 400;
}

.section-text p strong {
  font-weight: 600;
  color: #111;
}

.section-text ul {
  list-style: none;
  border-left: 2px solid #555;
  padding-left: 24px;
  margin: 32px 0;
}

.section-text li {
  margin-bottom: 12px;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.8;
  font-weight: 400;
  color: #2a2a2a;
}

.section-text li strong {
  font-weight: 600;
  color: #111;
}

.section-image-full {
  width: calc(100% + 120px);
  margin-left: -60px;
}

.section-image-full img {
  width: 100%;
  max-height: 600px;
  object-fit: cover;
  cursor: pointer;
  display: block;
  border-radius: 20px;
  will-change: transform;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-image-full img:hover {
  transform: scale(1.03);
}

.image-caption {
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 400;
  color: #666;
  margin-top: 14px;
  letter-spacing: 0.01em;
}

.section-image-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: calc(100% + 120px);
  margin-left: -60px;
}

.section-image-pair .image-pair-item img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  cursor: pointer;
  display: block;
  border-radius: 20px;
  will-change: transform;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-image-pair .image-pair-item img:hover {
  transform: scale(1.04);
}

.section-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  padding: 56px 0;
  max-width: 800px;
  margin: 0 auto;
  border-top: 1px solid #555;
  border-bottom: 1px solid #555;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  color: #000;
}

.stat-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ─── PROJECT TOC SIDEBAR ─────────────────────────── */
#project-toc {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  width: 200px;
  z-index: 250;
  background: rgba(50, 50, 52, 0.72);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.25),
    0 4px 12px rgba(0, 0, 0, 0.12),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  max-height: 70vh;
  overflow-y: auto;
}

#project-overlay.is-open #project-toc {
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0.3s;
}

.toc-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.35);
  padding: 0 8px 8px;
}

.toc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.toc-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.toc-item.is-active {
  background: rgba(255, 255, 255, 0.12);
}

.toc-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.toc-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.4);
}

.toc-icon svg {
  width: 16px;
  height: 16px;
}

.toc-title {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toc-item.is-active .toc-title {
  color: rgba(255, 255, 255, 0.95);
}

/* Hide TOC on narrow screens where it would overlap content */
@media (max-width: 1440px) {
  #project-toc {
    display: none;
  }
}

/* ─── NEXT PROJECT PREVIEW ─────────────────────────── */
#next-project-preview {
  margin-top: 120px;
  padding-top: 56px;
  border-top: 1px solid #555;
}

.next-project-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #666;
  margin-bottom: 28px;
  text-align: center;
}

.next-projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: calc(100% + 120px);
  margin-left: -60px;
}

.next-project-card {
  cursor: pointer;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

.next-project-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.next-project-card:hover .next-project-card-image {
  transform: scale(1.03);
}

.next-project-card-info {
  padding: 16px 4px;
}

.next-project-card-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  transition: color 0.3s;
}

.next-project-card:hover .next-project-card-title {
  color: #555;
}

.next-project-card-role {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}


/* ─── HIGHLIGHT LINKS ─── */
.highlight-link {
  color: var(--text-color);
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.2);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  cursor: pointer;
  transition: text-decoration-color 0.2s;
}

.highlight-link:hover {
  text-decoration-color: rgba(0, 0, 0, 0.5);
}

/* (gallery removed) */

/* ─── FLOATING IMAGE CARDS ─── */
.floating-card {
  position: fixed;
  width: 380px;
  border-radius: 28px;
  background: rgba(40, 40, 40, 0.35);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.25),
    0 4px 16px rgba(0, 0, 0, 0.15),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.35s var(--transition-smooth), transform 0.35s var(--transition-smooth);
  z-index: 210;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  padding: 14px;
}

.floating-card.is-dragging {
  cursor: grabbing;
}

.floating-card.is-visible {
  opacity: 1;
  transform: scale(1);
}

.floating-card.is-closing {
  opacity: 0;
  transform: scale(0.85);
}

.floating-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 10px 4px;
  z-index: 2;
}

.floating-card-caption {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-card-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.floating-card-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.floating-card-body {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}

.floating-card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: 14px;
}

.floating-card-footer {
  padding: 10px 4px 2px;
}

.floating-card-footer-caption {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
}

/* ─── CV OVERLAY ─── */
#cv-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#cv-overlay.is-open {
  pointer-events: auto;
}

#cv-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

#cv-overlay.backdrop-ready #cv-backdrop {
  opacity: 1;
}

#cv-card {
  position: relative;
  z-index: 1;
  margin: auto;
  width: 420px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 80px);
  clip-path: url(#squircle);
  -webkit-clip-path: url(#squircle);
  background: rgba(70, 70, 72, 0.78);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.3),
    0 4px 16px rgba(0, 0, 0, 0.15),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.08);
  padding: 96px 54px 64px;
  display: flex;
  flex-direction: column;
  gap: 0;
  will-change: transform, opacity;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
  overflow-y: auto;
}

#cv-overlay.is-open #cv-card {
  opacity: 1;
  transform: scale(1);
}

#cv-close {
  position: absolute;
  top: 97px;
  right: 50px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
}

#cv-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

#cv-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cv-header {
  margin-bottom: 4px;
}

.cv-name {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
}

.cv-role {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  margin: 4px 0 0;
}

.cv-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cv-section-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.35);
}

.cv-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cv-item-title {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.cv-item-meta {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
}

.cv-skills {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  line-height: 1.6;
}

#cv-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: center;
  margin-top: 28px;
  padding: 12px 28px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s, transform 0.2s;
  border: none;
}

#cv-download-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.03);
}

@media (max-width: 480px) {
  #cv-card {
    width: 100%;
    padding: 32px 24px 28px;
  }
}


/* ─── IMAGE LIGHTBOX ───────────────────────────────── */
#image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  visibility: hidden;
}

#image-lightbox.is-open {
  pointer-events: auto;
  visibility: visible;
}

/* Backdrop handles its own opacity so backdrop-filter works independently */
#lightbox-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.80);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

#image-lightbox.is-open #lightbox-backdrop {
  opacity: 1;
}

/* All lightbox UI fades in with the backdrop */
#lightbox-header,
#lightbox-close,
.lightbox-arrow,
#lightbox-image-container {
  opacity: 0;
  transition: opacity 0.25s ease;
}
#image-lightbox.is-open #lightbox-header,
#image-lightbox.is-open #lightbox-close,
#image-lightbox.is-open .lightbox-arrow,
#image-lightbox.is-open #lightbox-image-container {
  opacity: 1;
}

#lightbox-header {
  position: fixed;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 502;
}

#lightbox-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.01em;
}

#lightbox-counter {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

#lightbox-close {
  position: fixed;
  top: 28px;
  right: 32px;
  z-index: 502;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease, background 0.2s, color 0.2s, transform 0.2s;
}

#lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: scale(1.08);
}

.lightbox-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 502;
  transition: opacity 0.25s ease, background 0.2s, color 0.2s, transform 0.2s;
}

.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  transform: translateY(-50%) scale(1.08);
}

#lightbox-prev { left: 24px; padding-right: 2px; }
#lightbox-next { right: 24px; padding-left: 2px; }

#lightbox-image-container {
  position: relative;
  z-index: 501;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 85vw;
  max-height: 80vh;
}

#lightbox-image {
  max-width: 85vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 16px;
  transition: opacity 0.25s ease, transform 0.3s var(--transition-smooth);
}

#lightbox-image.is-transitioning {
  opacity: 0;
  transform: scale(0.97);
}

/* ─── IMAGE EXPLORER (mouse-reveal block) ────────── */
.section-image-explorer {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  /* cursor: none; */
}

.explorer-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.explorer-layer.is-active {
  opacity: 1;
}

.explorer-indicator {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
  pointer-events: none;
}

.explorer-pip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.25s ease, transform 0.25s ease;
}

.explorer-pip.is-active {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.3);
}

.explorer-hint {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 5px 12px;
  border-radius: var(--pill-radius);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 3;
}

.section-image-explorer:hover .explorer-hint {
  opacity: 1;
}

/* ─── CUSTOM CURSOR (ring + dot, mix-blend-mode: difference) ── */
*, *::before, *::after {
  cursor: none !important;
}

.cursor {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.35s ease,
              border-color 0.35s ease,
              opacity 0.35s ease;
  background: transparent;
}

.cursor.is-hovering {
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.6);
}

.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}


/* Responsive adjustments */
@media (max-width: 600px) {
  #detail-title {
    font-size: 2.2rem;
  }

  #detail-subtitle {
    font-size: 0.95rem;
  }

  .project-header-block {
    margin-bottom: 32px;
  }

  #project-hero-media {
    height: 280px;
    width: 100%;
    margin-left: 0;
  }

  .section-image-full,
  .section-image-pair,
  .next-project-image {
    width: 100%;
    margin-left: 0;
  }

  #floating-nav {
    gap: 3px;
    padding: 5px;
  }

  .nav-pill {
    padding: 7px 14px;
    font-size: 12px;
  }

  #lang-toggle {
    left: 16px;
    gap: 3px;
    padding: 5px;
  }

  .lang-pill {
    padding: 7px 14px;
    font-size: 12px;
  }

  #ai-pill-container {
    width: calc(100% - 32px);
    bottom: 16px;
  }

  .section-image-pair {
    grid-template-columns: 1fr;
  }

  .section-stats {
    gap: 32px;
    flex-wrap: wrap;
  }

  .stat-value {
    font-size: 2.2rem;
  }

  .section-image-full img,
  .section-image-pair .image-pair-item img {
    border-radius: 16px;
  }

  .section-image-explorer {
    border-radius: 16px;
  }

  .lightbox-arrow {
    width: 40px;
    height: 40px;
  }

  #lightbox-prev { left: 12px; }
  #lightbox-next { right: 12px; }

  #lightbox-close {
    right: 16px;
    top: 16px;
  }

  #lightbox-header {
    top: 20px;
  }

  #lightbox-image {
    max-width: 92vw;
    border-radius: 12px;
  }

  .next-projects-grid {
    grid-template-columns: 1fr;
    width: 100%;
    margin-left: 0;
  }

  .next-project-card-title {
    font-size: 1.2rem;
  }

  /* Disable custom cursor on touch */
  *, *::before, *::after {
    cursor: auto !important;
  }
  .cursor, .cursor-dot {
    display: none !important;
  }
}

/* Also disable on coarse pointer (tablets, touch devices) */
@media (pointer: coarse) {
  *, *::before, *::after {
    cursor: auto !important;
  }
  .cursor, .cursor-dot {
    display: none !important;
  }
}
/* ═══════════════════════════════════════════════════════
   SHARED ABOUT PAGE STYLES (used by about.html)
   ═══════════════════════════════════════════════════════ */

#about-ai-card {
  position: fixed;
  bottom: 28px;
  z-index: 300;
  width: 600px;
  background: rgba(210, 210, 210, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 28px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

body.about-open #about-ai-card.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Chevron toggle — sits at right end of suggestions row, hidden until has-messages */
.about-chat-chevron {
  position: absolute;
  right: 12px;
  top: calc(50% + 2px);
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--text-dim, #999);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, color 0.2s, transform 0.3s var(--transition-smooth);
  flex-shrink: 0;
}

.about-chat-chevron:hover {
  color: var(--text-color, #111);
}

#about-ai-card.has-messages .about-chat-chevron {
  opacity: 1;
  pointer-events: auto;
}

#about-ai-card.expanded .about-chat-chevron {
  transform: translateY(-50%) rotate(180deg);
}

/* Hide chips when conversation is expanded, show them again when collapsed */
#about-ai-card.expanded.has-messages #about-ai-suggestions {
  display: none;
}

/* Expandable area — collapses above input */
#about-chat-expandable {
  max-height: 0;
  overflow: hidden;
  overflow-x: hidden;
  overscroll-behavior: contain;
  transition: max-height 0.4s var(--transition-smooth);
}

#about-ai-card.expanded #about-chat-expandable {
  max-height: 55vh;
  overflow-y: auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0px, black 16px);
  mask-image: linear-gradient(to bottom, transparent 0px, black 16px);
}

#about-chat-expandable::-webkit-scrollbar { width: 4px; }
#about-chat-expandable::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
}

#about-ai-card:hover,
#about-ai-card.expanded {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
}

/* Suggestion chips — horizontal scroll with fade edges */
.about-ai-suggestions-wrap {
  position: relative;
}

/* When chevron is visible: reserve space, whole row is clickable */
#about-ai-card.has-messages .about-ai-suggestions-wrap {
  padding-right: 36px;
  min-height: 38px;
  cursor: pointer;
}

#about-ai-suggestions {
  display: flex;
  gap: 8px;
  padding: 12px 12px 8px;
  overflow-x: scroll;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#about-ai-suggestions::-webkit-scrollbar {
  display: none;
}

/* Fade states — toggled by JS on the wrapper */
.about-ai-suggestions-wrap.fade-right #about-ai-suggestions {
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 48px), transparent 100%);
  mask-image: linear-gradient(to right, black calc(100% - 48px), transparent 100%);
}
.about-ai-suggestions-wrap.fade-both #about-ai-suggestions {
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 60px, black calc(100% - 48px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 60px, black calc(100% - 48px), transparent 100%);
}
.about-ai-suggestions-wrap.fade-left #about-ai-suggestions {
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 60px);
  mask-image: linear-gradient(to right, transparent 0%, black 60px);
}

.about-ai-chip {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.55);
  color: var(--text-color);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.about-ai-chip:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.15);
  transform: scale(1.02);
}

/* Thread */
#about-chat-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 20px 12px;
}

#about-chat-thread:empty {
  padding: 0;
}

/* Input bar — same as work page */
.about-ai-bar-input {
  padding: 6px 12px 12px;
}

.about-ai-bar-input .inner-bar {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #fff;
  border-radius: 24px;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  padding: 0;
  position: relative;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: border-color 0.3s;
}

.about-ai-bar-input .inner-bar:focus-within {
  border-color: transparent;
}

.about-ai-bar-input .inner-bar-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 8px 10px 18px;
  flex: 1;
  min-width: 0;
}

.about-ai-bar-input .inner-bar-top input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-color);
  min-width: 0;
}

.about-ai-bar-input .inner-bar-top input::placeholder {
  color: #aaa;
}

.about-ai-bar-input .ai-icon {
  font-size: 18px;
  color: #999;
  flex-shrink: 0;
}

/* Gradient border on focus */
.about-ai-bar-input .inner-bar::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  padding: 2px;
  background: linear-gradient(135deg, #c084fc, #818cf8, #60a5fa, #a78bfa);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.about-ai-bar-input .inner-bar:focus-within::before {
  opacity: 1;
}

/* Send button */
#about-chat-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #7c5ce0;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  transition: background 0.2s, transform 0.15s;
}

#about-chat-send:hover {
  background: #6a4cc9;
}

/* ─── MUSIC WIDGET ─── */
.music-widget {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

/* Blurred artwork background — fills entire widget */
.music-bg {
  position: absolute;
  inset: -24px;
  width: calc(100% + 48px);
  height: calc(100% + 48px);
  object-fit: cover;
  filter: blur(28px) saturate(1.3) brightness(0.7);
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

/* Inner content over blurred bg */
.music-inner {
  position: relative;
  z-index: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Sharp artwork card — centered, rounded */
.music-art-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.music-hero-art {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  transition: opacity 0.4s ease;
}

/* Track info bar (below artwork) */
.music-hero-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 2px;
}

.music-hero-bar-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.music-hero-bar .music-track-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-hero-bar .music-track-artist {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Play/Pause button */
.music-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s, background 0.2s;
}

.music-play-btn:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.3);
}

.music-play-btn .pause-icon { display: none; }
.music-play-btn .play-icon  { display: block; }
.music-widget:not(.is-paused) .music-play-btn .pause-icon { display: block; }
.music-widget:not(.is-paused) .music-play-btn .play-icon  { display: none; }

/* Progress bar */
.music-progress-row {
  padding: 0;
}

.music-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  cursor: pointer;
}

.music-progress-fill {
  width: 0%;
  height: 100%;
  background: #fff;
  border-radius: 2px;
  transition: width 0.25s linear;
}

/* Tracklist — show ~3 items, scroll for the rest */
.music-tracklist {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 108px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.music-tracklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.music-tracklist-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.music-tracklist-item.is-active {
  background: rgba(255, 255, 255, 0.08);
}

.music-tracklist-num {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.music-tracklist-item.is-active .music-tracklist-num {
  color: #fff;
  font-size: 9px;
}

.music-tracklist-title {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-tracklist-item.is-active .music-tracklist-title {
  color: #fff;
  font-weight: 600;
}

.music-tracklist-dur {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

/* ─── ABOUT CHAT PANEL ─── */

.about-chat-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(40px) saturate(1.4);
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.03),
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.04),
    0 16px 40px rgba(0, 0, 0, 0.06),
    0 40px 80px -20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  position: relative;
}


/* Thread */
.about-chat-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px 12px;
  position: relative;
  z-index: 1;
  scroll-behavior: smooth;
}

.about-chat-thread:empty {
  padding: 0;
}

.about-chat-thread::-webkit-scrollbar {
  width: 4px;
}

.about-chat-thread::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
}

/* Bubbles */
.about-chat-bubble {
  padding: 12px 16px;
  border-radius: 20px;
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 88%;
  animation: aboutChatSlide 0.35s ease-out forwards;
}

.about-chat-user {
  background: var(--text-color);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 6px;
}

.about-chat-agent {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-color);
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

@keyframes aboutChatSlide {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Loading dots */
.about-chat-dots {
  display: inline-flex;
  gap: 5px;
  padding: 4px 2px;
}

.about-chat-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aaa;
  animation: aboutChatDot 1.4s infinite ease-in-out;
}

.about-chat-dots span:nth-child(2) { animation-delay: 0.16s; }
.about-chat-dots span:nth-child(3) { animation-delay: 0.32s; }

@keyframes aboutChatDot {
  0%, 80%, 100% { opacity: 0.15; transform: scale(0.75); }
  40% { opacity: 1; transform: scale(1); }
}

/* Suggestions */
.about-chat-suggestions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 16px 12px;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.about-chat-chip {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  transition: all 0.2s;
  white-space: normal;
  text-align: left;
  line-height: 1.4;
}

.about-chat-chip:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--text-color);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Input area — frosted pill like project chat */
.about-chat-input-area {
  padding: 10px 12px 14px;
  position: relative;
  z-index: 1;
}

.about-chat-input-box {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 24px;
  padding: 6px 6px 6px 18px;
  gap: 8px;
  position: relative;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

/* Gradient border ring */
.about-chat-input-box::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: 25.5px;
  padding: 1.5px;
  background: linear-gradient(
    135deg,
    #e8e8e8 0%,
    #d4c7e8 20%,
    #b8cfe8 40%,
    #c8e8d4 60%,
    #e8d8c4 80%,
    #e8e8e8 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: -1;
  opacity: 0.5;
  transition: opacity 0.3s;
  pointer-events: none;
}

.about-chat-input-box:focus-within::before {
  opacity: 1;
}

.about-chat-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-color);
  padding: 8px 0;
  min-width: 0;
}

.about-chat-input::placeholder {
  color: #bbb;
}

.about-chat-send {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--text-color);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s, transform 0.15s;
  opacity: 0.9;
}

.about-chat-send:hover {
  opacity: 1;
  transform: scale(1.06);
}

/* ─── About AI card responsive ─── */
@media (max-width: 768px) {
  #about-ai-card {
    left: 16px !important;
    right: 16px;
    width: auto !important;
    bottom: 16px;
  }
}
