/* =============================================
   PORTFOLIO — Live Robotics Lab Interface
   Bhavesh Bakshi | Robotics Systems Engineer
   Dark theme, capability-driven, no framework

   Unminified size: ~57KB / ~2990 lines
   TODO: build step mein minify karna hai toh cssnano ya lightningcss use karna
   ============================================= */

/* ── DESIGN TOKENS ── */
:root {
  /* backgrounds - layered depth (brighter surfaces for contrast) */
  --bg-root: #0a0a0a;
  --bg-surface: #151515;
  --bg-elevated: #1e1e1e;
  --bg-hover: #282828;
  --bg-code: #0e0e0e;

  /* text hierarchy (brighter for readability) */
  --text-primary: #f0f0f0;
  --text-secondary: #b0b0b0;
  --text-muted: #6b6b6b;
  --text-inverse: #0a0a0a;

  /* accents per capability */
  --accent: #4a9eff;
  --accent-control: #f59e0b;
  --accent-rl: #4a9eff;
  --accent-hri: #10b981;
  --accent-hw: #f97316;

  /* typography */
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* fluid type scale — mobile pe 12px se neeche nahi jaana chahiye */
  --text-xs: clamp(0.75rem, 1.2vw, 0.8rem);
  --text-sm: clamp(0.8rem, 1.4vw, 0.875rem);
  --text-md: clamp(0.9rem, 1.6vw, 1rem);
  --text-lg: clamp(1.1rem, 2vw, 1.25rem);
  --text-xl: clamp(1.3rem, 2.5vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 3vw, 2rem);
  --text-3xl: clamp(2rem, 4vw, 2.75rem);
  --text-hero: clamp(2.8rem, 6vw, 5rem);

  /* spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-section: clamp(5rem, 10vw, 8rem);
  --content-max: 1200px;
  --content-padding: clamp(1.25rem, 4vw, 2rem);

  /* borders & radius */
  --border-subtle: 1px solid rgba(255, 255, 255, 0.09);
  --border-hover: 1px solid rgba(255, 255, 255, 0.16);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-soft: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.15s;
  --duration-normal: 0.3s;
  --duration-slow: 0.6s;

  /* shadows & glows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.6);
}

/* ── RESET & BASE ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 64px;
  /* mobile pe fixed elements 100vw le lete hain jo scrollbar ignore karte hain — overflow rok do */
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-root);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* neural network background canvas is injected by JS — sits behind everything */

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--duration-fast);
}

a:hover {
  color: #6db3ff;
}

/* keyboard navigation ke liye — focus ring dikhao */
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

img, video {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

::selection {
  background: rgba(74, 158, 255, 0.3);
  color: var(--text-primary);
}

/* ── SKIP LINK ── */
.skip-link {
  position: fixed;
  top: -100%;
  left: var(--space-md);
  /* 44px touch target — accessibility link bhi properly tappable hona chahiye */
  padding: var(--space-sm) var(--space-md);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: var(--text-inverse);
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 9999;
  transition: top var(--duration-fast);
}

.skip-link:focus {
  top: var(--space-md);
}

/* ── SCROLL PROGRESS — page scroll indicator topbar ke upar ── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: 101;
  pointer-events: none;
  transition: width 0.05s linear;
  /* thoda glow bhi de do — dikhna chahiye */
  box-shadow: 0 0 8px rgba(74, 158, 255, 0.4);
}

/* ── TOPBAR ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  height: 56px;
  padding: 0 var(--content-padding);
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: var(--border-subtle);
  transition: background var(--duration-normal), box-shadow var(--duration-normal);
}

.topbar.scrolled {
  background: rgba(17, 17, 17, 0.95);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

.topbar-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-md);
  color: var(--text-primary);
  white-space: nowrap;
  letter-spacing: -0.02em;
  /* touch target — naam pe tap karna easy hona chahiye */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.topbar-name:hover {
  color: var(--text-primary);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-left: auto;
}

.topbar-link {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  /* smoother transition — color, background, shadow, glow sab animate hoga */
  transition: color 0.3s var(--ease-out),
              background 0.3s var(--ease-out),
              box-shadow 0.3s var(--ease-out);
  white-space: nowrap;
  position: relative;
}

.topbar-link:hover {
  color: var(--text-secondary);
  background: var(--bg-hover);
}

.topbar-link.active {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

/* capability accent on active topbar links — glow ke saath premium indicator */
.topbar-link.active[data-capability="real-time-control"] {
  color: var(--accent-control);
  box-shadow: inset 0 -2px 0 var(--accent-control),
              0 2px 8px rgba(245, 158, 11, 0.15);
}
.topbar-link.active[data-capability="learning-systems"] {
  color: var(--accent-rl);
  box-shadow: inset 0 -2px 0 var(--accent-rl),
              0 2px 8px rgba(74, 158, 255, 0.15);
}
.topbar-link.active[data-capability="human-robot-interaction"] {
  color: var(--accent-hri);
  box-shadow: inset 0 -2px 0 var(--accent-hri),
              0 2px 8px rgba(16, 185, 129, 0.15);
}
.topbar-link.active[data-capability="hardware-build"] {
  color: var(--accent-hw);
  box-shadow: inset 0 -2px 0 var(--accent-hw),
              0 2px 8px rgba(249, 115, 22, 0.15);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.topbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* 44px minimum touch target — finger se tap karna easy hoga */
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color var(--duration-fast), background var(--duration-fast);
}

.topbar-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.topbar-btn svg {
  width: 16px;
  height: 16px;
}

.topbar-contact {
  width: auto;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  border: var(--border-subtle);
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

.topbar-contact:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  /* 32px tha — 44px minimum chahiye touch target ke liye (WCAG 2.5.8) */
  width: 44px;
  height: 44px;
  padding: 10px;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: transform var(--duration-normal) var(--ease-out),
              opacity var(--duration-fast);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── SIDEBAR (MOBILE) ── */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal), visibility var(--duration-normal);
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100dvh;
  background: var(--bg-surface);
  border-right: var(--border-subtle);
  z-index: 201;
  transform: translateX(-100%);
  transition: transform var(--duration-normal) var(--ease-out);
  display: flex;
  flex-direction: column;
  padding: var(--space-xl);
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-close {
  align-self: flex-end;
  font-size: 1.5rem;
  color: var(--text-muted);
  /* touch target 44px minimum chahiye — close button easily tap ho sake */
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.sidebar-close:hover {
  color: var(--text-primary);
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex: 1;
}

.sidebar .nav-link {
  /* padding badhaya — 44px touch target milega har link ko */
  padding: var(--space-sm) var(--space-md);
  min-height: 44px;
  display: flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: var(--text-md);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast), background var(--duration-fast);
}

.sidebar .nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.sidebar .nav-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: var(--space-sm) var(--space-md);
  /* 44px minimum touch target */
  min-height: 44px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  transition: background var(--duration-fast), color var(--duration-fast);
}

.sidebar .nav-cta:hover {
  background: var(--accent);
  color: var(--text-inverse);
}

/* ── CONTENT WRAPPER ── */
.content-wrapper {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-padding);
  position: relative;
  z-index: 5;
}

.content-wrapper.hidden {
  display: none;
}

/* ── HERO SECTION ── */
.hero-section {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  min-height: calc(100dvh - 56px);
  padding: var(--space-3xl) 0;
  position: relative;
}

/* dot grid behind hero — thoda zyada visible for premium feel */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}

/* radial accent glow behind hero */
.hero-section::after {
  content: '';
  position: absolute;
  top: 20%;
  left: -10%;
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(74, 158, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-text {
  flex: 1;
  min-width: 0;
  position: relative;
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  background: linear-gradient(
    135deg,
    #ffffff 0%,
    #e0e0e0 25%,
    var(--accent) 50%,
    #e0e0e0 75%,
    #ffffff 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2xl);
}

.hero-subtitle em,
.hero-subtitle .typed-accent {
  font-style: normal;
  color: var(--accent);
}

/* typing cursor animation */
.typing-cursor {
  font-weight: 300;
  color: var(--accent);
  animation: cursor-blink 0.7s step-end infinite;
}

.typing-cursor.blink-out {
  animation: cursor-fade 1s forwards;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes cursor-fade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.hero-ctas {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* hero photo */
.hero-photo-container {
  flex: 0 0 auto;
  width: clamp(160px, 20vw, 240px);
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-surface);
  position: relative;
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.05),
              0 0 80px rgba(74, 158, 255, 0.06);
  transition: border-color 0.5s, box-shadow 0.5s;
}

.hero-photo-container:hover {
  border-color: rgba(74, 158, 255, 0.25);
  box-shadow: 0 20px 64px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(74, 158, 255, 0.15),
              0 0 100px rgba(74, 158, 255, 0.1);
}

.hero-photo-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(15%) brightness(1.05);
  transition: filter 0.5s, transform 0.5s;
}

.hero-photo-container:hover img {
  filter: grayscale(0%) brightness(1.1);
  transform: scale(1.03);
}

/* robot arm canvas — behind hero content, mouse tracked via hero section */
.hero-arm-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-md);
  letter-spacing: 0.02em;
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-inverse);
  border: 1px solid var(--accent);
  box-shadow: 0 0 20px rgba(74, 158, 255, 0.2);
}

.btn-primary:hover {
  background: #3d8ee6;
  border-color: #3d8ee6;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(74, 158, 255, 0.35),
              0 0 40px rgba(74, 158, 255, 0.12);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: var(--border-subtle);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--bg-elevated);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.04);
}

/* premium click feel — satisfying lagta hai */
.btn:active {
  transform: scale(0.97) translateY(0);
  transition-duration: 0.1s;
}

/* keyboard accessibility — focus-visible pe glow dikhao */
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(74, 158, 255, 0.15);
}

.btn-ghost:focus-visible {
  border-color: var(--accent);
}

/* ── SECTION COMMON ── */
/* section labels — typewriter cursor blink for that terminal vibe */
.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: var(--space-md);
  transition: letter-spacing 0.4s var(--ease-out);
}

/* blinking cursor — terminal feel */
.section-label::after {
  content: '|';
  color: var(--accent);
  animation: cursor-blink 1s step-end infinite;
  margin-left: 2px;
  font-weight: 300;
}

/* hover pe letter-spacing thoda spread hota hai — premium micro-interaction */
.section-label:hover {
  letter-spacing: 0.18em;
}

/* ── FLAGSHIP BENTO GRID ── */
.flagships-section {
  padding: var(--space-section) 0;
}

.flagships-section .section-label {
  margin-bottom: var(--space-xl);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.bento-card {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-top: 4px solid var(--card-accent, var(--text-muted));
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--duration-slow) var(--ease-out),
              box-shadow var(--duration-slow) var(--ease-out),
              border-color var(--duration-normal);
  display: flex;
  flex-direction: column;
  outline: none;
  /* always-visible subtle accent glow */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.bento-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.15);
  /* hover pe gradient border effect — premium feel */
  border-image: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2),
    var(--card-accent, rgba(74, 158, 255, 0.3)),
    rgba(255, 255, 255, 0.1)
  ) 1;
  border-top: 4px solid var(--card-accent, var(--text-muted));
}

/* accent glow on hover per capability — STRONGER */
.bento-card[data-capability="real-time-control"] {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(245, 158, 11, 0.06);
}
.bento-card[data-capability="real-time-control"]:hover {
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.1),
              0 0 0 1px rgba(245, 158, 11, 0.18);
}
.bento-card[data-capability="learning-systems"] {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(74, 158, 255, 0.06);
}
.bento-card[data-capability="learning-systems"]:hover {
  box-shadow: 0 12px 32px rgba(74, 158, 255, 0.1),
              0 0 0 1px rgba(74, 158, 255, 0.18);
}
.bento-card[data-capability="human-robot-interaction"] {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(16, 185, 129, 0.06);
}
.bento-card[data-capability="human-robot-interaction"]:hover {
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.1),
              0 0 0 1px rgba(16, 185, 129, 0.18);
}
.bento-card[data-capability="hardware-build"] {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(249, 115, 22, 0.06);
}
.bento-card[data-capability="hardware-build"]:hover {
  box-shadow: 0 12px 32px rgba(249, 115, 22, 0.1),
              0 0 0 1px rgba(249, 115, 22, 0.18);
}

/* hover pe subtle edge highlight — chamakta nahi, bas border glow */
.bento-card:hover::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    var(--card-accent, rgba(74, 158, 255, 0.06)) 0%,
    transparent 40%
  );
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

/* bento card entrance animation */
@keyframes bento-enter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.bento-enter {
  animation: bento-enter 0.6s var(--ease-out) both;
}

.bento-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.bento-card.protected {
  opacity: 0.85;
}

.bento-card.protected .bento-media img,
.bento-card.protected .bento-media video {
  filter: blur(10px) brightness(0.6);
}

.bento-protected-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(4px);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  color: var(--text-muted);
}

.bento-protected-overlay span {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.bento-media {
  height: 220px;
  overflow: hidden;
  background: var(--bg-code);
  position: relative;
}

/* accent gradient overlay on bento media */
.bento-media::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, var(--bg-surface) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.bento-media img,
.bento-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}

.bento-card:hover .bento-media img,
.bento-card:hover .bento-media video {
  transform: scale(1.06);
}

.bento-info {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.bento-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.bento-hero-line {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
}

.bento-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: auto;
  padding-top: var(--space-md);
}

.bento-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  background: var(--bg-elevated);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  border: var(--border-subtle);
  white-space: nowrap;
}

/* colored tags per capability */
.bento-card[data-capability="real-time-control"] .bento-tag {
  color: var(--accent-control);
  border-color: rgba(245, 158, 11, 0.2);
}
.bento-card[data-capability="learning-systems"] .bento-tag {
  color: var(--accent-rl);
  border-color: rgba(74, 158, 255, 0.2);
}
.bento-card[data-capability="human-robot-interaction"] .bento-tag {
  color: var(--accent-hri);
  border-color: rgba(16, 185, 129, 0.2);
}
.bento-card[data-capability="hardware-build"] .bento-tag {
  color: var(--accent-hw);
  border-color: rgba(249, 115, 22, 0.2);
}

/* ── CAPABILITY SECTIONS ── */
.capability-section {
  padding: var(--space-section) 0;
  border-top: var(--border-subtle);
  position: relative;
}

/* gradient divider — sections ke beech mein subtle light line */
.capability-section + .capability-section::after,
.capability-section + .game-standalone::after {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.2), transparent);
  pointer-events: none;
}

/* subtle accent gradient at top of each capability section */
.capability-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  pointer-events: none;
  opacity: 0.4;
}

.capability-section[data-capability="real-time-control"]::before {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.04) 0%, transparent 100%);
}
.capability-section[data-capability="learning-systems"]::before {
  background: linear-gradient(180deg, rgba(74, 158, 255, 0.04) 0%, transparent 100%);
}
.capability-section[data-capability="human-robot-interaction"]::before {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.04) 0%, transparent 100%);
}
.capability-section[data-capability="hardware-build"]::before {
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.04) 0%, transparent 100%);
}

.capability-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.capability-accent-line {
  width: 4px;
  height: 32px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* accent line colors + glow */
.capability-section[data-capability="real-time-control"] .capability-accent-line {
  background: var(--accent-control);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}
.capability-section[data-capability="learning-systems"] .capability-accent-line {
  background: var(--accent-rl);
  box-shadow: 0 0 12px rgba(74, 158, 255, 0.3);
}
.capability-section[data-capability="human-robot-interaction"] .capability-accent-line {
  background: var(--accent-hri);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}
.capability-section[data-capability="hardware-build"] .capability-accent-line {
  background: var(--accent-hw);
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.3);
}

.capability-section-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--text-primary);
}

.capability-desc {
  font-size: var(--text-md);
  color: var(--text-secondary);
  max-width: 700px;
  line-height: 1.7;
  margin-bottom: var(--space-2xl);
}

.capability-projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}

/* ── CAPABILITY PROJECT CARDS ── */
.capability-project-card {
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--duration-normal),
              transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal);
  display: flex;
  flex-direction: column;
  outline: none;
  position: relative;
}

.capability-project-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.capability-project-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.capability-project-card.protected {
  opacity: 0.8;
}

.capability-project-card.protected .cap-card-media img,
.capability-project-card.protected .cap-card-media video {
  filter: blur(10px) brightness(0.6);
}

.cap-card-lock {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  font-family: var(--font-mono);
  /* 0.6rem too small — 0.75rem = 12px minimum for mobile readability */
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.7);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  z-index: 2;
}

.cap-card-media {
  height: 180px;
  overflow: hidden;
  background: var(--bg-code);
}

.cap-card-media img,
.cap-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.capability-project-card:hover .cap-card-media img,
.capability-project-card:hover .cap-card-media video {
  transform: scale(1.04);
}

.cap-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--text-muted);
  background: var(--bg-elevated);
}

.cap-card-body {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.cap-card-badge {
  display: inline-block;
  font-family: var(--font-mono);
  /* 0.6rem = 9.6px bahut chhota tha — 0.75rem = 12px minimum for mobile readability */
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(74, 158, 255, 0.1);
  color: var(--accent);
  border: 1px solid rgba(74, 158, 255, 0.15);
  width: fit-content;
}

.cap-card-badge.ongoing {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-hri);
  border-color: rgba(16, 185, 129, 0.2);
}

.cap-card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.cap-card-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.cap-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.cap-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: var(--border-subtle);
}

/* ── ABOUT SECTION ── */
.about-section {
  padding: var(--space-section) 0;
  border-top: var(--border-subtle);
}

.about-content {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.about-photo {
  width: clamp(180px, 24vw, 280px);
  /* actual image 900x560 hai — 16:10 ratio use karo, square mat karo */
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: var(--border-subtle);
  background: var(--bg-surface);
  box-shadow: var(--shadow-md);
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.about-bio {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-xl);
  max-width: 600px;
}

.about-bio strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ── ANIMATED UNDERLINE — links pe smooth slide-in underline ── */
/* about bio aur capability desc ke links pe lagao */
.about-bio a,
.capability-desc a {
  position: relative;
  text-decoration: none;
  color: var(--accent);
  transition: color 0.3s var(--ease-out);
}

.about-bio a::after,
.capability-desc a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}

.about-bio a:hover::after,
.capability-desc a:hover::after {
  width: 100%;
}

/* tech stack — terminal aesthetic */
.tech-stack {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--bg-code);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  max-width: 500px;
  position: relative;
}

/* terminal window dots */
.tech-stack::before {
  content: '';
  display: block;
  width: 100%;
  height: 12px;
  margin-bottom: var(--space-md);
  background:
    radial-gradient(circle at 8px 6px, #ff5f56 4px, transparent 4px),
    radial-gradient(circle at 24px 6px, #ffbd2e 4px, transparent 4px),
    radial-gradient(circle at 40px 6px, #27c93f 4px, transparent 4px);
  opacity: 0.5;
}

.tech-stack-title {
  color: var(--text-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
}

.tech-stack-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* tech stack items — hover pe shine effect */
.tech-stack-item {
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.tech-stack-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
  transform: scale(1.02);
}

/* shimmer effect — hover pe ek shine guzarti hai */
.tech-stack-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.06) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: none;
}

.tech-stack-item:hover::after {
  transform: translateX(100%);
  transition: transform 0.6s ease;
}

.tech-stack-item::before {
  content: '$ ';
  color: var(--accent-hri);
}

.tech-stack-item strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ── EXPERIENCE SECTION ── */
.experience-section {
  padding: var(--space-section) 0;
  border-top: var(--border-subtle);
}

.experience-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  margin-bottom: var(--space-2xl);
  color: var(--text-primary);
}

/* current role — subtle pulsing glow border for "active" indicator */
.experience-current {
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.experience-current-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.experience-role {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
}

.experience-company {
  font-size: var(--text-md);
  color: var(--text-secondary);
}

.experience-meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: block;
  margin-bottom: var(--space-lg);
}

.experience-achievements {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.experience-achievements li {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: var(--space-lg);
  position: relative;
}

.experience-achievements li::before {
  content: '\2014';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.experience-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-lg);
}

/* tags — hover pe subtle brightness aur scale */
.tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  border: var(--border-subtle);
  white-space: nowrap;
  transition: all var(--duration-normal) var(--ease-out);
}

.tag:hover {
  color: var(--text-secondary);
  background: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.12);
  transform: scale(1.05);
}

/* past roles — timeline feel with left border connecting them */
.experience-past {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  border-left: 2px solid rgba(255, 255, 255, 0.06);
  padding-left: var(--space-lg);
  margin-left: 2px;
}

/* timeline dot — har past role ke aage ek dot */
.experience-past-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  position: relative;
  border-bottom: var(--border-subtle);
  flex-wrap: wrap;
}

.experience-past-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-lg) - 5px);
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.experience-past-role {
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: 500;
}

.experience-past-company {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.experience-past-date {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-left: auto;
}

.experience-education {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding-top: var(--space-md);
}

.experience-education strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ── CONTACT SECTION ── */
.contact-section {
  padding: var(--space-section) 0;
  border-top: var(--border-subtle);
  padding-bottom: var(--space-3xl);
}

.contact-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.contact-status {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent-hri);
  margin-bottom: var(--space-2xl);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.contact-status::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent-hri);
  border-radius: 50%;
  animation: status-pulse 2s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.contact-links {
  display: flex;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

/* contact cards — hover pe subtle lift aur glow */
.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  transition: all var(--duration-normal) var(--ease-out);
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.02);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--duration-normal) var(--ease-out);
}

.contact-icon:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(74, 158, 255, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(74, 158, 255, 0.1);
}

/* brand colors — LinkedIn blue, GitHub white */
.contact-icon[aria-label="LinkedIn"]:hover {
  color: #0a66c2;
  border-color: #0a66c2;
  background: rgba(10, 102, 194, 0.08);
  box-shadow: 0 4px 16px rgba(10, 102, 194, 0.15);
}

.contact-icon[aria-label="GitHub"]:hover {
  color: #f0f0f0;
  border-color: rgba(240, 240, 240, 0.3);
  background: rgba(240, 240, 240, 0.06);
  box-shadow: 0 4px 16px rgba(240, 240, 240, 0.08);
}

.contact-icon svg {
  width: 18px;
  height: 18px;
}

.contact-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-value {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* copy button — click pe color change smooth hona chahiye */
.contact-copy {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  /* padding badhaya touch target ke liye — finger se comfortably tap hona chahiye */
  padding: 8px 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border: var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
}

.contact-copy:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--bg-elevated);
}

/* copied state — green flash for confirmation */
.contact-copy.copied {
  color: var(--accent-hri);
  border-color: var(--accent-hri);
  background: rgba(16, 185, 129, 0.08);
}

/* ── PROJECT DETAIL VIEW ── */
.project-detail-view {
  position: fixed;
  inset: 0;
  background: var(--bg-root);
  z-index: 200;
  overflow-y: auto;
  transform: translateY(12px);
  opacity: 0;
  visibility: hidden;
  transition: transform var(--duration-slow) var(--ease-out),
              opacity var(--duration-normal),
              visibility var(--duration-normal);
}

.project-detail-view.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 10px 20px;
  margin: 0;
  position: sticky;
  top: 0;
  z-index: 10;
  cursor: pointer;
  width: 100%;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(10, 10, 10, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  transition: color var(--duration-fast), gap var(--duration-fast), background var(--duration-fast);
}

.back-btn:hover {
  color: var(--accent);
  gap: var(--space-md);
  background: rgba(10, 10, 10, 0.95);
}

.back-btn svg {
  transition: transform var(--duration-fast);
}

.back-btn:hover svg {
  transform: translateX(-3px);
}

.project-detail {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-padding) var(--space-3xl);
}

/* project detail header */
.project-detail-header {
  margin-bottom: var(--space-2xl);
}

.project-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.project-detail-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
}

.project-detail-oneliner {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
  max-width: 700px;
}

.project-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.project-detail-team {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

.project-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  border: var(--border-subtle);
}

/* ongoing badge */
.ongoing-badge-large {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent-hri);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
}

.ongoing-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-hri);
  border-radius: 50%;
  animation: status-pulse 2s ease-in-out infinite;
}

/* project description */
.project-detail-description {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 800px;
  margin-bottom: var(--space-2xl);
}

.project-detail-description p {
  margin-bottom: var(--space-md);
}

.project-detail-description p:last-child {
  margin-bottom: 0;
}

.project-detail-description strong {
  color: var(--text-primary);
  font-weight: 500;
}

.project-detail-description .tech-list {
  margin: var(--space-sm) 0 var(--space-md) var(--space-lg);
}

.project-detail-description .tech-list li {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: var(--space-sm);
  position: relative;
  list-style: disc;
  margin-bottom: var(--space-xs);
}

/* metrics grid */
.project-metrics-grid {
  display: flex;
  gap: var(--space-xl);
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
  padding: var(--space-lg);
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
}

.project-metric-card {
  text-align: center;
  min-width: 80px;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--accent);
  display: block;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: var(--space-xs);
  display: block;
}

/* gallery */
.project-gallery {
  margin-bottom: var(--space-2xl);
}

.gallery-title,
.video-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-md);
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: var(--border-subtle);
  aspect-ratio: 16 / 10;
  background: var(--bg-surface);
  transition: border-color var(--duration-fast), transform var(--duration-normal);
}

.gallery-item:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: scale(1.02);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* videos */
.project-videos {
  margin-bottom: var(--space-2xl);
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: var(--space-lg);
}

.video-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: var(--border-subtle);
  background: var(--bg-code);
}

.video-container {
  position: relative;
  background: #000;
}

.project-video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  display: block;
  cursor: pointer;
}

.video-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  padding: var(--space-sm) var(--space-md);
}

/* ── TECH DEEP DIVE ── */
.tech-deepdive-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(74, 158, 255, 0.2);
  background: rgba(74, 158, 255, 0.05);
  transition: all var(--duration-fast);
  flex-shrink: 0;
}

.tech-deepdive-btn:hover {
  background: rgba(74, 158, 255, 0.1);
  border-color: rgba(74, 158, 255, 0.3);
}

.tech-deepdive-btn.active {
  background: rgba(74, 158, 255, 0.12);
}

.deepdive-icon {
  font-size: 0.9em;
}

.deepdive-arrow {
  transition: transform var(--duration-normal) var(--ease-out);
}

.tech-deepdive-btn.active .deepdive-arrow {
  transform: rotate(180deg);
}

.tech-deepdive-section {
  margin-top: var(--space-2xl);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s var(--ease-out),
              opacity 0.4s var(--ease-out),
              margin 0.3s;
}

.tech-deepdive-section.expanded {
  max-height: 8000px;
  opacity: 1;
}

.tech-deepdive-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: var(--border-subtle);
}

.tech-deepdive-badge {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(74, 158, 255, 0.1);
  border-radius: var(--radius-sm);
  font-size: 1rem;
}

.deepdive-pulse {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid var(--accent);
}

.tech-deepdive-title h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
}

.tech-deepdive-title p {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

.tech-deepdive-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.tech-section {
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
}

.tech-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.tech-section-number {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  background: rgba(74, 158, 255, 0.1);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.tech-section-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
}

.tech-section-content {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

.tech-section-content p {
  margin-bottom: var(--space-md);
}

.tech-section-content strong {
  color: var(--text-primary);
  font-weight: 500;
}

.tech-section-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-code);
  padding: 2px 6px;
  border-radius: 3px;
}

.code-block {
  background: var(--bg-code);
  border: var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-lg);
  margin: var(--space-md) 0;
  overflow-x: auto;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre;
  background: none;
  padding: 0;
}

/* references */
.tech-references {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: var(--border-subtle);
}

.tech-references h5 {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.reference-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.reference-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  padding: 4px 12px;
  border: var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast);
}

.reference-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal), visibility var(--duration-normal);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  font-size: 1.5rem;
  color: var(--text-secondary);
  z-index: 2;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast), background var(--duration-fast);
}

.lightbox-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.2rem;
  color: var(--text-secondary);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  z-index: 2;
  transition: color var(--duration-fast), background var(--duration-fast);
}

.lightbox-nav:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.lightbox-prev { left: var(--space-lg); }
.lightbox-next { right: var(--space-lg); }

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-counter {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ── PASSWORD MODAL ── */
.pw-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in 0.2s ease-out;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pw-modal-card {
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  max-width: 420px;
  width: 90%;
  text-align: center;
  animation: modal-in 0.3s var(--ease-out);
  box-shadow: var(--shadow-lg);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.pw-modal-icon {
  width: 48px;
  height: 48px;
  background: rgba(74, 158, 255, 0.08);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  color: var(--accent);
}

.pw-modal-icon svg {
  width: 22px;
  height: 22px;
}

.pw-modal-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.pw-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-lg);
}

.pw-modal-card input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--bg-code);
  border: var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  margin-bottom: var(--space-sm);
  transition: border-color var(--duration-fast);
}

.pw-modal-card input[type="password"]:focus {
  border-color: var(--accent);
}

.pw-modal-card input[type="password"]::placeholder {
  color: var(--text-muted);
}

.pw-error {
  font-size: var(--text-xs);
  color: #ef4444;
  margin-bottom: var(--space-md);
  display: none;
}

.pw-modal-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: flex-end;
  margin-top: var(--space-md);
}

.pw-btn-cancel {
  padding: 8px 18px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast);
}

.pw-btn-cancel:hover {
  color: var(--text-primary);
}

.pw-btn-unlock {
  padding: 8px 20px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-inverse);
  background: var(--accent);
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast);
}

.pw-btn-unlock:hover {
  background: #3d8ee6;
}

/* protection settings modal checkbox labels */
.prot-setting-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--duration-fast);
  margin-bottom: 2px;
}

.prot-setting-label:hover {
  background: var(--bg-elevated);
}

.prot-setting-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.prot-setting-name {
  color: var(--text-primary);
  font-size: var(--text-sm);
  flex: 1;
}

.prot-setting-cap {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

/* ── RL TRAINING CURVE VISUALIZER ── */
/* particle swarm RL training sim */
.particle-swarm-container {
  background: var(--bg-surface);
  border: 1px solid rgba(74, 158, 255, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg) var(--space-sm);
  margin-bottom: var(--space-2xl);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(74, 158, 255, 0.05),
              inset 0 1px 0 rgba(74, 158, 255, 0.08);
}

.particle-swarm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.particle-swarm-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.particle-swarm-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--accent-hri);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.15);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.1em;
  animation: status-pulse 2s ease-in-out infinite;
}

.particle-swarm-container canvas {
  width: 100%;
  display: block;
  border-radius: var(--radius-sm);
}

/* media placeholders — projects without thumbnails */
.bento-placeholder,
.cap-card-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: linear-gradient(145deg, var(--bg-code) 0%, var(--bg-elevated) 100%);
  gap: var(--space-sm);
}

.bento-placeholder-icon {
  font-size: 2.5rem;
  opacity: 0.2;
}

.bento-placeholder-text {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.cap-card-placeholder {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: var(--space-lg);
}

/* ── LAB CTA SECTION ── */
.lab-cta-section {
  padding: var(--space-2xl) 0;
}

.lab-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  background: var(--bg-surface);
  border: 1px solid rgba(74, 158, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-2xl);
  box-shadow: 0 0 40px rgba(74, 158, 255, 0.04),
              inset 0 1px 0 rgba(74, 158, 255, 0.06);
}

.lab-cta-inner h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
  margin: var(--space-sm) 0 var(--space-xs);
}

.lab-cta-inner p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 480px;
}

.lab-cta-inner .game-badge {
  display: inline-block;
}

@media (max-width: 640px) {
  .lab-cta-inner {
    flex-direction: column;
    text-align: center;
    padding: var(--space-xl);
  }
}

/* ── GAME CONTAINERS — inner glow + hover polish ── */
.game-container,
.game-standalone {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg) var(--space-sm);
  margin-bottom: var(--space-xl);
  position: relative;
  overflow: visible;
  /* subtle inner glow — canvas border pe halka sa light effect */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04),
              0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s var(--ease-out),
              box-shadow 0.4s var(--ease-out),
              filter 0.4s var(--ease-out);
}

/* hover pe thoda sa uthao aur brightness badhao */
.game-container:hover,
.game-standalone:hover {
  transform: translateY(-2px) scale(1.005);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06),
              0 8px 32px rgba(0, 0, 0, 0.4),
              0 0 40px rgba(74, 158, 255, 0.04);
  filter: brightness(1.03);
}

.game-standalone {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.game-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* game badge — pill shape with subtle glow, premium look */
.game-badge {
  font-family: var(--font-mono);
  /* 0.6rem = 9.6px tha — 0.75rem = 12px minimum for mobile readability */
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-hri);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.15);
  padding: 3px 12px;
  border-radius: 999px;
  letter-spacing: 0.1em;
  animation: status-pulse 2s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.1);
}

/* game description — readable but compact, monospace aesthetic */
.game-desc {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
  max-width: 60ch;
}

/* mobile pe canvas interact karte waqt page scroll nahi hona chahiye */
.game-container canvas,
.game-standalone canvas {
  touch-action: none;
  width: 100%;
  display: block;
  border-radius: var(--radius-sm);
  /* canvas ke border pe subtle inner glow — game feel premium lagega */
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3),
              0 0 1px rgba(255, 255, 255, 0.05);
}

/* game controls — buttons/sliders ko finger-friendly banao (min 44px touch target) */
.game-container button,
.game-container input[type="range"],
.game-standalone button,
.game-standalone input[type="range"] {
  min-height: 44px;
  min-width: 44px;
}

/* game ke andar JS se inline font-size set hoti hai — mobile pe 12px se neeche nahi jaane dena
   sirf wo elements target karo jinpe class nahi hai (JS-generated raw elements) */
@media (max-width: 768px) {
  .game-container button:not([class]),
  .game-container span:not([class]),
  .game-container label:not([class]),
  .game-standalone button:not([class]),
  .game-standalone span:not([class]),
  .game-standalone label:not([class]) {
    font-size: 0.75rem !important;
  }
}

/* particle swarm description */
.particle-swarm-desc {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
  max-width: 60ch;
}

/* ── FLAGSHIPS SECTION LABEL ── */
.flagships-section .section-label::before {
  content: '// ';
  color: var(--text-muted);
}

/* ── BENTO SHINE OVERLAY (3D tilt) ── */
.bento-shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  transition: background 0.2s;
}

/* ── SCROLL REVEAL ── */
/* puraana basic reveal — backward compat ke liye rakh rahe hain */
.scroll-reveal {
  opacity: 0.5;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* staggered reveals — bento cards */
.bento-grid .scroll-reveal:nth-child(1) { transition-delay: 0s; }
.bento-grid .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.bento-grid .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.bento-grid .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }

/* staggered reveals — capability cards */
.capability-projects .scroll-reveal:nth-child(1) { transition-delay: 0s; }
.capability-projects .scroll-reveal:nth-child(2) { transition-delay: 0.12s; }
.capability-projects .scroll-reveal:nth-child(3) { transition-delay: 0.24s; }

/* ── CINEMATIC REVEAL — premium slide-up + fade ── */
/* naya reveal system — Linear/Apple level smooth entrance */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* stagger children — har child 80ms baad aayega, waterfall effect */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 0.4s; }
.reveal-stagger > .reveal:nth-child(7) { transition-delay: 0.48s; }
.reveal-stagger > .reveal:nth-child(8) { transition-delay: 0.56s; }

/* ── TOAST — glassmorphism premium notification ── */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-primary);
  /* glassmorphism — frosted glass feel */
  background: rgba(30, 30, 30, 0.75);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 500;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
              0 0 0 1px rgba(255, 255, 255, 0.04);
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .topbar-nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .topbar-contact {
    display: none;
  }

  .project-title-row {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
    min-height: auto;
    padding: var(--space-2xl) 0;
    /* mobile pe gap thoda kam — photo aur text ke beech zyada gap nahi chahiye */
    gap: var(--space-lg);
  }

  /* mobile pe mono font bahut wide hota hai — body font use karo, wrap hone do */
  .hero-subtitle {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    letter-spacing: 0;
  }

  .hero-photo-container {
    width: clamp(140px, 40vw, 200px);
    order: -1;
  }

  .hero-arm-canvas {
    display: none;
  }

  .hero-ctas {
    justify-content: center;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-media {
    height: 200px;
  }

  .capability-projects {
    grid-template-columns: 1fr;
  }

  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-photo {
    justify-self: center;
  }

  .tech-stack {
    max-width: 100%;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .videos-grid {
    grid-template-columns: 1fr;
  }

  .contact-links {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .experience-past-item {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .experience-past-date {
    margin-left: 0;
  }

  .project-metrics-grid {
    gap: var(--space-lg);
    justify-content: center;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .lightbox-prev { left: var(--space-sm); }
  .lightbox-next { right: var(--space-sm); }
}

@media (max-width: 480px) {
  .bento-media {
    height: 160px;
  }

  .cap-card-media {
    height: 140px;
  }

  .hero-title {
    font-size: clamp(2.2rem, 10vw, 3rem);
  }

  .hero-subtitle {
    /* chhote screens pe bhi 12px se neeche nahi jaana — readability first */
    font-size: clamp(0.75rem, 3vw, 0.9rem);
  }

  /* chhote screens pe topbar mein jagah kam hai — gap tight karo */
  .topbar {
    gap: var(--space-sm);
  }

  .topbar-actions {
    gap: var(--space-xs);
  }

  /* 480px pe lock icon chhupa do — jagah nahi hai topbar mein */
  #protectionSettingsBtn {
    display: none;
  }
}

/* ── PRINT ── */
@media print {
  .topbar,
  .sidebar,
  .sidebar-overlay,
  .lightbox,
  .toast,
  .pw-modal-overlay,
  .back-btn,
  .hero-ctas,
  .contact-copy,
  .topbar-actions,
  .scroll-progress,
  .game-container,
  .game-standalone,
  .hero-arm-canvas,
  .back-to-top,
  .rl-episode-counter {
    display: none !important;
  }

  body {
    background: white;
    color: #111;
  }

  .content-wrapper {
    max-width: 100%;
    padding: 0;
  }

  .hero-section {
    min-height: auto;
    padding: 1rem 0;
  }

  .hero-title {
    font-size: 2rem;
    color: #111;
    /* print pe gradient text nahi chalega — solid color use karo */
    background: none;
    -webkit-text-fill-color: #111;
  }

  /* section borders print pe dikhne chahiye */
  .capability-section,
  .about-section,
  .experience-section,
  .contact-section {
    border-top: 1px solid #ddd;
  }

  /* muted text print pe thoda darker — readability ke liye */
  .experience-meta,
  .contact-label,
  .tag {
    color: #555;
  }

  a {
    color: #111;
  }
}

/* ── SITE FOOTER — social links + copyright ── */
.site-footer {
  text-align: center;
  padding: var(--space-2xl) var(--content-padding) var(--space-xl);
  border-top: var(--border-subtle);
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

/* social links row — horizontal, icon + label */
.footer-links {
  display: flex;
  gap: var(--space-xl);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  transition: color var(--duration-fast), transform var(--duration-fast);
  text-decoration: none;
}

.footer-link svg {
  flex-shrink: 0;
  transition: color var(--duration-fast);
}

/* hover pe accent color + thoda upar uthao */
.footer-link:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

/* copyright text — sabse muted, chota */
.footer-copy {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.03em;
  opacity: 0.7;
}

/* ── SMOOTH IMAGE LOADING — lazy images fade in gracefully ── */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

img[loading="lazy"].loaded,
img.loaded {
  opacity: 1;
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .scroll-reveal,
  .reveal {
    opacity: 1;
    transform: none;
  }

  /* reduced motion mein lazy images seedha dikha do */
  img[loading="lazy"] {
    opacity: 1;
  }
}

/* ── BACK TO TOP BUTTON — floating, bottom-right, fade in/out ── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 90;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: var(--border-subtle);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  /* shuru mein chhupa ke rakho — opacity + translate se fade in karega */
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity var(--duration-normal) var(--ease-out),
    visibility var(--duration-normal),
    transform var(--duration-normal) var(--ease-out),
    background var(--duration-fast),
    color var(--duration-fast),
    border-color var(--duration-fast);
  box-shadow: var(--shadow-md);
}

/* visible class — JS add karega jab 500px scroll ho jaaye */
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* hover pe accent color dikha — consistent dark theme vibe */
.back-to-top:hover {
  background: var(--accent);
  color: var(--text-inverse);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(74, 158, 255, 0.3);
}

/* focus-visible — keyboard users ke liye */
.back-to-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* mobile pe thoda chota aur closer to edge */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
  }
}

/* ── TAB VISIBILITY ── */
.tab-hidden video {
  visibility: hidden;
}
