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

:root {
  --black: #000000;
  --off-black: #060606;
  --dark: #0c0c0c;
  --surface: #141414;
  --border: rgba(255,255,255,0.06);
  --white: #ffffff;
  --white-60: rgba(255,255,255,0.6);
  --white-30: rgba(255,255,255,0.3);
  --white-10: rgba(255,255,255,0.06);
  --accent: #6e6bff;          /* single, muted accent */
  --font: 'Inter', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

html { font-size: 16px; }

body, a, button, select, input, textarea, [role="button"], .sdot {
  cursor: none !important;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
}

/* ===== CURSOR ===== */
.cursor {
  position: fixed;
  width: 8px; height: 8px;
  background: var(--white);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%,-50%);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), background 0.25s;
  mix-blend-mode: difference;
}
body.cursor-hover .cursor {
  width: 40px; height: 40px;
}

/* Hide custom cursor and restore standard cursor feedback on touch devices and small screens */
@media (hover: none), (pointer: coarse), (max-width: 1024px) {
  .cursor {
    display: none !important;
  }
  body {
    cursor: auto !important;
  }
  a, button, select, [role="button"], .sdot {
    cursor: pointer !important;
  }
}

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 48px;
  transition: padding 0.4s var(--ease), color 0.4s var(--ease);
}
.nav.compact { padding: 20px 48px; }
.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
  transition: color 0.5s var(--ease);
}
.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--white-60);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.5s var(--ease);
}
.nav-link:hover { color: var(--white); }

/* Nav dot track (progress indicator) */
.nav-dot-track {
  width: 80px;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  transition: background-color 0.5s var(--ease);
}
.nav-dot-indicator {
  height: 100%;
  background: var(--white);
  border-radius: 2px;
  transition: width 0.5s var(--ease-out), background-color 0.5s var(--ease);
  width: 0%;
}

/* Light Theme Navigation overrides (when active section is light background) */
.nav.light-theme .nav-logo {
  color: var(--black);
}
.nav.light-theme .nav-link {
  color: rgba(0, 0, 0, 0.45);
}
.nav.light-theme .nav-link:hover {
  color: var(--black);
}
.nav.light-theme .nav-dot-track {
  background: rgba(0, 0, 0, 0.08);
}
.nav.light-theme .nav-dot-indicator {
  background: var(--black);
}

/* ===== SECTION DOTS ===== */
.section-dots {
  position: fixed;
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sdot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--white-30);
  border: none;
  cursor: pointer;
  transition: all 0.35s var(--ease), background-color 0.5s var(--ease);
  padding: 0;
}
.sdot.active {
  background: var(--white);
  height: 22px;
  border-radius: 3px;
}
.sdot:hover { background: var(--white-60); }

/* Light Theme Section Dots overrides */
.section-dots.light-theme .sdot {
  background: rgba(0, 0, 0, 0.25);
}
.section-dots.light-theme .sdot.active {
  background: var(--black);
}
.section-dots.light-theme .sdot:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* ===== SCROLL CONTAINER & TRACK ===== */
.scroll-container {
  width: 100%;
}

/* Desktop: custom scroll effects */
@media (min-width: 1025px) {
  body { overflow: hidden; }
  .scroll-container { height: 100vh; overflow: hidden; }
}

/* Mobile & Tablet: standard scrolling */
@media (max-width: 1024px) {
  .scroll-container {
    height: auto;
    overflow: visible;
  }
  .scroll-track {
    transform: none !important;
    transition: none !important;
  }
  .section {
    height: auto !important;
    min-height: 100vh;
    display: block !important;
    overflow: visible !important;
    padding-top: 80px;
    padding-bottom: 60px;
    z-index: 1;
  }
  
  /* Disable background elements on mobile to prevent clipping/layering issues */
  .section-canvas,
  .section-bg-glow {
    display: none !important;
  }
  
  .section::before, .section::after {
    display: none !important;
  }
}

.scroll-track {
  width: 100%;
  transition: transform 1.4s cubic-bezier(0.65, 0, 0.15, 1);
  will-change: transform;
}

/* ===== SECTION BASE ===== */
.section {
  height: 100vh;
  width: 100%;
  position: relative;
  display: flex; /* Desktop */
  align-items: center;
  overflow: hidden;
  z-index: 1;
}

@media (max-width: 1024px) {
  .section {
    display: block !important; /* Mobile */
  }
}
.section-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Fade blend between sections */
.section::before,
.section::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 180px;
  z-index: 0;
  pointer-events: none;
}
.section::before {
  top: 0;
  background: linear-gradient(to bottom, var(--section-bg, var(--black)), transparent);
}
.section::after {
  bottom: 0;
  background: linear-gradient(to top, var(--section-bg, var(--black)), transparent);
}

/* Connected Parallax Background Glows */
.section-bg-glow {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(calc((var(--current-index, 0) - var(--section-index)) * 25vh));
  transition: transform 1.4s cubic-bezier(0.65, 0, 0.15, 1);
  will-change: transform;
}
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  will-change: transform;
  opacity: 0.85;
}

/* Section Blob Coordinates & Colors (Monochrome Grayscale theme with subtle color bleed in team) */
.blob-hero-1 {
  width: 700px; height: 700px;
  background: rgba(255, 255, 255, 0.05);
  top: -15%; left: 10%;
}
.blob-hero-2 {
  width: 600px; height: 600px;
  background: rgba(255, 255, 255, 0.03);
  bottom: 5%; right: 15%;
}

.blob-services-1 {
  width: 900px; height: 900px;
  background: rgba(255, 255, 255, 0.95);
  top: -20%; right: -10%;
  filter: blur(100px);
}
.blob-services-2 {
  width: 700px; height: 700px;
  background: rgba(0, 0, 0, 0.025);
  bottom: -10%; left: 5%;
  filter: blur(120px);
}

.blob-team-1 {
  width: 800px; height: 800px;
  background: rgba(255, 255, 255, 0.03);
  top: -10%; left: -10%;
}
.blob-team-2 {
  width: 600px; height: 600px;
  background: rgba(110, 107, 255, 0.035); /* extremely soft violet glow bleed */
  bottom: 10%; right: 10%;
}

.blob-contact-1 {
  width: 800px; height: 800px;
  background: rgba(255, 255, 255, 0.04);
  top: -20%; left: 20%;
}
.blob-contact-2 {
  width: 600px; height: 600px;
  background: rgba(255, 255, 255, 0.02);
  bottom: -10%; right: 5%;
}

/* ===== ANIMATION SYSTEM ===== */
.anim-child {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.section.active .anim-child {
  opacity: 1;
  transform: translateY(0);
}

.section.active .anim-child:nth-child(1) { transition-delay: 0.1s; }
.section.active .anim-child:nth-child(2) { transition-delay: 0.2s; }
.section.active .anim-child:nth-child(3) { transition-delay: 0.3s; }
.section.active .anim-child:nth-child(4) { transition-delay: 0.4s; }
.section.active .anim-child:nth-child(5) { transition-delay: 0.5s; }
.section.active .anim-child:nth-child(6) { transition-delay: 0.6s; }

/* ===== LABEL ===== */
.label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--white-30);
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* ===== HERO ===== */
.s-hero {
  --section-bg: #000000;
  background-color: #000000;
  background-image: linear-gradient(to bottom,
    rgba(250, 250, 250, 0) 0%,
    rgba(250, 250, 250, 0) 72%,
    rgba(250, 250, 250, 0.01) 78%,
    rgba(250, 250, 250, 0.04) 84%,
    rgba(250, 250, 250, 0.12) 90%,
    rgba(250, 250, 250, 0.28) 95%,
    rgba(250, 250, 250, 0.52) 98%,
    rgba(250, 250, 250, 0.80) 99.3%,
    rgba(250, 250, 250, 1) 100%
  );
  justify-content: center;
}
.s-hero::after {
  display: none !important;
}

/* Adjust stats color in Hero to match the light-gradient bottom */
.s-hero .hstat strong {
  color: var(--white);
}
.s-hero .hstat span {
  color: var(--white-60);
}

.hero-body {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--white-30);
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero-name {
  font-size: clamp(6rem, 16vw, 16rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--white);
}
.hero-name .accent { color: var(--accent); }
.hero-sub {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--white-60);
  margin-top: 28px;
  letter-spacing: -0.01em;
}
.hero-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 60px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--white-30);
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: var(--white-30);
  animation: scrollDown 2s ease-in-out infinite;
}
@keyframes scrollDown {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* Hero stats */
.hero-stats {
  position: absolute;
  bottom: 48px;
  left: 0; right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 80px;
}
.hstat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.hstat strong {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}
.hstat span {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--white-30);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ===== HERO ACTIONS & CTA ===== */
.hero-actions {
  margin-top: 36px;
}
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  color: var(--black);
  padding: 16px 32px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.25s;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.cta-button:hover {
  transform: translateY(-2px);
  background: #f0f0f0;
}
.cta-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.25s var(--ease);
}
.cta-button:hover .cta-arrow {
  transform: translateX(4px);
}

/* ===== SERVICES SECTION (INTERACTIVE TABS LAYOUT) ===== */
.s-services {
  --section-bg: #fafafa;
  --section-text: #050505;
  --section-text-muted: rgba(5, 5, 5, 0.65);
  --section-text-subtle: rgba(5, 5, 5, 0.35);
  --panel-bg: rgba(0, 0, 0, 0.015);
  --panel-border: rgba(0, 0, 0, 0.05);
  --panel-shadow: 0 30px 60px rgba(0, 0, 0, 0.04);
  --tag-bg: rgba(0, 0, 0, 0.03);
  --tag-border: rgba(0, 0, 0, 0.06);
  --tag-text: rgba(0, 0, 0, 0.5);

  background-color: #fafafa;
  background-image: linear-gradient(to bottom,
    rgba(26, 26, 26, 0) 0%,
    rgba(26, 26, 26, 0) 65%,
    rgba(26, 26, 26, 0.01) 75%,
    rgba(26, 26, 26, 0.04) 83%,
    rgba(26, 26, 26, 0.12) 90%,
    rgba(26, 26, 26, 0.28) 95%,
    rgba(26, 26, 26, 0.52) 98%,
    rgba(26, 26, 26, 0.80) 99.5%,
    rgba(26, 26, 26, 1) 100%
  );
  justify-content: center;
}

.s-services::before,
.s-services::after {
  display: none !important;
}

.s-services .label {
  color: var(--section-text-subtle);
}
.s-services .sn-num {
  color: var(--section-text-subtle);
}
.s-services .sn-title {
  color: var(--section-text);
}
.s-services .services-nav-note {
  color: var(--section-text-subtle);
}
.s-services .services-panel {
  background: var(--panel-bg);
  border-color: var(--panel-border);
  box-shadow: var(--panel-shadow);
}
.s-services .sp-title {
  color: var(--section-text);
}
.s-services .sp-desc {
  color: var(--section-text-muted);
}
.s-services .sp-tags span {
  background: var(--tag-bg);
  border-color: var(--tag-border);
  color: var(--tag-text);
}
.services-interactive-body {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1600px; /* increased to allow more width */
  padding: 0 6vw;
  display: grid;
  grid-template-columns: 4fr 6fr; /* shifted from 1:1 to 40/60 split */
  gap: 6vw;
  align-items: center;
}
.services-left-nav {
  display: flex;
  flex-direction: column;
}
.services-nav-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
}
.services-nav-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  cursor: pointer;
  opacity: 0.15;
  transform: translateX(0);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.services-nav-item.active {
  opacity: 1;
  transform: translateX(16px);
}
.sn-num {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--white-30);
  font-weight: 500;
  transition: color 0.3s;
}
.services-nav-item.active .sn-num {
  color: var(--accent);
}
.sn-title {
  font-size: clamp(3rem, 6vw, 6rem); /* slightly refined clamp */
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--white);
  transition: color 0.3s var(--ease);
}
.services-nav-note {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--white-30);
  margin-top: 48px;
  letter-spacing: 0.02em;
}

.services-right-display {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.services-display-wrapper {
  position: relative;
  height: 420px; /* increased height for larger text */
  width: 100%;
}
.services-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 56px; /* increased padding */
  border-radius: 20px; /* smoother corners */
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.25);
}
.services-panel.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.sp-subheader {
  font-family: var(--mono);
  font-size: 0.8rem; /* slightly larger */
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 20px;
  text-transform: uppercase;
}
.sp-title {
  font-size: 2.2rem; /* significantly larger */
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.sp-desc {
  font-size: 1.1rem; /* larger description */
  color: var(--white-60);
  line-height: 1.7;
  margin-bottom: 32px;
}
.sp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sp-tags span {
  font-family: var(--mono);
  font-size: 0.75rem; /* larger tags */
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}




/* ===== TEAM SECTION ===== */
.s-team {
  --section-bg: #1a1a1a;
  background-color: #1a1a1a;
  background-image: linear-gradient(to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0) 65%,
    rgba(0, 0, 0, 0.01) 75%,
    rgba(0, 0, 0, 0.04) 83%,
    rgba(0, 0, 0, 0.12) 90%,
    rgba(0, 0, 0, 0.28) 95%,
    rgba(0, 0, 0, 0.52) 98%,
    rgba(0, 0, 0, 0.80) 99.5%,
    rgba(0, 0, 0, 1) 100%
  );
  justify-content: center;
}
.s-team::before,
.s-team::after {
  display: none !important;
}
.team-body {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1550px;
  padding: 0 4vw;
  margin: 0 auto;
}
.team-header {
  margin-bottom: 48px;
}
.team-title {
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--white);
}
.team-title .accent {
  color: var(--accent);
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* --- Card --- */
.member-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Index badge */
.mc-index {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 5;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: 0.05em;
  transition: all 0.4s var(--ease);
}
.member-card:hover .mc-index {
  color: var(--white);
  background: rgba(110, 107, 255, 0.35);
  border-color: rgba(110, 107, 255, 0.4);
}

/* Photo */
.mc-photo-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}
.mc-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.5s var(--ease);
  filter: brightness(0.85) saturate(0.9);
}
.member-card:hover .mc-photo {
  transform: scale(1.08);
  filter: brightness(0.65) saturate(1.1);
}

/* Gradient overlay */
.mc-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.5) 40%,
    rgba(0, 0, 0, 0) 70%
  );
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}
.member-card:hover .mc-overlay {
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.6) 50%,
    rgba(0, 0, 0, 0.1) 80%
  );
}

/* Info container */
.mc-info {
  position: relative;
  z-index: 3;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mc-meta {
  transition: transform 0.5s var(--ease);
}
.member-card:hover .mc-meta {
  transform: translateY(-8px);
}
.mc-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
  color: var(--white);
}
.mc-role {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* Detail: tech tags + social links (slides up on hover) */
.mc-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease), opacity 0.4s var(--ease), margin-top 0.5s var(--ease);
  margin-top: 0;
}
.member-card:hover .mc-detail {
  max-height: 120px;
  opacity: 1;
  margin-top: 14px;
}
.mc-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mc-tech span {
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 3px 9px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.02em;
}

/* Social icon links */
.mc-links {
  display: flex;
  gap: 10px;
}
.mc-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: all 0.3s var(--ease);
}
.mc-links a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
}
.mc-links a svg {
  width: 15px;
  height: 15px;
}

/* Staggered card entrance animations */
.team-grid .member-card:nth-child(1) { transition-delay: 0.15s; }
.team-grid .member-card:nth-child(2) { transition-delay: 0.25s; }
.team-grid .member-card:nth-child(3) { transition-delay: 0.35s; }
.team-grid .member-card:nth-child(4) { transition-delay: 0.45s; }

/* ===== BLOG SECTION ===== */
.s-blog {
  --section-bg: #000000;
  background-color: #000000;
  background-image: linear-gradient(to bottom,
    rgba(5, 5, 5, 0) 0%,
    rgba(5, 5, 5, 0) 65%,
    rgba(5, 5, 5, 0.01) 75%,
    rgba(5, 5, 5, 0.04) 83%,
    rgba(5, 5, 5, 0.12) 90%,
    rgba(5, 5, 5, 0.28) 95%,
    rgba(5, 5, 5, 0.52) 98%,
    rgba(5, 5, 5, 0.80) 99.5%,
    rgba(5, 5, 5, 1) 100%
  );
  justify-content: center;
}
.s-blog::before,
.s-blog::after {
  display: none !important;
}

.blog-body {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1550px; /* matched team-body */
  padding: 0 4vw;   /* matched team-body */
  margin: 0 auto;
}
.blog-header {
  margin-bottom: 48px;
  display: flex;
  justify-content: space-between; /* Split title (left) and button (right) */
  align-items: flex-end; /* Align to the bottom of the title */
}
.blog-header-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.blog-view-all {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 30px;
  transition: all 0.3s var(--ease);
  margin-bottom: 5px; /* Slight lift for visual balance */
}
.blog-view-all:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}
.blog-view-all svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s;
}
.blog-view-all:hover svg {
  transform: translateX(3px);
}
.blog-title {
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--white);
}
.blog-title .accent {
  color: var(--accent);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* --- Card Styles (Harmonized with Team) --- */
.blog-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 2 / 3; /* matching team card ratio */
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* RESTORED to bottom-align */
  background: #0a0a0a;
  border: none;
  transition: all 0.4s var(--ease);
}

/* Index badge matching team mc-index */
.bc-index {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 5;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: 0.05em;
  transition: all 0.4s var(--ease);
}
.blog-card:hover .bc-index {
  color: var(--white);
  background: rgba(110, 107, 255, 0.35);
  border-color: rgba(110, 107, 255, 0.4);
}

.bc-thumbnail {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}
.bc-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.5s var(--ease);
  filter: brightness(0.8) saturate(0.9);
}
.blog-card:hover .bc-thumbnail img {
  transform: scale(1.08);
  filter: brightness(0.6) saturate(1.1);
}

.bc-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(45deg, #0a0a0a, #1a1a1a);
}

/* Gradient overlay RESTORED to bottom-to-top */
.blog-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.5) 40%,
    rgba(0, 0, 0, 0) 70%
  );
  transition: background 0.5s var(--ease);
  pointer-events: none;
}
.blog-card:hover::after {
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.98) 0%,
    rgba(0, 0, 0, 0.6) 50%,
    rgba(0, 0, 0, 0.1) 80%
  );
}

.bc-content {
  position: relative;
  z-index: 3;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
  transition: transform 0.5s var(--ease);
}
.blog-card:hover .bc-content {
  transform: translateY(-8px);
}

.bc-date {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.bc-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.bc-excerpt {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease), opacity 0.4s var(--ease), margin-top 0.5s var(--ease);
  margin-top: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.blog-card:hover .bc-excerpt {
  max-height: 100px;
  opacity: 1;
  margin-top: 14px;
}

.bc-link {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s var(--ease);
  transition-delay: 0.1s;
}
.blog-card:hover .bc-link {
  opacity: 1;
  transform: translateY(0);
}
.bc-link:hover {
  color: var(--accent);
}
.bc-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s;
}
.bc-link:hover svg {
  transform: translate(2px, -2px);
}

@media (max-width: 1400px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .blog-card {
    aspect-ratio: 3 / 4;
  }
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .blog-card {
    aspect-ratio: 2 / 2.5;
  }
  .bc-excerpt, .bc-link {
    max-height: 100px;
    opacity: 1;
    margin-top: 10px;
    transform: none;
  }
}

/* ===== CONTACT SECTION ===== */
.s-contact {
  --section-bg: #050505;
  background-color: #050505;
  background-image: linear-gradient(to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0) 65%,
    rgba(0, 0, 0, 0.01) 75%,
    rgba(0, 0, 0, 0.04) 83%,
    rgba(0, 0, 0, 0.12) 90%,
    rgba(0, 0, 0, 0.28) 95%,
    rgba(0, 0, 0, 0.52) 98%,
    rgba(0, 0, 0, 0.80) 99.5%,
    rgba(0, 0, 0, 1) 100%
  );
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.s-contact::before,
.s-contact::after {
  display: none !important;
}
.contact-body {
  position: relative;
  z-index: 2;
  padding: 0 8vw;
  max-width: 1200px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact-heading {
  font-size: clamp(2.5rem, 5.5vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 48px;
  color: var(--white);
}
.contact-options {
  display: flex;
  gap: 24px;
  margin-bottom: 48px;
  width: 100%;
  max-width: 700px;
}
.contact-link {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 24px 32px;
  border-radius: 12px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.3s var(--ease);
}
.contact-link span {
  font-size: 0.8rem;
  color: var(--white-30);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.contact-link strong {
  font-size: 1.3rem;
  color: var(--white);
  letter-spacing: -0.01em;
  transition: color 0.2s;
}
.contact-link:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}
.contact-link:hover strong {
  color: var(--accent);
}
.contact-note {
  font-size: 0.95rem;
  color: var(--white-60);
  font-weight: 400;
  letter-spacing: 0.01em;
  max-width: 600px;
  line-height: 1.6;
}

/* Footer */
.footer {
  position: absolute;
  bottom: 40px;
  left: 80px; right: 80px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--white-30);
  letter-spacing: 0.05em;
  z-index: 2;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .services-interactive-body {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 120px 48px 60px;
    height: auto;
    max-width: 900px;
  }
  .services-display-wrapper {
    height: auto;
    min-height: 350px;
  }
  .services-panel {
    position: relative;
    padding: 32px;
  }
  
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .member-card {
    aspect-ratio: 3 / 4;
  }
}

@media (max-width: 960px) {
  .services-nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
  }
  .services-nav-item {
    opacity: 0.3;
    gap: 8px;
  }
  .services-nav-item.active {
    transform: none;
    opacity: 1;
  }
  .sn-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
  }
  .sn-num {
    font-size: 0.8rem;
  }
  .services-nav-note {
    text-align: center;
    margin-top: 20px;
  }
  .services-panel {
    display: none;
    transform: translateY(10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  }
  .services-panel.active {
    display: flex;
  }

  .blog-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}


@media (max-width: 768px) {
  .nav { padding: 20px 24px; }
  .nav.compact { padding: 16px 24px; }
  .nav-links { display: none; }

  /* Section shared mobile padding */
  .services-interactive-body,
  .team-body,
  .blog-body,
  .contact-body {
    padding: 80px 24px 40px;
  }

  /* Services Mobile */
  .s-services { height: auto; min-height: auto; }
  .sp-title { font-size: 1.6rem; }
  .sp-desc { font-size: 0.95rem; }

  /* Team Mobile */
  .s-team { height: auto; min-height: auto; }
  .team-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 400px;
    margin: 0 auto;
  }
  .member-card {
    aspect-ratio: 3 / 4;
  }
  /* Team mobile: details hidden by default, shown on tap */
  .mc-detail {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
  }
  .member-card.tapped .mc-detail {
    max-height: 150px;
    opacity: 1;
    margin-top: 14px;
  }
  .member-card.tapped .mc-meta { transform: translateY(-8px); }
  .mc-name { font-size: 1.1rem; }

  /* Blog Mobile */
  .s-blog { height: auto; min-height: auto; }
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 400px;
    margin: 0 auto;
  }
  .blog-card { aspect-ratio: 3 / 4; }
  .bc-excerpt, .bc-link {
    max-height: 150px;
    opacity: 1;
    margin-top: 14px;
    transform: none;
  }
  .bc-title { font-size: 1.2rem; }

  /* Contact Mobile */
  .s-contact {
    height: auto;
    min-height: auto;
    justify-content: flex-start;
    padding-top: 80px;
  }
  .contact-heading { font-size: 2rem; margin-bottom: 32px; }
  .contact-options {
    flex-direction: column;
    gap: 16px;
  }
  .contact-link strong { font-size: 1.1rem; }
  
  .footer {
    position: static;
    margin-top: 40px;
    padding: 20px 24px;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    text-align: center;
    border-top: 1px solid var(--border);
  }
  
  .hero-stats { gap: 20px; flex-wrap: wrap; bottom: 20px; }
  .hstat strong { font-size: 1.5rem; }
  .section-dots { display: none; }
}



/* ===== MOBILE RESPONSIVE FIXES ===== */

/* Mobile: anim-child always visible (no section.active needed) */
@media (max-width: 1024px) {
  .anim-child {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: none !important;
  }
  
  /* Nav mobile hamburger menu */
  .nav {
    padding: 16px 20px;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
  }
  .nav.compact { padding: 14px 20px; }
  .nav.light-theme {
    background: rgba(250,250,250,0.9);
  }

  /* Hamburger button */
  .nav-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
    z-index: 300;
  }
  .nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.3s var(--ease);
  }
  .nav.light-theme .nav-hamburger span {
    background: var(--black);
  }
  .nav-hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .nav-hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Mobile menu overlay */
  .nav-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 250;
    background: rgba(0,0,0,0.96);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
  }
  .nav-mobile-overlay.open {
    display: flex;
  }
  .nav-mobile-overlay .nav-link {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white-60);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color 0.2s;
  }
  .nav-mobile-overlay .nav-link:hover {
    color: var(--white);
  }
  .nav-dot-track { display: none; }

  /* Hero mobile */
  .s-hero {
    min-height: 100svh;
    padding-top: 0;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .hero-body {
    padding: 0 24px;
    padding-top: 80px;
  }
  .hero-name {
    font-size: clamp(4rem, 22vw, 7rem);
  }
  .hero-sub {
    font-size: 0.95rem;
    max-width: 340px;
    margin-top: 20px;
  }
  .hero-tag { margin-bottom: 18px; }
  .hero-actions { margin-top: 28px; }
  .hero-scroll { margin-top: 36px; }
  .hero-stats {
    position: relative;
    bottom: auto;
    padding: 32px 24px 48px;
    gap: 32px;
  }
  .hstat strong { font-size: 2rem; }

  /* Services mobile */
  .s-services {
    background: #fafafa;
    padding-top: 0;
    height: auto !important;
    min-height: 100svh;
  }
  .services-interactive-body {
    display: flex !important;
    flex-direction: column;
    padding: 80px 20px 60px;
    gap: 32px;
    height: auto;
  }
  .services-nav-list {
    flex-direction: column !important;
    gap: 8px;
    margin-top: 20px;
  }
  .services-nav-item {
    opacity: 0.25;
    transform: none !important;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: opacity 0.3s var(--ease);
  }
  .services-nav-item:last-child { border-bottom: none; }
  .services-nav-item.active {
    opacity: 1;
    transform: translateX(8px) !important;
  }
  .sn-title {
    font-size: clamp(2rem, 9vw, 3.5rem) !important;
  }
  .services-display-wrapper {
    height: auto;
    min-height: 280px;
    position: relative;
  }
  .services-panel {
    position: relative !important;
    inset: auto !important;
    padding: 28px 24px;
    border-radius: 16px;
    display: none !important;
  }
  .services-panel.active {
    display: flex !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .sp-title { font-size: 1.5rem; }
  .sp-desc { font-size: 0.9rem; line-height: 1.65; }
  .services-nav-note { display: none; }

  /* Team mobile */
  .s-team {
    height: auto !important;
    min-height: auto;
    padding-top: 0;
  }
  .team-body {
    padding: 80px 20px 60px !important;
  }
  .team-header { margin-bottom: 32px; }
  .team-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px;
    max-width: 100% !important;
  }
  .member-card {
    aspect-ratio: 2 / 3;
    border-radius: 12px;
  }
  .mc-detail {
    max-height: 0 !important;
    opacity: 0 !important;
    margin-top: 0 !important;
  }
  .member-card.tapped .mc-detail {
    max-height: 120px !important;
    opacity: 1 !important;
    margin-top: 10px !important;
  }
  .member-card.tapped .mc-meta { transform: translateY(-6px); }
  .mc-name { font-size: 0.95rem; }
  .mc-role { font-size: 0.7rem; }
  .mc-tech span { font-size: 0.6rem; padding: 2px 7px; }
  .mc-links a { width: 28px; height: 28px; }
  .mc-links a svg { width: 13px; height: 13px; }
  .mc-info { padding: 16px; }

  /* Blog mobile */
  .s-blog {
    height: auto !important;
    min-height: auto;
  }
  .blog-body {
    padding: 80px 20px 60px !important;
  }
  .blog-header { margin-bottom: 28px; }
  .blog-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
    max-width: 100% !important;
  }
  .blog-card {
    aspect-ratio: 16 / 10 !important;
    border-radius: 12px;
  }
  .bc-excerpt {
    max-height: 80px !important;
    opacity: 1 !important;
    margin-top: 8px !important;
    transform: none !important;
    -webkit-line-clamp: 2;
  }
  .bc-link {
    opacity: 1 !important;
    transform: none !important;
    margin-top: 10px;
  }
  .bc-title { font-size: 1.1rem; }

  /* Contact mobile */
  .s-contact {
    height: auto !important;
    min-height: 100svh;
    justify-content: center !important;
    padding-top: 0;
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
  }
  .contact-body {
    padding: 80px 20px 40px !important;
    width: 100%;
  }
  .contact-heading {
    font-size: clamp(1.8rem, 8vw, 3rem);
    margin-bottom: 28px;
  }
  .contact-options {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 100%;
  }
  .contact-link {
    padding: 20px 24px;
    border-radius: 12px;
  }
  .contact-link strong { font-size: 1.1rem; }
  .contact-note {
    font-size: 0.85rem;
    margin-top: 8px;
  }
  .footer {
    position: static;
    margin-top: 40px;
    padding: 20px;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
    border-top: 1px solid var(--border);
    left: auto; right: auto;
    bottom: auto;
  }

  /* Section dots hidden on mobile */
  .section-dots { display: none; }
}

/* Small phones */
@media (max-width: 400px) {
  .hero-name { font-size: clamp(3.5rem, 20vw, 5rem); }
  .team-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }
  .mc-name { font-size: 0.85rem; }
}