/* ========================================
   CodeByIsrael Portfolio Styles
   Modern, Premium Design System
   ======================================== */

/* CSS Variables - Enhanced Color Palette */
:root {
  /* Dark Theme Base */
  --bg: #0a0e27;
  --bg-secondary: #131829;
  --bg-tertiary: #1a1f3a;
  
  /* Glass & Cards */
  --glass: rgba(255, 255, 255, 0.05);
  --glass-hover: rgba(255, 255, 255, 0.08);
  --card: rgba(26, 31, 58, 0.6);
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #b4bcd0;
  --text-muted: #8892a6;
  
  /* Vibrant Accents */
  --accent: #6366f1;
  --accent-2: #ec4899;
  --accent-3: #8b5cf6;
  --accent-glow: rgba(99, 102, 241, 0.4);
  
  /* Borders & Effects */
  --border: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255, 255, 255, 0.05);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  --glow: 0 0 40px var(--accent-glow);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-secondary: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Sora", "Space Grotesk", system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  background: var(--bg);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 20%),
    radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
  background-attachment: fixed;
  line-height: 1.6;
  scroll-behavior: smooth;
  overflow-x: hidden;
  position: relative;
  -webkit-tap-highlight-color: rgba(99, 102, 241, 0.3);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Animated background particles */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.15), transparent),
    radial-gradient(2px 2px at 60% 70%, rgba(255, 255, 255, 0.1), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.1), transparent),
    radial-gradient(1px 1px at 80% 10%, rgba(255, 255, 255, 0.15), transparent);
  background-size: 200% 200%;
  animation: particles 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes particles {
  0%, 100% { background-position: 0% 0%, 100% 100%, 50% 50%, 80% 20%; }
  50% { background-position: 100% 100%, 0% 0%, 80% 80%, 20% 80%; }
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* Container */
.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ========================================
   Navigation - Glass Effect
   ======================================== */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  background: rgba(10, 14, 39, 0.8);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Space Grotesk", "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  transition: transform 0.3s ease;
}

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

.brand .logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
}

.brand:hover .logo {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  transform: rotate(-5deg) scale(1.05);
}

.brand .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gradient-primary);
  box-shadow: 0 0 20px var(--accent-glow);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); box-shadow: 0 0 20px var(--accent-glow); }
  50% { transform: scale(1.1); box-shadow: 0 0 30px var(--accent-glow); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 10px 18px;
  border-radius: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
}

.nav-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--glass-hover);
  transition: left 0.3s ease;
  z-index: -1;
}

.nav-links a:hover::before,
.nav-links a.active::before {
  left: 0;
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
  transition: all 0.3s ease;
}

.mobile-menu-toggle span {
  width: 28px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover span {
  background: var(--accent);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

.pill-btn {
  padding: 12px 24px;
  border-radius: 50px;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
  position: relative;
  overflow: hidden;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pill-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #6366f1 100%);
  transition: left 0.3s ease;
}

.pill-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.pill-btn:hover::before {
  left: 0;
}

.pill-btn span {
  position: relative;
  z-index: 1;
}

/* ========================================
   Layout
   ======================================== */
header, section {
  padding: 120px 0;
  position: relative;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.section-sub {
  color: var(--text-secondary);
  max-width: 680px;
  margin-bottom: 48px;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* ========================================
   Hero Section - Enhanced
   ======================================== */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 60px;
  min-height: 80vh;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-radius: 50px;
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
}

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

.eyebrow .pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.2);
  animation: pulse-ring 2s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0); }
}

.hero h1 {
  font-size: clamp(2.8rem, 5vw, 4rem);
  line-height: 1.15;
  margin: 24px 0 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 0%, #b4bcd0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-secondary);
  max-width: 620px;
  margin-bottom: 28px;
  font-size: 1.1rem;
  line-height: 1.8;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 36px;
}

.chip {
  padding: 12px 20px;
  border-radius: 50px;
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.chip:hover {
  background: var(--glass-hover);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.ghost-btn {
  padding: 14px 28px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-weight: 600;
  transition: all 0.3s ease;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ghost-btn:hover {
  background: var(--glass-hover);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.2);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0.1;
  transition: left 0.5s ease;
}

.stat-card:hover::before {
  left: 0;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 20px 50px rgba(99, 102, 241, 0.3);
}

.stat-card h3 {
  font-size: 2.5rem;
  margin-bottom: 8px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card p {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  align-self: center;
}

.profile-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--accent) 0deg,
    var(--accent-3) 120deg,
    var(--accent-2) 240deg,
    var(--accent) 360deg
  );
  filter: blur(30px);
  opacity: 0.6;
  transform: translate(-50%, -50%) rotate(0deg);
  animation: rotate 10s linear infinite;
  z-index: 0;
}

@keyframes rotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.profile-pic {
  position: relative;
  display: block;
  width: 280px;
  height: 280px;
  border-radius: 28px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.18);
  outline: 1px solid rgba(99, 102, 241, 0.45);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(99, 102, 241, 0.22);
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease, outline-color 0.3s ease;
}

.profile-pic:hover {
  transform: translateY(-4px) scale(1.03);
  outline-color: rgba(236, 72, 153, 0.65);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.56), 0 0 42px rgba(236, 72, 153, 0.24);
}

/* ========================================
   Projects Section - Enhanced Cards
   ======================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

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

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 30px 60px rgba(99, 102, 241, 0.4);
}

.project-card h3 {
  margin: 12px 0 16px;
  font-size: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.project-card p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.7;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.tag {
  padding: 8px 16px;
  border-radius: 50px;
  background: var(--glass);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(10px);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.tag:hover {
  background: var(--glass-hover);
  border-color: var(--accent);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.project-links {
  display: flex;
  gap: 16px;
  align-items: center;
  font-weight: 600;
}

.project-links a {
  color: var(--accent);
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.project-links a:hover {
  border-color: var(--accent);
  background: var(--glass);
  transform: translateX(3px);
}

/* ========================================
   Skills / Capabilities Section
   ======================================== */
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.capability {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.capability::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.capability:hover::before {
  opacity: 0.05;
}

.capability:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 25px 50px rgba(99, 102, 241, 0.3);
}

.capability h4 {
  margin-bottom: 14px;
  font-size: 1.3rem;
  position: relative;
  z-index: 1;
}

.capability p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.skill-pill {
  padding: 10px 16px;
  border-radius: 50px;
  background: var(--glass);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.skill-pill:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

/* ========================================
   Experience & Education Timeline
   ======================================== */
.timeline {
  position: relative;
  display: grid;
  gap: 24px;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--gradient-primary);
  border-radius: 10px;
  box-shadow: 0 0 20px var(--accent-glow);
}

.timeline-item {
  position: relative;
  padding-left: 30px;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient-primary);
  box-shadow: 0 0 20px var(--accent-glow);
  border: 3px solid var(--bg);
  animation: pulse-dot-timeline 2s ease-in-out infinite;
  z-index: 2;
}

@keyframes pulse-dot-timeline {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.timeline-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 28px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.timeline-card:hover {
  transform: translateX(10px);
  border-color: var(--accent);
  box-shadow: 0 20px 50px rgba(99, 102, 241, 0.3);
}

.timeline-card h4 {
  margin-bottom: 10px;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.timeline-card span {
  font-weight: 600;
  color: var(--accent-2);
  font-size: 0.9rem;
  display: inline-block;
  margin-bottom: 8px;
}

.timeline-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========================================
   Resume CTA
   ======================================== */
.resume-cta {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.resume-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0.05;
}

.resume-cta h3 {
  position: relative;
  z-index: 1;
}

.resume-cta p {
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

.resume-cta .pill-btn {
  position: relative;
  z-index: 1;
}

/* ========================================
   Contact Section
   ======================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

form {
  display: grid;
  gap: 20px;
}

input, textarea {
  width: 100%;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  transition: all 0.3s ease;
  font-family: inherit;
  font-size: 1rem;
  min-height: 48px;
  -webkit-appearance: none;
  appearance: none;
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--glass-hover);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

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

.submit-btn {
  padding: 16px 32px;
  border-radius: 14px;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #6366f1 100%);
  transition: left 0.3s ease;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 45px rgba(99, 102, 241, 0.4);
}

.submit-btn:hover::before {
  left: 0;
}

.submit-btn span {
  position: relative;
  z-index: 1;
}

/* ========================================
   Footer
   ======================================== */
footer {
  padding: 50px 0;
  text-align: center;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  margin-top: 60px;
  position: relative;
}

footer p {
  font-size: 0.95rem;
}

/* ========================================
   Animations
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll indicator */
@keyframes scroll-hint {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(10px); opacity: 0.5; }
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
  header, section {
    padding: 80px 0;
  }
  
  .hero {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 40px;
  }
  
  .hero-visual {
    justify-content: flex-start;
  }
  
  .hero-visual .profile-pic {
    width: 280px;
    height: 280px;
  }
  
  .hero-visual .profile-ring {
    width: 320px;
    height: 320px;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  .capabilities-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
  
  .nav-inner {
    justify-content: space-between;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: 77px;
    right: -100%;
    width: 280px;
    height: calc(100vh - 77px);
    background: rgba(10, 14, 39, 0.98);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 32px 24px;
    gap: 8px;
    overflow-y: auto;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links a {
    padding: 16px 20px;
    text-align: left;
    font-size: 1.05rem;
    border-radius: 12px;
  }
  
  .nav-links .pill-btn {
    margin-top: 16px;
    text-align: center;
  }
  
  header, section {
    padding: 60px 0;
  }
  
  .hero h1 {
    font-size: 2.2rem;
    line-height: 1.2;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .hero-actions {
    width: 100%;
    flex-direction: column;
    gap: 12px;
  }
  
  .hero-actions a {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  
  .chip {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
  
  .stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
  
  .profile-pic {
    width: 220px;
    height: 220px;
  }
  
  .profile-ring {
    width: 260px;
    height: 260px;
  }
  
  .timeline {
    padding-left: 30px;
  }
  
  .resume-cta {
    text-align: center;
    flex-direction: column;
    align-items: stretch;
  }
  
  .resume-cta .pill-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    width: 90vw;
  }
  
  nav {
    padding: 0;
  }
  
  .nav-inner {
    padding: 16px 0;
  }
  
  .brand {
    font-size: 1rem;
  }
  
  .brand .logo {
    width: 36px;
    height: 36px;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .section-sub {
    font-size: 1rem;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero p {
    font-size: 0.95rem;
  }
  
  .eyebrow {
    font-size: 0.85rem;
    padding: 8px 16px;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .project-card {
    padding: 24px;
  }
  
  .project-card h3 {
    font-size: 1.3rem;
  }
  
  .capabilities-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .capability {
    padding: 24px;
  }
  
  .capability h4 {
    font-size: 1.2rem;
  }
  
  .stat-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .profile-pic {
    width: 200px;
    height: 200px;
  }
  
  .profile-ring {
    width: 240px;
    height: 240px;
  }
  
  header, section {
    padding: 48px 0;
  }
  
  .timeline-card h4 {
    font-size: 1rem;
  }
  
  .timeline-card p {
    font-size: 0.95rem;
  }
  
  .nav-links {
    width: 100%;
    top: 69px;
    height: calc(100vh - 69px);
  }
}

/* ========================================
   Utility Classes
   ======================================== */
.relative {
  position: relative;
}

.z-10 {
  z-index: 10;
}

.overflow-hidden {
  overflow: hidden;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .chip:hover,
  .ghost-btn:hover,
  .pill-btn:hover,
  .stat-card:hover {
    transform: none;
  }
  
  .chip:active,
  .ghost-btn:active,
  .pill-btn:active {
    transform: scale(0.98);
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-2);
}

/* Selection */
::selection {
  background: var(--accent);
  color: white;
}
