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

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1a1a1a;
  background-color: #ffffff;
  background-image: radial-gradient(rgba(0, 0, 0, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  line-height: 1.7;
  font-weight: 400;
  min-height: 100vh;
  letter-spacing: -.4px;
}

a {
  color: #1a1a1a;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0, 0, 0, 0.2);
  transition: opacity 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
  opacity: 0.7;
  text-decoration-color: #000000;
}

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

/* ===== LAYOUT ===== */
.portfolio {
  max-width: 1024px;
  margin: 0 auto;
  padding: 50px 171px 80px;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  background-color: #ffffff;
  position: relative;
  min-height: 100vh;
}

/* ===== AVATAR ===== */
.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 36px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  opacity: 0;
  animation: fadeInUp 0.3s ease forwards;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ===== BIO SECTION ===== */
.bio {
  max-width: 1024px;
  margin-bottom: 64px;
  opacity: 0;
  animation: fadeInUp 0.3s ease 0.1s forwards;
}

.bio__intro {
  font-size: 15px;
  line-height: 1.7;
  color: #1a1a1a;
  margin-bottom: 24px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.bio__intro strong,
.bio__details strong {
  font-weight: 600;
  color: #111111;
}

.bio__details {
  font-size: 15px;
  line-height: 1.7;
  color: #555555;
  margin-bottom: 24px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.bio__details a {
  color: #111111;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0, 0, 0, 0.25);
  transition: text-decoration-color 0.2s ease, opacity 0.2s ease;
}

.bio__details a:hover {
  text-decoration-color: #111111;
  opacity: 0.7;
}

.bio__social {
  font-size: 15px;
  line-height: 1.7;
  color: #555555;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.bio__reach {
  font-size: 15px;
  line-height: 1.7;
  color: #555555;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* Social Pills / Chips (devchauhan UI style) */
.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 5.5px;
  padding: 3.5px 10px 3.5px 7px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  color: #1a1a1a;
  background-color: #f3f3f3;
  border: 1px solid rgba(0, 0, 0, 0.08);
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  vertical-align: middle;
  margin: 0 1px;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.social-chip:hover {
  background-color: #e8e8e8;
  border-color: rgba(0, 0, 0, 0.16);
  color: #000000;
  transform: translateY(-1px);
  text-decoration: none;
  opacity: 1;
}

.social-chip:active {
  transform: translateY(0);
}

.social-chip .tool-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.social-chip[data-tool="resume"] .tool-icon {
  width: 12px;
  height: 13.5px;
}

.social-chip[data-tool="x"] .tool-icon,
.social-chip[data-tool="twitter"] .tool-icon {
  width: 11px;
  height: 11px;
}

.social-chip[data-tool="github"] .tool-icon {
  width: 14px;
  height: 14px;
  color: #000000;
  fill: #000000;
}

.social-chip[data-tool="dribbble"] .tool-icon {
  width: 14px;
  height: 14px;
  color: #4e4e4e;
  fill: #4e4e4e;
}

.social-chip[data-tool="instagram"] .tool-icon {
  width: 13px;
  height: 13px;
}

.social-chip[data-tool="gmail"] .tool-icon,
.social-chip[data-tool="email"] .tool-icon {
  width: 14px;
  height: 14px;
}

.social-chip span {
  display: inline-block;
  line-height: 1;
}

/* ===== HATCHED DIVIDER (sahilcodex style) ===== */
.hatched-divider {
  margin-left: -171px;
  margin-right: -171px;
  width: calc(100% + 342px);
  height: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background-image: repeating-linear-gradient(
    315deg,
    transparent 0,
    rgba(0, 0, 0, 0.035) 0,
    rgba(0, 0, 0, 0.035) 1px,
    transparent 1px,
    transparent 10px
  );
  background-size: 14px 14px;
  margin-top: 40px;
  margin-bottom: 12px;
}

/* ===== TABS & MAIL NAVIGATION ===== */
.tabs-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0 18px;
  margin: 0;
  background: #ffffff;
}

.tabs-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  opacity: 0;
  animation: fadeInUp 0.3s ease 0.2s forwards;
}

.tabs-left {
  display: flex;
  align-items: center;
  pointer-events: auto;
}

.tabs__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  max-width: 0;
  margin-right: 0;
  transform: translateY(-15px);
  transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), margin-right 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s ease, transform 0.15s ease, visibility 0.4s;
}

.is-sticky .tabs__avatar {
  opacity: 1;
  visibility: visible;
  max-width: 32px;
  margin-right: 20px;
  transform: translateY(0);
  transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), margin-right 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease 0.1s, transform 0.2s ease 0.1s, visibility 0.4s;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  row-gap: 12px;
}

.tabs__item {
  font-size: 1rem;
  font-weight: 400;
  color: #8c8c8c;
  cursor: pointer;
  padding: 0;
  background: none;
  border: none;
  font-family: inherit;
  letter-spacing: -0.01em;
  transition: color 0.25s ease;
  position: relative;
}

.tabs__item:hover {
  color: #111111;
}

.tabs__item--active {
  color: #111111;
  font-weight: 500;
}

.send-mail-btn,
.send-mail-link {
  position: absolute;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px 6px 11px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  color: #1a1a1a;
  background-color: #f3f3f3;
  border: 1px solid rgba(0, 0, 0, 0.08);
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  letter-spacing: -0.01em;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-15px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.4s, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  pointer-events: auto;
}

.send-mail-btn:hover,
.send-mail-link:hover {
  background-color: #e8e8e8;
  border-color: rgba(0, 0, 0, 0.16);
  color: #000000;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.is-sticky .send-mail-btn,
.is-sticky .send-mail-link {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.2s ease 0.1s, transform 0.2s ease 0.1s, visibility 0.4s, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.send-mail-btn .send-mail-btn__icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* ===== PROJECTS GRID ===== */
.tab-content {
  display: none;
}

.tab-content--active {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 32px;
  row-gap: 56px;
  opacity: 0;
  animation: fadeIn 0.4s ease forwards;
}

/* Anti-flicker pre-render rules for restored portfolio tabs */
html[data-initial-tab]:not([data-initial-tab="all"]) #content-all {
  display: none !important;
}
html[data-initial-tab="case-studies"] #content-case-studies,
html[data-initial-tab="motion-design"] #content-motion-design,
html[data-initial-tab="illustrations-character-animation"] #content-illustrations-character-animation,
html[data-initial-tab="email-templates"] #content-email-templates {
  display: grid !important;
  opacity: 1 !important;
}
html[data-initial-tab]:not([data-initial-tab="all"]) #tab-all {
  color: #8c8c8c !important;
  font-weight: 400 !important;
}
html[data-initial-tab="case-studies"] #tab-case-studies,
html[data-initial-tab="motion-design"] #tab-motion-design,
html[data-initial-tab="illustrations-character-animation"] #tab-illustrations-character-animation,
html[data-initial-tab="email-templates"] #tab-email-templates {
  color: #111111 !important;
  font-weight: 500 !important;
}

.project-card {
  text-decoration: none;
  cursor: pointer;
  display: block;
}

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

.project-card__image-container {
  border-radius: 4px;
  overflow: hidden;
  background: #fcfcfc;
  margin-bottom: 20px;
  position: relative;
  aspect-ratio: 4 / 3;
}

.project-card__image-container--blank,
.project-card__image-container:has(.project-card__image[src=""]),
.project-card__image-container:has(.project-card__image:not([src])) {
  background: #f5f5f6;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.project-card__image-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.03);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.project-card:hover .project-card__image-container::after {
  opacity: 1;
}

.project-card__image {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  mix-blend-mode: multiply;
}

.project-card__image[src=""],
.project-card__image:not([src]) {
  display: none;
}

video.project-card__image {
  mix-blend-mode: normal;
}

.project-card__info {
  padding: 0 4px;
}

.project-card__title {
  color: #111111;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
  letter-spacing: -0.4px;
}

.project-card__desc {
  color: #666666;
  font-size: 14.5px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: #8c8c8c;
  font-size: 0.9375rem;
}

/* ===== FOOTER ===== */
.footer {
  max-width: 1024px;
  margin: 80px auto 0;
  padding: 0 171px 48px;
  opacity: 0;
  animation: fadeInUp 0.3s ease 0.4s forwards;
}

.footer__divider {
  width: 100%;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
}

.footer__text {
  font-size: 0.8125rem;
  color: #8c8c8c;
  letter-spacing: -0.01em;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .portfolio {
    padding: 44px 20px 64px;
  }

  .hatched-divider {
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px);
  }

  .footer {
    padding: 0 20px 48px;
  }

  .tabs-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .tab-content--active {
    grid-template-columns: 1fr;
    row-gap: 40px;
  }

  .tabs {
    gap: 16px;
    flex-wrap: wrap;
  }

  .tabs__avatar,
  .is-sticky .tabs__avatar {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    max-width: 0 !important;
    margin-right: 0 !important;
  }

  .send-mail-btn,
  .send-mail-link,
  .is-sticky .send-mail-btn,
  .is-sticky .send-mail-link {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }
}

@media (max-width: 480px) {
  .portfolio {
    padding: 36px 16px 48px;
  }

  .hatched-divider {
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
  }

  .footer {
    padding: 0 16px 48px;
  }

  .avatar {
    width: 42px;
    height: 42px;
    margin-bottom: 28px;
  }

  .bio {
    margin-bottom: 24px;
  }
}

/* ===== PROJECT DETAILS PAGE ===== */
.project-header,
.project-header__back {
  display: none !important;
}

.project-page {
  padding: 48px 0 100px;
}

.project-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 32px;
}

.project-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.project-title {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 32px;
  color: #1a1a1a;
}

.project-tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 48px;
}

.project-tabs__item {
  font-size: 0.9375rem;
  color: #a0a0a0;
  cursor: default;
  letter-spacing: -0.01em;
}

.project-tabs__item--active {
  color: #1a1a1a;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  margin-bottom: 64px;
  padding-bottom: 48px;
  border-bottom: none;
  background-image: linear-gradient(to right, black 85%, transparent 85%);
  background-position: bottom;
  background-size: 16.666% 1px;
  background-repeat: repeat-x;
}

.project-meta__col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-meta__label {
  font-size: 0.875rem;
  color: #a0a0a0;
  letter-spacing: -0.03em;
}

.project-meta__value {
  font-size: 1rem;
  font-weight: 400;
  color: #1a1a1a;
  line-height: 1.5;
  letter-spacing: -0.4px;
}

.project-text {
  margin-bottom: 32px;
}

.project-content:has(+ .project-image) .project-text,
.project-content:has(+ .project-mockups) .project-text,
.project-content:has(+ .project-image-group) .project-text,
.project-text--has-image {
  margin-bottom: 24px;
}

.project-text h2 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  color: #1a1a1a;
}

.project-text p {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 400;
  color: #171717;
  margin-bottom: 24px;
}

.project-text strong {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
  color: #1a1a1a;
}

.project-text p:last-child {
  margin-bottom: 0;
}

.text-toggle-btn {
  cursor: pointer;
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

.text-toggle-btn:hover {
  opacity: 0.7;
}

.project-image {
  width: 100%;
  max-width: 720px;
  padding: 0 32px;
  margin: 0 auto 80px;
  display: block;
  border-radius: 0px;
  height: auto;
  box-sizing: border-box;
}

.project-image--compact,
.project-image--competitor {
  margin-bottom: 18px !important;
}

.project-image-group--compact {
  margin-bottom: 18px !important;
}

.project-text--compact {
  margin-bottom: 18px !important;
}

.project-image--hero {
  margin-bottom: 18px;
  padding: 0 32px;
  max-width: 720px;
}

.project-mockups {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 32px;
  max-width: 720px;
  margin: 0 auto 80px;
  box-sizing: border-box;
}

.project-mockups .project-image,
.project-mockups video.project-image {
  padding: 0;
  margin-bottom: 0;
  width: 100%;
  max-width: 100%;
}

.project-image-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto 80px;
  padding: 0 32px;
  box-sizing: border-box;
  width: 100%;
}

.project-image-group--no-gap {
  gap: 0;
}

.project-image-group .project-image {
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 100%;
}

.project-mockups--overlap {
  gap: 0;
}

.project-mockups--overlap .project-image + .project-image {
  margin-top: 0px;
  position: relative;
}

.project-mockup-label {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 400;
  color: #171717;
  padding: 0 4px;
  margin-bottom: 24px;
}

.project-mockup-label strong {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
  color: #1a1a1a;
}

@media (max-width: 768px) {
  .project-content {
    padding: 0 24px;
  }
  .project-title {
    font-size: 1.25rem;
  }
  .project-tabs {
    gap: 16px;
    margin-bottom: 32px;
  }
  .project-meta {
    gap: 32px;
    margin-bottom: 48px;
    padding-bottom: 32px;
  }
  .project-image {
    padding: 0 24px;
    border-radius: 0;
    margin-bottom: 48px;
  }
  .project-image--hero {
    margin-bottom: 18px;
    padding: 0 24px;
  }
  .project-image--compact,
  .project-image--competitor {
    margin-bottom: 18px !important;
  }
  .project-image-group--compact {
    margin-bottom: 18px !important;
  }
  .project-text--compact {
    margin-bottom: 18px !important;
  }
  .project-mockups {
    padding: 0 24px;
    gap: 12px;
    margin-bottom: 48px;
  }
  .project-mockups .project-image,
  .project-mockups video.project-image {
    padding: 0;
    margin-bottom: 0;
  }
  .project-image-group {
    padding: 0 24px;
    gap: 12px;
    margin-bottom: 48px;
  }
  .project-image-group .project-image {
    padding: 0;
    margin: 0;
  }
  .project-mockups--overlap {
    gap: 0;
  }
  .project-mockups--overlap .project-image + .project-image {
    margin-top: 0%;
  }
  .project-mockup-label {
    padding: 0 4px;
  }
}

/* ===== CASE STUDY EXTENSIONS ===== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: #1a1a1a;
  margin-bottom: 0;
}

.section-header__action {
  font-size: 15px;
  color: #1a1a1a;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
  transition: opacity 0.2s ease;
}

.section-header__action:hover {
  opacity: 0.6;
}

.project-text ul,
.project-text ol {
  padding-left: 20px;
  margin-bottom: 24px;
}

.project-text li {
  font-size: 15px;
  line-height: 1.7;
  color: #171717;
  margin-bottom: 8px;
}

.project-text li:last-child {
  margin-bottom: 0;
}

.ia-list {
  list-style: none !important;
  padding-left: 0 !important;
}

.ia-list > li {
  margin-bottom: 24px;
}

.ia-list > li > strong {
  display: block;
  margin-bottom: 6px;
  color: #1a1a1a;
}

.ia-list ul {
  list-style: disc !important;
  padding-left: 24px !important;
  margin-top: 6px;
  margin-bottom: 6px;
}

.ia-list ul ul {
  list-style: circle !important;
  padding-left: 20px !important;
}

.process-flow {
  display: inline-block;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  letter-spacing: -0.01em;
  padding: 4px 0;
}

/* Table Styles */
.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0 28px;
  border: 1px solid #eaeaea;
  border-radius: 8px;
}

.user-needs-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
  line-height: 1.6;
}

.user-needs-table th,
.user-needs-table td {
  padding: 14px 16px;
  vertical-align: top;
  border-bottom: 1px solid #eaeaea;
}

.user-needs-table th {
  background-color: #fafafa;
  font-weight: 600;
  color: #1a1a1a;
  font-size: 13px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.user-needs-table tr:last-child td {
  border-bottom: none;
}

.user-needs-table tbody tr:hover {
  background-color: #fafafa;
}

.user-needs-table td strong {
  color: #1a1a1a;
  font-weight: 500;
}

/* Competitor brand badges */
.competitor-brands {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 20px;
}

.competitor-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.competitor-brand__icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
}

.competitor-brand__name {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #000;
  letter-spacing: -0.4px;
}


/* Motion Design Page Specific Styles */
.project-title--motion {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px;
}

.features-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 15px;
}

.feature-item {
  background: #f4f4f4;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.storyboard-videos {
  max-width: 800px;
  margin: 0 auto 80px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 0 32px;
}

.storyboard-item {
  display: flex;
  align-items: center;
  gap: 20px;
}

.storyboard-number {
  background: #111;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.storyboard-item video {
  width: 100%;
  border-radius: 8px;
  background: #fcfcfc;
}

@media (max-width: 768px) {
  .storyboard-item {
    flex-direction: column;
    align-items: flex-start;
  }
}


.storyboard-videos {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 40px !important;
  align-items: start !important;
}
.storyboard-item {
  flex-direction: row !important;
  align-items: flex-start !important;
}
@media (max-width: 768px) {
  .storyboard-videos {
    grid-template-columns: 1fr !important;
  }
}


/* Detailing Section Grid Layout */
.detailing-section {
  max-width: 640px;
  width: 100%;
  margin: 0 auto 80px;
  display: flex;
  flex-direction: column;
  gap: 0px;
  row-gap: 0px;
  column-gap: 0px;
  padding: 0;
  border-radius: 0px;
  box-sizing: border-box;
}
.detailing-row-1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0px;
  row-gap: 0px;
  column-gap: 0px;
}
.detailing-row-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0px;
  row-gap: 0px;
  column-gap: 0px;
}
.detailing-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0px;
  row-gap: 0px;
  column-gap: 0px;
}
.detailing-section img,
.detailing-section video {
  width: 100%;
  border-radius: 0px;
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  aspect-ratio: 4/3; /* Standard video aspect ratio placeholder */
  object-fit: cover;
  display: block;
}
.detailing-row-1 img,
.detailing-row-1 video {
  aspect-ratio: auto;
  height: auto;
}
@media (max-width: 768px) {
  .detailing-row-2, .detailing-row-3 {
    grid-template-columns: 1fr;
  }
}

/* SpendWise Continuous Motion Media Stack (1px vertical spacing) */
.spendwise-media-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 640px;
  margin: 0 auto 120px;
  padding: 0 32px;
  box-sizing: border-box;
  width: 100%;
}

.spendwise-media-stack video,
.spendwise-media-stack img {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
  border-radius: 0;
  margin-bottom: 1px;
  position: relative;
  background-color: #FFFCF1;
}

.spendwise-media-stack > *:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .spendwise-media-stack {
    padding: 0 24px;
  }
}

/* Numen Ambient AI Motion Media Stack (fills 640px container) */
.numen-media-stack {
  display: flex;
  flex-direction: column;
  gap: 0px;
  align-items: center;
  max-width: 640px;
  margin: 0 auto 120px;
  padding: 0;
  box-sizing: border-box;
  width: 100%;
}

.numen-media-stack video {
  display: block;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 640 / 573.15;
  object-fit: contain;
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
  border-radius: 0;
  background-color: #000000;
  box-sizing: border-box;
}

.numen-media-stack img {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  aspect-ratio: 640 / 515;
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
  border-radius: 0;
  background-color: #000000;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .numen-media-stack {
    padding: 0;
  }
}

/* Haystack Motion Detailing Multi-Video Grids */
.detailing-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  width: 100%;
  box-sizing: border-box;
}

.detailing-grid-2 video,
.detailing-grid-2 .project-image {
  width: 100%;
  height: 100%;
  aspect-ratio: 320 / 235;
  object-fit: cover;
  display: block;
  background: #000;
  padding: 0;
  margin: 0;
  border-radius: 0;
}

.detailing-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  width: 100%;
  box-sizing: border-box;
}

.detailing-grid-3 video,
.detailing-grid-3 .project-image {
  width: 100%;
  height: 100%;
  aspect-ratio: 213 / 156;
  object-fit: cover;
  display: block;
  background: #000;
  padding: 0;
  margin: 0;
  border-radius: 0;
}

.detailing-media-item {
  width: 100%;
  display: block;
  background: #000;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  box-sizing: border-box;
  padding: 0 !important;
  margin: 0 !important;
}

.detailing-media-item--last {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}



/* ===== CASE STUDY SIDEBAR NAVIGATION (LEFT RAIL) ===== */
.case-study-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  left: max(24px, calc(50vw - 360px - 195px));
  width: 175px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  user-select: none;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  pointer-events: auto;
}

.case-study-nav::-webkit-scrollbar {
  display: none;
}

.case-study-nav__link {
  font-size: 12px;
  line-height: 1.3;
  color: #8c8c8c;
  text-decoration: none;
  cursor: pointer;
  padding: 2.5px 0;
  transition: color 0.15s ease, font-weight 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.case-study-nav__link:hover {
  color: #111111;
}

.case-study-nav__link--active {
  color: #111111;
  font-weight: 600;
}

@media (max-width: 1080px) {
  .case-study-nav {
    display: none;
  }
}

/* ===== MOBILE SCROLL WHEEL & BUBBLE ===== */
.mobile-scroll-track,
.mobile-scroll-bubble {
  display: none;
}

@media (max-width: 1080px) {
  .mobile-scroll-track {
    display: block;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 26px;
    z-index: 10001;
    pointer-events: auto;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-scroll-thumb {
    position: absolute;
    right: 3px;
    top: 0;
    width: 4.5px;
    min-height: 38px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.38);
    opacity: 0;
    visibility: hidden;
    will-change: transform, height;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s, width 0.15s ease, background-color 0.15s ease;
    cursor: pointer;
    touch-action: none;
  }

  .mobile-scroll-thumb--visible {
    opacity: 1;
    visibility: visible;
  }

  .mobile-scroll-track:active .mobile-scroll-thumb,
  .mobile-scroll-thumb--active,
  .mobile-scroll-thumb--dragging {
    width: 7.5px;
    right: 2px;
    background: rgba(0, 0, 0, 0.85);
  }

  .mobile-scroll-bubble {
    display: flex;
    align-items: center;
    gap: 6px;
    position: fixed;
    right: 16px;
    top: 0;
    transform: translateY(50vh) translateY(-50%);
    will-change: transform;
    background: #111111;
    color: #ffffff;
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.01em;
    padding: 7px 14px;
    border-radius: 9999px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.15);
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s, box-shadow 0.15s ease, background-color 0.15s ease;
    z-index: 10000;
  }

  .mobile-scroll-bubble:active,
  .mobile-scroll-bubble--active {
    background: #1a1a1a;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 0 1.5px rgba(255, 255, 255, 0.3);
  }

  .mobile-scroll-bubble--dragging {
    opacity: 1 !important;
    visibility: visible !important;
    background: #000000;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.4);
  }

  .mobile-scroll-bubble__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.75;
    transition: transform 0.15s ease, opacity 0.15s ease;
  }

  .mobile-scroll-bubble:hover .mobile-scroll-bubble__arrow,
  .mobile-scroll-bubble--active .mobile-scroll-bubble__arrow {
    opacity: 1;
  }

  .mobile-scroll-bubble--pulse {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.45);
  }

  .mobile-scroll-bubble--visible {
    opacity: 1;
    visibility: visible;
  }
}


