/* ============================================
   DESIGN SYSTEM — Premium Dark Portfolio
   ============================================ */

/* --- Google Font --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Palette */
  --bg-primary: #0a0a0f;
  --bg-secondary: #111119;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);

  --text-primary: #e8e8ed;
  --text-secondary: #8b8b9e;
  --text-muted: #55556a;

  --accent-1: #6c5ce7;
  /* violet */
  --accent-2: #a29bfe;
  /* lavender */
  --accent-3: #00cec9;
  /* teal */
  --accent-4: #fd79a8;
  /* pink */

  --gradient-hero: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 50%, #00cec9 100%);
  --gradient-card: linear-gradient(135deg, rgba(108, 92, 231, .12) 0%, rgba(0, 206, 201, .08) 100%);
  --gradient-border: linear-gradient(135deg, rgba(108, 92, 231, .4), rgba(0, 206, 201, .2));

  --glass-bg: rgba(17, 17, 25, 0.7);
  --glass-border: rgba(255, 255, 255, 0.06);

  --border-subtle: rgba(255, 255, 255, 0.06);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --section-padding: clamp(4rem, 10vw, 8rem) clamp(1.25rem, 5vw, 6rem);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease-out-expo);
  --transition-medium: 0.45s var(--ease-out-expo);
  --transition-slow: 0.7s var(--ease-out-expo);

  /* Misc */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-3);
}

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

::selection {
  background: rgba(108, 92, 231, 0.35);
  color: #fff;
}

/* ============================================
   AMBIENT BACKGROUND BLOBS
   ============================================ */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-blobs .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  animation: blobFloat 20s ease-in-out infinite alternate;
}

.bg-blobs .blob:nth-child(1) {
  width: 600px;
  height: 600px;
  background: var(--accent-1);
  top: -10%;
  left: -5%;
  animation-duration: 25s;
}

.bg-blobs .blob:nth-child(2) {
  width: 500px;
  height: 500px;
  background: var(--accent-3);
  bottom: -10%;
  right: -5%;
  animation-delay: -7s;
  animation-duration: 30s;
}

.bg-blobs .blob:nth-child(3) {
  width: 400px;
  height: 400px;
  background: var(--accent-4);
  top: 40%;
  left: 50%;
  animation-delay: -14s;
  animation-duration: 22s;
}

@keyframes blobFloat {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }

  33% {
    transform: translate(60px, -40px) scale(1.1) rotate(120deg);
  }

  66% {
    transform: translate(-30px, 50px) scale(0.95) rotate(240deg);
  }

  100% {
    transform: translate(20px, -20px) scale(1.05) rotate(360deg);
  }
}

/* ============================================
   DYNAMIC PARTICLE FIELD
   ============================================ */
.particle-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--accent-2);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 15s linear infinite;
}

.particle:nth-child(even) {
  background: var(--accent-3);
  animation-duration: 20s;
  animation-delay: -5s;
}

.particle:nth-child(3n) {
  background: var(--accent-4);
  animation-duration: 18s;
  animation-delay: -10s;
}

@keyframes particleFloat {
  0% {
    opacity: 0;
    transform: translateY(100vh) translateX(0);
  }

  10% {
    opacity: 0.4;
  }

  90% {
    opacity: 0.4;
  }

  100% {
    opacity: 0;
    transform: translateY(-100vh) translateX(50px);
  }
}

/* ============================================
   GRADIENT ORB ANIMATION
   ============================================ */
.gradient-orb {
  position: fixed;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, 
    rgba(108, 92, 231, 0.15) 0%, 
    rgba(162, 155, 254, 0.1) 30%, 
    rgba(0, 206, 201, 0.05) 60%, 
    transparent 100%);
  filter: blur(40px);
  animation: orbFloat 40s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes orbFloat {
  0%, 100% {
    transform: translate(-20%, -20%) scale(1);
  }

  25% {
    transform: translate(30%, -10%) scale(1.1);
  }

  50% {
    transform: translate(10%, 20%) scale(0.9);
  }

  75% {
    transform: translate(-10%, 10%) scale(1.05);
  }
}

/* ============================================
   INTERACTIVE GLOW EFFECTS
   ============================================ */
.mouse-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, 
    rgba(108, 92, 231, 0.08) 0%, 
    rgba(162, 155, 254, 0.04) 30%, 
    transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: -1;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  opacity: 0;
}

/* ============================================
   PULSE ANIMATIONS
   ============================================ */
@keyframes pulse {
  0%, 100% {
    opacity: 0.25;
  }

  50% {
    opacity: 0.4;
  }
}

.bg-blobs .blob {
  animation: blobFloat 20s ease-in-out infinite alternate, pulse 8s ease-in-out infinite;
}

.bg-blobs .blob:nth-child(2) {
  animation-delay: -7s, 2s;
}

.bg-blobs .blob:nth-child(3) {
  animation-delay: -14s, 4s;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(10, 10, 15, 0.65);
  border-bottom: 1px solid var(--glass-border);
  transition: padding var(--transition-medium), background var(--transition-medium);
}

.navbar.scrolled {
  padding: 0.65rem 2rem;
  background: rgba(10, 10, 15, 0.85);
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-hero);
  border-radius: 2px;
  transition: width var(--transition-medium);
}

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

.nav-links a:hover::after {
  width: 100%;
}

/* Mobile menu toggle — hidden on desktop, shown via media query below */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--section-padding);
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
  z-index: 2;
  position: relative;
}

/* Responsive positioning */
@media (max-width: 1200px) {
  .hero-content {
    max-width: 600px;
  }
}

@media (max-width: 768px) {
  .hero-content {
    max-width: 500px;
  }
}

.hero-greeting {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent-3);
  font-family: var(--font-mono);
  margin-bottom: 1rem;
  height: 1.5em; /* Fixed height instead of min-height */
  line-height: 1.5;
  overflow: hidden; /* Hide overflow to prevent layout shifts */
  position: relative; /* For absolute positioning of typed text */
  opacity: 0;
  animation: fadeSlideUp 0.7s var(--ease-out-expo) 0.2s forwards;
}

.hero-name {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeSlideUp 0.7s var(--ease-out-expo) 0.4s forwards;
}

.hero-name .gradient-text {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 600px;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeSlideUp 0.7s var(--ease-out-expo) 0.6s forwards;
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeSlideUp 0.7s var(--ease-out-expo) 0.8s forwards;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-xl);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition-medium);
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--gradient-hero);
  color: #fff;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108, 92, 231, 0.5);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}

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

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  animation: fadeSlideUp 0.7s var(--ease-out-expo) 1.2s forwards;
  opacity: 0;
}

.scroll-indicator .mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-muted);
  border-radius: 14px;
  position: relative;
}

.scroll-indicator .mouse::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: var(--accent-2);
  border-radius: 4px;
  animation: scrollDot 1.8s ease-in-out infinite;
}

@keyframes scrollDot {

  0%,
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  50% {
    opacity: 0.3;
    transform: translateX(-50%) translateY(12px);
  }
}

/* Swipe indicator — mobile only */
.swipe-indicator {
  display: none;
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  animation: fadeSlideUp 0.7s var(--ease-out-expo) 1.2s forwards;
  opacity: 0;
}

.swipe-finger {
  font-size: 1.6rem;
  animation: swipeUp 1.8s ease-in-out infinite;
  display: inline-block;
}

@keyframes swipeUp {
  0%, 100% { transform: translateY(0);    opacity: 1; }
  50%       { transform: translateY(-10px); opacity: 0.4; }
}

@media (max-width: 1024px) {
  .scroll-indicator { display: none; }
  .swipe-indicator  { display: flex; }
}

/* ============================================
   SECTION COMMON
   ============================================ */
.section {
  padding: var(--section-padding);
  position: relative;
}

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

.section-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-3);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-top: 0.75rem;
  max-width: 600px;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--gradient-hero);
  border-radius: 3px;
  margin-top: 1rem;
}

/* ============================================
   EXPERIENCE TIMELINE
   ============================================ */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-1), var(--accent-3), transparent);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-left: 72px;
  margin-bottom: 3rem;
}

.timeline-dot {
  position: absolute;
  left: 20px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-1);
  z-index: 2;
  transition: all var(--transition-fast);
}

.timeline-item:hover .timeline-dot {
  background: var(--accent-1);
  box-shadow: 0 0 20px rgba(108, 92, 231, 0.5);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem 2rem;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.timeline-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.timeline-card:hover {
  border-color: rgba(108, 92, 231, 0.25);
  transform: translateX(6px);
}

.timeline-card:hover::before {
  opacity: 1;
}

.timeline-card>* {
  position: relative;
  z-index: 1;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-2);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.timeline-role {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.timeline-company {
  font-size: 0.95rem;
  color: var(--accent-3);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

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

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-xl);
  background: rgba(108, 92, 231, 0.12);
  color: var(--accent-2);
  font-weight: 500;
  border: 1px solid rgba(108, 92, 231, 0.15);
}

/* ============================================
   EDUCATION SECTION
   ============================================ */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.edu-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-hero);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-medium);
}

.edu-card:hover {
  border-color: rgba(108, 92, 231, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

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

.edu-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-subtle);
}

.edu-degree {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.edu-school {
  color: var(--accent-3);
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.edu-year {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-2);
  margin-bottom: 0.75rem;
}

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

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
}

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

.project-card:hover {
  border-color: rgba(108, 92, 231, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.project-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.project-image::after {
  content: '🔍';
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0;
  transition: all var(--transition-fast);
  z-index: 10;
  cursor: pointer;
}

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

.project-image::after:hover {
  background: var(--accent-1);
  transform: scale(1.1);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  transition: transform var(--transition-slow);
}

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

.project-image .project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 15, 0.9) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-medium);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}

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

.project-overlay-links {
  display: flex;
  gap: 0.75rem;
}

.project-overlay-links a {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-xl);
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  transition: all var(--transition-fast);
}

.project-overlay-links a:hover {
  background: var(--accent-1);
  border-color: var(--accent-1);
  color: #fff;
}

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

.project-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

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

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

.project-tech .tag {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
}

/* ============================================
   CERTIFICATIONS SECTION
   ============================================ */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  max-width: 1100px;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.cert-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.cert-card:hover {
  border-color: rgba(108, 92, 231, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

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

.cert-card>* {
  position: relative;
  z-index: 1;
}

.cert-badge {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.cert-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.cert-issuer {
  font-size: 0.85rem;
  color: var(--accent-3);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.cert-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.skill-category::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.skill-category:hover {
  border-color: rgba(108, 92, 231, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.skill-category:hover::after {
  opacity: 1;
}

.skill-category > * {
  position: relative;
  z-index: 1;
}

.skill-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.skill-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

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

.skill-tags .tag {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.skill-tags .tag:hover {
  background: rgba(108, 92, 231, 0.15);
  border-color: rgba(108, 92, 231, 0.3);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-2);
}

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

/* ============================================
   SCROLL-REVEAL ANIMATION CLASSES
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  animation: fadeSlideUp 0.7s var(--ease-out-expo);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}

/* Force animation restart */
.reveal.visible {
  animation: fadeSlideUp 0.7s var(--ease-out-expo) forwards;
}

.reveal:not(.visible) {
  animation: none;
}

/* ============================================
   KEYFRAMES
   ============================================ */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

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

/* ============================================
   IMAGE MODAL
   ============================================ */
.image-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  position: relative;
  margin: auto;
  padding: 0;
  width: 90%;
  max-width: 900px;
  height: 90%;
  max-height: 700px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: slideIn 0.3s ease;
}

.modal-content img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 2001;
}

.modal-close:hover {
  background: var(--accent-1);
  transform: scale(1.1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-50%) scale(0.8);
  }

  to {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .navbar {
    padding: 0.6rem 1rem;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .nav-logo {
    font-size: 1.1rem;
  }

  .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.8rem;
    justify-content: flex-end;
  }

  .nav-links a {
    font-size: 0.72rem;
    padding-bottom: 1px;
  }

  .nav-toggle {
    display: none;
  }

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

  .timeline-item {
    padding-left: 52px;
  }

  .timeline-dot {
    left: 8px;
  }

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

  .certs-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  .nav-links {
    gap: 0.3rem 0.5rem;
  }

  .nav-links a {
    font-size: 0.65rem;
  }
}

/* ============================================
   FLOATING CHAT ICON
   ============================================ */
.chat-toggle-icon {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--gradient-hero);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 998;
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4);
    transition: all var(--transition-medium);
    animation: bounceIn 0.6s var(--ease-out-expo);
}

.chat-toggle-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(108, 92, 231, 0.6);
}

.chat-toggle-icon:active {
    transform: scale(0.95);
}

.chat-icon-symbol {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.chat-notification {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    background: var(--accent-4);
    border-radius: 50%;
    border: 2px solid white;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.chat-notification.show {
    opacity: 1;
    animation: pulse 2s infinite;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   CHAT INTERFACE STYLING
   ============================================ */

.hero {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }
}

.chat-container {
    position: fixed;
    top: 90px;
    right: 20px;
    width: 380px;
    height: 500px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: var(--transition-medium);
    z-index: 1000;
    resize: both;
    min-width: 300px;
    min-height: 400px;
    max-width: 600px;
    max-height: 800px;
}

.chat-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.chat-container.minimized {
    height: auto !important;
}

.chat-container.minimized .chat-body {
    display: none;
}

@media (max-width: 1024px) {
  .chat-container {
    width: 90vw;
    max-width: 400px;
    height: 60vh;
    min-height: 350px;
    right: 5vw;
    left: 5vw;
  }
  
  .chat-toggle-icon {
    top: 75px;
    right: 15px;
    width: 50px;
    height: 50px;
  }
  
  .chat-icon-symbol {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .chat-container {
    width: 95vw;
    height: 70vh;
    right: 2.5vw;
    left: 2.5vw;
    top: 80px;
  }
  
  .chat-toggle-icon {
    width: 45px;
    height: 45px;
    top: 70px;
    right: 10px;
  }
  
  .chat-icon-symbol {
    font-size: 1.3rem;
  }
}

.chat-header {
  background: var(--gradient-card);
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  user-select: none;
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.chat-icon {
  font-size: 1.1rem;
}

.chat-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.chat-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1;
}

.chat-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  cursor: se-resize;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

.resize-handle::before {
  content: '';
  position: absolute;
  bottom: 3px;
  right: 3px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 10px 10px;
  border-color: transparent transparent var(--text-muted) transparent;
}

.resize-handle:hover {
  opacity: 1;
}

.chat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-body.collapsed {
  display: none;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.1);
}

.message {
  display: flex;
  gap: 0.75rem;
  animation: messageSlideIn 0.3s var(--ease-out-expo);
}

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

.bot-message {
  align-self: flex-start;
}

.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.bot-message .message-avatar {
  background: var(--gradient-hero);
  color: white;
}

.user-message .message-avatar {
  background: var(--bg-card-hover);
  color: var(--text-secondary);
}

.message-content {
  background: var(--bg-card);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  max-width: 80%;
  word-wrap: break-word;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.user-message .message-content {
  background: var(--gradient-card);
  border-color: rgba(108, 92, 231, 0.2);
}

.chat-input-container {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.chat-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  transition: var(--transition-fast);
  outline: none;
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.chat-input:focus {
  border-color: var(--accent-1);
  background: rgba(108, 92, 231, 0.05);
}

.chat-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-send-btn {
  background: var(--gradient-hero);
  border: none;
  border-radius: 8px;
  padding: 0.75rem;
  color: white;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
}

.chat-send-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.chat-status {
  padding: 0.5rem 1.25rem;
  border-top: 1px solid var(--glass-border);
  background: var(--bg-card);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-status.typing {
  color: var(--accent-1);
}

.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-left: 8px;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-1);
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: -0.16s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0s;
}

@keyframes typingBounce {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.chat-status.error {
  color: var(--accent-4);
}

.chat-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .chat-header {
    padding: 0.875rem 1rem;
  }
  
  .chat-messages {
    padding: 1rem;
  }
  
  .chat-input-container {
    padding: 0.875rem 1rem;
  }
  
  .message-content {
    max-width: 85%;
    font-size: 0.85rem;
  }
}