/* --------------------------------------------------------------------------
   Kiran Immadi - Portfolio Stylesheet
   Aesthetic: Apple & OpenAI Minimalist Black & White Monochrome
   -------------------------------------------------------------------------- */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-handwriting: 'Caveat', cursive;
  --font-mono: 'JetBrains Mono', monospace;

  /* Light Theme (Clean Monochrome & Subtle Zinc) */
  --bg-primary: #ffffff;
  --bg-secondary: #fbfbfd;
  --bg-tertiary: #f4f4f6;
  --text-primary: #121212;
  --text-secondary: #57575d;
  --text-muted: #8c8c93;
  --border-light: #eaeaea;
  --border-medium: #d4d4d8;
  --border-dark: #121212;

  --card-bg: #ffffff;
  --card-border: #e8e8ed;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  --card-shadow-hover: 0 14px 34px rgba(0, 0, 0, 0.08);

  --thumb-bg: #0c0d10;
  --thumb-border: #1f2026;
  --thumb-text: #e5e5e7;

  --preview-bg: #f8f9fc;
  --preview-border: #eaecf2;
  --preview-text: #1e2029;
  --preview-muted: #64748b;
  --preview-inner-bg: #ffffff;
  --preview-inner-border: #e2e8f0;

  --accent-black: #000000;
  --accent-white: #ffffff;
  --badge-green: #10b981;
  --pill-bg: #f4f4f7;
  --pill-active-bg: #000000;
  --pill-active-text: #ffffff;

  --nav-bg: rgba(255, 255, 255, 0.82);
  --nav-border: rgba(0, 0, 0, 0.06);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg-primary: #0a0a0c;
  --bg-secondary: #111215;
  --bg-tertiary: #18191f;
  --text-primary: #f5f5f7;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --border-light: #222329;
  --border-medium: #2e3038;
  --border-dark: #ffffff;

  --card-bg: #121318;
  --card-border: #20222a;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 14px 34px rgba(0, 0, 0, 0.6);

  --thumb-bg: #050608;
  --thumb-border: #1a1b22;
  --thumb-text: #f0f0f4;

  --preview-bg: #14161f;
  --preview-border: #222533;
  --preview-text: #f1f5f9;
  --preview-muted: #8892b0;
  --preview-inner-bg: #1a1d29;
  --preview-inner-border: #2a2e40;

  --accent-black: #ffffff;
  --accent-white: #000000;
  --pill-bg: #1c1d24;
  --pill-active-bg: #ffffff;
  --pill-active-text: #000000;

  --nav-bg: rgba(10, 10, 12, 0.82);
  --nav-border: rgba(255, 255, 255, 0.08);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition-fast), color var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --------------------------------------------------------------------------
   Buttons & Core Components
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent-black);
  color: var(--accent-white);
  border: 1px solid var(--accent-black);
}

.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  border-color: var(--text-primary);
  background-color: var(--bg-tertiary);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 0.65rem 1.4rem;
}

.btn-outline:hover {
  border-color: var(--text-primary);
  background: var(--bg-tertiary);
}

.btn-icon {
  width: 17px;
  height: 17px;
}

.arrow {
  display: inline-block;
  transition: transform var(--transition-fast);
}

.btn:hover .arrow {
  transform: translate(2px, -2px);
}

/* --------------------------------------------------------------------------
   Site Header & Floating Glass Navbar
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: var(--nav-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--nav-border);
  transition: background-color var(--transition-normal);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.2rem;
}

.logo {
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: var(--text-primary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.4rem 0;
}

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

.nav-link.active {
  color: var(--text-primary);
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--text-primary);
  border-radius: 50%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-medium);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

/* Default (Light Mode): show Moon icon to switch to dark */
.sun-icon {
  display: none;
}

.moon-icon {
  display: block;
}

/* Dark Mode: show Sun icon to switch to light */
[data-theme="dark"] .sun-icon {
  display: block;
}

[data-theme="dark"] .moon-icon {
  display: none;
}

.btn-talk {
  padding: 0.55rem 1.25rem;
  font-size: 0.85rem;
  background: var(--accent-black);
  color: var(--accent-white);
  border: 1px solid var(--accent-black);
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   Hero Section - Clean & Minimal Editorial
   -------------------------------------------------------------------------- */
.hero-section {
  min-height: calc(100vh - 4.5rem);
  display: flex;
  align-items: center;
  padding: 3.5rem 0 3rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
  width: 100%;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow-tag,
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #66666e;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}

[data-theme="dark"] .eyebrow-tag,
[data-theme="dark"] .hero-eyebrow {
  color: #8e8e93;
}

.eyebrow-tag .bullet,
.hero-eyebrow .bullet {
  font-size: 0.85rem;
  line-height: 1;
  opacity: 0.7;
}

.hero-title {
  font-size: clamp(2.8rem, 5.2vw, 4.3rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.038em;
  color: var(--text-primary);
  margin-bottom: 1.4rem;
}

.hero-title-muted {
  color: #8e8e93;
  font-weight: 800;
}

[data-theme="dark"] .hero-title-muted {
  color: #71717a;
}

.hero-description {
  font-size: clamp(1.05rem, 1.3vw, 1.18rem);
  line-height: 1.55;
  color: #55555d;
  max-width: 540px;
  margin-bottom: 2.2rem;
  font-weight: 400;
}

[data-theme="dark"] .hero-description {
  color: #a1a1aa;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-bottom: 3.2rem;
  flex-wrap: wrap;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #0071e3;
  color: #ffffff !important;
  padding: 0.82rem 1.85rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.22);
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.btn-hero-primary:hover {
  background-color: #0077ed;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 113, 227, 0.32);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #0071e3 !important;
  padding: 0.82rem 0.8rem;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-hero-secondary:hover {
  color: #005bb5 !important;
  transform: translateX(2px);
}

[data-theme="dark"] .btn-hero-secondary {
  color: #2997ff !important;
}

[data-theme="dark"] .btn-hero-secondary:hover {
  color: #64b5f6 !important;
}

.availability-badge,
.hero-status-line {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.86rem;
  font-weight: 450;
  letter-spacing: 0.01em;
  color: #66666e;
  text-transform: none;
}

[data-theme="dark"] .availability-badge,
[data-theme="dark"] .hero-status-line {
  color: #8e8e93;
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  animation: pulse-dot 2s infinite;
  flex-shrink: 0;
}

.hero-status-line .status-sep {
  margin: 0 0.25rem;
  opacity: 0.6;
}

@keyframes pulse-dot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* Portrait Card Area - Clean Portrait without card frames */
.hero-portrait-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.portrait-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  transition: transform var(--transition-normal);
}

.portrait-card:hover {
  box-shadow: none;
}

.portrait-image-container {
  position: relative;
  width: 100%;
  display: grid;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
  cursor: default;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent),
              linear-gradient(to bottom, transparent, #000 8%, #000 82%, transparent);
  mask-composite: intersect;
}

[data-theme="dark"] .portrait-image-container {
  background: transparent;
  border: none;
}

/* Portrait Theme Switch Visibility */
.dark-portrait {
  opacity: 0;
  visibility: hidden;
  filter: url(#portrait-dark-background);
}

.light-portrait {
  opacity: 1;
  visibility: visible;
  filter: url(#portrait-light-background);
}

[data-theme="dark"] .light-portrait {
  opacity: 0;
  visibility: hidden;
}

[data-theme="dark"] .dark-portrait {
  opacity: 1;
  visibility: visible;
}

.portrait-img {
  position: relative;
  grid-area: 1 / 1;
  width: 100%;
  max-width: 460px;
  height: auto;
  object-fit: contain;
  transition: opacity 0.3s ease, visibility 0.3s ease,
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-user-drag: none;
}

@media (prefers-reduced-motion: reduce) {
  .portrait-img {
    transition: none;
  }
}

.portrait-card:hover .portrait-img,
.portrait-image-container:hover .portrait-img {
  transform: scale(1.02);
}

[data-theme="dark"] .handwritten-note.top-right {
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
/* --------------------------------------------------------------------------
   /* --------------------------------------------------------------------------
   Tech Stack Moving Marquee Line (Real Black Icons from Iconify)
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   Tech Stack Moving Marquee Line (Apple-Grade Glassmorphism & Hardware Accelerated)
   -------------------------------------------------------------------------- */
.tech-marquee-section {
  padding: 3.2rem 0 3.6rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
  transition: background-color var(--transition-normal);
}

.marquee-header-strip {
  margin-bottom: 2rem;
}

.marquee-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.marquee-title-group {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.marquee-label-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-primary);
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-full);
}

.marquee-label-badge .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.7);
  animation: pulse-dot-glow 2s infinite ease-in-out;
}

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

.marquee-headline {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Apple Segmented Control Switcher */
.tech-view-toggle {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  backdrop-filter: blur(12px);
}

[data-theme="dark"] .tech-view-toggle {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.tech-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tech-toggle-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.tech-toggle-btn.active {
  color: var(--text-primary);
  background: var(--bg-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .tech-toggle-btn.active {
  background: #1c1e26;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.marquee-outer-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.tech-marquee-section.grid-mode .marquee-outer-container {
  display: none;
}

/* Edge Fade Masks */
.marquee-fade-gradient {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 160px;
  z-index: 10;
  pointer-events: none;
}

.marquee-fade-gradient.left {
  left: 0;
  background: linear-gradient(to right, var(--bg-secondary) 15%, transparent 100%);
}

.marquee-fade-gradient.right {
  right: 0;
  background: linear-gradient(to left, var(--bg-secondary) 15%, transparent 100%);
}

/* Rows & Tracks - 100% Seamless Loop Math */
.marquee-row {
  display: flex;
  overflow: hidden;
  width: 100%;
  contain: layout paint;
}

.marquee-track {
  display: flex;
  width: max-content;
  user-select: none;
  gap: 0; /* CRITICAL: 0 gap on track so -50% translation matches group padding exactly */
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-right: 1rem; /* CRITICAL: Padding-right matches internal gap for 100% pixel-seamless loop */
  flex-shrink: 0;
}

/* Animations - Hardware accelerated ultra-smooth 60fps continuous movement */
.marquee-row-left .marquee-track {
  animation: marquee-scroll-left 52s linear infinite;
}

.marquee-row-right .marquee-track {
  animation: marquee-scroll-right 52s linear infinite;
}

.marquee-outer-container:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-scroll-left {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes marquee-scroll-right {
  0% {
    transform: translate3d(-50%, 0, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

/* The Apple Glassmorphic Pills */
.tech-marquee-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 1.25rem;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  transform: translateZ(0);
}

.tech-marquee-pill:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  background: #ffffff;
}

[data-theme="dark"] .tech-marquee-pill {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .tech-marquee-pill:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* Crisp Monochrome App Icons */
.marquee-icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  color: #000000;
  fill: #000000;
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .marquee-icon {
  color: #ffffff;
  fill: #ffffff;
}

.tech-marquee-pill:hover .marquee-icon {
  transform: scale(1.2) rotate(-3deg);
}

.tech-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

/* --------------------------------------------------------------------------
   About Me Section
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   About Section (Minimalist Editorial Style)
   -------------------------------------------------------------------------- */
.about-section {
  padding: 6.5rem 0 4.5rem;
  border-top: 1px solid var(--border-light);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 5rem;
  align-items: flex-start;
}

.about-left {
  position: sticky;
  top: 6rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.section-title {
  font-size: 2.5rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.about-lead {
  font-size: 1.28rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  letter-spacing: -0.015em;
}

.about-body {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}

.about-quote-box {
  border-left: 2px solid #38bdf8;
  padding: 0.6rem 0 0.6rem 1.25rem;
  margin: 1.75rem 0 2rem;
}

.about-quote-text {
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--text-primary);
}

.about-meta-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-top: 0.75rem;
}

.about-meta-inline span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.about-meta-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.about-meta-link:hover {
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   How I Build Section (4 Minimalist Pillars)
   -------------------------------------------------------------------------- */
.how-i-build-section {
  padding: 5rem 0 6.5rem;
  border-top: 1px solid var(--border-light);
  background: var(--bg-secondary);
  position: relative;
}

.build-header {
  max-width: 720px;
  margin-bottom: 3.5rem;
}

.build-header .section-lead {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-top: 0.85rem;
}

.build-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.build-column {
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--transition-fast);
}

.build-column:hover {
  transform: translateY(-2px);
}

.build-number {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.build-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
  line-height: 1.3;
}

.build-desc {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

@media (max-width: 1024px) {
  .build-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 2rem;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .about-left {
    position: static;
  }
}

@media (max-width: 640px) {
  .build-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* --------------------------------------------------------------------------
   Projects Section (Matching Reference Image 1)
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   Unified Projects Architecture (Featured Projects & Engineering Archive)
   Single component family: [Number] -> [Preview ABOVE Title] -> [Title] -> [Desc] -> [Tags] -> [Actions]
   -------------------------------------------------------------------------- */
.projects-section {
  padding: 6rem 0;
  border-top: 1px solid var(--border-light);
}

/* Section Headers */
.projects-section-header,
.archive-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2.5rem;
  margin-bottom: 3.2rem;
  flex-wrap: wrap;
}

.header-left,
.archive-header-left {
  max-width: 660px;
}

.section-tag-wrap {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.8rem;
}

.section-tag {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-tag-line {
  display: inline-block;
  width: 48px;
  height: 1.5px;
  background: var(--border-medium);
  opacity: 0.8;
}

.projects-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.archive-title {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.projects-subtitle,
.archive-subtitle {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 620px;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.25rem;
  padding-top: 0.6rem;
}

.editorial-aside-tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.projects-scroll-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  background: var(--accent-black);
  color: var(--accent-white);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.projects-scroll-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  color: var(--accent-white);
}

.projects-scroll-link .arrow {
  transition: transform var(--transition-fast);
  display: inline-block;
}

.projects-scroll-link:hover .arrow {
  transform: translateY(3px);
}

/* Main Projects Section: Same-Size Uniform 2-Column Grid (Apple Design Standard) */
.projects-section {
  padding: 1.8rem 0 3rem;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-light);
  scroll-margin-top: 4.2rem;
}

.projects-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.1rem;
  gap: 1.5rem;
}

.projects-unified-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
  align-items: stretch;
}

/* --------------------------------------------------------------------------
   Zig-Zag Project Cards System (Apple Editorial Standard)
   - White Mode: Project mockups have a sleek DARK VIEW.
   - Dark Mode: Project mockups have a pristine WHITE VIEW.
   - Compact height to ensure at least 3-4 projects fit within the screen viewport.
   -------------------------------------------------------------------------- */

.project-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.28s ease;
  overflow: hidden;
}

/* Zig-Zag: Standard Card (2-Column Grid) */
.project-card.card-standard {
  grid-column: span 1;
  padding: 1.2rem 1.35rem 1rem;
}

/* Zig-Zag: Big Card (Full-Width Across Columns) */
.project-card.card-wide {
  grid-column: 1 / -1;
  padding: 1.25rem 1.65rem 1rem;
}

.project-card.card-wide .card-title {
  font-size: 1.35rem;
}

.project-card.card-wide .card-description {
  max-width: 820px;
  font-size: 0.86rem;
  min-height: auto;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px -8px rgba(0, 0, 0, 0.1);
  border-color: #737373;
}

[data-theme="dark"] .project-card {
  background: #000000;
  border-color: #3a3a3a;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .project-card:hover {
  border-color: #737373;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.5);
}

/* Hierarchy 2: Project Title */
.card-title {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  line-height: 1.22;
}

/* Hierarchy 3: Project Description */
.card-description {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.44;
  margin-bottom: 0.65rem;
  min-height: auto;
}

.project-card.card-wide .card-description {
  min-height: auto;
}

/* Hierarchy 4: Technology Tags (Pill Component) */
.card-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.project-tag {
  height: 24px;
  padding: 0 0.7rem 0 0.65rem;
  border-radius: 9999px;
  background: var(--card-bg);
  border: 1px solid var(--border-medium);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  letter-spacing: 0.01em;
  transition: all var(--transition-fast);
}

[data-theme="dark"] .project-tag {
  background: #000000;
  border-color: #3a3a3a;
  color: #d1d1d1;
}

.project-tag:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-muted);
  color: var(--text-primary);
}

/* Single elegant black variant dot (Minimalist monochrome, no double dot) */
.project-tag .tag-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  background: currentColor;
  opacity: 0.75;
  font-size: 0 !important;
  line-height: 0 !important;
  overflow: hidden;
  text-indent: -9999px;
}

[data-theme="dark"] .project-tag .tag-dot {
  background: #d4d4d8;
  opacity: 0.85;
}

/* Hierarchy 5: Action Link */
.card-action-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.project-action-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.project-action-link:hover {
  color: var(--text-secondary);
}

[data-theme="dark"] .project-action-link:hover {
  color: #ffffff;
}

.project-action-link .arrow {
  transition: transform var(--transition-fast);
  display: inline-block;
}

.project-action-link:hover .arrow {
  transform: translate(3px, -3px);
}

/* Hierarchy 6: Apple-Style Preview Container */
.project-preview-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 0.35rem;
  margin-top: auto;
  position: relative;
}

/* Symbols/Badges: Completely Removed as requested */
.floating-pill-badge {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Apple Mockup Frame:
   - WHITE MODE: DARK VIEW (Dark background, deep drop shadow)
   - DARK MODE: WHITE VIEW (Crisp white surface, clean high-contrast text)
   -------------------------------------------------------------------------- */

/* DEFAULT (WHITE MODE / LIGHT THEME): DARK VIEW */
.apple-ui-mockup-frame {
  position: relative;
  width: 100%;
  max-width: 340px;
  height: 142px;
  background: #0b0e17;
  border: 1px solid #1a2236;
  border-radius: 14px;
  padding: 0.75rem 0.95rem;
  box-shadow: 0 14px 30px -8px rgba(0, 0, 0, 0.4), 0 3px 8px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: all 0.28s ease;
}

.apple-ui-mockup-frame:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px -6px rgba(0, 0, 0, 0.48);
}

/* DARK MODE: WHITE VIEW INVERTED */
[data-theme="dark"] .apple-ui-mockup-frame {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 14px 32px -8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.05) !important;
  color: #0f172a !important;
}

/* --------------------------------------------------------------------------
   Wide Terminal Flow Preview (Card 01 - Exact Match to User Image 2)
   -------------------------------------------------------------------------- */
.wide-terminal-flow {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  width: 100% !important;
  max-width: 680px !important;
  height: auto !important;
  min-height: 135px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0.25rem 0 !important;
}

.mockup-terminal-window {
  width: 275px;
  background: #0d111a;
  border: 1px solid #1e2638;
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 14px 32px -6px rgba(0, 0, 0, 0.4);
  transition: all 0.28s ease;
}

[data-theme="dark"] .mockup-terminal-window {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.12) !important;
}

.terminal-window-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.terminal-dots {
  display: flex;
  gap: 5px;
}

.terminal-url-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #64748b;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: 4px;
}

[data-theme="dark"] .terminal-url-tag {
  background: #e2e8f0 !important;
  color: #475569 !important;
}

.terminal-body-code {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
  line-height: 1.42;
}

.code-line.primary {
  color: #ffffff;
  font-weight: 700;
}

[data-theme="dark"] .code-line.primary {
  color: #0f172a !important;
}

.code-line.success {
  color: #10b981;
  font-weight: 600;
}

[data-theme="dark"] .code-line.success {
  color: #059669 !important;
}

.code-line.info {
  color: #64748b;
}

[data-theme="dark"] .code-line.info {
  color: #2563eb !important;
}

/* Branching Connector SVG Lines */
.flow-connector-lines {
  width: 45px;
  height: 110px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.connector-svg {
  width: 100%;
  height: 100%;
}

.connector-svg path {
  transition: stroke 0.28s ease;
}

[data-theme="dark"] .connector-svg path {
  stroke: #94a3b8 !important;
}

/* Flow Action Pills Column */
.flow-actions-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.flow-action-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #111624;
  border: 1px solid #222b40;
  border-radius: 9999px;
  padding: 5px 13px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
  white-space: nowrap;
  transition: all 0.28s ease;
}

[data-theme="dark"] .flow-action-pill {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06) !important;
}

.flow-action-pill .pill-icon {
  font-size: 0.85rem;
}

.flow-action-pill .pill-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .flow-action-pill .pill-label {
  color: #0f172a !important;
}

/* --------------------------------------------------------------------------
   Card 02: Indian Law AI Assistant (Exact Match to User Image 2)
   -------------------------------------------------------------------------- */
.legal-tabs-row {
  display: flex;
  gap: 6px;
}
.tab-chip {
  font-size: 0.64rem;
  font-weight: 600;
  padding: 2.5px 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  color: #94a3b8;
}
.tab-chip.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
[data-theme="dark"] .tab-chip {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}
[data-theme="dark"] .tab-chip.active {
  background: #0f172a !important;
  color: #ffffff !important;
}
.legal-doc-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 7px;
  width: fit-content;
}
[data-theme="dark"] .legal-doc-pill {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
}
.pdf-red-icon { font-size: 0.85rem; color: #ef4444; }
.pdf-filename {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #f87171;
  font-weight: 600;
}
[data-theme="dark"] .pdf-filename {
  color: #dc2626 !important;
}
.legal-skeleton-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.s-bar {
  height: 3.5px;
  border-radius: 2px;
  background: #1e293b;
}
[data-theme="dark"] .s-bar {
  background: #e2e8f0 !important;
}
.s-bar.w90 { width: 90%; }
.s-bar.w75 { width: 75%; }
.s-bar.w55 { width: 55%; }
.legal-prompt-bubble {
  font-size: 0.68rem;
  padding: 5px 9px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 7px;
  color: #93c5fd;
  font-weight: 500;
}
[data-theme="dark"] .legal-prompt-bubble {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
}
.legal-response-bubble {
  font-size: 0.65rem;
  color: #94a3b8;
  line-height: 1.4;
}
[data-theme="dark"] .legal-response-bubble {
  color: #475569 !important;
}

/* --------------------------------------------------------------------------
   Card 03: QueryAI (Exact Match to User Image 2)
   -------------------------------------------------------------------------- */
.query-prompt-pill {
  font-size: 0.7rem;
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  color: #e2e8f0;
  width: fit-content;
}
[data-theme="dark"] .query-prompt-pill {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
.bubble-icon { margin-right: 3px; font-size: 0.75rem; }
.query-sql-box {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.45;
  color: #e2e8f0;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
}
[data-theme="dark"] .query-sql-box {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
.sql-kw { color: #60a5fa; font-weight: 700; }
[data-theme="dark"] .sql-kw { color: #2563eb !important; }
.sql-fn { color: #c084fc; font-weight: 600; }
[data-theme="dark"] .sql-fn { color: #7c3aed !important; }
.query-3d-chart {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 48px;
  padding: 4px 6px 0;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
}
.bar-3d {
  flex: 1;
  background: linear-gradient(180deg, #38bdf8 0%, #2563eb 55%, #1d4ed8 100%);
  border-radius: 4px 4px 1px 1px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.45);
  transition: height 0.3s ease;
}
.bar-3d.active {
  background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.6);
}

/* --------------------------------------------------------------------------
   Other Project Previews: Dual Theme Support
   -------------------------------------------------------------------------- */

/* Header rows & telemetry */
.mockup-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mockup-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2.5px 8px;
  border-radius: 9999px;
}
.mockup-badge.cyan {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #22d3ee;
}
.mockup-badge.green {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}
[data-theme="dark"] .mockup-badge.cyan {
  background: #ecfeff !important;
  color: #0891b2 !important;
}
[data-theme="dark"] .mockup-badge.green {
  background: #f0fdf4 !important;
  color: #059669 !important;
}
.mockup-telemetry {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: #34d399;
  font-weight: 600;
}
[data-theme="dark"] .mockup-telemetry {
  color: #059669 !important;
}
.mockup-action-center {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0;
}
.instant-tap-trigger {
  padding: 8px 24px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid #38bdf8;
  border-radius: 9999px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.45);
}
.mockup-bottom-meta {
  font-size: 0.64rem;
  color: #64748b;
  text-align: center;
}

/* HealthOS */
.pulse-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.66rem;
  color: #10b981;
  font-weight: 600;
}
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-ring 1.8s infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}
.health-ecg-canvas {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
}
.ecg-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.4));
}
.health-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.health-bpm-large {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}
[data-theme="dark"] .health-bpm-large {
  color: #0f172a !important;
}
.health-bpm-large small {
  font-size: 0.65rem;
  font-weight: 600;
  color: #34d399;
}
.health-sub-metric {
  font-size: 0.64rem;
  color: #64748b;
}

/* Expenses */
.expense-hdr-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  color: #cbd5e1;
}
[data-theme="dark"] .expense-hdr-row {
  color: #0f172a !important;
}
.expense-val-green {
  color: #34d399;
  font-weight: 700;
}
[data-theme="dark"] .expense-val-green {
  color: #059669 !important;
}
.expense-track-bar {
  width: 100%;
  height: 7px;
  background: #1e293b;
  border-radius: 9999px;
  overflow: hidden;
  margin: 4px 0;
}
[data-theme="dark"] .expense-track-bar {
  background: #e2e8f0 !important;
}
.expense-track-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #06b6d4 100%);
  border-radius: 9999px;
}
.expense-category-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cat-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: #94a3b8;
  padding: 2px 0;
}
[data-theme="dark"] .cat-item {
  color: #475569 !important;
}
.cat-item .amt {
  font-family: var(--font-mono);
  color: #e2e8f0;
  font-weight: 600;
}
[data-theme="dark"] .cat-item .amt {
  color: #0f172a !important;
}

/* MCP Server */
.mcp-hub-pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  border-radius: 7px;
  width: fit-content;
}
[data-theme="dark"] .mcp-hub-pill {
  background: #fffbeb !important;
  color: #d97706 !important;
}
.mcp-core-glow { margin-right: 4px; }
.mcp-routing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}
.mcp-card-chip {
  font-size: 0.64rem;
  font-weight: 600;
  padding: 3.5px 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  color: #cbd5e1;
}
[data-theme="dark"] .mcp-card-chip {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
.mcp-footer-status {
  font-size: 0.63rem;
  color: #64748b;
  text-align: center;
}

/* Email Writer */
.email-mock-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: #e2e8f0;
}
[data-theme="dark"] .email-mock-banner {
  color: #0f172a !important;
}
.email-engine-pill {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
  border-radius: 4px;
}
.email-subject-box {
  font-size: 0.66rem;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #cbd5e1;
}
[data-theme="dark"] .email-subject-box {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
.email-subject-box .lbl {
  color: #94a3b8;
  font-weight: 600;
}
.email-snippet-body {
  font-size: 0.64rem;
  color: #94a3b8;
  line-height: 1.4;
  font-style: italic;
}
[data-theme="dark"] .email-snippet-body {
  color: #475569 !important;
}

/* Family Tree */
.tree-root-box {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  color: #e2e8f0;
  width: fit-content;
  margin: 0 auto;
}
[data-theme="dark"] .tree-root-box {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
.avatar-ring { margin-right: 4px; }
.tree-lines-svg-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}
.tree-svg { width: 140px; height: 18px; }
.tree-nodes-row {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.node-pill {
  font-size: 0.64rem;
  font-weight: 600;
  padding: 2.5px 7px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 5px;
  color: #7dd3fc;
}
[data-theme="dark"] .node-pill {
  background: #f0f9ff !important;
  border-color: #bae6fd !important;
  color: #0284c7 !important;
}

/* HomeBuild */
.blueprint-cad-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cad-measure-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #94a3b8;
}
[data-theme="dark"] .cad-measure-tag {
  color: #475569 !important;
}
.cad-estimator-pill {
  font-size: 0.64rem;
  font-weight: 700;
  padding: 2.5px 7px;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.35);
  color: #38bdf8;
  border-radius: 5px;
}
.cad-specs-row {
  font-size: 0.65rem;
  color: #cbd5e1;
  text-align: center;
  padding: 8px 0;
}
[data-theme="dark"] .cad-specs-row {
  color: #0f172a !important;
}
.cad-est-amt {
  font-family: var(--font-mono);
  color: #34d399;
  font-weight: 700;
}
[data-theme="dark"] .cad-est-amt {
  color: #059669 !important;
}

/* Trading */
.trading-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.trading-ticker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: #cbd5e1;
}
[data-theme="dark"] .trading-ticker {
  color: #0f172a !important;
}
.trading-signal-buy {
  font-size: 0.64rem;
  font-weight: 800;
  padding: 2.5px 7px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  border-radius: 5px;
}
.candlestick-chart-row {
  width: 100%;
  height: 44px;
}
.chart-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.4));
}
.trading-footer-stat {
  font-size: 0.64rem;
  color: #64748b;
  text-align: center;
}
.alpha-bold { color: #38bdf8; font-weight: 700; }
[data-theme="dark"] .alpha-bold { color: #2563eb !important; }

/* Sales */
.sales-kpi-bar {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 600;
  color: #cbd5e1;
}
[data-theme="dark"] .sales-kpi-bar {
  color: #0f172a !important;
}
.kpi-growth { color: #34d399; font-weight: 700; }
[data-theme="dark"] .kpi-growth { color: #059669 !important; }
.sales-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 44px;
}
.sales-bar-chart .s-bar {
  flex: 1;
  background: #334155;
  border-radius: 3px 3px 1px 1px;
}
[data-theme="dark"] .sales-bar-chart .s-bar {
  background: #cbd5e1 !important;
}
.sales-bar-chart .s-bar.active {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
}
.sales-footer-meta {
  font-size: 0.63rem;
  color: #64748b;
  text-align: center;
}

/* News */
.news-top-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  color: #cbd5e1;
}
[data-theme="dark"] .news-top-pill {
  color: #0f172a !important;
}
.tts-accent {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  background: rgba(236, 72, 153, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.35);
  color: #f472b6;
  border-radius: 4px;
}
.audio-wave-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 38px;
}
.wb {
  width: 4px;
  background: linear-gradient(180deg, #f472b6 0%, #ec4899 100%);
  border-radius: 9999px;
}
.wb.h1 { height: 12px; }
.wb.h2 { height: 20px; }
.wb.h3 { height: 28px; }
.wb.h4 { height: 34px; }
.news-brief-text {
  font-size: 0.63rem;
  color: #94a3b8;
  text-align: center;
}
[data-theme="dark"] .news-brief-text {
  color: #475569 !important;
}

/* Sonar */
.sonar-screen {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 0;
}
.sonar-rings {
  position: relative;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.s-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(16, 185, 129, 0.35);
}
.s-ring.r1 { width: 44px; height: 44px; }
.s-ring.r2 { width: 26px; height: 26px; }
.s-blip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}
.sonar-info-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sonar-target {
  font-size: 0.7rem;
  font-weight: 700;
  color: #e2e8f0;
}
[data-theme="dark"] .sonar-target {
  color: #0f172a !important;
}
.sonar-pct {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #34d399;
}
[data-theme="dark"] .sonar-pct {
  color: #059669 !important;
}

/* CCTV */
.cctv-quad-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rec-red-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.64rem;
  font-weight: 800;
  color: #ef4444;
}
.rec-red-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}
.cctv-cam-label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: #94a3b8;
}
[data-theme="dark"] .cctv-cam-label {
  color: #475569 !important;
}
.cctv-preview-box {
  height: 46px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
[data-theme="dark"] .cctv-preview-box {
  border-color: #cbd5e1 !important;
}
.motion-detect-box {
  font-size: 0.65rem;
  font-weight: 600;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  padding: 3px 8px;
  border-radius: 4px;
}
.cctv-cloud-meta {
  font-size: 0.62rem;
  color: #64748b;
  text-align: center;
}

/* CCTV Proto */
.vision-target-box {
  height: 52px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
[data-theme="dark"] .vision-target-box {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
.yolo-bbox {
  border: 1.5px solid #10b981;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.1);
}
.yolo-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: #34d399;
}
.vision-meta-row {
  font-size: 0.63rem;
  color: #64748b;
  text-align: center;
}

/* Emoji Cipher */
.cipher-pipeline-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 0;
}
.cipher-box {
  font-size: 0.66rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
}
.cipher-box.text {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}
[data-theme="dark"] .cipher-box.text {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
.cipher-box.key {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}
.cipher-box.emoji {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #ffffff;
}
[data-theme="dark"] .cipher-box.emoji {
  background: #e0f2fe !important;
  border-color: #bae6fd !important;
  color: #0369a1 !important;
}
.cipher-arrow { color: #64748b; font-size: 0.72rem; }
.cipher-footer-meta {
  font-size: 0.63rem;
  color: #64748b;
  text-align: center;
}

/* --------------------------------------------------------------------------
   GitHub Profile CTA Card (Zig-Zag Full-Width)
   -------------------------------------------------------------------------- */
.github-profile-cta-card {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 3.5rem 2rem;
  gap: 1.2rem;
  transition: transform 0.28s ease, border-color 0.28s ease;
  margin-top: 1rem;
}

.github-profile-cta-card:hover {
  transform: translateY(-4px);
  border-color: #737373;
}

[data-theme="dark"] .github-profile-cta-card {
  background: #000000;
  border-color: #3a3a3a;
}

[data-theme="dark"] .github-profile-cta-card:hover {
  border-color: #737373;
}

.handwritten-github-accent {
  font-family: var(--font-handwriting);
  font-size: 2.2rem;
  line-height: 1.15;
  color: var(--text-primary);
  transform: rotate(-2deg);
}

.cta-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 580px;
}

.btn-github-all {
  background: var(--accent-black);
  color: var(--accent-white);
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  margin-top: 0.5rem;
}

.btn-github-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Responsive Grids */
@media (max-width: 960px) {
  .projects-unified-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .projects-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .project-card,
  .project-card.card-wide,
  .project-card.card-standard {
    padding: 1.8rem 1.5rem 1.5rem;
  }
  .wide-terminal-flow {
    flex-direction: column;
    gap: 1.5rem;
  }
  .flow-connector-lines {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Experience Section
   -------------------------------------------------------------------------- */
.experience-section {
  padding: 6rem 0;
  border-top: 1px solid var(--border-light);
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.exp-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all var(--transition-fast);
}

.exp-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.exp-number {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.exp-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.exp-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.4rem;
}

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.exp-tags span {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   Connect Banner (Curved Earth Horizon Footer)
   -------------------------------------------------------------------------- */
.connect-banner-section {
  position: relative;
  background: #000000;
  color: #ffffff;
  padding: 6rem 0;
  overflow: hidden;
}

.earth-horizon-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center bottom;
  opacity: 0.35;
  filter: contrast(115%) brightness(90%);
}

.earth-overlay-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 100%, transparent 20%, rgba(0, 0, 0, 0.85) 80%);
}

.connect-banner-inner {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.banner-tag {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #a1a1aa;
  margin-bottom: 1rem;
}

.banner-headline {
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin-bottom: 1.2rem;
}

.banner-subtext {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #a1a1aa;
  max-width: 480px;
  margin-bottom: 2.2rem;
}

.banner-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-white-pill {
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
}

.btn-white-pill:hover {
  background: #e4e4e7;
  transform: translateY(-1px);
}

.btn-glass-pill {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.btn-glass-pill:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
}

.editorial-manifesto {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 0.2rem;
}

.manifesto-line {
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #e4e4e7;
}

.manifesto-line.accent {
  color: #ffffff;
  font-weight: 800;
}

.manifesto-divider {
  width: 40px;
  height: 2px;
  background: #ffffff;
  margin: 1.2rem 0;
}

.manifesto-author {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #ffffff;
}

.manifesto-slogan {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #a1a1aa;
}

/* --------------------------------------------------------------------------
   Site Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-light);
  padding: 2.5rem 0;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-name {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.footer-role {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  gap: 1.6rem;
}

.footer-nav a {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.footer-nav a:hover {
  color: var(--text-primary);
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.social-icon {
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
}

.social-icon svg {
  width: 18px;
  height: 18px;
}

.social-icon:hover {
  color: var(--text-primary);
  transform: translateY(-2px);
}

.footer-copy {
  width: 100%;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  padding-top: 1.2rem;
  margin-top: 0.5rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Modal Window
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.modal-backdrop.open {
  display: flex;
  opacity: 1;
}

.modal-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  padding: 2.2rem;
  position: relative;
  box-shadow: var(--card-shadow-hover);
  animation: modal-slide-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-slide-in {
  from {
    transform: translateY(20px) scale(0.96);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  font-size: 1.2rem;
  color: var(--text-muted);
  padding: 0.4rem;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.modal-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0.4rem 0;
}

.modal-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.resume-preview-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.resume-preview-box ul {
  padding-left: 1.2rem;
  margin-top: 0.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

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

  .portrait-card {
    max-width: 380px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .experience-grid {
    grid-template-columns: 1fr;
  }

  .tech-stack-grid {
    grid-template-columns: 1fr;
  }

  .tech-stack-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .tech-stack-handwritten {
    text-align: left;
    transform: rotate(-2deg);
  }

  .connect-banner-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .editorial-manifesto {
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.4rem;
  }

  .tech-stack-title {
    font-size: 2.4rem;
  }

  .tech-card {
    padding: 1.5rem 1.2rem;
  }

  .tech-tiles-container {
    justify-content: flex-start;
    gap: 0.8rem 0.6rem;
  }

  .tech-stack-signature {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .projects-main-title {
    font-size: 2.4rem;
  }

  .projects-header-wrapper {
    flex-direction: column;
    gap: 1.5rem;
  }

  .projects-header-right {
    align-items: flex-start;
  }

  .nav-menu {
    display: none;
  }

  .banner-headline {
    font-size: 2.5rem;
  }

  .filter-controls-row {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input-wrapper input {
    width: 100%;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Core Specializations & AI Knowledge Dossier (GEO / SEO Domination)
   -------------------------------------------------------------------------- */
.specializations-section {
  padding: 6rem 0;
  border-top: 1px solid var(--border-light);
  background: var(--bg-secondary);
}

.spec-header {
  margin-bottom: 3.5rem;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  margin-bottom: 3rem;
}

.spec-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.spec-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--accent-black);
}

.spec-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.spec-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  background: var(--pill-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.spec-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.spec-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.spec-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.spec-skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.spec-skill-pill {
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  font-family: var(--font-mono);
}

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

/* ===== Smooth Scroll Reveal & Micro-Animations ===== */

/* 1. Top Reading Scroll Progress Bar */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent-black);
  z-index: 10000;
  transition: width 0.12s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: none;
  pointer-events: none;
}

/* 2. Header Elevated Micro-State on Scroll */
.site-header {
  transition: background 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s ease,
              box-shadow 0.35s ease,
              backdrop-filter 0.35s ease,
              padding 0.3s ease;
}

.site-header.header-scrolled {
  background: rgba(10, 10, 12, 0.92) !important;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .site-header.header-scrolled {
  background: rgba(255, 255, 255, 0.92) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.06);
}

/* 3. Smooth Scroll Reveal Rules */
.scroll-reveal {
  opacity: 0;
  transform: translateY(22px) scale(0.985);
  filter: blur(4px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.scroll-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* Specialized Directional Variations */
.scroll-reveal-left {
  opacity: 0;
  transform: translateX(-28px) scale(0.985);
  filter: blur(4px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.scroll-reveal-left.is-revealed {
  opacity: 1;
  transform: translateX(0) scale(1);
  filter: blur(0);
}

.scroll-reveal-right {
  opacity: 0;
  transform: translateX(28px) scale(0.985);
  filter: blur(4px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.scroll-reveal-right.is-revealed {
  opacity: 1;
  transform: translateX(0) scale(1);
  filter: blur(0);
}

.scroll-reveal-zoom {
  opacity: 0;
  transform: scale(0.94);
  filter: blur(4px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.scroll-reveal-zoom.is-revealed {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

/* 4. Subtle Micro-Hover Elevation & Clean Card Polish */
.project-card, .spec-card, .metric-card, .contact-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              background 0.3s ease;
}

/* Back-to-top button removed per user request */
.back-to-top-btn,
.back-to-top {
  display: none !important;
}

/* Reduced Motion Accessibility Fallback */
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal,
  .scroll-reveal-left,
  .scroll-reveal-right,
  .scroll-reveal-zoom {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}

/* ==========================================
   2026 EXPERT PROJECT DETAIL MODAL SYSTEM
   ========================================== */

body.project-modal-open {
  overflow: hidden !important;
}

.project-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(8, 9, 12, 0.78);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .project-modal-backdrop {
  background: rgba(245, 247, 250, 0.82);
}

.project-modal-backdrop.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.project-modal-card {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: rgba(18, 20, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 30px 80px -15px rgba(0, 0, 0, 0.7),
              0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transform: scale(0.94) translateY(24px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .project-modal-card {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.15),
              0 0 0 1px rgba(0, 0, 0, 0.04);
}

.project-modal-backdrop.is-active .project-modal-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Modal Header */
.pm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .pm-header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.01);
}

.pm-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pm-title-wrap h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f8fafc;
  margin: 0;
  line-height: 1.2;
}

[data-theme="light"] .pm-title-wrap h2 {
  color: #0f172a;
}

.pm-title-wrap p {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-top: 2px;
  margin-bottom: 0;
}

[data-theme="light"] .pm-title-wrap p {
  color: #64748b;
}

.pm-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pm-nav-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 3px 6px;
}

[data-theme="light"] .pm-nav-controls {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}

.pm-nav-btn {
  background: none;
  border: none;
  color: #cbd5e1;
  font-size: 1.1rem;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

[data-theme="light"] .pm-nav-btn {
  color: #334155;
}

.pm-nav-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

[data-theme="light"] .pm-nav-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #000;
}

.pm-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

[data-theme="light"] .pm-close-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: #475569;
}

.pm-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
  transform: rotate(90deg);
}

/* Modal Body */
.pm-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pm-body::-webkit-scrollbar {
  width: 6px;
}
.pm-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
[data-theme="light"] .pm-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}

/* Live Preview Frame inside Modal */
.pm-hero-preview {
  background: rgba(10, 11, 15, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  flex-shrink: 0;
}

.pm-hero-preview .mockup-terminal-window {
  max-width: 100%;
}

.pm-hero-preview .terminal-body-code {
  overflow-wrap: anywhere;
}

.pm-hero-preview .flow-actions-column {
  max-width: 100%;
}

.pm-hero-preview .flow-action-pill {
  white-space: normal;
}

.pm-hero-preview .pill-icon {
  flex-shrink: 0;
}

[data-theme="light"] .pm-hero-preview {
  background: rgba(248, 250, 252, 0.9);
  border-color: rgba(0, 0, 0, 0.06);
}

/* Metrics Row */
.pm-metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pm-metric-pill {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

[data-theme="light"] .pm-metric-pill {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
}

/* Tabs Navigation */
.pm-tabs-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.5rem;
}

[data-theme="light"] .pm-tabs-nav {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.pm-tab-btn {
  background: none;
  border: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: #94a3b8;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pm-tab-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .pm-tab-btn:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.04);
}

.pm-tab-btn.is-active {
  color: #6c63ff;
  background: rgba(108, 99, 255, 0.12);
}

[data-theme="light"] .pm-tab-btn.is-active {
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.1);
}

/* Tab Panels */
.pm-tab-panel {
  display: none;
  animation: pmFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pm-tab-panel.is-active {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@keyframes pmFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.pm-section-block h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

[data-theme="light"] .pm-section-block h4 {
  color: #64748b;
}

.pm-desc-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #cbd5e1;
  margin: 0;
}

[data-theme="light"] .pm-desc-text {
  color: #334155;
}

.pm-highlights-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pm-highlights-list li {
  font-size: 0.9rem;
  color: #e2e8f0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.45;
}

[data-theme="light"] .pm-highlights-list li {
  color: #1e293b;
}

.pm-highlights-list li::before {
  content: "•";
  color: var(--accent-color, #6c63ff);
  font-size: 0.8rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.pm-arch-box {
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace, var(--font-mono);
  font-size: 0.82rem;
  color: #38bdf8;
  line-height: 1.5;
}

[data-theme="light"] .pm-arch-box {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0284c7;
}

/* Modal Footer */
.pm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .pm-footer {
  border-top-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.01);
}

.pm-kbd-hint {
  font-size: 0.76rem;
  color: #64748b;
}

.pm-kbd-hint kbd {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: inherit;
  font-size: 0.72rem;
  color: #cbd5e1;
}

[data-theme="light"] .pm-kbd-hint kbd {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #334155;
}

.pm-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Card Expand Badge */
.project-card {
  position: relative;
  cursor: pointer;
}

.card-expand-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #e5e5e5;
  background: #000000;
  border: 1px solid #525252;
  padding: 3px 9px;
  border-radius: 20px;
  transition: all 0.25s ease;
  user-select: none;
}

[data-theme="dark"] .card-expand-badge {
  color: #e5e5e5;
  background: #000000;
  border-color: #525252;
}

.project-card:hover .card-expand-badge {
  background: #000000;
  transform: translateX(2px);
  border-color: #737373;
}

.project-card .card-title,
.project-card .project-action-link {
  color: var(--text-primary);
}

.project-card .card-description {
  color: var(--text-secondary);
}

/* Toast popup */
.ki-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ki-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 640px) {
  .project-modal-card {
    max-height: 95vh;
    border-radius: 16px;
  }
  .pm-header {
    padding: 1rem;
  }
  .pm-title-wrap h2 {
    font-size: 1.1rem;
  }
  .pm-body {
    padding: 1rem;
  }
  .pm-footer {
    padding: 0.85rem 1rem;
    flex-direction: column;
    gap: 0.75rem;
  }
  .pm-kbd-hint {
    display: none;
  }
  .pm-footer-actions {
    width: 100%;
    justify-content: space-between;
  }
}
