@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800&display=swap');

/* --- DESIGN SYSTEM TOKENS --- */
:root {
  /* Colors */
  --color-primary: #1362ff;
  /* Brand Accent Blue (swapped from NVIDIA Green) */
  --color-on-primary: #ffffff;
  /* Text on Primary Blue */
  --color-primary-dark: #1c008d;
  /* Pressed state for brand blue */
  --color-ink: #000000;
  --color-canvas: #ffffff;
  --color-surface-dark: #000000;
  --color-surface-soft: #f7f7f7;
  --color-surface-elevated: #1a1a1a;
  --color-hairline: #cccccc;
  --color-hairline-strong: #5e5e5e;
  --color-body: #1a1a1a;
  --color-mute: #757575;
  --color-stone: #898989;
  --color-ash: #a7a7a7;
  --color-on-dark: #ffffff;
  --color-on-dark-mute: rgba(255, 255, 255, 0.7);
  --color-link-blue: #1362ff;

  /* Border Radii */
  --radius-none: 0px;
  --radius-xs: 1px;
  --radius-sm: 2px;
  /* Punishingly angular */
  --radius-full: 9999px;

  /* Spacing */
  --spacing-xxs: 2px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 24px;
  --spacing-xxl: 32px;
  --spacing-section: 64px;

  /* Fonts */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --- RESET & BASIC STYLES --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

#works {
  scroll-margin-top: 70px;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-canvas);
  color: var(--color-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.85;
}

/* --- TYPOGRAPHY UTILITIES --- */
.display-xl {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.display-lg {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.heading-xl {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

.heading-lg {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.75;
}

.heading-md {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.heading-sm {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.47;
}

.body-md {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.body-strong {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.body-sm {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.67;
}

.link-md {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
}

.caption-md {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.43;
  text-transform: uppercase;
}

.caption-sm {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
}

.caption-xs {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.utility-xs {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  text-transform: uppercase;
}

/* --- STRUCTURE & LAYOUT --- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
  width: 100%;
}

.section {
  padding: var(--spacing-section) 0;
}

.section.dark {
  background-color: var(--color-surface-dark);
  color: var(--color-on-dark);
}

.section.soft {
  background-color: var(--color-surface-soft);
}

.corner-square {
  display: none;
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: var(--color-primary);
  z-index: 10;
}

.corner-square.top-left {
  top: 0;
  left: 0;
}

.corner-square.bottom-right {
  bottom: 0;
  right: 0;
}

/* --- BUTTON COMPONENTS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family);
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  text-align: center;
  transition: all 0.2s ease;
  height: 44px;
  padding: 11px var(--spacing-xl);
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-on-primary);
  font-size: 16px;
  line-height: 1.25;
}

.btn-primary:active {
  background-color: var(--color-primary-dark);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-ink);
  border: 2px solid var(--color-primary);
  font-size: 16px;
  line-height: 1.25;
  padding: 11px var(--spacing-lg);
}

.btn-outline-on-dark {
  background-color: transparent;
  color: var(--color-on-dark);
  border: 1px solid var(--color-on-dark);
  font-size: 16px;
  line-height: 1.25;
}

.btn-outline-on-dark:hover {
  background-color: var(--color-on-dark);
  color: var(--color-surface-dark);
}

.btn-ghost-link {
  background-color: transparent;
  color: var(--color-primary);
  font-size: 16px;
  font-weight: 700;
  height: auto;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.btn-ghost-link::after {
  content: "→";
  font-family: var(--font-family);
}

.btn-disabled {
  background-color: var(--color-surface-soft);
  color: var(--color-ash);
  cursor: not-allowed;
}

/* --- TABS & CHIPS --- */
.badge-tag {
  display: inline-block;
  background-color: var(--color-surface-soft);
  color: var(--color-body);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.43;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}

.pill-tabs {
  display: flex;
  gap: var(--spacing-sm);
  list-style: none;
  overflow-x: auto;
  padding-bottom: var(--spacing-xs);
}

.pill-tab {
  background-color: transparent;
  color: var(--color-ink);
  font-size: 14.4px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.144px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pill-tab.active {
  background-color: var(--color-ink);
  color: var(--color-on-dark);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-xl);
  margin-top: var(--spacing-xxl);
}

.card {
  position: relative;
  background-color: var(--color-canvas);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-sm);
  padding: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-img-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: var(--spacing-lg);
  background-color: var(--color-surface-soft);
  overflow: hidden;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img-wrapper img,
.card-img-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.card:hover .card-img-wrapper img,
.card:hover .card-img-wrapper video {
  transform: scale(1.05);
}

/* Aspects */
.card-img-16-9 {
  aspect-ratio: 16 / 9;
}

.card-img-3-2 {
  aspect-ratio: 3 / 2;
}

.card-img-1-1 {
  aspect-ratio: 1 / 1;
}

/* Static Geometry Graphics instead of Image placeholders */
.card-placeholder-graphic {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #121a40 0%, #1362ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.15);
  font-weight: 800;
  font-size: 24px;
}

.card-tag-row {
  margin-bottom: var(--spacing-sm);
}

.card-meta-row {
  color: var(--color-mute);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.card-meta-row span {
  display: inline-flex;
  align-items: center;
}

.card-meta-row span:not(:last-child)::after {
  content: "|";
  margin-left: var(--spacing-sm);
  color: var(--color-hairline);
}

.card .card-title {
  color: var(--color-ink);
  margin-bottom: var(--spacing-sm);
}

.card .card-desc {
  color: var(--color-body);
  font-size: 15px;
  line-height: 1.67;
  margin-bottom: var(--spacing-xl);
  flex-grow: 1;
}

.card .card-footer {
  margin-top: auto;
}

/* --- SPECIFIC HEADER & NAV MODULES --- */
.utility-bar {
  background-color: var(--color-surface-dark);
  color: var(--color-on-dark);
  height: 32px;
  font-size: 12px;
  line-height: 1.25;
  border-bottom: 1px solid var(--color-hairline-strong);
}

.utility-bar .container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.utility-links {
  display: flex;
  gap: var(--spacing-xl);
  list-style: none;
}

.utility-links a {
  color: var(--color-on-dark-mute);
  font-size: 11px;
  font-weight: 700;
}

.utility-links a:hover {
  color: var(--color-on-dark);
}

.primary-nav {
  background-color: var(--color-surface-dark);
  color: var(--color-on-dark);
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--color-hairline-strong);
}

.primary-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-on-dark);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.nav-logo-box {
  width: 16px;
  height: 16px;
  background-color: var(--color-primary);
}

.nav-logo-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.nav-menu {
  display: flex;
  gap: var(--spacing-xxl);
  list-style: none;
}

.nav-menu a {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-on-dark-mute);
  height: 64px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--color-on-dark);
  border-bottom-color: var(--color-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.breadcrumb-bar {
  background-color: var(--color-surface-soft);
  color: var(--color-body);
  height: 48px;
  border-bottom: 1px solid var(--color-hairline);
}

.breadcrumb-bar .container {
  display: flex;
  align-items: center;
  height: 100%;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  list-style: none;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.breadcrumbs li:not(:last-child)::after {
  content: "›";
  margin: 0 var(--spacing-sm);
  color: var(--color-mute);
  font-size: 18px;
}

.breadcrumbs a {
  color: var(--color-mute);
}

.breadcrumbs li:last-child {
  color: var(--color-body);
}

/* --- FOOTER COMPONENT --- */
.footer-section {
  background-color: var(--color-canvas);
  color: var(--color-primary);
  padding: var(--spacing-xl) 0;
  border-top: 1px solid var(--color-hairline);
  font-family: var(--font-family);
  font-size: 14px;
  /* body-sm */
  font-weight: 400;
  /* body-sm */
  line-height: 1.43;
  /* body-sm */
  text-transform: uppercase;
}

.footer-simple-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

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

.footer-right {
  display: flex;
  gap: var(--spacing-xl);
}

.footer-right a {
  color: var(--color-primary);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer-right a:hover {
  opacity: 0.75;
}

/* Dark mode overrides for footer */
[data-theme="dark"] .footer-section {
  background-color: #000000;
  border-top-color: var(--color-hairline-strong);
}

/* --- HERO COMPONENT --- */
.hero-card-dark {
  position: relative;
  background-color: #000000;
  color: var(--color-on-dark);
  padding: 140px 0;
  overflow: hidden;
  border-bottom: 1px solid var(--color-hairline);
  display: flex;
  align-items: center;
}

.hero-card-dark .container {
  position: relative;
  z-index: 1;
}

.hero-splash-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
  mix-blend-mode: plus-lighter;
  pointer-events: none;
}

@media (min-width: 1025px) {
  .hero-card-dark {
    aspect-ratio: 3407 / 1379;
    padding: 0;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--spacing-xxl);
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  color: var(--color-primary);
  margin-bottom: var(--spacing-md);
}

.hero-headline {
  margin-bottom: var(--spacing-xl);
  color: #000000;
}

.hero-subhead {
  color: #000000;
  margin-bottom: var(--spacing-xl);
}

.hero-ctas {
  display: flex;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

.hero-graphic-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-accent-shape {
  width: 250px;
  height: 250px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-accent-shape::before,
.hero-accent-shape::after {
  display: none;
}

/* --- GENERAL UTILITY CLASS --- */
.link-inline {
  color: var(--color-link-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-inline:hover {
  opacity: 0.8;
}

.case-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-section);
}

.case-gallery-grid img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .case-gallery-grid {
    grid-template-columns: 1fr !important;
    gap: var(--spacing-lg);
  }
}

.timeline {
  margin-top: var(--spacing-xxl);
  border-left: 1px solid var(--color-hairline);
  padding-left: var(--spacing-xl);
  list-style: none;
}

.timeline-item {
  position: relative;
  margin-bottom: var(--spacing-xxl);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--spacing-xl) - 5px);
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: var(--radius-full);
  background-color: var(--color-primary);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--spacing-xs);
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.timeline-role {
  font-weight: 700;
  font-size: 16px;
  color: var(--color-ink);
}

.timeline-company {
  font-weight: 400;
  font-size: 15px;
  color: var(--color-mute);
}

.timeline-date {
  font-size: 14px;
  color: var(--color-mute);
  font-weight: 500;
}

/* --- TECHNICAL LAYOUT FOR CASE STUDY --- */
.case-header {
  background-color: var(--color-surface-dark);
  color: var(--color-on-dark);
  padding: 60px 0;
  border-bottom: 1px solid var(--color-hairline-strong);
}

.case-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--spacing-xl);
  margin-top: var(--spacing-xxl);
}

.stat-box {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-hairline-strong);
  padding: var(--spacing-lg);
  border-radius: var(--radius-sm);
  position: relative;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--spacing-xs);
}

.stat-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-on-dark-mute);
}

.case-content-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: var(--spacing-xxl);
  margin-top: var(--spacing-xxl);
}

.case-main h2,
.case-main h3 {
  margin-top: var(--spacing-xxl);
  margin-bottom: var(--spacing-md);
}

.case-main p {
  margin-bottom: var(--spacing-lg);
  color: var(--color-body);
}

.case-sidebar {
  border-left: 1px solid var(--color-hairline);
  padding-left: var(--spacing-xxl);
}

.sidebar-box {
  background-color: var(--color-surface-soft);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-sm);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  position: relative;
}

.sidebar-box .corner-square {
  top: -1px;
  left: -1px;
}

/* Activity card styling following DESIGN-nvidia.md */
.activity-card {
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-sm);
  background-color: var(--color-surface-soft);
  padding: var(--spacing-lg);
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  cursor: default;
}

.activity-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.activity-card img,
.activity-card .activity-thumb {
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  object-fit: cover;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.activity-card img.book-cover {
  width: 64px;
  height: 90px;
}

.activity-card img.square-thumb,
.activity-card .activity-thumb {
  width: 64px;
  height: 64px;
}

.activity-card:hover img,
.activity-card:hover .activity-thumb {
  transform: scale(1.08);
}

/* Chat interface mock for case studies */
.chat-mock {
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-sm);
  background-color: var(--color-canvas);
  margin: var(--spacing-xl) 0;
  overflow: hidden;
}

.chat-mock-header {
  background-color: var(--color-surface-soft);
  padding: var(--spacing-sm) var(--spacing-md);
  border-bottom: 1px solid var(--color-hairline);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.chat-mock-body {
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  font-size: 14px;
}

.chat-msg {
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-sm);
  max-width: 85%;
}

.chat-msg.user {
  background-color: var(--color-surface-soft);
  align-self: flex-end;
  border-right: 2px solid var(--color-primary);
}

.chat-msg.ai {
  background-color: rgba(28, 45, 141, 0.05);
  align-self: flex-start;
  border-left: 2px solid var(--color-primary);
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-graphic-container {
    display: none;
    /* Hide decorative accent shape on mobile/tablet to save space */
  }

  .hero-ctas {
    justify-content: center;
  }
}

@media (max-width: 960px) {
  .case-content-grid {
    grid-template-columns: 1fr;
  }

  .case-sidebar {
    border-left: none;
    padding-left: 0;
    margin-top: var(--spacing-xxl);
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    /* simple hamburger drawer would be used, for rough layout we hide menu in mobile/provide inline links */
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .display-xl {
    font-size: 36px;
  }

  .display-lg {
    font-size: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* --- BUTTERFLY ANIMATION --- */
.butterfly-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

.butterfly-image {
  position: absolute;
  width: 680px;
  height: auto;

  bottom: -90px;
  left: -200px;
  z-index: 2;
  mix-blend-mode: normal;
  transform: translate(var(--drag-x, 0px), var(--drag-y, 0px)) scale(var(--scale, 1)) rotate(var(--rotate, 0deg));
  transition: transform 0.3s ease;
}

.butterfly-image:hover {
  --scale: 1.05;
}

/* --- ADDITIONAL BUTTERFLY IMAGES (11-14) --- */
.butterfly-extra {
  position: absolute;
  height: auto;
  opacity: 0.8;
  pointer-events: auto;
  transform: translate(var(--drag-x, 0px), var(--drag-y, 0px)) scale(var(--scale, 1)) rotate(var(--rotate, 0deg));
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.butterfly-extra:hover {
  --scale: 1.05;
  opacity: 1;
}

/* Adjust these values to change the position/size of each image manually */
.image-12 {
  width: 190px;
  bottom: -160px;
  left: -90px;
  opacity: 0.9;
  z-index: 2;
}

.image-11 {
  width: 320px;
  top: -190px;
  right: -240px;
  z-index: 3;
  mix-blend-mode: plus-lighter;
  opacity: 0.95
}

.image-13 {
  width: 400px;
  top: -170px;
  left: -300px;
  z-index: 4;

  opacity: 0.95;
  mix-blend-mode: plus-lighter;


}

.image-14 {
  width: 270px;
  bottom: -210px;
  right: -200px;
  opacity: 0.92;
  z-index: 2;
  mix-blend-mode: plus-lighter;
}

/* --- BUTTERFLY HIDDEN TEXTS --- */
.butterfly-hidden-text {
  position: absolute;
  color: #000000;
  font-family: var(--font-sans);
  /* sans font for clean, regular weight look */
  font-size: 9px;
  font-weight: 400;
  /* regular weight */
  letter-spacing: 0.01em;
  pointer-events: none;
  user-select: none;
  z-index: -1;
  /* sits behind butterflies */
  white-space: nowrap;
  transform: translate(-50%, -50%);
  opacity: 0;
  /* completely hidden by default */
  transition: opacity 0.4s ease;
  /* smooth reveal transition when butterfly is moved */
}

/* --- FIGURE PLACEHOLDERS --- */
.figure-placeholder {
  width: 100%;
  margin: var(--spacing-xl) 0;
  padding: var(--spacing-xxl) var(--spacing-xl);
  background-color: var(--color-surface-dark);
  border: 1px dashed var(--color-hairline);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  border-radius: var(--radius-sm);
  color: var(--color-on-dark-mute);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
}

.figure-placeholder::before {
  content: "[ ASSET PLACEHOLDER ]";
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
  display: block;
}

.figure-placeholder.video-placeholder::before {
  content: "[ WALKTHROUGH VIDEO PLACEHOLDER ]";
}

.figure-placeholder-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-on-dark);
  margin-bottom: var(--spacing-xs);
  text-transform: uppercase;
}

.figure-placeholder-meta {
  color: var(--color-ash);
  font-size: 10px;
}

/* ============================================================
   DARK MODE TOGGLE BUTTON
   ============================================================ */
.theme-toggle-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-on-dark-mute);
  font-size: 15px;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--color-on-dark);
  background-color: rgba(255, 255, 255, 0.06);
}

.theme-icon-sun,
.theme-icon-moon {
  line-height: 1;
  display: block;
}

/* ============================================================
   DARK MODE — Global Color Transition
   ============================================================ */
*,
*::before,
*::after {
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

/* Exception: images/video should not color-transition; butterflies must NOT have transform transitions or drag lags */
img,
video {
  transition: opacity 0.3s ease !important;
}

.butterfly-image,
.butterfly-extra {
  transition: opacity 0.3s ease !important;
  /* NO transform transition — drag must be instant */
}

.hero-splash-bg {
  transition: opacity 0.3s ease, filter 0.3s ease !important;
}

/* ============================================================
   DARK MODE — Token Overrides
   ============================================================ */
[data-theme="dark"] {
  --color-canvas: #0d0d0d;
  --color-surface-soft: #161616;
  --color-surface-elevated: #1e1e1e;
  --color-ink: #f0f0f0;
  --color-body: #c8c8c8;
  --color-mute: #888888;
  --color-stone: #7a7a7a;
  --color-ash: #5a5a5a;
  --color-hairline: #2a2a2a;
  --color-hairline-strong: #333333;
}

/* Body background */
[data-theme="dark"] body {
  background-color: var(--color-canvas);
  color: var(--color-body);
}

/* ---- Main section (light canvas → dark) ---- */
[data-theme="dark"] .section {
  background-color: var(--color-canvas);
}

[data-theme="dark"] .section.soft {
  background-color: var(--color-surface-soft);
}

/* ---- Cards ---- */
[data-theme="dark"] .card {
  background-color: #111111;
  border-color: var(--color-hairline);
}

[data-theme="dark"] .card .card-title {
  color: var(--color-ink);
}

[data-theme="dark"] .card .card-desc {
  color: var(--color-body);
}

[data-theme="dark"] .card-img-wrapper {
  background-color: #1a1a1a;
}

/* ---- Badge tags ---- */
[data-theme="dark"] .badge-tag {
  background-color: #1e1e1e;
  color: var(--color-body);
}

/* ---- Pill tabs ---- */
[data-theme="dark"] .pill-tab {
  color: var(--color-ink);
}

[data-theme="dark"] .pill-tab.active {
  background-color: var(--color-ink);
  color: #0d0d0d;
}

/* ---- "SELECTED WORKS" label and card-meta ---- */
[data-theme="dark"] .card-meta-row {
  color: var(--color-stone);
}

/* ---- Breadcrumb bar ---- */
[data-theme="dark"] .breadcrumb-bar {
  background-color: #111111;
  border-bottom-color: var(--color-hairline);
}

[data-theme="dark"] .breadcrumbs a {
  color: var(--color-stone);
}

[data-theme="dark"] .breadcrumbs li:last-child {
  color: var(--color-ink);
}

/* ---- Hero text overrides (hero-headline and subhead use hardcoded #000) ---- */
[data-theme="dark"] .hero-headline {
  color: #ffffff !important;
}

[data-theme="dark"] .hero-subhead {
  color: rgba(255, 255, 255, 0.75) !important;
}

/* ---- Outline button on the hero dark nav ---- */
[data-theme="dark"] .btn-outline {
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

[data-theme="dark"] .btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* ---- Timeline (about page) ---- */
[data-theme="dark"] .timeline {
  border-left-color: var(--color-hairline);
}

[data-theme="dark"] .timeline-role {
  color: var(--color-ink);
}

[data-theme="dark"] .timeline-company,
[data-theme="dark"] .timeline-date {
  color: var(--color-mute);
}

/* ---- Sidebar boxes on case study pages ---- */
[data-theme="dark"] .sidebar-box {
  background-color: #111111;
  border-color: var(--color-hairline);
}

/* ---- Figure placeholders ---- */
[data-theme="dark"] .figure-placeholder {
  background-color: #111111;
  border-color: var(--color-hairline);
}

/* ---- Toggle button in dark mode ---- */
[data-theme="dark"] .theme-toggle-btn {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .theme-toggle-btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

/* ---- Splash image — use custom dark background, hide light-mode splash ---- */
[data-theme="dark"] .hero-card-dark {
  background-image: url('dark_splash.webp');
  background-size: cover;
  background-position: center center;
}

[data-theme="dark"] .hero-splash-bg {
  display: none;
}

[data-theme="dark"] .hero-intern-label {
  color: #ffffff !important;
}

[data-theme="dark"] .butterfly-image,
[data-theme="dark"] .butterfly-extra {
  content: url('caterpillar1.png');
  mix-blend-mode: plus-darker;
}

/* --- HUD PHOTO CAROUSEL --- */
.hud-container {
  position: relative;
  width: 100%;
  height: 520px;
  margin: var(--spacing-xxl) 0;
  background-color: transparent;
  user-select: none;
  overflow: visible;
}

.hud-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hud-node {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
}

.hud-card {
  position: relative;
  border: 1px solid var(--color-primary);
  background-color: var(--color-surface-soft);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  cursor: pointer;
  background-image: radial-gradient(var(--color-hairline) 1px, transparent 1px);
  background-size: 8px 8px;
  width: 100%;
  height: 100%;
}

.hud-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.hud-node:hover {
  z-index: 10;
}

.hud-node:hover .hud-card {
  transform: scale(2.5);
  border-color: var(--color-primary);
  box-shadow: 0 12px 32px rgba(19, 123, 222, 0.25);
}

.hud-node:hover .hud-card img {
  opacity: 1;
}

.hud-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background-color: #ffffff;
  border: 2px solid var(--color-primary);
  border-radius: var(--rounded-full);
  transform: translate(-50%, -50%);
  z-index: 3;
  pointer-events: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.hud-node:hover .hud-dot {
  background-color: var(--color-primary);
  transform: translate(-50%, -50%) scale(1.3);
}

.hud-node:hover::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  border: 1px solid var(--color-primary);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: hud-pulse 1.2s infinite ease-out;
  pointer-events: none;
}

@keyframes hud-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0;
  }
}