@import url("css/tokens.css");

:root {
  /* Core Color Palette */
  --color-primary: #B64F2A;      /* Rust */
  --color-accent: #195959;       /* Teal */
  --color-light-gray: #938C82;
  --color-gray: #6A675D;
  --color-dark-gray: #4E4B44;
  --color-neutral-black: #1C2123;
  --color-secondary-1: #F5C7AF;  /* Peach */
  --color-secondary-2: #CD846B;  /* Dark Peach */
  --color-brown: #523C2E;
  
  /* Background & Surface */
  --color-bg: #F8F5F5;           /* Off White Background */
  --color-surface: #FDFDFD;      /* Pure White Surface */
  --color-surface-hover: rgba(28, 33, 35, 0.04);
  --color-surface-hover-dark: rgba(28, 33, 35, 0.08);
  --color-white: #D9D9D9;
  --color-pure-white: #FFFFFF;

  /* Semantic Aliases */
  --color-text: var(--color-neutral-black);
  --color-muted: var(--color-gray);
  --color-dark-bg: var(--color-neutral-black);
  --color-dark-text: var(--color-bg);
  --color-border: var(--color-light-gray);
}

html {
  scroll-padding-top: 110px;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;     /* Firefox */
}

/* Critical initial render override when loading /work directly */
html.is-work-page .hero-content-wrapper,
html.is-work-page #cat-svg-container {
  opacity: 0 !important;
  visibility: hidden !important;
}

html.is-work-page #section-2 {
  opacity: 1 !important;
  pointer-events: auto !important;
}

html.is-work-page #transition-curtain {
  opacity: 0 !important;
  display: none !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;             /* Chrome, Safari, Opera */
  width: 0;
  height: 0;
}

html, body, .case-study-body {
  background-color: var(--color-bg) !important;
}

section[id], .cs-content section[id] {
  scroll-margin-top: 110px;
}

.scroll-track,
.sticky-viewport,
.cat-svg-container,
.portfolio-container,
.portfolio-section {
  background-color: var(--color-bg);
}

.scroll-track {
  position: relative;
  height: 210vh; /* Extended scroll track for 30% slower transition effects */
  scroll-snap-align: start;
}

.sticky-viewport {
  position: sticky;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* Background Layers */
.hero-content-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 40; /* Above Section 2 and Curtain, but pointer-events: none */
  display: flex;
  align-items: center;
  pointer-events: none; /* Let scroll events pass through */
}

.container-editorial {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  position: relative;
}

.container-portfolio {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 4rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.hero-text-block {
  width: 45%;
  pointer-events: auto; /* Enable link clicking */
}

.kicker {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  display: block;
}

h1.hero-title {
  font-family: var(--font-heading);
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1.05;
  color: var(--color-text);
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

h1.hero-title span {
  display: block;
  font-weight: 300;
  font-style: italic;
}

h1.hero-title span.text-rust {
  display: inline;
  font-style: normal;
  font-weight: inherit;
  color: var(--color-primary);
}

.hero-description {
  font-size: 1.8rem;
  line-height: 1.6;
  color: var(--color-muted);
  margin-bottom: 2.5rem;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background-color: rgba(222, 102, 64, 0.08);
  color: var(--color-rust);
  border: none;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  background-color: rgba(222, 102, 64, 0.15);
}

/* SVG Containers styling */
.cat-svg-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  z-index: 10; /* Bottom-most child of viewport */
  transition: opacity 0.05s linear;
}

.cat-svg-container.active {
  opacity: 1;
}

.cat-svg-container svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* GPU-Accelerated Transition Circle Overlay (z-index: 30) */
.transition-curtain {
  position: absolute;
  background-color: var(--color-dark-bg);
  border-radius: 50%; /* Pure circular element */
  z-index: 30; /* Above Section 2 (z-index 20) */
  pointer-events: none;
  opacity: 0;
  width: 250vmax; /* Huge circle, guaranteed to cover screen at scale 1 */
  height: 250vmax;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%) scale(0); /* Default to center scaling */
  will-change: transform;
}

.transition-curtain.active {
  opacity: 1;
}

/* Second Section (z-index: 20) */
.next-section {
  position: absolute; /* Placed directly on top of SVG container inside viewport */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-bg);
  color: var(--color-text);
  z-index: 20; /* Between cat-svg-container and transition-curtain */
  opacity: 0;
  pointer-events: none;
  overflow-y: auto; /* Enable vertical scrolling */
  scroll-behavior: smooth;
}

.next-section-text-block {
  width: 45%;
  position: relative;
  z-index: 15;
}

.next-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: 2rem;
}

.next-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--color-muted);
  margin-bottom: 2.5rem;
}


/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  z-index: 50; /* Top-most */
}

.scroll-indicator-line {
  width: 40px;
  height: 2px;
  background-color: var(--color-muted);
  position: relative;
  overflow: hidden;
}

.scroll-indicator-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background-color: var(--color-primary);
  animation: scroll-line-anim 2s infinite ease-in-out;
}

@keyframes scroll-line-anim {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

@media(max-width: 1024px) {
  .hero-text-block, .next-section-text-block {
    width: 60%;
  }
  h1.hero-title {
    font-size: 3.5rem;
  }
  .hero-description {
    font-size: 1.4rem;
  }
}

@media(max-width: 768px) {
  .hero-text-block, .next-section-text-block {
    width: 80%;
  }
  .container-editorial {
    padding: 0 2rem;
  }
}

/* Material Design Ripple styles */
.ripple-span {
  position: absolute;
  border-radius: 50%;
  background-color: var(--color-rust);
  opacity: 0.4;
  transform: scale(0);
  animation: ripple-animation 0.6s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Custom Cursor-Following Tooltip */
.custom-tooltip {
  position: fixed;
  background: rgba(17, 17, 17, 0.85);
  color: var(--color-pure-white);
  padding: 4px 8px;
  font-size: 14px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 9999;
  backdrop-filter: blur(4px);
  display: none;
  font-family: var(--font-body);
}

/* Portfolio Section Styles */
.portfolio-container {
  background-color: var(--color-bg);
}

.portfolio-section {
  padding: 40px 0;
  background-color: var(--color-bg);
  scroll-snap-align: start;
}

/* Reusable Section Header Component */
.section-header {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-neutral-black);
  padding: 32px 18px 24px 18px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-gray);
  margin-bottom: 16px;
}

/* Projects & Case Studies Table Layout */
/* Modern Borderless List (Linear / Vercel inspired) */
.morph-table {
  background-color: transparent;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.morph-row {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1.5fr 1fr 1.5fr 32px;
  gap: 16px;
  align-items: center;
  padding: 24px;
  border-radius: 12px;
  background-color: transparent;
  overflow: hidden;
  transition: background-color 0.2s ease, box-shadow 0.5s var(--ease-spring), min-height 0.5s var(--ease-spring), grid-template-columns 0.5s var(--ease-spring);
  will-change: min-height, grid-template-columns;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
}

.morph-row:not(.expanded):hover {
  background-color: var(--color-surface-hover);
}

/* Columns */
.morph-col {
  transition: opacity 0.35s ease, transform 0.35s ease;
  opacity: 1;
}

.morph-title-col h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-neutral-black);
}

.morph-role-text {
  font-size: 14px;
  color: var(--color-gray);
  font-weight: 400;
}

.morph-year-text {
  font-size: 14px;
  color: var(--color-light-gray);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Tags styling */
.morph-tags-col {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.morph-tag {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-gray);
  background-color: rgba(28, 33, 35, 0.05);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Shared action button â€” expand (â†’) and close (Ã—) occupy the same spot */
.morph-row-btn,
.morph-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background-color: var(--color-surface-hover);
  color: var(--color-gray);
  font-size: 18px;
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
  overflow: hidden;
  position: absolute;
  top: 28px;
  right: 24px;
  z-index: 100;
}

.morph-row:not(.expanded):hover .morph-row-btn {
  background-color: var(--color-surface-hover-dark);
  color: var(--color-neutral-black);
}

/* Hide expand arrow when expanded, show close */
.morph-row.expanded .morph-row-btn { display: none; }
.morph-close-btn { display: none; }
.morph-row.expanded .morph-close-btn {
  display: inline-flex;
}

.morph-close-btn:hover {
  background-color: var(--color-surface-hover-dark);
  color: var(--color-neutral-black);
}

/* Compact Thumbnail */
.morph-thumbnail {
  position: relative;
  width: 56px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.morph-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.morph-row:not(.expanded):hover .morph-thumbnail img {
  transform: scale(1.08);
}

/* Expand cue overlay â€” simplified */
.morph-expand-cue {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(28, 33, 35, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-bg);
  opacity: 0;
  transition: opacity 0.25s ease;
  border-radius: 6px;
}

.cue-plus {
  font-size: 16px;
  font-weight: 400;
}

.cue-text {
  display: none; /* Hide the label, just show + */
}

.morph-row:not(.expanded):hover .morph-expand-cue {
  opacity: 1;
}

/* ===== EXPANDED STATE â€” Tight, focused card ===== */
.morph-row.expanded {
  grid-template-columns: 1.1fr 1fr;
  grid-template-rows: 1fr;
  gap: 32px;
  padding: 24px;
  min-height: 380px;
  background-color: var(--color-bg);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  cursor: default;
}

.morph-row.expanded .morph-img-col {
  grid-column: 1;
  grid-row: 1;
  height: 100%;
}

.morph-row.expanded .morph-thumbnail {
  width: 100%;
  height: 100%;
  border-radius: 10px;
}

/* Hide button-col grid slot in expanded state */
.morph-row.expanded .morph-button-col {
  display: none;
}

/* Hide other columns during expansion */
.morph-row.expanded .morph-title-col,
.morph-row.expanded .morph-role-col,
.morph-row.expanded .morph-tags-col,
.morph-row.expanded .morph-year-col,
.morph-row.expanded .morph-button-col {
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  position: absolute;
}

/* Details Panel â€” explicitly placed in grid column 2 */
.morph-details-panel {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease 0.15s;
  display: none;
  flex-direction: column;
  justify-content: flex-start;
  font-family: 'Poppins', sans-serif;
  position: relative;
  height: 100%;
  padding: 16px 0;
  overflow-y: auto;
}

.morph-row.expanded .morph-details-panel {
  display: flex;
  grid-column: 2;
  grid-row: 1;
  opacity: 1;
  pointer-events: auto;
}

.morph-details-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* -- Expanded Card Component Typography -- */

.morph-card-subtext {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-light-gray);
}

.morph-card-header {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-neutral-black);
  letter-spacing: -0.02em;
}

.morph-card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.morph-card-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-gray);
  background-color: rgba(28, 33, 35, 0.05);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.morph-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.morph-card-body p {
  font-size: var(--font-size-body);
  color: var(--color-dark-gray);
  line-height: 1.6;
}

.morph-card-label {
  font-size: var(--font-size-notes);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
}

.morph-card-divider {
  height: 1px;
  background-color: rgba(28, 33, 35, 0.08);
}

.morph-card-action {
  margin-top: auto;
  padding-top: 8px;
}

.morph-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  transition: gap 0.2s ease, color 0.2s ease;
}

.morph-card-link:hover {
  gap: 10px;
  color: var(--color-neutral-black);
}

.morph-card-link-icon {
  font-size: 18px;
}

/* ==========================================================================
   Case Study Page Styles
   ========================================================================== */

.case-study-body {
  background-color: var(--color-bg);
  color: var(--color-neutral-black);
  font-family: var(--font-body);
  margin: 0;
}

.case-study-back-bar {
  background-color: var(--color-surface);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1.5px solid var(--color-neutral-black);
}

.case-study-back-bar .container-editorial {
  padding: 16px 48px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-neutral-black);
  text-decoration: none;
  transition: gap 0.2s ease, color 0.2s ease;
}

.back-arrow {
  display: inline-block;
  font-size: 16px;
  transition: transform 0.2s ease;
}

.back-link:hover {
  gap: 10px;
}

.back-link:hover .back-arrow {
  transform: translateX(-4px);
}

.case-study-hero {
  padding: 96px 48px;
  border-bottom: 1.5px solid var(--color-neutral-black);
  background-color: var(--color-bg);
}

@media (min-width: 769px) {
  .case-study-hero .container-editorial {
    padding-left: 244px; /* Align title section with case-study-content main body */
  }
}

.hero-accent-bar {
  width: 4px;
  height: 48px;
  margin-bottom: 24px;
}

.case-study-title {
  font-family: var(--font-heading);
  font-size: 52px;
  font-weight: 700;
  color: var(--color-neutral-black);
  margin: 0 0 24px 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.case-study-description {
  font-size: 20px;
  color: var(--color-dark-gray);
  line-height: 1.6;
  max-width: 800px;
  margin: 0;
}

.case-study-main {
  padding: 64px 48px 96px 48px;
  background-color: var(--color-bg);
}

.case-study-split {
  display: flex;
  align-items: flex-start;
}

/* Case Study Sticky Navigation Sidebar */
.case-study-sidebar {
  position: sticky;
  top: 96px;
  width: 180px;
  margin-right: 64px;
  flex-shrink: 0;
  align-self: flex-start;
  font-family: var(--font-heading);
}

.side-nav-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-neutral-black);
  margin-bottom: 16px;
  padding-bottom: 12px;
}

.side-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-nav-link {
  display: block;
  text-decoration: none;
  font-size: 13px;
  color: var(--color-gray);
  text-align: left;
  font-weight: 400;
  padding: 8px 0;
  transition: all 0.2s ease;
  position: relative;
  border: none;
  background: transparent;
  cursor: pointer;
}

.side-nav-link:hover, .side-nav-link.active {
  color: var(--color-neutral-black);
  font-weight: 600;
}

.side-nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-neutral-black);
  transition: width 0.3s ease;
}

.side-nav-link:hover::after {
  width: 100%;
}

.case-study-content {
  flex: 1;
  min-width: 0;
}

/* Case Study Parts Components styling */
.case-study-metadata {
  display: flex;
  gap: 32px;
  align-items: center;
  margin-bottom: 48px;
  font-size: 14px;
  color: var(--color-dark-gray);
}

.metadata-label {
  font-weight: 500;
  color: var(--color-neutral-black);
}

.case-study-metadata .tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
}

.tags-container {
  display: flex;
  gap: 8px;
  align-items: center;
}

.section-heading {
  width: 100%;
  padding-left: 24px;
  margin-bottom: 48px;
  margin-top: 64px;
}

.cs-body-content section:first-child .section-heading {
  margin-top: 0;
}

.section-heading h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  color: var(--color-neutral-black);
  margin: 0;
}

.highlighted-label {
  display: inline-block;
  background-color: var(--cs-highlight-yellow);
  padding: 1px 2px !important;
  border-radius: 2px;
  margin-bottom: 16px;
}

.highlighted-label.green-highlight {
  background-color: var(--cs-highlight-green);
}

.highlighted-label.blue-highlight {
  background-color: var(--cs-highlight-blue);
}

.highlighted-label.pink-highlight {
  background-color: var(--cs-highlight-pink);
}

.highlighted-label.lavender-highlight {
  background-color: var(--cs-highlight-lavender);
}

.highlighted-label h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 500;
  color: var(--color-neutral-black);
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

.user-goal-box {
  border: 1px solid var(--color-neutral-black);
  padding: 24px;
  margin-bottom: 48px;
  background-color: var(--color-pure-white);
}

/* Collapsible drawers for heuristic reviews using modern semantic layout */
.heuristic-details, .collapsible-drawer {
  border: 1px solid var(--color-neutral-black);
  background-color: var(--color-pure-white);
  margin-bottom: 48px;
}

.collapsible-summary, .heuristic-details summary {
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  font-family: var(--font-heading);
}

.collapsible-summary::-webkit-details-marker {
  display: none;
}

.chevron-icon {
  font-size: 16px;
  transition: transform 0.2s ease;
  user-select: none;
}

.heuristic-details[open] .chevron-icon, .collapsible-drawer[open] .chevron-icon {
  transform: rotate(180deg);
}

.collapsible-content, .heuristic-details .accordion-content {
  padding: 32px 20px;
  border-top: 1px solid var(--color-neutral-black);
}

/* Accordion Drawer legacy wrapper fallback support (DesignSystem toggle) */
.accordion-header {
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-neutral-black);
  background-color: var(--color-bg);
}

.accordion-content {
  padding: 32px 20px;
  background-color: var(--color-pure-white);
  border-bottom: 1px solid var(--color-neutral-black);
  display: none;
}

/* Ripple span animation */
.ripple-span {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-anim 600ms linear;
  background-color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

@keyframes ripple-anim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Top Navigation Bar styling (Premium Frosted Glassmorphism) */
.top-nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 88px;
  z-index: 1000;
  background-color: rgba(248, 245, 245, 0.85); /* 85% opacity of F8F5F5 */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid #E0E0E0; /* Light gray border as requested */
  font-family: 'Poppins', sans-serif;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 4rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.nav-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo-svg {
  height: 64px;
  width: auto;
  display: block;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-item {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-neutral-black);
  text-decoration: none;
  transition: color 0.2s ease;
  cursor: pointer;
}

.nav-item:hover {
  color: var(--color-primary);
}

.nav-divider {
  color: var(--color-light-gray);
  font-size: 16px;
  user-select: none;
}

.nav-socials {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-say-hi {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gray);
}

.social-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--color-neutral-black);
  transition: color 0.2s ease, transform 0.2s ease;
  text-decoration: none;
}

.social-icon-link:hover {
  color: var(--color-primary);
  transform: scale(1.1);
}

.social-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

span.material-symbols-outlined.social-icon {
  font-size: 22px;
  line-height: 1;
}

/* Filled icon variant */
span.material-symbols-outlined.icon-filled {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}


/* Projects Section (Simpler 4-column Table) */
.project-table {
  background-color: transparent;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-row {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1.5fr 2fr 1fr 48px;
  gap: 16px;
  align-items: center;
  padding: 24px;
  border-radius: 12px;
  background-color: transparent;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: background-color 0.2s ease;
}

.project-row:hover {
  background-color: var(--color-surface-hover);
}

.project-col {
  opacity: 1;
}

.project-title-col h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-neutral-black);
}

.project-desc-col p {
  font-size: var(--font-size-body);
  color: var(--color-gray);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-thumbnail {
  position: relative;
  width: 56px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
}

.project-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-tags-col {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media(max-width: 768px) {
  .project-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Explorations Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 154px;
  gap: 16px;
  width: 100%;
}

.bento-tile {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  contain: paint;
}

.bento-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.bento-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}

.bento-tile:hover .bento-bg {
  transform: scale(1.05);
}

.bento-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  pointer-events: none;
}

.bento-content h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Bento Sizes for a perfect square/rectangle with 4 items */
/* Grid is 4 columns wide. 
   Item 1: 2x2 (large square on left)
   Item 2: 2x1 (wide rectangle top right)
   Item 3: 1x1 (small square bottom right 1)
   Item 4: 1x1 (small square bottom right 2)
   Total: forms a 4x2 perfect rectangle.
*/
.bento-large { grid-column: span 2; grid-row: span 2; }
.bento-tall { grid-column: span 2; grid-row: span 1; } /* I called this bento-tall in JS, let's just make it span 2 cols, 1 row (wide) */
.bento-wide { grid-column: span 1; grid-row: span 1; } /* square */
.bento-square { grid-column: span 1; grid-row: span 1; } /* square */

@media(max-width: 768px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
  }
  .bento-large, .bento-tall, .bento-wide, .bento-square {
    grid-column: span 1;
    grid-row: span 1;
  }
}


/* ==========================================================================
   Case Study Page Styles
   ========================================================================== */

.case-study-page {
  background-color: var(--color-bg);
  min-height: 100vh;
}

.cs-back-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.cs-container {
  max-width: none;
  margin: 0 auto;
  padding: 100px 80px 64px 80px; /* 80px margin on both sides */
}

/* 3-Column Grid Layout (2 Rows: Row 1 = Back & Header; Row 2 = Nav & Body Content & Notes) */
.cs-layout {
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  gap: 40px 24px;
  padding: 120px 48px 80px 48px; /* 48px margin on left & right sides */
  max-width: 1600px;
  margin: 0 auto;
  align-items: start;
  width: 100%;
}

/* Row 1 & 2 Sticky Column 1 Elements */
.cs-back-wrapper {
  padding-top: 4px; /* Perfectly aligns with top edge of Title */
}

.case-study-sidebar {
  grid-column: 1;
  grid-row: 1 / span 2;
  position: sticky;
  top: 110px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-self: start;
}

.cs-content {
  grid-column: 2;
  grid-row: 2;
  font-family: var(--font-body);
  color: var(--color-neutral-black);
  line-height: 1.7;
  font-size: var(--font-size-body);
  max-width: 100%;
}

.case-study-notes {
  grid-column: 3;
  grid-row: 2;
  position: sticky;
  top: 100px;
  font-size: var(--font-size-notes);
  color: var(--color-gray);
}

/* Header Typography */
.cs-title {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-neutral-black);
  margin: 0 0 16px 0;
  line-height: 1.15;
}

.cs-subtitle {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-dark-gray);
  line-height: 1.6;
  margin: 0 0 24px 0;
}

.cs-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cs-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cs-tags .morph-tag {
  font-size: 14px;
  padding: 4px 10px;
}

.cs-time {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  color: var(--color-gray);
  font-weight: 500;
  font-size: 14px;
}

.cs-duration-text {
  font-size: 14px;
}

/* Back Icon Button — exact morph button style */
.cs-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: var(--color-surface-hover);
  color: var(--color-neutral-black);
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.cs-back-btn:hover {
  background-color: var(--color-surface-hover-dark);
  transform: translateX(-2px);
}

/* Navigation Pane Typography (16px) */

.cs-nav {
  margin-top: 0;
  padding-top: 0;
}

.cs-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cs-nav li:first-child a {
  padding-top: 4px; /* Optical cap-height alignment with 24px H2 */
}

.cs-nav a {
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--color-gray);
  font-weight: 500;
  line-height: 1.2;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cs-nav a:hover {
  color: var(--color-rust);
}

.cs-nav a.active {
  color: var(--color-rust);
  font-weight: 600;
}

.cs-nav a.active::before {
  content: "";
  display: block;
  width: 4px;
  height: 16px;
  background-color: var(--color-rust);
  border-radius: 4px;
  margin-left: -12px;
}

/* Main Content Typography */
.cs-content {
  grid-column: 2;
  grid-row: 2;
  font-family: var(--font-body);
  color: var(--color-neutral-black);
  line-height: 1.7;
  font-size: 16px;
  max-width: 100%;
  margin-top: 0;
  padding-top: 0;
}

.cs-content h1 {
  font-family: var(--font-heading);
  font-size: 32px;
  color: var(--color-neutral-black);
  margin: 40px 0 20px 0;
}

.cs-content h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-neutral-black);
  margin: 0 0 20px 0;
  line-height: 1.2;
}

.cs-content h2:first-child,
.cs-body-content h2:first-child,
.cs-body-content section:first-child h2:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.cs-content h2:not(:first-child) {
  margin-top: 48px;
}

.cs-content h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-neutral-black);
  margin: 32px 0 16px 0;
}

/* Right Notes Panel Typography */
.case-study-notes {
  grid-column: 3;
  grid-row: 2;
  position: sticky;
  top: 100px;
  font-size: 14px;
  color: var(--color-gray);
  margin-top: 0;
  padding-top: 0;
}

.cs-notes-block {
  margin-top: 0;
  padding-top: 0;
}

.cs-notes-heading {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-neutral-black);
  line-height: 1.2;
  margin: 0 0 12px 0;
  padding-top: 4px; /* Optical cap-height alignment with 24px H2 */
}

.cs-notes-item {
  font-family: var(--font-body);
  font-size: var(--font-size-notes);
  color: var(--color-gray);
  line-height: 1.5;
  margin: 0 0 8px 0;
}

.cs-content p, .cs-body-content p {
  font-size: var(--font-size-body);
  line-height: 1.7;
  color: var(--color-neutral-black);
  margin-bottom: 20px;
}

.cs-content img, .cs-body-content img, .cs-content iframe, .cs-content video {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block;
  border-radius: 0 !important;
  margin: 24px 0;
}

.cs-content ul, .cs-content ol {
  font-size: var(--font-size-body);
  line-height: 1.7;
  margin-bottom: 20px;
  padding-left: 24px;
}

.cs-content li {
  margin-bottom: 6px;
}

.cs-caption, .cs-content figcaption {
  font-size: 12px;
  font-style: italic;
  color: var(--color-gray);
  text-align: center;
  margin-top: -12px;
  margin-bottom: 28px;
  display: block;
}

/* Notes Column */
.cs-notes {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-gray);
}

@media(max-width: 1100px) {
  .cs-layout {
    grid-template-columns: 240px 1fr;
    gap: 40px;
  }
  .cs-col-right {
    display: none;
  }
}

@media(max-width: 768px) {
  .cs-container {
    padding: 80px 24px;
  }
  .cs-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 24px;
  }
  .cs-col-left, .cs-col-main {
    grid-column: 1;
  }
  
  .cs-row-header, .cs-row-body {
    grid-row: auto;
  }
  
  .cs-row-header {
    margin-bottom: 0;
  }
  
  .cs-header {
    margin-bottom: 32px;
  }
  
  .cs-sidebar {
    position: static;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 24px;
  }
  
  .cs-nav ul {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-top: 0;
  }
  
  .cs-nav a {
    white-space: nowrap;
  }
}

/* ==========================================================================
   About Me Page Styles (Reduced Spacing)
   ========================================================================== */

.about-page {
  background-color: var(--color-bg);
}

.about-main {
  padding-bottom: 64px;
}

.about-grid {
  display: grid;
  gap: 36px;
  max-width: 1000px;
}

/* Hero Section */
.about-hero {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 32px;
  align-items: center;
}

.about-hero .section-header {
  padding: 0;
  margin-bottom: 16px;
}

.about-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-gray);
  font-weight: 500;
}

.meta-item .material-symbols-outlined {
  color: var(--color-rust);
  font-size: 20px;
}

.about-desc {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 16px;
}

.about-hero-image img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

/* Interests Grid */
.about-interests {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 16px;
  padding-top: 24px;
}

.interest-block {
  display: flex;
  flex-direction: column;
}

.interest-photo {
  width: 100%;
  background-color: var(--color-surface);
  margin-bottom: 16px;
  border-radius: 16px;
  object-fit: cover;
}

/* Make them randomly shaped via different aspect ratios / heights */
.shape-1 { aspect-ratio: 16 / 9; }
.shape-2 { aspect-ratio: 4 / 3; }
.shape-3 { aspect-ratio: 1 / 1; }
.shape-4 { aspect-ratio: 3 / 4; }

.interest-block h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--color-neutral-black);
  margin-bottom: 12px;
}

.interest-block p {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: 1.6;
  color: var(--color-text);
  margin-bottom: 8px;
}

.inline-link {
  color: var(--color-rust);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-bottom 0.2s ease;
}

.inline-link:hover {
  border-bottom-color: var(--color-rust);
}

/* Let's Connect Block */
.about-connect {
  margin-top: 24px;
  padding-top: 32px;
}

.connect-title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  color: var(--color-neutral-black);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.connect-desc {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text);
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.connect-icons {
  display: flex;
  gap: 32px;
  align-items: center;
}

/* Connect ripple buttons â€” match cta-button ripple style, rust border */
.connect-ripple-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1.5px solid var(--color-rust);
  background: transparent;
  color: var(--color-rust);
  font-size: 32px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.connect-ripple-btn:hover {
  background-color: rgba(216, 69, 0, 0.08);
  transform: translateY(-2px);
}

@media(max-width: 768px) {
  .about-hero {
    grid-template-columns: 1fr;
  }
  .about-hero-image {
    order: -1;
  }
  .about-interests {
    grid-template-columns: 1fr;
  }
  .connect-title {
    font-size: 40px;
  }
}

/* Scroll Progress Bar */
.scroll-progress-wrapper {
  position: fixed;
  bottom: 40px;
  left: 40px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.scroll-progress-wrapper.visible {
  opacity: 1;
}

.scroll-progress-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--color-gray);
}

.scroll-progress-container {
  position: relative;
  width: 64px;
  height: 4px;
  background-color: rgba(182, 79, 42, 0.15); /* Translucent token rust track */
  border-radius: 4px;
  overflow: hidden;
}

.scroll-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background-color: var(--color-primary); /* Token rust (#B64F2A) */
  border-radius: 4px;
  transition: width 0.15s ease-out;
}

.cs-meta {
  display: flex;
  gap: 32px;
  align-items: center;
  margin-top: 24px;
  margin-bottom: 48px;
  font-size: 14px;
  color: var(--color-dark-gray);
}

.cs-tags {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cs-time {
  display: flex;
  gap: 4px;
  align-items: center;
}

/* ==========================================================================
   About Me Swiper Slider & Google Material Animate-Opacity
   ========================================================================== */
.about-interests-swiper {
  width: 100%;
  padding-bottom: 48px !important;
}

.about-interests-swiper .swiper-slide {
  height: auto;
  display: flex;
}

.swiper-slide-content {
  width: 100%;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 32px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-sizing: border-box;
}

.swiper-material-animate-opacity {
  opacity: 0.7;
  transform: scale(0.98);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.swiper-slide-active .swiper-material-animate-opacity,
.swiper-slide-duplicate-active .swiper-material-animate-opacity {
  opacity: 1;
  transform: scale(1.0);
}

.swiper-slide-text h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--color-neutral-black);
  margin-bottom: 12px;
}

.swiper-slide-text p {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-dark-gray);
  margin-bottom: 8px;
}

.about-interests-swiper .swiper-button-next,
.about-interests-swiper .swiper-button-prev {
  color: var(--color-rust);
  width: 40px;
  height: 40px;
  background: #FFFFFF;
  border: 1px solid var(--color-rust);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.about-interests-swiper .swiper-button-next::after,
.about-interests-swiper .swiper-button-prev::after {
  font-size: 16px;
  font-weight: bold;
}

.about-interests-swiper .swiper-pagination-bullet-active {
  background-color: var(--color-rust);
}


/* ==========================================================================
   Hero Wave Background
   Rendered inside SVG directly after background rect (behind cat & text).
   Teal accent at 10% opacity, two layers at different speeds/offsets.
   ========================================================================== */

.hero-wave-path {
  will-change: transform;
  pointer-events: none;
}

.hero-wave-back {
  animation: hero-wave-scroll-back 22s linear infinite;
}

.hero-wave-front {
  animation: hero-wave-scroll-front 14s linear infinite;
}

@keyframes hero-wave-scroll-back {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-1920px);
  }
}

@keyframes hero-wave-scroll-front {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(1920px);
  }
}


/* ==========================================================================
   Extended Button & Dialog Box Component (Motion Dev UI Style)
   ========================================================================== */

/* Extended Button Trigger */
.extended-btn-wrapper {
  width: 100%;
}

.extended-btn-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background-color: var(--color-surface);
  border: 1px solid rgba(28, 33, 35, 0.10);
  border-radius: 16px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.extended-btn-trigger:hover {
  background-color: #FFFFFF;
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(182, 79, 42, 0.08);
}

.extended-btn-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.extended-btn-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background-color: rgba(182, 79, 42, 0.08);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.extended-btn-trigger:hover .extended-btn-icon-badge {
  transform: scale(1.08);
  background-color: var(--color-primary);
  color: #FFFFFF;
}

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

.extended-btn-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-gray);
}

.extended-btn-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-neutral-black);
}

.extended-btn-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  background-color: var(--color-surface-hover);
  color: var(--color-neutral-black);
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.extended-btn-trigger:hover .extended-btn-action {
  background-color: var(--color-primary);
  color: #FFFFFF;
}

.extended-btn-action-icon {
  font-size: 16px !important;
  transition: transform 0.2s ease;
}

.extended-btn-trigger:hover .extended-btn-action-icon {
  transform: scale(1.15);
}


/* Dialog Box Component Overlay & Container */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.50);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.dialog-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dialog-container {
  width: 100%;
  max-width: 960px;
  max-height: 88vh;
  background: #FFFFFF;
  border-radius: 24px;
  box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.20), 0 0 0 1px rgba(28, 33, 35, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.94) translateY(12px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dialog-overlay.active .dialog-container {
  transform: scale(1) translateY(0);
}

/* Dialog Header */
.dialog-header {
  padding: 24px 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(28, 33, 35, 0.08);
  background: #FFFFFF;
  position: relative;
  z-index: 10;
}

.dialog-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dialog-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  background-color: rgba(182, 79, 42, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  align-self: flex-start;
}

.dialog-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-neutral-black);
  margin: 4px 0 0 0;
  line-height: 1.3;
}

.dialog-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background-color: var(--color-surface-hover);
  color: var(--color-gray);
  font-size: 18px;
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.dialog-close-btn:hover {
  background-color: var(--color-surface-hover-dark);
  color: var(--color-neutral-black);
}

/* Dialog Body (Scrollable Window) */
.dialog-body {
  padding: 32px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 40px;
  background-color: var(--color-bg);
}

.dialog-section-block {
  background-color: #FFFFFF;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(28, 33, 35, 0.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.dialog-section-header {
  margin-bottom: 20px;
}

.dialog-section-badge {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-neutral-black);
  background-color: rgba(28, 33, 35, 0.05);
  padding: 6px 14px;
  border-radius: 8px;
  display: inline-block;
}

.dialog-img-wrapper {
  width: 100%;
}

.dialog-img-wrapper img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

