/* ==========================================================================
   Migari Kaushalya - Portfolio Design System & Styling
   ========================================================================== */

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

:root {
  /* Dark Theme Palette */
  --bg-primary: #090d16;
  --bg-secondary: #111726;
  --bg-card: rgba(17, 23, 38, 0.75);
  --bg-card-hover: rgba(25, 34, 56, 0.9);
  --bg-glass: rgba(15, 23, 42, 0.75);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-secondary: #06b6d4;
  --accent-tertiary: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(99, 102, 241, 0.35);
  
  --glow-primary: rgba(99, 102, 241, 0.25);
  --glow-secondary: rgba(6, 182, 212, 0.25);
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.35);
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Overrides */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-glass: rgba(255, 255, 255, 0.85);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --border-color: rgba(0, 0, 0, 0.08);
  --border-highlight: rgba(99, 102, 241, 0.4);
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.25;
  font-weight: 700;
}

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

ul { list-style: none; }
img { max-width: 100%; display: block; }

/* Background Mesh Glow */
.bg-mesh {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.mesh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  animation: floatOrb 20s infinite alternate ease-in-out;
}

.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--accent-primary), transparent 70%);
  top: -100px; left: -100px;
}

.orb-2 {
  width: 450px; height: 450px;
  background: radial-gradient(circle, var(--accent-secondary), transparent 70%);
  bottom: 10%; right: -50px;
  animation-delay: -7s;
}

.orb-3 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, var(--accent-tertiary), transparent 70%);
  top: 40%; left: 30%;
  animation-delay: -12s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-40px, 80px) scale(0.95); }
}

.grid-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 0);
  background-size: 32px 32px;
  z-index: -1;
  pointer-events: none;
}

[data-theme="light"] .grid-overlay {
  background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 0);
}

/* Container & Sections */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 5.5rem 0;
  position: relative;
}

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

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

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

/* Header & Navbar */
.navbar {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.75rem 1.75rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.navbar.scrolled {
  top: 0.75rem;
  box-shadow: var(--shadow-lg);
  border-color: var(--border-highlight);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.logo .dot {
  color: var(--accent-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

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

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

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

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

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

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

.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 60%);
  transform: rotate(45deg);
  transition: 0.5s ease;
  opacity: 0;
}

.btn-glow:hover::before {
  opacity: 1;
}

.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  border-color: var(--accent-primary);
  transform: rotate(15deg);
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding-top: 9rem;
  padding-bottom: 5rem;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

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

.hero-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.badge-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--accent-primary);
}

.badge-mozilla {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
}

.badge-ieee {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.3);
  color: var(--accent-secondary);
}

.badge-leo {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--accent-amber);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-title {
  background: linear-gradient(135deg, #0f172a 40%, var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.4rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 1.25rem;
  min-height: 2.2rem;
}

.typing-text {
  color: var(--accent-secondary);
  font-weight: 700;
  border-right: 2px solid var(--accent-secondary);
  padding-right: 4px;
  animation: blink 0.75s infinite;
}

@keyframes blink {
  0%, 100% { border-color: transparent; }
  50% { border-color: var(--accent-secondary); }
}

.hero-description {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Social Icon Bar */
.social-links {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.social-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}

.social-btn:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 15px rgba(99, 102, 241, 0.4);
}

/* Profile Photo Box with Animated Glow */
.hero-visual-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.profile-avatar-container {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 0 auto;
  border-radius: 50%;
  padding: 8px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-rose));
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.4);
  animation: pulseGlow 6s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 30px rgba(99, 102, 241, 0.3); }
  100% { box-shadow: 0 0 60px rgba(6, 182, 212, 0.6); }
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--bg-primary);
  transition: var(--transition);
}

.profile-avatar-container:hover .profile-img {
  transform: scale(1.03);
}

.profile-badge-overlay {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-highlight);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: var(--shadow-sm);
}

/* Code Window Component */
.code-window {
  width: 100%;
  max-width: 480px;
  background: #0d1117;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-mono);
}

.code-header {
  background: #161b22;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.mac-btn {
  width: 10px; height: 10px; border-radius: 50%;
}
.mac-btn.close { background: #ff5f56; }
.mac-btn.minimize { background: #ffbd2e; }
.mac-btn.maximize { background: #27c93f; }

.code-title {
  font-size: 0.8rem;
  color: #8b949e;
  display: flex; align-items: center; gap: 0.4rem;
}

.status-live {
  display: flex; align-items: center; gap: 0.3rem;
  font-size: 0.7rem; color: #3fb950; font-weight: 700;
}

.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #3fb950;
  animation: pulse 1.5s infinite;
}

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

.code-tabs {
  display: flex;
  background: #010409;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-tab {
  padding: 0.5rem 0.9rem;
  font-size: 0.75rem;
  color: #8b949e;
  cursor: pointer;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.code-tab.active {
  background: #0d1117;
  color: #58a6ff;
  border-bottom: 2px solid #58a6ff;
}

.code-body-container {
  padding: 1rem;
  font-size: 0.82rem;
  line-height: 1.6;
}

.code-body { display: none; }
.code-body.active { display: block; }

.line-num { color: #484f58; margin-right: 0.75rem; user-select: none; }
.keyword { color: #ff7b72; }
.string { color: #a5d6ff; }
.comment { color: #8b949e; font-style: italic; }
.method { color: #d2a8ff; }
.variable { color: #79c0ff; }
.module { color: #ffa657; }
.class { color: #f0883e; }

/* About Me Grid */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

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

.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

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

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

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

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

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: var(--transition);
  backdrop-filter: blur(12px);
}

.skill-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.skill-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}

.skill-card-title {
  font-size: 1.15rem;
  font-weight: 700;
}

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

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

/* Real tech-brand logo strip inside each skill card */
.skill-logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 0;
  margin-bottom: 1.1rem;
  border-top: 1px dashed var(--border-color);
  border-bottom: 1px dashed var(--border-color);
}

.skill-logo-row img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: grayscale(15%);
  transition: var(--transition);
}

.skill-logo-row img:hover {
  transform: translateY(-3px) scale(1.08);
  filter: none;
}

/* Marquee logo strip under the hero section */
.tech-marquee-wrap {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.tech-marquee-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.tech-marquee-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee-scroll 22s linear infinite;
}

.tech-marquee-track .marquee-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
  font-family: var(--font-mono);
}

.tech-marquee-track img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .tech-marquee-track { animation: none; }
}

/* Projects Showcase Cards */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 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;
  box-shadow: var(--shadow-sm);
}

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

.project-banner {
  height: 220px;
  position: relative;
  overflow: hidden;
  background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: center;
}

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

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

.project-overlay-badge {
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-secondary);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

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

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

.project-caption {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.project-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  font-weight: 600;
}

.project-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.project-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-primary);
  cursor: pointer;
}

.project-btn:hover {
  gap: 0.75rem;
  color: var(--accent-primary-hover);
}

/* Certificates Grid */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

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

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

.cert-badge-icon {
  width: 50px; height: 50px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}

.cert-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.cert-issuer {
  font-size: 0.88rem;
  color: var(--accent-secondary);
  font-weight: 600;
}

.cert-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Leadership Timeline */
.timeline {
  position: relative;
  max-width: 850px;
  margin: 0 auto 3rem auto;
  padding-left: 2rem;
  border-left: 2px solid var(--border-color);
}

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

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

.timeline-dot {
  position: absolute;
  left: -2.4rem;
  top: 0.25rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 10px var(--accent-primary);
}

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

.timeline-content:hover {
  border-color: var(--border-highlight);
}

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

.timeline-org {
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}

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

.volunteering-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.vol-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  transition: var(--transition);
}

.vol-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-secondary);
}

.vol-badge {
  width: 42px; height: 42px;
  border-radius: 50%;
  margin: 0 auto 0.75rem auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}

.vol-badge.mozilla { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }
.vol-badge.ieee { background: rgba(6, 182, 212, 0.15); color: var(--accent-secondary); }
.vol-badge.leo { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.vol-badge.sasnaka { background: rgba(16, 185, 129, 0.15); color: var(--accent-tertiary); }

.vol-title { font-size: 1rem; margin-bottom: 0.2rem; }
.vol-role { font-size: 0.8rem; color: var(--accent-primary); font-weight: 600; margin-bottom: 0.4rem; }
.vol-desc { font-size: 0.8rem; color: var(--text-secondary); }

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

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

.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: var(--transition);
}

.contact-info-card:hover {
  border-color: var(--accent-primary);
  transform: translateX(6px);
}

.contact-icon-box {
  width: 50px; height: 50px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.contact-detail-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
}

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

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  backdrop-filter: blur(16px);
}

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

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

.form-input, .form-textarea {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

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

/* Modal Popup & Viewer */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

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

.modal-close {
  position: absolute;
  top: 1.25rem; right: 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-primary);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--accent-rose);
  color: #fff;
}

.pdf-viewer-frame {
  width: 100%;
  height: 600px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

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

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

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

.back-to-top {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}

.back-to-top:hover {
  background: var(--accent-primary);
  color: #ffffff;
  transform: translateY(-4px);
}

/* Toast Message */
.toast-msg {
  position: fixed;
  bottom: 2rem; right: 2rem;
  background: var(--accent-tertiary);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  z-index: 3000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.toast-msg.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .hero-grid, .about-grid, .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero-title { font-size: 2.75rem; }
  .profile-avatar-container { width: 260px; height: 260px; }
  .code-window { max-width: 100%; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 5rem; left: 5%;
    width: 90%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-md);
    flex-direction: column;
    padding: 2rem;
    display: none;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.active { display: flex; }
  .mobile-toggle { display: block; }
  .section-title { font-size: 2rem; }
  .modal-content { padding: 1.5rem; }
  .pdf-viewer-frame { height: 400px; }
}

/* ==========================================================================
   Portfolio Visual Upgrade - richer cards, thumbnails & icon details
   ========================================================================== */
.nav-link { display: inline-flex; align-items: center; gap: .38rem; }
.nav-link-icon { width: 15px; height: 15px; stroke-width: 2; opacity: .9; }
.nav-link:hover .nav-link-icon, .nav-link.active .nav-link-icon { transform: translateY(-1px); }
.section-tag svg { width: 15px; height: 15px; }

.project-banner { isolation: isolate; }
.project-visual-img { object-fit: cover; filter: saturate(1.08) contrast(1.04); }
.project-image-shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(5,8,20,.05) 20%, rgba(5,8,20,.62) 100%);
}
.project-banner .project-overlay-badge { z-index: 3; }
.project-status { display: inline-flex; align-items: center; gap: .35rem; }
.project-status svg { width: 14px; height: 14px; }
.project-card { overflow: hidden; }
.project-card:hover .project-visual-img { transform: scale(1.055); }

/* Certificate preview thumbnails */
.cert-thumb {
  width: calc(100% + 3.5rem);
  height: 145px;
  margin: -1.75rem -1.75rem .25rem;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(99,102,241,.14), rgba(6,182,212,.12));
  border-bottom: 1px solid var(--border-color);
  position: relative;
}
.cert-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(7,10,20,.38));
  pointer-events: none;
}
.cert-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.cert-card:hover .cert-thumb img { transform: scale(1.04); }

/* Leadership icons */
.timeline-role-row { display: flex; align-items: center; gap: .75rem; margin-bottom: .25rem; }
.timeline-role-row .timeline-role { margin-bottom: 0; }
.timeline-role-icon {
  width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent-primary);
  background: rgba(99,102,241,.13);
  border: 1px solid rgba(99,102,241,.22);
}
.timeline-role-icon svg { width: 18px; height: 18px; }
.timeline-item:nth-child(2) .timeline-role-icon { color: var(--accent-secondary); background: rgba(6,182,212,.13); border-color: rgba(6,182,212,.22); }
.timeline-item:nth-child(3) .timeline-role-icon { color: var(--accent-amber); background: rgba(245,158,11,.13); border-color: rgba(245,158,11,.22); }
.timeline-item:nth-child(4) .timeline-role-icon { color: var(--accent-tertiary); background: rgba(16,185,129,.13); border-color: rgba(16,185,129,.22); }
.timeline-content:hover .timeline-role-icon { transform: rotate(-4deg) scale(1.05); }

/* Floating tech icons around the profile */
.profile-avatar-container { isolation: isolate; }
.float-icon {
  position: absolute; z-index: 5;
  width: 48px; height: 48px;
  border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15,23,42,.82);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
  animation: floatTech 4s ease-in-out infinite;
}
.float-icon svg { width: 22px; height: 22px; }
.float-code { top: 12px; left: -18px; color: var(--accent-primary); }
.float-design { right: -16px; top: 82px; color: var(--accent-rose); animation-delay: -1.3s; }
.float-iot { left: 12px; bottom: -8px; color: var(--accent-tertiary); animation-delay: -2.2s; }
@keyframes floatTech { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(2deg); } }

@media (max-width: 700px) {
  .nav-link-icon { width: 16px; height: 16px; }
  .cert-thumb { height: 125px; }
  .float-icon { width: 42px; height: 42px; border-radius: 13px; }
  .float-code { left: -8px; }
  .float-design { right: -7px; }
}

/* --- Enhanced social brand icons --- */
.brand-mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-family:Arial,sans-serif;
  font-weight:800;
  line-height:1;
}
.linkedin-mark{font-size:20px; letter-spacing:-1px;}
.facebook-mark{font-size:25px; font-family:Arial,sans-serif;}

/* --- Extra profile technology icons --- */
.float-database{right:-18px; bottom:28px; color:#a78bfa; animation-delay:-2.8s;}
.float-education{left:72px; top:-20px; color:#f59e0b; animation-delay:-3.4s;}
.float-web{right:62px; bottom:-20px; color:#22d3ee; animation-delay:-4s;}

.profile-avatar-container .float-icon{
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.profile-avatar-container .float-icon:hover{
  transform:translateY(-6px) scale(1.12);
  border-color:var(--accent-primary);
  box-shadow:0 14px 35px rgba(99,102,241,.35);
  animation-play-state:paused;
}

/* --- About section icon treatment --- */
.about-intro-title{
  display:flex;
  align-items:center;
  gap:.7rem;
  font-size:1.6rem;
  margin-bottom:1rem;
  color:var(--accent-primary);
}
.about-title-icon{
  width:42px;
  height:42px;
  flex:0 0 42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:13px;
  background:linear-gradient(135deg,rgba(99,102,241,.18),rgba(6,182,212,.14));
  border:1px solid var(--border-highlight);
  color:var(--accent-secondary);
}
.about-title-icon svg{width:21px;height:21px;}

/* --- Stats icons --- */
.stat-icon{
  width:42px;
  height:42px;
  margin:0 auto .65rem;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  color:var(--accent-secondary);
  background:rgba(6,182,212,.10);
  border:1px solid rgba(6,182,212,.20);
  transition:var(--transition);
}
.stat-icon svg{width:20px;height:20px;}
.stat-item:hover .stat-icon{
  color:#fff;
  background:var(--accent-primary);
  border-color:var(--accent-primary);
  transform:rotate(-4deg) scale(1.08);
}

/* Give the social row a stronger visual presence */
.social-links{
  display:flex;
  align-items:center;
  gap:.75rem;
  margin-top:1.25rem;
}
.social-btn{
  position:relative;
}
.social-btn::after{
  content:"";
  position:absolute;
  inset:-4px;
  border-radius:50%;
  border:1px solid transparent;
  transition:.25s ease;
}
.social-btn:hover::after{
  border-color:rgba(99,102,241,.35);
  transform:scale(1.08);
}

@media (max-width:700px){
  .float-database{right:-7px; bottom:28px;}
  .float-education{left:45px; top:-12px;}
  .float-web{right:42px; bottom:-12px;}
  .about-intro-title{font-size:1.35rem;}
}


/* ===== About GitHub card ===== */
.stat-github-item {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.stat-github-item::after {
  content: "";
  position: absolute;
  inset: -40% -20%;
  background: radial-gradient(circle, rgba(129, 140, 248, .16), transparent 58%);
  opacity: 0;
  transition: opacity .35s ease;
}
.stat-github-item:hover::after { opacity: 1; }
.stat-github-item:hover .stat-icon {
  transform: translateY(-5px) rotate(-4deg) scale(1.08);
}
.stat-github-item .stat-icon {
  transition: transform .35s ease;
}

/* ===== Project cards motion ===== */
.projects-grid {
  perspective: 1000px;
}
.project-card {
  opacity: 0;
  transform: translateY(42px) scale(.97);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease;
  will-change: transform, opacity;
}
.project-card.project-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.project-card:nth-child(1) { transition-delay: .05s; }
.project-card:nth-child(2) { transition-delay: .18s; }
.project-card:nth-child(3) { transition-delay: .31s; }

.project-card.project-visible:hover {
  transform: translateY(-10px) rotateX(1deg);
}

/* Gentle floating motion after cards appear */
.project-card.project-visible .project-banner {
  animation: projectFloat 5s ease-in-out infinite;
}
.project-card:nth-child(2).project-visible .project-banner {
  animation-delay: -.9s;
}
.project-card:nth-child(3).project-visible .project-banner {
  animation-delay: -1.8s;
}
@keyframes projectFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-card.project-visible,
  .project-card.project-visible .project-banner {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

@media (min-width: 900px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 899px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr; }
}


/* --- Project image gallery in details modal --- */
.project-modal-gallery{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:1rem;
  margin:0 0 1.75rem;
}
.project-modal-gallery-item{
  margin:0;
  border-radius:var(--radius-md);
  overflow:hidden;
  border:1px solid var(--border-color);
  background:var(--bg-card);
  aspect-ratio:16/10;
}
.project-modal-gallery-item img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  transition:transform .4s ease;
}
.project-modal-gallery-item:hover img{ transform:scale(1.04); }

@media (max-width:700px){
  .project-modal-gallery{ grid-template-columns:1fr; }
}

.project-banner-gallery-grid{
  width:100%;
  height:100%;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:3px;
}
.project-banner-gallery-grid .project-img{
  min-width:0;
  min-height:0;
}
.project-banner-gallery-grid .project-img:last-child{
  object-position:center;
}


/* =========================
   Premium Skill Card Motion
   ========================= */
.skills-grid {
  perspective: 1200px;
}

.skill-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  animation: skillFloat 6s ease-in-out infinite;
  will-change: transform;
}

.skill-card:nth-child(2) { animation-delay: -1.5s; }
.skill-card:nth-child(3) { animation-delay: -3s; }
.skill-card:nth-child(4) { animation-delay: -4.5s; }

.skill-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -2;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 20%, rgba(99, 102, 241, 0.22), transparent 55%);
  transform: translateX(-120%);
  transition: transform 0.8s ease;
}

.skill-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -80px;
  top: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.18), transparent 70%);
  z-index: -1;
  transition: transform 0.6s ease;
}

.skill-card:hover {
  transform: translateY(-10px) rotateX(2deg) scale(1.015);
}

.skill-card:hover::before {
  transform: translateX(120%);
}

.skill-card:hover::after {
  transform: scale(1.5);
}

.skill-logo-row img {
  animation: skillIconPulse 3.5s ease-in-out infinite;
}

.skill-logo-row img:nth-child(2) { animation-delay: .25s; }
.skill-logo-row img:nth-child(3) { animation-delay: .5s; }
.skill-logo-row img:nth-child(4) { animation-delay: .75s; }
.skill-logo-row img:nth-child(5) { animation-delay: 1s; }
.skill-logo-row img:nth-child(6) { animation-delay: 1.25s; }

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

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

/* Cleaner project cards with a subtle entrance motion */
.project-card {
  transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s ease, border-color .35s ease;
}

.project-card:hover {
  transform: translateY(-9px);
}

/* Contact cards feel more interactive */
.contact-info-card {
  transition: transform .35s ease, border-color .35s ease, background .35s ease;
}

.contact-info-card:hover {
  transform: translateX(6px);
}

/* Respect accessibility preferences */
@media (prefers-reduced-motion: reduce) {
  .skill-card,
  .skill-logo-row img {
    animation: none !important;
  }

  .skill-card:hover,
  .project-card:hover,
  .contact-info-card:hover {
    transform: none;
  }
}

/* Profile Technology Orbit */
.profile-avatar-container {
  isolation: isolate;
  overflow: visible;
}
.tech-orbit {
  position: absolute;
  inset: -42px;
  z-index: 4;
  pointer-events: none;
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-radius: 50%;
  animation: orbitSpin 18s linear infinite;
}
.tech-orbit::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 50%;
}
.tech-icon {
  position: absolute;
  width: 52px;
  height: 52px;
  padding: 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.92);
  border: 2px solid rgba(255,255,255,0.16);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35), 0 0 20px rgba(99,102,241,0.18);
  backdrop-filter: blur(12px);
  animation: orbitCounterSpin 18s linear infinite;
}
.tech-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.tech-python { top: -2px; left: 50%; transform: translateX(-50%); }
.tech-java { top: 24%; right: -12px; }
.tech-csharp { bottom: 3%; right: 15%; }
.tech-cpp { bottom: 3%; left: 15%; }
.tech-figma { top: 24%; left: -12px; }

@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes orbitCounterSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}
.tech-icon:hover {
  box-shadow: 0 0 28px rgba(99,102,241,0.5);
}
@media (max-width: 600px) {
  .profile-avatar-container { width: 260px; height: 260px; }
  .tech-orbit { inset: -32px; }
  .tech-icon { width: 42px; height: 42px; padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .tech-orbit, .tech-icon { animation: none; }
}

/* ============================================================
   GitHub icon fix — inline SVG (self-contained, never fails)
   ============================================================ */
.icon-github { width: 20px; height: 20px; display: block; }
.social-btn .icon-github { width: 20px; height: 20px; }
.stat-icon .icon-github { width: 20px; height: 20px; }
.contact-icon-box .icon-github { width: 22px; height: 22px; }

/* ============================================================
   ADVANCED — About stats grid
   ============================================================ */
.stats-grid { gap: 1.1rem; }

.stat-item {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.stat-item::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}

.stat-item:hover::before { transform: scaleX(1); }

.stat-item::after {
  content: "";
  position: absolute;
  inset: -60% -20%;
  background: radial-gradient(circle, rgba(99,102,241,.14), transparent 60%);
  opacity: 0;
  transition: opacity .4s ease;
  z-index: -1;
}

.stat-item:hover::after { opacity: 1; }

.stat-icon {
  box-shadow: 0 0 0 4px rgba(6,182,212,.06);
}

.stat-item:hover .stat-icon {
  box-shadow: 0 6px 18px rgba(99,102,241,.45);
}

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

/* GitHub card gets its own brand-amber accent line + icon glow */
.stat-github-item::before {
  background: linear-gradient(90deg, var(--accent-amber), var(--accent-primary));
}
.stat-github-item .stat-icon {
  color: var(--accent-amber);
  background: rgba(245, 158, 11, .10);
  border-color: rgba(245, 158, 11, .22);
}
.stat-github-item:hover .stat-icon {
  color: #fff;
  background: var(--accent-amber);
  border-color: var(--accent-amber);
  box-shadow: 0 6px 18px rgba(245,158,11,.45);
}
.stat-github-item .stat-number {
  font-size: 1.7rem;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-amber));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================================
   ADVANCED — Skills & Expertise cards
   ============================================================ */
.skill-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.skill-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}

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

.skill-card::after {
  content: "";
  position: absolute;
  inset: -50% -20% auto -20%;
  height: 60%;
  background: radial-gradient(circle, rgba(99,102,241,.10), transparent 65%);
  opacity: 0;
  transition: opacity .4s ease;
  z-index: -1;
}

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

.skill-card:hover {
  box-shadow: 0 14px 32px rgba(0,0,0,.28);
}

.skill-card:nth-child(1)::before,
.skill-card:nth-child(1)::after { background: var(--accent-primary); }
.skill-card:nth-child(1)::after { background: radial-gradient(circle, rgba(99,102,241,.10), transparent 65%); }

.skill-card:nth-child(2)::before { background: var(--accent-secondary); }
.skill-card:nth-child(2)::after { background: radial-gradient(circle, rgba(6,182,212,.10), transparent 65%); }

.skill-card:nth-child(3)::before { background: var(--accent-tertiary); }
.skill-card:nth-child(3)::after { background: radial-gradient(circle, rgba(16,185,129,.10), transparent 65%); }

.skill-card:nth-child(4)::before { background: var(--accent-amber); }
.skill-card:nth-child(4)::after { background: radial-gradient(circle, rgba(245,158,11,.10), transparent 65%); }

.skill-icon {
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease;
}

.skill-card:hover .skill-icon {
  transform: translateY(-3px) rotate(-4deg) scale(1.06);
  box-shadow: 0 8px 20px rgba(99,102,241,.35);
}

.skill-pill {
  transition: var(--transition);
}

.skill-card:hover .skill-pill {
  border-color: var(--border-highlight);
  background: rgba(255,255,255,.08);
}

/* ============================================================
   ADVANCED — Contact info cards (incl. GitHub)
   ============================================================ */
.contact-info-card {
  position: relative;
  overflow: hidden;
}

.contact-info-card::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 3px;
  background: var(--accent-primary);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform .35s ease;
}

.contact-info-card:hover::before { transform: scaleY(1); }

.contact-info-card[href*="github"]::before { background: var(--accent-amber); }
.contact-info-card[href*="github"]:hover { border-color: var(--accent-amber); }
.contact-info-card[href*="github"] .contact-icon-box {
  transition: transform .35s ease, box-shadow .35s ease;
}
.contact-info-card[href*="github"]:hover .contact-icon-box {
  transform: rotate(-6deg) scale(1.08);
  box-shadow: 0 8px 18px rgba(245,158,11,.4);
}
