/* ==========================================================================
   PANKAJ SANGWAN - FULL STACK DEVELOPER & SOFTWARE ARCHITECT PORTFOLIO
   Design System, CSS Custom Properties & Responsive Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. ROOT VARIABLES & THEME DEFINITION
   -------------------------------------------------------------------------- */
:root {
  /* Dark Theme (Default) */
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(31, 41, 55, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.65);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  
  /* Brand Accent Palette */
  --accent-primary: #6366f1;       /* Electric Indigo */
  --accent-secondary: #06b6d4;     /* Vibrant Cyan */
  --accent-tertiary: #10b981;      /* Emerald Green */
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --accent-gradient-hover: linear-gradient(135deg, #4f46e5 0%, #0891b2 100%);
  --glow-indigo: 0 0 25px rgba(99, 102, 241, 0.35);
  --glow-cyan: 0 0 25px rgba(6, 182, 212, 0.35);
  --glow-card: 0 8px 30px rgba(0, 0, 0, 0.4);

  /* Functional */
  --status-available: #10b981;
  --status-busy: #f59e0b;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.45);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --container-max: 1240px;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-glass: rgba(255, 255, 255, 0.75);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --border-color: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(99, 102, 241, 0.4);
  --glow-card: 0 10px 25px rgba(0, 0, 0, 0.06);
}

/* --------------------------------------------------------------------------
   2. GLOBAL RESET & BASE STYLES
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  text-size-adjust: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  position: relative;
}

body.menu-open {
  overflow: hidden;
  touch-action: none;
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

/* Background Ambient Orbs */
body::before {
  content: '';
  position: fixed;
  top: -15%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(99, 102, 241, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: 5%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.10) 0%, rgba(6, 182, 212, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Top Announcement Bar */
.top-announcement-bar {
  background: linear-gradient(90deg, #4f46e5 0%, #0891b2 100%);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  position: relative;
  z-index: 1001;
  text-align: center;
}

.top-announcement-content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-announcement-badge {
  display: inline-flex;
  align-items: center;
}

.top-announcement-sep {
  opacity: 0.7;
}

.top-announcement-link {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: opacity 0.2s ease;
}

.top-announcement-link:hover {
  opacity: 0.9;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

section {
  padding: 6rem 0;
  position: relative;
}

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY & SECTION HEADINGS
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

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

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--accent-primary);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   4. NAVIGATION BAR & SITE HEADER
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition);
}

.navbar-wrapper {
  width: 100%;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.9rem 0;
  transition: var(--transition);
}

.site-header.scrolled .navbar-wrapper,
.navbar-wrapper.scrolled {
  padding: 0.65rem 0;
  box-shadow: var(--shadow-sm);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-text {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--accent-gradient);
  color: #ffffff;
  border-radius: 10px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

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

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

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

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

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

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

/* Theme Toggle Button (WCAG 44px min touch target) */
.theme-toggle-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  touch-action: manipulation;
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

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

/* Hamburger button (44px min touch target with animated morph) */
.menu-btn {
  display: none;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  touch-action: manipulation;
  z-index: 1002;
  flex-shrink: 0;
}

.menu-btn:hover, .menu-btn:focus-visible {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.15);
  outline: none;
}

.hamburger-box {
  width: 22px;
  height: 16px;
  display: inline-block;
  position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  width: 22px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  position: absolute;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, top 0.25s ease;
}

.hamburger-inner {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-inner::before {
  content: '';
  top: -7px;
  left: 0;
}

.hamburger-inner::after {
  content: '';
  top: 7px;
  left: 0;
}

.menu-btn.active .hamburger-inner {
  background-color: transparent;
}

.menu-btn.active .hamburger-inner::before {
  top: 0;
  transform: rotate(45deg);
  background-color: var(--accent-primary);
}

.menu-btn.active .hamburger-inner::after {
  top: 0;
  transform: rotate(-45deg);
  background-color: var(--accent-primary);
}

/* Nav Drawer Backdrop Scrim */
.nav-overlay {
  display: none;
}

.nav-drawer-footer {
  display: none;
}

/* --------------------------------------------------------------------------
   5. BUTTONS & BADGES (WCAG AA 44px Minimum Touch Targets)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.75rem;
  min-height: 44px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-align: center;
  white-space: nowrap;
  touch-action: manipulation;
  user-select: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.btn-upwork {
  background: #14a800;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(20, 168, 0, 0.3);
}

.btn-upwork:hover {
  background: #108c00;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(20, 168, 0, 0.45);
}

.btn-sm {
  padding: 0.55rem 1.15rem;
  min-height: 44px;
  font-size: 0.88rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--accent-tertiary);
  font-weight: 600;
}

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

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px var(--status-available); }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* --------------------------------------------------------------------------
   6. HERO SECTION
   -------------------------------------------------------------------------- */
.hero-section {
  padding-top: 9rem;
  padding-bottom: 6rem;
  min-height: 92vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero-typewriter-wrap {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.2rem;
}

.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.4em;
  background: var(--accent-secondary);
  animation: blink 0.8s infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-bio {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 580px;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

/* Hero Stat Grid */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 0.35rem;
}

/* Hero Visual / Avatar Card */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.avatar-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1.08;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg), var(--glow-indigo);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.avatar-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.15), transparent 70%);
  pointer-events: none;
}

.avatar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.avatar-mac-dots {
  display: flex;
  gap: 6px;
}

.avatar-mac-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.avatar-mac-dots span:nth-child(1) { background: #ef4444; }
.avatar-mac-dots span:nth-child(2) { background: #f59e0b; }
.avatar-mac-dots span:nth-child(3) { background: #10b981; }

.terminal-title {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.avatar-center {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 1.5rem 0;
}

.avatar-img-wrap {
  width: 130px;
  height: 130px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  padding: 4px;
  background: var(--accent-gradient);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
  position: relative;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #ffffff;
  font-weight: 800;
}

.avatar-name {
  font-size: 1.35rem;
  font-weight: 700;
}

.avatar-role {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.avatar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 1rem;
}

.tech-pill {
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}

.avatar-floating-badge {
  position: absolute;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 3;
  animation: float 4s ease-in-out infinite;
}

.badge-top-left {
  top: -15px;
  left: -20px;
  animation-delay: 0s;
}

.badge-bottom-right {
  bottom: 20px;
  right: -25px;
  animation-delay: 2s;
}

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

.badge-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-upwork {
  background: rgba(20, 168, 0, 0.15);
  color: #14a800;
}

.icon-shopify {
  background: rgba(149, 191, 71, 0.15);
  color: #95bf47;
}

.badge-text-top {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.badge-text-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   7. ABOUT ME SECTION
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.highlight-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  transition: var(--transition);
}

.highlight-box:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.highlight-box h4 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.highlight-box p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   8. SERVICES SECTION
   -------------------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.8rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-lg), var(--glow-card);
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.service-card:hover::after {
  transform: scaleX(1);
}

.service-icon-box {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.service-card:hover .service-icon-box {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.service-title {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

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

.service-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  padding-top: 1.2rem;
}

.service-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.service-features li svg {
  color: var(--accent-tertiary);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   9. SKILLS & TECH STACK SECTION
   -------------------------------------------------------------------------- */
.skills-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.skill-tab-btn {
  padding: 0.6rem 1.4rem;
  min-height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.skill-tab-btn.active, .skill-tab-btn:hover {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.skill-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.2rem;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.skill-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.skill-icon-wrap {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.skill-level {
  font-size: 0.8rem;
  color: var(--accent-secondary);
  font-weight: 600;
  background: rgba(6, 182, 212, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

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

/* --------------------------------------------------------------------------
   10. CAREER TIMELINE / EXPERIENCE
   -------------------------------------------------------------------------- */
.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding-left: 2.5rem;
}

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

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  top: 6px;
  left: -2.5rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-marker::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-secondary);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  transition: var(--transition);
}

.timeline-content:hover {
  border-color: var(--border-focus);
  transform: translateX(4px);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.timeline-role {
  font-size: 1.25rem;
  font-weight: 700;
}

.timeline-company {
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 1rem;
}

.timeline-period {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}

.timeline-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.timeline-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.timeline-bullets li {
  position: relative;
  padding-left: 1.25rem;
}

.timeline-bullets li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent-secondary);
}

/* --------------------------------------------------------------------------
   11. FEATURED PROJECTS SHOWCASE
   -------------------------------------------------------------------------- */
.project-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.55rem 1.25rem;
  min-height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filter-btn.active, .filter-btn:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-lg), var(--glow-card);
}

.project-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg-tertiary);
  overflow: hidden;
}

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

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

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 23, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  backdrop-filter: blur(4px);
  transition: var(--transition);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-secondary);
  margin-bottom: 0.4rem;
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  flex-grow: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-tech span {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   12. CLIENT TESTIMONIALS & UPWORK REVIEWS
   -------------------------------------------------------------------------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: var(--transition);
}

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

.stars {
  color: #f59e0b;
  display: flex;
  gap: 3px;
  margin-bottom: 1rem;
}

.testimonial-quote {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.client-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.client-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.client-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.client-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   13. FAQ SECTION
   -------------------------------------------------------------------------- */
.faq-grid {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  padding: 1.25rem 1.5rem;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-icon {
  font-size: 1.3rem;
  color: var(--accent-primary);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

/* --------------------------------------------------------------------------
   14. CONTACT SECTION
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3.5rem;
  align-items: start;
}

.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
}

.contact-info-card h3 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.contact-info-card p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

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

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item:hover .contact-icon {
  background: var(--accent-gradient);
  color: #ffffff;
}

.contact-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-val {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Contact Form */
.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: 1.4rem;
}

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

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

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

.form-alert {
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.2rem;
  display: none;
  font-size: 0.9rem;
}

.form-alert.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
}

.form-alert.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* --------------------------------------------------------------------------
   15. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-bio {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 1rem;
  max-width: 380px;
}

.footer-title {
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--accent-primary);
  transform: translateX(3px);
  display: inline-block;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   16. MODALS (PROJECT DETAILS & RESUME)
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}

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

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  transition: var(--transition);
  touch-action: manipulation;
  z-index: 10;
}

.modal-close-btn:hover {
  background: var(--accent-primary);
  color: #ffffff;
}

/* Back to Top Button (44px min touch target) */
.back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 46px;
  height: 46px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 995;
  touch-action: manipulation;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

/* --------------------------------------------------------------------------
   17. RESPONSIVE BREAKPOINTS & MOBILE ARCHITECTURE
   -------------------------------------------------------------------------- */

/* Tablet Landscape & Small Laptops (<= 1024px) */
@media (max-width: 1024px) {
  .hero-title { font-size: 2.8rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero-visual { order: -1; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: repeat(3, 1fr); }
  .testimonials-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

/* Tablets Portrait & Large Handhelds (<= 768px) */
@media (max-width: 768px) {
  /* Eliminate announcement bar on mobile to prevent any overlapping and save screen space */
  .top-announcement-bar {
    display: none !important;
  }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
  }

  .navbar-wrapper {
    padding: 0.65rem 0;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
  }

  .navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .logo {
    font-size: 1.15rem;
    gap: 0.5rem;
    white-space: nowrap;
  }

  .logo-badge {
    width: 34px;
    height: 34px;
    min-width: 34px;
    font-size: 0.88rem;
    border-radius: 8px;
  }

  .nav-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .nav-upwork-desktop {
    display: none !important;
  }

  .theme-toggle-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .hero-section {
    padding-top: 5.5rem !important;
  }

  .section-title { font-size: 2rem; }
  .hero-title { font-size: clamp(2rem, 5vw, 2.4rem); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
  .services-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }

  /* Mobile Navigation Drawer - Slide-out Sheet */
  .menu-btn {
    display: flex !important;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 23, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100vh;
    height: 100dvh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.5);
    flex-direction: column;
    align-items: stretch;
    padding: 5rem 1.25rem 2rem;
    gap: 0.35rem;
    transform: translateX(105%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links.mobile-open {
    transform: translateX(0);
  }

  .nav-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
    width: 100%;
  }

  .nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.12);
    border-left: 3px solid var(--accent-primary);
  }

  .nav-link::after {
    display: none;
  }

  .nav-drawer-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
  }

  .drawer-cta {
    width: 100%;
    min-height: 44px;
  }

  .drawer-contact-link {
    color: var(--accent-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    padding: 0.4rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
  }

  /* Project Card Touch Interaction - Case study button permanently accessible */
  .project-overlay {
    opacity: 1;
    position: static;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    padding: 0.85rem 1.25rem;
    backdrop-filter: none;
    justify-content: stretch;
  }

  .project-overlay .btn {
    width: 100%;
    min-height: 44px;
  }
}

/* Medium Mobile Devices & Phablets (<= 640px) */
@media (max-width: 640px) {
  .nav-upwork-desktop {
    display: none;
  }

  .nav-actions {
    gap: 0.5rem;
  }

  .top-announcement-loc,
  .top-announcement-sep {
    display: none;
  }

  .top-announcement-bar {
    font-size: 0.78rem;
    padding: 0.4rem 0.5rem;
  }

  .about-highlights {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  /* Prevent floating badges from causing horizontal overflow */
  .avatar-card {
    overflow: visible;
    aspect-ratio: auto;
    padding: 1.5rem 1.25rem;
  }

  .avatar-floating-badge {
    position: static;
    margin-bottom: 0.75rem;
    animation: none;
    transform: none !important;
    width: 100%;
    justify-content: flex-start;
  }

  .badge-top-left, .badge-bottom-right {
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
  }
}

/* Standard Mobile Devices (<= 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 1.1rem;
  }

  section {
    padding: 4rem 0;
  }

  /* Hero Section */
  .hero-section {
    padding-top: 6.5rem;
    padding-bottom: 3.5rem;
    min-height: auto;
  }

  .hero-title {
    font-size: clamp(1.75rem, 7.5vw, 2.15rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .hero-typewriter-wrap {
    font-size: 1.1rem;
    min-height: 2rem;
    flex-wrap: wrap;
    line-height: 1.35;
  }

  .hero-bio {
    font-size: 0.95rem;
    line-height: 1.6;
  }

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

  .hero-actions .btn {
    width: 100%;
    min-height: 48px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
  }

  .stat-num {
    font-size: 1.8rem;
  }

  .stat-label {
    font-size: 0.8rem;
  }

  /* Section Headings */
  .section-header {
    margin-bottom: 2.5rem;
  }

  .section-tag {
    font-size: 0.78rem;
    padding: 0.3rem 0.8rem;
  }

  .section-title {
    font-size: clamp(1.6rem, 6.5vw, 1.95rem);
    line-height: 1.25;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .section-subtitle {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  /* Tabs & Filter Buttons */
  .skills-tabs, .project-filters {
    gap: 0.5rem;
    margin-bottom: 2rem;
  }

  .skill-tab-btn, .filter-btn {
    font-size: 0.84rem;
    padding: 0.55rem 1rem;
    min-height: 44px;
    flex-grow: 1;
    text-align: center;
  }

  /* Skills Grid */
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .skill-item {
    padding: 1.2rem 0.75rem;
  }

  .skill-name {
    font-size: 0.95rem;
  }

  /* Timeline */
  .timeline {
    padding-left: 1.8rem;
  }

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

  .timeline-marker {
    left: -1.8rem;
    width: 18px;
    height: 18px;
    top: 4px;
    border-width: 2px;
  }

  .timeline-marker::after {
    width: 6px;
    height: 6px;
  }

  .timeline-content {
    padding: 1.25rem 1rem;
  }

  .timeline-role {
    font-size: 1.1rem;
  }

  .timeline-header {
    flex-direction: column;
    gap: 0.35rem;
  }

  .timeline-period {
    align-self: flex-start;
  }

  /* Contact & Forms */
  .contact-info-card, .contact-form-card {
    padding: 1.6rem 1.15rem;
  }

  .contact-info-card h3 {
    font-size: 1.35rem;
  }

  .contact-item {
    gap: 0.75rem;
  }

  .contact-icon {
    width: 44px;
    height: 44px;
  }

  .contact-val {
    font-size: 0.9rem;
    word-break: break-word;
  }

  .form-control {
    padding: 0.75rem 0.85rem;
    font-size: 16px; /* iOS Safari minimum to avoid zoom */
    min-height: 46px;
  }

  /* Modals */
  .modal-backdrop {
    padding: 0.75rem 0.5rem;
  }

  .modal-box {
    padding: 1.75rem 1.15rem;
    border-radius: var(--radius-md);
    max-height: 92vh;
  }

  .modal-close-btn {
    top: 0.75rem;
    right: 0.75rem;
    width: 44px;
    height: 44px;
  }

  #modal-project-title {
    font-size: 1.4rem !important;
  }

  .modal-box .btn {
    width: 100%;
  }

  .modal-box > div:last-child {
    flex-direction: column;
  }

  /* Footer */
  .footer {
    padding: 3rem 0 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .footer-links a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
  }

  .back-to-top {
    bottom: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
  }
}

/* Small Mobile Screens (320px - 375px: iPhone SE, iPhone 12/13 Mini) */
@media (max-width: 375px) {
  .container {
    padding: 0 0.85rem;
  }

  .logo {
    font-size: 1.05rem;
    gap: 0.4rem;
  }

  .logo-badge {
    width: 30px;
    height: 30px;
    min-width: 30px;
    font-size: 0.8rem;
  }

  .nav-actions {
    gap: 0.4rem;
  }

  .theme-toggle-btn, .menu-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .hero-title {
    font-size: clamp(1.6rem, 8vw, 1.85rem);
  }

  .hero-typewriter-wrap {
    font-size: 0.98rem;
    min-height: 1.8rem;
  }

  .hero-bio {
    font-size: 0.9rem;
  }

  .status-badge {
    font-size: 0.76rem;
    padding: 0.35rem 0.75rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-subtitle {
    font-size: 0.88rem;
  }

  .stat-num {
    font-size: 1.6rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .skill-tab-btn, .filter-btn {
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
    min-height: 44px;
  }

  .modal-box {
    padding: 1.5rem 0.9rem;
  }

  #modal-project-title {
    font-size: 1.3rem !important;
  }
}

/* Ultra-Small Mobile Viewports (<= 320px: Fold Cover Screens & Compact Devices) */
@media (max-width: 320px) {
  .hero-title {
    font-size: 1.45rem;
  }

  .hero-typewriter-wrap {
    font-size: 0.88rem;
  }

  .section-title {
    font-size: 1.35rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    text-align: center;
  }

  .stat-item {
    align-items: center;
  }

  .stat-num {
    font-size: 1.45rem;
  }

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

  .service-card {
    padding: 1.6rem 1.1rem;
  }

  .timeline-content {
    padding: 1rem 0.85rem;
  }
}

/* Touch Device Optimization */
@media (hover: none) and (pointer: coarse) {
  .nav-link, .btn, .theme-toggle-btn, .menu-btn, .skill-tab-btn, .filter-btn, .modal-close-btn {
    -webkit-tap-highlight-color: transparent;
  }
}

/* Accessibility: User Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ==========================================================================
   18. NEW EXPANSIONS: WORKFLOW PROCESS SECTION (#process)
   ========================================================================== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.process-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.process-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-lg), var(--glow-card);
}

.process-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.process-step-badge {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-secondary);
  background: rgba(6, 182, 212, 0.12);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.process-step-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}

.process-title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.process-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.process-deliverables {
  list-style: none;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.process-deliverables li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.process-deliverables li span {
  color: var(--accent-tertiary);
  font-weight: bold;
}

/* ==========================================================================
   19. INTERACTIVE CODE & ARCHITECTURE TERMINAL (#architecture)
   ========================================================================== */
.terminal-wrapper {
  max-width: 960px;
  margin: 0 auto;
}

.code-terminal {
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 35px rgba(0, 0, 0, 0.6);
}

.terminal-topbar {
  background: #161b22;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.terminal-dots {
  display: flex;
  gap: 7px;
}

.terminal-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.terminal-dots span:nth-child(1) { background: #ff5f56; }
.terminal-dots span:nth-child(2) { background: #ffbd2e; }
.terminal-dots span:nth-child(3) { background: #27c93f; }

.terminal-nav-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.terminal-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #8b949e;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.terminal-tab-btn:hover {
  color: #c9d1d9;
  background: rgba(255, 255, 255, 0.05);
}

.terminal-tab-btn.active {
  color: #58a6ff;
  background: rgba(56, 139, 253, 0.15);
  border-color: rgba(56, 139, 253, 0.3);
}

.terminal-copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #c9d1d9;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.terminal-copy-btn:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: transparent;
}

.terminal-body {
  padding: 1.5rem;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #e6edf3;
  max-height: 480px;
}

.terminal-snippet {
  display: none;
}

.terminal-snippet.active {
  display: block;
}

.terminal-body pre {
  margin: 0;
  white-space: pre;
}

/* Syntax token highlights */
.t-keyword { color: #ff7b72; font-weight: 600; }
.t-function { color: #d2a8ff; }
.t-string { color: #a5d6ff; }
.t-comment { color: #8b949e; font-style: italic; }
.t-variable { color: #ffa657; }
.t-class { color: #7ee787; }
.t-number { color: #79c0ff; }

/* ==========================================================================
   20. INTERACTIVE PROJECT COST & SCOPE ESTIMATOR (#estimator)
   ========================================================================== */
.estimator-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 2.5rem;
  align-items: start;
}

.estimator-controls {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.estimator-step-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.estimator-step-title {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.estimator-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.85rem;
}

.estimator-option-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.92rem;
  font-weight: 600;
}

.estimator-option-label:hover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.08);
}

.estimator-option-label.active {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.15);
  color: var(--text-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.estimator-option-label input {
  accent-color: var(--accent-primary);
  width: 18px;
  height: 18px;
}

/* Estimator Result Summary Card */
.estimator-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  position: sticky;
  top: 100px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.summary-header h3 {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.summary-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.estimate-price-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
}

.estimate-price-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.estimate-price-value {
  font-size: 2.1rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
  margin: 0.3rem 0;
}

.estimate-timeline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--accent-secondary);
  font-weight: 600;
}

.estimate-details-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.estimate-details-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.4rem;
}

.estimate-details-list li span:last-child {
  font-weight: 600;
  color: var(--text-primary);
}

/* ==========================================================================
   21. TECHNICAL INSIGHTS & CASE STUDIES SECTION (#insights)
   ========================================================================== */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.insight-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.insight-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-lg), var(--glow-card);
}

.insight-tag-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.insight-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.12);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
}

.insight-read-time {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.insight-title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.insight-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.insight-metric-pill {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  color: var(--accent-tertiary);
  font-weight: 600;
}

/* ==========================================================================
   22. DISCOVERY CALL SCHEDULER MODAL (#call-modal)
   ========================================================================== */
.call-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
}

.call-info-pane {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.call-agenda-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 1rem;
}

.call-agenda-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.call-slots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.call-slot-btn {
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.call-slot-btn:hover, .call-slot-btn.selected {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: transparent;
}

/* Responsive adjustments for new sections */
@media (max-width: 1024px) {
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .estimator-layout { grid-template-columns: 1fr; }
  .estimator-summary-card { position: static; }
  .insights-grid { grid-template-columns: repeat(2, 1fr); }
  .call-modal-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .process-grid { grid-template-columns: 1fr; }
  .insights-grid { grid-template-columns: 1fr; }
  .estimator-options-grid { grid-template-columns: 1fr; }
  .terminal-nav-tabs { width: 100%; }
  .terminal-tab-btn { flex-grow: 1; justify-content: center; }
  .call-slots-grid { grid-template-columns: 1fr; }
}
