/* ==========================================================================
   VLADISLAV SHOLOKHOV — LEAD AI ENGINEER & ARCHITECT
   PORTFOLIO & PRODUCTION CASE STUDIES DESIGN SYSTEM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

:root {
  /* Color Palette - Deep Obsidian & Luxury Tech */
  --bg-main: #07090e;
  --bg-surface: #0e121b;
  --bg-surface-elevated: #151b27;
  --bg-surface-card: rgba(18, 24, 38, 0.75);
  --bg-glass: rgba(15, 20, 32, 0.65);
  --bg-glass-hover: rgba(25, 33, 52, 0.85);

  /* Accents */
  --accent-gold: #e5b869;
  --accent-gold-glow: rgba(229, 184, 105, 0.25);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.2);
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.25);
  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.25);

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-active: rgba(229, 184, 105, 0.4);
  --border-glow: rgba(255, 255, 255, 0.16);

  /* Typography */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', -apple-system, BlinkMacSystemFont, 'SF Mono', monospace;

  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;
  --text-gold: #f3cf7a;

  /* Shadows & Blurs */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, 0.7);
  --shadow-glow-gold: 0 0 35px -5px rgba(229, 184, 105, 0.3);
  --shadow-glow-cyan: 0 0 35px -5px rgba(6, 182, 212, 0.25);
  --blur-card: blur(16px);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --container-max: 1320px;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: var(--bg-main);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background Ambient Lighting & Canvas */
#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 1;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  transition: var(--transition-smooth);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(7, 9, 14, 0.7);
  border-bottom: 1px solid var(--border-subtle);
}

.site-header.scrolled {
  background: rgba(7, 9, 14, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  height: 64px;
}

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

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e5b869 0%, #d4972e 100%);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 0 20px rgba(229, 184, 105, 0.35);
  transition: var(--transition-fast);
}

.logo-wrap:hover .logo-mark {
  transform: rotate(6deg) scale(1.05);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-sub {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link span {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-gold);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-actions .btn {
  height: 38px;
  padding: 0 16px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  line-height: 1;
}

.nav-actions .btn-icon {
  width: 38px;
  height: 38px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-actions .btn-telegram {
  padding: 0 14px;
}

.nav-actions .btn-primary {
  padding: 0 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: linear-gradient(135deg, #e5b869 0%, #cca24f 100%);
  color: #0b0d14;
  box-shadow: 0 4px 20px rgba(229, 184, 105, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(229, 184, 105, 0.45);
  background: linear-gradient(135deg, #f0c578 0%, #d8ac57 100%);
}

.btn-secondary {
  background: var(--bg-surface-card);
  color: var(--text-primary);
  border-color: var(--border-subtle);
  backdrop-filter: var(--blur-card);
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.btn-telegram {
  background: rgba(36, 161, 222, 0.12);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

.btn-telegram:hover {
  background: rgba(36, 161, 222, 0.25);
  border-color: #38bdf8;
  transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

/* Mobile Dropdown */
.mobile-menu-drawer {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  background: #0d121c;
  border-bottom: 1px solid var(--border-subtle);
  padding: 24px;
  flex-direction: column;
  gap: 16px;
  z-index: 99;
}

.mobile-menu-drawer.open {
  display: flex;
}

/* ==========================================================================
   HERO SECTION (Editorial Noir & High-End Style)
   ========================================================================== */
.hero-section {
  padding-top: calc(var(--header-height) + 50px);
  padding-bottom: 70px;
  position: relative;
  overflow: hidden;
}

.hero-backdrop-text {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-heading);
  font-size: clamp(4rem, 13vw, 13rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  background: rgba(229, 184, 105, 0.08);
  border: 1px solid rgba(229, 184, 105, 0.2);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 4.2vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 24px;
}

.hero-title .text-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 40%, #e5b869 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.12rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 580px;
}

.hero-description strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-meta-strip {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.meta-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
}

.meta-item-text {
  font-size: 0.82rem;
  line-height: 1.3;
}

.meta-item-text strong {
  display: block;
  color: var(--text-primary);
}

.meta-item-text span {
  color: var(--text-muted);
}

/* Portrait Card (Dymas Alfin & Ethan Mercer style blend) */
.hero-portrait-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.portrait-frame {
  position: relative;
  width: 100%;
  max-width: 420px;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, #182030 0%, #0c1018 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 50px -10px rgba(229, 184, 105, 0.15);
  transition: var(--transition-smooth);
}

.portrait-frame:hover {
  border-color: rgba(229, 184, 105, 0.4);
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.9), 0 0 60px -5px rgba(229, 184, 105, 0.25);
}

.portrait-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: contrast(1.05) brightness(0.95);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.portrait-frame:hover .portrait-img {
  transform: scale(1.03);
}

.portrait-overlay-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px 24px 20px;
  background: linear-gradient(180deg, transparent 0%, rgba(7, 9, 14, 0.9) 50%, #07090e 100%);
}

.portrait-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.portrait-role {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Floating Tag Badges on Portrait */
.floating-chip {
  position: absolute;
  background: rgba(14, 18, 27, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  padding: 10px 16px;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 4;
  animation: float-chip 6s ease-in-out infinite;
}

.floating-chip-top {
  top: 24px;
  left: -20px;
  animation-delay: 0s;
}

.floating-chip-bottom {
  bottom: 90px;
  right: -20px;
  animation-delay: 3s;
}

@keyframes float-chip {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.chip-icon-gold {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(229, 184, 105, 0.15);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.chip-icon-emerald {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.chip-content {
  display: flex;
  flex-direction: column;
}

.chip-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.chip-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==========================================================================
   TICKER / MARQUEE (Ref-1 style)
   ========================================================================== */
.ticker-wrap {
  width: 100%;
  overflow: hidden;
  background: #0d111a;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 0;
  position: relative;
}

.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: ticker-anim 35s linear infinite;
  gap: 32px;
}

@keyframes ticker-anim {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  font-weight: 600;
}

.ticker-star {
  color: var(--accent-gold);
  font-size: 0.75rem;
}

/* ==========================================================================
   IMPACT METRICS BAR
   ========================================================================== */
.metrics-section {
  padding: 60px 0;
  position: relative;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1240px) {
  .metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

.metric-card {
  background: var(--bg-surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 22px 18px;
  backdrop-filter: var(--blur-card);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(229, 184, 105, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.16);
  background: var(--bg-glass-hover);
}

.metric-card:hover::before {
  opacity: 1;
}

.metric-val {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 1.55vw, 1.85rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-feature-settings: "tnum" 1, "cv05" 1;
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  word-break: normal;
  overflow-wrap: break-word;
}

.metric-val .gold-accent {
  color: var(--accent-gold);
}

.metric-val .emerald-accent {
  color: var(--accent-emerald);
}

.metric-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.metric-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   SECTION HEADERS
   ========================================================================== */
.section-header-wrap {
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-gold);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 680px;
}

/* ==========================================================================
   CASE STUDIES & FILTERING
   ========================================================================== */
.cases-section {
  padding: 80px 0 100px;
  position: relative;
}

.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.filter-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--bg-surface-elevated);
}

.filter-btn.active {
  background: #ffffff;
  color: #07090e;
  border-color: #ffffff;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
}

.filter-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Case Grid */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 28px;
}

/* Case Card Standard (6 cols) */
.case-card {
  grid-column: span 6;
  background: var(--bg-surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  overflow: hidden;
  backdrop-filter: var(--blur-card);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
}

/* Featured 12-column card */
.case-card.featured {
  grid-column: span 12;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  max-height: 480px;
}

.case-card.featured .case-content {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.case-card.featured .case-media-wrap {
  height: 100%;
  max-height: 480px;
  min-height: 360px;
}

.case-card.span-4 {
  grid-column: span 4;
}

.case-card.text-only-card {
  grid-column: span 6;
  min-height: 290px;
  background: var(--bg-surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
}

.case-card.text-only-card .case-content {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.case-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.case-top-tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent-gold);
  background: rgba(229, 184, 105, 0.08);
  border: 1px solid rgba(229, 184, 105, 0.22);
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .case-card.text-only-card {
    grid-column: span 12;
  }
}

.case-card:hover {
  transform: translateY(-6px);
  border-color: rgba(229, 184, 105, 0.35);
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.8), 0 0 30px -5px rgba(229, 184, 105, 0.15);
}

.case-media-wrap {
  position: relative;
  width: 100%;
  height: 280px;
  max-height: 280px;
  background: #090c14;
  overflow: hidden;
}

/* Single mobile preview (Glows AI) */
.case-media-wrap.contain-media {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.5) 0%, rgba(9, 12, 20, 0.98) 100%);
  padding: 16px;
  height: 280px !important;
  max-height: 280px !important;
  min-height: 280px !important;
  overflow: hidden;
}

.case-media-wrap.contain-media .case-img {
  width: auto !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 248px !important;
  aspect-ratio: 9 / 19.5;
  object-fit: contain !important;
  border-radius: 20px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: transform 0.4s ease;
}

.case-card.featured .case-media-wrap.contain-media {
  height: 100% !important;
  max-height: 480px !important;
  min-height: 360px !important;
  padding: 24px;
}

.case-card.featured .case-media-wrap.contain-media .case-img {
  max-height: 390px !important;
  border-radius: 24px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.case-card:hover .case-media-wrap.contain-media .case-img {
  transform: translateY(-4px) scale(1.03);
}

.case-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.case-card:hover .case-img {
  transform: scale(1.05);
}

/* Multi-screenshot mobile showcase (Matrix & Poker) */
.case-gallery-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 100%;
  padding: 20px 24px;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.5) 0%, rgba(9, 12, 20, 0.98) 100%);
  overflow: hidden;
  position: relative;
}

.case-gallery-item {
  height: 100%;
  max-height: 410px;
  aspect-ratio: 9 / 19.5;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
  background: #000;
  transition: transform 0.4s ease;
}

.case-card:hover .case-gallery-item {
  transform: translateY(-4px);
}

.case-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s ease;
}

.case-card:hover .case-gallery-item img {
  transform: scale(1.04);
}

.gallery-more-badge {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(11, 15, 23, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 5px 12px;
  border-radius: 8px;
  z-index: 3;
  pointer-events: none;
}

.case-badge-pill {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  padding: 5px 12px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  backdrop-filter: blur(10px);
}

.badge-live {
  background: rgba(16, 185, 129, 0.85);
  color: #fff;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.badge-metrics {
  background: rgba(229, 184, 105, 0.88);
  color: #0b0d14;
  box-shadow: 0 0 15px rgba(229, 184, 105, 0.4);
}

.badge-platform {
  background: rgba(14, 165, 233, 0.85);
  color: #fff;
}

.case-content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.case-category {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  font-weight: 600;
}

.case-heading {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.case-arrow-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.case-card:hover .case-arrow-btn {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
  transform: translate(2px, -2px);
}

.case-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 20px;
}

/* Impact Chip on Case Card */
.case-impact-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(229, 184, 105, 0.1);
  border: 1px solid rgba(229, 184, 105, 0.25);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-gold);
  margin-bottom: 20px;
}

.case-stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.stack-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 3px 9px;
  border-radius: 6px;
}

/* ==========================================================================
   PROOF & RECOMMENDATION LETTERS SECTION
   ========================================================================== */
.proof-section {
  padding: 80px 0 100px;
  background: linear-gradient(180deg, transparent 0%, #0b0f17 50%, transparent 100%);
  position: relative;
}

.letters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.letter-card {
  background: var(--bg-surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 16px;
  backdrop-filter: var(--blur-card);
  transition: var(--transition-smooth);
  cursor: pointer;
}

.letter-card:hover {
  transform: translateY(-6px);
  border-color: rgba(229, 184, 105, 0.4);
  box-shadow: var(--shadow-lg), var(--shadow-glow-gold);
}

.letter-thumb-wrap {
  width: 100%;
  height: 240px;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  position: relative;
  margin-bottom: 16px;
  border: 1px solid var(--border-subtle);
}

.letter-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s;
}

.letter-card:hover .letter-thumb-wrap img {
  transform: scale(1.04);
}

.letter-zoom-hint {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 5px;
}

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

.letter-company {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.letter-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.letter-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-gold);
  margin-top: 4px;
}

/* Reviews Grid */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.review-card {
  background: var(--bg-surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 28px;
  backdrop-filter: var(--blur-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.review-score-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-gold);
  background: rgba(229, 184, 105, 0.08);
  border: 1px solid rgba(229, 184, 105, 0.22);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}

.review-text {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 20px;
  font-style: italic;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}

.review-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b, #334155);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent-gold);
  font-family: var(--font-heading);
}

.review-author-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.review-author-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   EXPERTISE & TECH STACK
   ========================================================================== */
.expertise-section {
  padding: 80px 0 100px;
  position: relative;
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.expertise-card {
  background: var(--bg-surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 32px;
  backdrop-filter: var(--blur-card);
  transition: var(--transition-smooth);
}

.expertise-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
}

.expertise-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(229, 184, 105, 0.1);
  border: 1px solid rgba(229, 184, 105, 0.25);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.expertise-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.expertise-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 20px;
}

.expertise-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ==========================================================================
   HOW WE WORK / SERVICE FORMATS
   ========================================================================== */
.formats-section {
  padding: 80px 0 100px;
  background: #080c14;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.formats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.format-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 36px 30px;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  position: relative;
}

.format-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(229, 184, 105, 0.15);
}

.format-number {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 16px;
}

.format-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
}

.format-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.format-timeline {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.format-timeline strong {
  color: var(--text-primary);
}

/* ==========================================================================
   CTA & FOOTER (Ref-2 "HAVE A PROJECT IN MIND?" style)
   ========================================================================== */
.footer-cta-section {
  padding: 100px 0 60px;
  text-align: center;
  position: relative;
}

.cta-box {
  background: linear-gradient(180deg, rgba(20, 26, 40, 0.6) 0%, rgba(10, 14, 22, 0.9) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 36px;
  padding: 70px 36px;
  max-width: 960px;
  margin: 0 auto 60px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(229, 184, 105, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.cta-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.cta-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.social-pills-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.social-pill:hover {
  background: var(--bg-surface-elevated);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.site-footer-bottom {
  padding-top: 30px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ==========================================================================
   MODAL / LIGHTBOX / DRAWER
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 10, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: #0d121c;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  width: 100%;
  max-width: 940px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.9);
  position: relative;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-container {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.modal-content {
  padding: 40px;
}

.modal-image-preview {
  width: 100%;
  max-height: 480px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 28px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Image Gallery in modal */
.modal-gallery-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.modal-thumb {
  width: 100px;
  height: 100px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.modal-thumb.active {
  border-color: var(--accent-gold);
}

.modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Toast Notifications */
.toast-notice {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #10b981;
  color: #000;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition-smooth);
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1160px) {
  .nav-links {
    gap: 18px;
  }
}

@media (max-width: 1040px) {
  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-actions .btn-secondary,
  .nav-actions .btn-telegram {
    display: none;
  }
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

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

  .hero-meta-strip {
    justify-content: center;
  }

  .hero-portrait-wrap {
    order: -1;
  }

  .case-card {
    grid-column: span 12;
  }

  .case-card.featured {
    grid-template-columns: 1fr;
    max-height: unset;
  }

  .case-card.featured .case-media-wrap {
    height: 280px;
    max-height: 280px;
    min-height: 280px;
  }

  .case-card.span-4 {
    grid-column: span 12;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 68px;
  }

  .site-header {
    height: 68px;
  }

  .nav-actions .btn-primary {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .logo-sub {
    display: none;
  }

  .hero-section {
    padding-top: calc(var(--header-height) + 24px);
    padding-bottom: 60px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .floating-chip {
    display: none;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .filter-bar {
    justify-content: flex-start;
    padding-bottom: 8px;
  }

  .filter-btn {
    font-size: 0.8rem;
    padding: 8px 14px;
  }

  .modal-content {
    padding: 24px 16px;
  }

  .modal-container {
    max-height: 92vh;
    border-radius: 18px;
  }

  .cta-box {
    padding: 36px 18px;
  }

  .cta-title {
    font-size: 1.8rem;
  }

  .cta-actions {
    flex-direction: column;
    width: 100%;
  }

  .cta-actions .btn {
    width: 100%;
  }

  .social-pills-row {
    flex-direction: column;
    align-items: stretch;
  }

  .social-pill {
    text-align: center;
    justify-content: center;
  }

  .site-footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
