/* ==========================================================================
   ASHUTOSH KUMAR — CINEMATIC PORTFOLIO & FOUNDER SHOWCASE
   Design System & Main Stylesheet (Refined Compact Typography & Sleek Layout)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Outfit:wght@300;400;500;600;700;800&family=Syne:wght@600;700;800&display=swap');

/* --- CSS Variables & Design Tokens --- */
:root {
  /* Color Palette - Software Engineer Mode */
  --bg-deep: #04060d;
  --bg-surface: #0a0e1a;
  --bg-card: rgba(15, 23, 42, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.8);
  --border-glow: rgba(0, 240, 255, 0.25);
  --border-subtle: rgba(255, 255, 255, 0.08);

  --accent-primary: #00f0ff;      /* Electric Cyan */
  --accent-primary-rgb: 0, 240, 255;
  --accent-secondary: #7000ff;    /* Cyber Purple */
  --accent-secondary-rgb: 112, 0, 255;
  --accent-gold: #ffb703;         /* Founder Gold */
  --accent-emerald: #00f5a0;      /* Live Status Green */

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Fonts */
  --font-display: 'Syne', sans-serif;
  --font-sans: 'Outfit', sans-serif;
  --font-mono: 'Fira Code', monospace;

  /* Shadows & Glass */
  --glass-blur: blur(16px);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
  --glow-box: 0 0 20px rgba(0, 240, 255, 0.25);
  --glow-box-purple: 0 0 20px rgba(112, 0, 255, 0.35);

  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  
  --nav-height: 72px;
}

/* Founder Mode Variable Overrides */
body.mode-founder {
  --accent-primary: #ffb703;      /* Radiant Gold */
  --accent-primary-rgb: 255, 183, 3;
  --accent-secondary: #ff0055;    /* Vibrant Crimson/Pink */
  --accent-secondary-rgb: 255, 0, 85;
  --border-glow: rgba(255, 183, 3, 0.3);
  --glow-box: 0 0 20px rgba(255, 183, 3, 0.3);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 1.25rem);
  color-scheme: dark;
  font-size: 15px; /* Refined baseline font size */
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Selection */
::selection {
  background: var(--accent-primary);
  color: #000;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* --- Custom Cinematic Cursor --- */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: var(--accent-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background-color 0.2s;
  box-shadow: 0 0 12px var(--accent-primary);
}

.custom-cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--accent-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease-out, width 0.2s, height 0.2s, border-color 0.2s;
  opacity: 0.6;
}

body.cursor-hover .custom-cursor {
  width: 14px;
  height: 14px;
  background-color: #fff;
  box-shadow: 0 0 16px #fff;
}
body.cursor-hover .custom-cursor-follower {
  width: 48px;
  height: 48px;
  border-color: var(--accent-primary);
  opacity: 1;
}

@media (max-width: 992px) {
  .custom-cursor, .custom-cursor-follower {
    display: none !important;
  }
}

/* --- Background Canvas & Overlay --- */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

.bg-noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 50%, rgba(0,240,255,0.03), transparent 70%),
              radial-gradient(circle at 80% 20%, rgba(112,0,255,0.04), transparent 60%);
  z-index: -1;
  pointer-events: none;
}

.ambient-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.18;
}

.glow-gold { background: var(--accent-gold); }
.glow-purple { background: var(--accent-secondary); }
.glow-cyan { background: var(--accent-primary); }

/* --- Preloader --- */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-content {
  text-align: center;
  max-width: 420px;
  width: 90%;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.preloader-logo-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 15px var(--accent-primary));
  animation: logoPulse 2.5s infinite ease-in-out;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 12px var(--accent-primary)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 20px var(--accent-gold)); }
}

.preloader-logo {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3.5vw, 1.6rem);
  font-weight: 800;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, #fff, var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.loader-bar-container {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.loader-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  box-shadow: 0 0 12px var(--accent-primary);
  transition: width 0.1s linear;
}

.preloader-status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-primary);
  letter-spacing: 1px;
}

/* --- Container & Layout Utils --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section-padding {
  padding: 5rem 0; /* Reduced from 7rem for cleaner spacing */
}

/* Typography Utilities (REDUCED FONT SIZES) */
.gradient-text {
  background: linear-gradient(135deg, #ffffff 20%, var(--accent-primary) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-alt {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid var(--border-glow);
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.6rem); /* Reduced title size */
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.5px;
  margin-bottom: 0.75rem;
}

.section-desc {
  font-size: clamp(0.88rem, 1.8vw, 0.98rem); /* Reduced desc size */
  color: var(--text-muted);
  font-weight: 300;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  border: none;
  min-height: 44px;
  touch-action: manipulation;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), rgba(0, 180, 255, 0.8));
  color: #04060d;
  box-shadow: var(--glow-box);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 240, 255, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.5rem; /* Reduced padding */
  transition: var(--transition-smooth);
  position: relative;
}

.glass-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 12px var(--border-glow);
  transform: translateY(-3px);
}

/* --- Header & Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  transition: var(--transition-smooth);
  padding: 0 1.25rem;
}

.navbar.scrolled {
  background: rgba(4, 6, 13, 0.92);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  z-index: 1001;
  flex-shrink: 0;
}

.logo-text {
  white-space: nowrap;
}

.nav-logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 12px var(--border-glow);
  transition: transform 0.3s;
}

.nav-logo:hover .nav-logo-img {
  transform: scale(1.06) rotate(3deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem; /* Compact nav links */
  font-weight: 500;
  transition: var(--transition-smooth);
  position: relative;
  padding: 0.25rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-primary);
  transition: var(--transition-smooth);
  box-shadow: 0 0 6px var(--accent-primary);
}

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

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 1001;
  flex-shrink: 0;
}

.mode-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  padding: 2px;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  box-sizing: border-box;
}

.mode-btn {
  padding: 0.35rem 0.65rem;
  border-radius: 18px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: none;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
}

.mode-btn.active {
  color: #04060d;
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
}

.sound-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  touch-action: manipulation;
  flex-shrink: 0;
}

.sound-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(0, 240, 255, 0.1);
}

.nav-mobile-trigger {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-main);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  touch-action: manipulation;
  flex-shrink: 0;
}

/* --- Hero Section --- */
.hero {
  min-height: 90vh;
  padding-top: calc(var(--nav-height) + 1.5rem);
  display: flex;
  align-items: center;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid var(--border-glow);
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 1.8vw, 0.8rem);
  color: var(--accent-primary);
  margin-bottom: 1.25rem;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.12);
  backdrop-filter: var(--glass-blur);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 245, 160, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(0, 245, 160, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 245, 160, 0); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.5vw, 3.4rem); /* Refined Hero Title size */
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.8px;
  margin-bottom: 1.25rem;
}

.hero-subhead {
  font-size: clamp(0.92rem, 1.8vw, 1.05rem);
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 1.75rem;
  max-width: 540px;
}

.hero-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.role-badge {
  padding: 0.4rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  backdrop-filter: var(--glass-blur);
  transition: var(--transition-smooth);
}

.role-badge:hover {
  border-color: var(--accent-primary);
  background: rgba(0, 240, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.2);
}

.role-badge i {
  color: var(--accent-primary);
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.avatar-frame {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 1.15;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-glow);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 25px var(--border-glow);
  background: var(--bg-card);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) brightness(1.02);
  transition: transform 0.6s ease;
}

.avatar-frame:hover .avatar-img {
  transform: scale(1.05);
}

.avatar-overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(4, 6, 13, 0.9) 100%);
}

.avatar-badge-floating {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  padding: 0.75rem 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.badge-info h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.badge-info p {
  font-size: 0.72rem;
  color: var(--accent-primary);
  font-family: var(--font-mono);
}

.badge-stat {
  text-align: right;
}

.badge-stat .number {
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent-primary);
  font-family: var(--font-display);
}

.badge-stat .label {
  font-size: 0.62rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.floating-hud {
  position: absolute;
  top: -12px;
  right: -8px;
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glow);
  padding: 0.5rem 0.95rem;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

/* --- Stats Strip --- */
.stats-strip {
  margin-top: 2.5rem;
  padding: 2rem 0;
  background: rgba(10, 14, 26, 0.5);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.stat-item {
  padding: 1.25rem 0.85rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  backdrop-filter: var(--glass-blur);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  opacity: 0.5;
}

.stat-item:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px var(--border-glow);
}

.stat-item .stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-item .stat-num span {
  color: var(--accent-primary);
}

.stat-item .stat-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Split Identity --- */
.split-identity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
}

.identity-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.identity-card .icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--accent-primary);
  margin-bottom: 1rem;
}

.identity-card.founder-card .icon-box {
  background: rgba(255, 183, 3, 0.1);
  border-color: rgba(255, 183, 3, 0.3);
  color: var(--accent-gold);
}

.identity-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.identity-desc {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.88rem;
}

.identity-feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
}

.identity-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  transition: var(--transition-smooth);
}

.identity-feature-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-glow);
  transform: translateX(4px);
}

.feature-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.feature-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.feature-item-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.feature-item-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* --- Services Grid --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  margin-bottom: 0.6rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.86rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.service-icon {
  font-size: 2rem;
  color: var(--accent-primary);
  margin-bottom: 0.85rem;
  transition: transform 0.4s ease;
}

.service-card:hover .service-icon {
  transform: scale(1.15) rotate(4deg);
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.service-tag {
  padding: 0.2rem 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.service-card:hover .service-tag {
  border-color: rgba(0, 240, 255, 0.3);
  color: var(--text-main);
}

/* --- Projects Showcase --- */
.project-filters {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.45rem 1.1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  touch-action: manipulation;
}

.filter-btn:hover, .filter-btn.active {
  background: rgba(0, 240, 255, 0.14);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.25);
}

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

.project-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
}

.project-thumb {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--bg-surface);
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-thumb img {
  transform: scale(1.08);
}

.project-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-category {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.35rem;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  margin-bottom: 0.5rem;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  flex: 1;
  line-height: 1.5;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.project-tech-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  border: 1px solid var(--border-subtle);
}

/* --- Tech Matrix --- */
.tech-matrix-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  align-items: start;
}

.tech-categories {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tech-group h4 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.skill-pill {
  padding: 0.45rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  transition: var(--transition-smooth);
}

.skill-pill:hover {
  border-color: var(--accent-primary);
  background: rgba(0, 240, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.2);
}

.skill-pill i {
  color: var(--accent-primary);
}

.code-preview-window {
  background: #080c16;
  border: 1px solid var(--border-glow);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 240, 255, 0.1);
}

.code-header {
  background: #0f172a;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.window-dots {
  display: flex;
  gap: 0.35rem;
}

.window-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.code-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.code-body {
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: #e2e8f0;
  overflow-x: auto;
}

.kw { color: #f472b6; }
.fn { color: #38bdf8; }
.str { color: #a3e635; }
.cls { color: #fbbf24; }
.cmt { color: #64748b; font-style: italic; }

/* --- Developer Terminal --- */
.terminal-section {
  max-width: 900px;
  margin: 0 auto;
}

.terminal-card {
  background: #050811;
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 25px rgba(0, 240, 255, 0.15);
  overflow: hidden;
}

.terminal-header {
  background: rgba(15, 23, 42, 0.9);
  padding: 0.65rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.terminal-body {
  padding: 1.1rem;
  min-height: 250px;
  max-height: 380px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #38bdf8;
}

.terminal-line {
  margin-bottom: 0.5rem;
  line-height: 1.45;
  word-break: break-word;
}

.terminal-prompt {
  color: var(--accent-emerald);
  font-weight: bold;
}

.terminal-output {
  color: #cbd5e1;
  margin-top: 0.2rem;
}

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.terminal-input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  width: 100%;
  caret-color: var(--accent-primary);
}

/* --- Timeline --- */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary), transparent);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  width: 50%;
  padding-right: 1.75rem;
}

.timeline-item:nth-child(even) {
  margin-left: 50%;
  padding-right: 0;
  padding-left: 1.75rem;
}

.timeline-dot {
  position: absolute;
  top: 0;
  right: -9px;
  width: 18px;
  height: 18px;
  background: var(--bg-deep);
  border: 3px solid var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--accent-primary);
  z-index: 2;
}

.timeline-item:nth-child(even) .timeline-dot {
  right: auto;
  left: -9px;
}

.timeline-content {
  padding: 1.25rem;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-primary);
  margin-bottom: 0.35rem;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.timeline-role {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 0.5rem;
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.contact-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.contact-text h5 {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-text p, .contact-text a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  word-break: break-word;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition-smooth);
}

.form-control:focus {
  border-color: var(--accent-primary);
  background: rgba(0, 240, 255, 0.06);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.25);
}

textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

/* --- Footer --- */
.footer {
  padding: 3rem 0 1.75rem 0;
  border-top: 1px solid var(--border-subtle);
  background: #020307;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.social-btn:hover {
  border-color: var(--accent-primary);
  color: #04060d;
  background: var(--accent-primary);
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  font-size: 0.78rem;
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 90vw;
}

.toast {
  padding: 0.75rem 1.1rem;
  background: rgba(10, 14, 26, 0.95);
  border: 1px solid var(--accent-primary);
  border-radius: 10px;
  color: var(--text-main);
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
}


/* ==========================================================================
   MOBILE & TABLET RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 992px) {
  :root {
    --nav-height: 65px;
  }

  .navbar {
    padding: 0 1rem;
  }

  .nav-mobile-trigger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    background: rgba(6, 9, 20, 0.97);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 4.5rem 2rem 2.5rem 2rem;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s ease;
    border-left: 1px solid var(--border-glow);
    box-shadow: -10px 0 30px rgba(0,0,0,0.7);
    z-index: 1000;
    visibility: hidden;
    pointer-events: none;
  }

  .nav-links.active {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .nav-link {
    font-size: 1.1rem;
    font-weight: 600;
  }

  /* --- Main Body Section Alignments (Mobile & Tablet) --- */
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }

  .hero-text-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .hero-subhead {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    word-break: break-word;
  }

  .hero-roles {
    justify-content: center;
    width: 100%;
    gap: 0.5rem;
  }

  .hero-cta {
    justify-content: center;
    width: 100%;
  }

  .split-identity-grid, .tech-matrix-container, .contact-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .avatar-frame {
    max-width: 320px;
    margin: 0 auto;
  }

  .code-preview-window, .code-body {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 768px) {
  .section-padding {
    padding: 3.5rem 0;
  }

  .navbar {
    padding: 0 0.6rem;
  }

  .nav-container {
    gap: 0.35rem;
  }

  .nav-logo {
    font-size: 0.84rem;
    gap: 0.35rem;
    flex-shrink: 0;
    max-width: none;
  }

  .logo-text {
    font-size: 0.78rem;
    white-space: nowrap;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }

  .nav-logo-img {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }

  .nav-actions {
    gap: 0.3rem;
    flex-shrink: 0;
  }

  .mode-toggle {
    display: inline-flex !important;
    padding: 2px;
    border-radius: 20px;
    flex-shrink: 0;
  }

  .mode-btn {
    padding: 0.3rem 0.52rem;
    font-size: 0.78rem;
    border-radius: 16px;
  }

  .mode-btn .mode-text {
    display: none !important; /* Show icon/sticker only on responsive */
  }

  .sound-btn {
    display: flex !important;
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
    flex-shrink: 0;
  }

  .nav-mobile-trigger {
    display: flex !important;
    width: 32px;
    height: 32px;
    font-size: 0.88rem;
    flex-shrink: 0;
  }

  /* --- Main Body Mobile Alignments --- */
  .hero-tag {
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
    text-align: center;
    font-size: clamp(0.68rem, 2.8vw, 0.78rem);
    padding: 0.4rem 0.85rem;
    line-height: 1.35;
  }

  .hero-title {
    font-size: clamp(1.65rem, 5.8vw, 2.3rem);
    word-break: normal;
    line-height: 1.22;
    margin-bottom: 1rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    font-size: 0.92rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .stat-item {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1rem 0.6rem;
  }

  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
    gap: 1.25rem;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.5rem;
  }

  .project-filters {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.6rem;
    padding-left: 0.25rem;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .project-filters::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex-shrink: 0;
    scroll-snap-align: start;
  }

  .timeline::before {
    left: 14px;
  }

  .timeline-item, .timeline-item:nth-child(even) {
    width: 100%;
    margin-left: 0;
    padding-left: 2.5rem;
    padding-right: 0;
  }

  .timeline-dot, .timeline-item:nth-child(even) .timeline-dot {
    left: 5px;
    right: auto;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Prevent browser auto-zoom on input focus */
  .form-control, .terminal-input {
    font-size: 16px !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.85rem;
  }

  .identity-feature-item {
    padding: 0.65rem 0.75rem;
    gap: 0.65rem;
  }

  .feature-item-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .feature-item-title {
    font-size: 0.85rem;
  }

  .feature-item-desc {
    font-size: 0.76rem;
  }

  .navbar {
    padding: 0 0.4rem;
  }

  .nav-logo {
    gap: 0.25rem;
    max-width: none;
  }

  .logo-text {
    font-size: 0.74rem;
    max-width: none;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
  }

  .nav-logo-img {
    width: 26px;
    height: 26px;
  }

  .nav-actions {
    gap: 0.2rem;
    flex-shrink: 0;
  }

  .mode-btn {
    padding: 0.25rem 0.45rem;
    font-size: 0.74rem;
  }

  .mode-btn .mode-text {
    display: none !important;
  }

  .sound-btn, .nav-mobile-trigger {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  /* --- Hero Visual & Avatar HUD alignment on Small Mobile --- */
  .hero-tag {
    font-size: 0.68rem;
    padding: 0.35rem 0.65rem;
  }

  .hero-title {
    font-size: 1.58rem;
    line-height: 1.22;
  }

  .avatar-frame {
    max-width: 270px;
    aspect-ratio: 1 / 1.15;
    margin: 0 auto;
  }

  .avatar-badge-floating {
    padding: 0.55rem 0.75rem;
    bottom: 8px;
    left: 8px;
    right: 8px;
  }

  .badge-info h4 {
    font-size: 0.78rem;
  }

  .badge-stat .number {
    font-size: 0.85rem;
  }

  .floating-hud {
    font-size: 0.62rem;
    padding: 0.35rem 0.65rem;
    top: -8px;
    right: 6px;
    max-width: 82%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .terminal-body {
    font-size: 0.74rem;
    padding: 0.75rem;
    min-height: 200px;
  }

  .footer-grid {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .social-links {
    justify-content: center;
  }
}

/* --- Floating WhatsApp Action Button --- */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 54px;
  height: 54px;
  background: #25d366;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45), 0 0 15px rgba(37, 211, 102, 0.3);
  z-index: 9990;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.12) translateY(-4px);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.7), 0 0 25px rgba(37, 211, 102, 0.5);
  color: #ffffff;
}

@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    font-size: 1.55rem;
  }
}

/* Touch Device Active Feedback & Touch Target Sizes */
@media (hover: none) and (pointer: coarse) {
  .btn, .filter-btn, .mode-btn, .sound-btn, .nav-mobile-trigger, .social-btn {
    min-height: 44px;
  }
  .btn:active, .filter-btn:active, .glass-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
}
